:root {
    --green: #16a245;
    --green-dark: #0f7a33;
    --green-soft: #e3f5ea;
    --ink: #1f2a24;
    --muted: #5d6b63;
    --line: #d6ddd8;
    --danger: #b42318;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: #f6f8f7;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }

.page { max-width: 1100px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.25rem; }
.notice { padding: 12px 16px; border-radius: 8px; background: var(--green-soft); border: 1px solid var(--green); }

/* Large screens (kiosk, call, monitor) scale with the display */
.screen .page { max-width: none; min-height: 100vh; align-items: center; justify-content: center; text-align: center; }
.screen h1 { font-size: clamp(1.75rem, 4vw, 3.5rem); letter-spacing: .05em; }

/* Device home (/): pairing screen split in two, and the screen chooser in 2-3 columns. Uses the whole display. */
body.split-page { background: #f6f8f7; }
.split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 4vh; padding: 5vh 4vw; background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%); color: #fff; }
.split-hero .brand { font-size: clamp(1rem, 1.5vw, 1.75rem); }
.pair-box { display: flex; flex-direction: column; gap: 2vh; }
.pair-label { font-size: clamp(1rem, 1.6vw, 2rem); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.pair-code { font-size: clamp(3.5rem, 9vw, 11rem); font-weight: 800; letter-spacing: .06em; line-height: 1; font-variant-numeric: tabular-nums; }
.pair-status { display: inline-flex; align-items: center; gap: .6em; align-self: flex-start; padding: .5em 1em; border-radius: 99px; background: rgba(255, 255, 255, .16); font-size: clamp(.95rem, 1.3vw, 1.6rem); }
.pair-status::before { content: ""; width: .6em; height: .6em; border-radius: 50%; background: #f5b400; animation: pair-wait 1.4s ease-in-out infinite; }
@keyframes pair-wait { 50% { opacity: .3; } }
.split-foot { font-size: clamp(.85rem, 1vw, 1.25rem); opacity: .8; }
.split-body { display: flex; flex-direction: column; justify-content: center; gap: 3vh; padding: 5vh 5vw; }
.split-body h1 { font-size: clamp(1.75rem, 3vw, 3.5rem); line-height: 1.15; }
.split-body .lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.75rem); max-width: 40em; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2.4vh; counter-reset: step; }
.steps li { position: relative; padding: 2.2vh 2vw 2.2vh calc(2vw + 3.2em); background: #fff; border: 1px solid var(--line); border-radius: 14px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 1.6vw; top: 2.2vh; width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); font-weight: 800; }
.steps h2 { font-size: clamp(1.05rem, 1.5vw, 1.75rem); margin-bottom: .3em; }
.steps p { color: var(--muted); font-size: clamp(.95rem, 1.15vw, 1.4rem); }
.steps-url { display: inline-block; margin-top: .6em; font-size: clamp(1rem, 1.3vw, 1.6rem); font-weight: 700; color: var(--green-dark); word-break: break-all; }

.chooser { min-height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 32px 40px; }
.chooser-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.chooser-header > div { text-align: right; }
.chooser-header h1 { font-size: 1.75rem; }
/* Fixed-size buttons in rows from the left, so 2 or 5 roles look the same and never stretch. */
.chooser-grid { display: grid; grid-template-columns: repeat(auto-fill, 300px); gap: 20px; justify-content: start; }
@media (max-width: 680px) { .chooser-grid { grid-template-columns: 1fr; } }
.chooser-card {
    --tint: var(--green); --tint-dark: var(--green-dark);
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
    height: 150px; padding: 18px 64px 18px 20px; border-radius: 14px; border: 0;
    background: linear-gradient(150deg, var(--tint) 0%, var(--tint-dark) 100%); color: #fff;
    text-decoration: none; cursor: pointer; user-select: none;
    box-shadow: 0 5px 0 var(--tint-dark), 0 10px 20px rgba(0, 0, 0, .12);
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.chooser-card:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 7px 0 var(--tint-dark), 0 14px 26px rgba(0, 0, 0, .16); }
.chooser-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tint-dark), 0 4px 10px rgba(0, 0, 0, .12); }
.chooser-card:focus-visible { outline: 4px solid #f5b400; outline-offset: 4px; }
.chooser-name { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.chooser-about { font-size: .875rem; line-height: 1.35; opacity: .9; }
.chooser-path { font-size: .78rem; font-weight: 600; opacity: .7; }
/* Arrow button in the corner, so the card reads as something to press. */
.chooser-card::after { content: "→"; position: absolute; right: 16px; bottom: 16px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--tint-dark); font-size: 1.15rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.chooser-kiosk { --tint: #0284c7; --tint-dark: #075985; }
.chooser-call { --tint: #d97706; --tint-dark: #92400e; }
.chooser-monitor { --tint: #16a245; --tint-dark: #0f7a33; }
.chooser-farmasi { --tint: #0d9488; --tint-dark: #115e59; }
.chooser-label { --tint: #7c3aed; --tint-dark: #5b21b6; }

.big-button {
    width: min(90vw, 900px);
    padding: 4vh 24px;
    border: 0;
    border-radius: 16px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    box-shadow: 0 6px 0 var(--green-dark);
}
.big-button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--green-dark); }
a.big-button { display: block; text-decoration: none; text-align: center; }
.big-button:disabled { opacity: .6; cursor: wait; }
.big-button:focus-visible, .button:focus-visible { outline: 4px solid #f5b400; outline-offset: 4px; }
.kiosk-buttons { display: flex; flex-direction: column; gap: 4vh; align-items: center; }

.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); padding: 24px; }
.modal-card { background: #fff; border-radius: 16px; padding: 32px 48px; display: flex; flex-direction: column; gap: 12px; text-align: center; font-size: 1.5rem; max-width: 720px; }
.modal-number { font-size: clamp(4rem, 12vw, 9rem); font-weight: 700; line-height: 1; }
.modal-card hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.modal-card .modal-close { align-self: center; margin-top: 8px; padding: 16px 56px; font-size: 1.5rem; letter-spacing: .08em; }

/* Call screen */
.call-now { font-size: clamp(3rem, 8vw, 7rem); font-weight: 700; }

/* Monitor TV: fills the screen exactly, never scrolls. Sizes follow the screen (vh/vw) or the card (cq*). */
body.tv-page { background: #eef3f0; overflow: hidden; }
.tv { --muted: #46544c; --accent: var(--green); --accent-dark: var(--green-dark); --accent-soft: var(--green-soft); height: 100vh; display: flex; flex-direction: column; gap: 2.5vh; padding: 3vh 3vw; }
.tv-header { display: flex; align-items: center; justify-content: space-between; }
.tv-header .brand { font-size: clamp(1rem, 1.7vw, 2.25rem); gap: 1vw; }
.tv-header .brand img { width: clamp(32px, 3.2vw, 72px); height: auto; }
.tv-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.tv-time { font-size: clamp(1.5rem, 3vw, 4rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.tv-date { font-size: clamp(.8rem, 1.1vw, 1.5rem); color: var(--muted); }
.tv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3vh; }
.tv-section { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.8vh; }
.tv-title { display: flex; align-items: center; gap: .6em; font-size: clamp(1.25rem, 2.2vw, 3rem); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); }
.tv-title::before { content: ''; width: .35em; height: 1.1em; border-radius: 99px; background: var(--accent); }

.tv-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 2.2vmin; }
.tv-card {
    container-type: size;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3cqh;
    overflow: hidden;
    border-radius: 2.6vmin;
    background: #fff;
    border: 1px solid #e0e8e3;
    box-shadow: 0 1px 2px rgba(16, 60, 35, .05), 0 10px 30px rgba(16, 60, 35, .07);
    transition: background-color .4s, color .4s;
}
.tv-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: max(4px, 2cqh); background: var(--accent); }
.tv-card-label { font-size: min(13cqh, 9cqw); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tv-card-label b { color: var(--ink); font-weight: 800; }
.tv-card-number { font-size: min(50cqh, 32cqw); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #0b1f14; }
.tv-card-note { font-size: min(8cqh, 5.5cqw); font-weight: 600; color: var(--muted); }
.tv-card.is-empty .tv-card-number { color: #b9c6bf; }
.tv-card.is-new { background: var(--accent); border-color: var(--accent); color: #fff; animation: tv-called 1.4s ease-in-out 3; }
.tv-card.is-new::before { background: #f5b400; }
.tv-card.is-new .tv-card-label, .tv-card.is-new .tv-card-label b, .tv-card.is-new .tv-card-number, .tv-card.is-new .tv-card-note { color: #fff; }
@keyframes tv-called { 50% { box-shadow: 0 0 0 1.6vmin rgba(22, 162, 69, .28); } }
.tv-status:empty { display: none; }
.tv-status { position: fixed; left: 50%; bottom: 2vh; transform: translateX(-50%); padding: .6em 1.2em; border-radius: 99px; background: var(--danger); color: #fff; font-size: clamp(.9rem, 1.2vw, 1.5rem); }

/* Numbers already called on this screen, newest first. */
.tv-history { display: flex; align-items: center; gap: 1.6vw; padding: 1.6vh 1.8vw; border-radius: 2vmin; background: #fff; border: 1px solid #e0e8e3; }
.tv-history-title { font-size: clamp(1rem, 1.6vw, 2.25rem); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tv-history-list { display: flex; gap: 1.2vw; overflow: hidden; }
.tv-history-item { display: flex; align-items: baseline; gap: .5em; padding: .25em .8em; border-radius: 1.2vmin; background: #f1f5f3; white-space: nowrap; }
.tv-history-item b { font-size: clamp(1.5rem, 3vw, 4.25rem); font-weight: 800; font-variant-numeric: tabular-nums; color: #0b1f14; }
.tv-history-item span { font-size: clamp(.9rem, 1.4vw, 2rem); font-weight: 600; color: var(--muted); }
.tv-history-empty { font-size: clamp(1rem, 1.6vw, 2.25rem); color: var(--muted); }
/* Pharmacy TV: its own colour (teal) and layout, so it never looks like the counter screen. */
.tv-farmasi { --accent: #0f766e; --accent-dark: #115e59; --accent-soft: #ccfbf1; }
body.tv-page:has(.tv-farmasi) { background: #ecf5f4; }
.tv-header strong { color: var(--accent-dark); }
.rx { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 2.2vmin; }
.rx-now {
    grid-row: 1 / 3;
    container-type: size;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh;
    border-radius: 2.6vmin; background: var(--accent); color: #fff; text-align: center;
    box-shadow: 0 10px 30px rgba(15, 118, 110, .25);
}
.rx-now-label { font-size: min(8cqh, 8cqw); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.rx-now-number { font-size: min(42cqh, 45cqw); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rx-now-place { font-size: min(8.5cqh, 8cqw); font-weight: 600; padding: .35em 1em; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.rx-now.is-empty .rx-now-number { opacity: .45; }
.rx-now.is-empty .rx-now-place { background: none; }
.rx-now.is-new { animation: rx-called 1.4s ease-in-out 3; }
.rx-now.is-new::after { content: "Baru dipanggil"; font-size: min(4.5cqh, 5cqw); font-weight: 700; color: #3b2f00; background: #f5b400; padding: .3em .9em; border-radius: 99px; }
@keyframes rx-called { 50% { box-shadow: 0 0 0 1.6vmin rgba(15, 118, 110, .3); } }

.rx-list { min-height: 0; display: flex; flex-direction: column; gap: 1.2vh; background: #fff; border: 1px solid #d5e6e4; border-radius: 2.6vmin; padding: 2.2vh 1.6vw; }
.rx-count { margin-left: auto; min-width: 1.8em; padding: .1em .6em; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); text-align: center; letter-spacing: 0; }
.rx-count:empty { display: none; }
.rx-hint { color: var(--muted); font-size: clamp(1rem, 1.4vw, 2rem); margin-top: -.6vh; }
.rx-tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-auto-rows: minmax(0, 10vh); gap: 1.2vmin; align-content: start; overflow: hidden; }
.rx-tile { display: flex; align-items: center; justify-content: center; border-radius: 1.4vmin; background: #eef3f2; font-size: clamp(1.75rem, 3.6vw, 5.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.rx-tiles.ready .rx-tile { background: var(--accent-soft); color: var(--accent-dark); }
.rx-empty { grid-column: 1 / -1; align-self: center; color: var(--muted); font-size: clamp(.9rem, 1.2vw, 1.6rem); }

.rx-recent { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2vw; padding: 1.4vh 1.6vw; border-radius: 2vmin; background: rgba(255, 255, 255, .6); }
.rx-recent-title { font-size: clamp(1rem, 1.6vw, 2.25rem); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rx-recent-list { display: flex; gap: .8vw; overflow: hidden; }
.rx-chip { padding: .2em .8em; border-radius: 99px; background: #fff; border: 1px solid #d5e6e4; font-size: clamp(1.5rem, 2.8vw, 4rem); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }

/* Label page */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.log { margin: 0; padding-left: 20px; color: var(--muted); }

/* Shared controls (admin, label) */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 1px 2px rgba(16, 60, 35, .04); }
.card h2 { font-size: 1.15rem; }
.button { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; padding: 10px 18px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.2; }
.button:hover { background: var(--green-dark); border-color: var(--green-dark); }
.button.secondary { background: #fff; color: var(--green-dark); border-color: var(--line); }
.button.secondary:hover { border-color: var(--green); background: var(--green-soft); }
.button.danger { background: #fff; color: var(--danger); border-color: #f1c8c4; }
.button.danger:hover { background: #fdf0ef; border-color: var(--danger); }
.button.small { padding: 6px 12px; font-size: .875rem; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notice.warn { background: #fff7e0; border-color: #f5b400; }
code { background: #eef1ef; padding: 2px 8px; border-radius: 6px; font-size: 1rem; }

/* Admin */
.admin { max-width: 1240px; margin: 0 auto; padding: 24px 24px 48px; display: flex; flex-direction: column; gap: 20px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.admin-title h1 { font-size: 1.6rem; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.form-card { position: sticky; top: 16px; }
@media (max-width: 960px) { .form-card { position: static; } }

.pending { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #f6f8f7; }
.pending-code { font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; background: #fff; border: 1px solid var(--line); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; min-width: 0; }
.form-row .field-code { flex: 0 0 9.5rem; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.form input:not([type=checkbox]), .form select { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; background: #fff; }
.form input:focus, .form select:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.form input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); flex: none; }

.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.group legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: .95rem; }
.group legend .muted { font-weight: 400; font-size: .85rem; margin-left: 4px; }
.role-settings { padding: 14px 16px; border-radius: 10px; background: #f6f8f7; border: 1px solid #e6ece8; }
.role-settings legend { margin-bottom: 8px; }

.role-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .95rem; background: #fff; }
.role-option:hover { border-color: var(--green); }
.role-option:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.role-option:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.label-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: center; gap: 10px; }

.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.device { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.device.is-editing { border-color: var(--green); background: var(--green-soft); }
.device-head { grid-column: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.device-name { font-size: 1.05rem; }
.device-seen { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.device-seen::before { content: ; width: 8px; height: 8px; border-radius: 50%; background: #b9c4be; }
.device-seen.is-online { color: var(--green-dark); font-weight: 600; }
.device-seen.is-online::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.device-roles { grid-column: 1; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; margin: 0; align-items: center; }
.device-roles dd { margin: 0; color: var(--muted); font-size: .9rem; }
.device-actions { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 6px; align-items: flex-start; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #eef1ef; color: var(--ink); }
.badge-kiosk { background: #e0f2fe; color: #075985; }
.badge-call { background: #fef3c7; color: #92400e; }
.badge-monitor { background: var(--green-soft); color: var(--green-dark); }
.badge-farmasi { background: #ccfbf1; color: #115e59; }
.badge-label { background: #ede9fe; color: #5b21b6; }

/* Queue ticket for 80mm thermal paper (72mm printable). Black only: thermal printers have no grey. */
.print-ticket {
    display: none;
    width: 72mm;
    margin: 0 auto;
    padding-top: 3mm;
    background: #fff;
    color: #000;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
/* Rendered off-screen for a moment so the paper length can match the ticket. */
.print-ticket.is-measuring { display: block; position: absolute; top: 0; left: -200mm; visibility: hidden; }
.ticket-big { margin: 2mm 0; padding: 2mm 0; border-top: 1mm double #000; border-bottom: 1mm double #000; font-size: 54pt; line-height: 1.1; }
.ticket-date { margin-top: 2mm; }

@media print {
    html, body { width: 80mm; min-height: 0; background: #fff; }
    body > *:not(main), main > *:not(.print-ticket) { display: none !important; }
    main.page { display: block; min-height: 0; padding: 0; }
    .print-ticket { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .big-button:active { transform: none; }
    .tv-card.is-new, .rx-now.is-new, .pair-status::before { animation: none; }
    .chooser-card { transition: none; }
}
