/* IconPop website. Tokens, both themes, components, every keyframe. */

:root {
  color-scheme: light;
  --bg: #FBF7F0;
  --ink: #16181B;
  --ink-2: #63696F;
  --ink-3: #8C9298;
  --line: rgba(22, 24, 27, .09);
  --surface: #ffffff;
  --accent: #6098f0;
  --accent-ink: #ffffff;
  --mark: rgba(96, 152, 240, .38);
  --btn-dark: #16181B;
  --btn-dark-ink: #F7F7F7;
  --btn-light: rgba(22, 24, 27, .06);
  --danger: #E5484D;
  --radius-pill: 999px;
  --radius-card: 18px;
  --shadow: 0 1px 2px rgba(20, 18, 30, .06), 0 10px 30px rgba(20, 18, 30, .10);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", system-ui, -apple-system, sans-serif;
  /* Mini replica (light values; the replica flips with its own .dark) */
  --card-body: #FFFFFF;
  --card-control: #E9EBEF;
  --card-ink: #14181B;
  --card-ink-2: #63696F;
  --card-ink-3: #8C9298;
  --card-edge-top: rgba(20, 24, 27, .16);
  --card-edge-bottom: rgba(20, 24, 27, .06);
  --tab-apply: #A3CFF8;
  --tab-settings: #F7ADA8;
}
@supports (color: oklch(0.98 0.016 73.684)) {
  :root { --bg: oklch(0.98 0.016 73.684); }
}
.navlink.about svg { color: #F0756B; }
.navlink.about::after { background: #F0756B; }
.navlink.faqs::after { background: #5DC46B; }
.navlink.changelog::after { background: #B38AF0; }
.navlink.faqs svg { color: #5DC46B; }
.navlink.changelog svg { color: #B38AF0; }
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141517;
  --ink: #F4EFE6;
  --ink-2: #B9B3A8;
  --ink-3: #7E786F;
  --line: rgba(244, 239, 230, .10);
  --surface: #1C1D20;
  --mark: rgba(96, 152, 240, .45);
  --btn-dark: #F4EFE6;
  --btn-dark-ink: #141517;
  --btn-light: rgba(244, 239, 230, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .4);
}

/* Page accents, after the dark theme so they win on dark pages */
html[data-accent="green"] { --accent: #5DC46B; --mark: rgba(112, 209, 122, .4); }
html[data-accent="purple"] { --accent: #B38AF0; --mark: rgba(179, 138, 240, .4); }
html[data-accent="red"] { --accent: #F0756B; --mark: rgba(240, 117, 107, .42); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ja"] body { line-height: 1.8; font-feature-settings: "palt"; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
  animation: nav-fade .7s var(--ease-out) both;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.links { display: flex; align-items: center; gap: 6px; }
/* Inert by default: .navrow/.navtools only become real flex groups on the mobile 3-row nav
   (below); at every other width their children sit directly in .links' own flex row, so this
   grouping never changes desktop layout. */
.navrow, .navtools { display: contents; }
.navlink {
  position: relative; padding: 8px 12px; font-weight: 700; font-size: 15px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px; border-radius: 10px;
}
.navlink svg { width: 16px; height: 16px; }
/* The purchase button has a reserved slot and grows leftward into it, so a longer label never moves the links. */
.navcta { display: flex; justify-content: flex-end; width: 186px; margin-left: 8px; flex: none; }
.navcta .btn { white-space: nowrap; }
.navlink::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out);
}
.navlink:hover::after { transform: scaleX(1); }
.lang { display: inline-flex; background: var(--btn-light); border-radius: var(--radius-pill); padding: 3px; margin-left: 6px; }
.lang button {
  padding: 4px 11px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: background .2s, color .2s, transform .2s var(--ease-spring);
}
.lang button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lang button:not(.on):hover { color: var(--ink); transform: translateY(-1px); }
.mute { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.mute:hover { background: var(--btn-light); color: var(--ink); }
.mute svg { width: 18px; height: 18px; }
.mute .off { display: none; }
.mute.is-muted .on { display: none; }
.mute.is-muted .off { display: block; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--radius-pill); font-weight: 700; font-size: 16px; line-height: 1;
  transition: transform .25s var(--ease-spring), box-shadow .25s, background .2s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-dark { background: var(--btn-dark); color: var(--btn-dark-ink); box-shadow: 0 6px 18px rgba(22, 24, 27, .22); }
.btn-dark:hover { box-shadow: 0 10px 26px rgba(22, 24, 27, .28); }
html[data-theme="dark"] .btn-dark { box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.btn-light { background: var(--btn-light); color: var(--ink); }
.btn-light:hover { background: color-mix(in srgb, var(--btn-light) 60%, var(--line)); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-sm svg { width: 15px; height: 15px; }
.price { background: var(--btn-dark); color: var(--btn-dark-ink); font-size: 12px; padding: 4px 8px; border-radius: 6px; font-weight: 800; }
.btn.pop { animation: pop-bounce .52s var(--ease-spring); }
.tip {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%) translateY(-4px);
  background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; padding: 7px 11px; border-radius: 9px;
  white-space: nowrap; pointer-events: none; opacity: 0; animation: tip-in 1.7s var(--ease-out) both; z-index: 5;
}
.tip::before { content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon title" "cta copy";
  column-gap: clamp(24px, 5vw, 56px); row-gap: 28px; align-items: start;
}
/* The hero waits for the playground: at load everything here starts after --after; reached by scrolling, it starts at once. */
.hero { --after: 0s; }
.hero.at-load { --after: .8s; }
.hero .title .w, .hero .title mark::before, .hero-icon, .hero .sub, .hero .cta-col, .hero .badges { animation-play-state: paused; }
.hero.in .title .w, .hero.in .title mark::before, .hero.in .hero-icon, .hero.in .sub, .hero.in .cta-col, .hero.in .badges { animation-play-state: running; }
.hero-icon { grid-area: icon; justify-self: center; width: clamp(150px, 20vw, 220px); display: block; background: none; border: none; padding: 0; cursor: pointer; filter: drop-shadow(0 18px 30px rgba(20, 18, 30, .18)); transition: filter .3s; animation: header-rise .8s var(--ease-out) both; animation-delay: var(--after); }
.hero-icon picture { display: block; }
.hero-icon img { width: 100%; height: auto; display: block; transition: transform .3s var(--ease-spring); }
.hero-icon:hover { filter: drop-shadow(0 26px 34px rgba(20, 18, 30, .26)); }
.hero-icon:hover img { transform: translateY(-7px) scale(1.04); }
.hero-icon:active img { transform: translateY(-3px) scale(1.02); }
.hero-icon picture.pop { animation: pop-bounce .52s var(--ease-spring); }
.hero-copy { grid-area: copy; max-width: 56ch; align-self: end; }
.cta-col { grid-area: cta; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: header-rise .7s var(--ease-out) both; animation-delay: calc(var(--after) + .6s); }
.cta-col .btn { justify-content: center; }
.cta-col .asbadge { align-self: center; }
.title {
  grid-area: title; margin: 0; max-width: none; align-self: center;
  font-size: clamp(46px, 8.6vw, 96px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em;
}
html[lang="ja"] .title { font-size: clamp(38px, 7vw, 78px); letter-spacing: 0; line-height: 1.18; max-width: 14ch; }
.title .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: enter-title .7s var(--ease-out) forwards; animation-delay: calc(var(--after, 0s) + .1s + var(--i, 0) * 70ms); }
.title mark {
  position: relative; background: none; color: inherit; padding: 0 .06em; z-index: 0;
}
.title mark::before {
  content: ""; position: absolute; z-index: -1; left: -.04em; right: -.06em; top: .12em; bottom: .04em;
  background: var(--mark); border-radius: .12em; transform: scaleX(0) rotate(-1.5deg); transform-origin: left center;
  animation: mark-in .55s var(--ease-out) forwards; animation-delay: calc(var(--after, 0s) + .8s);
}
.sub { margin: 0 0 14px; max-width: 46ch; font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); animation: header-rise .7s var(--ease-out) both; animation-delay: calc(var(--after, 0s) + .5s); }
.sub b { color: var(--ink); font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; animation: header-rise .7s var(--ease-out) both; animation-delay: .7s; }
.badges { margin: 0; font-size: 13.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; animation: header-rise .7s var(--ease-out) both; animation-delay: calc(var(--after, 0s) + .7s); }
.badges span { display: inline-flex; align-items: center; gap: 6px; }
.badges span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .7; }

/* ---------- Stage ---------- */
.stage-wrap { padding: 40px 0 24px; }
.stage {
  position: relative; max-width: 1040px; margin: 0 auto; aspect-ratio: 16 / 10;
  --mini-scale: 1;
  animation: header-rise .9s var(--ease-out) both; animation-delay: .1s;
}
.callout { position: absolute; z-index: 1; pointer-events: none; font-weight: 800; font-size: 15.5px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); animation: header-rise .7s var(--ease-out) both; animation-delay: .7s; transition: opacity .3s; }
html[lang="ja"] .callout { font-size: 13.5px; letter-spacing: 0; }
.callout.tl { left: 9%; top: 9%; width: 190px; }
.callout.br { right: 10%; bottom: 33%; width: 240px; text-align: right; }
.callout .arrow { width: 132px; height: 88px; display: block; color: var(--ink-2); }
.callout.tl .arrow { margin: 4px 0 0 40px; }
.callout.br .arrow { width: 156px; height: 96px; margin: 0 48px 2px auto; }
.stage.expanded .callout.tl { opacity: 0; }

.item {
  position: absolute; left: var(--x); top: var(--y); width: var(--w, 96px);
  --dx: 0px; --dy: 0px;
  transform: translate(var(--dx), var(--dy)) rotate(var(--r, 0deg));
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  z-index: 2;
}
.item.settle { transition: transform .45s var(--ease-spring); }
.item.lifting { cursor: grabbing; z-index: 30 !important; will-change: transform; }
.item .float { display: block; animation: float var(--dur, 5s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
/* The bob animates .float, so the lift lives on the artwork inside it: up, a touch bigger, longer shadow. */
.item .float > img, .item .float > svg { transition: transform .3s var(--ease-spring), filter .3s; }
.item:hover:not(.lifting) .float > img, .item:hover:not(.lifting) .float > svg { transform: translateY(-7px) scale(1.04); filter: drop-shadow(0 16px 20px rgba(20, 18, 30, .22)); }
.item.lifting .float { animation-play-state: paused; }
.item.lifting .float > img, .item.lifting .float > svg { transform: translateY(-12px) scale(1.08) rotate(-2deg); filter: drop-shadow(0 26px 28px rgba(20, 18, 30, .28)); }
.sticker { width: var(--w, 92px); }
.sticker img, .sticker svg { width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 16px rgba(20, 18, 30, .26)); }
.sticker.picked .float { animation: none; opacity: .55; }
.sticker.picked .float > img { transform: scale(.9); }
.folder { width: var(--w, 118px); }
.folder svg { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 8px 16px rgba(20, 18, 30, .24)); }
.folder .name { transition: opacity .3s; }
.item.lifting .name { opacity: .5; }
.folder .name { display: block; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-top: 4px; pointer-events: none; }
.folder.popped svg { animation: pop-bounce .52s var(--ease-spring); }
.folder image { opacity: 0; transition: opacity .3s; }
.folder.has-art image { opacity: 1; }

/* ---------- Mini replica ---------- */
.mini {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 370px;
  transform: translate(-50%, -50%) scale(var(--mini-scale)); z-index: 10;
  font-family: var(--font); color: var(--card-ink);
  --card-body: #FFFFFF; --card-control: #E9EBEF; --card-ink: #14181B; --card-ink-2: #63696F; --card-ink-3: #8C9298;
  --card-edge-top: rgba(20,24,27,.16); --card-edge-bottom: rgba(20,24,27,.06);
}
.mini.dark {
  --card-body: #181B1F; --card-control: #22262B; --card-ink: #F2F1F5; --card-ink-2: #98A0A8; --card-ink-3: #5F676E;
  --card-edge-top: rgba(255,255,255,.14); --card-edge-bottom: rgba(255,255,255,.04);
}
.mini { transition: width .55s var(--ease-spring), height .55s var(--ease-spring); }
.mini.full { width: 640px; height: 410px; }
.mini .tabs { position: absolute; left: 16px; top: 0; height: 30px; display: flex; gap: 14px; z-index: 0; transition: opacity .25s; }
.mini .full-tabs { gap: 10px; opacity: 0; pointer-events: none; }
.mini.full .full-tabs { opacity: 1; pointer-events: auto; }
.mini.full .mini-tabs { opacity: 0; visibility: hidden; }
.mini .mini-tabs { transition: opacity .25s, visibility .25s; }
.tabbtn { display: block; width: 104px; height: 30px; transform: translateY(3px); filter: saturate(.8) brightness(.96); transition: transform .2s var(--ease-spring), filter .2s; }
.tabbtn:hover { transform: translateY(0); filter: none; }
.tabbtn.on { transform: none; filter: none; }
.tabbtn .tab { width: 104px; }
.mini.full .corner { opacity: 0; pointer-events: none; }
.mini.full .body { padding: 14px; align-items: stretch; justify-content: flex-start; }
.app { display: grid; grid-template-columns: 124px 1fr 150px; gap: 12px; width: 100%; height: 100%; min-height: 0; animation: header-rise .35s var(--ease-out) both; }
.app .rail { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding-right: 4px; }
.app .rail h4 { margin: 8px 0 5px 9px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--card-ink-3); font-weight: 800; }
.rrow { display: block; width: 100%; text-align: left; font-size: 12.5px; font-weight: 600; padding: 6px 9px; border-radius: 8px; color: var(--card-ink-2); transition: background .15s, color .15s; }
.rrow:hover { background: var(--card-control); color: var(--card-ink); }
.rrow.on { background: var(--accent); color: #fff; font-weight: 700; }
.amain { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ahead { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; margin: 4px 6px 8px; }
.ahead .acount { font-size: 11px; color: var(--card-ink-3); font-weight: 600; }
.agrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; overflow: auto; padding: 2px; align-content: start; min-height: 0; }
.tile { border-radius: 10px; padding: 6px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background .15s, transform .15s var(--ease-spring), box-shadow .15s; }
.tile:hover { background: var(--card-control); }
.tile:active { transform: scale(.96); }
.tile.on { box-shadow: 0 0 0 2px var(--accent) inset; background: rgba(96, 152, 240, .12); }
.tile svg, .tile img { width: 100%; max-width: 64px; display: block; }
.tile.img img { width: 44px; margin: 4px 0; }
.tile span { font-size: 10px; color: var(--card-ink-2); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini.no-names .tile span { display: none; }
.aqd { border-left: 1px solid var(--card-control); padding-left: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-height: 0; }
.aqd b { font-size: 13px; }
.aqd small { font-size: 10.5px; color: var(--card-ink-2); line-height: 1.3; }
.square.sq2 { width: 120px; height: 120px; margin: 8px 0 4px; }
.square.sq2 .glyph { width: 48px; height: 48px; }
.square.sq2 .held { width: 84px; height: 84px; }
.square.sq2 .heldf { width: 96px; }
.minibtn { margin-top: auto; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; transition: transform .2s var(--ease-spring), filter .15s; }
.minibtn svg { width: 14px; height: 14px; }
.minibtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.minibtn:active { transform: scale(.96); }
.app[data-app="compose"] { grid-template-columns: 124px 1fr 150px; }
.symgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 4px; }
.sym { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; color: var(--card-ink-2); background: rgba(20, 24, 27, .03); transition: background .15s, color .15s, transform .15s var(--ease-spring); }
.mini.dark .sym { background: rgba(255, 255, 255, .04); }
.sym:active { transform: scale(.94); }
.sym svg { width: 28px; height: 28px; }
.sym:hover { background: var(--card-control); color: var(--card-ink); }
.sym.on { background: var(--accent); color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; padding: 0 14px; }
.sw { aspect-ratio: 1; border-radius: 50%; transition: transform .15s var(--ease-spring), box-shadow .15s; }
.sw:hover { transform: scale(1.12); }
.sw.on { box-shadow: 0 0 0 2px var(--card-body), 0 0 0 4px var(--accent); }
.apreview { align-items: center; justify-content: center; }
.cpanel { width: 100%; height: 100%; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 1px 1px, rgba(20, 24, 27, .10) 1px, transparent 1.5px) 0 0 / 14px 14px, rgba(20, 24, 27, .025); }
.mini.dark .cpanel { background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .10) 1px, transparent 1.5px) 0 0 / 14px 14px, rgba(255, 255, 255, .03); }
.cpreview svg { width: 200px; display: block; filter: drop-shadow(0 12px 20px rgba(20, 18, 30, .18)); transition: transform .25s var(--ease-spring); }
.cpreview.bump svg { animation: pop-bounce .45s var(--ease-spring); }
.ccap { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--card-ink-3); }
.cside { align-items: stretch; text-align: left; }
.cside h4 { margin: 8px 0 8px 6px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--card-ink-3); font-weight: 800; }
.cside .savebtn { justify-content: center; margin-top: auto; }
.app[data-app="settings"] { display: flex; align-items: center; justify-content: center; }
.mrows.big { max-width: 420px; width: 100%; margin: 0 auto; gap: 10px; }
.mrows.big .mrow { padding: 12px 14px; }
.mrows.big .mrow b { font-size: 13.5px; }
.mrows.big .mrow small { font-size: 11.5px; }
.square .heldf { width: 118px; display: block; animation: held-in .18s var(--ease-spring) both; }
.square .heldf svg { width: 100%; display: block; }
.mini .tab { height: 30px; display: block; }
.mini .tab.lights { width: 64px; }
.mini .tab.lights circle { transform: translateY(-2px); }
.mini .tab.name { width: 104px; }
.mini .tab text { font: 700 12.5px var(--font); fill: #14181B; }
.mini .tab.name:hover { transform: translateY(-2px); transition: transform .2s var(--ease-spring); }
.mini .body {
  position: absolute; left: 0; right: 0; top: 26px; bottom: 0; z-index: 1;
  background: var(--card-body); border-radius: 14px;
  box-shadow: 0 0 0 1px var(--card-edge-top), 0 2px 4px rgba(20,18,30,.06), 0 24px 60px rgba(20,18,30,.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px 14px;
  transition: background .25s, color .25s;
}
.corner {
  position: absolute; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--card-ink-3); transition: background .12s, color .12s, transform .2s var(--ease-spring);
}
.corner svg { width: 18px; height: 18px; }
.corner:hover { background: var(--card-control); color: var(--card-ink); }
.corner.active { background: var(--accent); color: #fff; }
.corner:active { transform: scale(.92); }
.corner.tl { left: 10px; top: 10px; }
.corner.tr { right: 10px; top: 10px; }
.corner.bl { left: 10px; bottom: 10px; }
.corner.br { right: 10px; bottom: 10px; }
.corner.wiggle { animation: wiggle .4s var(--ease-spring); }
.corner .sun { display: none; }
.mini.dark .corner .moon { display: none; }
.mini.dark .corner .sun { display: block; }

.square {
  position: relative; width: 150px; height: 150px; border-radius: 18px; display: grid; place-items: center;
  background: rgba(20, 24, 27, .03);
  transition: transform .22s var(--ease-spring), background .2s;
}
.mini.dark .square { background: rgba(255, 255, 255, .04); }
.square::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  border: 1.5px dashed color-mix(in srgb, var(--card-ink-2) 50%, transparent);
  transition: border-color .2s;
}
.square.targeted { transform: scale(1.03); background: rgba(96, 152, 240, .12); }
.square.targeted::before { border-color: var(--accent); }
.square.pop { animation: pop-bounce .52s var(--ease-spring); }
.square.shake { animation: shake .32s ease-in-out; }
.square .glyph { width: 64px; height: 64px; color: var(--card-ink-3); }
.square .held { width: 108px; height: 108px; object-fit: contain; animation: held-in .18s var(--ease-spring) both; }
.square .held[hidden] { display: none; }
.square .clear {
  position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--card-control); color: var(--card-ink-2); display: grid; place-items: center;
  animation: held-in .18s var(--ease-spring) both;
}
.square .clear svg { width: 9px; height: 9px; }
.square .clear:hover { color: var(--card-ink); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--card-ink-2); transition: color .18s; }
.steps li .num {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-control); color: var(--card-ink-3); font-size: 10px; font-weight: 800; transition: background .18s, color .18s;
}
.steps li .num svg { width: 9px; height: 9px; display: none; }
.steps li:nth-child(1) { --step: var(--accent); }
.steps li:nth-child(2) { --step: #F59E5C; }
.steps li:nth-child(3) { --step: #F0756B; }
.steps li.current { color: var(--step); font-weight: 800; }
.steps li.current .num { background: var(--step); color: #fff; }
.steps li.done .num { background: color-mix(in srgb, var(--step) 22%, transparent); color: var(--step); }
.steps li.done .num span { display: none; }
.steps li.done .num svg { display: block; }
.mini .error { margin: 6px 0 0; font-size: 10.5px; color: var(--danger); min-height: 14px; text-align: center; max-width: 220px; line-height: 1.3; }
.mini .pane { display: contents; }
.mrows { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(20,24,27,.03); }
.mini.dark .mrow { background: rgba(255,255,255,.04); }
.mrow b { display: block; font-size: 12.5px; }
.mrow small { display: block; font-size: 10.5px; color: var(--card-ink-2); }
.switch { width: 30px; height: 18px; border-radius: 9px; background: var(--card-control); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease-spring); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(12px); }

/* ---------- Features ---------- */
.features { padding: 56px 0 24px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 20px; }
.feature {
  text-align: center; padding: 10px 6px; border-radius: 16px;
  transition: transform .3s var(--ease-spring);
  opacity: 0; transform: translateY(24px);
}
.feature.in { animation: enter-lift .7s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 80ms); }
.feature:hover { transform: translateY(-4px); }
.feature .icon { width: 60px; height: 60px; margin: 0 auto 16px; color: var(--ink); transition: color .2s; display: block; }
.feature:hover .icon { color: var(--accent); }
.feature h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -0.015em; }
html[lang="ja"] .feature h3 { font-size: 16.5px; letter-spacing: 0; }
.icon * { transform-box: fill-box; transform-origin: center; }
.icon [class^="a-"] { animation-play-state: paused; }
.feature.in .icon [class^="a-"] { animation-play-state: running; }
/* 1 local-only */
.a-slash { animation: ic-slash 3.4s var(--ease-spring) infinite; }
/* 2 copy/paste */
.a-dup { animation: ic-dup 3.6s var(--ease-spring) infinite; }
/* 3 compose */
.a-g1 { animation: ic-g 4s ease-in-out infinite; }
.a-g2 { animation: ic-g 4s ease-in-out infinite; animation-delay: -1.333s; }
.a-g3 { animation: ic-g 4s ease-in-out infinite; animation-delay: -2.666s; }
/* 4 import */
.a-slide { animation: ic-slide 3.6s var(--ease-out) infinite; }
.a-lid { animation: ic-lid 3.6s var(--ease-spring) infinite; }
/* 5 sizes */
.a-s1 { animation: ic-scale 4.4s var(--ease-spring) infinite; }
.a-s2 { animation: ic-scale 4.4s var(--ease-spring) infinite; animation-delay: .25s; }
.a-s3 { animation: ic-scale 4.4s var(--ease-spring) infinite; animation-delay: .5s; }
/* 6 nudge/rotate/resize */
.a-nudge { animation: ic-nudge 3.6s ease-in-out infinite; }
.a-tilt { animation: ic-tilt 3.6s ease-in-out infinite; }
.a-handle { animation: ic-pulse 3.6s var(--ease-spring) infinite; }
/* 7 mini */
.a-morph { animation: ic-morph 3.6s ease-in-out infinite; }
/* 8 modular settings */
.a-knob { animation: ic-toggle 4s var(--ease-spring) infinite; }
.feature:hover .icon [class^="a-"] { animation-duration: 1.6s; }

