/* Aestia — built on the Sensai design system.

   Every token below is read from the theme's own stylesheets
   (assets/css/color.css, style.css, module-css/{banner,working,faq}.css)
   rather than eyeballed:
     --theme-color #6600FF · --secondary-color #0E131D · --title-color #111111
     --text-color #6A6A6A · borders #EDEDED / #D7D7D7 · violet tint #F9F6FF
     Outfit (titles, buttons) + Inter (body, 16/26)
     buttons + inputs: 55px pill, padding 15px 40px, 18px/30px w500
     cards 10px · accordions 5px
     shadow      0px 20px 30px 0px rgba(0,0,0,.06)
     soft shadow 0px 10px 50px 0px rgba(7,2,74,.1)

   The theme ships LIGHT ONLY. The dark variant is built from the theme's own
   dark values (#0E131D, #141417, #A9A7B0); the single derived value is the
   accent used as TEXT on dark, mixed from the brand violet rather than invented. */

:root {
  --violet:      #6600FF;
  --violet-2:    #6828FF;
  --violet-ink:  #6600FF;
  --violet-soft: #F9F6FF;
  --secondary:   #0E131D;

  --ground:    #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #F9F6FF;

  --title: #111111;
  --text:  #6A6A6A;
  --muted: #A8A8A8;

  --line:   #EDEDED;
  --line-2: #D7D7D7;

  --amber: #FFBD1F;
  --rose:  #F4244F;

  --shadow:      0px 20px 30px 0px rgba(0, 0, 0, .06);
  --shadow-soft: 0px 10px 50px 0px rgba(7, 2, 74, .1);

  --pill: 55px;
  --card: 10px;
  --card-sm: 5px;
  --pad: 15px;
}

:root[data-theme="dark"] {
  --violet-ink:  color-mix(in oklab, #6600FF 52%, #ffffff);
  --violet-soft: #1A1030;
  --ground:    #0E131D;
  --surface:   #141417;
  --surface-2: #16161C;
  --title: #FFFFFF;
  --text:  #A9A7B0;
  --muted: #6E6E6E;
  --line:   #25252C;
  --line-2: #33333C;
  --shadow:      0px 20px 30px 0px rgba(0, 0, 0, .35);
  --shadow-soft: 0px 10px 50px 0px rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --violet-ink:  color-mix(in oklab, #6600FF 52%, #ffffff);
    --violet-soft: #1A1030;
    --ground: #0E131D; --surface: #141417; --surface-2: #16161C;
    --title: #FFFFFF; --text: #A9A7B0; --muted: #6E6E6E;
    --line: #25252C; --line-2: #33333C;
    --shadow: 0px 20px 30px 0px rgba(0, 0, 0, .35);
    --shadow-soft: 0px 10px 50px 0px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--ground); color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 26px; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 600; color: var(--title); margin: 0; letter-spacing: -.015em;
}
a { color: var(--violet-ink); text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--title); }
:is(a, button, summary, textarea, [tabindex]):focus-visible,
.dropzone:focus-within { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem .8rem; z-index: 30; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: Outfit, sans-serif; font-size: 14px; line-height: 20px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em; color: var(--violet-ink); margin: 0 0 13px;
}
.sec-head { margin-bottom: 46px; }
.sec-head h2 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.16; }
.sec-head p { margin: 14px 0 0; font-size: 18px; line-height: 32px; max-width: 56ch; }
.sec-head.center { text-align: center; }
.sec-head.center p { margin-inline: auto; }

/* ── buttons ──────────────────────────────────────────── */
.cta {
  font-family: Outfit, sans-serif; font-size: 18px; line-height: 30px; font-weight: 500;
  padding: 15px 40px; border: 1px solid transparent; border-radius: var(--pill);
  background: var(--violet); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .4s ease, color .4s ease, opacity .2s ease; width: 100%;
}
.cta:hover:not(:disabled) { background: var(--secondary); color: #fff; }
.cta:disabled { opacity: .45; cursor: not-allowed; }
.cta.ghost { background: transparent; color: var(--title); border-color: var(--line-2); }
.cta.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--violet); }
.cta .price { margin-left: auto; font-weight: 600; }
.cta.ghost .price { color: var(--violet-ink); }
.cta svg { flex: none; }
.linkish {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: Outfit, sans-serif; font-size: 15px; color: var(--violet-ink);
}
.linkish:hover { color: var(--title); }
.chip-btn {
  flex: 1 1 auto; font-family: Outfit, sans-serif; font-size: 15px; font-weight: 500;
  padding: 11px 20px; border-radius: var(--pill); border: 1px solid var(--line-2);
  background: transparent; color: var(--title); cursor: pointer; transition: all .3s ease;
}
.chip-btn:hover { border-color: var(--violet); color: var(--violet-ink); }

