/* post pro on the web: post's working sheet, on a browser. The tokens are
   AppTheme.swift's (paper and ink in light, the same drawing on night in
   dark); the marks are WorkingSheetShapes.swift's: ink boxes with corner
   arms, viewfinder brackets just outside each frame, pencil hairlines, no
   radii, the system face, lowercase. Dark by default, like the Mac. */

:root {
  --bg: #0E0E0D; --fg: 237, 234, 224; --pencil: #4C4A46; --accent: #D2564A;
  --ink: 1.5px; --hair: 0.75px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F2F1ED; --fg: 27, 26, 24; --pencil: #B9B5AA; --accent: #C23B2B;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: rgba(var(--fg), 0.92);
  font: 300 13px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden; user-select: none;
}
button, input, textarea, select { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; }
button { cursor: pointer; }
textarea { resize: none; user-select: text; }
a { color: inherit; }
.hidden { display: none !important; }
.fg90 { color: rgba(var(--fg), 0.9); } .fg85 { color: rgba(var(--fg), 0.85); } .fg70 { color: rgba(var(--fg), 0.7); }
.fg60 { color: rgba(var(--fg), 0.6); } .fg50 { color: rgba(var(--fg), 0.5); } .fg40 { color: rgba(var(--fg), 0.4); }
.pencil { color: var(--pencil); }
.accent { color: var(--accent); }
.mono { font-variant-numeric: tabular-nums; }
.light { font-weight: 300; } .regular { font-weight: 400; } .medium { font-weight: 500; }
.s11 { font-size: 11px; } .s12 { font-size: 12px; } .s13 { font-size: 13px; } .s14 { font-size: 14px; } .s15 { font-size: 15px; }
.rule { height: var(--hair); background: var(--pencil); flex: none; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the ink box: hairline edges with heavier corner arms; filled is the committed state */
.box {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); color: rgba(var(--fg), 0.85);
  box-shadow: inset 0 0 0 var(--hair) rgba(var(--fg), 0.45);
}
.box::before, .box::after, .box > .arms::before, .box > .arms::after {
  content: ""; position: absolute; width: 11px; height: 11px; border: 2px solid rgba(var(--fg), 0.9); pointer-events: none;
}
.box::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.box::after { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.box > .arms::before { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.box > .arms::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.box.quiet { box-shadow: inset 0 0 0 var(--hair) rgba(var(--fg), 0.22); }
.box.quiet::before, .box.quiet::after, .box.quiet > .arms::before, .box.quiet > .arms::after { border-color: rgba(var(--fg), 0.5); }
.box.filled { background: rgba(var(--fg), 1); color: var(--bg); box-shadow: none; font-weight: 500; }
.box.filled::before, .box.filled::after, .box.filled > .arms::before, .box.filled > .arms::after { display: none; }
.box:disabled, .box.disabled { opacity: 0.4; cursor: default; }
.box.pad { padding: 6px 14px; }
.box.pad-s { padding: 4px 10px; font-size: 12px; }
.box.pad-l { padding: 9px 22px; }
.underlined { text-decoration: none; border-bottom: var(--hair) solid var(--pencil); color: var(--pencil); font-size: 11px; }

/* the window */
#app { display: flex; flex-direction: column; height: 100%; }
.topbar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; flex: none; }
.topbar .title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wordmark { font-size: 15px; font-weight: 500; letter-spacing: -0.025em; color: rgba(var(--fg), 0.92); }
.wordmark span { font-weight: 300; }
.subtitle { font-size: 11px; color: var(--pencil); cursor: default; }
.topbar .spacer { flex: 1; }
.menu { position: relative; width: 28px; text-align: center; }
.menu > button { font-size: 16px; color: var(--pencil); width: 28px; }
.menu .items {
  position: absolute; right: 0; top: 24px; z-index: 30; min-width: 280px; background: var(--bg); padding: 6px 0;
  box-shadow: inset 0 0 0 var(--hair) var(--pencil), 0 8px 24px rgba(0,0,0,0.35); text-align: left;
}
.menu .items button, .menu .items label { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 14px; font-size: 12px; color: rgba(var(--fg), 0.85); text-align: left; }
.menu .items button:hover, .menu .items label:hover { background: rgba(var(--fg), 0.08); }
.menu .items .rule { margin: 6px 0; }
/* language: the word and the language on screen, the browser's own picker invisible over them */
.menu .items label.lang-row { position: relative; cursor: pointer; }
.lang-row .globe { display: inline-flex; width: 18px; flex: none; justify-content: center; }
.lang-row .globe svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.lang-row .now { margin-left: auto; color: var(--pencil); }
.lang-row select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; -webkit-appearance: none; appearance: none; }
.lang-row:has(select:focus-visible) { outline: 2px solid rgba(var(--fg), 0.85); outline-offset: -2px; }

