/* GET ON THE WALL · UI from the Owner mockup (docs/OWNER-MOCKUP.png) + Owner changes 2026-11-08.
 * Sizes are measured from the mockup at 390 px width (mockup frame 329 px → ×1.185).
 * Fonts: V14 design/fonts (Bebas Neue, Roboto Condensed, IBM Plex Mono; SIL OFL, see /fonts/*-OFL.txt).
 * Thermal receipt families ("IBM Plex Mono", "Roboto Condensed", "Thermal Bebas Neue") are the exact
 * names V14 app/ThermalReceiptM1.js draws with. */
@font-face { font-family: 'Hub Bebas'; font-weight: 400; font-display: swap; src: url(/fonts/BebasNeue-Regular.ttf) format('truetype'); }
@font-face { font-family: 'Hub Condensed'; font-weight: 100 900; font-display: swap; src: url(/fonts/RobotoCondensed-Latin.woff2) format('woff2'); }
@font-face { font-family: 'Hub Mono'; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexMono-Regular.ttf) format('truetype'); }
@font-face { font-family: 'Thermal Bebas Neue'; font-weight: 400; font-display: block; src: url(/fonts/BebasNeue-Regular.ttf) format('truetype'); }
@font-face { font-family: 'Roboto Condensed'; font-weight: 100 900; font-display: block; src: url(/fonts/RobotoCondensed-Latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: block; src: url(/fonts/IBMPlexMono-Regular.ttf) format('truetype'); }

:root { color-scheme: dark; }
html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }
[hidden] { display: none !important; }

.app {
  --black: #000;
  --bar: #1b1b1b;
  --red: #e3191f;          /* mockup red (rules, active nav, switch) */
  --red-deep: #d20924;     /* V14 red */
  --white: #fff;
  --grey-text: #858585;
  --field-side: #d9dbdc;
  --cream: #fcf6e1;
  --panel: #d9dadb;
  --panel-dark: #c6c7c6;
  --card: #f2f2f2;
  --yellow: #f2b53d;
  --green: #3cc84a;
  --green-deep: #1f9a3f;
  --submit: #29a047;
  --blue-dot: #1d1df0;

  --font-display: 'Hub Bebas', 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  --font-text: 'Hub Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --font-ui: Arial, Helvetica, 'Liberation Sans', Roboto, sans-serif;
  --font-mono: 'Hub Mono', 'IBM Plex Mono', monospace;

  --gutter: clamp(18px, 8.5vw, 36px);
  --radius: 7px;
  --nav-h: 64px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, .61, .36, 1);

  position: fixed; inset: 0;
  background: var(--black); color: var(--white);
  font-family: var(--font-text); font-synthesis: none;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  overflow: hidden;
}
.app *, .app *::before, .app *::after { box-sizing: border-box; }
.app h1:focus, .app h1:focus-visible { outline: none; }
.app button, .app label[role=button] { -webkit-tap-highlight-color: transparent; }

/* ---------- screen shell ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.head { flex: none; padding: 22px var(--gutter) 0; }
.body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--gutter); }
.scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ---------- brand header ---------- */
.logo { display: block; width: 194px; height: auto; }
.tagline { margin: 9px 0 0; font: 400 13px/1.2 var(--font-text); letter-spacing: .5px; text-transform: uppercase; color: var(--white); white-space: nowrap; }
.tagline span { color: var(--grey-text); }
.tagline i { font-style: normal; color: var(--grey-text); padding: 0 7px; }
.rule { height: 2px; background: var(--red); border: 0; margin: 7px 0 0; }
.rule--title { margin-top: 12px; }
.rule--flush { margin: 0; }