/* ── header ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 78px; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--title); }
.wordmark:hover { color: var(--title); }
.mark { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--violet); display: grid; place-items: center; }
.wordmark span { font-family: Outfit, sans-serif; font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.header-nav { display: flex; align-items: center; gap: 12px; }
.header-nav .links { display: flex; align-items: center; gap: 30px; font-family: Outfit, sans-serif; font-size: 16px; }
.header-nav .links a { color: var(--text); }
.header-nav .links a:hover { color: var(--title); }
.theme-toggle {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; color: var(--title); cursor: pointer;
  transition: all .3s ease; padding: 0;
}
.theme-toggle:hover { border-color: var(--violet); color: var(--violet-ink); }
@media (max-width: 860px) { .header-nav .links { display: none; } }

/* ── hero ─────────────────────────────────────────────── */
/* the decorative blobs bleed past the container; clip sideways only so the
   vertical bleed survives but the page never scrolls horizontally on a phone */
.hero { padding-block: clamp(44px, 7vw, 96px) 30px; overflow-x: clip; }
.hero-grid { display: grid; gap: 44px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: 60px; } }
.hero h1 { font-size: clamp(36px, 6.2vw, 60px); line-height: 1.07; margin-bottom: 28px; }
.hero .lede { font-size: 18px; line-height: 32px; margin: 0 0 32px; max-width: 46ch; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; }
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.proof svg { color: var(--violet-ink); flex: none; }

.hero-art { position: relative; }
.hero-art .blob { position: absolute; border-radius: 50%; background: var(--violet-soft); z-index: 0; }
.hero-art .blob.a { left: 4px; top: -46px; width: 194px; height: 194px; }
.hero-art .blob.b { right: -22px; bottom: 44px; width: 150px; height: 150px; }
.look-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.look-grid figure { margin: 0; }
.look-grid figure:nth-child(2), .look-grid figure:nth-child(4) { margin-top: 44px; }
.look-grid .shot {
  aspect-ratio: 4 / 5; border-radius: var(--card); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--shadow); display: block;
}
.look-grid .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.look-grid figcaption { margin-top: 10px; font-family: Outfit, sans-serif; font-size: 14px; font-weight: 500; color: var(--title); }
/* Until the real renders land, a labelled stand-in — never a fake photo. */
.shot.pending { display: grid; place-items: center; border: 1px dashed var(--line-2); }
.shot.pending::after {
  content: attr(data-label); font-family: Outfit, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 0 10px;
}

/* ── studio ───────────────────────────────────────────── */
.studio { display: grid; gap: 30px; padding-bottom: 60px; }
@media (min-width: 1000px) { .studio { grid-template-columns: 420px minmax(0, 1fr); align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card); padding: 30px; box-shadow: var(--shadow); }
@media (min-width: 1000px) { .panel.sticky { position: sticky; top: 98px; } }
.step + .step { margin-top: 30px; }
.step-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.step-head h2 { font-size: 20px; line-height: 28px; }
.step-n { font-family: Outfit, sans-serif; font-size: 14px; font-weight: 500; color: var(--violet-ink); }

/* ── dropzone ─────────────────────────────────────────── */
.dropzone {
  display: block; border: 1.5px dashed var(--line-2); border-radius: var(--card);
  background: var(--surface-2); cursor: pointer; overflow: hidden; transition: all .3s ease;
}
.dropzone:hover, .dropzone.hot { border-color: var(--violet); background: var(--violet-soft); }
.dz-empty { display: grid; place-items: center; gap: 6px; padding: 34px 20px; text-align: center; }
.dz-icon { color: var(--violet-ink); }
.dz-empty strong { font-family: Outfit, sans-serif; font-size: 17px; font-weight: 500; color: var(--title); }
.dz-hint { font-size: 14px; line-height: 22px; color: var(--text); max-width: 32ch; }
#preview { display: block; width: 100%; max-height: 240px; object-fit: contain; background: var(--surface-2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; }
.privacy { margin: 0; color: var(--muted); font-size: 14px; line-height: 22px; }