.band { padding: 12px 14px 8px; flex: none; }
.band .head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.band .head .hint { font-size: 11px; color: var(--pencil); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band .value { font-size: 14px; font-weight: 300; color: rgba(var(--fg), 0.9); font-variant-numeric: tabular-nums; }
.band .halves { display: flex; gap: 56px; align-items: flex-start; }
.band .half { flex: 1 1 0; min-width: 0; }
.nudge-editor { position: relative; }
.nudge-editor textarea {
  display: block; width: 100%; min-height: 44px; max-height: 76px; padding: 10px 12px; font-size: 14px; color: rgba(var(--fg), 0.92);
  line-height: 1.35;
}
.nudge-editor textarea.quiet { min-height: 46px; max-height: 46px; padding: 7px 10px; font-size: 12px; }
.nudge-editor textarea::placeholder { color: rgba(var(--fg), 0.3); }
.nudge-editor textarea:disabled { opacity: 0.35; }
.nudge-editor .unlinked { position: absolute; top: -8px; right: 8px; background: var(--bg); padding: 0 4px; font-size: 11px; color: var(--pencil); display: flex; gap: 6px; }
.nudge-editor .unlinked button { color: rgba(var(--fg), 0.8); border-bottom: var(--hair) solid var(--pencil); }

/* the strength track: a pencil hairline with ticks and a short ink mark at the value */
.track { position: relative; height: 22px; flex: 1 1 auto; min-width: 40px; cursor: ew-resize; touch-action: none; }
.track .line { position: absolute; left: 1px; right: 1px; top: 50%; height: var(--hair); background: var(--pencil); }
.track .tick { position: absolute; top: 50%; width: var(--hair); height: 9px; background: var(--pencil); transform: translate(-50%, -50%); }
.track .mark { position: absolute; top: 50%; width: 2px; height: 14px; background: rgba(var(--fg), 0.9); transform: translate(-50%, -50%); }
.track.disabled { opacity: 0.35; cursor: default; }
.track-labels { position: relative; height: 14px; font-size: 11px; color: var(--pencil); }
.track-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; height: 22px; }
.row .label { width: 50px; flex: none; font-size: 11px; color: rgba(var(--fg), 0.8); }
.row .num { width: 34px; flex: none; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(var(--fg), 0.9); }
.row .num.touched { font-weight: 400; }

/* the sheet */
.grid { flex: 1 1 auto; overflow: auto; padding: 10px 20px 12px; }
.grid .rows { display: grid; gap: 22px; align-items: start; }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.frame {
  position: relative; width: 100%; background: rgba(var(--fg), 0.06); overflow: visible; cursor: default;
}
.frame .pic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.frame canvas, .frame img { max-width: 100%; max-height: 100%; display: block; }
.frame.busy canvas { opacity: 0.35; }
.frame .bk { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(var(--fg), 0.85); pointer-events: none; opacity: 0; transition: opacity 0.12s ease-out; }
.frame.selected .bk { opacity: 1; }
.frame.busy.selected .bk { opacity: 0.35; }
.frame .bk.tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.frame .bk.tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.frame .bk.bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; }
.frame .bk.br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.frame .overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(var(--bgrgb), 0.85);
  padding: 8px 12px; font-size: 11px; color: rgba(var(--fg), 0.85); text-align: center; max-width: 90%; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
:root { --bgrgb: 14, 14, 13; } :root[data-theme="light"] { --bgrgb: 242, 241, 237; }
.frame .overlay.failed { color: var(--accent); user-select: text; }
.frame .overlay .narration { color: rgba(var(--fg), 0.55); max-width: 260px; }
.dots { display: flex; align-items: center; }
.dots i { display: block; width: 7px; height: 7px; border: var(--ink) solid rgba(var(--fg), 0.9); }
.dots i.on { background: rgba(var(--fg), 0.9); }
.dots b { display: block; width: 14px; height: var(--ink); background: rgba(var(--fg), 0.9); }
.redraw { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: rgba(0,0,0,0.25); display: none; align-items: center; justify-content: center; pointer-events: none; }
.redraw.on { display: flex; }
.redraw i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: breathe 0.8s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(0.7); opacity: 0.3; } to { transform: scale(1); opacity: 0.9; } }
.tile .nameline { display: flex; gap: 6px; height: 14px; font-size: 11px; color: var(--pencil); }
.tile .nameline .name { flex: 1 1 auto; min-width: 0; }
.tile .note { font-size: 11px; color: var(--pencil); }
.tile .note.accent { color: var(--accent); }
.tile .looks { display: flex; gap: 6px; padding-left: 60px; }
.tile .looks button, .lightbox .looks button { padding: 3px; display: flex; }
.tile .looks canvas, .lightbox .looks canvas { height: 34px; width: auto; display: block; }
.lightbox .looks canvas { height: 44px; }
.looks button.other { opacity: 0.55; }
.looks button.chosen { box-shadow: inset 0 0 0 var(--hair) rgba(var(--fg), 0.22); }