/* ---------- CTA + footer ---------- */
.cta { padding: 64px 0 88px; text-align: center; }
.cta-line { margin: 0 0 18px; font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.025em; }
html[lang="ja"] .cta-line { letter-spacing: 0; }
.meta { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-3); }
footer { border-top: 1px solid var(--line); padding: 44px 0 64px; font-size: 14px; color: var(--ink-3); }
.foot { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-start; }
.foot .brand { font-size: 16px; color: var(--ink); }
.foot .brand img { width: 40px; height: 40px; border-radius: 10px; }
.foot .brand span a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.foot .brand span a:hover { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-bottom .copy { margin: 0; }
.socials { display: flex; gap: 6px; }
.socials a { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); transition: background .2s, color .2s, transform .2s var(--ease-spring); }
.socials a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { background: var(--btn-light); color: var(--ink); transform: translateY(-1px); }
.socials a.soon { color: var(--ink-3); }
.asbadge { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: transform .25s var(--ease-spring), filter .2s; }
.asbadge img { height: 44px; width: auto; display: block; }
.asbadge:hover { transform: translateY(-2px); }
.asbadge.pop { animation: pop-bounce .52s var(--ease-spring); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
[data-reveal] { opacity: 0; transform: translateY(22px); }
[data-reveal].in { animation: enter-lift .7s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 80ms); }
.hero[data-reveal].in { animation-delay: var(--after); }

