/* Landing + sign-in (index.html) and the owner dashboard (app.html). Mobile first. */

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; background: linear-gradient(to bottom, var(--bg) 72%, transparent); padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 6px 8px 6px 16px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 18px 36px -30px var(--shadow); }
.top-links { display: none; align-items: center; gap: 22px; }
.top-links a { color: var(--muted); font: 600 14px var(--body); text-decoration: none; white-space: nowrap; }
.top-links a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 2px; }
.top-actions .btn { min-height: 40px; padding: 0 13px; border-radius: 11px; font-size: 14px; }
.top-actions .btn.ghost { color: var(--muted); }
.top-actions .btn.ghost:hover { background: var(--sunk); color: var(--ink); filter: none; }
.top-actions .btn.sm:not(.ghost) { margin-left: 6px; padding: 0 16px; min-height: 40px; border-radius: 11px; }
.top-menu { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-btn { display: none; width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--sunk); color: var(--ink); align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 0; }
.nav-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; min-height: 40px; padding: 0; flex: none; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { background: var(--sunk); color: var(--ink); }
.theme-toggle .theme-ic { width: 20px; height: 20px; display: block; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.theme-toggle .theme-ic.sun { -webkit-mask-image: url("/vendor/remixicon/sun-line.svg"); mask-image: url("/vendor/remixicon/sun-line.svg"); }
.theme-toggle .theme-ic.moon { -webkit-mask-image: url("/vendor/remixicon/moon-line.svg"); mask-image: url("/vendor/remixicon/moon-line.svg"); }
.theme-toggle .theme-label { display: none; font: 600 14px var(--body); white-space: nowrap; }
.top.open .nav-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.top.open .nav-btn span:nth-child(2) { opacity: 0; }
.top.open .nav-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 720px) { .top-links { display: flex; } }
.top .btn.sm { min-height: 40px; }
.user-chip { display: none; font-size: 14px; color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 720px) { .user-chip { display: block; } }

/* =====================================================================
   Landing
   ===================================================================== */
