/* EasyLogo (templates/easy_logo.html): the story's lists and controls, the sizes the scene
   pins under the export tiles, and the feature panels. The scene is static/motion/easylogo.js.
   Everything here is scoped to .mx-app--easylogo or named mx-elg-. */

.mx-app--easylogo { --word: 13.4vw; --word-phone: 13vw; }
.mx-app--easylogo .mx-story__glow {
  background: radial-gradient(32% 46% at 67% 52%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 72%);
}
.mx-app--easylogo .mx-story__step-in { max-width: 560px; }
.mx-app--easylogo .mx-story__step h2 { font-size: clamp(36px, 3.9vw, 58px); }
/* the stage stays pinned a little past the last step, so the export lands before it lets go */
.mx-app--easylogo .mx-story__steps { padding-bottom: 30vh; }
.mx-app--easylogo .mx-story__step .mx-actions { margin-top: 26px; }
.mx-app--easylogo .mx-story__src a, .mx-app--easylogo .mx-feat > p a { color: var(--bone); }

/* without WebGL: the editor's own render of the mark, clear of the giant word, and no drag hint */
.mx-elg.no-gl .mx-story__fallback { top: auto; bottom: 10vh; right: 8vw; height: 36vh; }
.mx-elg.no-gl .mx-story__hud, .mx-elg.no-gl .mx-elg-grab { display: none; }

/* the scene: drag to turn it, and the export sizes pinned under their tiles */
.mx-elg-grab { position: absolute; top: 12%; bottom: 10%; left: 48%; right: 3%; pointer-events: auto; cursor: grab; touch-action: pan-y; }
.mx-elg-grab:active { cursor: grabbing; }
.mx-elg-tags { position: absolute; inset: 0; pointer-events: none; }
.mx-elg-tag {
  position: absolute; left: 0; top: 0; width: 64px; margin-left: -32px; text-align: center;
  opacity: 0; transition: opacity .35s var(--ease);
}
.mx-elg-tag b { display: block; font-weight: 300; font-size: 19px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--bone); }
.mx-elg-tag.is-on { opacity: 1; }

/* step 1: the shapes, each lit as it snaps */
.mx-elg-log { max-width: 460px; margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mx-elg-log li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ash); transition: color .3s var(--ease);
}
.mx-elg-log b { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ash-2); transition: color .3s var(--ease); }
.mx-elg-log__mark { display: block; width: 30px; height: 30px; color: var(--line-2); transition: color .3s var(--ease), filter .3s var(--ease); }
.mx-elg-log li.is-now { color: var(--bone); }
.mx-elg-log li.is-now .mx-elg-log__mark { color: var(--bone-2); }
.mx-elg-log li.is-done { color: var(--bone-2); }
.mx-elg-log li.is-done b { color: var(--bone-2); }
.mx-elg-log li.is-done .mx-elg-log__mark { color: var(--accent-ink); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent)); }
.mx-story.no-gl .mx-elg-log li { color: var(--bone-2); }

/* step 2: the style controls, the same three as the app's style sheet */
.mx-elg-style {
  max-width: 470px; margin-top: 22px; padding: 14px 18px 6px;
  background: rgba(28, 28, 32, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 18px;
}
.mx-elg-style[hidden] { display: none; }
.mx-elg-style__hint { margin: 0 0 4px; font-size: 14px; color: var(--ash); }
.mx-elg-style__row {
  display: grid; grid-template-columns: 108px minmax(0, 1fr) 2.4ch; align-items: center; gap: 12px;
  min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line);
}
.mx-elg-style__hint + .mx-elg-style__row { border-top: 0; }
.mx-elg-style__row .mx-read { color: var(--bone-2); }
.mx-elg-swatches { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 9px; }
.mx-elg-swatch {
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.mx-elg-swatch:hover { transform: scale(1.08); }
.mx-elg-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--graphite), 0 0 0 4px var(--bone); }
.mx-elg-range { width: 100%; height: 28px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.mx-elg-val { justify-self: end; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--bone); }
.mx-elg-seg {
  grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 4px; border-radius: 12px; background: var(--graphite-2);
}
.mx-elg-seg button {
  min-height: 36px; padding: 0 4px; border: 0; border-radius: 9px; background: none; color: var(--ash);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.mx-elg-seg button:hover { color: var(--bone); }
.mx-elg-seg button[aria-pressed="true"] { background: var(--bone); color: var(--night); }

/* step 3: the nine marks, lit as their cards turn in */
.mx-elg-names { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; margin: 22px 0 0; padding: 0; list-style: none; }
.mx-elg-names li {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 14, 17, .6);
  font-size: 14px; color: var(--ash-2); transition: color .3s var(--ease), border-color .3s var(--ease);
}
.mx-elg-names b { font-weight: 550; }
.mx-elg-names li.is-on { color: var(--bone); border-color: var(--line-2); }
.mx-story.no-gl .mx-elg-names li { color: var(--bone-2); }