/* ── tabs, looks, sizes ───────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: none; font-family: Outfit, sans-serif; font-size: 14px; font-weight: 500;
  padding: 8px 18px; border-radius: var(--pill); border: 1px solid var(--line-2);
  background: transparent; color: var(--text); cursor: pointer; transition: all .3s ease;
}
.tab:hover { border-color: var(--violet); color: var(--violet-ink); }
.tab[aria-selected="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.grid::-webkit-scrollbar { width: 7px; }
.grid::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.tile {
  text-align: left; padding: 12px; border-radius: var(--card); border: 1px solid var(--line);
  background: var(--surface); color: var(--title); cursor: pointer; font: inherit; transition: all .3s ease;
}
.tile:hover { border-color: var(--violet); }
.tile[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); }
.tile .emoji { font-size: 17px; display: block; margin-bottom: 5px; }
.tile .name { display: block; font-family: Outfit, sans-serif; font-weight: 500; font-size: 15px; color: var(--title); }
.tile .blurb { display: block; color: var(--text); font-size: 13px; line-height: 19px; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: var(--card); border: 1px solid var(--line-2);
  background: transparent; color: var(--title); font: inherit; font-size: 14px;
  cursor: pointer; line-height: 1.3; text-align: left; transition: all .3s ease;
}
.chip:hover { border-color: var(--violet); }
.chip[aria-checked="true"] { border-color: var(--violet); background: var(--violet-soft); }
.chip small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }

.advanced { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.advanced summary { cursor: pointer; font-family: Outfit, sans-serif; font-size: 15px; color: var(--violet-ink); list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+ "; font-weight: 600; }
.advanced[open] summary::before { content: "\2212 "; }
.advanced summary:hover { color: var(--title); }
textarea {
  width: 100%; margin-top: 12px; padding: 14px 18px; border-radius: var(--card);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--title);
  font: inherit; font-size: 15px; resize: vertical;
}
.hint { color: var(--muted); font-size: 14px; line-height: 22px; margin: 10px 0 0; }
.hint.center { text-align: center; }

.meta { margin: 14px 0 0; font-size: 14px; line-height: 22px; color: var(--muted); text-align: center; min-height: 22px; }
.meta.err  { color: var(--rose); }
.meta.ok   { color: var(--violet-ink); }
.meta.warn { color: #B57F00; }
:root[data-theme="dark"] .meta.warn { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .meta.warn { color: var(--amber); } }

.progress { height: 4px; background: var(--line); border-radius: var(--pill); overflow: hidden; margin-top: 14px; }
.bar-fill { height: 100%; width: 30%; background: var(--violet); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(380%); } }

/* ── result ───────────────────────────────────────────── */
.sheet { min-height: 380px; display: grid; }
.sheet-empty { place-self: center; text-align: center; color: var(--text); padding: 40px 20px; }
.sheet-empty .big { color: var(--line-2); display: block; margin-bottom: 12px; }
.sheet-empty strong { font-family: Outfit, sans-serif; font-size: 20px; color: var(--title); display: block; }