/* ---------- headings ---------- */
.kicker { margin: 13px 0 0; font: 500 19px/1.1 var(--font-text); letter-spacing: .4px; }
.kicker--tight { margin: 0; }
.title { margin: 2px 0 0; font: 400 40px/1 var(--font-display); letter-spacing: .4px; text-transform: uppercase; }
.lead { margin: 16px 0 0; font: 400 16px/1.4 var(--font-text); color: #ccc; max-width: 32ch; }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.fields { flex: 1 1 auto; min-height: 0; padding: 0 0 12px; }
.field { margin-top: 19px; }
.field:first-of-type { margin-top: 22px; }
.label { display: block; margin: 0 0 8px; font: 500 15px/1.2 var(--font-text); letter-spacing: .4px; text-transform: uppercase; }
.input-wrap { display: flex; align-items: stretch; height: 49px; background: var(--white); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s var(--ease); }
.input-side { flex: none; width: 44px; background: var(--field-side); display: grid; place-items: center; }
.input-side img { display: block; width: 26px; height: 26px; object-fit: contain; }
.input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 12px; font: 500 18px/1 var(--font-text); color: #111; }
.input::placeholder { color: #b5b5b5; }
.input-wrap:focus-within { box-shadow: 0 0 0 3px var(--red); }

/* PRIA / WANITA switch (standard switch shape, mockup colours) */
.gender { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 14px 0 0; min-height: 44px; font: 500 16px/1 var(--font-text); letter-spacing: .4px; }
.gender-label { transition: opacity .25s var(--ease), color .25s var(--ease); cursor: pointer; }
.gender[data-value="PRIA"] .gender-label[data-side="WANITA"], .gender[data-value="WANITA"] .gender-label[data-side="PRIA"] { opacity: .45; }
.switch { position: relative; display: inline-flex; align-items: center; height: 44px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { position: relative; display: block; width: 50px; height: 28px; border-radius: 14px; background: var(--red); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: background-color .25s var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #111; box-shadow: 0 2px 4px rgba(0,0,0,.45); transition: transform .32s var(--spring), width .18s var(--ease); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(22px); }
.switch:active .switch-knob { width: 27px; }
.switch input:checked:active + .switch-track .switch-knob, .switch:active input:checked + .switch-track .switch-knob { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--white); outline-offset: 2px; }

/* CPI community block */
.cpi { margin-top: 14px; background: var(--cream); border-radius: var(--radius); color: #111; overflow: hidden; }
.cpi-row { display: flex; align-items: center; min-height: 43px; transition: border-color .25s; border-bottom: 2px solid transparent; }
.cpi-row .input-side { align-self: stretch; }
.cpi-row .input-side img { width: 24px; height: 24px; }
.cpi-name { flex: 1; padding: 0 12px; font: 700 15px/1 var(--font-ui); letter-spacing: .1px; }
.cpi.is-open .cpi-row { border-bottom-color: #8c8c8c; }

.yes { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 0 14px; min-height: 43px; font: 700 15px/1 var(--font-ui); }
/* radio-style YES: ring stays, inner dot grows in */
.yes input, .ratio input, .district input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; border-radius: 50%; cursor: pointer;
  background-repeat: no-repeat; background-position: center; background-size: 0 0;
  transition: background-size .26s var(--spring), border-color .2s var(--ease), transform .12s var(--ease);
}
.yes input:active, .ratio input:active, .district input:active { transform: scale(.85); }
.yes input { width: 19px; height: 19px; border: 1.7px solid var(--red); background-color: transparent; background-image: radial-gradient(circle, var(--red) 0 4.5px, transparent 5px); }
.yes input:checked { background-size: 100% 100%; border-width: 2px; }
.yes--blue input { border-color: #808080; background-color: #dcdcdc; background-image: radial-gradient(circle, var(--blue-dot) 0 5.5px, transparent 6px); }
.yes input:focus-visible, .district input:focus-visible { outline: 3px solid #111; outline-offset: 2px; }

/* animated expand / collapse */
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .34s var(--ease), opacity .24s var(--ease); }
.collapse[data-open="true"] { grid-template-rows: 1fr; opacity: 1; }
.collapse-inner { min-height: 0; overflow: hidden; }
.cpi-body { padding: 4px 12px 12px; }
.sub-body { padding-bottom: 2px; }
.sublabel { display: block; margin: 9px 0 6px; font: 700 14px/1.2 var(--font-ui); }
.sublabel em { font-weight: 400; }
.badge-no { display: flex; align-items: center; gap: 8px; }
.badge-no b { font: 700 24px var(--font-ui); }
.plain { width: 100%; height: 44px; border: 1px solid #b9b9b9; border-radius: var(--radius); background: var(--white); padding: 0 12px; font: 500 16px var(--font-text); color: #111; }
.plain:focus { outline: 3px solid var(--red); outline-offset: 0; }
.districts { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
.district { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; min-height: 34px; font: 700 11px/1 var(--font-ui); white-space: nowrap; }
/* blank white by default; the district colour fills the inner circle when selected */
.district input { width: 15px; height: 15px; border: 1.5px solid #8a8a8a; background-color: #fff; background-image: radial-gradient(circle, var(--dot, #c8c8c8) 0 4px, transparent 4.5px); }
.district input:checked { background-size: 100% 100%; border-color: #333; }

.sub { margin-top: 12px; background: var(--panel); border-radius: var(--radius); padding: 0 10px 10px; box-shadow: 3px 3px 0 #b5b5b5; }
.sub-row { display: flex; align-items: center; border-bottom: 2px solid #8c8c8c; min-height: 43px; }
.sub-name { flex: 1; display: flex; align-items: center; gap: 6px; font: 700 15px/1 var(--font-ui); }
.sub-name img { width: 17px; height: 18px; object-fit: contain; }
.sub-row .yes { padding-right: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 4px; font: 400 13px/1.35 var(--font-text); color: #ddd; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--red); }

/* ---------- buttons (press: subtle squash + spring back) ---------- */
.actions { flex: none; display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 24px; }
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 4px; min-height: 44px; padding: 0 16px;
  font: 700 17px/1 var(--font-ui); letter-spacing: .4px; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .28s var(--spring), filter .15s var(--ease), opacity .2s;
}
.btn:active:not(:disabled), .tool:active, .card:active:not(:disabled), .zoom-btn:active, .nav button:active:not(:disabled) { transform: scale(.95); transition-duration: .08s; }
.btn:active:not(:disabled) { filter: brightness(.92); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--white { background: var(--white); color: #111; }
.btn--green { background: var(--submit); color: var(--white); }
.btn--half { flex: 0 0 124px; min-height: 33px; }
.btn--lg { min-height: 43px; border-radius: 7px; font: 400 19px/1 var(--font-ui); letter-spacing: .4px; flex: 0 0 125px; }
.btn--confirm { background: var(--green); color: var(--white); }
.btn--sm { min-height: 27px; padding: 0 12px; border-radius: 4px; font: 400 12.5px/1 var(--font-ui); letter-spacing: .1px; }
.btn--yellow { background: var(--yellow); color: #111; }
.btn--black { background: #111; color: var(--white); }
.btn--red { background: var(--red-deep); color: var(--white); }
.btn--print { background: var(--green-deep); color: var(--white); }

.inline-status { min-height: 18px; margin: 6px 0 0; font: 13px/1.3 var(--font-mono); color: var(--yellow); }
.inline-status:empty { display: none; }

/* ---------- landing ---------- */
.greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 13px 0 12px; }
.greet-name { min-width: 0; }
.greet-name .title { font-size: clamp(32px, 10.5vw, 42px); overflow-wrap: anywhere; }
.checkin { flex: none; text-align: right; font-family: var(--font-text); line-height: 1.15; padding-bottom: 3px; }
.checkin small { display: block; font-size: 7.5px; letter-spacing: .6px; color: #aaa; text-transform: uppercase; }
.checkin strong { display: block; font-size: 14.5px; font-weight: 700; text-transform: uppercase; }
.checkin span { display: block; font-size: 9.5px; font-weight: 700; }
.checkin small.last { margin-top: 6px; font-size: 7px; }
.section-label { margin: 18px 0 11px; font: 400 19px/1.1 var(--font-text); letter-spacing: .3px; }
.card {
  position: relative; display: flex; width: 100%; text-align: left; border: 0; padding: 0; cursor: pointer;
  background: var(--card); color: #111; border-radius: 9px; overflow: hidden; min-height: 132px;
  transition: transform .3s var(--spring);
}
.card:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.card:disabled { cursor: default; }
.card:disabled .card-body > * { opacity: .55; }
.card-bar { flex: none; width: 37px; }
.card-bar--yellow { background: var(--yellow); }
.card-bar--green { background: #3dc94a; }
.card-body { flex: 1; padding: 14px 10px 14px 21px; min-width: 0; }
.card-body svg { width: 53px; height: 46px; display: block; }
.card-title { display: block; margin-top: 7px; font: 400 clamp(30px, 9.5vw, 38px)/.95 var(--font-display); letter-spacing: .3px; text-transform: uppercase; overflow-wrap: anywhere; }
.card-sub { display: block; margin-top: 5px; font: 400 clamp(11px, 3.4vw, 13.5px)/1.15 var(--font-text); color: #6b6b6b; text-transform: uppercase; letter-spacing: 0; white-space: nowrap; }
.card-sub b { color: #3a3a3a; font-weight: 700; }
.soon { position: absolute; top: 10px; right: 12px; font: 700 10px var(--font-ui); letter-spacing: .6px; color: #777; }
.utility { display: flex; justify-content: flex-end; margin: 14px 0 8px; }
.link { appearance: none; background: none; border: 1px solid #555; border-radius: 4px; color: #bbb; font: 700 11px var(--font-ui); letter-spacing: .4px; min-height: 32px; padding: 0 12px; cursor: pointer; }

/* ---------- photo studio ---------- */
.studio-title { margin: 13px 0 0; font: 400 40px/1 var(--font-display); letter-spacing: .4px; text-transform: uppercase; }
.studio-sub { margin: 1px 0 0; font: 400 12.6px/1.2 var(--font-ui); text-transform: uppercase; }
.src { display: flex; gap: 10px; margin: 10px 0 0; }
.src .btn { flex: 0 0 auto; min-width: 119px; padding: 0 11px; white-space: nowrap; }
.src .btn svg { width: 15px; height: 15px; }
.src input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.edit-label { display: flex; align-items: center; gap: 9px; margin: 15px 0 8px; font: 700 16px/1 var(--font-ui); text-transform: uppercase; letter-spacing: .1px; }
.edit-label::before { content: ""; width: 13px; height: 13px; background: var(--red); }

.editor { flex: 1 1 auto; min-height: auto; display: flex; flex-direction: column; background: var(--panel); border-radius: 13px; padding: 16px 25px 16px; color: #111; }
.stage { flex: 1 1 auto; min-height: 150px; position: relative; display: flex; align-items: center; justify-content: center; }
.frame { position: relative; overflow: hidden; touch-action: none; background: var(--panel-dark); border-radius: 9px; box-shadow: inset 2px 2px 0 #2e3b32, 2px 2px 0 #fff; transition: width .3s var(--ease), height .3s var(--ease); }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame canvas[data-mode="dithered"] { image-rendering: pixelated; }
.photo-stage { position: absolute; inset: 0; outline: none; touch-action: pan-y; }
.photo-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--red); }
.frame-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; pointer-events: none; font: 400 12px var(--font-ui); color: #7a7a7a; text-transform: uppercase; letter-spacing: .4px; transition: opacity .2s; }
.ratios { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0 4px; }
.ratio { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; min-height: 28px; font: 400 13.5px var(--font-ui); text-transform: uppercase; color: #555; }
.ratio input { width: 11px; height: 11px; background-color: #6b6b6b; background-image: radial-gradient(circle, var(--red) 0 60%, transparent 62%); }
.ratio input:checked { background-size: 100% 100%; }
.ratio input:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.tool { appearance: none; border: 0; cursor: pointer; border-radius: 4px; background: var(--cream); color: #111; min-height: 28px; padding: 0 2px; font: 700 10.5px/1 var(--font-ui); text-transform: uppercase; transition: transform .28s var(--spring), background-color .15s; }
.tool--reset { background: var(--yellow); }
.tool:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.comment { position: relative; background: var(--white); border-radius: 5px; padding: 5px 9px 0; min-height: 42px; transition: box-shadow .18s var(--ease); }
.comment label { display: block; font: italic 400 7.5px var(--font-ui); color: #777; text-transform: uppercase; }
.comment input { width: 100%; min-height: 30px; border: 0; outline: 0; padding: 0; font: 400 15px var(--font-ui); color: #111; background: transparent; }
.comment input::placeholder { font-style: italic; color: #8a8a8a; text-transform: uppercase; }
.comment:focus-within { box-shadow: 0 0 0 2px var(--red); }
.studio-actions { flex: none; display: flex; justify-content: space-between; gap: 20px; margin: 14px 0 0; }
.status { flex: none; margin: 12px 0 10px; min-height: 40px; max-height: 64px; overflow-y: auto; background: var(--cream); color: #222; border-radius: 7px; padding: 9px 11px; font: 400 11px/1.35 var(--font-mono); letter-spacing: .5px; white-space: pre-wrap; transition: color .2s; }
.status[data-tone="error"] { color: var(--red-deep); }
.status[data-tone="ok"] { color: #11632a; }

/* ---------- preview sheet ---------- */
.preview { position: absolute; inset: 0; bottom: var(--nav-h); z-index: 5; display: flex; flex-direction: column; padding: calc(24px + env(safe-area-inset-top, 0px)) var(--gutter) 14px; }
.preview::before { content: ""; position: absolute; inset: 0 0 calc(-1 * var(--nav-h)); background: rgba(0,0,0,.5); animation: atu-fade .25s var(--ease); }
.sheet-stack { position: relative; flex: 1 1 auto; min-height: 0; display: flex; animation: atu-rise .38s var(--spring); }
.sheet-stack::after { content: ""; position: absolute; right: -9px; top: 13%; bottom: 3%; width: 22px; background: #e2e2df; border-radius: 0 9px 9px 0; z-index: -1; }
.sheet { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f3f3f1; color: #111; border-radius: 9px; padding: 17px 26px 16px; box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.sheet:focus { outline: none; }
.sheet h2 { margin: 0 0 10px; font: 700 24px/1 var(--font-ui); letter-spacing: .2px; text-transform: uppercase; }
@keyframes atu-rise { from { transform: translateY(24px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes atu-fade { from { opacity: 0; } to { opacity: 1; } }

/* zoomable / draggable receipt viewport; buttons below always stay visible */
.render { position: relative; flex: 1 1 auto; min-height: 120px; overflow: hidden; touch-action: none; cursor: grab; border-radius: 4px; user-select: none; -webkit-user-select: none; }
.render.is-dragging { cursor: grabbing; }
.render img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; image-rendering: pixelated; background: #fff; border: 1px solid #c4c4c4; box-shadow: 7px 7px 0 #9b9b9b; will-change: transform; pointer-events: none; }
.render img.is-animating { transition: transform .3s var(--ease); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.sheet-head h2 { margin: 0; }
.zoom-ctl { display: flex; gap: 6px; }
.zoom-btn { appearance: none; border: 0; width: 32px; height: 32px; border-radius: 16px; background: rgba(17,17,17,.78); color: #fff; font: 700 18px/1 var(--font-ui); cursor: pointer; transition: transform .28s var(--spring); }
.zoom-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.sheet-actions { flex: none; margin-top: 12px; }
.sheet-actions .btn--print { width: 132px; min-height: 31px; font: 400 19px/1 var(--font-ui); border-radius: 5px; }
.sheet-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 9px; }
.sheet-row .btn { min-height: 28px; font: 700 9.5px/1.05 var(--font-ui); padding: 0 3px; letter-spacing: 0; border-radius: 3px; white-space: nowrap; }
.sheet .status { margin: 9px 0 0; min-height: 40px; }
.screen.is-dimmed .body > *, .screen.is-dimmed .head { filter: grayscale(.6) brightness(.55); transition: filter .25s var(--ease); }

/* ---------- bottom nav ---------- */
.nav { flex: none; position: relative; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr); min-height: var(--nav-h); padding: 10px 4px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--black); }
.nav--inset::before { content: ""; position: absolute; top: 0; left: calc(var(--gutter) + 4px); right: calc(var(--gutter) + 4px); height: 2px; background: var(--red); }
.nav--bar { background: var(--bar); border-top: 2px solid #5a1416; }
.nav button { appearance: none; border: 0; background: transparent; cursor: pointer; color: #9a9a9a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 2px 0; font: 700 10px/1.05 var(--font-ui); text-transform: uppercase; position: relative; transition: transform .28s var(--spring), color .2s; }
.nav--bar button { color: #bdbdbd; }
.nav button svg { width: 24px; height: 24px; fill: currentColor; }
.nav button:disabled { opacity: .45; cursor: default; }
.nav button[aria-current="page"] { color: var(--red); }
.nav--inset button[aria-current="page"]::after { content: ""; position: absolute; bottom: -2px; left: 50%; width: 34px; margin-left: -17px; height: 3px; border-radius: 2px; background: var(--red); }
.nav button:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; border-radius: 6px; }

.logo, .tagline, .rule { flex: none; }
.busy { position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--red-deep); color: #fff; text-align: center; font: 700 12px var(--font-ui); padding: 8px; }

/* ---------- small and short screens ---------- */
@media (max-height: 760px) {
  .head { padding-top: 18px; }
  .edit-label { margin: 14px 0 8px; }
  .editor { padding: 14px 20px 16px; }
  .studio-actions { margin-top: 14px; }
  .status { margin: 14px 0 10px; min-height: 40px; }
  .card { min-height: 112px; }
  .section-label { margin: 13px 0 9px; }
}
@media (max-width: 340px) {
  .title, .studio-title { font-size: 34px; }
  .ratio { font-size: 12px; }
  .tool { font-size: 9.5px; }
  .src .btn { flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .app *::after { transition-duration: 0s !important; animation: none !important; }
}

/* on-screen keyboard: give the space to the form */
.app.is-kb .nav, .app.is-kb .head { display: none; }

/* ======================= M2 ======================= */
/* ---------- V14 loading sequence (app/Index.html #standby91 / showLoading16), literal (C29) ---------- */
#busy { display: none !important; }
#standby91[hidden] { display: none !important; }
#standby91 { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(0,0,0,.64); color: #f4f1e8; }
#standby91[data-bootstrap="true"] { background: #080808; }
.standby91-inner { display: grid; justify-items: center; gap: 6px; width: min(68vw, 224px); padding: 18px 14px; border: 1px solid #ffffff16; border-radius: 8px; background: #080808d9; text-align: center; font: 700 11px/1.2 'Hub Condensed', Arial, sans-serif; letter-spacing: 1px; }
.standby91-logo img { width: min(38vw, 124px); height: auto; display: block; }
.standby91-dots { display: flex; gap: 5px; height: 11px; align-items: end; }
.standby91-dots i { width: 4px; height: 4px; border-radius: 50%; background: #e2082c; animation: jump91 .72s infinite ease-in-out alternate; }
.standby91-dots i:nth-child(2) { animation-delay: .12s; }
.standby91-dots i:nth-child(3) { animation-delay: .24s; }
@keyframes jump91 { to { transform: translateY(-5px); opacity: .55; } }
#standby91 #loaderProcess16 { font: 600 9px/1.3 'Hub Condensed', Arial, sans-serif; color: #bcb7b4; letter-spacing: .6px; }
#standby91 #loaderDetail16 { font: 8px/1.3 'Hub Condensed', Arial, sans-serif; color: #aaa5a2; min-height: 1.3em; letter-spacing: .4px; }
#loaderTech16 { font: 8px/1.3 monospace; color: #989390; letter-spacing: 0; min-height: 2.6em; overflow-wrap: anywhere; }
.loader-terminal16 { display: flex; gap: 5px; align-items: center; font: 10px/1 monospace; color: #a7a19a; }
.loader-slash16 { display: inline-block; animation: spin16 1.6s linear infinite; }
.loader-cursor16 { animation: blink16 1.1s steps(2, end) infinite; }
@keyframes spin16 { to { transform: rotate(360deg); } }
@keyframes blink16 { 50% { opacity: 0; } }
@keyframes loading12 { to { transform: rotate(360deg); } }
@keyframes reveal16 { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes star-pop { 50% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes badge91 { 0% { transform: scale(.88); filter: brightness(1.6); } 100% { transform: scale(1); filter: brightness(1); } }
.badge-change91 { display: inline-block; animation: badge91 .24s cubic-bezier(.2, .9, .25, 1.25); }
.star-pop svg { animation: star-pop .2s both; }
.screen:not([hidden]) .body > * { animation: reveal16 180ms cubic-bezier(.2, .8, .2, 1); }

/* ---------- V14 toast and dialogs, restyled to the GOTW theme only (C29) ---------- */
#toast { position: fixed; bottom: calc(var(--nav-h) + 18px); left: 50%; transform: translateX(-50%); background: #191c19; color: #fff; padding: 13px 20px; border-radius: 8px; max-width: 90vw; z-index: 30; box-shadow: 0 4px 15px #0002; font: 700 13px/1.3 var(--font-ui); text-align: center; animation: reveal16 180ms cubic-bezier(.2, .8, .2, 1); }
.app dialog { background: #101010; color: #f5f2e9; border: 1px solid #b3132c; border-radius: 10px; box-shadow: 0 24px 90px #000b; padding: 22px; width: min(86vw, 360px); max-width: min(92vw, 460px); max-height: 85dvh; overflow: auto; }
.app dialog::backdrop { background: #000b; backdrop-filter: blur(3px); }
.app dialog h2 { margin: 0 0 14px; font: 800 22px/1.15 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .5px; }
.app dialog p { margin: 0 0 18px; font: 14px/1.45 var(--font-text); color: #ddd; }
.app dialog .actions { display: flex; flex-wrap: nowrap; gap: 8px; padding: 0; }
.app dialog button { flex: 1; min-height: 44px; padding: 8px 10px; border-radius: 4px; font: 700 13px/1.15 var(--font-ui); text-transform: uppercase; cursor: pointer; }
.app dialog button.red { background: var(--red-deep); color: #fff; border: 0; }
.app dialog button.secondary, .app dialog button:not(.red) { background: #f4f1e8; color: #111; border: 2px solid #f4f1e8; }
.app dialog button.green { background: var(--submit); color: #fff; border: 0; }
#expiredQrScanner video { display: block; width: 100%; max-height: 50vh; background: #111; margin-bottom: 12px; border-radius: 6px; }
#expiredQrScanner video[hidden] { display: none; }
#expiredQrScanner #expiredQrCancel { width: 100%; }

/* ---------- logged out / expired (V14 #diagnostic, #locked) ---------- */
.screen--overlay { z-index: 8; background: var(--black); }
.lock-icon { margin: 26px 0 0; font-size: 45px; line-height: 1; }
.lead--muted { color: #999; font-size: 14px; }
.lock-actions { display: flex; gap: 12px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.btn--scan { background: #f5ce38; color: #111; min-height: 46px; padding: 0 18px; }
.btn--scan svg { width: 20px; height: 20px; flex: none; }
.lock-actions .btn--white { min-height: 46px; }

/* ---------- entry: WhatsApp first (C23) ---------- */
#newMember .collapse-inner { padding: 0 3px; margin: 0 -3px; }

/* ---------- landing ---------- */
.card-bar--red { background: var(--red-deep); }
.device-notice { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--cream); color: #222; font: 12px/1.35 var(--font-text); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.device-notice p { margin: 0; }
.btn--wa { background: #169c42; color: #fff; flex: none; text-decoration: none; min-height: 32px; font-weight: 700; }
.meter { position: absolute; top: 12px; right: 12px; font: 700 10px var(--font-ui); letter-spacing: .5px; color: #555; }
#hub .card { min-height: 104px; }
#hub .card-body { padding: 11px 10px 11px 21px; }
#hub .card-body svg { width: 42px; height: 37px; }
#hub .card-title { margin-top: 5px; font-size: clamp(27px, 8.4vw, 34px); }
#hub .section-label { margin: 14px 0 8px; font-size: 17px; }

/* ---------- profile ---------- */
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.completion { flex: none; text-align: right; padding-bottom: 4px; }
.completion strong { display: block; font: 400 26px/1 var(--font-display); }
.completion small { display: block; font: 700 8px var(--font-ui); letter-spacing: .6px; color: #aaa; }
.completion .bar { display: block; width: 64px; height: 4px; margin-top: 5px; background: #333; border-radius: 2px; overflow: hidden; }
.completion .bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .4s var(--ease); }
.input-wrap--ro { background: #e6e6e6; }
.input-wrap--ro .input { color: #555; }
.hint { margin: 6px 0 0; font: 11px/1.3 var(--font-text); color: #999; }
.input[type=date] { min-height: 49px; }
.more { margin-top: 16px; border-top: 1px solid #333; padding-top: 10px; }
.more summary { cursor: pointer; font: 700 13px var(--font-ui); letter-spacing: .4px; color: #ddd; min-height: 36px; display: flex; align-items: center; }
.more .add { margin: 10px 8px 0 0; min-height: 34px; }
.repeat-row { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.repeat-row .plain { height: 42px; min-width: 0; }
.repeat-row select.plain { flex: 0 0 112px; }
.repeat-row .rm { flex: none; width: 36px; height: 36px; border: 0; border-radius: 18px; background: #333; color: #fff; font: 700 16px var(--font-ui); cursor: pointer; }
#pCpiSlot .cpi { margin-top: 14px; }

/* ---------- C31–C36 ---------- */
.verify-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 8px 12px; min-height: 44px; border-radius: var(--radius); background: var(--yellow); color: #111; text-decoration: none; transition: transform .28s var(--spring); }
.verify-bar:active { transform: scale(.97); transition-duration: .08s; }
.verify-bar:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.verify-bar img { width: 22px; height: 22px; flex: none; }
.verify-bar span { flex: 1; min-width: 0; }
.verify-bar b { display: block; font: 700 15px/1.1 var(--font-ui); text-transform: uppercase; letter-spacing: .3px; }
.verify-bar small { display: block; margin-top: 2px; font: 400 11px/1.2 var(--font-text); color: #3a3a3a; }
.verify-bar i { font: 700 24px/1 var(--font-ui); font-style: normal; }
#hub .card { min-height: 92px; }
#hub .card-body { padding: 9px 10px 9px 21px; }
#hub .card-body svg { width: 36px; height: 32px; }
#hub .card-title { margin-top: 4px; font-size: clamp(25px, 7.6vw, 32px); }
#hub .section-label { margin: 11px 0 7px; font-size: 16px; }
#hub .greet { padding: 10px 0 10px; }
.nav button { font-size: 9px; }

/* ======================= Alpha tweaks (Owner 10 Nov 2026) ======================= */
/* B8: one standard button face everywhere — condensed bold. */
.app { --font-btn: 'Hub Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif; }
.btn, .btn--lg, .btn--sm, .tool, .zoom-btn, .nav button, .app dialog button, .sheet-row .btn, .sheet-actions .btn--print, .link {
  font-family: var(--font-btn); font-weight: 700; letter-spacing: .5px;
}
.btn--lg { font-size: 20px; }
.tool { font-size: 12.5px; }
.nav button { font-size: 10.5px; }

/* B2/B3: bigger photo area, embossed frame, tap-to-add empty state. */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#photo .edit-label { margin: 12px 0 8px; }
.editor { padding: 12px 12px 12px; }
.stage { min-height: 220px; }
.frame {
  border-radius: 14px; background: linear-gradient(145deg, #e9eaea, #bfc0c0);
  box-shadow: -2px -2px 0 #fff, 3px 4px 0 #8f9090, 6px 10px 18px rgba(0,0,0,.28);
}
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 2px 2px 2px rgba(255,255,255,.55), inset -3px -3px 4px rgba(0,0,0,.28); }
.frame canvas { border-radius: inherit; }
.frame-empty { gap: 4px; align-content: center; color: #5d5d5d; font-family: var(--font-btn); }
.frame-empty svg { width: 54px; height: 54px; fill: #d20924; justify-self: center; filter: drop-shadow(1px 1px 0 #fff); }
.frame-empty b { font: 700 19px/1.1 var(--font-btn); letter-spacing: .4px; color: #222; }
.frame-empty small { font: 400 13px/1.1 var(--font-btn); letter-spacing: .4px; }
.photo-stage { cursor: pointer; }
.ratios { justify-content: center; gap: 22px; }

/* B7: PRINT IT! full width (green), SAVE TO DEVICE + BACK below. */
.sheet-actions .btn--print { width: 100%; min-height: 48px; font-size: 22px; border-radius: 7px; background: var(--green-deep); }
.sheet-row { grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-row .btn { min-height: 40px; font-size: 14px; border-radius: 5px; }
.sheet-row .btn--white { box-shadow: inset 0 0 0 2px #111; }

/* C50 source dialog (V14 dialog look): stacked choices; tap outside closes. */
.app dialog .actions--stack { flex-direction: column; }
.app dialog .actions--stack button { flex: none; width: 100%; min-height: 50px; font-size: 16px; }
.app dialog button.yellow { background: var(--yellow); color: #111; border: 0; }
.app dialog button.ghost { background: transparent; color: #ddd; border: 1px solid #555; }

/* ---------- C: Home (Owner Home sheet 10 Nov 2026, docs/sheets/home.jpg) ---------- */
/* C48 version label: three lines, right of the logo */
.head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.version-label { margin: 2px 0 0; text-align: right; font: 400 9.5px/1.3 var(--font-ui); letter-spacing: .1px; color: #e9e9e9; white-space: nowrap; }
.version-label b { display: block; font-weight: 400; color: var(--red); }
.version-label span { display: block; }
/* C45 profile string under the name */
.profile-line { margin: 4px 0 0; max-width: 100%; font: 700 14px/1.2 var(--font-btn); letter-spacing: .4px; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* C49 last check-in */
.checkin small.prev { margin-top: 5px; }
.checkin span.prev-at { font-size: 10px; font-weight: 700; color: #cfcfcf; text-transform: uppercase; }

/* C4 Photo Studio camera: zoom out + jiggle once every 3 s, inertial (spring) easing */
#hub .cam-icon { transform-origin: 50% 60%; animation: cam-jiggle 3s var(--ease) infinite; }
@keyframes cam-jiggle {
  0%, 62% { transform: none; }
  70% { transform: scale(.78); animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  78% { transform: scale(1.06) rotate(-9deg); }
  84% { transform: scale(1) rotate(7deg); }
  90% { transform: rotate(-4deg); }
  95% { transform: rotate(2deg); }
  100% { transform: none; }
}

/* C5 Profile: the side bar fills like a charging battery (wave) up to --level; full → static green */
.card-bar--wave { position: relative; overflow: hidden; background: #d9d9d9; }
.card-bar--wave::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--level, 0%); background: #3dc94a; transition: height 1s var(--spring); }
.card-bar--wave .wave { position: absolute; left: 0; width: 300%; height: 10px; bottom: calc(var(--level, 0%) - 1px); fill: #3dc94a; transition: bottom 1s var(--spring); animation: wave-slide 1.6s linear infinite; }
@keyframes wave-slide { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
.card-bar--wave[data-full="true"] { background: #3dc94a; }
.card-bar--wave[data-full="true"] .wave { display: none; }
.meter { display: flex; align-items: center; gap: 6px; top: 10px; right: 14px; }
.meter .check { display: none; width: 24px; height: 24px; color: #2bb541; }
.meter-text { font: 400 17px/1 var(--font-display); letter-spacing: .5px; color: #444; }
.meter[data-full="true"] .check { display: block; }
.meter[data-full="true"] .meter-text { color: #2bb541; font-size: 19px; }

/* C6 Rate: five grey stars; gold stars pop in 1 → 5 (pop - pop - pop), hold, then loop (~4.5 s) */
.stars { display: flex; gap: 4px; height: 32px; align-items: center; }
.stars i { position: relative; width: 30px; height: 30px; display: block;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='m24 2 7 14 16 2-12 12 3 16-14-8-14 8 3-16L1 18l16-2z'/%3E%3C/svg%3E");
}
.stars i::before, .stars i::after { content: ""; position: absolute; inset: 0; -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.stars i::before { background: #c8c8c8; }
.stars i::after { background: #ffbd31; transform: scale(0); animation: stars-pop 4.5s infinite; }
.stars i:nth-child(2)::after { animation-delay: .22s; }
.stars i:nth-child(3)::after { animation-delay: .44s; }
.stars i:nth-child(4)::after { animation-delay: .66s; }
.stars i:nth-child(5)::after { animation-delay: .88s; }
@keyframes stars-pop {
  0% { transform: scale(0); animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  7% { transform: scale(1.35); animation-timing-function: ease-out; }
  11% { transform: scale(.92); }
  14%, 74% { transform: scale(1); }
  80%, 100% { transform: scale(0); }
}

/* C7 ticker above the bottom bar (cream box, black text) */
.ticker { flex: none; position: relative; margin: 8px var(--gutter) 8px; height: 34px; overflow: hidden; border-radius: 6px; background: var(--cream); }
.ticker-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; align-items: center; white-space: nowrap; padding-left: 100%; animation: ticker-move var(--ticker-s, 14s) linear infinite; }
.ticker-track span { font: 400 17px/1 var(--font-ui); color: #111; }
@keyframes ticker-move { to { transform: translateX(-100%); } }

/* ---------- D1: spring / inertia motion ---------- */
.app dialog[open] { animation: dlg-in .42s var(--spring); }
.app dialog[open]::backdrop { animation: atu-fade .22s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.9); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.app dialog button { transition: transform .28s var(--spring), filter .15s; }
.app dialog button:active { transform: scale(.94); filter: brightness(.92); transition-duration: .08s; }
#toast:not([hidden]) { animation: toast-in .5s var(--spring); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 26px) scale(.86); } to { opacity: 1; transform: translate(-50%, 0); } }
.sheet-stack { animation: sheet-in .52s cubic-bezier(.2, 1.35, .35, 1); }
@keyframes sheet-in { from { transform: translateY(70px) scale(.96); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
.nav button[aria-current="page"] svg { animation: nav-pop .45s var(--spring); }
@keyframes nav-pop { from { transform: scale(.7) translateY(3px); } to { transform: none; } }
.frame { transition: width .45s var(--spring), height .45s var(--spring); }
.verify-bar, .card { will-change: transform; }

/* D2 sound switch (Profile) */
.sound-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 4px 12px; border-radius: var(--radius); background: #161616; border: 1px solid #333; }
.sound-name { font: 700 15px/1.15 var(--font-btn); letter-spacing: .4px; text-transform: uppercase; }
.sound-name small { display: block; font: 400 11px var(--font-text); color: #999; text-transform: none; letter-spacing: 0; }
.sound-row .switch-track { background: #555; }
.sound-row .switch input:checked + .switch-track { background: var(--green-deep); }

/* ======================= Owner Home sheet rev. 2 (docs/sheets/home-rev2.jpg) ======================= */
/* Name: salutation + full name; two lines when long (salutation above), then smaller, then "…" */
#hub .greet { align-items: flex-start; gap: 12px; }
#hub .greet-name { flex: 1 1 auto; min-width: 0; }
.hub-name { display: block; white-space: nowrap; overflow: hidden; font-size: clamp(34px, 10.5vw, 44px); line-height: .98; }
.hub-name.two .sal, .hub-name.two .full { display: block; }
.hub-name.two .full { overflow: hidden; text-overflow: ellipsis; }
#hub .checkin { padding-top: 4px; font-family: var(--font-btn); }
#hub .checkin small { font-size: 8px; }
#hub .checkin strong { font-size: 13px; letter-spacing: .2px; }
#hub .checkin span { font-size: 10px; }
#hub .checkin span.prev-at { font-size: 10px; }
#hub .profile-line { margin-top: 5px; font: 700 12px/1.2 var(--font-btn); letter-spacing: .3px; }

/* ticker on top, verify bar below it */
.ticker { margin: 10px 0 0; height: 30px; }
.ticker-track span { font-size: 15px; }
.verify-bar { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 10px; margin: 8px 0 0; padding: 7px 12px; min-height: 46px; }
.verify-bar b { font: 700 19px/1 var(--font-btn); letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.verify-bar img { width: 24px; height: 24px; }
.verify-bar small { margin: 0; text-align: right; font: 400 11.5px/1.15 var(--font-text); color: #222; }
.verify-bar i { font-size: 22px; }

/* section labels: red triangle + condensed bold */
#hub .section-label { display: flex; align-items: center; gap: 7px; margin: 12px 0 7px; font: 700 15px/1 var(--font-btn); letter-spacing: .4px; text-transform: uppercase; }
#hub .section-label::before { content: ""; width: 0; height: 0; border-left: 9px solid var(--red); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* cards: icon + title on one row, subtitle below */
#hub .card-body { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon title" "sub sub"; align-items: end; column-gap: 12px; padding: 12px 12px 12px 20px; }
#hub .card-body > svg { grid-area: icon; width: 50px; height: 44px; }
#hub .card-title { grid-area: title; margin: 0; font-size: clamp(30px, 9vw, 38px); line-height: .9; }
#hub .card-sub { grid-area: sub; margin-top: 6px; font-size: clamp(12px, 3.8vw, 15px); }
#hub .card--photo { min-height: 112px; }
#hub #profileCard, #hub #rateCard { min-height: 88px; }
#hub #profileCard .card-body > svg { width: 40px; height: 36px; }
#hub #profileCard .card-title { font-size: clamp(28px, 8.4vw, 34px); }
#hub .card--rate .card-body { grid-template-areas: "stars stars" "title title" "sub sub"; }
#hub .card--rate .stars { grid-area: stars; margin-bottom: 6px; }
#hub .card--rate .card-title { font-size: clamp(28px, 8.4vw, 34px); }
.hub-end { height: 14px; flex: none; }

/* stars: pop 1 → 5, hold, all fade to grey together, repeat */
@keyframes stars-pop-1 {
  0%, 0.00% { transform: scale(0); opacity: 1; animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  4.44% { transform: scale(1.35); animation-timing-function: ease-out; }
  7.11% { transform: scale(.9); }
  10.00%, 77.78% { transform: scale(1); opacity: 1; }
  86.67% { transform: scale(1); opacity: 0; }
  87.78%, 100% { transform: scale(0); opacity: 0; }
}
.stars i:nth-child(1)::after { animation: stars-pop-1 4.5s infinite; animation-delay: 0s; }
@keyframes stars-pop-2 {
  0%, 5.56% { transform: scale(0); opacity: 1; animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  10.00% { transform: scale(1.35); animation-timing-function: ease-out; }
  12.67% { transform: scale(.9); }
  15.56%, 77.78% { transform: scale(1); opacity: 1; }
  86.67% { transform: scale(1); opacity: 0; }
  87.78%, 100% { transform: scale(0); opacity: 0; }
}
.stars i:nth-child(2)::after { animation: stars-pop-2 4.5s infinite; animation-delay: 0s; }
@keyframes stars-pop-3 {
  0%, 11.11% { transform: scale(0); opacity: 1; animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  15.56% { transform: scale(1.35); animation-timing-function: ease-out; }
  18.22% { transform: scale(.9); }
  21.11%, 77.78% { transform: scale(1); opacity: 1; }
  86.67% { transform: scale(1); opacity: 0; }
  87.78%, 100% { transform: scale(0); opacity: 0; }
}
.stars i:nth-child(3)::after { animation: stars-pop-3 4.5s infinite; animation-delay: 0s; }
@keyframes stars-pop-4 {
  0%, 16.67% { transform: scale(0); opacity: 1; animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  21.11% { transform: scale(1.35); animation-timing-function: ease-out; }
  23.78% { transform: scale(.9); }
  26.67%, 77.78% { transform: scale(1); opacity: 1; }
  86.67% { transform: scale(1); opacity: 0; }
  87.78%, 100% { transform: scale(0); opacity: 0; }
}
.stars i:nth-child(4)::after { animation: stars-pop-4 4.5s infinite; animation-delay: 0s; }
@keyframes stars-pop-5 {
  0%, 22.22% { transform: scale(0); opacity: 1; animation-timing-function: cubic-bezier(.3, 1.8, .5, 1); }
  26.67% { transform: scale(1.35); animation-timing-function: ease-out; }
  29.33% { transform: scale(.9); }
  32.22%, 77.78% { transform: scale(1); opacity: 1; }
  86.67% { transform: scale(1); opacity: 0; }
  87.78%, 100% { transform: scale(0); opacity: 0; }
}
.stars i:nth-child(5)::after { animation: stars-pop-5 4.5s infinite; animation-delay: 0s; }

/* camera: jumps out of the card (press) / wanders as a pet after 1 min idle */
.cam-free { position: fixed; z-index: 40; pointer-events: none; will-change: transform; }
.cam-free.cam-pet { pointer-events: auto; cursor: pointer; filter: drop-shadow(0 6px 6px rgba(0,0,0,.45)); touch-action: none; }
.cam-free.cam-pet.bump { animation: pet-bump .32s var(--spring); }
@keyframes pet-bump { 40% { scale: 1.25 .78; } 100% { scale: 1 1; } }
.cam-free.cam-home { transition: transform .5s var(--spring); }
.cam-free.cam-jump { animation: cam-jump 1.15s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes cam-jump {
  0% { transform: none; }
  12% { transform: translateY(6px) scale(1.15, .8); }
  38% { transform: translateY(-110px) rotate(-14deg) scale(1.25); }
  52% { transform: translateY(-122px) rotate(12deg) scale(1.3); }
  74% { transform: translateY(-40px) rotate(-4deg) scale(1.6); opacity: 1; }
  100% { transform: translateY(40px) scale(3.2); opacity: 0; }
}

/* ======================= Studio + Preview sheet rev. 2 ======================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Bug fix (Owner): one finger inside the frame scrolls the page; two fingers edit. The frame used to block panning. */
.frame, .frame canvas { touch-action: pan-y; }
/* Deboss (pressed into the panel), not emboss/shadow — editor frame and preview view */
.frame { background: #efefef; box-shadow: inset 3px 3px 0 #22302a, inset -2px -2px 0 #fff, 1px 1px 0 #fff; }
.frame::after { box-shadow: inset 3px 3px 0 rgba(20, 32, 26, .9), inset 4px 4px 6px rgba(0,0,0,.18); }
.frame-empty svg { fill: #9a9a9a; filter: none; }
.frame-empty b { color: #555; }

.preview { padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
.sheet { padding: 14px 16px 12px; }
.sheet-head { gap: 14px; margin-bottom: 8px; }
.sheet-head h2, .sheet h2 { display: flex; align-items: center; gap: 9px; font: 700 20px/1 var(--font-btn); letter-spacing: .4px; }
.sheet-head h2::before { content: ""; width: 14px; height: 14px; background: var(--red); flex: none; }
.zoom-slider { flex: 1; display: flex; align-items: center; }
.zoom-slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; background: #cfcfcd; outline: none; margin: 0; }
.zoom-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: grab;
  background: #f3f3f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='m15 15 5 5'/%3E%3C/svg%3E") center / 22px no-repeat; transition: transform .25s var(--spring); }
.zoom-slider input:active::-webkit-slider-thumb { transform: scale(1.18); }
.zoom-slider input::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f3f3f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='m15 15 5 5'/%3E%3C/svg%3E") center / 22px no-repeat; }
.zoom-slider input:focus-visible { box-shadow: 0 0 0 3px var(--red); }
.render { border-radius: 10px; background: #ececea; box-shadow: inset 3px 3px 0 #22302a, inset -2px -2px 0 #fff; }
.render img { image-rendering: auto; box-shadow: none; border: 0; }
.sheet-actions { margin-top: 10px; }
.sheet-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; }
.sheet-row .btn { flex: 0 0 40%; min-height: 38px; background: #6b6b6b; color: #fff; box-shadow: none; font-size: 14px; }
.sheet .status { margin: 8px 0 0; min-height: 0; max-height: 34px; padding: 6px 9px; font-size: 10px; line-height: 1.3; }

/* ======================= D: dialogs slide up; more reactive UI ======================= */
.app dialog[open] { animation: dlg-up .46s cubic-bezier(.2, 1.25, .35, 1); }
@keyframes dlg-up { from { opacity: 0; transform: translateY(64px) scale(.97); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
/* touch ripple */
.btn, .card, .tool, .nav button, .app dialog button, .verify-bar { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .22; transform: scale(0); animation: ripple .55s ease-out forwards; }
.card .ripple { background: #000; opacity: .08; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* fields lift on focus, choices pop when picked */
.input-wrap, .plain, .comment { transition: box-shadow .18s var(--ease), transform .25s var(--spring); }
.input-wrap:focus-within, .comment:focus-within { transform: translateY(-2px); }
.yes input:checked, .district input:checked, .ratio input:checked { animation: pick-pop .34s var(--spring); }
@keyframes pick-pop { 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.shake { animation: shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-7px); } 50% { transform: translateX(7px); } }
.tool.is-done { animation: pick-pop .34s var(--spring); }
.nav { grid-template-columns: repeat(6, 1fr); padding-left: 2px; padding-right: 2px; } .nav button { font-size: 9.5px; letter-spacing: .2px; } .nav button svg { width: 23px; height: 23px; }
#hub .body > * { flex: none; }
.verify-bar { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; }
.verify-bar b { font-size: clamp(14px, 4.4vw, 18px); }
.verify-bar small { font-size: clamp(9.5px, 2.9vw, 11px); line-height: 1.12; }
#hub .card--rate .card-body { grid-template-columns: 1fr; grid-template-areas: "stars" "title" "sub"; justify-items: start; }
#hub .profile-line { font-size: 11.5px; }
#hub .card-sub { font-size: clamp(11px, 3.5vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ✓ IMAGE DOWNLOADED dialog (Owner sheet) */
.app dialog.saved { text-align: center; width: min(82vw, 320px); }
.saved-icons { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 12px; }
.saved-icons svg { width: 40px; height: 40px; }
.saved-icons .ok { color: #3cc84a; animation: pick-pop .5s var(--spring) .1s both; }
.saved-icons .dl { color: #fff; animation: dl-drop .6s var(--spring) .2s both; }
.saved-icons i { width: 10px; height: 3px; background: var(--red); border-radius: 2px; }
@keyframes dl-drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.app dialog.saved h2 { font: 700 18px/1.1 var(--font-btn); letter-spacing: .5px; margin-bottom: 16px; }

/* ======================= Rev. 3 (Owner 10 Nov 2026) ======================= */
.pre { white-space: pre-line; }
/* Field focus: subtle yellow glow on the inside edge (no red outline) */
.input-wrap:focus-within, .comment:focus-within { box-shadow: inset 0 0 0 1.5px #f2b53d, inset 0 0 9px rgba(242, 181, 61, .45); }
.plain:focus { outline: none; box-shadow: inset 0 0 0 1.5px #f2b53d, inset 0 0 9px rgba(242, 181, 61, .45); }
/* CPI warning */
.cpi-warning { margin: 14px 0 -6px; font: 700 12.5px/1.25 var(--font-btn); letter-spacing: .3px; color: var(--yellow); text-transform: uppercase; }
.cpi-warning::before { content: "⚠ "; }
/* Profile + Rate: same, slightly smaller height */
#hub #profileCard, #hub #rateCard { min-height: 0; height: 92px; }
#hub #profileCard .card-body, #hub #rateCard .card-body { padding-top: 8px; padding-bottom: 8px; align-content: center; }
#hub .card--rate .stars { height: 22px; margin-bottom: 3px; }
#hub .card--rate .stars i { width: 22px; height: 22px; }
#hub .card--rate .card-title, #hub #profileCard .card-title { font-size: clamp(26px, 7.8vw, 32px); }
#hub .card--rate .card-sub, #hub #profileCard .card-sub { margin-top: 4px; }
/* Battery wave: path = 2 wave periods, element 200% wide, slide exactly one period → seamless loop */
.card-bar--wave .wave { width: 200%; animation: wave-slide 1.4s linear infinite; }
@keyframes wave-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Ticker: two identical halves loop seamlessly */
.ticker-track { padding-left: 0; animation-name: ticker-loop; animation-timing-function: linear; animation-iteration-count: infinite; }
.ticker-unit { display: inline-flex; flex: none; }
.ticker-unit span { padding-right: 2.2em; font: 400 15px/1 var(--font-ui); color: #111; white-space: nowrap; }
@keyframes ticker-loop { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Camera pet: grey ghost stays in the card; hop, then run right pulling the Studio page */
#hub .cam-icon.ghost { animation: none; opacity: .28; filter: grayscale(1); }
.cam-free.cam-hop { animation: cam-hop .52s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes cam-hop { 0% { transform: none; } 25% { transform: translateY(5px) scale(1.15, .8); } 70% { transform: translateY(-46px) rotate(-10deg) scale(1.15); } 100% { transform: translateY(-30px) rotate(6deg); } }
#photo.pull-in { animation: pull-in .62s cubic-bezier(.5, 0, .2, 1); }
@keyframes pull-in { from { transform: translateX(-100%); } to { transform: none; } }
/* Snappier springy motion */
.app { --spring: cubic-bezier(.3, 1.6, .55, 1); }
.btn, .card, .tool, .nav button, .app dialog button { transition-duration: .22s; }
.btn:active:not(:disabled), .tool:active, .card:active:not(:disabled), .nav button:active:not(:disabled) { transform: scale(.94); transition-duration: .06s; }
.app dialog[open] { animation-duration: .36s; }
/* Image downloaded: download arrow first, then it turns into the check (same place, one after the other) */
.saved-icons { position: relative; width: 52px; height: 52px; margin: 4px auto 12px; }
.saved-icons i { display: none; }
.saved-icons svg { position: absolute; inset: 0; width: 52px; height: 52px; }
.saved-icons .dl { animation: dl-then-out 1.1s var(--ease) both; }
.saved-icons .ok { animation: ok-in .5s var(--spring) .95s both; }
@keyframes dl-then-out { 0% { transform: translateY(-16px); opacity: 0; } 25% { transform: none; opacity: 1; } 45% { transform: translateY(4px); } 60% { transform: none; } 80% { transform: none; opacity: 1; } 100% { transform: scale(.4); opacity: 0; } }
@keyframes ok-in { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
/* Notice pop-up (print failed etc.) */
.app dialog.notice { text-align: center; }
.notice-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--red-deep); color: #fff; font: 800 26px/1 var(--font-btn); animation: pick-pop .5s var(--spring) .1s both; }
.app dialog.notice p { color: #eee; }
