.th-app{--paper:#FFFAFD;--card:#FFFFFF;--soft:#FFE6F1;--soft-2:#DDF8F5;--soft-3:#FFF3CC;--ink:#1F1235;--muted:#5E5470;--line:#F0DCE8;--accent:#E8166F;--accent-2:#FFC531;--accent-3:#12C2B6;--accent-4:#7B5CFF;--f-display:'Bricolage Grotesque',ui-sans-serif,system-ui,sans-serif;--f-body:'Figtree',ui-sans-serif,system-ui,sans-serif;--f-mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;}
/* Truly Hued app styles. Tokens are supplied by the host (artifact :root or WP .th-app). */
/* Layout: single centred column, swatch-book motifs (paint-chip cards, hex labels), one fanned deck in the hero. */
.th-app{font-family:var(--f-body);color:var(--ink);background:var(--paper);line-height:1.55;font-size:16px;-webkit-font-smoothing:antialiased}
.th-app *,.th-app *::before,.th-app *::after{box-sizing:border-box}
.th-app h1,.th-app h2,.th-app h3,.th-app h4{font-family:var(--f-display);line-height:1.08;margin:0;text-wrap:balance;letter-spacing:-.02em;color:var(--ink)}
.th-app p{margin:0}
.th-app button{font:inherit;color:inherit}
.th-wrap{max-width:1040px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:20px 64px}
.th-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:6px 22px;flex-wrap:wrap}
.th-logo{display:flex;align-items:center;gap:10px;font-family:var(--f-display);font-weight:700;font-size:22px;letter-spacing:-.02em;background:none;border:0;padding:0;cursor:pointer}
.th-logo-mark{width:28px;height:28px;border-radius:50%;background:conic-gradient(#F48C7F 0 25%,#6F93D6 0 50%,#B5502A 0 75%,#D0103A 0);box-shadow:inset 0 0 0 5px var(--paper)}
.th-steps{display:flex;gap:6px;font-family:var(--f-mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.th-steps span{padding:4px 8px;border-radius:99px;border:1px solid var(--line)}
.th-steps span.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.th-label{font-family:var(--f-mono);font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.th-muted{color:var(--muted)}
.th-small{font-size:14px}

/* Buttons */
.th-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:99px;border:1.5px solid var(--ink);background:var(--ink);color:var(--paper)!important;font-weight:600;cursor:pointer;text-decoration:none;transition:transform .15s ease,background .15s}
.th-btn:hover{transform:translateY(-1px)}
.th-btn:focus-visible,.th-app button:focus-visible,.th-app a:focus-visible,.th-app input:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.th-btn.accent{background:var(--accent);border-color:var(--accent)}
.th-btn.ghost{background:transparent;color:var(--ink)!important}
.th-btn.small{min-height:38px;padding:0 16px;font-size:14px}
.th-btn[disabled]{opacity:.4;cursor:not-allowed;transform:none}
.th-link{background:none;border:0;padding:0;color:var(--accent);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:3px}

/* Hero */
.th-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center;padding-block:24px 48px}
.th-hero h1{font-size:clamp(42px,7vw,78px);font-weight:800}
.th-hero h1 em{font-style:normal;color:var(--accent)}
.th-hero .lede{font-size:19px;color:var(--muted);margin-top:18px;max-width:46ch}
.th-hero .cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.th-hero .promise{margin-top:18px;display:flex;gap:18px;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.th-hero .promise b{color:var(--ink)}
.th-fan{position:relative;height:340px;max-width:100%}
.th-chip{position:absolute;left:50%;bottom:10px;width:120px;height:250px;margin-left:-60px;border-radius:10px;background:var(--card);box-shadow:0 1px 0 var(--line),0 10px 30px -12px rgba(40,10,40,.35);transform-origin:50% 92%;overflow:hidden;transition:transform .9s cubic-bezier(.2,.8,.2,1)}
.th-chip i{display:block;height:58px}
.th-chip span{display:block;font-family:var(--f-mono);font-size:9.5px;padding:6px 8px;color:var(--muted);letter-spacing:.04em}
@media (prefers-reduced-motion:reduce){.th-chip{transition:none}}

.th-how{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;border-top:1px solid var(--line);padding-top:28px}
.th-how h3{font-size:20px;margin:6px 0 6px}
.th-how p{color:var(--muted);font-size:15px}
.th-band{margin-top:40px;padding:28px;border-radius:20px;background:var(--soft);display:grid;grid-template-columns:1fr 1fr;gap:24px}
.th-band h3{font-size:24px;margin-bottom:10px}
.th-band ul{margin:0;padding-left:18px;color:var(--muted)}
.th-band li{margin:4px 0}
.th-price{font-family:var(--f-display);font-size:34px;font-weight:800}
.th-manifesto{margin-top:40px;font-family:var(--f-display);font-size:clamp(22px,3.2vw,32px);line-height:1.2;max-width:28ch;font-weight:600}

/* Panels & photo */
.th-panel{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:clamp(18px,4vw,34px)}
.th-panel>h2{font-size:clamp(28px,4vw,40px)}
.th-panel>.th-sub{color:var(--muted);margin-top:8px;max-width:60ch}
.th-tips{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}
.th-tip{border:1px dashed var(--line);border-radius:14px;padding:12px;font-size:14px}
.th-tip b{display:block;font-size:14px}
.th-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:220px;border:2px dashed var(--line);border-radius:18px;text-align:center;padding:20px;cursor:pointer;background:var(--paper)}
.th-drop.drag{border-color:var(--accent)}
.th-drop input{position:absolute;width:1px;height:1px;opacity:0}
.th-stage{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:22px;margin-top:20px;align-items:start}
.th-canvas-wrap{position:relative;border-radius:16px;overflow:hidden;background:var(--paper);line-height:0;cursor:crosshair}
.th-canvas-wrap canvas{width:100%;height:auto;display:block}
.th-mark{position:absolute;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1.5px rgba(0,0,0,.5);pointer-events:none}
.th-samples{display:flex;flex-direction:column;gap:10px}
.th-sample{display:flex;align-items:center;gap:12px;padding:10px;border:1.5px solid var(--line);border-radius:14px;background:none;text-align:left;cursor:pointer;width:100%}
.th-sample.on{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent)}
.th-sample .sw{width:38px;height:38px;border-radius:10px;border:1px solid var(--line);flex:none;background:repeating-linear-gradient(45deg,var(--soft) 0 6px,transparent 6px 12px)}
.th-sample b{display:block;font-size:15px}
.th-sample small{color:var(--muted);font-size:13px}
.th-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:22px}
.th-privacy{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--muted);margin-top:16px}
.th-privacy svg{flex:none;margin-top:2px}

