/* Pass Studio: the app's editor, in a browser. Tokens are the app's
   (app-code/tokens.ts, iOS table). System font, the app's radii. */
:root {
  color-scheme: dark;
  --bg: #08090C; --card: #15171C; --card2: #1E2128; --field: #0D0F13;
  --text: #F3F5F9; --sub: rgba(232,238,248,.6); --ter: rgba(232,238,248,.34);
  --sep: rgba(255,255,255,.08); --border: rgba(255,255,255,.08);
  --brand: #56C2FF; --on-brand: #06243A; --brand-ink: #56C2FF;
  --danger: #E5484D; --danger-ink: #FF6369; --ok: #3DD68C; --warn: #F5A524;
  --sheet: #15171C; --scrim: rgba(0,0,0,.55);
  --r-card: 14px; --r-btn: 13px; --r-seg: 10px; --r-in: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-page: var(--bg);
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.3,.64,1);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F1F0F3; --card: #FFFFFF; --card2: #E8E8EC; --field: #F9F9FB;
    --text: #1C2024; --sub: #60646C; --ter: #80838D;
    --sep: #D9D9E0; --border: #E0E1E6;
    --brand-ink: #0B69B8; --danger-ink: #CE2C31; --ok: #18794E; --warn: #AD5700;
    --sheet: #FCFCFD; --scrim: rgba(16,18,24,.32);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; overflow: clip; overscroll-behavior: none; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.35; -webkit-font-smoothing: antialiased; position: fixed; inset: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cap { font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--sub); margin: 0 0 10px; display: block; }
.sub { color: var(--sub); font-size: 13.5px; display: block; }
.sub.small { font-size: 12.5px; margin-top: 10px; }