.bottombar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; flex: none; }
.bottombar .status { flex: 1 1 auto; min-width: 0; font-size: 11px; color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the empty sheet, the sign-in, the walls: a pencil centre line with three ticks */
.centre { position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.centre::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: var(--hair); background: var(--pencil); }
.centre .tick { position: absolute; left: 50%; width: 8px; height: var(--hair); background: var(--pencil); transform: translateX(-50%); }
.centre .inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.centre .inner > * { background: var(--bg); padding: 0 10px; }
.crosshair { position: relative; width: 26px; height: 26px; }
.crosshair::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: var(--ink); background: rgba(var(--fg), 0.7); transform: translateX(-50%); }
.crosshair::after { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: var(--ink); background: rgba(var(--fg), 0.7); transform: translateY(-50%); }
.drop-target { position: absolute; inset: 6px; box-shadow: inset 0 0 0 var(--ink) rgba(var(--fg), 0.6); pointer-events: none; z-index: 5; }

/* overlays */
.scrim { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(var(--bgrgb), 0.7); }
.sheet { background: var(--bg); padding: 22px; min-width: 380px; max-width: 92vw; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 0 0 var(--hair) var(--pencil); }
.sheet h2 { margin: 0; font-size: 15px; font-weight: 300; color: rgba(var(--fg), 0.9); }
.sheet .buttons { display: flex; gap: 10px; align-items: center; }
.sheet .buttons .spacer { flex: 1; }
.sheet .col { display: flex; flex-direction: column; gap: 10px; }
.sheet .line { display: flex; align-items: center; gap: 10px; }
.sheet label.row-label { font-size: 11px; color: var(--pencil); }
.choice { display: flex; gap: 8px; }
.choice button { flex: 1 1 0; padding: 6px; font-size: 12px; color: rgba(var(--fg), 0.75); box-shadow: inset 0 0 0 var(--hair) rgba(var(--fg), 0.35); background: var(--bg); }
.choice button.on { background: rgba(var(--fg), 1); color: var(--bg); box-shadow: inset 0 0 0 var(--ink) rgba(var(--fg), 0.9); }
.choice.fixed button { flex: none; padding: 6px 12px; }
.switch { position: relative; width: 18px; height: 18px; flex: none; box-shadow: inset 0 0 0 var(--ink) rgba(var(--fg), 0.45); background: var(--bg); }
.switch.on { background: rgba(var(--fg), 1); box-shadow: inset 0 0 0 var(--ink) rgba(var(--fg), 0.9); }
.switch.on::after { content: ""; position: absolute; left: 4px; top: 5px; width: 8px; height: 4px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(var(--fg), 0.8); cursor: pointer; }
.hint { font-size: 11px; color: var(--pencil); }
input.text { width: 100%; padding: 7px 10px; font-size: 13px; color: rgba(var(--fg), 0.92); user-select: text; }
input[type=range] { flex: 1; }

