/* The Studio app's screen layout (P2-D2). app.css is the design system, copied from docs/platform/design unchanged;
   this file adds layout only, from the signed prototype (docs/platform/design/prototype.html), never a new token. */


/* Ads: a free try's row is one button, Continue (the signed screens' row, as a button) */
button.row-item { width: 100%; font: inherit; text-align: left; cursor: pointer; }
button.row-item:hover { border-color: var(--line-strong); }
button.row-item[aria-busy="true"] { opacity: .7; cursor: progress; }
/* an ad's small picture, from the server (P2-A12) */
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* a Retry beside the server's words (too many requests, or out of reach) */
.alert .btn-retry { margin-left: 4px; min-height: 36px; padding: 6px 12px; }


/* the line under the top bar (UI-UX plan 2, 4.6): it keeps its own height, and takes none when there is no line */
.banner-slot { flex: none; }
.banner-slot:empty { display: none; }
.banner a.btn { text-decoration: none; }

/* Plan and credits (P3-D1): the dark Balance card's eyebrow */
.card-dark .eyebrow { color: var(--on-dark-2); }
.billing-page .tbl-wrap { margin-top: calc(var(--s3) * -1); }
/* Change plan (P3-D3, the prototype's own rules): a plan block's "To pay" over its button, which is never sticky; on
   phones the block's button is full width */
.chg-pay { display: flex; flex-direction: column; gap: 2px; }
.kv li.kv-whole .v { grid-column: 1 / -1; }  /* the leftover's own line, "Left over ₹1,333.67 · 133.4 plan credits" */
@media (max-width: 760px) { .chg-opt > .btn-row .btn { flex: 1 1 auto; } }
/* no plan: the Plan card takes the whole row, its plans side by side (stacked on phones), each block as Change plan's */
.card.plan-wide { grid-column: 1 / -1; }
.offer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); align-items: start; }