/* buttons: the app's 13pt-radius buttons */
.primary, .secondary { height: 46px; border-radius: var(--r-btn); border: 0; padding: 0 18px; font-size: 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s, transform .15s, opacity .2s; white-space: nowrap; }
.primary { background: var(--brand); color: var(--on-brand); }
.secondary { background: var(--card2); color: var(--text); }
.primary:hover, .secondary:hover { filter: brightness(1.08); }
.primary:active, .secondary:active { transform: scale(.985); }
.primary:disabled, .secondary:disabled { opacity: .4; cursor: default; filter: none; }
.primary svg, .secondary svg { width: 17px; height: 17px; }
.sm { height: 38px; font-size: 14.5px; padding: 0 14px; border-radius: 11px; }
.wide { width: 100%; margin-top: 12px; }
.danger-link { background: none; border: 0; color: var(--danger-ink); font-weight: 600; margin-top: 14px; cursor: pointer; padding: 6px 0; }
.input { width: 100%; background: var(--field); border: 1px solid var(--border); border-radius: var(--r-in); color: var(--text); font: inherit; font-size: 16px; padding: 12px 14px; outline: none; transition: border-color .15s; resize: none; }
.input:focus { border-color: var(--brand); }
.input.bad { border-color: var(--danger-ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.row2.tight { margin-top: 0; }
.row2.one { grid-template-columns: 1fr; }

/* ---------- layout (computer) ---------- */
.app { position: absolute; inset: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr) 380px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top top top" "list work insp"; }
.top { grid-area: top; display: flex; align-items: center; gap: 14px; margin: 12px 12px 0; padding: 10px 10px 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
.home { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 18px; letter-spacing: -.3px; padding: 4px 10px 4px 4px; border-radius: 10px; transition: background-color .2s; }
.home:hover { background: var(--card2); }
.home .bk { width: 16px; height: 16px; color: var(--sub); }
.home img { width: 28px; height: 28px; }
.ttl { font-size: 15px; font-weight: 600; color: var(--sub); padding-left: 14px; border-left: 1px solid var(--sep); }
.private { margin: 0 auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); padding: 7px 11px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.private svg { width: 14px; height: 14px; color: var(--ok); }
.top-act { display: flex; gap: 8px; }
.top-act .primary b { font-size: 12px; min-width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(6,36,58,.16); }

.list { grid-area: list; display: flex; flex-direction: column; min-height: 0; padding: 18px 12px 14px 18px; }
.m-head, .m-bottom, .fab, .m-nav, .m-tools, .insp-head { display: none; }
.list-head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; }
.list-head .cap { margin: 0; }
.list-items { display: flex; flex-direction: column; gap: 6px; overflow: auto; min-height: 0; }
.prow { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; }
.prow:hover { background: color-mix(in srgb, var(--card2) 55%, transparent); }
.prow[aria-selected="true"] { background: var(--card2); }
.prow .chip { width: 42px; height: 30px; border-radius: 7px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); background-size: cover; background-position: center; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.prow strong { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow small { display: block; font-size: 12.5px; color: var(--sub); }
.prow small.warn { color: var(--warn); }
.prow .del { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--ter); display: grid; place-items: center; cursor: pointer; opacity: 0; }
.prow:hover .del, .prow[aria-selected="true"] .del { opacity: 1; }
.prow .del:hover { color: var(--danger-ink); background: var(--card); }
.prow .del svg { width: 15px; height: 15px; }
.prow .mini, .prow .warn-dot { display: none; }
.new-row { margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px dashed var(--sep); background: none; color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.new-row:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.new-row svg { width: 16px; height: 16px; }

.work { grid-area: work; position: relative; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.work-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 24px 40px; }
.card-tools { width: var(--card-w, 400px); display: flex; justify-content: flex-end; margin-bottom: 14px; }
.card-host { width: var(--card-w, 400px); }
.card-host .pc-wrap { --pc-cut: var(--bg); width: 100%; }
.hint { color: var(--ter); font-size: 13px; margin: 22px 0 0; text-align: center; }
.work.dragover::after { content: "Drop to read the code"; position: absolute; inset: 14px; border: 2px dashed var(--brand); border-radius: 18px; display: grid; place-items: center; color: var(--brand-ink); font-weight: 600; background: color-mix(in srgb, var(--bg) 70%, transparent); }

/* platform switch, beside the pass */
.plat-sw { display: inline-grid; grid-template-columns: 1fr 1fr; position: relative; padding: 3px; border-radius: 11px; background: var(--card2); }
.plat-sw button { position: relative; z-index: 1; width: 40px; height: 32px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--sub); transition: color .25s; }
.plat-sw button svg { width: 17px; height: 17px; }
.plat-sw button[aria-pressed="true"] { color: var(--on-brand); }
.plat-sw .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px; background: var(--brand); transition: transform .45s var(--spring); }
.plat-sw[data-on="android"] .thumb { transform: translateX(100%); }

.insp { grid-area: insp; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 12px 0; }
.insp-scroll { overflow: auto; overscroll-behavior: contain; padding: 18px; flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.grp { padding: 4px 0 22px; border-radius: 10px; }
.grp + .grp { border-top: 1px solid var(--sep); padding-top: 20px; }

/* the app's segmented control */
.segc { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 3px; border-radius: var(--r-seg); background: var(--card2); }
.segc button { border: 0; background: none; height: 34px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--sub); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s, color .2s; white-space: nowrap; padding: 0 6px; }
.segc button[aria-checked="true"], .segc button[aria-selected="true"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.travel-mode, .store-row { margin-top: 14px; display: grid; gap: 8px; }
.custom-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px 10px 10px; border-radius: 12px; border: 0; background: var(--card2); text-align: left; cursor: pointer; width: 100%; }
/* The store style row (R-TPL-23): a ticket like the app's TicketRow, the store
   icon on a stub, a perforation, the text, then a little fan of store cards. */
.store-pick { position: relative; display: grid; grid-template-columns: 46px 1fr auto auto; gap: 10px; align-items: center; min-height: 64px; padding: 0 10px 0 0; border-radius: 14px; border: 1px solid var(--sep); background: var(--card2); text-align: left; cursor: pointer; width: 100%; }
.store-pick .stub { position: relative; align-self: stretch; display: grid; place-items: center; color: var(--brand-ink); }
/* the perforation stops short of the notches, as in the app's TicketRow */
.store-pick .stub::after { content: ""; position: absolute; right: 0; top: 12px; bottom: 12px; border-right: 1.5px dashed var(--sep); }
.store-pick .stub svg { width: 22px; height: 22px; }
/* The notches are half-discs in the colour UNDER the row, laid over the row's
   own border (top/bottom -1px), so the outline bends round them instead of
   running across. No overflow:hidden on the row: it clips at the padding box,
   which is exactly what left the border drawn over the holes. */
.store-pick::before, .store-pick::after { content: ""; position: absolute; left: 39px; width: 14px; height: 7px; background: var(--card); border: 1px solid var(--sep); box-sizing: border-box; }
.store-pick::before { top: -1px; border-top: 0; border-radius: 0 0 7px 7px; }
.store-pick::after { bottom: -1px; border-bottom: 0; border-radius: 7px 7px 0 0; }
.store-pick .fan { position: relative; width: 74px; height: 46px; }
.store-pick .ft { position: absolute; width: 40px; height: 26px; border-radius: 3px; display: grid; place-items: center; font: 800 10px/1 -apple-system, "Helvetica Neue", Arial, sans-serif; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.08); }
.store-pick .ft.mk-logo img { max-width: 80%; max-height: 66%; object-fit: contain; display: block; }
.store-pick .ft.f0 { left: 0; top: 15px; transform: rotate(-12deg); }
.store-pick .ft.f1 { left: 33px; top: 5px; transform: rotate(10deg); }
.store-pick .ft.f2 { left: 17px; top: 10px; transform: rotate(-1deg); z-index: 1; }
.store-pick .ft.ghost { left: 3px; top: 11px; width: 44px; height: 28px; background: var(--field); border: 1px solid var(--sep); transform: rotate(-10deg); }
.store-pick .ft.front { left: 22px; top: 7px; width: 50px; height: 32px; z-index: 1; }
.store-pick:hover, .custom-row:hover { filter: brightness(1.06); }
.mk { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font: 800 11px/1 -apple-system, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.2px; text-align: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.store-pick strong, .custom-row strong { display: block; font-size: 15px; } .store-pick small, .custom-row small { display: block; font-size: 12.5px; color: var(--sub); }
.store-pick .chev { width: 16px; height: 16px; color: var(--ter); }
.store-lock { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card2); align-items: start; margin-bottom: 4px; }
.store-lock p { margin: 0; font-size: 13.5px; color: var(--sub); }
.store-lock strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.store-lock button { grid-column: 1 / -1; }