/* the lightbox */
.lightbox { position: fixed; inset: 0; z-index: 35; background: rgba(var(--bgrgb), 0.97); display: flex; flex-direction: column; gap: 10px; padding: 16px 24px 14px; }
.lightbox .head { display: flex; align-items: center; gap: 10px; height: 22px; font-size: 11px; color: var(--pencil); }
.lightbox .head .name { font-size: 12px; color: rgba(var(--fg), 0.85); }
.lightbox .head .spacer { flex: 1; }
.lightbox .picture { position: relative; flex: 1 1 auto; min-height: 0; }
.lightbox .picture .pic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.lightbox .picture canvas { display: block; width: 100%; height: 100%; }
.lightbox .bk { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(var(--fg), 0.85); pointer-events: none; }
.lightbox .bk.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; } .lightbox .bk.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.lightbox .bk.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; } .lightbox .bk.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.lightbox .controls { display: flex; gap: 56px; align-items: flex-start; }
.lightbox .controls .half { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lightbox .row .label { width: 54px; font-size: 12px; }
.lightbox .row .num { width: 44px; font-size: 14px; }

.coach { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 36; background: rgba(var(--bgrgb), 0.9); padding: 10px 16px; font-size: 13px; color: rgba(var(--fg), 0.9); box-shadow: inset 0 0 0 var(--hair) var(--pencil); pointer-events: none; }
.announce { padding: 36px; display: flex; flex-direction: column; gap: 22px; align-items: center; max-width: 460px; }
.announce h3 { margin: 0; font-size: 17px; font-weight: 300; color: rgba(var(--fg), 0.75); }
.announce p { margin: 0; font-size: 13px; color: rgba(var(--fg), 0.6); line-height: 1.5; }
.google-button { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
kbd { font: inherit; }

/* ── post on a phone (phone.js) ───────────────────────────────────────────
   The phone app's screens in a browser: the pick square, the photo and
   "push it your way", the hold-tight sheet, the result. Follows the phone's
   own light or dark. Everything here is scoped to html[data-layout=phone]. */
html[data-layout="phone"], html[data-layout="phone"] body { height: auto; min-height: 100%; }
html[data-layout="phone"] body { overflow-x: hidden; overflow-y: auto; -webkit-tap-highlight-color: transparent; }
html[data-layout="phone"] #app { min-height: 100dvh; height: auto; }
.p-screen { position: relative; display: flex; flex-direction: column; min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.p-sheet-line { position: relative; }
.p-sheet-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: var(--hair); background: var(--pencil); pointer-events: none; }
.p-sheet-line > * { position: relative; }
.p-on { background: var(--bg); padding: 0 10px; }
.p-centre { text-align: center; }
.p-top { position: relative; display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 14px 0 18px; flex: none; }
.p-shots { font-size: 13px; font-weight: 300; color: rgba(var(--fg), 0.45); padding: 10px 4px; min-width: 60px; text-align: left; }
.p-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 16px; font-weight: 500; letter-spacing: -0.025em; color: rgba(var(--fg), 0.92); pointer-events: none; }
.p-menu { width: 44px; }
.p-menu > button { width: 44px; height: 44px; font-size: 18px; }
.p-menu .items { min-width: 250px; top: 40px; }
.p-menu .items button, .p-menu .items label { padding: 11px 16px; font-size: 14px; }
/* nothing else in the phone's menu is indented: the globe goes with the language's name */
.p-menu .lang-row .globe { order: 2; margin-left: auto; }
.p-menu .lang-row .now { order: 3; margin-left: -4px; }
.p-menu .lang-row select { order: 4; }

.p-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 14px 0 28px; }
.p-spacer { flex: 1 1 auto; }
.p-banner { display: flex; align-items: center; gap: 12px; margin: 4px 18px 0; padding: 8px 6px 8px 14px; background: var(--bg);
  box-shadow: inset 0 0 0 var(--hair) var(--pencil); max-width: 420px; align-self: center; }
.p-banner-text { font-size: 13px; color: rgba(var(--fg), 0.78); line-height: 1.35; }
.p-badge { display: flex; flex: none; }
.p-badge img { display: block; height: 36px; width: auto; }
.p-banner-close { flex: none; width: 32px; height: 32px; font-size: 18px; color: var(--pencil); }

.p-square { position: relative; width: min(76vw, 300px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--bg); box-shadow: inset 0 0 0 var(--hair) rgba(var(--fg), 0.55); margin-top: 18px; }
.p-square .bk, .p-photo .bk, .p-result-pic .bk { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(var(--fg), 0.85); pointer-events: none; }
.p-square .bk.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; } .p-square .bk.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.p-square .bk.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; } .p-square .bk.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.p-photo, .p-result-pic { position: relative; padding: 12px; background: var(--bg); }
.p-photo canvas { display: block; max-width: calc(100vw - 80px); max-height: 44vh; width: auto; height: auto; }
.p-photo .bk.tl, .p-result-pic .bk.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; } .p-photo .bk.tr, .p-result-pic .bk.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.p-photo .bk.bl, .p-result-pic .bk.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; } .p-photo .bk.br, .p-result-pic .bk.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.p-cancel { position: absolute; top: 18px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; font-size: 17px; line-height: 30px; }

.p-nudge { width: calc(100vw - 56px); max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.p-nudge-field { position: relative; width: 100%; background: rgba(var(--fg), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--fg), 0.10); }
.p-nudge-input { display: block; width: 100%; padding: 13px 14px; font-size: 16px; font-weight: 300; text-align: center; color: rgba(var(--fg), 0.88); user-select: text; -webkit-user-select: text; }
.p-nudge-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; gap: 8px;
  font-size: 16px; font-weight: 300; color: rgba(var(--fg), 0.3); pointer-events: none; white-space: nowrap; overflow: hidden; }