/* ---------- Dark subpages ---------- */
.page { padding: 76px 0 96px; max-width: 760px; }
.page-title { margin: 0 0 10px; font-size: clamp(48px, 8vw, 84px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--accent); animation: header-rise .7s var(--ease-out) both; }
html[lang="ja"] .page-title { letter-spacing: 0; }
.updated { margin: 0 0 44px; color: var(--ink-3); font-size: 15px; display: flex; align-items: center; gap: 8px; animation: header-rise .7s var(--ease-out) both; animation-delay: .15s; }
.updated svg { width: 15px; height: 15px; }
.group-title { margin: 44px 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
.version { margin: 0 0 8px; }
.version .vnum { display: inline-flex; align-items: baseline; gap: 10px; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.version .vlabel { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #141517; font-weight: 800; letter-spacing: .02em; text-transform: lowercase; }
.version .vsum { margin: 6px 0 14px; color: var(--ink-2); max-width: 60ch; }
details.row { border-bottom: 1px solid var(--line); }
details.row summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 18px 0; font-weight: 700; font-size: 17px;
}
details.row summary::-webkit-details-marker { display: none; }
details.row .plus { position: relative; width: 16px; height: 16px; color: var(--ink-3); transition: transform .3s var(--ease-spring), color .2s; }
details.row .plus::before, details.row .plus::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; left: 50%; top: 50%; }
details.row .plus::before { width: 16px; height: 2px; transform: translate(-50%, -50%); }
details.row .plus::after { width: 2px; height: 16px; transform: translate(-50%, -50%); }
details.row[open] .plus { transform: rotate(135deg); color: var(--accent); }
details.row summary:hover .plus { color: var(--ink); }
details.row summary:hover { color: var(--accent); }
details.row .row-date { font-size: 13px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
details.row .row-body { padding: 0 0 22px 34px; color: var(--ink-2); font-size: 15.5px; }
.row-body p { margin: 0 0 10px; }
.row-body p:last-child { margin-bottom: 0; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: grid; grid-template-columns: 26px 1fr; gap: 6px; margin-bottom: 10px; line-height: 1.5; }
.items li .ico { font-size: 15px; line-height: 1.5; }
.items li.fix { color: var(--ink-3); font-size: 14px; }
.items li b { color: var(--ink); }
.items code, .row-body code { font-size: .9em; background: var(--line); padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.flag { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); margin-left: 6px; vertical-align: middle; font-weight: 700; }

/* ---------- Keyframes ---------- */
@keyframes nav-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes header-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes enter-title { to { opacity: 1; transform: none; } }
@keyframes enter-lift { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mark-in { to { transform: scaleX(1) rotate(-1.5deg); } }
@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes pop-bounce { 0% { transform: scale(1); } 19% { transform: scale(1.10); } 55% { transform: scale(.97); } 100% { transform: scale(1); } }
@keyframes held-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes wiggle { 30% { transform: scale(.85) rotate(-10deg); } 60% { transform: scale(1.05) rotate(6deg); } }
@keyframes tip-in { 0% { opacity: 0; transform: translateX(-50%) translateY(-4px); } 12%, 82% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; transform: translateX(-50%) translateY(-4px); } }
@keyframes ic-slash { 0%, 20% { transform: scaleX(0); opacity: 0; } 35% { transform: scaleX(1.08); opacity: 1; } 45%, 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(0); opacity: 0; } }
@keyframes ic-dup { 0%, 20% { transform: translate(-10px, -10px); } 55%, 100% { transform: translate(0, 0); } }
@keyframes ic-g { 0%, 26% { opacity: 1; transform: scale(1); } 33%, 93% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ic-slide { 0%, 20% { transform: translate(-16px, -10px); opacity: 0; } 30% { opacity: 1; } 60% { transform: translate(0, 4px); } 70%, 100% { transform: translate(0, 4px); opacity: 0; } }
@keyframes ic-lid { 0%, 55% { transform: none; } 66% { transform: translateY(-3px) rotate(-6deg); } 80%, 100% { transform: none; } }
@keyframes ic-scale { 0%, 8% { transform: scale(.4); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 75% { opacity: 1; transform: scale(1); } 90%, 100% { opacity: 0; transform: scale(.4); } }
@keyframes ic-nudge { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, -2px); } 50% { transform: translate(0, 0); } 75% { transform: translate(3px, 2px); } }
@keyframes ic-tilt { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(14deg); } }
@keyframes ic-pulse { 0%, 80%, 100% { transform: scale(1); } 90% { transform: scale(1.6); } }
@keyframes ic-morph { 0%, 15% { x: 18px; y: 18px; width: 24px; height: 24px; } 50%, 65% { x: 8px; y: 22px; width: 44px; height: 16px; } 100% { x: 18px; y: 18px; width: 24px; height: 24px; } }
@keyframes ic-toggle { 0%, 20% { transform: translateX(0); } 50%, 80% { transform: translateX(14px); } 100% { transform: translateX(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stage { aspect-ratio: 4 / 5; --mini-scale: .82; }
  .mini.full { --mini-scale: .9; }
  .callout { font-size: 13px; }
  .callout.tl { left: 0; top: 0; width: 150px; }
  .callout.br { right: 0; bottom: 0; width: 180px; }
  .callout .arrow { width: 84px; height: 56px; }
  .callout.tl .arrow { margin-left: 20px; }
  .callout.br .arrow { margin-right: 16px; }
  .item { --w: 74px; }
  .folder { --w: 92px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  /* Three rows instead of one cramped line: brand + language + sound, then the three nav
     links centered as one group, then the purchase button. .links is unwrapped via
     display:contents so .navrow/.navtools/.navcta can be placed directly into the grid
     alongside .brand; .navrow and .navtools switch from inert (display:contents, desktop
     default above) to real flex groups here so each row's items sit together instead of
     spreading edge to edge. Static, not sticky — a header this tall shouldn't camp at the
     top of a narrow screen. */
  .nav { position: static; }
  .nav-in {
    display: grid; height: auto; padding: 10px 0; row-gap: 10px; column-gap: 10px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand tools" "navrow navrow" "cta cta";
  }
  .brand { grid-area: brand; font-size: 17px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .links { display: contents; }
  .navrow { grid-area: navrow; display: flex; justify-content: center; align-items: center; gap: 10px; }
  .navlink { justify-content: center; padding: 6px; font-size: 14px; }
  .navlink + .navlink::before { content: "|"; margin-right: 10px; color: var(--ink-3); font-weight: 400; }
  .navtools { grid-area: tools; display: flex; align-items: center; gap: 10px; justify-self: end; }
  .lang { margin-left: 0; }
  .lang button { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
  .mute { width: 32px; height: 32px; }
  .navcta { grid-area: cta; width: auto; justify-self: center; margin-left: 0; }
  .nav .btn-sm { padding: 8px 16px; font-size: 13px; gap: 6px; }
  .nav .btn-sm svg { width: 14px; height: 14px; }
  .hero { padding: 16px 0 40px; }
  .hero-grid { grid-template-areas: "icon title" "copy copy" "cta cta"; column-gap: 16px; row-gap: 22px; }
  .hero-icon { width: 96px; }
  .cta-col { justify-self: start; flex-direction: row; flex-wrap: wrap; }
  .title { font-size: clamp(28px, 8.4vw, 40px); }
  html[lang="ja"] .title { font-size: clamp(24px, 7vw, 34px); }
  .stage { --mini-scale: .72; }
  .mini.full { --mini-scale: .52; }
  .item { --w: 70px; }
  .folder { --w: 88px; }
  .folder .name { display: none; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; gap: 26px; }
  .feature h3 br { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .15s !important; }
  [data-reveal], .feature, .title .w { opacity: 1 !important; transform: none !important; }
  .title mark::before { transform: scaleX(1) rotate(-1.5deg); }
  .tip { opacity: 1; }
}

/* ---------- About ---------- */
.page.about { max-width: 720px; }
.about-title { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 18px; color: var(--ink); font-weight: 800; animation: header-rise .7s var(--ease-out) both; animation-delay: .1s; }
.about-title mark { color: inherit; padding: .02em .1em; margin: 0 -.04em; border-radius: .12em; background: var(--mark); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html[lang="ja"] .about-title { font-size: clamp(22px, 3vw, 32px); letter-spacing: 0; line-height: 1.35; max-width: none; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 54ch; margin: 0 0 52px; animation: header-rise .7s var(--ease-out) both; animation-delay: .15s; }
.about-sec { margin: 0 0 56px; }
.about-sec h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin: 0 0 16px; color: var(--accent); }
.prose p { margin: 0 0 16px; font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.prose b, .about-list b { color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.tl-item { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 20px; margin-bottom: 30px; }
/* The connecting line runs from each icon to the next; the last beat has none after it. */
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 35px; top: 72px; bottom: -30px; width: 2px; background: var(--line); }
.tl-glyph { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); box-shadow: 0 0 0 1px var(--line); position: relative; }
.tl-glyph svg, .tl-glyph img { width: 48px; height: 48px; display: block; }
.tl-glyph img { width: 56px; height: 56px; border-radius: 8px; }
.tl-glyph img.pixel { image-rendering: pixelated; }
.tl-src { margin: 6px 0 0 !important; font-size: 12.5px !important; color: var(--ink-3) !important; }
.tl-src a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.tl-src a:hover { color: var(--accent); }
.tl-year { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent); margin: 6px 0 4px; }
.tl-item p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 58ch; }
.tl-item b { color: var(--ink); }
.about-list { list-style: none; margin: 4px 0 20px; padding: 0; display: grid; gap: 12px; }
.about-list li { position: relative; padding-left: 26px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.about-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.about-cta { padding: 24px 0 0; text-align: left; }
.about-cta .cta-line { margin-bottom: 16px; }