/* Quiz */
.th-q{padding-block:20px;border-top:1px solid var(--line)}
.th-q:first-of-type{border-top:0}
.th-q h3{font-size:20px;font-family:var(--f-body);font-weight:700;letter-spacing:0}
.th-q p{color:var(--muted);font-size:14px;margin-top:4px}
.th-opts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.th-opt{position:relative}
.th-opt input{position:absolute;opacity:0;inset:0}
.th-opt span{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 16px;border-radius:99px;border:1.5px solid var(--line);cursor:pointer;font-size:15px;background:var(--paper)}
.th-opt input:checked+span{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.th-opt input:focus-visible+span{outline:3px solid var(--accent);outline-offset:2px}
.th-opt .dot{width:14px;height:14px;border-radius:50%;border:1px solid rgba(0,0,0,.15)}

/* Result */
.th-result-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:30px;align-items:center;padding-block:10px 30px}
.th-result-head h1{font-size:clamp(48px,9vw,104px);font-weight:800;line-height:.95}
.th-result-head .intro{font-size:18px;max-width:52ch;margin-top:16px}
.th-drape{position:relative;width:240px;height:240px;border-radius:50%;display:grid;place-items:center;transition:background .35s ease;flex:none}
.th-drape .face{width:150px;height:150px;border-radius:50%;background-size:cover;background-position:center;border:3px solid var(--paper);box-shadow:0 8px 24px -10px rgba(0,0,0,.4)}
.th-drape-cap{text-align:center;font-family:var(--f-mono);font-size:12px;color:var(--muted);margin-top:10px}
.th-sec{margin-top:36px}
.th-sec>h2{font-size:clamp(24px,3vw,32px);margin-bottom:6px}
.th-sec>.th-sub{color:var(--muted);margin-bottom:18px;max-width:62ch}
.th-swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px}
.th-sw{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card);text-align:left;padding:0;cursor:pointer;transition:transform .15s}
.th-sw:hover{transform:translateY(-2px)}
.th-sw i{display:block;height:74px}
.th-sw b{display:block;font-size:14px;padding:8px 10px 0;font-weight:600}
.th-sw code{display:block;font-family:var(--f-mono);font-size:11.5px;color:var(--muted);padding:2px 10px 9px}
.th-sw.sel{outline:3px solid var(--ink);outline-offset:2px}
.th-sw.avoid{position:relative}
.th-sw.avoid i{position:relative}
.th-sw.avoid i::after{content:"";position:absolute;left:-10%;right:-10%;top:50%;height:2px;background:var(--paper);transform:rotate(-24deg)}
.th-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.th-fact{padding:16px;border-radius:14px;background:var(--soft)}
.th-fact b{display:block;margin-top:4px;font-size:16px}
.th-meters{display:grid;gap:16px;max-width:620px}
.th-meter .ends{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);margin-bottom:6px}
.th-meter .bar{position:relative;height:12px;border-radius:99px}
.th-meter .pin{position:absolute;top:50%;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;background:var(--paper);border:3px solid var(--ink)}
.th-share{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:16px;border-radius:14px;border:1px dashed var(--line)}
.th-share code{font-family:var(--f-mono);font-size:13px;flex:1;min-width:0;word-break:break-word}
.th-alt{display:flex;flex-wrap:wrap;gap:8px}
.th-alt button{padding:8px 14px;border-radius:99px;border:1.5px solid var(--line);background:var(--paper);cursor:pointer;font-size:14px}
.th-alt button.on{border-color:var(--ink);font-weight:700}