.land { max-width: 1120px; margin: 0 auto; padding: 0 16px 56px; display: grid; gap: 28px; align-items: start; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "points" "demo" "features" "faq" "cta"; }
.land-main { display: contents; }
.hero-top {
  grid-area: top; display: grid; gap: 18px; align-content: center;
  padding-top: 28px;
  /* fill the first screen below the sticky nav */
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px - env(safe-area-inset-top, 0px));
}
/* anchors from the top nav / footer land below the sticky header */
#features, #faq, #demo { scroll-margin-top: 84px; }
.auth { grid-area: auth; }
/* hero CTA: one button below the lead, with an arrow */
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hero-actions .hero-cta { margin-top: 0; }
.hero-actions .btn.sec { min-height: 52px; }
.hero-demo-link .ic { width: 18px; height: 18px; }
.hero-works { justify-self: start; max-width: 420px; margin-top: 2px; }
/* dedicated sign-in / sign-up page */
.auth-page { max-width: 480px; margin: 0 auto; padding: 40px 16px 8px; display: grid; gap: 18px; }
.auth-page .auth { box-shadow: 0 24px 60px -30px var(--shadow); }
.no-login { display: grid; gap: 8px; justify-items: center; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.no-login span { color: var(--muted); font-size: 13px; }
.no-login .btn.dashed { width: 100%; min-height: 46px; font-size: 15px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.hero-top h1 { font-size: clamp(34px, 9vw, 60px); line-height: 1; }
.hero-top h1 em { font-style: normal; color: var(--accent-text); }
.hero-top .lead { color: var(--muted); font-size: 17px; max-width: 50ch; }

.auth { padding: 20px 20px 18px; display: grid; gap: 14px; box-shadow: 0 18px 40px -24px var(--shadow); }
.auth h2 { font-size: 24px; }
.auth .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.auth form { display: grid; gap: 12px; }
/* no reserved line when the form has no message -> less dead space in the card */
.auth .form-msg:empty { display: none; }
.otp-input { font: 800 26px/1 var(--disp); letter-spacing: 0.35em; text-align: center; height: 64px; padding-left: 0.35em; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw .eye { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; color: var(--muted); display: grid; place-items: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-msg { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--muted); }
.form-msg.bad { color: var(--bad); }
.form-msg.ok { color: var(--ok); }
.auth-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center; }
.mailed { display: grid; gap: 12px; justify-items: start; }
.mailed .ic-big { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.mailed .ic-big .ic { width: 28px; height: 28px; }

/* The landing demo is the real payment widget (PayView), directly on the page:
   no surrounding card: the slip and its method tabs are the only chrome. */
.demo { width: 100%; max-width: 420px; justify-self: center; }
.donate-shell @media (min-width: 960px) {
    .donate-shell }
.demo .pv-head { display: none; }
.demo .pv-help { display: none; }
/* the demo is for scanning, not saving: no Save QR image button, but the
   "paying from this phone?" note stays */
.demo .slip-actions { display: none; }
/* the demo is just the payment widget: no page header, how-to or footer tracks */
.demo .pv-in { grid-template-areas: "card"; }

.features, .faq, .home-cta { display: grid; gap: 16px; margin-top: 8px; }
.features h2, .faq h2, .home-cta h2 { font-size: 22px; }
.feat-grid { display: grid; gap: 12px; }
.feat { display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.feat .ic-tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.feat .ic-tile .ic { width: 20px; height: 20px; }
.feat h3 { font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.faq-grid { display: grid; gap: 10px; align-items: start; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font: 700 15px var(--body); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-text); font-weight: 800; font-size: 18px; transition: transform 0.18s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.faq-answer { overflow: hidden; padding-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.home-cta { gap: 16px; justify-items: start; padding: 24px; border-radius: 22px; background: var(--accent-soft); }
.home-cta p { margin: 0; color: var(--muted); max-width: 52ch; }
.home-cta .cta-action { display: grid; gap: 10px; justify-items: start; }
@media (min-width: 720px) {
  .home-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; padding: 30px 34px; }
  .home-cta .cta-action { justify-items: end; }
  .home-cta h2 { font-size: 26px; }
}
@media (min-width: 720px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .feat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.land-foot { max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 719px) {
  .hero-top { min-height: 0; padding-top: 36px; padding-bottom: 20px; gap: 16px; }
  .nav-btn { display: flex; }
  .top-menu { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 45; flex-direction: column; align-items: stretch; gap: 10px; margin: 0; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 50px -24px var(--shadow); }
  .top.open .top-menu { display: flex; }
  .top-menu .top-links { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .top-menu .top-links a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 15px; }
  .top-menu .top-links a:hover { background: var(--sunk); color: var(--ink); }
  .top-menu .top-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .top-menu .top-actions .btn { width: 100%; justify-content: center; }
  .top-menu .top-actions .user-chip { width: 100%; justify-content: center; min-height: 40px; }
  .theme-toggle { width: 100%; padding: 0 14px; }
  .theme-toggle .theme-label { display: inline; }
}

@media (min-width: 900px) {
  /* Desktop: hero and points on the left, the live demo on the right; the
     features, FAQ and closing CTA span both columns underneath. */
  .land {
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-areas: "main demo" "features features" "faq faq" "cta cta";
    column-gap: 72px;
  }
  .hero-top { padding-top: 56px; }
  .demo { align-self: center; }
  .land-main {
    grid-area: main;
    display: grid;
    align-content: start;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "points";
  }
    .auth { grid-area: auth; position: static; width: 100%; max-width: 480px; }
  .demo { grid-area: demo; justify-self: center; align-self: center; margin: 0; }
  .features { grid-area: features; margin-top: 12px; }
  .faq { grid-area: faq; }
  .home-cta { grid-area: cta; }
}

/* =====================================================================
   Dashboard
   ===================================================================== */
.studio { max-width: 1120px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 24px; align-items: start; }
.studio-main { display: grid; gap: 20px; min-width: 0; }
.boot { display: grid; place-items: center; min-height: 50vh; }

.progress { display: grid; gap: 12px; }
.progress .count { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.bars { display: flex; gap: 6px; }
.bars i { flex: 1; height: 6px; border-radius: 4px; background: var(--line); transition: background 0.2s; }
.bars i.done { background: var(--accent); }
.bars i.now { background: var(--accent); opacity: 0.55; }

.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--panel); color: var(--muted); font: 700 15px var(--body); display: inline-flex; align-items: center; gap: 8px; }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tabs button .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
/* On phones/tablets the tab bar scrolls, so only the selected tab keeps its
   label; the other tabs are icon pills and all of them fit. */
@media (max-width: 959px) {
  .tabs { flex-wrap: wrap; overflow: visible; margin: 0; padding: 2px 0; row-gap: 6px; }
  .tabs button { padding: 0 14px; }
  .tabs button[aria-selected="true"] { padding: 0 16px; }
  .tabs button:not([aria-selected="true"]) .tab-label { display: none; }
}

.panel { display: grid; gap: 20px; }
.panel-head { display: grid; gap: 8px; }
.panel-head h1 { font-size: clamp(28px, 7vw, 38px); }
.panel-head p { color: var(--muted); max-width: 52ch; }
.stack { display: grid; gap: 16px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .ic-tile { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.section-title h2 { font-size: 20px; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: -8px; }

/* QR drop zone */
.drop { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 30px 20px 22px; border: 2px dashed var(--line); border-radius: 24px; background: var(--panel); transition: border-color 0.15s, background 0.15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .big-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.drop .big-ic .ic { width: 32px; height: 32px; }
.drop h2 { font-size: 22px; }
.drop p { color: var(--muted); font-size: 15px; max-width: 36ch; margin-top: 4px; }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.drop-actions .btn { flex: 1 1 150px; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.paste-box { width: 100%; text-align: left; display: grid; gap: 8px; }

.qr-ok { display: grid; gap: 14px; }
.qr-ok-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qr-ok .avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font: 800 22px var(--disp); display: grid; place-items: center; flex: none; }
.qr-ok .who { flex: 1; min-width: 160px; }
.qr-ok .who b { display: block; font: 800 20px var(--disp); overflow-wrap: anywhere; }
.qr-ok .who span { color: var(--muted); font-size: 14px; }
.qr-ok-actions { display: flex; gap: 10px; flex-wrap: wrap; }
details.more { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 4px 16px; }
details.more summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; list-style: none; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
details.more[open] summary::after { transform: rotate(-135deg); }
details.more .body { padding: 0 0 14px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.tlv { width: 100%; border-collapse: collapse; font-size: 13px; }
.tlv td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tlv td:first-child { font: 700 12px var(--mono); width: 36px; color: var(--muted); }
.tlv td:nth-child(2) { width: 34%; color: var(--ink); }
.tlv td:last-child { font: 12px/1.4 var(--mono); word-break: break-all; color: var(--ink); }
.tlv tr.hl td { color: var(--accent-text); font-weight: 700; }

/* repeatable entries (wallets, banks) */
.entry { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 14px; }
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry-head b { font: 800 17px var(--disp); display: flex; align-items: center; gap: 10px; }
.entry-head .dot { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.grid2 { display: grid; gap: 14px; align-items: start; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2 .span2 { grid-column: 1 / -1; } }
.add { border: 2px dashed var(--line); background: transparent; color: var(--accent-text); border-radius: 18px; min-height: 56px; font: 700 16px var(--body); display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; transition: border-color 0.15s, background 0.15s; }
.add:hover { border-color: var(--accent); background: var(--accent-soft); }
.empty-hint { padding: 16px; border-radius: 16px; background: var(--sunk); color: var(--muted); font-size: 14px; }

/* theme picker */
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; max-height: 224px; overflow-y: auto; padding: 2px; }
.avatar-pick { aspect-ratio: 1; min-height: 46px; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.avatar-pick:hover { border-color: var(--accent); }
.avatar-pick[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--accent-text); }
.avatar-pick .ic { width: 20px; height: 20px; }
.avatar-group-label { margin: 14px 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: left; }
.avatar-pick .avatar-letter { font: 800 15px var(--disp); }

.pick-list { display: grid; gap: 10px; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; }
.pick-row:hover { border-color: var(--accent); }
.pick-preview { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 800 18px var(--disp); }
.pick-preview .ic { width: 22px; height: 22px; }
.pick-preview .pick-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25); }
.pick-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.pick-name { font: 700 14px var(--body); }
.pick-value { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-icon { flex: none; display: grid; place-items: center; color: var(--muted); }
.pick-icon .ic { width: 18px; height: 18px; }

/* picker sheet */
.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 16, 0.48); display: grid; place-items: center; padding: 16px; }
.sheet-card { width: min(560px, 100%); max-height: min(82vh, 640px); overflow-y: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px -30px var(--shadow); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; }
.sheet-close { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: var(--sunk); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sheet .avatars { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
.sheet .themes { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.sheet-form { display: grid; gap: 10px; }
.sheet-actions { display: flex; justify-content: flex-end; }
.sheet-actions .btn { min-width: 140px; }
body.sheet-open { overflow: hidden; }
@media (max-width: 560px) {
  .sheet { align-items: end; padding: 0; }
  .sheet-card { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
}

.themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.swatch { display: grid; justify-items: center; gap: 6px; padding: 10px 2px 8px; background: transparent; border: 0; border-radius: 16px; font-size: 13px; font-weight: 700; color: var(--muted); }
.swatch .dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25); transition: transform 0.12s; }
.swatch .dot .ic { width: 22px; height: 22px; opacity: 0; stroke-width: 3; }
.swatch[aria-checked="true"] { color: var(--ink); background: var(--sunk); }
.swatch[aria-checked="true"] .dot { transform: scale(1.06); outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch[aria-checked="true"] .dot .ic { opacity: 1; }
.swatch:active .dot { transform: scale(0.94); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 10px 16px; border: 1px solid var(--line); background: var(--panel); border-radius: 16px; cursor: pointer; }
.switch b { display: flex; align-items: center; gap: 7px; font-size: 16px; }
.switch b .ic { width: 18px; height: 18px; flex: none; }
.switch span.d { display: block; color: var(--muted); font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 52px; height: 32px; border-radius: 99px; background: var(--line); position: relative; transition: background 0.15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* share tab */
.live-banner { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.live-banner .ic { width: 26px; height: 26px; }
.urlbox { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 16px; }
.urlbox span { flex: 1; min-width: 0; font: 700 16px var(--disp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions .btn { flex: 1 1 140px; }
.share-qr { display: grid; gap: 14px; justify-items: center; text-align: center; }
.share-qr .qrbox { max-width: 220px; border: 1px solid var(--line); }
.danger-zone { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; }

/* preview column */
.preview-col { display: none; }
.frame { border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--bg); box-shadow: 0 24px 50px -30px var(--shadow); }
.frame-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.frame-bar .live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.frame-body { max-height: min(78vh, 820px); overflow: auto; overscroll-behavior: contain; }
body[data-step="qr"] .preview-col, body[data-step="look"] .preview-col { display: block; }

@media (min-width: 960px) {
  .studio { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; padding-top: 36px; }
  .preview-col { display: block; position: sticky; top: 92px; }
  .tabs { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
}

/* action bar */
.actionbar { background: var(--bg); border-top: 1px solid var(--line); }
.actionbar-in { max-width: none; margin: 0; padding: 14px 0 0; display: block; }
.actionbar-btns { display: flex; gap: 10px; align-items: center; }
.actionbar-btns .grow { flex: 1; }
.actionbar .msg { flex: 1; font-size: 14px; font-weight: 600; color: var(--muted); min-width: 0; }
@media (min-width: 960px) { .actionbar-in { grid-template-columns: none; column-gap: 0; padding: 14px 0 0; } }

.poster-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.poster-formats .btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.poster-hint-inline { font-size: 12.5px; color: var(--muted); }
.poster-preview { display: flex; justify-content: center; align-items: center; background: var(--sunk); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.poster-preview svg { width: auto; height: auto; max-width: min(100%, 280px); max-height: 400px; display: block; border-radius: 4px; box-shadow: 0 16px 34px -24px var(--shadow); }
.poster-preview .hint { margin: 0; }

/* modal (new password) */
.overlay { position: fixed; inset: 0; z-index: 150; background: rgba(10, 6, 16, 0.55); display: grid; place-items: center; padding: 16px; }
.sheet { width: 100%; max-width: 420px; background: var(--panel); border-radius: 24px; padding: 24px 20px; display: grid; gap: 14px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5); }

.setup-missing { max-width: 560px; margin: 12vh auto; padding: 0 20px; display: grid; gap: 14px; }
.setup-missing code { font: 600 13px var(--mono); background: var(--sunk); padding: 2px 6px; border-radius: 6px; }

/* the action bar is in flow now, so the page never needs fixed-bar padding */
.bar-msg { min-height: 0; margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.bar-msg:empty { display: none; }
.bar-msg.bad { color: var(--bad); }

/* offline mode (backend paused/unreachable): the status label stays visible on phones too */
.user-chip.local { display: block; }

/* Homepage-only sample QR cover. The QR stays visible underneath, but the
   sample is unmistakable and cannot be used as a real payment prompt. */
.demo-qr { position: relative; }
.demo-qr .qrbox { border-radius: 16px; }
.demo-qr-cover { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; padding: 0; }
.demo-qr-badge { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 999px; background: var(--accent); color: #fff; font: 800 19px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 8px 24px rgba(8, 42, 32, .28); transform: rotate(45deg); }
.demo .slip-help { display: none; }