/* Brands (P4-D1): a brand's logo in its square, a face's round one, the logo on light and on dark, editing rows */
.badge-sq { overflow: hidden; background: var(--ground-2); color: var(--ink); }
.badge-sq img { display: block; width: 100%; height: 100%; object-fit: contain; }
.badge-sq.is-round { border-radius: 50%; }
.logo-tile span img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-page .grid2 { margin-top: var(--s2); }
.edit-rows { display: flex; flex-direction: column; gap: 8px; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.edit-product { display: flex; flex-direction: column; gap: var(--s3); }
.guide { display: flex; flex-direction: column; gap: var(--s3); }
.brands-count { margin: -8px 0 0; }

/* Account (P3-D2): "Saved." beside the button; the delete card's own alert */
.account-page #saved { align-self: center; }
.account-page #delete-card .alert .field-label { color: inherit; }

/* a link inside a line takes the line's own colour (the prototype's "color: inherit") */
.note-warn a, .alert a:not(.btn), .banner a:not(.btn) { color: inherit; }

/* ======================================================================================================
   v2 (26 Oct): the frame, New ad and sign-in, as the signed v2 prototype draws them
   (docs/platform/design/v2/prototype.html). Layout over app.css's tokens; the website's colours and fonts only.
   ====================================================================================================== */
/* the frame: the rail on the ground, the top bar on the ground, the balance pill and the account's initial */
.rail { width: 84px; background: var(--ground); gap: 6px; padding: 14px 8px; }
.rail .wm { font-size: 22px; margin-bottom: 14px; display: inline-flex; align-items: center; min-height: 44px; }
.nav-item { width: 68px; min-height: 64px; gap: 4px; font-size: 12.5px; color: var(--text-2); position: relative; }
.nav-item:hover { background: var(--ground-2); }
.rail .nav-acct { display: none; }
.topbar { height: 64px; min-height: 64px; padding: 0 var(--s5); background: var(--ground); gap: var(--s3); }
.topbar .title { font-family: var(--f-head); font-weight: 700; font-size: 19px; letter-spacing: -0.015em; }
.topbar .top-wm { display: none; font-size: 22px; text-decoration: none; color: var(--ink); align-items: center; min-height: 44px; }
.bal { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--ground-2); color: var(--text-2); font-size: 14.5px; text-decoration: none; white-space: nowrap; flex: none; }
.bal b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bal.none { background: var(--amber-bg); color: var(--amber); }
.bal.none b { color: var(--amber); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--maroon); color: var(--cream); display: grid; place-items: center; font-weight: 700; font-size: 15px; text-decoration: none; flex: none; }
.avatar .ic { stroke: currentColor; fill: none; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.banner b { font-weight: 700; }
.banner .btn-dark { margin-left: auto; }

/* shared pieces of the v2 screens */
.h3 { margin: 0; font-family: var(--f-head); font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
.link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; background: none; border: 0; padding: 0; font: inherit; font-size: 15px; color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(23, 18, 14, 0.3); text-underline-offset: 3px; cursor: pointer; }
.btn-ghost { background: none; font-weight: 500; color: var(--text-2); padding: 10px 12px; }
.btn-ghost:hover { background: var(--ground-2); }
.l-soon { background: var(--ground-2); color: var(--muted-2); font-weight: 500; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }

/* New ad: the question, the box, the first card, places to start from, the latest ads */
.home-screen { padding: 0; }
.home { max-width: 820px; margin: 0 auto; padding: 9vh var(--s6) var(--s7); display: flex; flex-direction: column; gap: var(--s6); }
.home-h { text-align: center; font-size: 44px; line-height: 1; }
.brief-wrap { display: flex; flex-direction: column; gap: var(--s3); }
.home-msg:empty { display: none; }
.home-msg .msg-bad { padding: 0 6px; }
.brief-box { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.brief-box:has(textarea:focus-visible) { box-shadow: 0 0 0 4px rgba(232, 48, 44, 0.16), var(--shadow-soft); }
.brief-box textarea { border: 0; outline: 0; resize: none; background: transparent; padding: 20px 22px 8px; font-size: 18px; line-height: 1.45; min-height: 96px; width: 100%; color: var(--ink); }
.brief-box textarea::placeholder { color: var(--muted-3); }
.brief-bar { display: flex; align-items: center; gap: var(--s2); padding: 10px 12px 12px; border-radius: 0 0 20px 20px; }
.brief-bar .pills { display: flex; gap: var(--s2); align-items: center; min-width: 0; }
.brief-bar .go { margin-left: auto; }
.brief-bar .go .ic { width: 18px; height: 18px; }
/* a long brand name with no plan: the choices take a second line, never slide under "See the price" (walk finding 8) */
.brief-bar .pills { flex-wrap: wrap; row-gap: var(--s2); }
.brief-bar .go { flex: none; }
.pill-slot { display: contents; }
.add { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--chip-line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.add:hover { border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--chip-line); background: var(--card); font-size: 15px; color: var(--text-2); cursor: pointer; white-space: nowrap; flex: none; }
.pill:hover { border-color: var(--ink); }
.pill .k { color: var(--muted-3); }
.pill .caret { font-size: 11px; opacity: 0.6; }
.pill-still { cursor: default; }
.pill-still:hover { border-color: var(--chip-line); }
.brand-dot { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--ground-2); color: var(--maroon); font: 700 11px/1 Georgia, serif; flex: none; }
.pill .bn { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* the menus: format, model, brand, and one photo; the choices a list, the chosen one ticked */
.pop .choices { display: flex; flex-direction: column; }
.pop { position: absolute; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 6px; display: flex; flex-direction: column; min-width: 260px; max-width: calc(100% - 16px); }
.pop .h { padding: 8px 12px 4px; font-size: 13px; color: var(--muted-3); }
.opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 10px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; font-size: 15px; color: var(--ink); width: 100%; text-decoration: none; }
.opt:hover, .opt:focus-visible { background: var(--ground-2); }
.opt .tx { display: flex; flex-direction: column; line-height: 1.3; }
.opt .sub { font-size: 13px; color: var(--muted-2); }
.opt[aria-selected="true"]::after { content: "✓"; margin-left: auto; font-weight: 700; }
.opt[aria-disabled="true"] { color: var(--muted-3); cursor: default; }
.opt[aria-disabled="true"]:hover { background: none; }
.opt .opt-tag { margin-left: auto; }
.pop.menu:focus { outline: none; }
.opt:focus-visible { outline-offset: -3px; }
.opt-bad { color: var(--bad-ink); }
.opt-note { color: var(--bad-ink); font-size: 14px; cursor: default; }
.opt-note:hover { background: none; }
.photo-h { display: flex; gap: 10px; align-items: center; }
.photo-h img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.photo-h .fn { word-break: break-all; }
.menu-scrim { display: none; }

/* attachments: a row of small pictures and one line; open, a grid that scrolls in its own box. Only logos are marked */
.tray { padding: 14px 16px 2px; display: flex; flex-direction: column; gap: 10px; }
.tray-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.att { position: relative; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--ground-2); border: 1px solid var(--line-soft); flex: none; padding: 0; cursor: pointer; display: block; }
.att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att .mk { position: absolute; left: 3px; bottom: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; padding: 1px 5px; border-radius: 5px; background: var(--ink); color: var(--cream); line-height: 1.4; }
.att .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(23, 18, 14, 0.75); color: #fff; font-size: 12px; line-height: 20px; text-align: center; opacity: 0; z-index: 2; }
.att:hover .x { opacity: 1; }
@media (hover: none) { .att .x { display: none; } }
.att.on { outline: 3px solid var(--ink); outline-offset: 1px; }
.att.up::after { content: ""; position: absolute; inset: 0; background: rgba(253, 251, 247, 0.55); }
.att .ring { position: absolute; z-index: 1; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; border: 2.5px solid rgba(23, 18, 14, 0.15); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
.att.bad { border: 1.5px solid var(--red); }
.att.bad::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; background: var(--alert-bg); color: var(--bad-ink); font-weight: 800; }
.more { width: 44px; height: 44px; border-radius: 10px; background: var(--ground-2); display: grid; place-items: center; font-size: 13.5px; font-weight: 600; color: var(--text-2); flex: none; border: 0; cursor: pointer; }
.sum { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; background: none; padding: 0 6px; font: inherit; font-size: 15px; color: var(--text-2); white-space: nowrap; border-radius: 10px; }
button.sum { cursor: pointer; }
button.sum:hover { background: var(--ground-2); }
.sum b { color: var(--ink); font-weight: 600; }
.sum .caret { font-size: 11px; opacity: 0.6; }
.tray-acts { margin-left: auto; display: flex; }
.grid-box { max-height: 236px; overflow-y: auto; border-radius: 12px; background: var(--field); border: 1px solid var(--line-soft); padding: 8px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.tgrid .att { width: auto; height: auto; aspect-ratio: 1; }
.tray-foot { display: flex; gap: 4px var(--s3); flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted-2); }
.tray-foot .bad { color: var(--bad-ink); }
.tray-foot .link { font-size: 14px; }