/* step 4: five sizes from one file */
.mx-elg-sizes { max-width: 460px; margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mx-elg-sizes li {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ash-2); transition: color .3s var(--ease);
}
.mx-elg-sizes b { font-weight: 300; font-size: 22px; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.mx-elg-sizes li.is-on { color: var(--bone); }
.mx-story.no-gl .mx-elg-sizes li { color: var(--bone-2); }

/* ---------- the feature panels: the app's own screens, drawn dark ---------- */
/* the editor's canvas, mid-drag: its paper, its dots, and a stroke still following the finger */
.mx-elg-viz--paper { align-items: center; }
.mx-elg-paper {
  width: min(100%, 290px); aspect-ratio: 1; padding: 3%; border-radius: 16px; background: #F4F3EA;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .7);
}
.mx-elg-paper__grid { display: block; width: 100%; height: 100%; overflow: visible; }
.mx-elg-paper__dots { fill: rgba(118, 116, 102, .42); }
.mx-elg-paper__live { opacity: .5; }
.mx-elg-paper__touch { fill: rgba(194, 65, 12, .12); stroke: rgba(194, 65, 12, .55); stroke-width: .05; }

/* layers: the mark's three shapes, with the app's reorder arrows */
.mx-elg-layers { display: grid; gap: 8px; }
.mx-elg-layer {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 14px; align-items: center; gap: 16px;
  padding: 8px 16px 8px 10px; border-radius: 14px; background: var(--graphite-2); color: var(--bone-2);
  font-size: 16px; font-weight: 550;
}
.mx-elg-layer.is-on { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); }
.mx-elg-layer__mark { display: block; width: 48px; height: 48px; color: var(--accent-ink); }
.mx-elg-updown {
  width: 14px; height: 24px; background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 24'><path d='M2 9l5-5 5 5M2 15l5 5 5-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 24'><path d='M2 9l5-5 5 5M2 15l5 5 5-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

/* the style sheet: colour, thickness, smoothness and corner style, as the app shows them */
.mx-elg-sheet { display: grid; gap: 9px; font-size: 15px; color: var(--bone-2); }
.mx-elg-sheet__bar { display: flex; justify-content: flex-end; margin-bottom: 2px; }
.mx-elg-wheel {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 6px, var(--graphite) 6.5px 9px, transparent 9.5px),
    conic-gradient(#ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #007aff, #af52de, #ff2d55, #ff3b30);
}
.mx-elg-sheet b { font-weight: 500; color: var(--ash); font-variant-numeric: tabular-nums; }
.mx-elg-sheet__label { margin-top: 2px; }
.mx-elg-track { position: relative; display: block; height: 4px; margin: 4px 0 6px; border-radius: 2px; background: var(--graphite-2); }
.mx-elg-track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v); border-radius: 2px; background: var(--accent-ink); }
.mx-elg-track i {
  position: absolute; top: 50%; left: var(--v); width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; background: var(--bone); box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.mx-elg-segs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: 12px; background: var(--graphite-2); text-align: center; font-size: 14px; font-weight: 600; color: var(--ash);
}
.mx-elg-segs span { padding: 7px 2px; border-radius: 9px; }
.mx-elg-segs .is-on { background: rgba(236, 233, 226, .14); color: var(--bone); }