.code-pane { margin-top: 14px; display: grid; gap: 8px; }
.code-pane .sub { margin-top: 4px; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; width: 100%; background: var(--field); border: 1px solid var(--border); border-radius: var(--r-in); color: var(--text); font: inherit; font-size: 16px; padding: 12px 36px 12px 14px; cursor: pointer; }
.select.sm select { padding: 9px 30px 9px 12px; font-size: 14px; min-width: 128px; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select svg { position: absolute; right: 12px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); color: var(--sub); pointer-events: none; }
.check { margin: 2px 0 0; font-size: 13px; display: flex; gap: 6px; align-items: center; min-height: 18px; }
.check.ok { color: var(--ok); } .check.bad { color: var(--danger-ink); }
.check svg { width: 14px; height: 14px; flex-shrink: 0; }
.drop { border: 1.5px dashed color-mix(in srgb, var(--text) 22%, transparent); border-radius: var(--r-card); padding: 26px 18px; display: grid; justify-items: center; text-align: center; gap: 6px; cursor: pointer; transition: border-color .15s, background-color .15s; background: color-mix(in srgb, var(--card2) 50%, transparent); }
.drop:hover, .drop.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.drop svg { width: 28px; height: 28px; color: var(--brand-ink); margin-bottom: 6px; }
.drop strong { font-size: 15.5px; }
.drop span { font-size: 13px; color: var(--sub); max-width: 28ch; }
.cam-desk { margin: 4px 0 0; }
.busy { margin-top: 12px; display: flex; gap: 10px; align-items: center; color: var(--sub); font-size: 13.5px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--card2); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* swatch grid, as in the app's Card background sheet */
.swgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.swc { aspect-ratio: 1; border-radius: 12px; border: 0; cursor: pointer; position: relative; padding: 0; background-size: cover; background-position: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.swc[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2.5px var(--text), inset 0 0 0 5px var(--bg); }
.swc .pv { position: absolute; inset: 0; }
.swc.add { background: conic-gradient(from 200deg, #FF5F6D, #FFC371, #F9F871, #5BE7A9, #56C2FF, #8E7CFF, #FF5F6D); display: grid; place-items: center; color: #fff; }
.swc.add svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.swc.photo-add { background: var(--card2); display: grid; place-items: center; color: var(--brand-ink); }
.swc.photo-add svg { width: 24px; height: 24px; }
.swc input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.swc.none { background: var(--card2); display: grid; place-items: center; color: var(--sub); font-size: 12px; }
.swc .lb { position: absolute; left: 0; right: 0; bottom: 4px; font-size: 10.5px; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.shade { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--card2); }
.shade .sh-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; color: var(--sub); }
.shade input[type=range] { width: 100%; accent-color: var(--brand); }
.shade .sh-cols { display: flex; gap: 8px; align-items: center; }
.shade .sh-c { width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127,127,127,.4); }
.shade .sh-c[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--text); }
.shade .sh-c input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; }
.toggle.small { margin-top: 14px; font-size: 14px; }
.toggle { position: relative; }
.toggle input { position: absolute; opacity: 0; left: 0; top: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tg { width: 51px; height: 31px; border-radius: 16px; background: var(--card2); position: relative; flex-shrink: 0; transition: background-color .2s; box-shadow: inset 0 0 0 1px var(--border); }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.toggle input:checked + .tg { background: var(--brand); }
.toggle input:checked + .tg::after { transform: translateX(20px); }
.toggle input:focus-visible + .tg { outline: 2px solid var(--brand); outline-offset: 2px; }
.exp-fields { margin-top: 14px; }

/* ---------- sheets and dialogs ---------- */
.sheet { background: var(--sheet); border-radius: 16px 16px 0 0; padding: 10px 20px 22px; box-shadow: 0 -12px 40px rgba(0,0,0,.35); border: 1px solid var(--border); border-bottom: 0; }
.sheet h2 { font-size: 20px; font-weight: 600; margin: 8px 0 6px; letter-spacing: -.2px; }
.sheet > .sub { margin-bottom: 16px; }
.sheet .cap { margin-top: 16px; }
.grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--text) 25%, transparent); margin: 0 auto 8px; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.modal { position: fixed; left: 50%; bottom: 0; width: min(520px, 100%); max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; transform: translate(-50%, 100%); transition: transform .45s cubic-bezier(.2,.9,.25,1); z-index: 21; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
.modal.on { transform: translate(-50%, 0); }
@media (min-width: 901px) {
  .modal { bottom: auto; top: 50%; border-radius: 18px; border: 1px solid var(--border); transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.25,1), opacity .25s; padding: 20px 24px 24px; }
  .modal.on { transform: translate(-50%, -50%); opacity: 1; }
  .modal .grab { display: none; }
  .stores { width: min(620px, 100%); height: min(720px, 90vh); display: flex; flex-direction: column; }
}
.opts { display: grid; gap: 10px; margin-top: 6px; }
.opt { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-card); border: 0; background: var(--card2); text-align: left; cursor: pointer; }
.opt:hover { filter: brightness(1.07); }
.opt .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, var(--card)); color: var(--brand-ink); }
.opt .ic svg { width: 22px; height: 22px; }
.opt strong { display: block; font-size: 16px; } .opt small { display: block; font-size: 13px; color: var(--sub); margin-top: 1px; }
.opt .chev { width: 16px; height: 16px; color: var(--brand-ink); }
.cam-only { display: none; }
.has-cam .cam-only { display: grid; }