/* Paywall */
.th-lock{position:relative;margin-top:44px;border-radius:24px;overflow:hidden;border:1px solid var(--line);background:var(--card)}
.th-lock-preview{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:28px;filter:blur(6px);opacity:.6;pointer-events:none}
.th-lock-preview div{height:120px;border-radius:12px}
.th-lock-body{position:relative;padding:clamp(20px,4vw,36px);display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:center;border-top:1px solid var(--line)}
.th-lock-body h2{font-size:clamp(26px,3.6vw,38px)}
.th-lock-body ul{margin:14px 0 0;padding-left:18px}
.th-lock-body li{margin:5px 0}
.th-buy{text-align:center;padding:22px;border-radius:18px;background:var(--soft)}
.th-buy .th-price{display:block;margin-bottom:4px}
.th-buy small{display:block;color:var(--muted);margin:8px 0 14px;font-size:13px}
.th-demo-note{margin-top:14px;padding:14px;border-radius:12px;border:1.5px solid var(--accent-2);font-size:14px;text-align:left}

/* Premium */
.th-premium{margin-top:44px;padding-top:30px;border-top:2px solid var(--ink)}
.th-badge{display:inline-flex;align-items:center;gap:6px;font-family:var(--f-mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;padding:5px 10px;border-radius:99px;background:var(--accent);color:#fff}
.th-fit{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:18px}
.th-shapes{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;margin-top:10px}
.th-shape{padding:10px;border:1.5px solid var(--line);border-radius:14px;background:var(--paper);cursor:pointer;text-align:center;font-size:14px}
.th-shape svg{display:block;margin:0 auto 6px;width:44px;height:58px}
.th-shape.on{border-color:var(--ink);background:var(--soft);font-weight:700}
.th-measure{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;margin-top:12px}
.th-measure label{display:flex;flex-direction:column;font-size:13px;color:var(--muted);gap:4px}
.th-measure input,.th-measure select{width:92px;min-height:42px;border:1.5px solid var(--line);border-radius:10px;padding:0 10px;background:var(--paper);color:var(--ink);font:inherit}
.th-areas{display:grid;gap:8px;margin-top:10px}
.th-area{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:10px}
.th-area b{font-size:15px}
.th-seg{display:grid;grid-template-columns:repeat(3,1fr);border:1.5px solid var(--line);border-radius:99px;overflow:hidden}
.th-seg button{border:0;background:var(--paper);padding:8px 4px;font-size:13px;cursor:pointer;min-height:38px}
.th-seg button+button{border-left:1px solid var(--line)}
.th-seg button.on{background:var(--ink);color:var(--paper);font-weight:600}
.th-tabs{display:flex;gap:4px;margin-top:30px;border-bottom:1px solid var(--line);overflow-x:auto}
.th-tabs button{border:0;background:none;padding:12px 16px;font-weight:600;cursor:pointer;border-bottom:3px solid transparent;white-space:nowrap;color:var(--muted)}
.th-tabs button.on{border-color:var(--accent);color:var(--ink)}
.th-tabpanel{padding-top:24px}
.th-cat{margin-top:26px}
.th-cat:first-child{margin-top:0}
.th-cat h3{font-size:22px;margin-bottom:12px}
.th-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.th-item{display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--card)}
.th-item.star{border-color:var(--accent)}
.th-item h4{font-family:var(--f-body);font-size:16px;letter-spacing:0;font-weight:700}
.th-item p{font-size:14px;color:var(--muted)}
.th-item .wear{display:flex;align-items:center;gap:8px;font-size:13px}
.th-item .wear i{width:18px;height:18px;border-radius:5px;border:1px solid var(--line)}
.th-shop{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:4px}
.th-shop a{font-size:12.5px;padding:5px 10px;border-radius:99px;border:1px solid var(--line);color:var(--ink);text-decoration:none;font-weight:600}
.th-shop a:hover{border-color:var(--ink)}
.th-tweaks{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.th-tweak{padding:16px;border-radius:16px;background:var(--soft)}
.th-tweak .th-label{margin-bottom:6px;display:block}
.th-tweak ul{margin:6px 0 0;padding-left:18px;font-size:14.5px}
.th-callout{padding:18px;border-radius:16px;background:var(--soft);font-size:15px}
.th-callout b{display:block;font-family:var(--f-display);font-size:20px;margin-bottom:6px}
.th-foot{margin-top:56px;padding-top:20px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap}
.th-toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--paper);padding:10px 18px;border-radius:99px;font-size:14px;z-index:20}