.p-nudge-overlay .p-suggestion { overflow: hidden; text-overflow: ellipsis; }
.box.p-pill { width: calc(100vw - 56px); max-width: 380px; padding: 15px 18px; font-size: 16px; }
.box.p-pill.p-process { font-weight: 600; color: rgba(var(--fg), 0.92); }

.p-developing { justify-content: center; gap: 28px; padding-bottom: 60px; }
.p-primary { white-space: pre-line; text-align: center; font-size: 17px; font-weight: 300; line-height: 1.75; color: rgba(var(--fg), 0.75); }
.p-notes { text-align: center; font-size: 14px; font-weight: 300; line-height: 1.5; color: rgba(var(--fg), 0.55); max-width: 310px; display: flex; flex-direction: column; gap: 10px; padding: 10px 24px; }
.p-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-dots { position: relative; display: flex; gap: 8px; padding: 0 10px; background: var(--bg); }
.p-dots::before { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; background: rgba(var(--fg), 0.85); transform: translateY(-50%); }
.p-dots i { position: relative; display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); }
.p-dots i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(var(--fg), 0.2); transition: background 0.3s ease-in-out; }
.p-dots i.on::after { background: rgba(var(--fg), 0.9); }
.p-seconds { font-size: 14px; color: rgba(var(--fg), 0.75); }
.p-status { font-size: 12px; font-weight: 300; color: rgba(var(--fg), 0.4); padding: 8px 14px; box-shadow: inset 0 0 0 var(--hair) var(--pencil); min-height: 2.7em; display: flex; align-items: center; }

.p-result { gap: 0; padding-top: 6px; }
.p-nav { width: 100%; padding: 0 28px 10px; display: flex; }
.p-result-pic { touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.p-result-pic canvas { display: block; max-width: calc(100vw - 56px); max-height: 60vh; width: auto; height: auto; }
.p-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); background: rgba(0,0,0,0.42); color: #fff; font-size: 12px; padding: 8px 14px; white-space: nowrap; pointer-events: none; }
.p-pages { display: flex; gap: 4px; margin-top: 6px; }
.p-pages button { width: 24px; height: 20px; position: relative; }
.p-pages button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; transform: translate(-50%, -50%); box-shadow: inset 0 0 0 1.5px rgba(var(--fg), 0.5); }
.p-pages button.on::after { background: rgba(var(--fg), 0.9); box-shadow: none; }
.p-caption { width: 100%; padding: 18px 28px 0; display: flex; flex-direction: column; gap: 12px; }
.p-label-row { display: flex; align-items: baseline; gap: 6px; }
.p-label { font-size: 26px; font-weight: 600; color: rgba(var(--fg), 1); letter-spacing: -0.01em; }
.p-colour-word { font-size: 13px; font-weight: 400; color: rgba(var(--fg), 0.45); padding: 10px 8px; margin: -10px -4px; }
.p-desc { font-size: 14px; line-height: 1.5; color: rgba(var(--fg), 0.65); }
.p-sentence { font-size: 13px; line-height: 1.5; color: rgba(var(--fg), 0.45); margin-top: -4px; }
.p-buttons { display: flex; flex-wrap: wrap; gap: 10px 12px; justify-content: center; width: 100%; padding: 26px 28px 0; }
.p-buttons .box.p-pill { flex: 1 1 0; min-width: 0; width: auto; font-size: 14px; font-weight: 500; padding: 13px 10px; }
.p-report { margin-top: 18px; font-size: 11px; font-weight: 300; color: rgba(var(--fg), 0.4); text-decoration: underline; text-decoration-color: rgba(var(--fg), 0.3); }

.p-signin { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 30px 0; }
.p-legal { align-self: center; margin: 0 22px 26px; padding: 10px; font-size: 10px; color: rgba(var(--fg), 0.3); text-align: center; }
.p-legal a { color: rgba(var(--fg), 0.45); }

html[data-layout="phone"] .scrim { align-items: flex-end; }
html[data-layout="phone"] .sheet { min-width: 0; width: 100vw !important; max-width: 100vw; max-height: 88dvh; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
html[data-layout="phone"] .sheet .line { flex-wrap: wrap; }
html[data-layout="phone"] .sheet .box.pad, html[data-layout="phone"] .sheet .box.pad-s { padding: 9px 14px; font-size: 13px; }
.p-banner a.box { text-decoration: none; flex: none; font-size: 12px; }