.stores { display: flex; flex-direction: column; }
/* Creative templates: the Pass Store's designs inside New pass */
.designs { display: flex; flex-direction: column; }
@media (min-width: 901px) { .designs { width: min(720px, 100%); height: min(760px, 90vh); } }
.ds-head { display: flex; align-items: center; gap: 8px; }
.ds-head h2 { margin: 0; }
.ds-back { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--card2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.designs > .search { margin-top: 10px; }
.ds-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; grid-auto-rows: max-content; align-content: start; min-height: 240px; max-height: 56vh; padding: 2px; }
@media (min-width: 901px) { .ds-grid { max-height: none; } }
@media (max-width: 560px) { .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-tile { display: flex; flex-direction: column; border: 0; padding: 0; border-radius: 12px; background: var(--card2); overflow: hidden; cursor: pointer; text-align: left; color: inherit; }
.ds-tile[hidden] { display: none; }
.ds-tile:hover, .ds-tile:focus-visible { filter: brightness(1.08); }
.ds-stage { padding: 12px 10px; display: flex; align-items: center; justify-content: center; min-height: 190px; }
.ds-card { width: 100%; max-width: 190px; pointer-events: none; }
.ds-meta { padding: 0 10px 10px; }
.ds-meta strong { display: block; font-size: 14px; } .ds-meta small { display: block; font-size: 12px; color: var(--sub); }
.st-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--border); border-radius: var(--r-in); padding: 0 12px; }
.search svg { width: 16px; height: 16px; color: var(--sub); }
.search input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; padding: 10px 0; outline: none; min-width: 0; }
.st-cats { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; }
.st-cats::-webkit-scrollbar { display: none; }
.st-cats button { flex-shrink: 0; border: 0; background: var(--card2); color: var(--text); font-size: 13.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.st-cats button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.st-list { flex: 1; overflow: auto; display: grid; gap: 8px; align-content: start; min-height: 240px; max-height: 52vh; padding: 2px; }
@media (min-width: 901px) { .st-list { max-height: none; } }
.st-row { display: grid; grid-template-columns: 124px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 0; background: var(--card2); text-align: left; cursor: pointer; width: 100%; }
.st-row:hover, .st-row:focus-visible { filter: brightness(1.08); }
/* A store tile is a small CARD (85.6:54), like the app's store list. */
.st-row .mk { width: 124px; height: 80px; border-radius: 8px; } /* SuperCards' card shape: 417:270, corners 5.5% of the width */
.mk-logo img { max-width: 80%; max-height: 66%; object-fit: contain; display: block; }
.st-row strong { display: block; font-size: 17px; letter-spacing: -0.01em; } .st-row small { display: block; font-size: 13.5px; color: var(--sub); }
.st-row .chev { width: 16px; height: 16px; color: var(--brand-ink); }
.st-more { text-align: center; color: var(--sub); font-size: 13px; padding: 10px; }
.custom-row { margin-top: 12px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.pk { border: 0; border-radius: 12px; background: var(--card2); padding: 10px; cursor: pointer; display: grid; gap: 8px; text-align: left; position: relative; align-content: start; }
.pk .tilew { background: #fff; border-radius: 8px; height: 120px; display: grid; place-items: center; padding: 8px; overflow: hidden; }
.pk .tilew img { max-width: 100%; max-height: 104px; object-fit: contain; image-rendering: auto; }
.pk .tilew svg { max-width: 100%; max-height: 96px; width: auto; height: auto; }
.pk strong { font-size: 14px; } .pk small { color: var(--sub); font-size: 12px; display: block; word-break: break-all; }
.pk[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--brand); }
.pk[aria-pressed="true"]::after { content: ""; position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 9.5 2.5 2.5L13 6.5' fill='none' stroke='%2306243A' stroke-width='2'/%3E%3C/svg%3E") center/18px no-repeat; }
.viewfinder { position: relative; aspect-ratio: 3 / 4; background: #000; border-radius: 14px; overflow: hidden; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.vf { position: absolute; width: 36px; height: 36px; border: 3px solid var(--brand); }
.vf.a { left: 16%; top: 24%; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; } .vf.b { right: 16%; top: 24%; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.vf.c { left: 16%; bottom: 24%; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; } .vf.d { right: 16%; bottom: 24%; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

.save-list { display: grid; gap: 6px; margin: 4px 0 14px; max-height: 220px; overflow: auto; }
.sl { display: grid; grid-template-columns: 22px 42px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 11px; background: var(--card2); cursor: pointer; }
.sl input { accent-color: var(--brand); width: 18px; height: 18px; }
.sl .chip { width: 42px; height: 28px; border-radius: 6px; background-size: cover; }
.sl strong { font-size: 14.5px; font-weight: 600; } .sl small { color: var(--sub); font-size: 12px; display: block; }
.sl small.bad { color: var(--danger-ink); }
.issues { margin: 0 0 14px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); font-size: 13.5px; }
.issues strong { display: block; margin-bottom: 6px; color: var(--danger-ink); }
.issues ul { margin: 0; padding-left: 18px; color: var(--text); }
.issues li { margin: 3px 0; }
.issues button { background: none; border: 0; color: var(--brand-ink); font-weight: 600; cursor: pointer; padding: 0 0 0 6px; }
.fname { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-top: 8px; }
.fname span { color: var(--sub); }
.adv { margin-top: 16px; border-top: 1px solid var(--sep); }
.adv summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 0 6px; cursor: pointer; color: var(--sub); font-weight: 600; font-size: 14.5px; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary svg { width: 12px; height: 12px; transition: transform .2s; }
.adv[open] summary svg { transform: rotate(90deg); }
.adv-body { display: grid; gap: 8px; padding-top: 6px; }
.save-acts { grid-template-columns: 1fr 1fr; }
.save-acts.three { grid-template-columns: auto 1fr 1fr; }
.done-ico { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); display: grid; place-items: center; margin: 10px 0 6px; }
.done-ico svg { width: 24px; height: 24px; }
.how { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 2px; }
.how li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px; background: var(--card2); }
.how li:first-child { border-radius: 12px 12px 4px 4px; } .how li:last-child { border-radius: 4px 4px 12px 12px; }
.how b { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 13px; }
.how strong { display: block; font-size: 15px; } .how span { display: block; color: var(--sub); font-size: 13.5px; margin-top: 2px; }
/* an emptied list: nothing to edit until a pass is made or opened */
body.is-empty .card-tools, body.is-empty #hint, body.is-empty .m-tools { display: none; }
body.is-empty .insp { visibility: hidden; }
.empty-work { text-align: center; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-work h2 { margin: 0; font-size: 20px; }
.empty-work p { margin: 0; color: var(--sub); }
.empty-acts { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.list-empty { margin: 4px 2px; color: var(--sub); font-size: 14px; }
.toast-act { margin-left: 8px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--brand-ink); cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card2); color: var(--text); border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; font-size: 14px; z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: min(440px, calc(100vw - 32px)); text-align: center; }

/* ---------- phone: the app's own screens ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "main"; }
  .top { display: none; }
  .list, .work { grid-area: main; }
  .insp { grid-area: auto; }
  /* screen: Passes */
  .list { padding: max(12px, env(safe-area-inset-top)) 16px 0; background: var(--bg); position: relative; }
  .m-head { display: block; padding: 6px 0 12px; }
  .m-head h1 { font-size: 34px; font-weight: 700; margin: 6px 0 6px; letter-spacing: -.4px; }
  .private.m { display: inline-flex; margin: 0; font-size: 12.5px; padding: 5px 9px; }
  .list-head { display: none; }
  .list-items { gap: 12px; padding-bottom: 150px; flex: 1; }
  .prow { display: block; padding: 0; border-radius: 14px; background: none !important; position: relative; }
  .prow > .chip, .prow > span:not(.mini), .prow .del { display: none; }
  .prow .mini { display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; min-height: 104px; padding: 14px 16px; border-radius: 16px; position: relative; pointer-events: none; text-align: left; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
  .prow .mini .mt { position: absolute; top: 12px; left: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
  .prow .mini .mn { font-size: 18px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prow .mini .ms { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prow .mini .mk2 { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prow .warn-dot { display: block; position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--warn); color: #241400; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 7px; }
  .new-row { display: none; }
  .fab { display: grid; place-items: center; position: absolute; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 24px rgba(86,194,255,.35); cursor: pointer; z-index: 3; }
  .fab svg { width: 24px; height: 24px; }
  .m-bottom { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--sep); z-index: 2; }
  .m-bottom button { height: 50px; }
  /* screen: Edit */
  .work { display: none; background: var(--bg); overflow: hidden; }
  body.m-edit .work { display: flex; flex-direction: column; }
  body.m-edit .list { display: none; }
  .m-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: max(10px, env(safe-area-inset-top)) 10px 8px; }
  .m-nav span { font-weight: 600; font-size: 17px; }
  .m-back, .m-done { background: none; border: 0; color: var(--brand-ink); font-size: 17px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; padding: 8px 6px; }
  .m-back svg { width: 20px; height: 20px; }
  .m-done { justify-self: end; font-weight: 600; }
  .work-inner { flex: 1; min-height: 0; padding: 4px 16px 0; justify-content: flex-start; }
  .card-tools { width: 100%; justify-content: center; margin-bottom: 10px; }
  .card-host { width: var(--card-w, 300px); }
  .hint { display: none; }
  .m-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-top: auto; padding: 14px 0 max(14px, env(safe-area-inset-bottom)); }
  .m-tools button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 0; border-radius: 14px; background: var(--card); color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px var(--border); }
  .m-tools button svg { width: 22px; height: 22px; color: var(--brand-ink); }
  /* settings open as the app's bottom sheet */
  .insp { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; padding: 0; max-height: 78dvh; transform: translateY(105%); transition: transform .45s cubic-bezier(.2,.9,.25,1); background: var(--sheet); border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.4); border: 1px solid var(--border); border-bottom: 0; }
  .insp.on { transform: translateY(0); }
  .insp-head { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 8px 18px 4px; }
  .insp-head .grab { grid-column: 1 / -1; margin-bottom: 6px; }
  .insp-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
  .insp-scroll { background: none; border: 0; border-radius: 0; padding: 12px 18px max(22px, env(safe-area-inset-bottom)); }
  .store-pick::before, .store-pick::after { background: var(--sheet); } /* the notches take the sheet's colour on a phone */
  .grp { display: none; border: 0 !important; padding: 0 !important; }
  .grp.on { display: block; }
  .grp > .cap:first-child { display: none; }
  .toast { bottom: auto; top: max(12px, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }
/* a Pass Store design: type and travel mode are fixed */
.segc.is-locked button { opacity: .5; cursor: not-allowed; }
#preset-lock .mk { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, #56C2FF 18%, transparent); color: #56C2FF; }
/* the photo can be dragged on the card to choose what shows (mouse and pen) */
@media (hover: hover) { .pc-wrap.can-reframe .pc-shape { cursor: grab; } .pc-wrap.can-reframe .pc-f, .pc-wrap.can-reframe .pc-qrbg { cursor: pointer; } }
.pc-wrap.reframing, .pc-wrap.reframing * { cursor: grabbing !important; user-select: none; }
.shade .sh-hint { margin: -4px 0 2px; font-size: 12.5px; color: var(--ter, var(--sub)); }
.ts-host { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; } /* Turnstile, only visible if it needs the person to click (logos.js) */