/* below the box */
.firstcard { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line-soft); }
.firstcard .t { flex: 1; min-width: 220px; }
.starts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: 12px; }
.start { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line-soft); color: var(--ink); cursor: pointer; text-align: left; min-height: 72px; font: inherit; font-size: 15px; }
.start:hover { border-color: var(--line-strong); }
.start img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.start .tx { display: flex; flex-direction: column; line-height: 1.3; }
.start .sub { color: var(--muted-2); font-size: 13.5px; }
.recent { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); margin-top: 8px; }
.adcard { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.adcard .pic { aspect-ratio: 4 / 5; border-radius: var(--r-frame); overflow: hidden; background: var(--media); position: relative; }
.adcard .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adcard .pic.empty { background: repeating-linear-gradient(135deg, var(--ground-2) 0 10px, var(--stripe) 10px 20px); }
.adcard .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adcard .meta { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted-2); flex-wrap: wrap; }

/* sign in or sign up: the lockup, one card, and the way back to the website */
.solo { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: var(--s7) var(--s4); background: var(--ground); }
.solo-in { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: var(--s5); }
.solo-in > .card { width: 100%; box-shadow: var(--shadow-card); }
.lockup { display: inline-flex; align-items: baseline; min-height: 44px; gap: 0.2em; text-decoration: none; color: var(--ink); }
.lockup .wm { font-size: 30px; } .lockup .wm-sub { font-size: 30px; line-height: 1; }
.label-plain { font-weight: 600; font-size: 15px; }
.input.bad { border-color: var(--bad-ink); }
.kept-slot:empty, .field-msg:empty { display: none; }
.kept { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ground); font-size: 14.5px; color: var(--text-2); }
.solo .sent, .new-acct { margin: 0; }
.new-acct { font-size: 14.5px; }
.solo .code input { width: 100%; flex: 1 1 0; height: 52px; border-radius: 12px; }
.solo .input { min-height: 48px; padding: 12px 14px; font-size: 16px; }
.solo .btn-block { border-radius: var(--r-pill); }
.signin-links { display: flex; gap: 0 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .rail { width: 84px; }
  .nav-item { width: 68px; }
  .starts { grid-template-columns: repeat(2, 1fr); }
  .recent { grid-template-columns: repeat(3, 1fr); }
  .recent > :nth-child(4) { display: none; }
}
@media (max-width: 760px) {
  .rail { width: auto; height: calc(60px + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px); gap: 0; align-items: stretch; }
  .rail .wm { display: none; }
  .rail .nav-acct { display: flex; }
  .nav-item { width: auto; flex: 1; min-height: 58px; font-size: 12px; border-radius: 0; gap: 4px; }
  .nav-item[aria-current="page"] { font-weight: 700; }
  .nav-item[aria-current="page"]::after { position: absolute; top: 0; left: 30%; right: 30%; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .topbar { height: 56px; min-height: 56px; padding: 0 12px 0 16px; padding-top: env(safe-area-inset-top, 0px); gap: 8px; }
  .topbar .top-wm { display: inline-flex; }
  .topbar .screen-title, .topbar .avatar { display: none; }
  .bal { min-height: 44px; }
  .banner .btn-dark { margin-left: 0; width: 100%; min-height: 44px; }

  .home { padding: var(--s5) var(--s4) 0; gap: var(--s5); }
  .home-h { text-align: left; font-size: 30px; }
  .brief-box textarea { font-size: 17px; padding: 16px 16px 6px; min-height: 84px; }
  .brief-bar { flex-direction: column; align-items: stretch; padding: 8px 10px 10px; position: sticky; bottom: 0; background: var(--card); z-index: 2; }
  .brief-bar .pills { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .brief-bar .pills::-webkit-scrollbar { display: none; }
  .brief-bar .go { margin-left: 0; width: 100%; min-height: 48px; }
  .pill { min-height: 44px; }
  .add { width: 44px; height: 44px; }
  .tray { padding: 12px 12px 0; }
  .starts { display: flex; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 0; padding: 0 16px; }
  .starts::-webkit-scrollbar, .recent::-webkit-scrollbar { display: none; }
  .start { flex: none; width: 236px; }
  .recent { display: flex; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px; gap: 12px; }
  .recent > * { flex: none; width: 140px; }
  .recent > :nth-child(4) { display: flex; }
  .home-foot, .recent-sec { padding-bottom: var(--s5); }
  .home-foot + .recent-sec { margin-top: calc(-1 * var(--s5)); }
  .pop.menu { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; max-width: none; border-radius: 20px 20px 0 0; padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 31; max-height: 80dvh; overflow-y: auto; min-width: 0; }
  .menu-scrim:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(23, 18, 14, 0.35); z-index: 30; }
  .tray-foot .link { min-height: 44px; }
}
@media (max-width: 360px) {
  .bal .pl { display: none; }
  .home-h { font-size: 27px; }
}

/* V2-5c ===============================================================================================================
   Ads, Plan, Brands and Account, as the signed v2 prototype draws them (docs/platform/design/v2/prototype.html, the
   states ads, plan/*, brands, brand/*, account). Layout over app.css's tokens; the website's colours and fonts only.
   ===================================================================================================================== */
.ads-page, .plan-page, .brands-page, .brand-page, .account-page { gap: var(--s6); max-width: 1016px; }
.account-page { max-width: 696px; }
:is(.ads-page, .plan-page, .brands-page, .brand-page, .account-page) .h-screen { font-size: 44px; line-height: 1; }
:is(.ads-page, .plan-page, .brands-page, .brand-page, .account-page) .card { box-shadow: none; }
.bal { min-width: 44px; justify-content: center; }  /* the balance pill is a tap target: never under 44 px wide */
.h2 { margin: 0; font-family: var(--f-head); font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.small { font-size: 14.5px; color: var(--muted-2); margin: 0; }
.card-dark .small { color: var(--on-dark-2); }
.num { font-variant-numeric: tabular-nums; }
.row-v2 { display: flex; gap: var(--s2) var(--s3); align-items: center; flex-wrap: wrap; }
.btn-ghost[aria-pressed="true"] { background: var(--ground-2); }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; font-size: 22px; line-height: 1; padding: 0; }
.icon-btn:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pill[disabled] { opacity: 0.45; cursor: not-allowed; }
.pill[disabled]:hover { border-color: var(--chip-line); }
.link.compare-link { align-self: center; }

/* lists inside a card: a row per item, a thin line between (Not started, payments, what each ad cost, largest files) */
.list-v2 { display: flex; flex-direction: column; }
.li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 15px; min-width: 0; color: inherit; text-decoration: none; }
.li:first-child { border-top: 0; }
a.li:hover .t { text-decoration: underline; text-decoration-color: var(--line-strong); }
.li img, .li .sq { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--ground-2); }
.li .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li .t { overflow-wrap: anywhere; }
.li .fname { word-break: break-all; }
.li .n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.li .acts { display: flex; gap: var(--s2); align-items: center; flex: none; }
.drop { border: 2px dashed var(--line-strong); border-radius: var(--r-card); padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s3); align-items: center; text-align: center; background: var(--field); }
.notes { margin: 0; padding: 0 0 0 18px; font-size: 14.5px; color: var(--bad-ink); }
.kv-v2 { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 15px; margin: 0; }
.kv-v2 > div { display: contents; }
.kv-v2 dt { color: var(--muted-3); }
.kv-v2 dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kv-v2 dd small { display: block; font-size: 14px; color: var(--muted-2); }
.kv-v2 .kv-whole dd { grid-column: 1 / -1; }

