:root {
  --orange: #ee4d2d;
  --orange-dark: #d73e1f;
  --peach: #fff2ed;
  --ink: #202020;
  --muted: #707070;
  --line: #e9e6e3;
  --surface: #ffffff;
  --bg: #f8f7f5;
  --green: #16885f;
  --shadow: 0 24px 70px rgba(43, 32, 26, 0.12);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, select, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.shell { min-height: 100vh; }
.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 76px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.04em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--orange); border-radius: 10px; font-size: 18px; }
.brand small { color: var(--muted); font-family: "DM Sans", sans-serif; font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.back-link { color: var(--muted); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }

.home { max-width: 1180px; margin: 0 auto; padding: clamp(48px, 8vw, 100px) 24px; }
.eyebrow { color: var(--orange); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { max-width: 800px; margin: 16px 0 20px; font: 800 clamp(40px, 7vw, 76px)/.98 Manrope, sans-serif; letter-spacing: -.065em; }
.hero p { max-width: 650px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.dashboard-link { width: min(650px, 100%); margin-top: 30px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 30px rgba(40,30,24,.05); transition: .18s ease; }
.dashboard-link:hover { transform: translateY(-2px); border-color: var(--orange); }
.dashboard-link span { display: flex; flex-direction: column; gap: 3px; }
.dashboard-link strong { font: 800 17px Manrope, sans-serif; }
.dashboard-link small { color: var(--muted); }
.dashboard-link b { color: var(--orange); font-size: 24px; }
.environment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 54px; }
.environment-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: 0 8px 30px rgba(40,30,24,.05); }
.environment-card:nth-child(2) { background: #262320; color: white; border-color: #262320; }
.env-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.env-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--peach); color: var(--orange); font-size: 24px; }
.environment-card:nth-child(2) .env-icon { background: rgba(255,255,255,.1); }
.environment-card h2 { margin: 28px 0 7px; font: 800 28px/1.1 Manrope, sans-serif; letter-spacing: -.04em; }
.environment-card p { color: var(--muted); }
.environment-card:nth-child(2) p { color: #bdb8b3; }
.counter-badge { padding: 8px 12px; border-radius: 99px; background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 700; }
.environment-card:nth-child(2) .counter-badge { background: rgba(255,255,255,.1); color: #ddd7d2; }
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; }
.action { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; font-weight: 700; transition: .18s ease; }
.action:hover { transform: translateY(-2px); border-color: var(--orange); color: var(--orange); }
.environment-card:nth-child(2) .action { border-color: #49443f; color: white; }
.environment-card:nth-child(2) .action:hover { border-color: var(--orange); color: #ff8d72; }

.panel-page { min-height: calc(100vh - 72px); padding: clamp(24px, 5vw, 64px); }
.panel-wrap { width: min(1040px, 100%); margin: 0 auto; }
.dashboard-wrap { width: min(1180px, 100%); margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.page-heading h1 { margin: 5px 0 0; font: 800 clamp(30px, 5vw, 48px)/1 Manrope, sans-serif; letter-spacing: -.055em; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 99px; background: #e9f7f1; color: var(--green); font-size: 13px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(22,136,95,.12); }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.logout-button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--muted); font-size: 13px; font-weight: 700; }
.dashboard-filters { display: flex; align-items: end; gap: 14px; margin-bottom: 20px; }
.dashboard-filters label { min-width: 190px; display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dashboard-filters input, .dashboard-filters select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); outline: none; }
.dashboard-filters input:focus, .dashboard-filters select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--peach); }
.export-button { min-height: 46px; margin-left: auto; padding: 0 18px; border: 0; border-radius: 11px; background: var(--ink); color: white; font-weight: 800; }
.export-button:disabled { opacity: .45; cursor: wait; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric-card { min-height: 154px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 20px; background: white; }
.metric-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-card strong { margin: 14px 0 8px; font: 800 clamp(30px, 4vw, 46px)/1 Manrope, sans-serif; letter-spacing: -.055em; }
.metric-card small { margin-top: auto; color: var(--muted); line-height: 1.35; }
.metric-primary { background: var(--orange); border-color: var(--orange); color: white; }
.metric-primary span, .metric-primary small { color: rgba(255,255,255,.78); }
.dashboard-explanation { margin-top: 20px; display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.dashboard-explanation strong { font: 800 18px Manrope, sans-serif; }
.dashboard-explanation p { margin: 0; color: var(--muted); line-height: 1.55; }
.dashboard-table-card { margin-top: 20px; }
.table-heading h2 { margin: 6px 0 18px; font: 800 27px Manrope, sans-serif; }
.table-scroll { overflow-x: auto; }
.dashboard-table-card table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.dashboard-table-card th, .dashboard-table-card td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.dashboard-table-card th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.dashboard-table-card tbody tr:last-child td { border-bottom: 0; }
.dashboard-empty { padding: 44px 20px; color: var(--muted); text-align: center; }
.auth-loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.auth-page { display: grid; place-items: center; }
.login-card { width: min(440px, 100%); padding: clamp(28px, 5vw, 42px); border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.login-card h1 { margin: 10px 0 12px; font: 800 clamp(30px, 5vw, 42px)/1.05 Manrope, sans-serif; letter-spacing: -.05em; }
.login-card p { color: var(--muted); line-height: 1.5; }
.login-card label { display: block; margin: 24px 0 8px; font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.login-card input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--peach); }
.password-field { position: relative; }
.password-field input { padding-right: 82px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 7px 9px; border: 0; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.password-toggle:hover { color: var(--orange); }
.password-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.password-toggle:disabled { cursor: default; opacity: .45; }
.login-card .call-button { min-height: 58px; margin-top: 10px; }
.setup-card { max-width: 520px; }
.setup-card form { display: grid; gap: 8px; }
.setup-card label { margin-top: 5px; }
.setup-help { color: var(--muted); line-height: 1.4; }
.auth-error { min-height: 22px; margin-top: 8px; color: #b23a25; font-size: 13px; font-weight: 600; }

.kiosk-card { position: relative; max-width: 560px; min-height: 640px; margin: 0 auto; padding: 56px; border-radius: 32px; background: white; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.kiosk-card-segmented { max-width: 900px; padding: 44px; }
.kiosk-card-segmented .brand-mark { margin-bottom: 18px; }
.kiosk-card-segmented h1 { font-size: clamp(34px, 5vw, 52px); }
.segment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin-top: 28px; }
.segment-button { min-height: 92px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #faf9f7; color: var(--ink); font: 700 14px/1.25 Manrope, sans-serif; text-align: left; transition: .18s ease; }
.segment-button span { display: block; width: fit-content; margin-bottom: 8px; padding: 4px 7px; border-radius: 7px; background: #ffede8; color: var(--orange); font-size: 12px; }
.segment-button:hover { border-color: var(--orange); background: #fff7f4; transform: translateY(-2px); }
.counter-segments { display: grid; gap: 8px; margin: 18px 0; }
.counter-segments > span:not(.card-label) { display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #f7f6f4; font-size: 12px; text-align: left; }
.counter-segments b { color: var(--orange); }
.counter-segments strong { font-size: 18px; }
.receipt-segment { max-width: 64mm; margin: 2mm auto 0; font-size: 9pt; font-weight: 700; }
.fullscreen-button { position: absolute; top: 20px; right: 20px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #aaa39d; }
.print-history-button { position: absolute; top: 20px; left: 20px; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #aaa39d; }
.print-history-button:hover { border-color: var(--orange); color: var(--orange); }
.print-history-button span { font-size: 20px; line-height: 1; }
.fullscreen-button:hover { border-color: var(--orange); color: var(--orange); }
.fullscreen-button span { font-size: 17px; line-height: 1; }
.kiosk-card .brand-mark { width: 64px; height: 64px; border-radius: 19px; font-size: 30px; margin-bottom: 34px; }
.kiosk-card h1 { font: 800 clamp(40px, 7vw, 64px)/1 Manrope, sans-serif; letter-spacing: -.06em; margin-bottom: 16px; }
.kiosk-card p { color: var(--muted); font-size: 18px; line-height: 1.5; max-width: 360px; }
.print-button { width: 100%; min-height: 108px; margin-top: 34px; border: 0; border-radius: 20px; background: var(--orange); color: white; font: 800 22px/1.2 Manrope, sans-serif; box-shadow: 0 18px 34px rgba(238,77,45,.28); transition: .18s ease; }
.print-button:hover { background: var(--orange-dark); transform: translateY(-2px); }
.print-button:active { transform: scale(.985); }
.kiosk-foot { margin-top: 24px; color: var(--muted); font-size: 13px; }

.attendant-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.card-label { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.counter-select { width: 100%; margin: 12px 0 26px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 700; outline: none; }
.counter-select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--peach); }
.now-card { min-height: 245px; padding: 30px; border-radius: 20px; background: #262320; color: white; display: flex; flex-direction: column; justify-content: space-between; }
.now-ticket { font: 800 clamp(56px, 9vw, 92px)/1 Manrope, sans-serif; letter-spacing: -.07em; }
.now-meta { color: #bdb8b3; }
.call-button { width: 100%; min-height: 82px; margin-top: 16px; border: 0; border-radius: 16px; background: var(--orange); color: white; font: 800 19px Manrope, sans-serif; }
.call-button:disabled { cursor: not-allowed; background: #d7d2ce; color: #8d8782; }
.secondary-button { width: 100%; margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 700; }
.stats { display: grid; gap: 12px; }
.stat { padding: 20px; border-radius: 16px; background: var(--bg); }
.stat strong { display: block; margin-top: 4px; font: 800 36px Manrope, sans-serif; letter-spacing: -.05em; }
.queue-list { margin-top: 20px; }
.queue-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.queue-item:last-child { border: 0; }
.queue-item strong { font-family: Manrope, sans-serif; }
.queue-item-current { margin-top: 8px; padding: 14px 12px; border: 0; border-radius: 12px; background: var(--peach); }
.queue-ticket { display: flex; flex-direction: column; gap: 2px; }
.queue-ticket small { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.queue-call-details { display: grid; grid-template-columns: auto 42px; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; text-align: right; }
.queue-call-details time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.empty { padding: 30px 10px; color: var(--muted); text-align: center; }
.danger-link { margin-top: 22px; border: 0; background: transparent; color: #b23a25; font-weight: 700; }
.modal-overlay { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(25,21,18,.64); backdrop-filter: blur(8px); }
.auth-modal { width: min(460px, 100%); padding: 30px; border-radius: 24px; background: white; box-shadow: var(--shadow); }
.auth-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 14px; background: var(--peach); color: var(--orange); font-size: 24px; font-weight: 800; }
.auth-modal h2 { margin: 10px 0; font: 800 27px/1.15 Manrope, sans-serif; letter-spacing: -.04em; }
.auth-modal p { color: var(--muted); line-height: 1.5; }
.auth-modal label { display: block; margin: 22px 0 8px; font-size: 13px; font-weight: 700; }
.auth-modal input { width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.auth-modal .password-field input { padding-right: 82px; }
.auth-modal input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px var(--peach); }
.auth-modal input[inputmode="numeric"] { font-size: 22px; font-weight: 700; letter-spacing: .18em; text-align: center; font-variant-numeric: tabular-nums; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 22px; }
.modal-actions .secondary-button { margin: 0; }
.modal-danger-button { border: 0; border-radius: 12px; background: var(--orange); color: white; font-weight: 800; }
.modal-confirm-button { border: 0; border-radius: 12px; background: var(--ink); color: white; font-weight: 800; }
.print-history-modal { width: min(520px, 100%); max-height: min(720px, calc(100svh - 40px)); display: flex; flex-direction: column; }
.history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-heading h2 { margin-bottom: 0; }
.modal-close { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); font-size: 24px; line-height: 1; }
.print-history-list { min-height: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.print-history-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.print-history-item > div { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.print-history-item strong { font: 800 20px Manrope, sans-serif; }
.print-history-item time { color: var(--muted); font-size: 12px; }
.print-history-item button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 13px; font-weight: 700; }

.display-page { min-height: 100vh; background: #ee4d2d; color: white; overflow: hidden; position: relative; }
.display-page::before { content: ""; position: absolute; width: 70vw; height: 70vw; right: -35vw; top: -25vw; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.035), 0 0 0 180px rgba(255,255,255,.025); }
.display-content { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: clamp(22px, 4.5vmin, 60px); }
.display-head { display: flex; justify-content: space-between; align-items: center; }
.display-brand { display: flex; gap: 12px; align-items: center; font: 800 22px Manrope, sans-serif; }
.display-brand .brand-mark { background: white; color: var(--orange); }
.display-tools { display: flex; align-items: center; gap: 14px; }
.display-clock { font-weight: 700; opacity: .85; }
.sound-toggle { padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; background: rgba(255,255,255,.1); color: white; font-size: 12px; font-weight: 700; }
.sound-toggle.active { background: white; color: var(--orange); border-color: white; }
.call-stage { width: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; container-type: inline-size; }
.call-stage .label { max-width: 92%; font-size: clamp(12px, 1.8vmin, 24px); line-height: 1.35; text-transform: uppercase; letter-spacing: clamp(.11em, .5vw, .2em); font-weight: 700; opacity: .78; text-wrap: balance; }
.called-ticket { max-width: 100%; margin: clamp(12px, 2vh, 28px) 0; font: 800 clamp(64px, 19cqw, 230px)/.88 Manrope, sans-serif; letter-spacing: -.085em; white-space: nowrap; }
.counter-line { max-width: 94%; font: 600 clamp(22px, 4.5cqw, 60px)/1.18 Manrope, sans-serif; text-wrap: balance; }
.waiting-display { opacity: .85; }
.display-foot { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.25); }
.display-foot > div:first-child { min-width: 0; }
.display-foot .label { display: block; margin-bottom: clamp(14px, 2.4vh, 28px); font-size: clamp(13px, 1.5vmin, 18px); font-weight: 700; letter-spacing: .02em; }
.last-calls { display: flex; gap: 28px; }
.last-call small { display: block; opacity: .7; margin-bottom: 4px; }
.last-call strong { font: 800 22px Manrope, sans-serif; }
.qr-box { background: white; color: var(--ink); padding: 10px; border-radius: 14px; display: flex; align-items: center; gap: 12px; max-width: 250px; }
.qr-code { width: 84px; height: 84px; flex: 0 0 84px; overflow: hidden; }
.qr-code canvas, .qr-code img { width: 84px !important; height: 84px !important; display: block; }
.qr-box span { font-size: 12px; line-height: 1.3; font-weight: 700; }

.mobile-page { min-height: 100vh; background: var(--bg); padding: 20px; }
.mobile-shell { max-width: 460px; min-height: calc(100vh - 40px); min-height: calc(100svh - 40px); margin: 0 auto; background: white; border-radius: 28px; padding: clamp(18px, 5vw, 26px); box-shadow: var(--shadow); container-type: inline-size; overflow: hidden; }
.mobile-head { display: flex; justify-content: space-between; align-items: center; }
.live { color: var(--green); font-size: 12px; font-weight: 800; }
.mobile-sound-toggle { width: 100%; margin-top: 18px; border-color: var(--line); background: var(--bg); color: var(--muted); }
.mobile-sound-toggle.active { background: #e9f7f1; border-color: #cdebdc; color: var(--green); }
.mobile-call { margin: clamp(28px, 8vh, 44px) 0 20px; padding: clamp(28px, 9vw, 38px) clamp(12px, 5vw, 20px); background: var(--orange); color: white; border-radius: clamp(18px, 6vw, 24px); text-align: center; overflow: hidden; }
.mobile-call .called-ticket { font-size: clamp(52px, 21cqw, 105px); margin: clamp(13px, 5vw, 18px) 0; }
.mobile-call h2 { max-width: 100%; margin-bottom: 0; font: 700 clamp(21px, 7cqw, 28px)/1.15 Manrope, sans-serif; text-wrap: balance; }
.mobile-call-time { display: block; margin-top: clamp(8px, 2.6vw, 12px); color: rgba(255,255,255,.78); font-size: clamp(12px, 3.7cqw, 14px); font-weight: 600; font-variant-numeric: tabular-nums; }
.mobile-list { margin-top: 28px; }
.mobile-list .queue-item { gap: 10px; }
.mobile-list .queue-item span { color: var(--muted); font-size: clamp(11px, 3.4cqw, 14px); text-align: right; }

.receipt { display: none; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 13px 18px; background: #262320; color: white; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; font-weight: 600; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .topbar { padding: 0 18px; }
  .brand small { display: none; }
  .environment-grid, .attendant-grid { grid-template-columns: 1fr; }
  .environment-grid { margin-top: 36px; }
  .dashboard-filters { align-items: stretch; flex-direction: column; }
  .dashboard-filters label { width: 100%; min-width: 0; }
  .export-button { width: 100%; margin-left: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 135px; }
  .dashboard-explanation { grid-template-columns: 1fr; gap: 8px; }
  .panel-page { padding: 28px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: space-between; }
  .kiosk-card { min-height: calc(100vh - 128px); padding: 32px 22px; border-radius: 24px; }
  .segment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .segment-button { min-height: 82px; padding: 12px; font-size: 12px; }
  .fullscreen-button { top: 14px; right: 14px; width: 40px; height: 40px; }
  .print-history-button { top: 14px; left: 14px; width: 40px; height: 40px; }
  .display-content { padding: clamp(22px, 7vw, 50px); }
  .display-head { gap: 16px; }
  .display-brand { font-size: clamp(17px, 4.2vw, 22px); }
  .display-clock { font-size: clamp(12px, 3.4vw, 16px); }
  .display-foot { grid-template-columns: 1fr; gap: clamp(16px, 3vh, 28px); padding-top: clamp(18px, 3vh, 30px); }
  .qr-box { justify-self: center; }
  .last-calls { gap: clamp(12px, 4vw, 24px); justify-content: center; flex-wrap: wrap; }
  .last-call strong { font-size: clamp(17px, 4.6vw, 22px); }
}

@media (max-width: 380px) {
  .mobile-page { padding: 10px; }
  .mobile-shell { min-height: calc(100svh - 20px); border-radius: 20px; }
  .mobile-head .brand { gap: 8px; font-size: 14px; }
  .mobile-head .brand-mark { width: 31px; height: 31px; }
  .mobile-call { margin-top: 26px; }
  .mobile-list .queue-item { align-items: flex-start; }
}

@media print {
  html, body { width: 80mm; min-width: 0; min-height: 0; margin: 0; padding: 0; background: white; }
  #app, .shell, .panel-page { display: block !important; width: 80mm; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  .topbar, .kiosk-card, .toast { display: none !important; }
  .receipt { display: block !important; position: static; width: 80mm; height: auto; min-height: 0; margin: 0; padding: 6mm 5mm; background: white; color: black; text-align: center; font-family: Arial, sans-serif; }
  .receipt-logo { font-size: 16pt; font-weight: 800; }
  .receipt-env { margin-top: 4mm; font-size: 12pt; text-transform: uppercase; }
  .receipt-ticket { margin: 4mm 0; font-size: 42pt; line-height: 1; font-weight: 800; }
  .receipt-time { font-size: 10pt; }
  .receipt-rule { border-top: 1px dashed #000; margin: 4mm 0; }
  .receipt-note { font-size: 9pt; line-height: 1.4; }
  .receipt-qr { width: 28mm; height: 28mm; margin: 4mm auto 0; overflow: hidden; }
  .receipt-qr canvas, .receipt-qr img { display: block; width: 28mm !important; height: 28mm !important; image-rendering: pixelated; }
  .receipt-qr-label { max-width: 52mm; margin: 2.5mm auto 0; font-size: 8.5pt; line-height: 1.25; }
  @page { size: 80mm 120mm; margin: 0; }
}
