:root {
  color-scheme: light;
  --paper: #fbf5e7;
  --paper-light: #fffaf0;
  --cream: #f5e8cd;
  --ink: #173c41;
  --ink-soft: #496061;
  --muted: #626a5b;
  --teal: #23696c;
  --teal-deep: #174f56;
  --coral: #aa482f;
  --coral-soft: #fae2d7;
  --gold: #a87126;
  --line: #c9aa77;
  --fine: #e2d1ad;
  --display: KaiTi, STKaiti, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --shadow: 0 2px 0 rgb(114 76 27 / .15);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 300px; }
body {
  margin: 0;
  padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right))
    max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  background: #eee2ca;
  color: var(--ink);
  font: 15px/1.6 var(--sans);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #268589;
  outline-offset: 3px;
}
main:focus { outline: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); line-height: 1.12; font-weight: 800; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.muted { color: var(--ink-soft); }
.footnote { margin-top: 22px; }

.shell {
  width: 100%;
  max-width: 1590px;
  min-height: calc(100svh - 8px);
  margin-inline: auto;
  border: 1.5px solid #ae875d;
  border-radius: 23px;
  background: radial-gradient(ellipse at 21% 12%, var(--paper-light), transparent 61%), var(--paper);
}
.masthead {
  min-height: 72px;
  margin-inline: clamp(12px, 1.35vw, 24px);
  padding: 4px clamp(6px, 2vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #bc9364;
}
.brand {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: 800 clamp(25px, 2.7vw, 41px)/1 var(--display);
  white-space: nowrap;
}
.brand span { border-left: 1px solid var(--line); padding: 3px 0 3px 14px; }
.emblem { width: clamp(34px, 3.75vw, 56px); height: auto; }
.masthead nav { display: flex; align-items: center; gap: clamp(5px, 1.2vw, 18px); }
.text-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border-radius: 9px;
  padding: 4px 10px;
  font-weight: 700;
}
.text-button:hover, .icon-button:hover { background: rgb(217 183 119 / .2); }
.masthead .text-button { font-family: var(--display); font-size: clamp(16px, 1.55vw, 24px); }
.icon-button .icon { font-size: 22px; }
.header-settings { border-left: 1px solid var(--line); border-radius: 0 9px 9px 0; padding-inline: 15px 9px; }
.header-settings .icon { font-size: 27px; }
.storage-notice {
  margin: 10px clamp(12px, 2vw, 26px) 0;
  padding: 7px 12px;
  border: 1px solid #e4b196;
  border-radius: 8px;
  background: var(--coral-soft);
  color: #7a3828;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 44px;
  padding: 9px 16px;
  border: 1.25px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  line-height: 1.3;
  background: transparent;
  text-align: center;
  transition: background-color .14s, border-color .14s, transform .14s;
}
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { color: #fff8e6; background: var(--teal); border-color: var(--teal-deep); box-shadow: var(--shadow); }
.button-primary:hover { background: var(--teal-deep); }
.button-outline { color: var(--teal-deep); border-color: #71918a; background: #fff9e9; }
.button-outline:not(:disabled):hover { background: #e7eee3; border-color: var(--teal); }
.button-outline:disabled { color: #666958; border-color: var(--fine); background: #f5ecda; }
.button-text { color: var(--teal-deep); padding-inline: 8px; }
.button-text:hover { background: #f1e6cd; }
.button-danger { color: white; background: #a3422c; }
.button-danger:hover { background: #843522; }
.button-danger-text { color: #8c3324; border-color: #e5b69e; }
.button-danger-text:hover { background: var(--coral-soft); }
.button-installed { color: #2d694c; background: #e6eee1; border-color: #b4c8af; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cover-layout {
  display: grid;
  grid-template-columns: minmax(0, .47fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 3.1vw, 48px);
  padding: clamp(12px, 1.05vw, 18px) clamp(12px, 1.35vw, 24px) 0;
}
.cover-copy { padding: 20px 0 0 clamp(12px, 2.1vw, 36px); }
.cover-copy h1 {
  font-size: clamp(48px, 7.45vw, 117px);
  letter-spacing: -.071em;
  line-height: 1;
  white-space: nowrap;
}
.cover-subtitle {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 25px);
  margin-top: clamp(10px, 1.1vw, 17px);
  color: var(--coral);
  font: 800 clamp(25px, 3.1vw, 48px)/1.25 var(--display);
  white-space: nowrap;
}
.cover-subtitle .icon { width: 1.8em; height: .8em; color: #be6b4d; }
.cover-intro { margin-top: clamp(16px, 1.75vw, 28px); font: 700 clamp(16px, 1.72vw, 26px)/1.55 var(--display); }
.cover-actions {
  display: grid;
  gap: clamp(10px, 1.1vw, 17px);
  margin-top: clamp(20px, 2.85vw, 45px);
  max-width: 430px;
}
.cover-actions .button {
  min-height: clamp(52px, 5.15vw, 81px);
  justify-content: space-between;
  padding-inline: clamp(16px, 3vw, 45px) clamp(15px, 2.1vw, 36px);
  border-width: 1.7px;
  border-radius: 16px;
  font: 800 clamp(24px, 2.9vw, 46px)/1.15 var(--display);
}
.cover-actions .button-outline { border-color: var(--teal-deep); background: transparent; }
.cover-actions .button-outline:hover { background: #e8eee0; }
.cover-progress { margin-top: clamp(14px, 1.8vw, 29px); color: var(--ink-soft); font-size: clamp(13px, 1.36vw, 20px); }
.cover-picture {
  width: 100%;
  aspect-ratio: 1.41;
  object-fit: cover;
  object-position: 52% center;
  border-radius: 21px;
  background: #c0dbcd;
}
.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(14px, 1.3vw, 20px) clamp(16px, 1.55vw, 26px) 0;
  min-height: clamp(95px, 9.2vw, 145px);
  padding: 12px 0;
  border-block: 1px solid #bc9364;
}
.service-strip li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, .9vw, 15px);
  font: 800 clamp(17px, 1.9vw, 30px)/1.25 var(--display);
  white-space: nowrap;
}
.service-strip li + li::before {
  position: absolute;
  content: "";
  inset: 21% auto 21% 0;
  border-left: 1px solid var(--line);
}
.service-art {
  display: inline-block;
  flex: none;
  width: clamp(56px, 8.7vw, 138px);
  aspect-ratio: 1.32;
  background: url("assets/service.webp") no-repeat;
  background-size: 400% 158%;
  background-position: var(--prop-x) center;
}
.service-art-checkin { --prop-x: 0%; }
.service-art-luggage { --prop-x: 33.333%; }
.service-art-breakfast { --prop-x: 66.666%; }
.service-art-clean { --prop-x: 100%; }
.cover-footer {
  position: relative;
  min-height: 51px;
  display: grid;
  place-items: center;
  padding: 4px clamp(16px, 2vw, 32px);
}
.footer-decoration { display: flex; align-items: center; gap: 15px; color: var(--teal); }
.footer-decoration::before, .footer-decoration::after { content: ""; width: min(9vw, 130px); border-top: 1px solid #9c9a7f; }
.footer-decoration .icon { width: 39px; height: 22px; }
.footer-feedback { position: absolute; right: clamp(14px, 2vw, 35px); font-size: 12px; color: var(--ink-soft); }

.inner-page { width: min(100% - 48px, 1230px); margin-inline: auto; padding: 25px 0 40px; }
.inner-page h1 { font-size: clamp(41px, 5vw, 78px); letter-spacing: -.045em; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 18px 0 29px; }
.page-heading p { margin-top: 8px; color: var(--ink-soft); }
.heading-purse { display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.heading-purse strong { font: 800 1.3em/1 var(--display); }
.heading-purse .icon { color: var(--gold); }
.heading-purse .icon:nth-of-type(2) { margin-left: 9px; }
.levels-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.level-card, .difficulty {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-width: 0;
  min-height: 188px;
  text-align: left;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-light);
  box-shadow: var(--shadow);
}
.level-card:not(:disabled):hover, .difficulty:hover { background: #f5f0dd; border-color: var(--teal); }
.level-card.level-locked { background: #f3ead7; color: #646c5e; }
.level-card-top { display: flex; width: 100%; justify-content: space-between; align-items: center; color: var(--gold); }
.level-number { font: 800 31px/1.15 var(--display); }
.level-card > strong, .difficulty > strong { font: 800 26px/1.3 var(--display); }
.level-note, .difficulty > span { color: var(--ink-soft); font-size: 14px; }
.level-card-footer, .difficulty-record {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid var(--fine);
  width: 100%;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 750;
}
.level-locked .level-card-footer { color: #666958; }
.stars { display: inline-flex; gap: .17em; font-size: 16px; }
.star-earned { fill: #eeb752; color: #8e5b1d; }
.star-empty { fill: #f2e7cb; color: #a8926c; }
.large-stars { font-size: clamp(20px, 3.1vw, 44px); }
.difficulty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.difficulty { min-height: 188px; padding: 18px 21px; }
.difficulty .difficulty-mark { color: var(--teal); font-size: 28px; margin-bottom: 4px; }
.difficulty-record b { margin-left: auto; margin-right: 8px; font-variant-numeric: tabular-nums; }
.postcard-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 12px;
  padding: 20px;
  border-block: 1px solid var(--line);
}
.postcard-copy { align-self: center; padding: 4px 0; }
.postcard-copy > p { margin-top: 9px; color: var(--ink-soft); }
.postcard-copy .page-subtitle { color: var(--coral); font: 800 clamp(21px, 2.3vw, 32px)/1.25 var(--display); }
.postcard-copy .heading-purse { margin: 16px 0 10px; }
.prep-page { width: min(100% - 48px, 1480px); }
.prep-summary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr) minmax(166px, .56fr);
  padding-inline: 12px;
}
.prep-actions { align-self: center; display: grid; gap: 18px; }
.prep-actions .heading-purse { display: grid; gap: 8px; }
.prep-actions .heading-purse > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8e5;
}
.prep-actions .heading-purse strong { margin-left: auto; color: var(--coral); font-size: 1.75em; }
.prep-actions .button-primary {
  min-height: 57px;
  justify-content: space-between;
  padding-inline: 14px;
  font: 800 clamp(22px, 2.65vw, 37px)/1.15 var(--display);
}
.goal-pills { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 14px; }
.goal-pills li {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--fine);
  background: #f5ecd5;
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 13px;
}
.postcard-image { min-width: 0; position: relative; overflow: hidden; border-radius: 13px; min-height: 216px; }
.postcard-image img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 56% center; }
.shift-resources {
  position: absolute;
  inset: auto 0 0;
  background: #173c41e8;
  color: #fff7e5;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 17px;
  font-size: 13px;
}
.shift-resources .icon { color: #f3cd80; }
.helper-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid var(--fine);
  border-radius: 9px;
  background: #fff9ea;
  font-weight: 700;
}
.helper-setting small { display: block; font-weight: 400; color: var(--ink-soft); }
.helper-setting select { min-width: 0; max-width: 56%; min-height: 44px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.upgrade-section { margin-top: 22px; }
.section-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.section-title h2, .paper-panel h2 { font-size: clamp(24px, 2.8vw, 38px); }
.section-title p { color: var(--ink-soft); font-size: 14px; }
.upgrade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 13px; }
.upgrade-row {
  min-width: 0;
  display: grid;
  grid-template-columns: clamp(73px, 12.75vw, 204px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff8e8;
}
.upgrade-mark {
  position: relative;
  min-height: clamp(68px, 8.2vw, 129px);
  overflow: hidden;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: #eee4cc url("assets/hotel.webp") no-repeat;
  background-size: 410% auto;
  border-radius: 8px;
}
.upgrade-mark > span:last-child {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 3px 5px;
  border-radius: 6px;
  background: #fff8e5;
  font-size: 14px;
  line-height: 1;
}
.upgrade-art-annex { background-position: 93% 25%; }
.upgrade-art-familyRoom { background-position: 64% 25%; }
.upgrade-art-desk { background-position: 15.5% 74%; }
.upgrade-art-kitchen { background-position: 76% 72%; }
.upgrade-art-tools, .upgrade-art-helper { background-image: none; }
.upgrade-art-tools .service-art { width: 46%; }
.upgrade-art-helper .portrait { width: clamp(53px, 8vw, 108px); }
.upgrade-row small { color: var(--coral); font-size: 11px; }
.upgrade-row h3 { font: 800 clamp(18px, 1.8vw, 28px)/1.2 var(--display); }
.upgrade-row p { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
.upgrade-row .button { padding-inline: 9px; font-size: 13px; }

.result-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 18px; }
.result-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 15px; gap: 0 6px; }
.result-metrics div { padding: 6px 12px; border-left: 1px solid var(--line); }
.result-metrics div:first-child { padding-left: 0; border-left: 0; }
.result-metrics dt { color: var(--ink-soft); white-space: nowrap; }
.result-metrics .icon { color: var(--gold); }
.result-metrics dd { font: 800 clamp(26px, 4vw, 56px)/1.12 var(--display); font-variant-numeric: tabular-nums; }
.result-metrics small { font-size: .5em; }
.result-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 17px 0; }
.paper-panel { padding: 14px 18px; border: 1px solid var(--fine); border-radius: 12px; background: #fff9ec; }
.paper-panel h2 { margin-bottom: 9px; }
.ledger-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #e9ddc3; font-size: 14px; }
.ledger-row dd { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-total { color: var(--teal-deep); font-weight: 800; background: #f2ebd7; padding: 5px 8px; }
.result-goal-group h3 { margin: 8px 0 2px; font-size: 14px; }
.result-goal-group li { display: flex; gap: 5px; align-items: center; padding: 2px 0; font-size: 13px; }
.result-goal-group li strong, .result-goal-group li b { margin-left: auto; white-space: nowrap; }
.goal-met .icon { color: #2d714e; }
.goal-missed .icon { color: #a34634; }
.review-ledger { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 3px; }
.paper-panel .muted, .loss-list { font-size: 12px; margin-top: 8px; }
.loss-list { color: #983d2a; }
.result-actions { padding-block: 7px; }

.shift-page { padding: 15px 9px 14px; }
.shift-overview {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 7px 13px;
  gap: clamp(7px, 1.25vw, 22px);
  border: 1px solid #ac9062;
  border-radius: 15px;
  background: #fcf4df;
  box-shadow: var(--shadow);
}
.shift-identity { display: flex; align-items: center; gap: clamp(8px, 1.15vw, 21px); flex: none; min-width: 0; }
.shift-day { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; background: #f3e8ca; color: var(--ink); font-size: 13px; white-space: nowrap; }
.shift-day b { font: 800 1.52em/1 var(--display); }
.shift-identity h1 { font-size: clamp(25px, 3vw, 48px); white-space: nowrap; }
.shift-goal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-left: 1px solid var(--line);
  min-height: 44px;
  padding: 4px clamp(7px, 1.35vw, 22px);
  font-size: clamp(13px, 1.42vw, 21px);
  white-space: nowrap;
  background: transparent;
}
.shift-goal:hover { background: #f3e9d0; }
.shift-goal strong { color: var(--coral); font-size: 1.16em; }
.shift-goal .icon { font-size: .75em; }
.shift-hud { display: flex; align-items: stretch; justify-content: end; gap: clamp(5px, 1.15vw, 17px); margin-left: auto; min-width: 0; }
.hud-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(3px, .4vw, 7px);
  min-height: 44px;
  padding: 4px clamp(5px, 1vw, 16px);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff8e6;
  box-shadow: var(--shadow);
  white-space: nowrap;
  font-size: clamp(12px, 1.2vw, 19px);
}
.hud-cell .icon { color: var(--gold); }
.hud-cell strong { font: 800 1.45em/1 var(--display); font-variant-numeric: tabular-nums; }
.hud-time strong { min-width: 2.55em; text-align: right; }
.time-low { color: #9e3929; border-color: #cc7f65; }
.shift-hud .button { padding-inline: clamp(8px, 1.85vw, 28px); font-size: clamp(13px, 1.4vw, 22px); font-family: var(--display); }
.shift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 22.8%);
  gap: 11px;
  margin-top: 14px;
  align-items: stretch;
}
.hotel-stage {
  aspect-ratio: 1.68;
  position: relative;
  min-width: 0;
  align-self: start;
  overflow: hidden;
  isolation: isolate;
  border-radius: 19px;
  background: #c9e3d9 url("assets/hotel.webp") center / 100% 100% no-repeat;
  border: 1px solid #bca67e;
}
.hotel-stage canvas, .scene-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-markers { pointer-events: none; }
.scene-markers button { pointer-events: auto; }
.room-marker {
  position: absolute;
  top: 17%;
  left: var(--x);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 44px;
  min-width: 48px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  white-space: nowrap;
  color: #fffbe8;
}
.room-marker:hover .room-state, .room-marker:focus-visible .room-state { box-shadow: 0 0 0 3px #ffdf8d; }
.room-number {
  color: #332e25;
  font: 800 clamp(13px, 1.5vw, 25px)/1.1 var(--display);
  border-radius: 6px;
  background: #fff0c8;
  border: 1px solid #a58253;
  min-width: 2.8em;
  padding: 1px 6px;
  box-shadow: 0 1px 2px #59412258;
}
.room-state {
  color: #fff9e8;
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 1px clamp(5px, .65vw, 10px);
  border: 1.5px solid #fff1cd;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.35;
  font-size: clamp(10px, 1.02vw, 16px);
  background: #326d4d;
  box-shadow: 0 1px 2px #59412265;
}
.room-target .room-state { border-color: #ffe39b; box-shadow: 0 0 0 1px #714c22; }
.room-reserved .room-state { background: #896337; }
.room-occupied .room-state { background: #a6573e; }
.room-dirty .room-state, .room-cleaning .room-state { background: #66546f; }
.room-locked .room-state { background: #5f5a51; }
.room-alert { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border: 2px solid #fff7d6; background: #be472c; border-radius: 50%; }
.station {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  min-height: 44px;
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px clamp(6px, .95vw, 15px);
  color: #fff4cc;
  background: #1e565a;
  border: 1px solid #e6c476;
  border-radius: 9px;
  box-shadow: 0 0 0 1px #6a522d, 0 2px 3px #443b3359;
  font: 800 clamp(13px, 1.5vw, 23px)/1.1 var(--display);
}
.station-desk { left: 21%; }
.station-kitchen { left: 71%; }
.station:hover { background: #104148; }
.station-locked { background: #615b50; }
.station-locked:hover { background: #484940; }
.equipment-light { width: 8px; height: 8px; border-radius: 50%; background: #f4cc63; box-shadow: 0 0 6px #fbe08c; }
.guest-bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -58%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 3px 10px;
  border-radius: 19px;
  border: 1.5px solid #957449;
  background: #fff8e5;
  box-shadow: 0 2px 3px #5a483861;
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.guest-bubble::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #957449;
  border-bottom: 1.5px solid #957449;
  background: inherit;
}
.guest-bubble[aria-pressed="true"] { background: #fff0b9; box-shadow: 0 0 0 2px #e0a14a, 0 2px 3px #5a483861; }
.guest-bubble.bubble-urgent { border-color: #a4412b; color: #9d3d2c; background: #ffe4d5; }
.queue-panel {
  min-width: 0;
  min-height: 100%;
  padding: clamp(9px, 1vw, 16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcf3df;
  box-shadow: var(--shadow);
}
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.queue-heading h2 { font-size: clamp(24px, 2.45vw, 38px); text-align: center; flex: 1; }
.queue-toggle[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.queue-rule { display: flex; align-items: center; gap: 7px; margin: 5px 0 11px; }
.queue-rule span { padding: 1px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f8ebcd; font-size: 14px; font-weight: 700; }
.queue-rule b { font: 800 1.3em/1 var(--display); color: var(--coral); font-variant-numeric: tabular-nums; }
.queue-rule i { flex: 1; border-top: 1px solid var(--line); }
.selected-task { overflow: hidden; border: 1px solid #c66c50; border-radius: 12px; background: #fff6e6; box-shadow: var(--shadow); }
.selected-heading { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: #fae0d3; }
.selected-heading .service-art { width: 49px; height: 47px; }
.selected-heading h3 { font: 800 clamp(20px, 2vw, 30px)/1.15 var(--display); }
.selected-heading p { color: #514b3f; font-size: 13px; margin-top: 3px; }
.selected-body { display: grid; gap: 9px; padding: 10px; }
.patience { display: grid; grid-template-columns: auto minmax(20px, 1fr) auto; align-items: center; gap: 7px; font-size: 13px; }
.patience strong { color: var(--coral); min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
.meter-track { height: 10px; border: 1px solid #d8b49e; background: #f1deca; border-radius: 999px; overflow: hidden; }
.meter-track i { display: block; width: 100%; height: 100%; background: #cd7959; border-radius: inherit; }
[data-urgent="true"] .meter-track i { background: #a33724; }
.dispatch-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  min-height: 34px;
  border-radius: 6px;
  background: #f4e9ce;
  color: #564f39;
  font-size: 13px;
  line-height: 1.42;
}
.dispatch-blocked { background: #fae3d6; color: #893927; }
.selected-body .button { width: 100%; font-size: 16px; }
.no-expiry { font-size: 13px; color: var(--ink-soft); }
.pending-tasks { max-height: 191px; overflow-y: auto; margin-top: 8px; padding-right: 2px; }
.task-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  margin-bottom: 4px;
  padding: 3px 6px;
  border: 1px solid var(--fine);
  border-radius: 8px;
  background: #fff8ea;
  text-align: left;
}
.task-option:hover { background: #f5ead3; }
.task-option-icon { color: var(--teal-deep); background: #f0e4ca; border-radius: 7px; padding: 4px; font-size: 15px; }
.task-option strong, .task-option small { display: block; line-height: 1.35; }
.task-option small { font-size: 11px; color: var(--ink-soft); }
.small-patience { color: #675947; font-size: 12px; white-space: nowrap; }
.small-patience[data-urgent="true"] { color: #a33a28; }
.empty-queue { border: 1px dashed var(--line); border-radius: 12px; padding: clamp(20px, 3vw, 48px) 6px; text-align: center; background: #fff8e9; }
.empty-queue .icon { color: var(--gold); font-size: 28px; }
.empty-queue h3 { margin: 4px 0; font: 800 clamp(20px, 1.8vw, 26px)/1.2 var(--display); }
.empty-queue p { font-size: 13px; color: var(--ink-soft); }
.shift-tip { display: flex; gap: 7px; align-items: start; margin-top: 12px; border: 1px dashed var(--line); border-radius: 10px; padding: 9px 8px; }
.shift-tip .icon { color: var(--gold); font-size: 19px; margin-top: 1px; }
.shift-tip strong { font: 800 19px/1.2 var(--display); }
.shift-tip p { color: var(--ink-soft); font-size: 13px; margin-top: 3px; }
.shift-message { padding: 6px 8px; margin-top: 7px; background: #e9ede1; color: #244d47; border-radius: 6px; font-size: 13px; }
.shift-message[data-tone="warn"] { background: #f9e2d6; color: #853926; }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 0 5px; margin-top: 6px; border-bottom: 1px solid var(--fine); }
.stock-line > span { color: var(--ink-soft); }
.stock-line b { color: var(--ink); }
.crew-strip {
  display: flex;
  align-items: center;
  margin-top: 12px;
  padding: 8px 9px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbf1d9;
  box-shadow: var(--shadow);
}
.crew-strip h2 { padding: 3px 8px; font-size: clamp(20px, 2.3vw, 35px); white-space: nowrap; }
.crew-roster { flex: 1; min-width: 0; display: flex; align-items: stretch; }
.crew-member { flex: 1; display: flex; align-items: center; min-width: 0; gap: clamp(2px, .6vw, 10px); border-left: 1px solid var(--line); padding-inline: 6px; }
.portrait {
  display: block;
  flex: none;
  width: clamp(39px, 5.5vw, 84px);
  aspect-ratio: 1;
  background-image: url("assets/people.webp");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  background-position: var(--portrait-x) 100%;
}
.portrait-manager { --portrait-x: 0%; }
.portrait-porter { --portrait-x: 33.333%; }
.portrait-cook { --portrait-x: 66.666%; }
.portrait-cleaner { --portrait-x: 100%; }
.crew-member strong { display: block; font: 800 clamp(15px, 1.45vw, 23px)/1.2 var(--display); }
.crew-state { display: inline-block; padding: 1px 4px; margin-top: 4px; border-radius: 5px; background: #eaf0de; color: #2d6049; font-size: clamp(10px, .9vw, 14px); line-height: 1.4; }
.crew-busy { background: #fae4c4; color: #795221; }
.crew-locked .portrait { filter: grayscale(.7); opacity: .63; }
.crew-locked .crew-state { background: #eee6d3; color: #5c5e52; }
.crew-member progress { display: block; width: 100%; max-width: 82px; height: 5px; border: 0; margin-top: 4px; accent-color: var(--teal); }
.activity { margin: 6px 0 0; padding-inline: 8px; color: var(--ink-soft); font-size: 13px; }
.activity summary { min-height: 44px; line-height: 44px; cursor: pointer; }
.activity li { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-top: 1px solid var(--fine); }
.activity time { font-variant-numeric: tabular-nums; color: var(--muted); }
.activity li b { margin-left: auto; color: var(--teal); }

dialog {
  width: min(570px, 100% - 26px);
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 1.5px solid #ab8957;
  border-radius: 17px;
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: 0 12px 46px #12323f50;
}
dialog::backdrop { background: #152e31a9; }
.dialog-sheet { padding: clamp(13px, 3vw, 24px); }
.dialog-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dialog-sheet h2 { font-size: clamp(27px, 4.7vw, 42px); }
.dialog-body { display: grid; gap: 11px; padding-block: 14px; }
.dialog-sheet > footer { justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--fine); }
.dialog-body > .button { justify-self: start; }
.help-list { display: grid; gap: 4px; }
.help-list li { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--fine); padding: 6px 0; }
.help-list li .service-art { width: 54px; }
.help-list li strong { color: var(--teal-deep); }
.help-list li p { font-size: 13px; color: var(--ink-soft); }
.pause-tip { padding: 8px 9px; background: #f4e9cf; border-radius: 8px; font-size: 14px; }
.pause-tip .icon { color: var(--gold); }
.switch-line, .range-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 44px;
  border-bottom: 1px solid var(--fine);
}
.switch-line { font-weight: 750; cursor: pointer; }
.switch-line input { width: 22px; height: 22px; accent-color: var(--teal); }
.range-line input { flex: 1; min-width: 0; height: 44px; accent-color: var(--teal); }
.range-line output { min-width: 3em; font-variant-numeric: tabular-nums; text-align: right; }
.feedback-field { display: grid; gap: 6px; }
.feedback-field textarea { width: 100%; min-height: 110px; padding: 7px 9px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: max(15px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  max-width: min(88vw, 580px);
  padding: 7px 15px;
  border-radius: 9px;
  background: #193f43f5;
  color: #fff8e7;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 3px 10px #263e4040;
  opacity: 0;
  pointer-events: none;
  transition: opacity .13s, transform .13s;
}
.toast-visible { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }
.toast[data-tone="warn"] { background: #8d3929f5; }

@media (max-width: 1160px) {
  .shift-identity { gap: 7px; }
  .shift-overview { gap: 8px; padding-inline: 9px; }
  .shift-hud { gap: 6px; }
  .shift-goal { padding-inline: 7px; }
  .shift-day { font-size: 11px; }
  .cover-copy { padding-left: 9px; }
}

@media (max-width: 900px) {
  .levels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-layout { gap: 16px; }
  .cover-copy h1 { font-size: clamp(40px, 7.05vw, 68px); }
  .cover-actions { margin-top: 16px; }
  .cover-progress { margin-top: 9px; }
  .cover-intro { margin-top: 10px; }
  .shift-overview { flex-wrap: wrap; }
  .shift-hud { flex: 1; }
  .shift-day { font-size: 0; padding: 5px 6px; }
  .shift-day b, .shift-day .icon { font-size: 19px; }
  .queue-panel { min-height: auto; }
  .prep-summary { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
  .prep-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .prep-actions .heading-purse { display: flex; flex-wrap: wrap; }
  .prep-actions .heading-purse strong { margin-left: 4px; }
  .upgrade-row { grid-template-columns: 88px minmax(0, 1fr); }
  .upgrade-mark { grid-row: span 2; }
  .upgrade-row .button { grid-column: 2; justify-self: start; }
}

@media (max-width: 720px) {
  .shell { border-radius: 16px; }
  .masthead { min-height: 54px; margin-inline: 9px; padding-inline: 3px; }
  .brand { gap: 5px; min-height: 44px; }
  .brand span { padding-left: 6px; }
  .masthead nav { gap: 0; }
  .masthead .text-button { padding-inline: 7px; }
  .header-settings { padding-inline: 5px; }
  .header-settings .icon { font-size: 22px; }
  .cover-layout { grid-template-columns: 1fr; gap: 10px; padding: 10px 10px 0; }
  .cover-copy { padding: 0 2px 4px; }
  .cover-copy h1 { font-size: clamp(49px, 11vw, 75px); }
  .cover-picture { grid-row: 1; aspect-ratio: 1.82; border-radius: 12px; object-position: 50% 56%; }
  .cover-subtitle { font-size: clamp(24px, 5.6vw, 34px); margin-top: 6px; }
  .cover-intro { margin-top: 8px; line-height: 1.5; }
  .cover-line { display: none; }
  .cover-actions { grid-template-columns: 1fr 1fr; gap: 8px; max-width: none; margin-top: 13px; }
  .cover-actions .button { min-height: 51px; padding-inline: 9px; border-radius: 10px; font-size: clamp(19px, 4.7vw, 26px); }
  .cover-progress { font-size: 13px; margin-top: 9px; }
  .service-strip { margin: 10px 11px 0; min-height: auto; padding-block: 7px; }
  .service-strip li { flex-direction: column; gap: 1px; font-size: clamp(12px, 3.1vw, 18px); }
  .service-strip li .service-art { width: clamp(40px, 13vw, 76px); }
  .cover-footer { min-height: 46px; }
  .footer-feedback { right: 8px; }
  .inner-page { width: calc(100% - 24px); padding: 10px 0 24px; }
  .page-heading { align-items: start; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
  .inner-page h1 { font-size: clamp(40px, 9vw, 56px); }
  .level-card, .difficulty { padding: 11px; min-height: 144px; gap: 4px; }
  .levels-grid, .difficulty-grid { gap: 8px; }
  .level-card > strong, .difficulty > strong { font-size: 23px; }
  .level-note { font-size: 12px; }
  .difficulty-grid { grid-template-columns: 1fr; }
  .difficulty { min-height: 0; padding: 12px; }
  .difficulty .difficulty-mark { font-size: 22px; margin-bottom: 0; }
  .postcard-summary { grid-template-columns: 1fr; gap: 10px; padding: 12px 0; margin-top: 6px; }
  .postcard-image { min-height: 110px; aspect-ratio: 2.8; }
  .prep-actions { display: grid; justify-content: stretch; gap: 6px; }
  .prep-actions .button-primary { min-height: 48px; }
  .prep-actions .heading-purse > span { min-height: 34px; }
  .prep-summary .postcard-image { grid-row: 3; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .upgrade-row { grid-template-columns: clamp(41px, 14vw, 87px) minmax(0, 1fr) auto; padding: 7px; gap: 6px; }
  .upgrade-row .button { grid-column: auto; font-size: 12px; min-width: 0; padding-inline: 5px; }
  .upgrade-mark { grid-row: auto; min-height: 64px; background-size: 610% auto; }
  .upgrade-art-helper .portrait { width: 49px; }
  .result-columns { grid-template-columns: 1fr; gap: 9px; margin-block: 10px; }
  .paper-panel { padding: 10px 12px; }
  .shift-page { padding: 8px 7px 8px; }
  .shift-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 6px; padding: 4px 5px 6px; border-radius: 10px; }
  .shift-identity h1 { font-size: clamp(22px, 6vw, 33px); }
  .shift-goal { padding-inline: 5px; }
  .shift-hud { grid-column: 1 / -1; width: 100%; display: grid; grid-template-columns: 1fr .88fr 1.09fr auto; gap: 4px; }
  .hud-cell { min-width: 0; min-height: 38px; border-radius: 7px; padding: 2px 4px; font-size: 11px; }
  .hud-cell strong { font-size: 1.27em; }
  .hud-time strong { min-width: 0; }
  .shift-hud .button { padding: 4px 6px; min-width: 49px; font-size: 14px; border-radius: 7px; }
  .shift-layout { grid-template-columns: 1fr; gap: 7px; margin-top: 7px; }
  .hotel-stage { aspect-ratio: 1.47; border-radius: 11px; }
  .room-marker { top: 13%; min-width: 54px; }
  .room-number { padding-inline: 3px; }
  .room-state { font-size: 10px; padding-inline: 4px; }
  .station { top: 47%; border-radius: 7px; padding-inline: 6px; }
  .guest-bubble { min-width: 44px; min-height: 44px; padding: 3px; border-radius: 13px; transform: translate(-50%, -77%); }
  .guest-bubble .icon { font-size: 17px; }
  .guest-bubble span, .room-bubble { display: none; }
  .queue-panel { padding: 5px 8px 8px; border-radius: 11px; }
  .queue-heading { margin-bottom: 0; }
  .queue-heading h2 { text-align: left; padding-left: 2px; }
  .queue-rule { margin: 0 0 6px; }
  .selected-heading { padding: 4px 8px; }
  .selected-heading .service-art { width: 43px; height: 40px; }
  .selected-heading p { font-size: 12px; }
  .selected-body { gap: 6px; padding: 6px 8px; }
  .empty-queue { padding: 10px 5px; }
  .empty-queue .icon { font-size: 19px; }
  .shift-tip { padding: 5px; margin-top: 7px; }
  .crew-strip { display: block; margin-top: 8px; padding: 6px; border-radius: 11px; }
  .crew-strip h2 { padding: 4px; }
  .crew-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  .crew-member { border: 0; border-top: 1px solid var(--fine); padding: 3px; }
  .crew-member strong { font-size: 16px; }
}

@media (max-width: 375px) {
  .shift-hud .hud-cell > .icon { display: none; }
  .result-metrics dt { font-size: 13px; }
  .upgrade-row .button .icon { display: none; }
}

@media (min-width: 721px) and (max-height: 530px) and (orientation: landscape) {
  .masthead { min-height: 44px; padding-block: 0; }
  .emblem { width: 32px; }
  .shift-page { padding-top: 6px; }
  .shift-overview { min-height: 54px; padding-block: 3px; }
  .shift-layout { margin-top: 6px; }
  .hotel-stage { aspect-ratio: 1.85; }
  .queue-heading { margin-bottom: 0; }
  .queue-panel { padding: 6px 8px; }
  .queue-rule { margin: 0 0 5px; }
  .selected-heading { padding-block: 4px; }
  .selected-body { gap: 5px; padding: 6px; }
  .selected-heading .service-art { height: 34px; width: 38px; }
  .shift-tip { margin-top: 6px; padding: 5px; }
}

@media (min-width: 1161px) {
  .selected-heading { padding: 12px 14px; }
  .selected-heading .service-art { width: 59px; height: 53px; }
  .selected-heading p, .patience { font-size: 15px; }
  .selected-body { gap: 12px; padding: 13px; }
  .selected-body .button { min-height: 53px; font: 800 22px/1.18 var(--display); }
  .meter-track { height: 13px; }
  .dispatch-hint { min-height: 44px; font-size: 14px; }
  .shift-tip { margin-top: 17px; padding: 12px; }
  .shift-tip p { font-size: 14px; }
}

/* Fit desktop windows vertically, including space taken by browser chrome. */
@media (min-width: 721px) and (min-height: 510px) and (max-height: 1040px) and (hover: hover) and (pointer: fine) {
  .shell { max-width: clamp(790px, 174dvh, 1590px); }
  .masthead { flex: none; min-height: clamp(50px, 7dvh, 72px); padding-block: 2px; }
  .brand { min-height: 44px; font-size: clamp(24px, 4.4dvh, 40px); }
  .emblem { width: clamp(31px, 5dvh, 56px); }
  .masthead .text-button { font-size: clamp(16px, 2.6dvh, 24px); }

  body:is([data-view="home"], [data-view="prepare"], [data-view="play"], [data-view="result"]) .shell {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 8px);
    min-height: 0;
  }
  body:is([data-view="home"], [data-view="prepare"], [data-view="play"], [data-view="result"]) #app {
    flex: 1;
    min-height: 0;
  }

  body[data-view="home"] #app { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
  .cover-layout { grid-template-rows: minmax(0, 1fr); gap: clamp(14px, 3.4dvh, 48px); padding-top: 10px; }
  .cover-picture { max-height: 100%; }
  .cover-copy { padding-block: 0; }
  .cover-copy h1 { font-size: clamp(38px, min(7.1vw, 11dvh), 117px); }
  .cover-subtitle { margin-top: 8px; font-size: clamp(21px, min(3.1vw, 4.5dvh), 48px); }
  .cover-intro { margin-top: 12px; font-size: clamp(15px, min(1.72vw, 3dvh), 26px); }
  .cover-actions { gap: 8px; margin-top: clamp(13px, 3dvh, 35px); }
  .cover-actions .button {
    min-height: clamp(44px, 7.5dvh, 79px);
    font-size: clamp(22px, min(2.9vw, 4.4dvh), 46px);
  }
  .cover-progress { margin-top: 10px; }
  .service-strip { min-height: 0; margin-top: 8px; padding-block: 8px; }
  .service-strip li { font-size: clamp(16px, min(1.9vw, 3.3dvh), 30px); }
  .service-strip .service-art { width: clamp(45px, min(8.7vw, 12dvh), 138px); }
  .cover-footer { min-height: 44px; }

  .inner-page { padding-block: 10px 14px; }
  .inner-page h1 { font-size: clamp(32px, min(5vw, 7dvh), 68px); }
  .page-heading { margin: 8px 0 15px; }
  .levels-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
  .level-card { min-height: clamp(112px, 20dvh, 188px); gap: 4px; padding: 9px 11px; }
  .level-number { font-size: 25px; }
  .level-card > strong { font-size: clamp(19px, 2vw, 26px); }
  .postcard-summary { gap: 14px; margin-top: 6px; padding-block: 9px; }
  .postcard-copy > p { margin-top: 5px; }
  .postcard-image { min-height: clamp(110px, 22dvh, 216px); }
  .goal-pills { margin-top: 7px; }
  .prep-actions { gap: 8px; }
  .prep-actions .heading-purse > span { min-height: 34px; }
  .prep-actions .button-primary { min-height: 44px; font-size: clamp(20px, 4dvh, 32px); }
  .helper-setting, .upgrade-section { margin-top: 11px; }
  .section-title { margin-bottom: 7px; }
  .upgrade-row { gap: 8px; padding: 6px; }
  .upgrade-mark { min-height: clamp(42px, 9dvh, 112px); }
  .upgrade-art-helper .portrait { width: clamp(42px, 8dvh, 88px); }
  .upgrade-row small { display: block; line-height: 1.2; }
  .upgrade-row h3 { font-size: clamp(16px, 1.55vw, 24px); }
  .upgrade-row p { line-height: 1.35; }

  body:is([data-view="prepare"], [data-view="result"]) #app { display: flex; }
  .prep-page, .result-page { display: flex; flex-direction: column; min-height: 0; }
  .prep-page > .button { align-self: flex-start; }
  .prep-page > .button, .prep-summary, .helper-setting, .result-summary, .result-actions { flex: none; }
  .upgrade-section { display: flex; flex-direction: column; min-height: 0; }
  .upgrade-section .section-title { flex: none; }
  .upgrade-grid { min-height: 0; overflow-y: auto; }
  .result-metrics { margin-top: 8px; }
  .result-metrics dd { font-size: clamp(23px, 5.4dvh, 52px); }
  .result-columns { flex: 1; min-height: 0; margin: 9px 0 0; grid-template-rows: minmax(0, 1fr); }
  .result-columns .paper-panel { min-height: 0; overflow-y: auto; padding: 9px 12px; }
  .result-columns .paper-panel h2 { margin-bottom: 5px; font-size: clamp(22px, 4dvh, 34px); }
  .ledger-row { padding-block: 2px; font-size: 13px; }
  .result-goal-group h3 { margin-top: 4px; }
  .result-goal-group li { padding-block: 1px; }

  .shift-page { height: 100%; display: flex; flex-direction: column; gap: 7px; padding: 8px 9px 6px; }
  .shift-overview { flex: none; min-height: 53px; padding: 3px 9px; gap: 8px; }
  .shift-identity h1 { font-size: clamp(22px, min(2.8vw, 4.5dvh), 43px); }
  .shift-goal { font-size: clamp(13px, 2.25dvh, 19px); }
  .shift-hud { gap: clamp(5px, 1vw, 13px); }
  .hud-cell { padding-inline: clamp(5px, .8vw, 12px); font-size: clamp(12px, 2.15dvh, 17px); }
  .shift-hud .button { padding-inline: clamp(8px, 1.3vw, 20px); font-size: clamp(14px, 2.5dvh, 21px); }
  .shift-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    margin-top: 0;
    container-type: size;
  }
  .hotel-stage { flex: 0 1 calc(100cqh * 1.68); align-self: center; aspect-ratio: 1.68; max-height: 100%; }
  .queue-panel {
    flex: 0 0 clamp(226px, 25%, 330px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 7px 9px;
  }
  .queue-heading { margin-bottom: 2px; }
  .queue-heading h2 { font-size: clamp(22px, 3.8dvh, 35px); }
  .queue-rule { margin: 0 0 6px; }
  #queue-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  #task-list { display: contents; }
  #queue-body > :not(#task-list), .selected-task, .empty-queue { flex: none; }
  .pending-tasks { min-height: 52px; }
  .selected-heading { padding: 6px 8px; }
  .selected-heading h3 { font-size: clamp(19px, 3dvh, 29px); }
  .selected-heading .service-art { width: 44px; height: 39px; }
  .selected-heading p, .patience, .dispatch-hint, .shift-tip p { font-size: 13px; }
  .selected-body { gap: 6px; padding: 7px 8px; }
  .dispatch-hint { min-height: 0; }
  .selected-body .button { min-height: 44px; font-size: clamp(16px, 2.7dvh, 21px); }
  .shift-tip { margin-top: 8px; padding: 6px; }
  .crew-strip { flex: none; margin-top: 0; padding-block: 5px; }
  .crew-strip h2 { font-size: clamp(19px, 3.5dvh, 32px); }
  .crew-member .portrait { width: clamp(37px, 8dvh, 76px); }
  .activity { flex: none; margin-top: 0; }
  .activity summary { min-height: 28px; line-height: 28px; }
  .activity ul { max-height: min(16dvh, 116px); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