/* Ads: the grid of ads that got a yes (the website's free tries first), then Not started */
.adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s5) var(--s4); }
button.adcard { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; }
button.adcard[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.adcard:focus-visible .pic { outline: 3px solid var(--red); outline-offset: 2px; }
.try-card .act { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.not-started { gap: 8px; }
.ads-msg:empty { display: none; }
.ads-body { display: flex; flex-direction: column; gap: var(--s6); }

/* Plan: the three cards, the plans to pick or move to, the table, the summaries */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.pick-head { display: flex; flex-direction: column; gap: 10px; }
.pick-head .muted { margin: 0; }
.bigbal { font-family: var(--f-head); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -0.03em; }
.bigbal .unit { font-size: 20px; }
#plan-card .until, #plan-card .muted { margin: 0; }
#plan-card .btn-row, #extra-card .btn-row { margin-top: auto; }
.plan-v2 { gap: 10px; }
.plan-v2 .nm { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.plan-v2 .pr { font-family: var(--f-head); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; }
.plan-v2 .pr small { font-family: var(--f-text); font-size: 14.5px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.plan-v2 ul { margin: 0 0 var(--s2); padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--text-2); }
.plan-v2 ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.plan-v2 > .btn, .plan-v2 > .end { margin-top: auto; }
.plan-v2.now { border: 2px solid var(--ink); }
.plan-v2.is-picked { box-shadow: inset 0 0 0 2px var(--ink); }
.plan-sec { display: flex; flex-direction: column; gap: 12px; }
.agreed .link { font-size: 14.5px; }
.packs { display: flex; gap: 8px; flex-wrap: wrap; }
.refund-foot { border-top: 1px solid var(--line-soft); padding-top: 4px; display: flex; flex-direction: column; align-items: flex-start; }
/* the link wraps where its card is narrow (three cards at 768 wide; CI, 1 Nov): it never runs past the card's edge */
.refund-foot .btn.link { max-width: 100%; white-space: normal; text-align: left; justify-content: flex-start; }
.pay-off { margin: 0; font-size: 15px; color: var(--amber); background: var(--amber-bg); border-radius: var(--r-md); padding: 10px 14px; }
.pay-off .next { display: block; }
.pay-off a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
.kept.warn { background: var(--amber-bg); color: var(--amber); margin: 0; }
.cmp-card { padding: 8px 16px; }
.tbl-wrap.tbl-v2 { overflow-x: auto; background: none; border: 0; border-radius: 0; }
.cmp { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 640px; }
.cmp th, .cmp td { padding: 11px 12px; border-top: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.cmp thead th { border-top: 0; font-family: var(--f-head); font-size: 17px; font-weight: 700; }
.cmp tbody th { color: var(--muted-2); font-weight: 400; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(23, 18, 14, 0.35); display: grid; place-items: center; padding: var(--s4); }
.sheet { width: 480px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow-card); }
.sheet .h2:focus { outline: none; }
.sheet .alert .btn { align-self: flex-start; }

/* Brands: the cards of pictures, storage, and a brand's page */
.page-top { align-items: flex-end; }
.brands-count { margin-top: 8px; }
.meter { height: 8px; border-radius: 99px; background: var(--ground-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.meter.full i { background: var(--amber); }
.full-card { border: 2px solid var(--amber); }
.storage-card { gap: 10px; }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.bcard { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); min-width: 0; }
.bcard:hover { border-color: var(--line-strong); }
.bcard .bmeta { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 150px; border-radius: 14px; overflow: hidden; }
.mosaic > * { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ground-2); min-width: 0; }
.mosaic > :first-child { grid-row: 1 / 3; }
.bsq { display: grid; place-items: center; overflow: hidden; background: var(--ground-2); color: var(--maroon); font: 700 15px/1 Georgia, serif; letter-spacing: 0.04em; flex: none; }
.bsq img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bsq.cell { border-radius: 0; font-size: 22px; }
.bsq.big { width: 72px; height: 72px; border-radius: 18px; }
.bhead { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; }
.bhead > .t { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.bhead .tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bhead .rename { display: flex; flex-direction: column; gap: 8px; }
.bhead > .alert, .bhead > .note-warn { flex: 1 1 100%; }
.bgrid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.bgrid .facts { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.brand-page .logo-tiles { grid-template-columns: repeat(2, minmax(0, 110px)); }
.brand-page .logo-tile span { aspect-ratio: 110 / 64; border-radius: 12px; font-size: 15px; }
.brand-page .logo-tile span { overflow: hidden; }
.brand-page .logo-tile span img { width: 100%; height: 100%; object-fit: contain; }
.bgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sw { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.chip-sw { display: block; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-soft); }
.facts-kv { grid-template-columns: 72px minmax(0, 1fr); }
.finding { align-items: flex-start; flex-wrap: wrap; }
.finding .acts { flex-wrap: wrap; }
.btn-ghost.wrap { white-space: normal; text-align: left; padding-left: 4px; }
.edit-person { display: flex; flex-direction: column; gap: var(--s3); }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.filters::-webkit-scrollbar { display: none; }
.filters .pill { flex: none; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.fthumb { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--ground-2); border: 1px solid var(--line-soft); padding: 0; cursor: pointer; color: var(--ink); text-decoration: none; }
.fthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fthumb .doc { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; font-size: 12px; font-weight: 600; text-align: center; word-break: break-all; color: var(--text-2); }
.fthumb .mk { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: var(--ink); color: var(--cream); line-height: 1.4; }
.fthumb .ck { position: absolute; top: 5px; left: 5px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(23, 18, 14, 0.25); }
.fthumb.sel { outline: 3px solid var(--ink); outline-offset: -3px; }
.fthumb.sel .ck { background: var(--ink); border-color: var(--ink); }
.fthumb.sel .ck::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; height: 100%; }
.files-card .show-all { align-self: center; }
.selbar { position: fixed; z-index: 20; bottom: 24px; left: calc(50% + 42px); transform: translateX(-50%); width: min(560px, calc(100% - 140px)); display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; padding: 10px 12px 10px 18px; background: var(--ink); color: var(--cream); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.selbar .acts { margin-left: auto; }
.selbar .btn-line { background: transparent; color: var(--cream); border-color: var(--on-dark-line); }
.selbar .btn-dark { background: var(--cream); color: var(--ink); }
.screen.has-selbar > .page::after { content: ""; display: block; height: 72px; }
.remove-brand { gap: var(--s2); align-items: flex-start; }
.foot .small { margin: 0; }

/* Account */
.account-page .email { word-break: break-all; }
.biz summary { list-style: none; width: fit-content; }
.biz summary::-webkit-details-marker { display: none; }
.gst-form { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s3); }
.account-page #delete-card .alert { gap: var(--s3); }

@media (max-width: 900px) {
  .cols { gap: var(--s3); }
  .bgrid, .bgrid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ads-page, .plan-page, .brands-page, .brand-page, .account-page { gap: var(--s5); }
  :is(.ads-page, .plan-page, .brands-page, .brand-page, .account-page) .h-screen { font-size: 30px; }
  .adgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) 12px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .bigbal { font-size: 38px; }
  .kv-v2 { grid-template-columns: 96px minmax(0, 1fr); }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
  .li .acts .btn { padding: 10px 14px; }
  .sheet-wrap { place-items: end stretch; padding: 0; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; max-height: calc(100dvh - 24px); }
  .sheet .stick { position: sticky; bottom: -18px; background: var(--card); padding: 12px 0 18px; margin-bottom: -18px; z-index: 1; }
  .selbar { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); left: 50%; width: calc(100% - 24px); }
  .selbar .btn { padding: 10px 14px; }
  .bhead > .btn-row { width: 100%; }
}
@media (max-width: 360px) {
  :is(.ads-page, .plan-page, .brands-page, .brand-page, .account-page) .h-screen { font-size: 27px; }
  .adgrid { gap: var(--s4) 10px; }
  .li { gap: 10px; }
}

/* V2-5b */
/* ======================================================================================================
   v2 (V2-5b): the ad, one conversation from price to delivery, as the signed v2 prototype draws it (.ad, .chat,
   .studio, .yes, .idea, .result, .work). On a laptop the work hangs on the wall beside the conversation (Work · Idea
   · Cost); on a tablet or a phone it sits in the conversation itself, with no switch. app.css keeps v1's .chat,
   .frame and .board for nothing now; the ad's own names below never meet them.
   ====================================================================================================== */
.ad { flex: 1; min-height: 0; display: grid; grid-template-columns: 440px minmax(0, 1fr); }
.ad-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line-soft); background: var(--ground); }
.ad-log { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s5) var(--s5) var(--s4); display: flex; flex-direction: column; gap: 14px; }
.ad-log > .day { text-align: center; font-size: 13px; color: var(--muted-3); }
.you { align-self: flex-end; max-width: 88%; background: var(--ink); color: var(--cream); border-radius: 18px 18px 6px 18px; padding: 11px 15px; font-size: 15.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.you .att-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--on-dark-2); white-space: normal; }
.stack { display: flex; }
.stack > * { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; border: 2px solid var(--ink); margin-left: -8px; background: var(--ground-2); }
.stack > :first-child { margin-left: 0; }
.studio { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* Studio's turn is signed with the website's lockup, "Aight. Studio" (27 Oct test: "this logo is off") */
.who { display: flex; align-items: baseline; gap: 0.2em; color: var(--ink); }
.who .wm, .who .wm-sub { font-size: 16px; line-height: 1; }
.studio .say { font-size: 15.5px; line-height: 1.5; animation: none; }
/* a brand Studio knows only by name: its one question beside the price, a line to answer it (27 Oct test, item 10) */
.brand-ask { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 14px 16px; min-width: 0; }
.brand-ask .q { font-size: 15.5px; line-height: 1.5; }
.brand-ask .row { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.brand-ask .input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; }
.brand-ask .small { font-size: 13.5px; color: var(--muted-2); }
.brand-note { font-size: 14.5px; line-height: 1.5; color: var(--muted-2); }
.steps { display: flex; flex-direction: column; gap: 2px; }
.steps summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14.5px; color: var(--muted-2); width: fit-content; border-radius: 8px; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
.steps[open] summary::before { transform: rotate(90deg); }
.st { display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: var(--text-2); min-height: 28px; padding-left: 4px; }
.st .k { width: 16px; height: 16px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: var(--green-bg); color: var(--green); }
.st.wait { color: var(--muted-3); }
.st.wait .k { background: none; border: 1.5px solid var(--line-strong); }
.st.run .k { background: none; border: 2px solid rgba(227, 176, 98, 0.35); border-top-color: var(--gold-ink); animation: spin .9s linear infinite; }
.st.bad .k { background: var(--alert-bg); color: var(--alert-ink); }
.st .t { margin-left: auto; color: var(--muted-3); font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }
/* the price card: one number, "At most", its yes */
.yes { background: var(--ink); color: var(--cream); border: 1px solid var(--ink); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.yes .what { font-size: 14.5px; color: var(--on-dark-2); }
.yes .most { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--gold); }
.yes .price { font-family: var(--f-head); font-weight: 700; font-size: 32px; line-height: 1.05; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.yes .price small { font-family: var(--f-text); font-weight: 500; font-size: 15px; letter-spacing: 0; color: var(--on-dark-2); margin-left: 6px; white-space: nowrap; }
.ad .yes .small, .ad .yes .muted { font-size: 14.5px; color: var(--on-dark-2); }
.yes.price-card .price small { display: inline; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--on-dark-2); margin: 0 0 0 6px; }
.yes .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.yes .btn-dark { background: var(--cream); color: var(--ink); }
.yes .btn-dark:hover { background: var(--card); }
.yes .btn-line { background: transparent; color: var(--cream); border-color: var(--on-dark-line); font-weight: 500; }
.yes .btn-line:hover { border-color: var(--cream); }
.yes .link { color: var(--on-dark-2); text-decoration-color: var(--on-dark-line); align-self: flex-start; }
.yes hr { border: 0; border-top: 1px solid var(--on-dark-line); margin: 2px 0; width: 100%; }
.yes .plan-row { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.yes .plan-row + .small { margin-top: -10px; }
.yes .packs { display: flex; gap: 8px; flex-wrap: wrap; }
.yes .pill { background: transparent; color: var(--cream); border-color: var(--on-dark-line); min-height: 44px; }
.yes .pill[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.yes .refused { color: var(--gold); font-size: 14.5px; margin: 0; }
.makestop { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ad .small { font-size: 14.5px; color: var(--muted-2); }
.ad .alert { font-size: 15px; }
/* the idea as a card in the conversation */
.idea { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 14px 16px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 12px; font-size: 14.5px; margin: 0; }
.idea dt { color: var(--muted-3); }
.idea dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.idea .hl { font-family: var(--f-head); font-weight: 700; font-size: 17px; }
/* the pictures in the conversation: delivered, or arriving (blurred) on a tablet or a phone */
.result { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.result .row { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
/* Post where posting is not open for the account: one plain line under the buttons (27 Oct test, item 11) */
.post-note { font-size: 14px; line-height: 1.45; color: var(--muted-2); }
.ad-work > .post-note { padding: 0 var(--s5) var(--s2); text-align: right; }
.pics { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.pics a, .pics .p { display: block; border-radius: 10px; overflow: hidden; background: var(--media); position: relative; flex: none; height: 168px; }
.pics button.p { padding: 0; border: 0; cursor: pointer; }
.pics img, .pics video { display: block; height: 100%; width: 100%; object-fit: cover; }
.pics .r45 { aspect-ratio: 4 / 5; } .pics .r916 { aspect-ratio: 9 / 16; } .pics .r11 { aspect-ratio: 1; } .pics .r169 { aspect-ratio: 16 / 9; }
.pics.sm a, .pics.sm .p { height: 84px; }
.pics.working img { filter: blur(10px); transform: scale(1.1); }
/* a film's pictures in the conversation: a grid wide enough to judge them, each opening full size (27 Oct test) */
.pics.big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.pics.big.r916 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pics.big .p { height: auto; width: 100%; cursor: zoom-in; }
/* a delivered film on a tablet or a phone, where the Work wall is hidden: it plays in the conversation (checker, 27 Oct) */
.pics .p.film { height: auto; width: 100%; max-width: 300px; }
.pics .p.film.r169 { max-width: 100%; } .pics .p.film.r11, .pics .p.film.r45 { max-width: 380px; }
.pics .p.film video { object-fit: contain; }
.pics.working .p::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(253, 251, 247, 0.22) 50%, transparent 70%) 0 0 / 250% 100%; animation: shine 1.6s linear infinite; }
.money { font-size: 14.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.money b { color: var(--ink); }
.only-phone { display: none; }
/* an earlier version folded to one line ("v1 · made · 11.2 credits"), opening on a tap to the conversation it was */
.fold-in { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 4px 12px; border-left: 2px solid var(--line-soft); margin-left: 4px; }
/* a film's reference sheets: "Keep for this brand" */
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.sheet-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--media); }
.sheet-row .sheet-pic { padding: 0; border: 0; background: none; border-radius: 10px; cursor: zoom-in; flex: none; }
.sheet-row .sheet-pic img { width: 64px; height: 64px; display: block; }
.sheet-row .grow { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.sheet-row .t { font-weight: 600; font-size: 15px; }
.sheet-row .m { font-size: 14px; color: var(--muted-2); }
/* the box at the foot of the conversation */
.ask-bar { flex: none; padding: 10px var(--s4) 14px; border-top: 1px solid var(--line-soft); background: var(--ground); }
.ask { display: flex; gap: 8px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 6px 6px 16px; }
.ask:focus-within { border-color: var(--ink); }
.ask textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; resize: none; min-height: 44px; max-height: 160px; padding: 10px 0; font: inherit; font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.ask textarea::placeholder { color: var(--muted-3); }
.ask .clip { width: 44px; height: 44px; border: 0; align-self: flex-end; margin-left: -10px; }
.ask-tray { display: flex; flex-direction: column; gap: 8px; }
.ask-tray:not(:empty) { padding: 0 4px 10px; }
.ask-bar > .ask-tray { max-width: 648px; margin-left: auto; margin-right: auto; width: 100%; }
.ask .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream); display: grid; place-items: center; cursor: pointer; flex: none; }
.ask .send .ic { width: 20px; height: 20px; }
.ask-bar .alert { margin-bottom: 8px; }
/* the work, on the wall */
.ad-work { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--ground-2); }
.work-top { display: flex; align-items: center; gap: var(--s3); padding: 14px var(--s5); flex-wrap: wrap; }
.ad-work .tabs { background: var(--ground); }
.ad-work .tab { min-height: 40px; }
.work-top .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.work-top .pill { min-height: 44px; }
.work-top .pill[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.wboard { flex: 1; min-height: 0; overflow: auto; padding: var(--s3) var(--s5) var(--s6); display: flex; gap: var(--s5); align-items: flex-start; flex-wrap: wrap; align-content: flex-start; }
.wframe { display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: 100%; }
.wframe.r916 { width: 236px; } .wframe.r11 { width: 320px; } .wframe.r169 { width: 520px; }
.wbox { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-frame); overflow: hidden; background: var(--media); box-shadow: var(--shadow-soft); }
.r916 .wbox { aspect-ratio: 9 / 16; } .r11 .wbox { aspect-ratio: 1; } .r169 .wbox { aspect-ratio: 16 / 9; }
.wbox img, .wbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wbox video { object-fit: contain; }
.wbox.empty { background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; display: grid; place-items: center; color: var(--muted-3); font-size: 14px; }
.wbox.draw::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(253, 251, 247, 0.18) 50%, transparent 70%) 0 0 / 250% 100%; animation: shine 1.6s linear infinite; }
.wbox.blur img { filter: blur(14px) saturate(.8); transform: scale(1.1); }
.wframe .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wframe .nm { font-weight: 600; font-size: 15px; }
.wframe .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.wframe .acts .btn .ic, .work-top .btn .ic, .result .btn .ic, .sheet .btn .ic { width: 18px; height: 18px; }
.photos-used { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.photos-used .row { display: flex; gap: 6px; flex-wrap: wrap; }
.photos-used img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line-soft); background: var(--ground-2); }
.wbox .wopen { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
/* what is happening now, on the wall: the live steps, or what waits for the customer and its button (27 Oct test) */
.wnow { width: 100%; max-width: 720px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.wnow .nm { font-family: var(--f-head); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.wboard > .card { width: 100%; max-width: 720px; box-shadow: none; }
/* a film's pictures, at the film's shape: large and first before the film is made, smaller under it after */
.wpics { width: 100%; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wpics.r916 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.wpics.r169 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.wpics.after { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.wpics .pic { display: block; position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-frame); overflow: hidden; background: var(--media); padding: 0; border: 0; cursor: zoom-in; box-shadow: var(--shadow-soft); }
.wpics.r916 .pic { aspect-ratio: 9 / 16; } .wpics.r11 .pic { aspect-ratio: 1; } .wpics.r169 .pic { aspect-ratio: 16 / 9; }
.wpics .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpics .pic.draw { box-shadow: none; cursor: default; }
.wpics .pic.draw::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(253, 251, 247, 0.18) 50%, transparent 70%) 0 0 / 250% 100%; animation: shine 1.6s linear infinite; }
/* a picture full size, over everything (27 Oct test: "show it the screen") */
.viewer { position: fixed; inset: 0; z-index: 40; background: var(--media); color: var(--cream); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.viewer .vtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.viewer .vimg { min-height: 0; display: flex; }
.viewer .vimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer .vnav { display: flex; justify-content: center; gap: 16px; }
.viewer .icon-btn { background: rgba(253, 251, 247, 0.12); color: var(--cream); border-color: rgba(253, 251, 247, 0.32); }
.viewer .icon-btn:hover { border-color: var(--cream); }
.viewer .icon-btn:disabled { opacity: .35; cursor: default; }
.viewer .vprev .ic { transform: scaleX(-1); }
.panel { flex: 1; min-height: 0; overflow: auto; padding: var(--s3) var(--s5) var(--s6); }
.panel .card { max-width: 640px; box-shadow: none; }
.dkv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: 15px; margin: 0; }
.dkv dt { color: var(--muted-3); }
.dkv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cost-big { font-family: var(--f-head); font-weight: 700; font-size: 34px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.cost-big .small { font-family: var(--f-text); font-weight: 600; letter-spacing: 0; }
.ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
.ledger td { padding: 10px 0; border-top: 1px solid var(--line-soft); vertical-align: top; }
.ledger td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.ledger .small { display: block; }
/* the files, as a sheet over the ad (a tablet's or a phone's Files button) */
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); text-decoration: none; flex: none; padding: 0; }
.icon-btn:hover { border-color: var(--ink); }
.topbar .files { display: none; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(23, 18, 14, 0.35); display: grid; place-items: center; padding: var(--s4); }
.sheet { width: 480px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: var(--s4); }
.sheet .h2 { margin: 0; font-family: var(--f-head); font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.flist { display: flex; flex-direction: column; }
.flist .li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 15px; min-width: 0; }
.flist .li:first-child { border-top: 0; }
.flist .li img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--media); }
.flist .grow { flex: 1; min-width: 0; }
.flist .grow .small { display: block; word-break: break-all; }
.flist .li.film { flex-wrap: wrap; }
.flist .li.film video { flex: 1 0 100%; width: 100%; max-height: min(60dvh, 520px); border-radius: 10px; background: var(--media); display: block; }
@media (max-width: 900px) {
  .ad { grid-template-columns: minmax(0, 1fr); }
  .ad-chat { border-right: 0; }
  .ad .ad-work { display: none; }
  .ad-log { max-width: 680px; width: 100%; margin: 0 auto; }
  .ask-bar > .ask, .ask-bar > .alert { max-width: 648px; margin-left: auto; margin-right: auto; }
  .only-phone { display: block; }
  .topbar .files { display: inline-grid; }
}
@media (max-width: 760px) {
  .app.no-nav .rail { display: none; }
  .ad-log { padding: var(--s4) var(--s4) var(--s3); }
  .you { max-width: 92%; }
  .pics a, .pics .p { height: 150px; }
  .ask-bar { padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .sheet-wrap { place-items: end stretch; padding: 0; }
  .sheet { width: 100%; border-radius: 22px 22px 0 0; }
  .yes .btns .btn { flex: 1 1 auto; }
  .alert .btn-retry { min-height: 44px; }
  .dkv { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .pics a, .pics .p { height: 128px; }
  .yes .price { font-size: 28px; }
}

/* Credits history (27 Oct test, item 5): the balance as the pill counts it, what is set aside, every move in and out */
.hist-page .sec-h { align-items: baseline; }
#hist-balance { gap: var(--s2); }
#hist-balance .aside { display: flex; flex-direction: column; gap: 6px; padding-top: var(--s2); border-top: 1px solid var(--on-dark-line); }
#hist-balance .aside p { margin: 0; color: var(--on-dark-2); }
#hist-balance .aside-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
#hist-balance .aside-list .link, .li.hist .t .link { display: inline; min-height: 0; min-width: 0; font-size: inherit; overflow-wrap: anywhere; }
#hist-balance .aside-list .link { color: var(--cream); text-decoration-color: var(--on-dark-line); }
.li.hist .t .link { color: inherit; }
.ad-work .panel .card > .link { align-self: flex-start; }
.li.hist .n { font-weight: 600; }
.li.hist .n.in { color: var(--green); }
#hist-more { align-self: flex-start; }
#to-history { align-self: flex-start; }

/* ======================================================================================================
   Studio v3 (topic 79, docs/platform/STUDIO-V3.md): Home is one box; the order is the talk beside the plan, the
   making and the money (the mocks' WebHome, WebOrder, WebMaking, WebReady). The ad's own classes (.ad, .ad-log,
   .you, .studio, .ask) are reused; these are the new pieces.
   ====================================================================================================== */
.s3-screen { padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s5); max-width: 860px; width: 100%; margin: 0 auto; overflow-y: auto; }
.s3-home { display: flex; flex-direction: column; gap: var(--s4); }
.s3-home .h-screen { font-size: 40px; }
.s3-ask { padding: 10px 10px 10px 16px; }
.s3-ask textarea { min-height: 120px; }
.s3-go { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.s3-recent { display: flex; flex-direction: column; gap: var(--s3); }
.s3-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s3-list a { display: flex; justify-content: space-between; gap: var(--s3); padding: 14px 16px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); text-decoration: none; color: var(--ink); min-height: 44px; }
.s3-list .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3-list .m { color: var(--muted-2); flex: none; }
.s3-board { flex-direction: column; flex-wrap: nowrap; }
.s3-board > .card { width: 100%; max-width: 720px; box-shadow: none; display: flex; flex-direction: column; gap: 10px; }
.s3-plan ul, .s3-plan ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.s3-from { font-size: 13px; color: var(--muted-2); background: var(--ground); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.s3-cant li { color: var(--bad-ink, var(--ink)); }
.s3-price { margin-top: 6px; }
.s3-price small { font-size: 16px; font-weight: 600; }
.s3-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.s3-part { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.s3-part:first-of-type { border-top: 0; }
.s3-part .t { font-weight: 600; }
.s3-part .m { font-weight: 400; color: var(--muted-2); }
.s3-pics { display: flex; gap: 12px; flex-wrap: wrap; }
.s3-file { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.s3-file img, .s3-file video { display: block; max-height: 320px; max-width: 100%; border-radius: 10px; background: var(--media); }
.s3-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.s3-lines li { display: flex; justify-content: space-between; gap: 12px; }
.s3-read { color: var(--muted-2); }
.s3-q { margin: 0; padding-left: 20px; }
@media (max-width: 900px) {
  /* one column: the talk, then the plan or the work, then the box to talk in, held at the foot */
  .ad:has(.s3-work) { display: flex; flex-direction: column; overflow-y: auto; }
  .ad:has(.s3-work) .ad-chat { display: contents; }
  .ad:has(.s3-work) .ad-log { flex: none; overflow: visible; order: 1; }
  .ad .ad-work.s3-work { display: block; order: 2; background: none; }
  .ad:has(.s3-work) .ask-bar { order: 3; position: sticky; bottom: 0; z-index: 2; }
  .s3-board { padding: var(--s3) var(--s4) var(--s4); }
}
@media (max-width: 760px) {
  .s3-screen { padding: var(--s4); }
  .s3-home .h-screen { font-size: 30px; }
}