.frame-label { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.frame-label #frame-no { font-family: Outfit, sans-serif; font-size: 22px; line-height: 30px; font-weight: 600; color: var(--title); }
.frame-label #frame-meta { font-size: 14px; color: var(--muted); text-align: right; }

.compare {
  position: relative; overflow: hidden; background: var(--secondary);
  border-radius: var(--card); touch-action: none; user-select: none; cursor: ew-resize;
}
.compare img { display: block; width: 100%; }
.compare .before { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 50% 0 0); }
.handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.handle::after {
  content: "\21C4"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: var(--violet); font-size: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.stamp {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: Outfit, sans-serif; font-weight: 600; font-size: clamp(26px, 6vw, 46px);
  letter-spacing: .14em; color: rgba(255,255,255,.26); transform: rotate(-22deg); pointer-events: none;
}
.tagline { position: absolute; top: 16px; font-family: Outfit, sans-serif; font-size: 13px; font-weight: 500; color: #fff; padding: 6px 14px; border-radius: var(--pill); }
.tagline.l { left: 16px; background: rgba(14,19,29,.55); }
.tagline.r { right: 16px; background: rgba(102,0,255,.85); }

/* a local restyle has no identity lock — the frame says so, always */
.compare img.at-risk { outline: 3px solid var(--amber); outline-offset: -3px; }
@keyframes develop { from { opacity: 0; transform: scale(1.01); } to { opacity: 1; transform: none; } }
.developing { animation: develop .5s ease-out both; }

.paywall { display: grid; gap: 12px; margin-top: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.contact-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; margin-top: 14px; }
.contact-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; background: var(--surface-2); border: 2px solid transparent; }
.contact-strip img:hover { border-color: var(--violet); }

/* ── prep + engine ────────────────────────────────────── */
.prep { place-self: center; width: min(420px, 100%); text-align: center; padding: 40px 20px; }
.prep-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.prep-head strong { font-family: Outfit, sans-serif; font-size: 18px; color: var(--title); }
.spinner { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid var(--line); border-top-color: var(--violet); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prep-bar { height: 6px; background: var(--line); border-radius: var(--pill); overflow: hidden; }
.prep-fill { height: 100%; width: 0%; background: var(--violet); border-radius: var(--pill); transition: width .4s ease; }
.prep-meta { margin: 12px 0 4px; color: var(--muted); font-size: 14px; }

.engine { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.engine-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.engine-row strong { font-family: Outfit, sans-serif; font-size: 16px; color: var(--title); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot.on { background: var(--violet); }

/* ── sections ─────────────────────────────────────────── */
.section { padding-block: clamp(50px, 8vw, 90px); }
.section.tint { background: var(--surface-2); }
.cards { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card); padding: 32px 26px; }
.section.tint .card { box-shadow: var(--shadow-soft); border-color: transparent; }
.card .n {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: var(--violet-soft); color: var(--violet-ink); margin-bottom: 20px;
  font-family: Outfit, sans-serif; font-weight: 600; font-size: 18px;
}
:root[data-theme="dark"] .section.tint .card .n,
.section.tint .card .n { background: color-mix(in srgb, var(--violet) 10%, transparent); }
.card h3 { font-size: 22px; line-height: 30px; margin-bottom: 10px; }
.card p { margin: 0; font-size: 16px; line-height: 26px; }

/* pricing */
.tiers { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); max-width: 940px; margin-inline: auto; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card); padding: 34px 30px; }
.tier .label { margin: 0 0 6px; font-family: Outfit, sans-serif; font-size: 15px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--violet-ink); }
.tier .amount { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.tier .amount b { font-family: Outfit, sans-serif; font-size: 44px; line-height: 52px; font-weight: 600; letter-spacing: -.02em; color: var(--title); }
.tier .amount span { font-size: 15px; color: var(--text); }
.tier p { margin: 0; font-size: 15px; line-height: 25px; }
.tier.feature { background: var(--violet); border-color: var(--violet); box-shadow: var(--shadow); }
.tier.feature .label { color: rgba(255,255,255,.72); }
.tier.feature .amount b { color: #fff; }
.tier.feature .amount span, .tier.feature p { color: rgba(255,255,255,.88); }

/* faq — the theme's accordion */
.faq-list { max-width: 850px; margin-inline: auto; }
.faq-list details { border: 1px solid var(--line-2); border-radius: var(--card-sm); margin-bottom: 10px; background: var(--surface); }
.faq-list details[open] { border-color: var(--violet); }
.faq-list summary {
  position: relative; padding: 20px 75px 20px 30px; cursor: pointer; list-style: none;
  font-family: Outfit, sans-serif; font-size: 20px; line-height: 30px; font-weight: 500; color: var(--title);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; top: 20px; right: 30px;
  width: 30px; height: 30px; line-height: 28px; text-align: center;
  border: 1px solid var(--title); border-radius: 50%; font-size: 18px; font-weight: 400; color: var(--title);
}
.faq-list details[open] summary::after { content: "\2212"; border-color: var(--violet); color: var(--violet-ink); }
.faq-list p { padding: 0 75px 24px 30px; margin: 0; font-size: 16px; line-height: 27px; }

.prose h2 { font-size: 30px; margin: 0 0 14px; }
.prose h3 { font-size: 20px; margin: 30px 0 8px; }
.prose p { font-size: 16px; line-height: 27px; }
.prose strong { color: var(--title); }

/* ── footer ───────────────────────────────────────────── */
footer { background: var(--secondary); color: #A9A7B0; padding-block: 54px; margin-top: 0; }
footer .foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 15px; }
footer a { color: #A9A7B0; }
footer a:hover { color: #fff; }
footer .wordmark span { color: #fff; }

@media (max-width: 620px) {
  .faq-list summary { padding: 18px 60px 18px 20px; font-size: 17px; line-height: 26px; }
  .faq-list summary::after { right: 18px; }
  .faq-list p { padding: 0 20px 20px; }
  .panel { padding: 20px; }
  .cta { font-size: 16px; padding: 14px 24px; }
  .look-grid { gap: 16px; }
  .look-grid figure:nth-child(2), .look-grid figure:nth-child(4) { margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill { animation: none; width: 100%; }
  .developing { animation: none; }
  .spinner { animation: none; border-top-color: var(--line); }
  * { transition: none !important; }
}

/* ── preset tiles with a real preview ─────────────────────
   A thumbnail of the look answers "what will this do to my photo?" in a way
   a two-word blurb never could. */
.tile { padding: 0; overflow: hidden; display: block; }
.tile .thumb {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .thumb .emoji {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; margin: 0; z-index: 0;
}
.tile .thumb img + .emoji { display: none; }
.tile .name { padding: 10px 12px 0; }
.tile .blurb { padding: 2px 12px 12px; }
.tile[aria-checked="true"] .thumb::after {
  content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--violet);
}
.tile[aria-checked="true"] .thumb::before {
  content: "\2713"; position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); max-height: 420px; }

/* ── trending ─────────────────────────────────────────── */
.trending { padding-block: 10px 40px; }
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.trend-head h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; }
.flame {
  display: inline-flex; align-items: center; gap: 7px; font-family: Outfit, sans-serif;
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  color: var(--violet-ink); background: var(--violet-soft); padding: 6px 14px; border-radius: var(--pill);
}
.trend-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scroll-snap-type: x mandatory; }
.trend-rail::-webkit-scrollbar { height: 7px; }
.trend-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.trend-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--card); overflow: hidden;
  background: var(--surface); cursor: pointer; text-align: left; padding: 0; font: inherit;
  transition: all .3s ease; scroll-snap-align: start;
}
.trend-card:hover { border-color: var(--violet); transform: translateY(-3px); box-shadow: var(--shadow); }
.trend-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.trend-card .cap { display: block; padding: 12px 14px 14px; }
.trend-card .cap b { display: block; font-family: Outfit, sans-serif; font-size: 15px; font-weight: 500; color: var(--title); }
.trend-card .cap span { display: block; font-size: 13px; line-height: 19px; color: var(--text); margin-top: 2px; }
.rank {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: Outfit, sans-serif; font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(14,19,29,.7); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: var(--pill);
}
.rank.hot { background: var(--violet); }

/* ── settings dialog ──────────────────────────────────── */
dialog#settings {
  border: none; border-radius: 14px; padding: 0; width: min(600px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.28);
  max-height: min(86vh, 820px);
}
dialog#settings::backdrop { background: rgba(14,19,29,.55); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.dlg-head h2 { font-size: 22px; line-height: 30px; }
.dlg-body { padding: 22px 26px 26px; overflow-y: auto; }
.dlg-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--title); cursor: pointer; display: grid; place-items: center; flex: none; }
.dlg-x:hover { border-color: var(--violet); color: var(--violet-ink); }

