/* TST หน้าร้าน — back office (one neutral look for every shop; Figma mode "admin") */
:root { --bg:#F4F4F2; --surface:#FFFFFF; --text:#18181B; --muted:#52525B; --accent:#2F5BEA; --on:#FFFFFF; --line:#E2E2DE; --tint:#ECEFFD; --danger:#B42318;
  --r-card:12px; --r-btn:10px; --font:'IBM Plex Sans Thai', system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-text-size-adjust: 100%; }
h1, h2, p, ul { margin: 0; } ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.i { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sub { color: var(--muted); font-size: 13px; display: block; }
.sub.warn { color: var(--danger); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  font: 600 15px/1.3 var(--font); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--on); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-btn); color: var(--text); cursor: pointer; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input:not([type=checkbox]):not([type=radio]), .form textarea { font: 16px/1.5 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 11px 14px; width: 100%; }
.form textarea { resize: vertical; }
.form select { font: 16px/1.5 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 11px 12px; width: 100%; }
.form input[type=file] { padding: 6px; font-size: 13px; color: var(--muted); min-width: 0; border-style: dashed; cursor: pointer; }
.form input[type=file]::file-selector-button { font: 600 14px/1.3 var(--font); color: var(--accent); background: var(--tint); border: 0; border-radius: 8px; padding: 9px 12px; margin-right: 8px; cursor: pointer; }
.form h2 { font-size: 15px; margin-top: 8px; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.form label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--surface); padding-left: 14px; color: var(--muted); }
.input-prefix input { border: 0 !important; padding-left: 4px !important; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.thumb.wide { width: 88px; }
.hint { font-size: 13px; color: var(--muted); }

/* switch (a submit button that flips a value) */
.switch { width: 48px; height: 28px; padding: 2px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; display: flex; flex: none; transition: background .12s; }
.switch i { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .12s; }
.switch.on { background: var(--accent); } .switch.on i { transform: translateX(20px); }

/* shell */
.sidebar { display: none; }
.page { min-height: 100dvh; padding-bottom: 84px; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar div { flex: 1; min-width: 0; } .topbar span { color: var(--muted); font-size: 12px; } .topbar h1 { font-size: 20px; line-height: 1.3; }
.topbar .view { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.content { display: flex; flex-direction: column; gap: 16px; padding: 16px; max-width: 1100px; }
.flash { margin: 12px 16px 0; padding: 10px 14px; border-radius: var(--r-btn); font-size: 14px; }
.flash.ok { background: var(--tint); color: var(--accent); } .flash.err { background: #FDECEA; color: var(--danger); }
.tabbar { position: fixed; z-index: 10; inset: auto 0 0 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 0; }
.tabbar a.on { color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row b { display: block; }
.big-num { font-size: 32px; font-weight: 600; color: var(--accent); line-height: 1; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--accent); }
.quick b { color: var(--text); } .quick span { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 24px 8px; text-align: center; }
.lead { font-size: 14px; }

/* credits */
.segment { display: flex; gap: 4px; padding: 4px; background: var(--tint); border-radius: var(--r-btn); }
.segment a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.segment a.on { background: var(--surface); color: var(--text); }
.cols { display: flex; flex-direction: column-reverse; gap: 16px; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--accent); white-space: nowrap; }
.review { font-size: 16px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; } .actions form { display: flex; } .actions .grow .btn { width: 100%; }
.blur-tool { display: flex; flex-direction: column; gap: 8px; }
.blur-canvas { width: 100%; height: auto; border-radius: 8px; touch-action: none; cursor: crosshair; background: var(--tint); }
.blur-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.blur-bar .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.proof-thumb { width: 120px; border-radius: 8px; }
.code-result { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--tint); border-radius: var(--r-btn); }
.code { font-size: 22px; color: var(--accent); letter-spacing: .04em; }
.recent summary, .import summary, .add summary, .edit summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.recent ul { margin-top: 8px; display: grid; gap: 6px; } .recent li { display: flex; gap: 8px; align-items: center; } .state { font-size: 12px; color: var(--accent); white-space: nowrap; }
.import .form, .add .form { margin-top: 12px; }

/* prices */
.list { gap: 0; padding: 4px 16px; }
.item { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.item:last-child { border-bottom: 0; }
.stock { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.tools { align-items: flex-start; }
.tools:has(.edit[open]) { flex-wrap: wrap; } .edit[open] { display: flex; flex-direction: column; gap: 12px; flex-basis: 100%; } .edit .form { margin-top: 8px; }

/* theme cards (also used on the home page) */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 12px; background: var(--t-bg); color: var(--t-text); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; cursor: pointer; }
.theme-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:checked) { border: 2px solid var(--accent); padding: 7px 7px 11px; }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.t-name { display: flex; align-items: center; gap: 6px; } .t-name b { flex: 1; font-size: 14px; }
.t-name .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--t-accent); }
.theme-card .sub { color: var(--t-muted); font-size: 12px; }
.t-preview { font-size: 12px; font-weight: 600; color: var(--t-accent); }
.t-guestbook { --t-bg:#F3F0E6; --t-text:#1F2A24; --t-muted:#5F6A62; --t-accent:#2E6B4F; }
.t-sketch { --t-bg:#F6F1E7; --t-text:#2A2724; --t-muted:#6E665C; --t-accent:#2F4FD8; }
.t-folder { --t-bg:#16171C; --t-text:#ECEDEF; --t-muted:#A0A4AE; --t-accent:#8AA6FF; }
.t-oven { --t-bg:#FFF6E3; --t-text:#3A2416; --t-muted:#7A5C47; --t-accent:#B3263E; }
.t-rack { --t-bg:#F2F1EE; --t-text:#111111; --t-muted:#5E5E5E; --t-accent:#B8460A; }
.t-charm { --t-bg:#FFF4F7; --t-text:#3B2238; --t-muted:#7D6378; --t-accent:#B8285A; }
.sticky-save { position: sticky; bottom: 88px; width: 100%; margin-top: 16px; box-shadow: 0 6px 20px -8px rgba(47,91,234,.6); }

/* login + home */
.login-wrap, .home-wrap { max-width: 420px; margin: 0 auto; padding: 56px 20px; display: flex; flex-direction: column; gap: 20px; }
.brand-big h1, .home-wrap h1 { font-size: 30px; } .brand-big p { color: var(--muted); }
.login-wrap .flash { margin: 0; }
.home-wrap { max-width: 980px; } .home-wrap .lead { font-size: 17px; color: var(--muted); }
.home-wrap .themes { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }


/* v2: orders */
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-btn); overflow: hidden; }
.steps button { min-height: 44px; padding: 6px 4px; border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 13px/1.25 var(--font); cursor: pointer; }
.steps button:first-child { border-left: 0; }
.steps button.done { background: var(--tint); color: var(--accent); }
.steps button.now { background: var(--accent); color: var(--on); }
.steps button:not(.now):hover { background: var(--tint); }
.code-card .code-result { flex-wrap: wrap; }
.order .tools { flex-wrap: wrap; }

/* v2: album + FAQ */
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gal li { display: flex; flex-direction: column; gap: 6px; }
.gal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gal .tools { gap: 6px; }
.icon-btn.danger { color: var(--danger); }
.item-head { padding: 12px 0 4px; }

/* v2: promo preview */
.promo-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: var(--r-btn); background: var(--text); color: var(--surface); font-size: 14px; }
.promo-preview .mono { border: 1.5px dashed currentColor; border-radius: 999px; padding: 2px 10px; }

/* v2: hours */
.hours { display: grid; gap: 8px; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 4px 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hrow label { grid-column: 1 / -1; }
.form .hrow input[type=time] { width: 100%; min-width: 0; padding: 8px 10px; }
@media (min-width: 560px) { .hrow { grid-template-columns: 120px minmax(0, 150px) 12px minmax(0, 150px); border: 0; padding: 0; } .hrow label { grid-column: auto; } }
.hrow:has(input[type=checkbox]:not(:checked)) input[type=time] { opacity: .4; }

/* v2: effects + features */
.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer; color: var(--text) !important; font-size: 15px !important; }
.opt input { position: absolute; opacity: 0; }
.opt:has(input:checked) { border: 2px solid var(--accent); padding: 11px; background: var(--tint); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.feats { display: grid; gap: 10px; }
.form label.feat { align-items: flex-start; }
.feat > span { display: flex; flex-direction: column; }
.feat b { font-weight: 600; }

/* v2: stats (owner only). One series, one hue; numbers stay in text ink. */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kpis div { display: flex; flex-direction: column; }
.kpis dt { font-size: 13px; color: var(--muted); }
.kpis dd { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; } .delta.up { color: #1F7A4D; } .delta.down { color: var(--danger); }
.bars-fig { margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; align-items: end; height: 96px; border-bottom: 1px solid var(--line); }
.bars li { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.bars li:focus-visible { outline-offset: 0; }
.bars i { display: block; width: 100%; max-width: 22px; margin: 0 auto; background: #6F8AEC; border-radius: 4px 4px 0 0; }
.bars i.today, .bars li:hover i, .bars li:focus i { background: var(--accent); }
.bars-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
@media (max-width: 420px) { .kpis dd { font-size: 22px; } .choice { grid-template-columns: 1fr; } }

@media (min-width: 1024px) {
  body.admin:not(.login):not(.home) { display: grid; grid-template-columns: 248px 1fr; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--line); }
  .brand { display: flex; flex-direction: column; padding: 0 8px 24px; } .brand b { font-size: 20px; } .brand span { color: var(--muted); font-size: 12px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar a, .sidebar button { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-btn); text-decoration: none; font: 600 15px var(--font); color: var(--text); border: 0; background: none; width: 100%; cursor: pointer; }
  .sidebar a.on { background: var(--tint); color: var(--accent); }
  .sidebar-foot { margin-top: auto; } .sidebar-foot a, .sidebar-foot button { color: var(--muted); }
  .tabbar, .topbar .view { display: none; }
  .page { padding-bottom: 48px; }
  .topbar { position: static; background: none; border: 0; padding: 32px 48px 8px; } .topbar h1 { font-size: 28px; }
  .content { padding: 16px 48px; } .flash { margin: 12px 48px 0; }
  .cols { flex-direction: row; align-items: flex-start; gap: 24px; } .col-side { width: 380px; flex: none; position: sticky; top: 24px; }
  .col-main { flex: 1; }
  .content > .card, .content > form, .content > .quick, .content > .segment, .content > .lead { max-width: 720px; }
  .themes { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
  .sticky-save { position: static; width: auto; box-shadow: none; }
}

/* v3: self-serve purchase (/buy, /buy/done) */
.home-wrap .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.sell-wrap { gap: 24px; padding-bottom: 120px; }
.sell-wrap .back { align-self: flex-start; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; }
.sell-wrap .flash { margin: 0; }
.sell-form { display: flex; flex-direction: column; gap: 20px; }
.sell-form .step { margin: 0; border: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sell-form .step.card { border: 1px solid var(--line); padding: 16px; max-width: 640px; }
.sell-form legend { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.sell-form legend + * { clear: both; }
.sell-form .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--surface); font-size: 14px; }
.theme-card .peek { position: relative; z-index: 1; align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--t-accent); text-underline-offset: 3px; padding: 4px 0; }
.theme-card:has(input:checked)::after { content: 'เลือกแล้ว'; position: absolute; top: 14px; right: 14px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on); font-size: 12px; font-weight: 600; }
.terms { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.terms li { position: relative; padding-left: 18px; }
.terms li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.terms li.ph { color: var(--muted); border-bottom: 1px dashed var(--muted); align-self: flex-start; font-size: 14px; }
.hint.bad { color: var(--danger); } .hint.good { color: #1D7A46; }
.pay-bar { position: fixed; z-index: 10; inset: auto 0 0 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.pay-bar p { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pay-bar b { font-size: 22px; font-variant-numeric: tabular-nums; } .pay-bar span { font-size: 12px; color: var(--muted); }
.login-wrap .ref { color: var(--muted); font-size: 14px; text-align: center; }
.brand-big .paid { display: inline-flex; align-items: center; gap: 6px; color: #1D7A46; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.brand-big a { color: var(--accent); font-weight: 600; }
@media (min-width: 1024px) {
  .pay-bar { position: sticky; bottom: 16px; max-width: 640px; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 10px 30px -16px rgba(24,24,27,.35); }
  .sell-wrap { padding-bottom: 56px; }
}

/* v3: TST owner back office (/owner) */
button.link { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font); }
.link.danger { color: var(--danger); }
.checks { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.checks li { display: flex; align-items: center; gap: 8px; } .checks .ok svg { color: #1D7A46; } .checks .no { color: var(--danger); }
.owner .item .links { flex-wrap: wrap; gap: 6px 18px; } .owner .item .links form { display: flex; }
.owner .item.off b { color: var(--muted); text-decoration: line-through; }
.owner .money { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.owner .grow { flex: 1; min-width: 0; }
.owner .segment { overflow-x: auto; } .owner .segment a { flex: none; padding: 8px 12px; }
.owner .attention { border-color: var(--danger); }
.owner .actions .input-prefix { min-width: 0; } .owner .actions input { min-width: 0; width: 100%; font: 16px var(--font); padding: 8px 10px; }
.badge.st-paid { background: #E3F4EA; color: #1D6B40; } .badge.st-pending { background: #FFF4D6; color: #7A5300; }
.badge.st-expired, .badge.st-refunded { background: #EEEEEC; color: var(--muted); } .badge.st-manual { background: var(--tint); color: var(--accent); }
.owner .reveal { border-color: var(--accent); }
.only-phone .link { font-size: 14px; }
@media (min-width: 1024px) { .only-phone { display: none; } }
.sell .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sell .theme-card .t-name b { font-size: 13px; }
@media (min-width: 700px) { .sell .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .sell .theme-card .t-name b { font-size: 14px; } }
@media (max-width: 380px) { .sell .theme-card:has(input:checked)::after { top: 12px; right: 12px; font-size: 11px; padding: 1px 8px; } }
/* trial shop banner in the back office */
.trial-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: #FFF6D6; border: 1px solid #F1D27A; color: #3A2C00; }
.trial-note b { display: block; }
.trial-note span { font-size: 14px; }
.try-points li { margin-bottom: 4px; }
.trial-note .grow { flex: 1 1 240px; min-width: 0; }
.trial-note .btn { flex: 1 1 auto; white-space: normal; text-align: center; }
/* getting-started checklist (dashboard) */
.start { border-color: var(--accent); }
.start-n { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.start-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 12px 0 4px; }
.start-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.start-list { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 4px; }
.start-list a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; text-decoration: none; color: var(--text); min-height: 44px; }
.start-list a:hover { background: var(--bg); }
.start-list .grow { display: flex; flex-direction: column; gap: 2px; }
.start-list .tick { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; border: 1.5px solid var(--line); color: var(--muted); }
.start-list .done .tick { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.start-list .done b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.start-list .next .tick { border-color: var(--accent); color: var(--accent); }
.start-list .next a { background: var(--bg); }
.start-list a > svg { color: var(--muted); flex: 0 0 auto; }
.kpis .none { font-size: 15px; font-weight: 500; color: var(--muted); }
/* owner: money */
.badge.st-disputed { background: #FDE7E7; color: #9B1C1C; }
.owner .fee { margin: 6px 0 0; font-variant-numeric: tabular-nums; }

/* ---------- shop colours card (theme page) ---------- */
.colors-card .col-grid { display: grid; gap: 20px; }
.colors-card fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.colors-card legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.form label.preset { flex-direction: row; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-btn); color: var(--text); font-size: 15px; cursor: pointer; }
.form label.preset:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--tint); }
.preset input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.preset b { font-weight: 600; }
.sw { display: inline-flex; flex: none; }
.sw i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.sw i + i { margin-left: -7px; }
.sw-custom { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#ff6b6b, #ffd166, #7cf0c5, #8aa6ff, #c084fc, #ff6b6b); box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.col-pick { display: grid; gap: 10px; margin-top: 16px; }
.col-pick label { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); font-size: 15px; }
.col-in { display: inline-flex; align-items: center; gap: 8px; }
.col-in code { font: 13px ui-monospace, Consolas, monospace; color: var(--muted); min-width: 62px; }
.form .col-in input[type=color] { width: 48px; height: 40px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.col-note { min-height: 1.4em; margin: 10px 0 12px; font-size: 13px; color: var(--muted); }
/* phone: preview first and compact, so the owner sees it while picking; desktop: big phone on the right */
.col-preview { display: grid; justify-items: center; gap: 8px; order: -1; --k: .5; }
.col-phone { width: calc(390px * var(--k) + 16px); height: calc(var(--k) * 800px + 16px); padding: 8px; border-radius: 30px; background: #18181B; box-shadow: 0 20px 40px -20px rgba(0,0,0,.45); overflow: hidden; }
.col-phone iframe { width: 390px; height: 800px; border: 0; border-radius: 22px; transform: scale(var(--k)); transform-origin: 0 0; background: #fff; }
@media (min-width: 900px) { .colors-card .col-grid { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .col-preview { order: 0; position: sticky; top: 90px; --k: .6769; } }

/* posts and stories */
.ps-h { margin: 18px 0 6px; font-size: 15px; font-weight: 600; } .ps-h .sub { font-weight: 400; }
.ps-list { list-style: none; padding: 0; margin: 0; display: grid; }
.ps-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ps-list li > img, .ps-noimg { flex: 0 0 54px; width: 54px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.ps-noimg { display: grid; place-items: center; color: var(--muted); }
.ps-list .grow { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ps-list li > form { flex: none; }
.ps-keep { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ps-keep input { flex: 1 1 140px; min-width: 0; min-height: 40px; }
.ps-pin { margin-top: 8px; }

/* shop music */
.tracks { display: grid; gap: 6px; }
.track { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.track:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.track .grow { display: flex; flex-direction: column; gap: 2px; }
.track-play { flex: none; min-height: 40px; gap: 6px; }
.track.is-playing .track-play { border-color: var(--accent); color: var(--accent); }
.tracks-h { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.tracks-more { display: grid; gap: 6px; } .tracks-more summary { padding: 8px 0; font-weight: 600; cursor: pointer; }
.tracks-more[open] summary { margin-bottom: 6px; } .tracks-more .track + .track { margin-top: 6px; }
.form label.track { flex-direction: row; align-items: center; gap: 12px; color: var(--text); font-size: 15px; }
.form label.track input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.form label.track:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.track .sub { font-size: 13px; }

/* Template Studio admin: web orders, briefs, customers, template picker */
.lines { display: grid; gap: 4px; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 15px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; }
.lines b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 8px 8px 0; font-size: 15px; }
.brief { margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.refs { display: grid; gap: 4px; margin: 6px 0 10px; font-size: 14px; }
.refs a { color: var(--accent); overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table input[type="text"] { width: 100%; min-width: 140px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.tpl-card { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-card); background: var(--surface); cursor: pointer; }
.tpl-card img { border-radius: 8px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; margin-bottom: 6px; }
.tpl-card input { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; accent-color: var(--accent); }
.tpl-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.tpl-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.tpl-card.is-soon { opacity: .55; cursor: not-allowed; border-style: dashed; }
.form.search { flex-direction: row; align-items: stretch; gap: 8px; max-width: 720px; margin-bottom: 16px; }
.form.search input { flex: 1; min-width: 0; }
.tpl-card { min-width: 0; }
.tpl-card img { width: 100%; height: auto; }
.tpl-card.is-soon > span:not(.sub) { display: none; }
.lines:empty { display: none; }
.tpl-card.is-soon { align-self: start; }
.table td { white-space: nowrap; }

/* /buy and /try: Studio template picker (2026-11-25) */
.tpl-card { --t-bg: var(--surface); --t-text: var(--text); --t-muted: var(--muted); --t-accent: var(--accent); }
.tpl-card img { aspect-ratio: 16 / 10; object-position: top; }
.tpl-card .sub { line-height: 1.4; }

/* TST Account (/account, 2026-11-25) */
.acct-mark { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.acct-foot { text-align: center; margin-top: 16px; }
.acct-google { display: flex; justify-content: center; margin-top: 12px; }
.acct-buy { margin: 4px 0 16px; }
.acct .code { font-size: 17px; word-break: break-all; line-height: 1.6; padding: 10px 12px; background: var(--tint); border-radius: var(--r-btn); }
.acct fieldset.choice { display: grid; grid-template-columns: 1fr; gap: 6px; border: 0; padding: 0; margin: 0; }
.acct fieldset.choice label { display: flex; flex-direction: row; gap: 10px; align-items: center; font-weight: 400; font-size: 15px; color: var(--text); }
.acct fieldset.choice input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.acct fieldset.choice legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.acct .card.danger { border-color: #F2C4C4; }
.acct .card.danger h2 { color: #9B1C1C; }
.acct .tpl-card .actions { margin-top: 8px; }
.acct .actions form { display: inline; }
.acct .item .links form { display: inline; }
.acct .attention { border-color: var(--accent); }

/* owner: customer accounts */
.acc-search{display:flex;gap:10px;align-items:flex-end;flex-direction:row}
.acc-search label{flex:1;margin:0}
.acc-search .btn{flex:none}
.item-link{display:block;color:inherit;text-decoration:none}
.item-link:hover b,.item-link:focus-visible b{text-decoration:underline}
.item-link b{overflow-wrap:anywhere}
.steps-list{margin:8px 0 14px;padding-left:22px;display:grid;gap:12px}
.steps-list .code-result{margin-top:8px}
/* data usage meters (back office /admin/usage, owner shop page) */
.admin .attention { border-color: var(--danger); }
.usage-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 16px; }
.usage-list.compact { gap: 10px; margin-top: 8px; }
.usage-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.usage-num { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .92em; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0 4px; }
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.usage-warn .usage-bar i { background: #B54708; } .usage-warn strong { color: #B54708; }
.usage-full .usage-bar i { background: var(--danger); } .usage-full strong { color: var(--danger); }
.usage-more { margin: 6px 0 2px; }
.usage-more summary { cursor: pointer; list-style-position: outside; }
.usage-more .actions { margin-top: 10px; align-items: flex-end; }
.usage-more select { width: 100%; }
