/* LetzToken Lab demos: the shared frame. Same tokens as the lab site (letztoken.com colours:
   one blue, the logo greens, navy ink on warm paper). Fonts are self-hosted (OFL). */
@font-face { font-family: "Inter Tight"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-tight-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-tight-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --paper: #FBF9F5; --paper-2: #F3F0EB; --card: #FFFFFF;
  --ink: #101621; --ink-soft: #49505C; --ink-faint: #636974; --rule: #E3DFD8;
  --blue: #0A74F2; --blue-deep: #075BC0; --blue-soft: #EAF2FE;
  --green: #23C94E; --green-ink: #187E36; --green-soft: #DCF9E1;
  --amber-ink: #8A5300; --amber-soft: #FBEFD9; --red-ink: #B42318; --red-soft: #FDECEA;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(16, 22, 33, .05), 0 6px 20px rgba(16, 22, 33, .06);
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(12px, 3vw, 28px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15.5px/1.5 var(--text); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--ink-faint); }
.small, .fine { font-size: 13px; }
.fine { color: var(--ink-faint); }
.loading { padding: 40px var(--gutter); color: var(--ink-faint); }
.glyph { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header and roles ---- */
.app-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.app-top-in { display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter) 6px; max-width: 1320px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { width: 28px; height: 28px; }
.brand-name { font: 700 18px/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-chip { font: 700 12px/1 var(--display); color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 6px 9px; white-space: nowrap; }
.spacer { flex: 1; }
.roles { display: flex; align-items: center; gap: 6px; padding: 4px var(--gutter) 10px; max-width: 1320px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.roles::-webkit-scrollbar { display: none; }
.roles-label { font: 600 13px/1 var(--display); color: var(--ink-faint); margin-right: 4px; white-space: nowrap; }
.role { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--rule); background: var(--card); border-radius: 999px; padding: 5px 12px 5px 6px; font: 600 14px/1 var(--display); cursor: pointer; white-space: nowrap; min-height: 38px; }
.role .glyph { width: 24px; height: 24px; }
.role.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Try this ---- */
.try { background: var(--blue-soft); border-bottom: 1px solid color-mix(in srgb, var(--blue) 18%, transparent); }
.try-in { max-width: 1320px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.try-tag { font: 700 12px/1 var(--display); color: #fff; background: var(--blue); border-radius: 999px; padding: 5px 9px; }
.try p { flex: 1; min-width: 200px; font-weight: 500; }

/* ---- Layout ---- */
.tabs { display: none; }
.app-main { max-width: 1320px; margin: 0 auto; padding: 18px var(--gutter) 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 18px; align-items: start; }
.view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.app-foot { max-width: 1320px; margin: 0 auto; padding: 8px var(--gutter) 32px; color: var(--ink-faint); font-size: 13.5px; }

/* ---- Building blocks for views ---- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-head h2, .panel h2 { font-size: 19px; font-weight: 700; }
.panel-head .glyph { width: 44px; height: 44px; padding: 4px; background: var(--paper-2); border-radius: 12px; }
.panel-head p { color: var(--ink-faint); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--paper-2); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font: 700 24px/1.1 var(--display); color: var(--blue); }
.stat span { font-size: 13px; color: var(--ink-soft); }
.stat.green b { color: var(--green-ink); }
.rows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .grow strong { display: block; font-family: var(--display); }
.rows .grow span { color: var(--ink-faint); font-size: 13.5px; }
.num { font: 600 15px/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--card); border: 1.5px solid var(--rule); border-radius: 16px; padding: 12px; cursor: pointer; min-height: 44px; }
.tile:hover { border-color: var(--blue); }
.tile.on { border-color: var(--blue); background: var(--blue-soft); }
.tile[disabled] { opacity: .45; cursor: not-allowed; }
.tile strong { font-family: var(--display); }
.tile span { font-size: 13px; color: var(--ink-faint); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--card); font: 700 15px/1 var(--display); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink-faint); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.green { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red-ink); border-color: color-mix(in srgb, var(--red-ink) 40%, transparent); }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .glyph { width: 22px; height: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 12.5px/1 var(--display); border-radius: 999px; padding: 6px 10px; background: var(--paper-2); color: var(--ink-soft); white-space: nowrap; }
.chip.blue { background: var(--blue-soft); color: var(--blue-deep); }
.chip.green { background: var(--green-soft); color: var(--green-ink); }
.chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.red { background: var(--red-soft); color: var(--red-ink); }
.note { border-radius: 14px; padding: 12px 14px; background: var(--paper-2); font-size: 14.5px; }
.note.green { background: var(--green-soft); color: var(--green-ink); }
.note.amber { background: var(--amber-soft); color: var(--amber-ink); }
.note.red { background: var(--red-soft); color: var(--red-ink); }
.bar { height: 10px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .4s cubic-bezier(.2, 0, 0, 1); }
.bar.blue > i { background: var(--blue); }

label.field { display: flex; flex-direction: column; gap: 6px; font: 600 14px/1.3 var(--display); }
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1.5px solid var(--rule); background: var(--paper); border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%; font: 400 15.5px/1.3 var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
input[type=range] { width: 100%; accent-color: var(--blue); }

/* ---- Shared record ---- */
.record { position: sticky; top: 112px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 130px); overflow: auto; }
.record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.record-head h2 { font-size: 18px; }
.record-head p { font-size: 13px; }
.head-hash { font: 600 12px/1 var(--mono); background: var(--green-soft); color: var(--green-ink); border-radius: 8px; padding: 6px 8px; white-space: nowrap; }
.blocks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.blk { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--paper); border: 1.5px solid transparent; }
.blk .glyph { width: 30px; height: 30px; margin-top: 2px; }
.blk-n { font: 600 11.5px/30px var(--mono); color: var(--ink-faint); min-width: 26px; }
.blk-body { display: flex; flex-direction: column; min-width: 0; }
.blk-body strong { font: 700 14px/1.3 var(--display); }
.blk-body span { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.blk-body small { font-size: 12px; color: var(--ink-faint); }
.blk code { font: 500 11.5px/1 var(--mono); }
.blk.new { border-color: var(--green); background: var(--green-soft); }
.blk.broken { border-color: var(--red-ink); background: var(--red-soft); }
.verdict { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.verdict.ok { background: var(--green-soft); color: var(--green-ink); }
.verdict.bad { background: var(--red-soft); color: var(--red-ink); }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.record-actions .btn { flex: 1; min-width: 150px; font-size: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .blk.new { animation: arrive .6s cubic-bezier(.2, 0, 0, 1); }
  @keyframes arrive { from { transform: translateY(-6px); opacity: .3; } to { transform: none; opacity: 1; } }
}

/* ---- Toasts ---- */
.toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(16, 22, 33, .25); transition: opacity .3s, transform .3s; }
.toast.ok { background: var(--green-ink); }
.toast.bad { background: var(--red-ink); }
.toast.warn { background: var(--amber-ink); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---- Phones: the view and the record become two tabs ---- */
@media (max-width: 900px) {
  .app-main { grid-template-columns: 1fr; padding-top: 12px; }
  .tabs { display: flex; gap: 6px; padding: 10px var(--gutter) 0; max-width: 1320px; margin: 0 auto; }
  .tabs button { flex: 1; min-height: 42px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--card); font: 700 14px/1 var(--display); cursor: pointer; }
  .tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .tabs .count { display: inline-block; margin-left: 6px; font: 600 12px/1 var(--mono); opacity: .8; }
  .app-main[data-tab="view"] .record, .app-main[data-tab="record"] .view { display: none; }
  .record { position: static; max-height: none; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .brand-name { font-size: 16px; }
  .demo-chip { display: none; }
}

/* ==== v2: app-like frame (demo bar, full-size app, record drawer) ==== */
.demo-bar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.demo-bar-in { display: flex; align-items: center; gap: 12px; padding: 7px var(--gutter); max-width: 1320px; margin: 0 auto; min-height: 52px; }
.demo-brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; flex: none; }
.demo-brand img { width: 22px; height: 22px; }
.demo-bar .demo-chip { background: rgba(255, 255, 255, .14); color: #fff; }
.demo-name { font: 700 14px/1 var(--display); white-space: nowrap; opacity: .85; }
.demo-bar .roles { flex: 1; padding: 0; margin: 0; max-width: none; justify-content: center; }
.demo-bar .roles-label { color: rgba(255, 255, 255, .6); }
.demo-bar .role { background: transparent; border-color: rgba(255, 255, 255, .22); color: #fff; min-height: 34px; padding: 4px 11px 4px 5px; font-size: 13.5px; }
.demo-bar .role .glyph { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 1px; }
.demo-bar .role.on { background: #fff; color: var(--ink); border-color: #fff; }
.demo-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.rec-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 0; background: var(--green); color: var(--ink); font: 700 13.5px/1 var(--display); cursor: pointer; }
.rec-btn .glyph { width: 24px; height: 24px; background: #fff; border-radius: 8px; padding: 2px; }
.rec-btn .count { font: 700 12px/1 var(--mono); background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 7px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font: 700 18px/1 var(--display); cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.icon-btn.light { border-color: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--blue-deep); width: 30px; height: 30px; font-size: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .rec-btn.pulse { animation: recpulse 1s cubic-bezier(.2, 0, 0, 1); }
  @keyframes recpulse { 0% { box-shadow: 0 0 0 0 rgba(35, 201, 78, .7); } 100% { box-shadow: 0 0 0 12px rgba(35, 201, 78, 0); } }
}

/* The role's app, full size */
.stage { max-width: 1320px; margin: 0 auto; padding: 20px var(--gutter) 24px; }
.stage-phone { display: flex; justify-content: center; }
.app-foot { text-align: center; }

/* Phone app: one column like a phone; framed on wide screens, edge to edge on phones */
.phone { width: 100%; max-width: 430px; min-height: 720px; background: var(--paper); border-radius: 34px; box-shadow: 0 0 0 10px var(--ink), 0 24px 60px rgba(16, 22, 33, .25); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; background: var(--card); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 2; }
.phone-top .glyph { width: 34px; height: 34px; }
.phone-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.phone-title strong { font: 700 17px/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-title span { font-size: 12.5px; color: var(--ink-faint); }
.phone-right { display: flex; align-items: center; gap: 6px; flex: none; }
.phone-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.phone-tabs { display: flex; border-top: 1px solid var(--rule); background: var(--card); position: sticky; bottom: 0; }
.phone-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 10px; border: 0; background: transparent; font: 600 12px/1.1 var(--display); color: var(--ink-faint); cursor: pointer; position: relative; min-height: 56px; }
.phone-tabs button .glyph { width: 26px; height: 26px; opacity: .55; filter: grayscale(.6); }
.phone-tabs button.on { color: var(--blue); }
.phone-tabs button.on .glyph { opacity: 1; filter: none; }
.badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--blue); color: #fff; font: 700 11px/18px var(--display); font-style: normal; padding: 0 5px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 10px 6px 6px; font: 700 13.5px/1 var(--display); font-variant-numeric: tabular-nums; }
.pill .glyph { width: 22px; height: 22px; background: #fff; border-radius: 50%; padding: 1px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-deep); display: inline-grid; place-items: center; font: 700 13px/1 var(--display); flex: none; }
.hero-card { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero-card .big { font: 800 34px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-card .muted { color: rgba(255, 255, 255, .7); }
.hero-card.blue { background: var(--blue); }
.hero-card.green { background: var(--green-ink); }
.section-title { font: 700 15px/1.2 var(--display); color: var(--ink-soft); margin-top: 4px; }

/* Back-office app */
.desk { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); overflow: clip; } /* clip, not hidden: sticky parts inside keep sticking */
.desk-top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.desk-top .glyph { width: 36px; height: 36px; }
.desk-title { display: flex; flex-direction: column; margin-right: 8px; }
.desk-title strong { font: 700 18px/1.15 var(--display); }
.desk-title span { font-size: 12.5px; color: var(--ink-faint); }
.desk-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.desk-nav button { border: 0; background: transparent; border-radius: 999px; padding: 9px 14px; font: 600 14.5px/1 var(--display); color: var(--ink-soft); cursor: pointer; position: relative; min-height: 38px; }
.desk-nav button.on { background: var(--ink); color: #fff; }
.desk-nav .badge { position: static; display: inline-block; margin-left: 6px; }
.desk-actions { display: flex; gap: 8px; margin-left: auto; }
.desk-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--paper); }

/* The shared record as a drawer */
.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; border: 0; background: rgba(16, 22, 33, .35); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); cursor: pointer; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); box-shadow: -20px 0 60px rgba(16, 22, 33, .2); overflow: auto; padding: 14px; }
.drawer-panel .record { position: static; max-height: none; box-shadow: none; background: transparent; padding: 6px 4px 20px; }
.drawer-x { position: absolute; top: 14px; right: 14px; color: var(--ink); border-color: var(--rule); background: var(--card); z-index: 1; }
.drawer-panel .record-head { padding-right: 46px; }
@media (prefers-reduced-motion: no-preference) {
  .drawer.open .drawer-panel { animation: slidein .28s cubic-bezier(.2, 0, 0, 1); }
  @keyframes slidein { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
}
.toast.block { background: var(--card); color: var(--ink); border: 1.5px solid var(--green); }

@media (max-width: 900px) {
  .demo-bar-in { flex-wrap: wrap; gap: 8px; }
  .demo-bar .roles { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .demo-tools { margin-left: auto; }
}
@media (max-width: 520px) {
  .demo-name { display: none; }
  .rec-label { display: none; }
  .stage { padding: 0 0 16px; }
  .stage-desk { padding: 12px 10px 16px; }
  .phone { max-width: none; border-radius: 0; box-shadow: none; min-height: calc(100vh - 110px); }
  .desk-body { padding: 14px; }
  .desk-top { padding: 12px 14px; }
  .drawer-panel { top: auto; height: 86vh; width: 100%; border-radius: 22px 22px 0 0; }
}

/* desk-nav on phones: the nav gets its own scrolling row under the app title */
@media (max-width: 620px) {
  .desk-top { gap: 10px; }
  .desk-nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .desk-nav::-webkit-scrollbar { display: none; }
  .desk-nav button { white-space: nowrap; }
  .desk-actions { margin-left: auto; }
}

/* try strip on phones: one tight row of text, the action under it, the close button in the corner */
.try-in { position: relative; }
@media (max-width: 620px) {
  .try-in { padding: 8px 46px 10px var(--gutter); gap: 6px 10px; }
  .try p { font-size: 14px; line-height: 1.35; min-width: 0; flex: 1 1 calc(100% - 80px); }
  .try .btn.small { min-height: 34px; }
  .try .icon-btn.light { position: absolute; top: 8px; right: 10px; }
}

/* drawings on filled buttons sit on a white disc, or the blue ink vanishes on the blue button */
.btn.primary .glyph, .btn.green .glyph { background: #fff; border-radius: 50%; padding: 2px; }