/* the export sheet: the mark on a transparent background, the formats and the size slider */
.mx-elg-export { display: grid; gap: 14px; }
.mx-elg-checker {
  justify-self: center; width: 128px; height: 128px; padding: 16px; border-radius: 14px;
  background: repeating-conic-gradient(#38383e 0 25%, #2b2b30 0 50%) 0 0 / 16px 16px;
}
.mx-elg-checker svg { display: block; width: 100%; height: 100%; }

/* undo: the mark's history, and the two buttons that walk it */
.mx-elg-history { display: flex; justify-content: center; gap: 10px; }
.mx-elg-hist { width: 64px; height: 64px; padding: 8px; border-radius: 14px; background: var(--graphite-2); color: var(--ash-2); }
.mx-elg-hist svg { display: block; width: 100%; height: 100%; }
.mx-elg-hist.is-on { color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); }
.mx-elg-undo { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.mx-elg-undo__btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--graphite-2); }
.mx-elg-undo__btn svg { width: 22px; height: 22px; fill: none; stroke: var(--bone); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* where a mark ends up: an app icon, a profile picture, a browser tab */
.mx-elg-uses { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 32px); }
.mx-elg-use svg { display: block; width: 100%; height: 100%; }
.mx-elg-use--icon { width: 92px; height: 92px; padding: 12px; border-radius: 21px; background: #F5F5F7; }
.mx-elg-use--avatar { width: 84px; height: 84px; padding: 12px; border-radius: 50%; background: #FFFFFF; }
.mx-elg-use--tab {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 12px;
  border-radius: 12px 12px 0 0; background: var(--graphite-2); box-shadow: inset 0 -2px 0 var(--accent-ink);
  font-size: 14px; color: var(--bone-2);
}
.mx-elg-use--tab svg { width: 20px; height: 20px; }
.mx-elg-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.mx-elg-pills li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--bone-2); }

/* the price */
.mx-elg-price { display: flex; align-items: flex-end; gap: 14px; }
.mx-elg-price__num { font-weight: 200; font-size: clamp(64px, 7vw, 108px); line-height: .8; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.mx-elg-price .mx-read { margin-bottom: 4px; }
.mx-elg-price + .mx-elg-pills { justify-content: flex-start; }

@media (max-width: 860px) {
  .mx-elg-grab { left: 6%; right: 6%; top: 11%; bottom: 52%; }
  .mx-elg.no-gl .mx-story__word { top: 17%; }
  .mx-elg.no-gl .mx-story__fallback { top: 25vh; bottom: auto; right: 50%; height: 27vh; transform: translateX(50%); }
  /* each step's copy rests at the foot of the screen while its beat plays in the top half */
  .mx-app--easylogo .mx-story__step { min-height: 150vh; min-height: 150svh; padding-bottom: 0; }
  .mx-app--easylogo .mx-story__step-in { position: sticky; bottom: 0; max-width: none; padding-bottom: 26px; }
  .mx-app--easylogo .mx-story__step h2 { font-size: 32px; }
  .mx-app--easylogo .mx-story__sub { font-size: 15px; }
  .mx-app--easylogo .mx-story__src { display: none; }
  .mx-app--easylogo #elg-export .mx-story__src { display: block; margin-top: 14px; font-size: 12.5px; }
  .mx-app--easylogo .mx-story__step .mx-actions { margin-top: 16px; }
  .mx-elg-log, .mx-elg-sizes { margin-top: 12px; }
  .mx-elg-log li { padding: 6px 0; font-size: 14.5px; }
  .mx-elg-style { margin-top: 12px; padding: 4px 14px 0; }
  .mx-elg-style__hint { display: none; }
  .mx-elg-style__row { grid-template-columns: 92px minmax(0, 1fr) 2.4ch; min-height: 46px; padding: 4px 0; }
  .mx-elg-swatches { gap: 7px; }
  .mx-elg-swatch { width: 30px; height: 30px; }
  .mx-elg-names { display: none; }
  .mx-elg-sizes { display: flex; flex-wrap: wrap; gap: 4px 18px; border: 0; }
  .mx-elg-sizes li { display: block; padding: 0; border: 0; }
  .mx-elg-sizes li span { display: none; }
  .mx-elg-sizes b { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-elg-tag, .mx-elg-log li, .mx-elg-log__mark, .mx-elg-names li, .mx-elg-sizes li, .mx-elg-swatch { transition: none; }
}
