:root {
  --c-lantern: #f2a33a;
  --c-night: #1b2440;
  --c-sos: #c62828;
  --c-forest: #2E6B4F;
  --c-sky: #2F6E96;
  --c-teak: #6B4226;
  --c-temple: #A8321E;
  --c-amber-text: #8A5A00;
  --c-paper: #fbf6ec;
  --c-ink: #2B2522;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  color: var(--c-ink);
  background: var(--c-paper);
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--c-paper); }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input, select, textarea { font: inherit; }
button, a, p, h1, h2, h3, li, dt, dd, th, td, span, small, figcaption { overflow-wrap: anywhere; }
a { color: var(--c-night); }
.icon { width: 32px; height: 32px; flex-shrink: 0; }
button, a, [tabindex] { outline-offset: 5px; }
:focus-visible { outline: 4px solid #126a9b; }
h1, h2, h3, p { margin: 0 0 1rem; }
h1 { font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.45; }
h2 { font-size: 1.25rem; line-height: 1.5; }
h3 { font-size: 1.1rem; line-height: 1.55; }
p, li, dt, dd, th, td, figcaption { font-size: 1rem; line-height: 1.75; }
small { font-size: 1rem; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.practice-banner { padding: .65rem 1rem; background: var(--c-lantern); color: var(--c-night); text-align: center; font-size: 1rem; font-weight: 800; line-height: 1.6; border-block-end: 2px solid var(--c-night); }
.page-shell { width: min(1160px, 100%); padding: 0 1rem; margin-inline: auto; }
.practice-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .65rem 0 1.25rem; border-block-end: 1px solid #c7c3b9; }
.practice-header > span { text-align: end; font-weight: 650; }
.restart-link { display: inline-flex; align-items: center; min-height: 64px; gap: .5rem; padding: .4rem .3rem; font-weight: 750; }
.restart-link svg { flex: 0 0 25px; width: 25px; height: 25px; }
.language-note { padding: .6rem .8rem; border-inline-start: 4px solid var(--c-teak); background: #fff; }
#practice-footer { border-block-start: 1px solid #b9b5ab; padding-block: 1.4rem 2rem; margin-block-start: 2rem; line-height: 1.8; }
.screen-heading { margin-block-end: 1.1rem; }
.start-screen { text-align: center; }
.start-title { max-width: 32rem; margin-inline: auto; }
.help-area { padding: 1.1rem 0 1.65rem; }
.help-button { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: .1rem; width: 280px; height: 280px; min-width: 220px; min-height: 220px; border-radius: 50%; background: radial-gradient(ellipse at 40% 13%, #f14a46 0, #ce302c 25%, var(--c-sos) 59%, #a41818 100%); color: white; border: 8px solid #aa1d1d; box-shadow: 0 12px 0 #741313, 0 17px 0 #dec8bc; text-shadow: 0 1px 1px #861313; padding: .6rem; }
.help-button:active { transform: translateY(5px); box-shadow: 0 7px 0 #741313, 0 12px 0 #dec8bc; }
.help-word { display: block; font-size: 3.4rem; font-weight: 950; letter-spacing: -.04em; line-height: 1.15; }
.help-sub { display: block; font-size: 1.35rem; font-weight: 750; max-width: 94%; }
.practice-tag { position: absolute; inset-block-start: 3px; inset-inline-end: -9px; color: var(--c-night); background: #ffe2ad; padding: .15rem .5rem; border: 2px solid #7e421c; border-radius: .3rem; font-size: 1rem; text-shadow: none; }
.real-call-heading { margin-block-start: .5rem; font-size: 1.2rem; }
.call-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; text-align: start; }
.call-card { display: flex; align-items: flex-start; justify-content: center; flex-direction: column; min-height: 108px; padding: .85rem; border: 2px solid #b2b7bc; border-radius: .6rem; background: #fff; color: var(--c-night); text-decoration: none; font-size: 1rem; line-height: 1.55; }
.call-card strong { display: flex; align-items: center; gap: .4rem; font-size: 1.8rem; line-height: 1.3; color: var(--c-sos); }
.call-card strong svg { width: 27px; height: 27px; }
.call-card:hover { border-color: var(--c-sos); }
.call-card .call-note { display: block; margin-block-start: .4rem; }
.primary-calls { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 1rem; }
.primary-calls .call-card { min-height: 150px; border-color: var(--c-sos); border-width: 3px; }
.primary-calls .call-card:first-child strong { font-size: 2.2rem; }
.primary-calls.equal .call-card strong { font-size: 2.2rem; }
.backup-calls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.backup-calls .call-card { min-height: 95px; }
.backup-calls .call-card strong { font-size: 1.4rem; }
.role-links { display: grid; gap: .6rem; margin-block-start: 1.5rem; text-align: start; }
.role-links a { display: flex; align-items: center; gap: .5rem; min-height: 64px; border: 1px solid #a9b3b9; border-radius: .4rem; padding: .65rem 1rem; background: white; font-size: 1rem; font-weight: 650; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.category-button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .4rem; min-height: 176px; min-width: 120px; border: 2px solid #aeb4b7; border-block-start: 7px solid var(--category-color, #5b6470); border-radius: .65rem; background: #fff; color: var(--c-ink); padding: .75rem .5rem; font-size: 1.15rem; line-height: 1.55; font-weight: 800; }
.category-button .icon { width: 65px; height: 65px; color: var(--category-color, #5b6470); }
.category-button:hover { background: #f2f5f6; border-color: var(--category-color, #5b6470); }
.cat-flood { --category-color: var(--c-sky); }
.cat-quake { --category-color: var(--c-teak); }
.cat-fire { --category-color: var(--c-temple); }
.cat-sick { --category-color: var(--c-sos); }
.cat-alcohol { --category-color: var(--c-amber-text); }
.cat-fight { --category-color: var(--c-night); }
.cat-theft { --category-color: var(--c-forest); }
.cat-other { --category-color: #59636c; }
.timer-panel { margin: 1.1rem 0; padding: 1rem; background: #fff; border: 1px solid #bdc4c7; border-radius: .5rem; }
.timer-panel p { margin-block-end: .6rem; }
.timer-track { height: 14px; background: #e5e5df; border-radius: 10px; overflow: hidden; }
.timer-fill { height: 100%; width: 100%; transform-origin: left center; background: var(--c-sky); }
[dir="rtl"] .timer-fill { transform-origin: right center; }
.action-button { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; min-height: 64px; padding: .8rem 1rem; border: 2px solid var(--c-night); border-radius: .5rem; font-weight: 750; font-size: 1.1rem; line-height: 1.6; background: var(--c-night); color: white; text-decoration: none; text-align: center; }
.cancel-button { color: var(--c-sos); background: white; border-color: var(--c-sos); }
.okay-button { background: var(--c-forest); border-color: var(--c-forest); margin-block-start: 1.25rem; }
.secondary-button { background: white; color: var(--c-night); }
.action-button:disabled { background: #e5eae7; color: #335045; border-color: #7e958a; }
.action-button .icon { width: 28px; height: 28px; flex: 0 0 28px; }
.practice-notice { display: flex; align-items: flex-start; gap: .6rem; padding: .8rem 1rem; color: var(--c-night); background: #fff1d7; border: 2px solid #b77424; border-radius: .5rem; line-height: 1.75; font-weight: 750; }
.practice-notice .icon { width: 30px; height: 30px; flex: 0 0 30px; margin-block-start: .2rem; }
.selected-category { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; margin-block: 1rem; color: var(--category-color, #59636c); background: white; border-inline-start: 7px solid currentColor; border-radius: .3rem; font-weight: 800; font-size: 1.3rem; }
.selected-category .icon { width: 58px; height: 58px; flex: 0 0 58px; }
.route-note { padding: 1rem; background: white; border: 1px solid #b3b6b8; border-radius: .5rem; }
.urgent-note { color: #9c1d1d; font-weight: 800; padding: .5rem 0; }
.panel { margin-block: 1.25rem; padding: 1.15rem; background: white; border: 1px solid #aeb7bb; border-radius: .7rem; }
.fiction-badge { display: inline-block; padding: .2rem .45rem; border: 1px solid #947744; background: #fff1d7; color: #56401c; border-radius: .2rem; font-size: 1rem; font-weight: 750; line-height: 1.5; }
.location-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0; }
.location-tabs button { min-height: 80px; padding: .6rem; border: 2px solid #73858d; background: #fff; border-radius: .5rem; font-size: 1rem; }
.location-tabs button[aria-pressed="true"] { border: 3px solid var(--c-night); background: #e9eef2; font-weight: 800; }
.map-figure { margin: 1rem 0; }
.practice-map { display: block; width: min(100%, 560px); height: auto; margin-inline: auto; background: #eff1e9; border: 2px solid #899791; border-radius: .4rem; }
.map-figure figcaption { margin-block-start: .6rem; font-weight: 700; text-align: center; }
.sample-message { padding: 1rem; border: 2px dashed #76858b; border-radius: .4rem; background: #f6f7f5; font-size: 1rem; line-height: 1.85; }
.status-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; padding: 0; margin: 1rem 0; }
.status-steps li { display: flex; align-items: center; text-align: center; flex-direction: column; gap: .5rem; font-size: 1rem; line-height: 1.5; padding: .65rem .2rem; border-radius: .4rem; }
.status-steps li.current { background: #e5f0e8; color: #214e39; font-weight: 800; }
.step-dot { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid #728077; background: #fff; font-size: 1.1rem; }
.complete .step-dot, .current .step-dot { background: var(--c-forest); border-color: var(--c-forest); color: white; }
.step-dot .icon { width: 28px; height: 28px; }
.current .step-dot { outline: 3px solid var(--c-forest); outline-offset: 3px; }
.done-panel { margin: 2rem auto; max-width: 40rem; }
.done-icon { display: block; width: 88px; height: 88px; color: var(--c-forest); margin-block-end: 1rem; }
.helper-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; align-items: start; }
.helper-safety { margin-block-start: 0; border: 3px solid var(--c-sos); position: sticky; top: 1rem; }
.helper-safety ul { margin: 0; padding-inline-start: 1.25rem; }
.helper-safety li { margin-block-end: .55rem; font-weight: 700; }
.helper-list { display: grid; gap: 1rem; }
.request-card { border: 2px solid #a4aeb3; border-radius: .6rem; padding: 1rem; background: white; }
.request-card .selected-category { margin: .6rem 0; padding: .4rem .5rem; }
.request-card .selected-category .icon { width: 42px; height: 42px; flex-basis: 42px; }
.request-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.request-card .action-button { margin-block-start: .8rem; }
.filters { margin-block: 1.25rem; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.filter-button { min-height: 120px; min-width: 120px; padding: .6rem; background: white; border: 2px solid #9fabb1; border-radius: .4rem; font-size: 1rem; line-height: 1.55; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; }
.filter-button .icon { width: 35px; height: 35px; }
.filter-button[aria-pressed="true"] { background: var(--c-night); border-color: var(--c-night); color: white; font-weight: 800; }
.requests-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1rem; }
.requests-table caption { text-align: start; font-weight: 800; margin: .5rem 0; font-size: 1.1rem; }
.requests-table th { text-align: start; padding: .75rem .5rem; background: var(--c-night); color: white; font-size: 1rem; }
.requests-table td { vertical-align: top; padding: .9rem .5rem; border-block-end: 2px solid #aab4b9; font-size: 1rem; line-height: 1.7; background: #fff; }
.requests-table tr.pending td { background: #fff1d7; }
.table-cat { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-weight: 800; }
.table-cat .icon { width: 34px; height: 34px; flex: 0 0 34px; }
.table-detail { margin-block-start: .5rem; }
.no-results { padding: 1rem; border: 2px solid #aab4b9; background: white; }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 1rem; }
.register-card { margin: 0; border: 1px solid #9eaab1; background: white; border-radius: .5rem; padding: 1rem; }
.register-card dt { font-weight: 800; margin-block-end: .75rem; }
.register-card dd { margin: 0; border: 2px dashed #8d999d; background: #f5f6f3; padding: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
  .helper-layout { grid-template-columns: 1fr; }
  .helper-safety { position: static; }
  .requests-table, .requests-table tbody, .requests-table tr, .requests-table td { display: block; width: 100%; }
  .requests-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .requests-table tr { margin-block: 1rem; border: 2px solid #9ba7ac; border-radius: .5rem; overflow: hidden; }
  .requests-table td { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: .7rem; border-block-end: 1px solid #c2c7c8; padding: .7rem; }
  .requests-table td::before { content: attr(data-label); font-weight: 800; }
  .requests-table td:last-child { border: none; }
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .page-shell { padding-inline: .75rem; }
  .practice-header { flex-direction: column; align-items: stretch; gap: 0; margin-block-end: 1rem; }
  .practice-header > span { text-align: start; padding-block-end: .75rem; }
  .help-button { width: 240px; height: 240px; }
  .help-word { font-size: 3rem; }
  .help-sub { font-size: 1.2rem; }
  .call-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-card { padding: .6rem; }
  .backup-calls { grid-template-columns: 1fr; }
  .backup-calls .call-card { flex-direction: row; align-items: center; justify-content: flex-start; gap: .6rem; min-height: 64px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .category-button { min-height: 164px; font-size: 1.05rem; }
  .panel { padding: .8rem; }
  .status-steps li { padding-inline: .1rem; }
  .primary-calls { grid-template-columns: 1fr; }
  .primary-calls.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-calls .call-card { min-height: 110px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-tabs, .register-grid { grid-template-columns: 1fr; }
  .requests-table td { grid-template-columns: 1fr; gap: .1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .help-button:active { transform: none; box-shadow: 0 12px 0 #741313, 0 17px 0 #dec8bc; }
}
@media print {
  .practice-header, button, .role-links, .filters { display: none; }
  .page-shell { width: 100%; padding: 0; }
  .practice-banner { background: white; border: 3px solid black; }
  .helper-safety { position: static; }
  .panel, .request-card { break-inside: avoid; }
}