.grp + .grp { margin-top: 26px; }
.grp > h3 { font-size: 16px; line-height: 24px; margin-bottom: 4px; }
.grp > .sub { margin: 0 0 14px; font-size: 14px; line-height: 21px; color: var(--muted); }

.mrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.mrow:first-of-type { border-top: none; }
.mrow .who { flex: 1 1 auto; min-width: 0; }
.mrow .who b { display: block; font-family: Outfit, sans-serif; font-size: 15px; font-weight: 500; color: var(--title); }
.mrow .who span { display: block; font-size: 13px; line-height: 19px; color: var(--muted); margin-top: 1px; }
.pill {
  flex: none; font-family: Outfit, sans-serif; font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: var(--pill); border: 1px solid var(--line-2); color: var(--text);
  white-space: nowrap;
}
.pill.ok   { color: #1B7F4D; border-color: #1B7F4D; background: rgba(27,127,77,.08); }
.pill.busy { color: var(--violet-ink); border-color: var(--violet); background: var(--violet-soft); }
.pill.out  { color: var(--rose); border-color: var(--rose); background: rgba(244,36,79,.07); }
.pill.idle { color: var(--muted); }
:root[data-theme="dark"] .pill.ok { color: #4FC48C; border-color: #4FC48C; background: rgba(79,196,140,.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.ok { color: #4FC48C; border-color: #4FC48C; background: rgba(79,196,140,.1); } }

.dl-summary { background: var(--surface-2); border-radius: var(--card); padding: 16px 18px; margin-bottom: 14px; }
.dl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dl-top b { font-family: Outfit, sans-serif; font-size: 15px; font-weight: 500; color: var(--title); }
.dl-top span { font-size: 13px; color: var(--muted); }
.dl-bar { height: 6px; background: var(--line); border-radius: var(--pill); overflow: hidden; }
.dl-fill { height: 100%; width: 0; background: var(--violet); border-radius: var(--pill); transition: width .4s ease; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dlg-actions .chip-btn { flex: 0 1 auto; }

.note { margin: 14px 0 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.note.warn { color: #B57F00; }
:root[data-theme="dark"] .note.warn { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note.warn { color: var(--amber); } }

/* ── legal strip ──────────────────────────────────────── */
.legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 22px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.legal-fine { margin: 0; font-size: 13px; line-height: 21px; color: #6E6E6E; max-width: 90ch; }