@media (max-width:820px){
  .th-hero,.th-band,.th-lock-body,.th-fit,.th-stage{grid-template-columns:1fr}
  .th-fan{height:280px;order:-1}
  .th-how{grid-template-columns:1fr}
  .th-tips{grid-template-columns:1fr 1fr}
  .th-result-head{grid-template-columns:1fr}
  .th-drape{width:200px;height:200px;margin:0 auto}
  .th-drape .face{width:124px;height:124px}
  .th-facts{grid-template-columns:1fr}
  .th-lock-preview{grid-template-columns:repeat(2,1fr)}
  .th-steps{display:none}
}
@media (max-width:420px){.th-area{grid-template-columns:1fr}.th-swatches{grid-template-columns:repeat(2,1fr)}}

/* ---- Brighter scheme + global additions ---- */
.th-strip{height:6px;background:linear-gradient(90deg,var(--accent) 0 20%,var(--accent-2) 20% 40%,var(--accent-3) 40% 60%,var(--accent-4) 60% 80%,#FF7A45 80%)}
.th-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.th-nav-r{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.th-region{position:relative;display:inline-flex;align-items:center;gap:6px;padding:0 10px;min-height:38px;border:1.5px solid var(--line);border-radius:99px;background:var(--card);font-size:13.5px}
.th-region select{border:0;background:transparent;color:var(--ink);font:inherit;padding:6px 2px;cursor:pointer;max-width:160px}
.th-logo-mark{background:conic-gradient(var(--accent) 0 25%,var(--accent-2) 0 50%,var(--accent-3) 0 75%,var(--accent-4) 0)}
.th-hero{position:relative}
.th-hero h1 em{background:linear-gradient(90deg,var(--accent),var(--accent-4));-webkit-background-clip:text;background-clip:text;color:transparent}
.th-fan::before{content:"";position:absolute;inset:6% 4% 0;border-radius:50%;background:radial-gradient(closest-side,color-mix(in srgb,var(--accent-2) 55%,transparent),transparent),radial-gradient(closest-side at 80% 30%,color-mix(in srgb,var(--accent-3) 45%,transparent),transparent),radial-gradient(closest-side at 20% 70%,color-mix(in srgb,var(--accent) 35%,transparent),transparent);filter:blur(8px)}
.th-num{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;font-family:var(--f-display);font-weight:800;font-size:18px;color:#1F1235}
.th-num.n1{background:var(--accent-2)}.th-num.n2{background:var(--accent-3)}.th-num.n3{background:var(--accent);color:#fff}
.th-how{border-top:0;padding-top:8px}
.th-band{background:none;padding:0;gap:16px}
.th-band>div{padding:28px;border-radius:22px}
.th-band>div:first-child{background:var(--soft-3)}
.th-band>div:last-child{background:var(--soft);box-shadow:inset 0 0 0 2px var(--accent)}
.th-price{color:var(--accent)}
.th-band .th-price .th-muted{font-family:var(--f-body);font-weight:500}
.th-manifesto{display:flex;flex-direction:column;gap:18px;margin-top:64px}
.th-rainbow{display:block;width:120px;height:10px;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--accent-2),var(--accent-3),var(--accent-4))}
.th-steps span.on{background:var(--accent);border-color:var(--accent);color:#fff}
.th-btn.accent{box-shadow:0 8px 20px -10px var(--accent)}
.th-opt input:checked+span{background:var(--accent);border-color:var(--accent);color:#fff}
.th-tabs button.on{border-color:var(--accent-3)}
.th-fact:nth-child(1){background:var(--soft-3)}.th-fact:nth-child(2){background:var(--soft-2)}.th-fact:nth-child(3){background:var(--soft)}
.th-lock-body{background:linear-gradient(135deg,var(--soft) 0%,var(--soft-2) 100%)}
.th-buy{background:var(--card);box-shadow:0 12px 30px -18px var(--accent)}
.th-badge{background:linear-gradient(90deg,var(--accent),var(--accent-4))}
.th-tweak:nth-child(3n+1){background:var(--soft)}.th-tweak:nth-child(3n+2){background:var(--soft-2)}.th-tweak:nth-child(3n){background:var(--soft-3)}
.th-callout{background:var(--soft-2)}
.th-foot{align-items:center}
.th-seg button.on{background:var(--accent);color:#fff}.th-shape.on{border-color:var(--accent)}

/* ---- AI reading ---- */
.th-ai{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:24px;margin-top:20px;align-items:start}
.th-ai-photo{border-radius:16px;overflow:hidden;line-height:0;background:var(--soft)}
.th-ai-photo canvas{width:100%;height:auto;display:block;max-height:520px;object-fit:contain}
.th-ai-side{padding:22px;border-radius:18px;background:linear-gradient(135deg,var(--soft) 0%,var(--soft-2) 100%)}
.th-ai-h{font-size:clamp(22px,3vw,28px);margin-top:6px}
.th-consent{display:flex;gap:10px;align-items:flex-start;margin-top:16px;font-size:14px;cursor:pointer}
.th-consent input{width:20px;height:20px;margin-top:1px;accent-color:var(--accent);flex:none}
.th-ai-busy{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:28px 10px}
.th-spin{width:44px;height:44px;border-radius:50%;background:conic-gradient(var(--accent),var(--accent-2),var(--accent-3),var(--accent-4),var(--accent));-webkit-mask:radial-gradient(circle,transparent 52%,#000 54%);mask:radial-gradient(circle,transparent 52%,#000 54%);animation:th-spin 1s linear infinite}
@keyframes th-spin{to{transform:rotate(1turn)}}
@media (prefers-reduced-motion:reduce){.th-spin{animation-duration:3s}}
.th-reads{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.th-read{display:flex;gap:10px;align-items:center;padding:10px;border-radius:12px;background:var(--card)}
.th-read i{width:34px;height:34px;border-radius:9px;flex:none;border:1px solid var(--line)}
.th-read b{display:block;font-size:14px}
.th-read small{display:block;font-size:12.5px;color:var(--muted);line-height:1.35}
.th-warn{margin-top:12px;padding:12px 14px;border-radius:12px;background:var(--soft-3);font-size:14px}
.th-pill{display:inline-block;padding:3px 10px;border-radius:99px;background:var(--soft-2);color:var(--ink);font-weight:600;font-size:12.5px;margin-right:6px}
@media (max-width:820px){.th-ai{grid-template-columns:1fr}.th-ai-photo canvas{max-height:360px}}
@media (max-width:420px){.th-reads{grid-template-columns:1fr}}

/* ---- Test bar (demo only) ---- */
.th-testbar{background:#1F1235;color:#FFF4FA;font-size:13px}
.th-testbar-in{max-width:1040px;margin:0 auto;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:8px}
.th-testbar .th-muted{color:#C3B6D3}
.th-testbar button{border:1px solid #5E4A7A;background:transparent;color:#FFF4FA;border-radius:99px;padding:4px 12px;cursor:pointer;font-size:12.5px}
.th-testbar button:hover{border-color:#FFC531}
.th-raw{max-width:1040px;margin:0 auto 8px;padding:12px max(16px,env(safe-area-inset-left,0px));font-family:var(--f-mono);font-size:12px;white-space:pre-wrap;word-break:break-word;color:#DDF8F5;max-height:320px;overflow:auto}
.th-hairq{margin-top:12px;padding:14px;border-radius:12px;background:var(--card)}.th-hairq .th-opts{margin-top:10px}
.th-testok{margin-top:10px;padding:8px 12px;border-radius:10px;background:#12C2B6;color:#06231F;font-size:13.5px;font-weight:600}
.th-retake{margin-top:12px;padding:14px;border-radius:12px;background:var(--soft-3);font-size:14px}.th-retake p{margin-top:6px}

/* ---- Try-on studio ---- */
.th-studio{margin:6px 0 10px;padding:clamp(16px,3vw,26px);border-radius:22px;background:linear-gradient(135deg,var(--soft) 0%,var(--soft-2) 100%)}
.th-studio-head{margin-bottom:16px}
.th-studio-head h3{font-size:clamp(22px,3vw,30px);margin-top:10px}
.th-studio-head p{margin-top:6px}
.th-studio-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:22px;align-items:start}
.th-studio-side{display:flex;flex-direction:column;gap:16px;align-items:flex-start}
.th-protect{position:relative;border-radius:16px;overflow:hidden;line-height:0;background:var(--card);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.th-protect canvas{width:100%;height:auto;display:block;max-height:640px;object-fit:contain;transition:filter .2s}
.th-shield-msg{position:absolute;inset:0;display:none;place-items:center;font-size:15px;font-weight:700;line-height:1.3;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.th-shielded .th-protect canvas{filter:blur(28px) saturate(.6)}
.th-shielded .th-shield-msg{display:grid}
.th-chipset{width:100%}
.th-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.th-cchip{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:5px 12px 5px 6px;border-radius:99px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-size:13px;cursor:pointer}
.th-cchip i{width:22px;height:22px;border-radius:50%;border:1px solid rgba(0,0,0,.12);flex:none}
.th-cchip.none{padding-left:12px}
.th-cchip.on{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 25%,transparent);font-weight:700}
.th-drop-sm{min-height:150px;position:relative}
.th-mapstep{display:grid;grid-template-columns:120px minmax(0,1fr);gap:18px;align-items:start}
.th-mini{width:120px;border-radius:12px;display:block;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;pointer-events:none}
@media (max-width:820px){.th-studio-grid{grid-template-columns:1fr}.th-mapstep{grid-template-columns:84px minmax(0,1fr)}.th-mini{width:84px}}

.th-pieces{display:flex;flex-direction:column;gap:6px;margin-top:8px;width:100%}
.th-pieces+.th-pieces{margin-top:12px}
.th-piece{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);font-size:14px;cursor:pointer;text-align:left}
.th-piece small{flex:none;font-size:12.5px;font-weight:700;color:var(--accent)}
.th-piece.on{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 25%,transparent)}
.th-piece[disabled]{opacity:.55;cursor:not-allowed}
.th-studio-side .th-ai-busy{padding:16px 6px}
.th-spin-sm{display:inline-block;width:14px;height:14px;vertical-align:-2px;margin-right:6px}
.th-protect canvas.th-veil{filter:blur(18px) saturate(0)}
details.th-pieces{border:1.5px solid var(--line);border-radius:14px;padding:4px 12px 10px;background:var(--card)}
details.th-pieces>summary{cursor:pointer;list-style:none;padding:8px 0 4px;display:flex;justify-content:space-between;align-items:center}
details.th-pieces>summary::-webkit-details-marker{display:none}
details.th-pieces>summary::after{content:"+";font-size:18px;font-weight:700;color:var(--accent)}
details.th-pieces[open]>summary::after{content:"–"}
details.th-pieces>summary small{margin-left:auto;margin-right:10px;font-weight:500}
details.th-pieces:not([open]){padding-bottom:4px}
.th-partcol{padding:10px 12px;border-radius:14px;background:var(--soft);margin-bottom:10px}
.th-partcol .th-chipset+.th-chipset{margin-top:6px}
.th-debug{margin-top:14px;padding:8px 10px;border-radius:10px;background:var(--soft-3);font:12px/1.4 'IBM Plex Mono',monospace;color:var(--muted)}
.th-toolbar{display:flex;gap:8px;margin:4px 0 12px}
.th-toolbar .th-btn[disabled]{opacity:.45;cursor:not-allowed}
.th-presets{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;max-height:520px;overflow:auto;padding-right:4px}
.th-preset{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:14px;border:1.5px solid var(--line);background:var(--card);color:var(--ink);text-align:left;cursor:pointer}
.th-preset:hover{border-color:var(--accent)}
.th-preset[disabled]{opacity:.55;cursor:not-allowed}
.th-psw{display:flex;flex:none}
.th-psw i{width:26px;height:26px;border-radius:50%;border:2px solid var(--card);box-shadow:0 0 0 1px var(--line)}
.th-psw i+i{margin-left:-8px}
.th-pt{display:flex;flex-direction:column;gap:2px;min-width:0}
.th-pt b{font-size:14px;font-weight:600}
.th-pt small{font-size:12.5px;color:var(--muted)}
.th-partname{font-weight:700;font-size:14px;margin:0 0 6px}
.th-protect{position:relative}
.th-wait{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:20px;color:#fff;z-index:3;pointer-events:none}
.th-wait[hidden]{display:none}
.th-wait b{font-size:15px;font-weight:700;text-shadow:0 1px 6px rgba(0,0,0,.45)}
.th-wait small{font-size:13px;opacity:.9;text-shadow:0 1px 6px rgba(0,0,0,.45)}
.th-wait .th-spin{width:44px;height:44px;border-width:4px}
.th-protect canvas{transition:filter .25s}
.th-wait b{background:rgba(31,18,53,.78);padding:8px 16px;border-radius:999px;text-shadow:none;max-width:90%}
.th-wait small{background:rgba(31,18,53,.6);padding:2px 10px;border-radius:999px;text-shadow:none}
.th-credits{display:inline-flex;align-items:center;margin-left:8px;padding:5px 12px;border-radius:999px;background:var(--soft-2);color:var(--ink);font-size:12.5px;font-weight:700;vertical-align:middle}
.th-credits.low{background:var(--soft-3)}
.th-topup{padding:16px;border-radius:16px;background:var(--soft-3);border:1.5px solid var(--accent-2);margin-bottom:14px}
.th-topup b{display:block;font-size:15px;margin-bottom:4px}
.th-topup p{margin:0 0 10px}
#th-root .th-manifesto{margin-top:0;padding-top:56px}
#th-root .th-band{margin-bottom:0}
#th-root .th-foot{margin-top:48px;padding-bottom:24px}
.th-suggest-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--card);color:var(--ink)!important;font-weight:600;text-decoration:none!important}
.th-suggest-btn:hover{border-color:var(--accent)}
@media (max-width:640px){#th-root .th-manifesto{padding-top:40px}}
#th-root .th-why{margin-top:56px;padding:32px;border-radius:24px;background:var(--card);border:1.5px solid var(--line)}
.th-why h2{font-family:var(--f-display);font-size:clamp(26px,3.6vw,38px);line-height:1.1;margin:6px 0 12px}
.th-why .lede{max-width:62ch}
.th-why-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:24px}
.th-why-grid>div{padding:18px;border-radius:16px;background:var(--soft)}
.th-why-grid>div:nth-child(3n+2){background:var(--soft-2)}
.th-why-grid>div:nth-child(3n){background:var(--soft-3)}
.th-why-grid h3{font-size:17px;margin:0 0 6px}
.th-why-grid p{margin:0;font-size:14.5px;color:var(--muted)}
.th-compare{margin-top:28px;border:1.5px solid var(--line);border-radius:16px;overflow:hidden;font-size:14px}
.th-cmp-row{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;align-items:center}
.th-cmp-row>span{padding:11px 12px;border-top:1px solid var(--line);text-align:center}
.th-cmp-row>span:first-child{text-align:left;font-weight:600}
.th-cmp-head>span{border-top:0;font-size:12.5px;font-weight:700;color:var(--muted);background:var(--paper)}
.th-cmp-head>span:nth-child(2){color:var(--accent)}
.th-cmp-row>span:nth-child(2){background:color-mix(in srgb,var(--accent) 7%,transparent)}
.th-cmp-row .yes{color:var(--accent);font-weight:800;font-size:16px}
.th-cmp-row .some{color:var(--muted);font-size:12.5px}
.th-cmp-row .no{color:var(--muted)}
@media (max-width:760px){.th-why-grid{grid-template-columns:1fr}#th-root .th-why{padding:22px 18px}.th-cmp-row{grid-template-columns:1.4fr .8fr .8fr .8fr;font-size:12.5px}.th-cmp-row>span{padding:9px 6px}}
/* Expert report */
.th-profile{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;align-items:start;margin-top:8px}
.th-profile-main h3{font-size:clamp(24px,3vw,32px);margin:4px 0 8px}
.th-profile-main p{max-width:58ch;line-height:1.6}
.th-facts4{grid-template-columns:repeat(2,1fr)}
.th-fact:nth-child(4){background:var(--soft-2)}
.th-guide{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.th-gsec{padding:16px;border-radius:16px;background:var(--card);border:1px solid var(--line)}
.th-gsec .th-label{display:block;margin-bottom:6px}
.th-gsec ul{margin:0;padding-left:18px;font-size:14.5px;line-height:1.55}
.th-gsec .no{margin:10px 0 0;font-size:13.5px;color:var(--muted)}
.th-list{margin:0;padding-left:20px;max-width:66ch;line-height:1.7}
.th-tweak.th-avoid{background:var(--card)!important;border:1px dashed var(--line)}
.th-swatches-sm{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin:6px 0 10px}
.th-swatches-sm .th-sw i{height:38px}
.th-swatches-sm .th-sw b{font-size:12px;padding:6px 8px 8px}
.th-tweak .th-cchip{margin:4px 2px 0}
@media (max-width:820px){.th-profile{grid-template-columns:1fr}}
.th-swatches-x{grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:10px}
.th-swatches-x .th-sw i{height:60px}
@media (max-width:420px){.th-swatches-x{grid-template-columns:repeat(3,1fr)}.th-swatches-x .th-sw b{font-size:12.5px}}
.th-great{display:inline-block;font-family:var(--f-mono);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);margin-bottom:4px}
.th-subcat{grid-column:1/-1;margin:10px 0 0;font-size:15px;color:var(--muted)}
.th-piecegroup{margin:10px 0 4px}
.th-fshades{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}
.th-fs{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card);text-align:center;padding-bottom:6px}
.th-fs i{display:block;height:48px}
.th-fs b{display:block;font-size:12px;margin-top:6px}
.th-fs small{display:block;font-size:11px;color:var(--accent);font-weight:600}
.th-fs.on{outline:3px solid var(--accent);outline-offset:2px}
@media (max-width:640px){.th-fshades{grid-template-columns:repeat(4,1fr)}}
.th-vars{list-style:none;margin:6px 0 8px;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.th-vars li{font-size:12.5px;padding:3px 9px;border-radius:999px;background:var(--soft);border:1px solid var(--line)}
.th-vars li.best{border-color:var(--accent);color:var(--accent);font-weight:600}
.th-type{border:1px solid var(--line);border-radius:12px;margin:6px 0;background:var(--card)}
.th-type>summary{cursor:pointer;padding:10px 12px;display:flex;justify-content:space-between;gap:8px;align-items:center;font-weight:600;font-size:14.5px;list-style:none}
.th-type>summary::-webkit-details-marker{display:none}
.th-type>summary::after{content:"▾";color:var(--muted);margin-left:auto}
.th-type[open]>summary::after{content:"▴"}
.th-type>summary small{font-weight:400}
.th-type>.th-piece{margin:0 8px 6px;width:calc(100% - 16px)}
.th-best{font-style:normal;font-family:var(--f-mono);font-size:10.5px;color:var(--accent);text-transform:uppercase;letter-spacing:.03em;margin-left:4px}
.th-cmpbox{margin-top:14px;padding-top:10px;border-top:1px dashed var(--line)}
.th-cmpgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:8px}
.th-cmpgrid figure{margin:0}
.th-cmpgrid figcaption{font-size:12px;font-weight:600;margin-bottom:4px}
.th-cmpgrid img{width:100%;border-radius:10px;display:block}
.th-cmpwait{aspect-ratio:9/16;border-radius:10px;background:var(--soft);display:grid;place-items:center}
.th-hiddennote{grid-column:1/-1;margin:10px 0 0}
.th-modal{position:fixed;inset:0;z-index:9999;background:rgba(20,12,24,.45);display:grid;place-items:center;padding:16px}
.th-modal-card{background:var(--card);border-radius:20px;padding:24px;max-width:420px;width:100%;box-shadow:0 20px 60px -20px rgba(0,0,0,.45)}
.th-modal-card h3{margin:12px 0 8px;font-size:22px}
.th-modal-card p{margin:0 0 16px;line-height:1.55}
