@font-face {
  font-family: "Canger Qiaole W02";
  src: url("./assets/fonts/CangerQiaole-W02.ttf") format("truetype");
  font-display: swap;
}

/* Computer inbox reuses the existing paper notification surface. */
.day-notification.computer-inbox-panel,
.day-notification.email-list-panel,
.day-notification.email-message-panel {
  left: 76% !important;
  width: min(31%, 500px) !important;
  max-height: min(72%, 620px);
  padding: clamp(20px, 1.7cqw, 30px);
  overflow: auto;
  text-align: left;
}

/* The inbox summary only contains two routes, so keep it closer to a compact
   notification. Lists and message bodies retain the wider reading surface. */
.day-notification.computer-inbox-panel {
  right: 8% !important;
  left: auto !important;
  width: clamp(280px, 24%, 360px) !important;
  max-width: calc(100% - 32px);
  max-height: none;
  padding: clamp(16px, 1.25cqw, 22px);
}

.day-notification.computer-inbox-panel h2 {
  margin-bottom: clamp(10px, 0.75cqw, 14px);
  font-size: clamp(17px, 1.2cqw, 21px);
}

.computer-inbox-panel .computer-inbox-list {
  gap: clamp(7px, 0.5cqw, 9px);
}

.computer-inbox-panel .computer-inbox-list > button {
  padding: clamp(9px, 0.68cqw, 12px);
}

.computer-inbox-panel .day-panel-close,
.email-list-panel .day-panel-close,
.email-message-panel .day-panel-close {
  position: absolute;
  top: clamp(10px, 0.8cqw, 14px);
  right: clamp(10px, 0.8cqw, 14px);
}

.computer-inbox-kicker,
.email-sender,
.email-deadline {
  margin: 0 0 0.35cqw !important;
  color: #6b9297 !important;
  font-family: var(--font-display-soft) !important;
  font-size: clamp(11px, 0.84cqw, 14px) !important;
}

.day-notification.computer-inbox-panel h2,
.day-notification.email-list-panel h2,
.day-notification.email-message-panel h2 {
  margin: 0 0 clamp(14px, 1.15cqw, 20px);
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.45cqw, 25px);
  font-weight: 500;
}

.email-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: clamp(12px, 0.9cqw, 16px);
  margin-bottom: clamp(10px, 0.8cqw, 14px);
}

.day-notification.email-list-panel .email-list-heading h2 {
  margin: 0 0 clamp(2px, 0.18cqw, 4px);
}

.email-list-heading p,
.email-list-heading > span {
  margin: 0;
  color: rgba(80, 66, 54, 0.5);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.72cqw, 12px);
}

.email-list-heading > span {
  flex: 0 0 auto;
  padding-bottom: clamp(2px, 0.18cqw, 4px);
}

.computer-inbox-list,
.email-message-list {
  display: grid;
  gap: clamp(8px, 0.68cqw, 12px);
}

.computer-inbox-list > button,
.email-message-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.22cqw 0.8cqw;
  width: 100%;
  padding: clamp(11px, 0.88cqw, 15px);
  border: 1px solid rgba(80, 66, 54, 0.14);
  border-radius: 4px 7px 3px 6px / 6px 3px 7px 4px;
  color: #54463b;
  background: rgba(255, 250, 241, 0.62);
  box-shadow: 2px 3px 0 rgba(80, 66, 54, 0.05);
  text-align: left;
}

.email-message-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: clamp(56px, 4.2cqw, 70px);
  padding: clamp(9px, 0.68cqw, 12px) clamp(11px, 0.82cqw, 14px);
}

.computer-inbox-list > button:not(:disabled):hover,
.computer-inbox-list > button:not(:disabled):focus-visible,
.email-message-row:hover,
.email-message-row:focus-visible {
  border-color: rgba(107, 146, 151, 0.45);
  outline: 0;
  transform: translateY(-1px);
}

.computer-inbox-list span,
.email-message-row span {
  color: rgba(80, 66, 54, 0.58);
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.82cqw, 14px);
}

.computer-inbox-list strong,
.email-message-row strong {
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.02cqw, 18px);
  font-weight: 500;
}

.computer-inbox-list small,
.email-message-row small {
  grid-column: 1 / -1;
  color: rgba(80, 66, 54, 0.48);
  font-size: clamp(10px, 0.76cqw, 13px);
}

.email-message-row span,
.email-message-row strong {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-message-row small {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  padding: 0.18em 0.52em 0.24em;
  border-radius: 999px;
  background: rgba(107, 146, 151, 0.1);
  color: rgba(80, 66, 54, 0.58);
  white-space: nowrap;
}

.email-message-row.is-unread small,
.email-message-row.is-read small {
  padding-right: 1.25em;
  color: #a84d31;
  background: rgba(228, 90, 44, 0.08);
}

.computer-inbox-list > button:disabled {
  cursor: default;
  opacity: 0.48;
}

.email-message-row.is-unread::before,
.email-message-row.is-read::before {
  position: absolute;
  top: 50%;
  right: clamp(14px, 1.02cqw, 18px);
  color: #e45a2c;
  content: "!";
  font-family: var(--font-display);
  font-size: clamp(12px, 0.88cqw, 15px);
  transform: translateY(-50%);
}

.email-back-button {
  margin: 0 0 0.55cqw;
  padding: 0;
  border: 0;
  color: #6b9297;
  background: transparent;
  font-family: var(--font-display-soft);
  font-size: clamp(10px, 0.78cqw, 13px);
}

.email-body {
  padding: clamp(12px, 0.95cqw, 17px) 0;
  border-top: 1px solid rgba(80, 66, 54, 0.12);
  border-bottom: 1px solid rgba(80, 66, 54, 0.12);
  color: #54463b;
  font-family: var(--font-ui);
  font-size: clamp(12px, 0.9cqw, 15px);
  line-height: 1.75;
  white-space: pre-wrap;
}

.email-actions {
  position: static !important;
  justify-content: flex-end;
  margin-top: clamp(14px, 1.1cqw, 20px);
}

.email-empty {
  color: rgba(80, 66, 54, 0.48);
  font-family: var(--font-ui);
}

.scene-clue-panel.is-view-only .scene-clue-note {
  margin-bottom: 0;
}

.cash-pop.is-expense strong {
  color: #b5654d;
}

.final-day-panel {
  gap: clamp(9px, 0.8cqw, 14px);
}

.final-day-summary {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 2.1cqw, 36px);
  color: rgba(80, 66, 54, 0.55);
  font-family: var(--font-display-soft);
  font-size: clamp(10px, 0.78cqw, 13px);
}

.final-day-summary span {
  display: grid;
  gap: 0.22cqw;
}

.final-day-summary strong {
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.15cqw, 20px);
  font-weight: 500;
}

.final-day-panel > small {
  max-width: 34em;
  color: rgba(80, 66, 54, 0.6);
  font-family: var(--font-ui);
  line-height: 1.6;
}

@font-face {
  font-family: "Canger Qiaole W04";
  src: url("./assets/fonts/CangerQiaole-W04.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans Regular";
  src: url("./assets/fonts/SourceHanSansCN-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --stage-w: 1672;
  --stage-h: 941;
  --paper: #f7efe2;
  --ink: #504236;
  --muted: #8a7a69;
  --accent: #ea6b35;
  --teal: #6b9297;
  --ui-surface: #f3ece2;
  --panel: rgba(255, 250, 241, 0.96);
  --font-display: "Canger Qiaole W04", "Source Han Sans Regular", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display-soft: "Canger Qiaole W02", "Source Han Sans Regular", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-ui: "Source Han Sans Regular", "PingFang SC", "Microsoft YaHei", sans-serif;
  --start-title-x: 50%;
  --start-title-y: 62.1%;
  --start-title-size: clamp(13px, 1.15vw, 30px);
  --start-title-spacing: 0.06em;
  --start-title-font: var(--font-display-soft);
  --start-hint-x: 50.1%;
  --start-hint-y: 2.6%;
  --start-hint-size: clamp(13px, 1.3vw, 22px);
  --start-hint-font: var(--font-display-soft);
  --start-hint-spacing: 0;
  --start-door-x: 50%;
  --start-door-y: 45.9%;
  --start-door-size: clamp(70px, 8.4vw, 140px);
  --start-sign-x: 50%;
  --start-sign-y: 45.9%;
  --start-sign-width: 61%;
  --start-closed-x: 50.9%;
  --start-closed-y: 67.2%;
  --start-closed-size: clamp(9px, 1.05vw, 17px);
  --start-closed-spacing: 0.01em;
  --start-closed-font: var(--font-display-soft);
  --attention-font: var(--font-display-soft);
  --attention-size: clamp(30px, 3.15vw, 58px);
  --day-title-size: clamp(14px, 1.28cqw, 22px);
  --day-body-size: clamp(13px, 1.08cqw, 18px);
  --day-option-size: clamp(13px, 1.08cqw, 18px);
  --day-small-size: clamp(10px, 0.82cqw, 14px);
  --day-display-size: clamp(15px, 1.48cqw, 25px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: #e9dfcf;
  font-family: var(--font-ui);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
}

body.is-editing .app-shell {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.scene-wrap {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100vh;
  padding: 16px;
  overflow: auto;
}

.scene {
  position: relative;
  container-type: inline-size;
  width: min(100%, calc((100vh - 32px) * 1672 / 941));
  max-width: 1672px;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(72, 55, 36, 0.18);
  user-select: none;
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.weather-root {
  position: absolute;
  inset: 0;
  z-index: 700;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 480ms ease;
}

.scene.has-started .weather-root {
  opacity: 1;
}

.weather-drop {
  position: absolute;
  top: -10%;
  left: var(--rain-x);
  width: max(1px, 0.085cqw);
  height: var(--rain-length);
  border-radius: 100%;
  background: rgba(70, 111, 121, 0.72);
  filter: blur(0.05px);
  opacity: 0;
  transform: rotate(-17deg);
  animation: weather-rain var(--rain-duration) linear var(--rain-delay) infinite;
}

@keyframes weather-rain {
  0% {
    opacity: 0;
    translate: 0 0;
  }

  12% {
    opacity: calc(0.88 * var(--weather-strength, 1));
  }

  88% {
    opacity: calc(0.62 * var(--weather-strength, 1));
  }

  100% {
    opacity: 0;
    translate: -1.65cqw 69cqw;
  }
}

.weather-drop.is-near {
  width: max(1.35px, 0.13cqw);
  background: rgba(72, 113, 123, 0.58);
  filter: blur(0.16px);
}

.weather-root[data-weather="thunderstorm"] .weather-drop {
  width: max(1.2px, 0.11cqw);
  background: rgba(61, 93, 101, 0.78);
  transform: rotate(-20deg);
}

.weather-lightning {
  position: absolute;
  inset: 0;
  background: rgba(255, 249, 224, 0.54);
  mix-blend-mode: screen;
  opacity: 0;
  animation: weather-lightning 9.4s linear infinite;
}

.weather-cloud {
  position: absolute;
  top: var(--cloud-y);
  left: var(--cloud-x);
  width: var(--cloud-width);
  height: auto;
  overflow: visible;
  color: rgba(255, 254, 248, 0.97);
  filter: none;
  opacity: 0;
  transform: scale(var(--cloud-scale));
  animation: weather-cloud-appear var(--cloud-duration) ease-in-out var(--cloud-delay) infinite;
}

.weather-cloud path {
  fill: currentColor;
  stroke: none;
}

.weather-flake {
  position: absolute;
  top: -5%;
  left: var(--snow-x);
  width: max(1.5px, var(--snow-size));
  height: max(1.5px, var(--snow-size));
  border-radius: 54% 46% 58% 42%;
  background: rgba(248, 250, 240, 0.9);
  box-shadow: 0 0 0 0.5px rgba(107, 146, 151, 0.24);
  opacity: 0;
  animation: weather-snow var(--snow-duration) ease-in var(--snow-delay) infinite;
}

.weather-flake.is-near {
  filter: blur(0.35px);
  scale: 1.55;
}

.weather-dust {
  position: absolute;
  top: var(--dust-y);
  left: var(--dust-x);
  width: max(1px, var(--dust-size));
  height: max(1px, var(--dust-size));
  border-radius: 50%;
  background: rgba(194, 145, 74, 0.38);
  opacity: 0;
  animation: weather-dust-float var(--dust-duration) ease-in-out var(--dust-delay) infinite;
}

@keyframes weather-lightning {
  0%, 77%, 81%, 100% { opacity: 0; }
  77.5% { opacity: calc(0.16 * var(--weather-strength, 1)); }
  78.2% { opacity: 0.025; }
  79.1% { opacity: calc(0.1 * var(--weather-strength, 1)); }
  80% { opacity: 0; }
}

@keyframes weather-cloud-appear {
  0%, 100% { opacity: 0.2; translate: -0.38cqw 0; }
  50% { opacity: 0.5; translate: 0.38cqw 0; }
}

@keyframes weather-snow {
  0% { opacity: 0; translate: 0 0; rotate: 0deg; }
  12% { opacity: calc(0.86 * var(--weather-strength, 1)); }
  84% { opacity: calc(0.72 * var(--weather-strength, 1)); }
  100% { opacity: 0; translate: var(--snow-drift) 66cqw; rotate: 210deg; }
}

@keyframes weather-dust-float {
  0%, 100% { opacity: 0; translate: 0 0; }
  28% { opacity: calc(0.55 * var(--weather-strength, 1)); }
  62% { opacity: calc(0.32 * var(--weather-strength, 1)); translate: 0.7cqw -0.9cqw; }
}

.weather-test-panel {
  position: absolute;
  left: 1.8%;
  bottom: 2.2%;
  z-index: 1500;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: clamp(4px, 0.36cqw, 6px) clamp(7px, 0.58cqw, 10px);
  min-width: clamp(180px, 16cqw, 270px);
  padding: clamp(8px, 0.65cqw, 11px);
  color: rgba(80, 66, 54, 0.84);
  background: rgba(255, 250, 242, 0.88);
  clip-path: polygon(2% 2%, 47% 0, 99% 4%, 100% 91%, 96% 100%, 38% 98%, 1% 100%, 0 12%);
  filter: drop-shadow(2px 3px 3px rgba(80, 66, 54, 0.12));
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.76cqw, 13px);
}

.weather-test-panel > strong,
.weather-test-panel > code {
  grid-column: 1 / -1;
}

.weather-test-panel label {
  display: grid;
  gap: 2px;
}

.weather-test-panel select,
.weather-test-panel button {
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid rgba(107, 146, 151, 0.24);
  border-radius: 3px;
  color: inherit;
  background: rgba(255, 253, 247, 0.86);
  font: inherit;
}

.weather-test-panel button {
  grid-column: 1 / -1;
}

.weather-test-panel code {
  color: rgba(80, 66, 54, 0.56);
  font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
  .weather-drop,
  .weather-lightning,
  .weather-cloud,
  .weather-flake,
  .weather-dust {
    display: none;
  }

}

.layer-root {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: opacity 420ms ease;
}

.book-hotspot-root {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.attention-root {
  position: absolute;
  inset: 0;
  /* Object alerts should sit above furniture but never cover customer avatars. */
  z-index: 45;
  pointer-events: none;
}

.scene:not(.has-started) .layer-root,
.scene:not(.has-started) .book-hotspot-root {
  opacity: 0;
  pointer-events: none;
}

.scene.is-closing-surface .layer-root,
.scene.is-closing-surface .attention-root,
.scene.is-closing-surface .book-hotspot-root {
  opacity: 0;
  pointer-events: none;
}

body.is-editing .scene .layer-root {
  opacity: 1;
  pointer-events: auto;
}

body.is-editing .scene.is-closing-surface .layer-root,
body.is-editing .scene.is-closing-surface .attention-root {
  opacity: 0;
  pointer-events: none;
}

.scene.is-opening .layer-root {
  pointer-events: none;
}

.scene.is-opening .start-screen,
.scene.is-opening .start-actions {
  pointer-events: none;
}

.scene.is-summary-clickable {
  cursor: pointer;
}

.scene-layer {
  position: absolute;
  left: calc(var(--x) / var(--stage-w) * 100%);
  top: calc(var(--y) / var(--stage-h) * 100%);
  width: calc(var(--w) / var(--stage-w) * 100%);
  margin: 0;
  padding: 0;
  transform: rotate(var(--r)) scaleX(var(--flip));
  transform-origin: center center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  appearance: none;
  opacity: 1;
  transition: opacity var(--fade-ms, 180ms) ease, filter 160ms ease, transform 160ms ease, left var(--move-ms, 760ms) ease-in-out, top var(--move-ms, 760ms) ease-in-out;
}

.scene-layer.is-entering {
  opacity: 0;
}

.scene-layer.is-exiting {
  --fade-ms: 900ms;
  opacity: 0;
  pointer-events: none;
}

.scene-layer[aria-hidden="true"] {
  display: none;
}

.scene-layer img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.scene-layer.is-customer-avatar {
  height: calc(var(--w) / var(--stage-h) * 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.scene-layer.is-customer-avatar[aria-hidden="true"] {
  display: none;
}

.scene-layer.is-customer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.character-nameplate {
  position: absolute;
  left: 50%;
  top: calc(100% - 2px);
  z-index: 2;
  min-width: 2.65em;
  padding: 2px 6px 3px;
  border-radius: 4px 5px 4px 5px;
  color: rgba(79, 65, 54, 0.86);
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 2px 5px rgba(80, 66, 54, 0.1);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.76cqw, 13px);
  font-weight: 400;
  line-height: 1.1;
  pointer-events: none;
  transform: translateX(-50%) rotate(-1deg);
  white-space: nowrap;
}

.scene-layer.is-walking img {
  animation: paper-walk 1040ms ease-in-out infinite;
  transform-origin: 50% 88%;
}

.scene-layer.is-idle-bobbing img {
  animation: paper-idle 1680ms ease-in-out infinite;
  transform-origin: 50% 88%;
}

.scene.is-day-paused .scene-layer img,
.scene.is-day-paused .attention-mark,
.scene.is-day-paused .cash-pop,
.scene.is-day-paused .watering-effect,
.scene.is-day-paused .customer-patience,
.scene.is-day-paused .gramophone-notes i {
  animation-play-state: paused !important;
}

.gramophone-notes {
  position: absolute;
  left: 71%;
  top: -24%;
  z-index: 2;
  width: 92%;
  height: 104%;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(19px, 1.8cqw, 30px);
  line-height: 1;
  pointer-events: none;
}

.gramophone-notes i {
  position: absolute;
  display: block;
  font-style: normal;
  opacity: 0.4;
  animation: gramophone-note 3.3s ease-out infinite;
  text-shadow: 0 1px 0 rgba(255, 252, 246, 0.72);
}

.gramophone-notes i:nth-child(1) {
  left: 1%;
  top: 58%;
  animation-delay: 0s;
}

.gramophone-notes i:nth-child(2) {
  left: 28%;
  top: 39%;
  animation-delay: 1.1s;
}

.gramophone-notes i:nth-child(3) {
  left: 9%;
  top: 17%;
  animation-delay: 2.2s;
}

.scene-layer[data-track-id="rainy-aisle"] .gramophone-notes {
  color: #6b9297;
}

.scene-layer[data-track-id="after-closing"] .gramophone-notes {
  color: #a7783e;
}

.scene-layer[data-track-id="morning-pages"] .gramophone-notes {
  color: #c97659;
}

.scene-layer.is-cashing img {
  animation: cashier-ring 900ms ease-in-out 1;
  transform-origin: 50% 78%;
}

.cash-pop {
  position: absolute;
  z-index: 980;
  display: grid;
  justify-items: center;
  color: #5a493b;
  font-family: var(--font-display);
  line-height: 1.1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: cash-pop 2200ms cubic-bezier(0.2, 0.75, 0.32, 1) forwards;
}

.cash-pop strong {
  font-size: clamp(13px, 1.25cqw, 22px);
  font-weight: 500;
}

.cash-pop span {
  margin-top: 0.12cqw;
  color: rgba(80, 66, 54, 0.58);
  font-family: var(--font-ui);
  font-size: var(--day-small-size);
}

.cash-pop.is-hud-cash {
  z-index: 1010;
  min-width: clamp(78px, 6.4cqw, 108px);
  text-align: right;
  animation-name: cash-pop-down;
  transition: top 180ms ease-out, left 180ms ease-out;
}

.scene-clue-marker {
  position: absolute;
  z-index: 138;
  width: clamp(25px, 2.15cqw, 36px);
  height: clamp(20px, 1.7cqw, 29px);
  margin: 0;
  padding: 0 0 5px;
  border: 0;
  border-radius: 50% 48% 50% 46%;
  color: rgba(79, 65, 54, 0.72);
  background: rgba(255, 251, 243, 0.88);
  box-shadow: 1px 2px 5px rgba(80, 66, 54, 0.12);
  cursor: pointer;
  font-family: var(--font-display-soft);
  font-size: clamp(17px, 1.45cqw, 25px);
  line-height: 0.76;
  transition: transform 160ms ease, box-shadow 160ms ease;
  transform: translate(-50%, -100%) rotate(-4deg);
}

.scene-clue-marker:hover,
.scene-clue-marker:focus-visible {
  box-shadow: 2px 4px 7px rgba(80, 66, 54, 0.18);
  outline: 0;
  transform: translate(-50%, -106%) rotate(1deg);
}

.scene-clue-marker:hover::after,
.scene-clue-marker:focus-visible::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  padding: 4px 7px;
  color: rgba(79, 65, 54, 0.88);
  background: rgba(255, 251, 243, 0.96);
  box-shadow: 1px 2px 5px rgba(80, 66, 54, 0.1);
  content: attr(data-hover-text);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.72cqw, 12px);
  line-height: 1.2;
  pointer-events: none;
  transform: translateX(-50%) rotate(-1deg);
  white-space: nowrap;
}

.scene-layer.is-phone-ringing img {
  animation: phone-ring 240ms ease-in-out infinite;
  filter: drop-shadow(0 6px 7px rgba(80, 66, 54, 0.18));
  transform-origin: 50% 78%;
}

.scene[data-editing="true"] .scene-layer {
  cursor: grab;
}

.scene[data-editing="false"] .scene-layer {
  cursor: default;
}

.scene[data-editing="false"] .scene-layer.is-interactive {
  cursor: pointer;
}

.scene[data-editing="false"] .scene-layer.is-interactive:hover {
  filter: drop-shadow(0 9px 9px rgba(94, 70, 42, 0.22)) brightness(1.02);
}

.scene[data-editing="false"] .scene-layer.is-interactive:hover img {
  filter: drop-shadow(0 5px 4px rgba(80, 66, 54, 0.12));
}

.scene[data-editing="false"] .scene-layer.is-watering-target:hover::after {
  content: attr(data-water-hint);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  z-index: 2;
  padding: 4px 7px;
  color: #514337;
  background: rgba(255, 250, 241, 0.96);
  clip-path: polygon(2% 5%, 98% 0, 100% 94%, 6% 100%, 0 15%);
  font-family: var(--font-ui);
  font-size: clamp(11px, 0.78cqw, 13px);
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.scene-layer.is-watering-target.is-watered-today img {
  filter: saturate(1.07) brightness(1.035);
}

.watering-effect {
  position: absolute;
  z-index: 890;
  width: clamp(64px, 7cqw, 112px);
  pointer-events: none;
  transform-origin: 62% 78%;
  animation: watering-can-pour 1.25s ease-in-out both;
}

.watering-effect img {
  display: block;
  width: 100%;
  height: auto;
}

.watering-effect i {
  position: absolute;
  left: 15%;
  top: 37%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: rgba(107, 146, 151, 0.72);
  transform: rotate(35deg);
  transform-origin: top center;
  animation: watering-stream 1.25s ease-in-out both;
}

@keyframes watering-can-pour {
  0% { opacity: 0; transform: translate(14px, -8px) rotate(-6deg) scale(0.76); }
  18% { opacity: 1; transform: translate(0, 0) rotate(-6deg) scale(0.84); }
  42%, 68% { opacity: 1; transform: translate(-3px, 2px) rotate(-25deg) scale(0.84); }
  100% { opacity: 0; transform: translate(10px, -5px) rotate(-12deg) scale(0.76); }
}

@keyframes watering-stream {
  0%, 28%, 78%, 100% { height: 0; opacity: 0; }
  38%, 68% { height: clamp(35px, 4cqw, 64px); opacity: 1; }
}

.book-hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: transparent;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.book-hotspot .book-meta {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  display: grid;
  gap: 2px;
  min-width: max-content;
  padding: 5px 7px;
  color: #fffaf2;
  background: rgba(80, 66, 54, 0.88);
  font-family: var(--font-ui);
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.book-hotspot .book-meta strong {
  font-family: var(--font-display);
  font-size: clamp(10px, 0.82cqw, 14px);
  font-weight: 500;
}

.book-hotspot .book-meta small {
  color: rgba(255, 250, 242, 0.78);
  font-size: clamp(8px, 0.61cqw, 10px);
}

.book-hotspot img {
  position: absolute;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0) scale(1);
  transform-origin: 50% 100%;
  transition: opacity 150ms ease, transform 200ms cubic-bezier(0.2, 0.8, 0.25, 1), filter 200ms ease;
}

.book-hotspot img.archive-book-art {
  border-radius: 2px 3px 3px 2px;
}

.book-hotspot img.archive-book-art-guestbook {
  filter: hue-rotate(28deg) saturate(0.78);
}

.book-hotspot:hover,
.book-hotspot:focus-visible {
  background: rgba(255, 250, 242, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 242, 0.72), 0 2px 5px rgba(80, 66, 54, 0.12);
  outline: 0;
}

.book-hotspot:hover img,
.book-hotspot:focus-visible img {
  opacity: 1;
  filter: drop-shadow(0 5px 4px rgba(80, 66, 54, 0.26));
  transform: translateY(-3px) scale(1.03);
}

.book-hotspot:hover img.archive-book-art-guestbook,
.book-hotspot:focus-visible img.archive-book-art-guestbook {
  filter: hue-rotate(28deg) saturate(0.78) drop-shadow(0 5px 4px rgba(80, 66, 54, 0.26));
}

.book-hotspot:hover .book-meta,
.book-hotspot:focus-visible .book-meta {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Touch screens cannot discover the desktop hover labels, and the original
   book-spine hit boxes become only a few pixels wide after the stage scales
   down. Keep the visual coordinates exact while extending the tappable area
   around each individual shelf item. */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .book-hotspot::before {
    position: absolute;
    inset: -12px -11px;
    border-radius: 8px;
    content: "";
  }

  .book-hotspot:active::before {
    background: rgba(107, 146, 151, 0.14);
    box-shadow: inset 0 0 0 1px rgba(107, 146, 151, 0.34);
  }

  .book-hotspot:active img {
    opacity: 0.82;
    transform: translateY(-2px) scale(1.035);
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .book-hotspot-root.is-touch-hinting .book-hotspot img {
    animation: touch-shelf-book-cue 2.6s ease-out both;
  }

  .book-hotspot-root.is-touch-hinting .book-hotspot:nth-child(2) img { animation-delay: 180ms; }
  .book-hotspot-root.is-touch-hinting .book-hotspot:nth-child(3) img { animation-delay: 360ms; }
  .book-hotspot-root.is-touch-hinting .book-hotspot:nth-child(4) img { animation-delay: 540ms; }
}

@keyframes touch-shelf-book-cue {
  0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
  24% { opacity: 0.74; transform: translateY(-3px) scale(1.045); }
  58% { opacity: 0.24; transform: translateY(-1px) scale(1.018); }
}

.scene-layer.is-click-wobbling img {
  animation: layer-click-wobble 420ms ease-in-out 1;
  transform-origin: 50% 82%;
}

.scene[data-editing="true"] .scene-layer:hover,
.scene[data-editing="true"] .scene-layer.is-selected {
  border-color: rgba(234, 107, 53, 0.85);
  outline: 2px solid rgba(255, 255, 255, 0.85);
}

.scene[data-editing="true"] .scene-layer.is-selected::after {
  content: attr(data-label);
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  padding: 3px 7px;
  border-radius: 5px;
  color: #fffaf2;
  background: rgba(80, 66, 54, 0.9);
  font-size: 12px;
  white-space: nowrap;
}

.attention-mark {
  position: absolute;
  z-index: 910;
  display: block;
  width: auto;
  height: auto;
  color: #dd4e1f;
  font-family: var(--attention-font, var(--font-display));
  font-size: var(--attention-size, clamp(34px, 3.6vw, 64px));
  line-height: 1;
  text-shadow: none;
  pointer-events: none;
  transform: none;
}

.attention-mark.is-nudging {
  animation: attention-nudge 1.45s ease-in-out infinite;
  transform-origin: 50% 85%;
}

.attention-mark[data-state="opened"] {
  color: #6b9297;
}

.attention-mark[data-state="done"] {
  display: none;
}

.attention-preview {
  opacity: 0.9;
  filter: drop-shadow(0 0 0 rgba(255, 250, 241, 0.8));
}

.npc-dialogue-hint {
  position: absolute;
  z-index: 909;
  display: grid;
  place-items: center;
  width: clamp(20px, 1.75cqw, 30px);
  height: clamp(15px, 1.22cqw, 21px);
  border: 1px solid rgba(107, 146, 151, 0.28);
  border-radius: 46% 54% 48% 52% / 54% 46% 54% 46%;
  color: rgba(87, 126, 132, 0.72);
  background: rgba(255, 250, 242, 0.76);
  box-shadow: 0 2px 6px rgba(80, 66, 54, 0.08);
  font-family: var(--font-display-soft);
  font-size: clamp(13px, 1.08cqw, 19px);
  line-height: 0.65;
  opacity: 0.68;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-2deg);
  animation: npc-hint-arrive 620ms ease-out both, npc-hint-breathe 2600ms ease-in-out 680ms infinite;
}

.scene.is-closing-surface .npc-dialogue-hint {
  display: none;
}

.npc-dialogue-hint::after {
  content: "妮基好像想说什么";
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  padding: 3px 6px;
  color: #fffaf2;
  background: rgba(80, 66, 54, 0.88);
  font-family: var(--font-ui);
  font-size: clamp(9px, 0.7cqw, 12px);
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.scene.is-nikki-hovering .npc-dialogue-hint {
  opacity: 1;
  filter: drop-shadow(0 4px 5px rgba(80, 66, 54, 0.13));
}

.scene.is-nikki-hovering .npc-dialogue-hint::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes npc-hint-arrive {
  from { opacity: 0; transform: translate(-50%, 15%) rotate(-5deg) scale(0.82); }
  to { opacity: 0.68; transform: translate(-50%, -50%) rotate(-2deg) scale(1); }
}

@keyframes npc-hint-breathe {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -1px; }
}

body.is-editing [data-ui-id] {
  cursor: grab;
}

body.is-editing [data-ui-id].is-ui-selected {
  outline: 2px solid rgba(58, 122, 216, 0.9);
  outline-offset: 3px;
}

.ui-preview-panel {
  pointer-events: auto;
}

@keyframes paper-walk {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}

@keyframes paper-idle {
  0%,
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }

  50% {
    transform: translateY(-1.5px) rotate(1.2deg);
  }
}

@keyframes cashier-ring {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  28% {
    transform: translateY(-3px) rotate(-1.8deg);
  }

  58% {
    transform: translateY(1px) rotate(1.5deg);
  }

  78% {
    transform: translateY(-1px) rotate(-0.7deg);
  }
}

@keyframes cash-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 14%) scale(0.88);
  }

  15% {
    opacity: 1;
    transform: translate(-50%, -18%) scale(1.06);
  }

  62% {
    opacity: 1;
    transform: translate(-50%, -42%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -72%) scale(0.98);
  }
}

@keyframes gramophone-note {
  0%,
  12% {
    opacity: 0.38;
    transform: translate(0, 7px) rotate(-8deg) scale(0.76);
  }

  24% {
    opacity: 0.86;
  }

  68% {
    opacity: 0.74;
    transform: translate(19px, -31px) rotate(8deg) scale(1);
  }

  100% {
    opacity: 0.3;
    transform: translate(31px, -47px) rotate(-3deg) scale(1.06);
  }
}

@keyframes cash-pop-down {
  0% {
    opacity: 0;
    transform: translate(-50%, -18%) scale(0.88);
  }

  15% {
    opacity: 1;
    transform: translate(-50%, 2%) scale(1.06);
  }

  62% {
    opacity: 1;
    transform: translate(-50%, 30%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, 52%) scale(0.98);
  }
}

@keyframes phone-ring {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  18% {
    transform: translateX(-3px) rotate(-9deg);
  }

  36% {
    transform: translateX(3px) rotate(8deg);
  }

  54% {
    transform: translateX(-2px) rotate(-7deg);
  }

  72% {
    transform: translateX(2px) rotate(6deg);
  }
}

@keyframes layer-click-wobble {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  20% {
    transform: translateY(-1.5px) rotate(-2.4deg);
  }
  42% {
    transform: translateY(1px) rotate(2.1deg);
  }
  64% {
    transform: translateY(-0.7px) rotate(-1.2deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes attention-nudge {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  20% {
    transform: translateY(-2px) rotate(-5deg) scale(1.03);
  }

  40% {
    transform: translateY(0) rotate(4deg) scale(1);
  }

  58% {
    transform: translateY(-1px) rotate(-2deg) scale(1.02);
  }
}

.hud {
  position: absolute;
  top: 1.2%;
  left: 2.8%;
  right: 2.8%;
  z-index: 900;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(30px, 2.45cqw, 41px);
}

body:not(.is-editing) .scene:not(.has-started) .hud {
  display: none;
}

.hud-book,
.hud-break {
  position: relative;
  flex: 0 0 auto;
  width: clamp(34px, 3.1cqw, 52px);
  height: clamp(39px, 3.55cqw, 59px);
  padding: 0;
  border: 0;
  background: transparent;
  transition: filter 160ms ease, transform 160ms ease;
}

.hud-book:hover,
.hud-book:focus-visible,
.hud-break:hover,
.hud-break:focus-visible,
.hud-break.is-paused {
  filter: drop-shadow(0 5px 5px rgba(80, 66, 54, 0.18));
  transform: translateY(-2px) scale(1.04);
  outline: 0;
}

.hud-break img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.hud-book img,
.hud-break img,
.hud-clock-icon,
.hud-weather img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hud-actions {
  display: grid;
  justify-items: end;
}

.hud-tool-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(11px, 0.95cqw, 16px);
}

.hud-status {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: clamp(50px, 4.35cqw, 73px);
  margin-left: 0;
  padding: clamp(7px, 0.58cqw, 10px) clamp(10px, 0.82cqw, 14px) clamp(7px, 0.58cqw, 10px)
    clamp(31px, 2.55cqw, 43px);
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: 0;
}

.hud-status::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: rgba(255, 250, 242, 0.62);
  clip-path: polygon(2% 3%, 53% 0, 98% 4%, 100% 88%, 95% 100%, 44% 98%, 3% 100%, 0 13%);
  filter: drop-shadow(1px 2px 2px rgba(80, 66, 54, 0.09));
  pointer-events: none;
}

.hud-clock-icon {
  position: absolute;
  top: 50%;
  left: clamp(-27px, -1.65cqw, -18px);
  width: clamp(45px, 3.85cqw, 64px);
  height: auto;
  margin: 0;
  z-index: 1;
  filter: drop-shadow(0 2px 3px rgba(73, 58, 40, 0.1));
  transform: translateY(-50%);
}

.hud-status-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: clamp(6px, 0.46cqw, 8px);
  min-width: clamp(120px, 9.8cqw, 164px);
}

.hud-time-line,
.hud-meta-line {
  display: flex;
  align-items: baseline;
}

.hud-time-line {
  gap: clamp(7px, 0.52cqw, 9px);
}

.hud-meta-line {
  align-items: center;
  gap: clamp(9px, 0.72cqw, 12px);
}

.day-label,
.time-label {
  display: block;
}

.day-label {
  color: rgba(80, 66, 54, 0.6);
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.86cqw, 14px);
  line-height: 1;
}

.time-label {
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.34cqw, 22px);
  line-height: 1;
}

.hud-time-divider {
  display: none;
}

.hud-weather {
  display: inline-flex;
  align-items: center;
  gap: clamp(3px, 0.26cqw, 5px);
  color: rgba(79, 65, 54, 0.7);
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.82cqw, 14px);
  line-height: 1;
}

.hud-weather img {
  width: clamp(16px, 1.3cqw, 22px);
  height: clamp(16px, 1.3cqw, 22px);
}

.hud-revenue {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: clamp(3px, 0.26cqw, 5px);
  margin: 0;
  padding-left: clamp(9px, 0.7cqw, 12px);
  border-left: 1px solid rgba(111, 91, 66, 0.2);
  line-height: 1.1;
}

.hud-revenue strong {
  color: #a7783e;
  font-family: var(--font-display);
  font-size: clamp(12px, 0.94cqw, 16px);
  font-weight: 500;
  letter-spacing: 0;
}

.money-coin {
  position: relative;
  display: inline-grid;
  width: clamp(13px, 1.02cqw, 17px);
  height: clamp(13px, 1.02cqw, 17px);
  place-items: center;
  border: 1px solid rgba(151, 103, 48, 0.85);
  border-radius: 49% 52% 48% 51%;
  color: #9c6c34;
  background: #e5c172;
  box-shadow: inset 0 0 0 2px rgba(255, 242, 204, 0.48), 1px 1px 0 rgba(112, 75, 35, 0.14);
  font-family: var(--font-display);
  font-size: clamp(8px, 0.62cqw, 11px);
  font-weight: 500;
  line-height: 1;
  transform: rotate(-7deg);
}

.money-coin::after {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(151, 103, 48, 0.36);
  border-radius: 52% 47% 51% 48%;
  content: "";
  pointer-events: none;
}

.hud-book::after,
.hud-break::after {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 1;
  padding: 3px 6px;
  border-radius: 3px;
  color: rgba(79, 65, 54, 0.86);
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 2px 6px rgba(80, 66, 54, 0.1);
  content: attr(data-tooltip);
  font-family: var(--font-display-soft);
  font-size: clamp(9px, 0.68cqw, 11px);
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: nowrap;
}

.hud-book:hover::after,
.hud-book:focus-visible::after,
.hud-break:hover::after,
.hud-break:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Keep the top-right controls compact on tablets and short landscape phones.
   Container queries follow the rendered game stage rather than the browser's
   outer width, so the HUD also behaves correctly inside the persistent BGM iframe. */
@container (max-width: 1320px) {
  .hud {
    top: 1%;
    right: 2.1%;
    gap: clamp(18px, 1.75cqw, 24px);
  }

  .hud-tool-row {
    gap: clamp(8px, 0.78cqw, 11px);
  }

  .hud-book,
  .hud-break {
    width: clamp(32px, 3.15cqw, 42px);
    height: clamp(37px, 3.6cqw, 48px);
  }

  .hud-status {
    min-height: clamp(44px, 4.45cqw, 58px);
    padding: clamp(6px, 0.55cqw, 8px) clamp(8px, 0.76cqw, 10px) clamp(6px, 0.55cqw, 8px)
      clamp(27px, 2.65cqw, 35px);
  }

  .hud-clock-icon {
    left: clamp(-23px, -1.75cqw, -18px);
    width: clamp(40px, 3.9cqw, 51px);
  }

  .hud-status-copy {
    gap: clamp(4px, 0.42cqw, 6px);
    min-width: clamp(104px, 9.7cqw, 128px);
  }

  .day-label {
    font-size: clamp(10px, 0.9cqw, 12px);
  }

  .time-label {
    font-size: clamp(15px, 1.4cqw, 18px);
  }

  .hud-weather {
    font-size: clamp(10px, 0.86cqw, 12px);
  }

  .hud-weather img {
    width: clamp(14px, 1.3cqw, 17px);
    height: clamp(14px, 1.3cqw, 17px);
  }

  .hud-revenue {
    gap: clamp(2px, 0.24cqw, 4px);
    padding-left: clamp(7px, 0.64cqw, 9px);
  }

  .hud-revenue strong {
    font-size: clamp(11px, 0.98cqw, 13px);
  }

  .money-coin {
    width: clamp(12px, 1.02cqw, 14px);
    height: clamp(12px, 1.02cqw, 14px);
    font-size: clamp(7px, 0.62cqw, 9px);
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .scene-wrap {
    padding: max(6px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .scene {
    width: min(100%, calc((100vh - 12px) * 1672 / 941));
  }

  .hud {
    right: 1.7%;
    gap: 12px;
  }

  .hud-tool-row {
    gap: 14px;
  }

  .hud-book,
  .hud-break {
    width: 31px;
    height: 36px;
  }

  .hud-status {
    min-height: 40px;
    padding: 5px 7px 5px 25px;
  }

  .hud-clock-icon {
    left: -17px;
    width: 37px;
  }

  .hud-status-copy {
    gap: 3px;
    min-width: 96px;
  }

  .hud-time-line {
    gap: 5px;
  }

  .hud-meta-line {
    gap: 6px;
  }

  .day-label,
  .hud-weather {
    font-size: 9px;
  }

  .time-label {
    font-size: 14px;
  }

  .hud-weather img {
    width: 13px;
    height: 13px;
  }

  .hud-revenue {
    padding-left: 6px;
  }

  .hud-revenue strong {
    font-size: 10px;
  }

  .money-coin {
    width: 11px;
    height: 11px;
    font-size: 7px;
  }

  .hud-book::after,
  .hud-break::after {
    display: none;
  }
}

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 920;
  display: block;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-display);
  letter-spacing: 0;
  opacity: 1;
  transition: opacity 420ms ease, visibility 0s linear 0s;
}

html.is-auto-starting .start-screen,
html.is-auto-starting .start-actions {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.is-editing .start-screen {
  display: none;
}

.scene.is-start-screen-hidden .start-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

body.is-editing.is-start-previewing .start-screen {
  visibility: visible;
  display: block;
  opacity: 1;
  pointer-events: auto;
  cursor: default;
}

body.is-editing.is-start-previewing .layer-root,
body.is-editing.is-start-previewing .hud {
  opacity: 0;
  pointer-events: none;
}

.start-door {
  position: absolute;
  left: var(--start-door-x);
  top: var(--start-door-y);
  display: block;
  width: var(--start-door-size);
  perspective: 520px;
  transform: translate(-50%, -50%);
}

body.is-editing.is-start-previewing .start-tunable {
  cursor: grab;
  outline: 1px solid transparent;
  outline-offset: 3px;
}

body.is-editing.is-start-previewing .start-tunable:hover,
body.is-editing.is-start-previewing .start-tunable.is-start-selected {
  outline-color: rgba(234, 107, 53, 0.9);
}

body.is-editing.is-start-previewing .start-tunable.is-start-selected::after {
  content: attr(data-start-label);
  position: absolute;
  left: 0;
  bottom: calc(100% + 5px);
  padding: 3px 7px;
  border-radius: 5px;
  color: #fffaf2;
  background: rgba(80, 66, 54, 0.9);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

.start-door-img {
  display: block;
  width: 100%;
  height: auto;
}

.closed-sign {
  position: absolute;
  left: var(--start-sign-x);
  top: var(--start-sign-y);
  display: grid;
  place-items: center;
  width: var(--start-sign-width);
  transform: translate(-50%, -50%);
  transform-origin: 50% 18%;
  transform-style: preserve-3d;
  transition: filter 220ms ease;
}

.scene.is-flipping-sign .closed-sign {
  animation: sign-flip 820ms cubic-bezier(0.2, 0.72, 0.18, 1) both;
  filter: drop-shadow(0 7px 7px rgba(72, 55, 36, 0.18));
}

.closed-sign img {
  display: block;
  width: 100%;
}

.closed-sign span {
  position: absolute;
  left: var(--start-closed-x);
  top: var(--start-closed-y);
  color: #5a4a3c;
  font-family: var(--start-closed-font);
  font-size: var(--start-closed-size);
  letter-spacing: var(--start-closed-spacing);
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
  backface-visibility: hidden;
}

.start-title {
  position: absolute;
  left: var(--start-title-x);
  top: var(--start-title-y);
  color: #4f443a;
  font-family: var(--start-title-font);
  font-size: var(--start-title-size);
  font-weight: 700;
  letter-spacing: var(--start-title-spacing);
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.start-hint {
  position: absolute;
  left: var(--start-hint-x);
  bottom: max(0px, calc(var(--start-hint-y) - 4%));
  color: rgba(80, 66, 54, 0.34);
  font-family: var(--start-hint-font);
  font-size: var(--start-hint-size);
  letter-spacing: var(--start-hint-spacing);
  white-space: nowrap;
  transform: translateX(-50%);
}

.start-hint[aria-hidden="true"] {
  display: none;
}

.start-actions {
  position: absolute;
  left: 50%;
  top: calc(var(--start-title-y) + clamp(30px, 3.2cqw, 52px));
  z-index: 930;
  display: grid;
  justify-items: center;
  gap: clamp(7px, 0.55cqw, 10px);
  transform: translateX(-50%);
  transition: opacity 420ms ease, visibility 0s linear 0s;
}

.start-action-button,
.start-save-button {
  min-width: clamp(92px, 8.4cqw, 132px);
  min-height: clamp(31px, 2.7cqw, 42px);
  padding: 0.45em 1.15em 0.5em;
  border-radius: 5px 4px 6px 4px;
  font-family: var(--font-display-soft);
  font-size: clamp(12px, 0.95cqw, 16px);
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.start-action-button {
  border: 0;
  border-radius: 0;
  color: #4f7479;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: none;
  clip-path: polygon(2% 7%, 96% 0, 100% 88%, 94% 100%, 5% 96%, 0 14%);
  filter: drop-shadow(3px 4px 0 rgba(107, 146, 151, 0.16));
  transform: rotate(-0.35deg);
}

.start-action-button:hover,
.start-action-button:focus-visible {
  color: #405f63;
  background: rgba(255, 250, 241, 0.98);
  box-shadow: none;
  filter: drop-shadow(4px 5px 0 rgba(107, 146, 151, 0.2));
  outline: none;
  transform: translateY(-2px) rotate(-0.35deg);
}

.start-action-button:active {
  box-shadow: none;
  filter: drop-shadow(1px 1px 0 rgba(107, 146, 151, 0.14));
  transform: translateY(1px) rotate(-0.35deg);
}

.start-action-button.is-unavailable,
.start-action-button.is-unavailable:hover,
.start-action-button.is-unavailable:focus-visible {
  color: rgba(80, 66, 54, 0.5);
  background: rgba(245, 239, 229, 0.9);
  filter: drop-shadow(2px 3px 0 rgba(80, 66, 54, 0.08));
  cursor: default;
  transform: rotate(-0.35deg);
}

.start-unavailable-notice {
  max-width: 24em;
  margin: 0;
  color: rgba(80, 66, 54, 0.5);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.76cqw, 13px);
  line-height: 1.45;
  text-align: center;
}

.start-save-button {
  min-height: auto;
  padding: 0.25em 0.65em;
  border: 0;
  color: rgba(95, 133, 138, 0.78);
  background: transparent;
  box-shadow: none;
  font-size: clamp(10px, 0.78cqw, 13px);
}

.start-save-button:hover,
.start-save-button:focus-visible {
  color: #4f7479;
  outline: none;
  transform: translateY(-1px);
}

.scene.is-start-screen-hidden .start-actions,
body.is-editing .start-actions {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.customer-patience {
  position: absolute;
  z-index: 850;
  display: grid;
  justify-items: center;
  gap: clamp(2px, 0.2cqw, 4px);
  width: clamp(82px, 7.3cqw, 118px);
  padding: clamp(3px, 0.28cqw, 5px) clamp(5px, 0.42cqw, 7px);
  background: rgba(255, 250, 242, 0.72);
  clip-path: polygon(2% 3%, 53% 0, 98% 4%, 100% 88%, 95% 100%, 44% 98%, 3% 100%, 0 13%);
  filter: drop-shadow(1px 2px 2px rgba(80, 66, 54, 0.09));
  pointer-events: none;
  transform: translateX(-50%);
}

.customer-patience img {
  display: none;
}

.customer-patience-detail {
  display: contents;
}

.customer-patience-detail b {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.24cqw, 4px);
  color: rgba(80, 66, 54, 0.8);
  font-family: var(--font-ui);
  font-size: clamp(9px, 0.76cqw, 12px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.customer-patience-detail b::before {
  width: clamp(12px, 0.9cqw, 15px);
  height: clamp(12px, 0.9cqw, 15px);
  content: "";
  background: url("../res/shizhong.png") center / contain no-repeat;
}

.customer-patience-detail > span {
  display: block;
  width: 78%;
  height: clamp(4px, 0.35cqw, 6px);
  overflow: hidden;
  border-radius: 4px;
  background: rgba(80, 66, 54, 0.13);
}

.customer-patience-detail i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #6b9297;
  transform-origin: left center;
  transition: transform 260ms linear, background-color 180ms ease;
}

.customer-patience[data-urgent="true"] i {
  background: #d86a46;
}

.customer-patience[data-urgent="true"] {
  animation: patience-nudge 460ms ease-in-out infinite alternate;
}

@keyframes patience-nudge {
  from { transform: translateX(-50%) rotate(-1.4deg); }
  to { transform: translateX(-50%) rotate(1.4deg); }
}

.scene-toast {
  position: absolute;
  top: 5.8%;
  left: 50%;
  z-index: 1200;
  max-width: min(410px, 55%);
  padding: 0.42cqw 1.05cqw 0.46cqw 1.22cqw;
  border: 1px solid rgba(107, 146, 151, 0.22);
  border-radius: 0;
  color: #514337;
  background: rgba(249, 244, 235, 0.94);
  box-shadow: none;
  clip-path: polygon(1% 2%, 18% 0, 57% 1%, 99% 0, 100% 87%, 97% 100%, 34% 98%, 1% 100%, 0 16%);
  filter: drop-shadow(3px 4px 0 rgba(107, 146, 151, 0.1));
  font-family: var(--font-ui);
  font-size: var(--day-body-size);
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.scene-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.opening-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 940;
  display: grid;
  justify-items: center;
  min-width: clamp(176px, 15cqw, 256px);
  padding: clamp(15px, 1.22cqw, 21px) clamp(24px, 2cqw, 34px) clamp(14px, 1.15cqw, 19px);
  border: 0;
  border-radius: 0;
  color: #514337;
  background: rgba(250, 245, 236, 0.98);
  clip-path: polygon(2% 4%, 24% 1%, 64% 2%, 98% 0, 100% 91%, 95% 100%, 52% 98%, 5% 100%, 0 87%, 1% 16%);
  filter: drop-shadow(7px 9px 0 rgba(80, 66, 54, 0.11));
  font-family: var(--font-display-soft);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -45%) rotate(-1.1deg) scale(0.94);
  transition: opacity 220ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.25, 1);
}

.opening-banner strong {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.15cqw, 37px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.06em;
}

.opening-banner-kicker {
  order: -1;
  margin-bottom: clamp(4px, 0.38cqw, 7px);
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.88cqw, 16px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.opening-banner-goal {
  max-width: 16em;
  margin: clamp(8px, 0.72cqw, 12px) 0 0;
  color: rgba(80, 66, 54, 0.66);
  font-family: var(--font-ui);
  font-size: clamp(11px, 0.88cqw, 16px);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: 0;
  text-align: center;
}

.opening-banner:not(.has-goal) {
  min-width: clamp(164px, 13.6cqw, 228px);
  padding-block: clamp(16px, 1.34cqw, 23px) clamp(15px, 1.18cqw, 20px);
}

.opening-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-0.3deg) scale(1);
}

.break-overlay {
  position: absolute;
  inset: 0;
  z-index: 980;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: 8% 0 4.1%;
  color: #514337;
  background: rgba(250, 246, 238, 0.91);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.break-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.break-overlay-main {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 0.7cqw;
  margin-top: 3.5%;
  transform: translateY(5px);
  transition: transform 220ms ease;
}

.break-overlay.is-visible .break-overlay-main {
  transform: translateY(0);
}

.break-overlay-main img {
  width: clamp(48px, 5.3cqw, 90px);
  height: auto;
  filter: drop-shadow(0 7px 8px rgba(80, 66, 54, 0.12));
}

.break-overlay-main p {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--day-body-size);
  font-weight: 400;
}

.break-save-button {
  margin-top: clamp(4px, 0.35cqw, 7px);
  padding: clamp(5px, 0.4cqw, 7px) clamp(11px, 0.88cqw, 15px);
  border: 0;
  color: #5f858a;
  background: rgba(255, 252, 246, 0.72);
  clip-path: polygon(2% 5%, 95% 0, 100% 91%, 7% 100%, 0 13%);
  font-family: var(--font-ui);
  font-size: var(--day-small-size);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease;
}

.break-save-button:hover {
  color: #514337;
  transform: translateY(-1px);
}

.break-overlay-hint {
  color: rgba(80, 66, 54, 0.42);
  font-family: var(--font-ui);
  font-size: var(--day-small-size);
}

.day-panel {
  position: absolute;
  z-index: 960;
  color: #514337;
  font-family: var(--font-ui);
  letter-spacing: 0;
  animation: day-panel-arrive 240ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.save-panel {
  --save-title-size: clamp(20px, 1.48cqw, 25px);
  --save-body-size: clamp(13px, 0.98cqw, 16px);
  --save-meta-size: clamp(11px, 0.78cqw, 13px);
  left: 50%;
  top: 50%;
  z-index: 1010;
  display: grid;
  justify-items: center;
  width: min(470px, 39%);
  padding: clamp(24px, 2cqw, 34px) clamp(28px, 2.3cqw, 39px) clamp(22px, 1.8cqw, 30px);
  background: rgba(250, 245, 237, 0.985);
  clip-path: polygon(1% 2%, 24% 0, 71% 1%, 99% 0, 100% 94%, 95% 100%, 40% 98%, 4% 100%, 0 89%);
  filter: drop-shadow(7px 8px 0 rgba(107, 146, 151, 0.12));
  font-family: var(--font-ui);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-0.25deg);
}

.scene:has(.save-panel) .start-actions {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.scene:has(.save-panel) .break-overlay-main,
.scene:has(.save-panel) .break-overlay-hint {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.save-panel .day-panel-close {
  position: absolute;
  right: clamp(12px, 1cqw, 17px);
  top: clamp(10px, 0.85cqw, 14px);
}

.save-kicker {
  margin: 0;
  color: #6b9297;
  font-family: inherit;
  font-size: var(--save-meta-size);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.save-panel h2 {
  margin: clamp(8px, 0.66cqw, 11px) 0 0;
  color: #514337;
  font-family: var(--font-display-soft);
  font-size: var(--save-title-size);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.save-status {
  max-width: 19em;
  margin: clamp(8px, 0.68cqw, 12px) 0 0;
  color: rgba(80, 66, 54, 0.66);
  font-family: inherit;
  font-size: var(--save-body-size);
  line-height: 1.45;
}

.save-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: clamp(16px, 1.25cqw, 21px);
  padding: clamp(10px, 0.78cqw, 13px) 0;
  background: rgba(107, 146, 151, 0.055);
  clip-path: polygon(1% 4%, 98% 0, 100% 92%, 96% 100%, 2% 97%, 0 14%);
}

.save-stats span {
  display: grid;
  gap: clamp(3px, 0.25cqw, 5px);
  color: rgba(80, 66, 54, 0.47);
  font-family: inherit;
  font-size: var(--save-meta-size);
  line-height: 1.25;
}

.save-stats span + span {
  border-left: 1px solid rgba(107, 146, 151, 0.15);
}

.save-stats strong {
  color: #514337;
  font-family: inherit;
  font-size: var(--save-body-size);
  font-weight: 600;
}

.save-runtime-note {
  width: 100%;
  max-width: none;
  margin: clamp(14px, 1.1cqw, 18px) 0 0;
  color: rgba(80, 66, 54, 0.47);
  font-family: inherit;
  font-size: var(--save-meta-size);
  line-height: 1.5;
  white-space: nowrap;
}

.save-clear-button,
.save-cancel-button,
.save-confirm-button,
.save-return-button,
.save-replay-confirm-button {
  margin-top: clamp(13px, 1.05cqw, 18px);
  padding: clamp(6px, 0.48cqw, 8px) clamp(13px, 1.05cqw, 18px);
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--save-meta-size);
  cursor: pointer;
}

.save-clear-button {
  color: rgba(185, 82, 56, 0.8);
}

.save-return-button {
  margin-bottom: clamp(-3px, -0.2cqw, -2px);
  color: #5d858a;
}

.save-clear-button:hover,
.save-confirm-button:hover {
  color: #c76242;
}

.save-confirm-actions {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 1.15cqw, 20px);
  width: 100%;
  margin-top: clamp(20px, 1.55cqw, 27px);
}

.save-confirm-actions button {
  min-width: clamp(112px, 8.5cqw, 144px);
  min-height: clamp(40px, 3cqw, 48px);
  margin-top: 0;
  padding: clamp(9px, 0.68cqw, 12px) clamp(18px, 1.35cqw, 23px);
  color: #5d858a;
  background: #f6efe5;
  clip-path: polygon(2% 4%, 96% 0, 100% 13%, 98% 94%, 5% 100%, 0 87%, 1% 10%);
  filter: drop-shadow(2px 3px 0 rgba(80, 66, 54, 0.1));
  font-family: var(--font-ui);
  font-size: var(--day-option-size);
  line-height: 1.2;
  transition: color 150ms ease, background 150ms ease, filter 150ms ease, transform 150ms ease;
}

.save-replay-section {
  display: grid;
  gap: clamp(9px, 0.72cqw, 12px);
  width: 100%;
  margin-top: clamp(15px, 1.2cqw, 20px);
  padding-top: clamp(13px, 1cqw, 17px);
  border-top: 1px solid rgba(107, 146, 151, 0.16);
  text-align: left;
}

.save-replay-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.save-replay-heading strong {
  color: #514337;
  font-family: var(--font-display-soft);
  font-size: var(--save-body-size);
  font-weight: 400;
}

.save-replay-heading span,
.save-replay-legacy-note {
  color: rgba(80, 66, 54, 0.45);
  font-size: var(--save-meta-size);
}

.save-replay-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 0.58cqw, 10px);
}

.save-replay-days button {
  min-height: clamp(36px, 2.7cqw, 44px);
  padding: clamp(7px, 0.55cqw, 9px) clamp(10px, 0.8cqw, 13px);
  border: 0;
  color: #5d858a;
  background: rgba(107, 146, 151, 0.075);
  clip-path: polygon(2% 5%, 96% 0, 100% 14%, 98% 94%, 5% 100%, 0 86%, 1% 10%);
  font-family: var(--font-ui);
  font-size: var(--save-body-size);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.save-replay-days button:hover,
.save-replay-days button:focus-visible {
  color: #416d73;
  background: rgba(107, 146, 151, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.save-replay-legacy-note {
  width: 100%;
  margin: clamp(9px, 0.72cqw, 12px) 0 0;
  line-height: 1.45;
  text-align: left;
}

.save-confirm-actions button:hover,
.save-confirm-actions button:focus-visible {
  background: rgba(255, 250, 241, 0.98);
  filter: drop-shadow(3px 4px 0 rgba(80, 66, 54, 0.13));
  outline: none;
  transform: translateY(-1px);
}

.save-panel.is-confirming-clear,
.save-panel.is-confirming-replay {
  width: min(430px, 36%);
  padding-top: clamp(27px, 2.15cqw, 37px);
  padding-bottom: clamp(25px, 2cqw, 34px);
}

.save-panel.is-confirming-clear h2,
.save-panel.is-confirming-replay h2 {
  margin-top: clamp(10px, 0.8cqw, 14px);
  font-family: var(--font-display-soft);
  font-size: clamp(22px, 1.7cqw, 29px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.025em;
}

.save-panel.is-confirming-clear .save-status,
.save-panel.is-confirming-replay .save-status {
  max-width: 24em;
  margin-top: clamp(12px, 0.95cqw, 16px);
  line-height: 1.6;
}

.save-confirm-button {
  color: #bf6042;
}

.save-confirm-button:hover,
.save-confirm-button:focus-visible {
  color: #a84e36;
}

.save-replay-confirm-button {
  color: #5d858a;
}

.scene-clue-panel {
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  width: min(320px, 26%);
  padding: 1.3cqw 1.55cqw 1.4cqw;
  background: rgba(255, 250, 241, 0.975);
  box-shadow: 5px 6px 0 rgba(91, 73, 57, 0.09);
  clip-path: polygon(2% 2%, 99% 0, 100% 96%, 94% 100%, 5% 98%, 0 90%, 1% 7%);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-0.5deg);
}

.scene-clue-panel > p {
  margin: 0;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: var(--day-small-size);
  line-height: 1.35;
  text-align: center;
}

.scene-clue-panel h2 {
  max-width: calc(100% - 2.4cqw);
  margin: 0.45cqw 0 0;
  font-family: var(--font-display);
  font-size: var(--day-title-size);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.scene-clue-note {
  margin: 0.9cqw 0 1.05cqw;
  color: rgba(79, 65, 54, 0.76);
  font-family: var(--font-ui);
  font-size: var(--day-body-size);
  line-height: 1.62;
  text-align: center;
  overflow-wrap: break-word;
}

.scene-clue-panel.is-long-copy,
.scene-clue-panel.is-lost-and-found {
  width: min(430px, 34%);
  padding-right: clamp(26px, 2cqw, 34px);
  padding-left: clamp(26px, 2cqw, 34px);
}

.scene-clue-panel.is-long-copy .scene-clue-note,
.scene-clue-panel.is-lost-and-found .scene-clue-note {
  width: 100%;
  margin-top: 1cqw;
  line-height: 1.75;
  text-align: left;
  text-wrap: pretty;
}

.scene-clue-panel .primary-day-button {
  min-width: 8.5em;
}

.scene-clue-panel .day-panel-close {
  position: absolute;
  right: 0.75cqw;
  top: 0.62cqw;
}

@keyframes day-panel-arrive {
  from {
    opacity: 0;
    translate: 0 10px;
    scale: 0.985;
  }

  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

.music-panel {
  left: 50%;
  top: 50%;
  display: grid;
  justify-items: center;
  width: min(560px, 45%);
  padding: 1.28cqw 1.45cqw 1.35cqw;
  background: rgba(250, 245, 237, 0.985);
  clip-path: polygon(1% 1%, 31% 0, 68% 1%, 99% 0, 100% 95%, 96% 100%, 46% 98%, 4% 100%, 0 92%, 0 6%);
  filter: drop-shadow(7px 8px 0 rgba(107, 146, 151, 0.11));
  text-align: center;
  transform: translate(-50%, -50%);
}

.music-panel .day-panel-close {
  position: absolute;
  right: 1.05cqw;
  top: 0.85cqw;
}

.book-intro-panel {
  left: 50%;
  top: 50%;
  width: min(430px, 36%);
  padding: 1.55cqw 2cqw 1.7cqw;
  background: rgba(250, 245, 237, 0.99);
  clip-path: polygon(1% 1%, 33% 0, 67% 1%, 99% 0, 100% 96%, 96% 100%, 56% 98.5%, 4% 100%, 0 94%, 0 5%);
  filter: drop-shadow(7px 8px 0 rgba(107, 146, 151, 0.12));
  text-align: left;
  transform: translate(-50%, -50%);
}

.book-intro-panel .day-panel-close {
  position: absolute;
  right: 1.05cqw;
  top: 0.85cqw;
}

.book-intro-kicker {
  margin: 0 0 0.3cqw;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.9cqw, 15px);
  letter-spacing: 0.08em;
}

.book-intro-panel h2 {
  max-width: calc(100% - 2.4cqw);
  margin: 0;
  color: #514337;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.62cqw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.book-intro-author {
  margin: 0.45cqw 0 0;
  color: rgba(80, 66, 54, 0.55);
  font-family: var(--font-ui);
  font-size: clamp(11px, 0.84cqw, 14px);
}

.book-intro-body {
  display: grid;
  gap: 0.82cqw;
  margin-top: 1.2cqw;
  color: rgba(80, 66, 54, 0.88);
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.03cqw, 17px);
  line-height: 1.7;
}

.book-intro-body p {
  margin: 0;
}

.archive-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(440px, 36%);
  height: min(448px, 61%);
  padding: 1.45cqw 2.05cqw 1.55cqw;
  color: #514337;
  background: rgba(250, 245, 237, 0.985);
  clip-path: polygon(1% 0, 52% 0.7%, 99% 0, 100% 96%, 96% 100%, 43% 98.5%, 3% 100%, 0 93%, 0 4%);
  filter: drop-shadow(7px 8px 0 rgba(107, 146, 151, 0.11));
  text-align: left;
  transform: translate(-50%, -50%);
}

.archive-panel .day-panel-close {
  position: absolute;
  top: 0.9cqw;
  right: 1.05cqw;
}

.archive-panel-kicker {
  margin: 0 0 0.3cqw;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.9cqw, 15px);
  letter-spacing: 0.08em;
}

.archive-panel h2 {
  margin: 0;
  color: #514337;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.62cqw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.archive-panel-intro {
  margin: 0.42cqw 0 0;
  color: rgba(80, 66, 54, 0.55);
  font-family: var(--font-ui);
  font-size: clamp(11px, 0.84cqw, 14px);
}

.archive-page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  margin: 1.2cqw 0 0.65cqw;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.9cqw, 15px);
  text-align: center;
}

.archive-page-nav[hidden] {
  display: none;
}

.archive-page-button {
  width: clamp(24px, 1.65cqw, 30px);
  height: clamp(24px, 1.65cqw, 30px);
  padding: 0;
  border: 0;
  color: #6b9297;
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.75cqw, 28px);
  line-height: 1;
  cursor: pointer;
}

.archive-page-button:first-child {
  justify-self: start;
}

.archive-page-button:last-child {
  justify-self: end;
}

.archive-page-button:hover:not(:disabled),
.archive-page-button:focus-visible:not(:disabled) {
  transform: scale(1.12);
}

.archive-page-button:disabled {
  opacity: 0.25;
  cursor: default;
}

.archive-page-body {
  min-height: 0;
  flex: 1;
  margin-top: 1.15cqw;
  padding: 0.3cqw 0.55cqw 0.2cqw 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.archive-day-heading {
  margin: 0 0 0.85cqw;
  color: rgba(80, 66, 54, 0.48);
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.85cqw, 14px);
}

.archive-entry-list {
  display: grid;
  gap: 0.9cqw;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-entry-list li {
  position: relative;
  padding-left: 1.05em;
  color: rgba(80, 66, 54, 0.88);
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.03cqw, 17px);
  line-height: 1.65;
}

.archive-entry-list li p {
  margin: 0;
}

.archive-guestbook-entry span,
.archive-lost-entry span {
  display: block;
  margin-top: 0.3cqw;
  color: rgba(80, 66, 54, 0.48);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.8cqw, 13px);
}

.archive-lost-entry strong {
  display: block;
  color: rgba(80, 66, 54, 0.88);
  font-family: var(--font-ui);
  font-size: inherit;
  font-weight: 400;
}

.archive-entry-list li::before {
  position: absolute;
  left: 0;
  top: 0.63em;
  width: 0.38em;
  height: 0.38em;
  content: "";
  border-radius: 50%;
  background: rgba(107, 146, 151, 0.75);
}

.archive-entry-list li.is-empty {
  padding-left: 0;
  color: rgba(80, 66, 54, 0.5);
}

.archive-entry-list li.is-empty::before {
  display: none;
}

.music-panel-eyebrow {
  margin: 0 0 0.2cqw;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: clamp(11px, 0.82cqw, 15px);
}

.music-panel h2 {
  margin: 0 0 0.95cqw;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.32cqw, 23px);
  font-weight: 500;
}

.record-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 0.76cqw, 12px);
  width: 100%;
}

.record-option {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(2.9em, auto);
  gap: 0.42cqw;
  min-width: 0;
  padding: 0.42cqw;
  border: 1px solid rgba(104, 83, 63, 0.12);
  border-radius: 5px 8px 4px 7px / 7px 4px 8px 5px;
  color: #5a4a3e;
  background: rgba(255, 250, 241, 0.58);
  box-shadow: 2px 3px 0 rgba(80, 66, 54, 0.055);
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.record-option::before {
  position: absolute;
  left: 50%;
  top: -0.28cqw;
  width: 2.4cqw;
  height: 0.5cqw;
  content: "";
  border-radius: 2px;
  background: rgba(215, 225, 217, 0.78);
  opacity: 0;
  transform: translateX(-50%) rotate(-1.5deg);
  transition: opacity 160ms ease;
}

.record-cover {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  background: #efe3d2;
  box-shadow: inset 0 0 0 1px rgba(80, 66, 54, 0.08);
}

.record-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 46%);
  pointer-events: none;
}

.record-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-copy {
  display: grid;
  gap: 0.08cqw;
  min-width: 0;
}

.record-copy strong {
  overflow: hidden;
  color: rgba(80, 66, 54, 0.92);
  font-family: var(--font-display);
  font-size: clamp(11px, 0.86cqw, 15px);
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-copy small {
  overflow: hidden;
  color: rgba(80, 66, 54, 0.58);
  font-size: clamp(9px, 0.68cqw, 12px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-option:hover,
.record-option:focus-visible,
.record-option.is-selected {
  color: #5d858a;
  outline: 0;
  transform: translateY(-2px);
}

.record-option:hover,
.record-option:focus-visible {
  border-color: rgba(107, 146, 151, 0.28);
  background: rgba(255, 252, 246, 0.8);
  box-shadow: 3px 4px 0 rgba(80, 66, 54, 0.075);
}

.record-option.is-selected {
  border-color: rgba(107, 146, 151, 0.55);
  background: rgba(245, 250, 246, 0.82);
  box-shadow: 3px 4px 0 rgba(107, 146, 151, 0.14);
}

.record-option.is-selected::before {
  opacity: 1;
}

.record-option.is-selected .record-cover {
  box-shadow: inset 0 0 0 2px rgba(107, 146, 151, 0.55);
}

.record-option.is-selected .record-copy small {
  color: #5d858a;
}

.record-option.is-selected .record-copy small::before {
  content: "正在放 · ";
}

@container (max-width: 900px) {
  .music-panel {
    width: 70%;
  }

  .record-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 560px) {
  .music-panel {
    width: 84%;
  }

  .record-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.day-notification {
  right: 7.5%;
  top: 42%;
  width: 22%;
  min-height: auto;
  padding: 1.18cqw 1.35cqw 1.15cqw;
  border: 1px solid rgba(104, 83, 63, 0.17);
  border-radius: 3px 11px 4px 9px / 9px 3px 11px 4px;
  background: rgba(248, 242, 233, 0.98);
  box-shadow: 4px 5px 0 rgba(105, 85, 66, 0.09), inset 0 0 0 3px rgba(255, 250, 241, 0.38);
  text-align: center;
}

.day-notification::before {
  position: absolute;
  top: -0.48cqw;
  left: 50%;
  width: 4.8cqw;
  height: 0.82cqw;
  content: "";
  border: 1px solid rgba(107, 146, 151, 0.24);
  border-bottom: 0;
  background: rgba(213, 226, 224, 0.72);
  transform: translateX(-50%) rotate(-1.5deg);
}

.day-notification::after {
  position: absolute;
  z-index: 0;
  display: block;
  height: 0.52cqw;
  content: "";
  background: rgba(107, 146, 151, 0.2);
  pointer-events: none;
}

.day-notification::after {
  right: 1.25cqw;
  bottom: 0.7cqw;
  width: 3.2cqw;
  transform: rotate(2deg);
}

.day-notification.task_online_orders_day01 {
  width: 23%;
}

.day-notification h2,
.order-modal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--day-title-size);
  font-weight: 500;
  line-height: 1.2;
}

.day-notification p {
  margin: 0.86cqw auto 0.92cqw;
  max-width: 17em;
  font-size: var(--day-body-size);
  line-height: 1.46;
}

.day-panel-actions,
.day-floating-actions,
.order-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.day-panel-actions button,
.day-floating-actions button,
.order-options button,
.day-panel-close {
  color: #4f443a;
  background: rgba(255, 250, 241, 0.95);
}

.day-panel-actions button,
.day-floating-actions button,
.order-options button {
  min-width: 96px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 2px;
  font-size: clamp(12px, 0.9vw, 16px);
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.day-notification .day-panel-actions {
  align-items: center;
  gap: 1.15cqw;
}

.day-notification .day-panel-actions button {
  min-width: auto;
  min-height: auto;
  padding: 0.2cqw 0.28cqw;
  background: transparent;
  box-shadow: none;
  font-size: var(--day-option-size);
  line-height: 1.4;
}

.day-panel-actions button:first-child {
  color: #e45a2c;
}

.day-panel-actions button:last-child {
  color: #6b9297;
}

.day-dialogue {
  left: 50%;
  bottom: 7%;
  display: grid;
  grid-template-columns: 6.7cqw minmax(0, 1fr) 1.3cqw;
  align-items: center;
  width: 41.6%;
  min-height: 11.2%;
  padding: 0.78cqw 1.25cqw 0.86cqw;
  border: 0;
  border-radius: 2px 13px 5px 10px / 10px 2px 13px 5px;
  background: rgba(248, 243, 235, 0.98);
  box-shadow: 5px 6px 0 rgba(91, 73, 57, 0.09), inset 0 0 0 3px rgba(255, 250, 241, 0.4);
  transform: translateX(-50%);
}

.day-dialogue.is-choice-required {
  grid-template-columns: 6.7cqw minmax(0, 1fr);
}

.day-dialogue-avatar {
  width: 5.62cqw;
  height: 6.7cqw;
  object-fit: contain;
  align-self: start;
  margin-top: -2.9cqw;
}

.day-dialogue-title {
  margin-bottom: 0.38cqw;
  font-family: var(--font-display);
  font-size: var(--day-title-size);
}

.day-dialogue p {
  margin: 0;
  font-size: var(--day-body-size);
  line-height: 1.45;
}

.day-panel-close {
  align-self: start;
  justify-self: end;
  width: 1.3cqw;
  height: 1.3cqw;
  padding: 0;
  border-radius: 4px;
  font-size: clamp(8px, 1.35cqw, 23px);
  line-height: 1;
  background: transparent;
}

.day-floating-actions {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 1.7cqw);
  display: grid;
  gap: 0.58cqw;
  width: max-content;
  max-width: 22cqw;
  transform: translateX(-50%);
}

.day-floating-actions button {
  min-width: 8.2cqw;
  min-height: 2.8cqw;
  padding: 0.5cqw 1.2cqw;
  border: 1px solid rgba(80, 66, 54, 0.13);
  border-radius: 0;
  background: rgba(250, 246, 239, 0.98);
  box-shadow: none;
  clip-path: polygon(2% 4%, 83% 0, 100% 7%, 98% 94%, 91% 100%, 3% 96%, 0 12%);
  filter: drop-shadow(2px 3px 0 rgba(80, 66, 54, 0.08));
  font-size: var(--day-option-size);
}

.order-modal {
  left: 50%;
  top: 50%;
  width: min(440px, 35%);
  min-height: auto;
  padding: 1.28cqw 1.55cqw 1.18cqw;
  border: 0;
  border-radius: 0;
  background: rgba(250, 245, 237, 0.985);
  box-shadow: none;
  clip-path: polygon(1% 0.8%, 23% 0, 62% 1%, 99% 0, 100% 97%, 96% 100%, 71% 98.5%, 42% 100%, 4% 99%, 0 94%, 0 3%);
  filter: drop-shadow(7px 8px 0 rgba(107, 146, 151, 0.12));
  text-align: center;
  transform: translate(-50%, -50%);
}

.order-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: auto;
  padding-bottom: 0;
  text-align: center;
}

.order-head h2 {
  position: static;
  width: max-content;
  max-width: calc(100% - 3.4cqw);
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--day-title-size);
  line-height: 1.2;
  white-space: nowrap;
  transform: none;
}

.order-modal .day-panel-close {
  position: absolute;
  right: 0;
  top: 0.06cqw;
  width: 1.2cqw;
  height: 1.2cqw;
  font-size: clamp(7px, 1.25cqw, 21px);
  transform: none;
}

.order-head span {
  position: static;
  display: block;
  margin-top: 0.3cqw;
  padding: 0;
  color: #5d858a;
  background: transparent;
  font-family: var(--font-display);
  font-size: var(--day-body-size);
  line-height: 1.2;
  transform: none;
}

.order-question {
  margin: 0.16cqw 0 0.82cqw;
  color: #544537;
  font-size: var(--day-body-size);
  line-height: 1.5;
}

.order-cover-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 7.18cqw;
  margin: 0.82cqw auto 1cqw;
}

.order-cover {
  display: block;
  width: 100%;
}

.order-cover-title {
  position: absolute;
  left: 50%;
  top: 55.5%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 0.36cqw;
  width: 86%;
  max-height: 74%;
  overflow: hidden;
  color: #534438;
  font-family: var(--font-display);
  font-size: clamp(9px, 1.22cqw, 21px);
  line-height: 0.88;
  letter-spacing: 0;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-1deg);
}

.order-cover-title span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  line-height: 0.88;
  white-space: nowrap;
}

.order-cover-title.is-long {
  gap: 0.26cqw;
  line-height: 0.9;
}

.order-cover-title.is-very-long {
  gap: 0.2cqw;
  line-height: 0.92;
}

.order-options button {
  min-width: auto;
  min-height: 2.08cqw;
  padding: 0.36cqw 0.62cqw;
  color: #5c878d;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: var(--day-option-size);
}

.order-options {
  gap: 1.05cqw;
}

.review-options button:not(:disabled, .is-correct, .is-wrong):hover,
.review-options button:not(:disabled, .is-correct, .is-wrong):focus-visible {
  color: #fffaf2;
  background: #6b9297;
  box-shadow: 0 6px 18px rgba(80, 66, 54, 0.13);
  transform: translateY(-1px);
}

.day-panel-actions button:not(:disabled):hover,
.day-panel-actions button:not(:disabled):focus-visible,
.order-options button:not(:disabled, .is-correct, .is-wrong):hover,
.order-options button:not(:disabled, .is-correct, .is-wrong):focus-visible {
  transform: scale(1.045);
}

.day-floating-actions button:not(:disabled):hover,
.day-floating-actions button:not(:disabled):focus-visible {
  color: #4f443a;
  background: #f6efe5;
  box-shadow: 0 7px 20px rgba(80, 66, 54, 0.12);
  transform: translateY(-1px) scale(1.035);
}

.day-panel-actions button:not(:disabled):hover:first-child,
.day-panel-actions button:not(:disabled):focus-visible:first-child {
  color: #e45a2c;
}

.day-panel-actions button:not(:disabled):hover:last-child,
.day-panel-actions button:not(:disabled):focus-visible:last-child {
  color: #6b9297;
}

.day-panel-actions button:disabled,
.day-floating-actions button:disabled,
.order-options button:disabled,
.review-options button:disabled {
  cursor: default;
  opacity: 1;
}

.order-options button.is-correct {
  color: #fffaf2;
  background: #6b9297;
}

.order-options button.is-wrong {
  color: #fffaf2;
  background: #d86a46;
}

.closing-summary-panel,
.review-panel,
.diary-panel {
  width: 40%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.closing-summary-panel h2,
.review-panel h2,
.diary-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--day-display-size);
  font-weight: 500;
  line-height: 1.2;
}

.diary-kicker {
  margin: 0 0 0.1cqw !important;
  color: #6b9297 !important;
  font-family: var(--font-display-soft) !important;
  font-size: clamp(11px, 0.88cqw, 16px) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

.closing-summary-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  width: 44%;
}

.closing-summary-door {
  width: 9.04cqw;
  margin-bottom: 4.65cqw;
}

.closing-summary-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(8px, 1.3cqw, 22px);
  line-height: 1.35;
  white-space: nowrap;
}

.closing-summary-panel p,
.diary-panel p {
  margin: 14px auto;
  max-width: 34em;
  font-size: clamp(10px, 0.82vw, 14px);
  line-height: 1.65;
}

.closing-avatars {
  display: flex;
  justify-content: center;
  gap: 3.8cqw;
  margin: 1.75cqw 0 0;
}

.closing-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.closing-avatar-wrap img,
.review-avatar {
  width: 6.7cqw;
  height: 6.7cqw;
  object-fit: contain;
}

.closing-stats,
.diary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.diary-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.1cqw, 36px);
  width: min(100%, 760px);
  margin: 0 auto;
}

.closing-stats div,
.diary-stats div {
  padding: 0.38cqw 0.64cqw 0.46cqw;
  border-radius: 0;
  border-left: 1px solid rgba(80, 66, 54, 0.15);
  background: transparent;
  box-shadow: none;
}

.diary-stats div:first-child {
  border-left: 0;
}

.diary-stats div {
  padding: 0;
  border-left: 0;
}

.closing-stats dt,
.diary-stats dt {
  color: rgba(80, 66, 54, 0.5);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(11px, 0.82cqw, 15px);
  line-height: 1.25;
}

.closing-stats dd,
.diary-stats dd {
  margin: 0.34cqw 0 0;
  color: #4f4136;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.22cqw, 23px);
  line-height: 1.2;
}

.diary-panel {
  display: grid;
  gap: 1.65cqw;
  align-content: center;
  width: min(58%, 920px);
  color: rgba(75, 62, 51, 0.92);
}

.diary-heading {
  display: grid;
  justify-items: center;
  gap: 0.42cqw;
}

.diary-panel h2 {
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(21px, 1.64cqw, 30px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.22;
}

.diary-weather {
  color: rgba(75, 62, 51, 0.56) !important;
  font-family: var(--font-ui) !important;
  font-size: clamp(11px, 0.84cqw, 15px) !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

.diary-panel p {
  margin: 0;
  max-width: 86%;
  color: rgba(75, 62, 51, 0.9);
  font-size: clamp(12px, 0.94cqw, 17px);
  font-weight: 400;
  line-height: 1.58;
}

.diary-panel .primary-day-button {
  justify-self: center;
  margin-top: 0.3cqw;
}

.primary-day-button {
  min-width: 8.2cqw;
  min-height: 2.8cqw;
  padding: 0.48cqw 1.05cqw;
  border: 1px solid rgba(107, 146, 151, 0.3);
  border-radius: 0;
  color: #4f4136;
  background: #f6efe5;
  box-shadow: none;
  clip-path: polygon(2% 3%, 95% 0, 100% 12%, 98% 95%, 5% 100%, 0 87%, 1% 9%);
  filter: drop-shadow(2px 3px 0 rgba(80, 66, 54, 0.08));
  font-family: var(--font-ui);
  font-size: var(--day-option-size);
  font-weight: 400;
}

/* The in-scene catalog is a notebook, while work and dialogue retain their own paper treatment. */
.catalog-panel {
  left: 50%;
  top: 50%;
  z-index: 1040;
  width: min(500px, 42%);
  min-height: min(350px, 54%);
  padding: 1.35cqw 1.65cqw 1.3cqw;
  border: 0;
  border-radius: 0;
  color: #4f4136;
  background: rgba(248, 242, 231, 0.985);
  box-shadow: none;
  clip-path: polygon(1% 1%, 37% 0, 72% 1%, 99% 0, 100% 96%, 97% 100%, 53% 99%, 10% 100%, 0 98%, 0 5%);
  filter: drop-shadow(8px 9px 0 rgba(107, 146, 151, 0.12));
  text-align: left;
  transform: translate(-50%, -50%);
}

.catalog-panel .day-panel-close {
  position: absolute;
  top: 0.78cqw;
  right: 0.92cqw;
  width: 1.4cqw;
  height: 1.4cqw;
}

.catalog-kicker {
  margin: 0 0 0.28cqw;
  color: #6b9297;
  font-family: var(--font-display-soft);
  font-size: var(--day-small-size);
}

.catalog-panel h2 {
  margin: 0 2.2cqw 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 1.72cqw, 31px);
  font-weight: 500;
  line-height: 1.2;
}

.catalog-tabs {
  display: flex;
  gap: clamp(13px, 1.05cqw, 18px);
  margin-top: clamp(15px, 1.2cqw, 20px);
}

.catalog-tabs button,
.catalog-day-tabs button {
  padding: 0;
  border: 0;
  color: rgba(80, 66, 54, 0.48);
  background: transparent;
  font-family: var(--font-display-soft);
  font-size: var(--day-body-size);
  cursor: pointer;
  transition: color 150ms ease, transform 150ms ease;
}

.catalog-tabs button[aria-selected="true"] {
  color: #5d858a;
  font-family: var(--font-display);
}

.catalog-tabs button:hover,
.catalog-tabs button:focus-visible,
.catalog-day-tabs button:hover,
.catalog-day-tabs button:focus-visible {
  color: #514337;
  outline: 0;
  transform: translateY(-1px);
}

.catalog-intro {
  max-width: 26em;
  margin: 0.92cqw 0 0;
  color: rgba(80, 66, 54, 0.56);
  font-size: var(--day-small-size);
  font-weight: 400;
  line-height: 1.5;
}

.catalog-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.1cqw;
  color: #5b4d41;
  font-family: var(--font-display);
  font-size: var(--day-body-size);
}

.catalog-progress strong {
  color: #5d858a;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.55cqw, 28px);
  font-weight: 500;
}

.catalog-people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1cqw;
  margin: 0.9cqw 0 0;
  padding: 0;
  list-style: none;
}

.catalog-person {
  display: grid;
  justify-items: center;
  gap: 0.16cqw;
  min-width: 0;
  color: rgba(80, 66, 54, 0.5);
  font-size: var(--day-small-size);
  text-align: center;
}

.catalog-person img {
  width: 3.45cqw;
  height: 3.45cqw;
  filter: grayscale(1) opacity(0.35);
  object-fit: contain;
}

.catalog-person strong {
  max-width: 9em;
  overflow: hidden;
  color: inherit;
  font-family: var(--font-ui);
  font-size: var(--day-small-size);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-person span {
  color: rgba(80, 66, 54, 0.43);
  font-size: calc(var(--day-small-size) * 0.88);
}

.catalog-person.is-observed,
.catalog-person.is-recorded {
  color: #514337;
}

.catalog-person.is-observed img,
.catalog-person.is-recorded img {
  filter: none;
}

.catalog-person.is-observed span {
  color: #a7783e;
}

.catalog-person.is-recorded span {
  color: #5d858a;
}

.catalog-collection-progress {
  margin-top: 1.1cqw;
}

.catalog-day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7cqw;
  margin-top: 0.82cqw;
}

.catalog-day-tabs button {
  padding: 0.23cqw 0.6cqw;
  clip-path: polygon(3% 5%, 97% 0, 100% 92%, 6% 100%, 0 10%);
}

.catalog-day-tabs button.is-active {
  color: #514337;
  background: rgba(222, 202, 173, 0.44);
}

.catalog-collection-scroll {
  max-height: min(225px, 28cqw);
  margin-top: 0.95cqw;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.4cqw;
}

.catalog-entry-list {
  display: grid;
  gap: 0.75cqw;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-entry {
  display: grid;
  grid-template-columns: 3.25cqw minmax(0, 1fr);
  gap: 0.72cqw;
  align-items: center;
  padding: 0.48cqw 0.58cqw;
  background: rgba(255, 252, 246, 0.38);
  clip-path: polygon(1% 5%, 98% 0, 100% 93%, 5% 100%, 0 10%);
}

.catalog-entry > img {
  width: 3.2cqw;
  height: 3.2cqw;
  object-fit: contain;
}

.catalog-entry div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.65cqw;
  align-items: baseline;
  min-width: 0;
}

.catalog-entry strong {
  color: #514337;
  font-family: var(--font-display);
  font-size: var(--day-body-size);
  font-weight: 400;
}

.catalog-entry span {
  color: #5d858a;
  font-size: var(--day-small-size);
}

.catalog-entry p {
  grid-column: 1 / -1;
  margin: 0.18cqw 0 0;
  color: rgba(80, 66, 54, 0.6);
  font-size: var(--day-small-size);
  line-height: 1.45;
}

.catalog-empty {
  margin: 2.8cqw 0 0;
  color: rgba(80, 66, 54, 0.46);
  font-size: var(--day-body-size);
  text-align: center;
}

.review-avatar {
  width: clamp(46px, 4.25cqw, 72px);
  height: clamp(46px, 4.25cqw, 72px);
  margin: 0;
  object-fit: contain;
}

.review-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(9px, 0.82cqw, 14px);
  margin: 0 auto 1.55cqw;
  max-width: 86%;
  text-align: left;
}

.review-kicker,
.diary-weather {
  margin: 0 0 0.24cqw;
  color: rgba(75, 62, 51, 0.52);
  font-size: clamp(10px, 0.9cqw, 15px);
}

.review-heading h2 {
  margin: 0;
  color: #4f4136;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.58cqw, 27px);
  font-weight: 500;
  line-height: 1.2;
}

.review-clues {
  display: grid;
  gap: clamp(4px, 0.32cqw, 6px);
  max-width: 86%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.review-clues li {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(75, 62, 51, 0.92);
  font-weight: 400;
  font-size: var(--day-body-size);
  line-height: 1.42;
}

.review-clues li.is-action,
.review-clues li.is-note {
  position: relative;
  padding-left: 1.05em;
  color: rgba(75, 62, 51, 0.72);
  font-size: clamp(11px, 0.88cqw, 16px);
  line-height: 1.46;
}

.review-clues li.is-action::before,
.review-clues li.is-note::before {
  content: "";
  position: absolute;
  left: 0.16em;
  top: 0.72em;
  width: 0.36em;
  height: 1px;
  background: rgba(80, 66, 54, 0.32);
}

.review-clues span {
  margin-right: 0.25em;
  color: #4f4136;
  font-family: var(--font-display);
  font-weight: 500;
}

.review-question {
  width: 86%;
  margin: 1.7cqw auto 0.95cqw;
  color: #514337;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.24cqw, 21px);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.review-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 86%;
  margin: 0 auto;
  gap: 0.95cqw;
}

.review-next {
  justify-self: start;
  width: fit-content;
  margin: 2.25cqw 7% 0;
}

.review-options button {
  min-width: 7.2cqw;
  min-height: 2.25cqw;
  padding: 0.34cqw 0.82cqw;
  border-radius: 4px;
  color: #111;
  background: #f6efe5;
  box-shadow: 0 4px 36px rgba(106, 101, 95, 0.04);
  font-size: var(--day-option-size);
  transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.review-options button.is-selected {
  color: #fffaf2;
  background: #6b9297;
}

.review-options button.is-correct {
  color: #fffaf2;
  background: #6b9297;
}

.review-options button.is-wrong {
  color: #fffaf2;
  background: #d86a46;
}

.review-next:disabled {
  opacity: 0.45;
}

.closing-start-button {
  position: static;
  margin-top: 1cqw;
  color: rgba(84, 69, 55, 0.4);
  background: transparent;
  font-family: var(--font-display-soft);
  font-size: clamp(10px, 1.05cqw, 18px);
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: none;
}

.next-day-ready-panel {
  left: 50%;
  top: 53.2%;
  display: grid;
  justify-items: center;
  width: min(700px, 42%);
  padding: 0;
  color: #514337;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: translate(-50%, -50%);
}

.closed-door-wrap {
  position: relative;
  display: block;
  width: var(--start-door-size);
  margin-bottom: 1.55cqw;
  perspective: 520px;
}

.closed-door-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.closed-door-sign {
  position: absolute;
  left: var(--start-sign-x);
  top: var(--start-sign-y);
  display: grid;
  place-items: center;
  width: var(--start-sign-width);
  transform: translate(-50%, -50%);
  transform-origin: 50% 18%;
}

.closed-door-sign img {
  display: block;
  width: 100%;
  height: auto;
}

.closed-door-sign span {
  position: absolute;
  left: var(--start-closed-x);
  top: var(--start-closed-y);
  color: #5a4a3c;
  font-family: var(--start-closed-font);
  font-size: var(--start-closed-size);
  line-height: 1;
  letter-spacing: var(--start-closed-spacing);
  transform: translate(-50%, -50%);
}

.closing-summary-panel .closing-summary-line {
  margin: 0;
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.12cqw, 20px);
  line-height: 1.35;
  white-space: nowrap;
}

.closing-summary-door.closed-door-wrap {
  width: var(--start-door-size);
  margin-bottom: 1.35cqw;
}

.next-day-ready-panel p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.28cqw, 23px);
  line-height: 1.35;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.next-day-actions {
  display: grid;
  justify-items: center;
  gap: clamp(7px, 0.55cqw, 10px);
  margin-top: clamp(18px, 1.45cqw, 26px);
}

.next-day-start-button {
  min-width: clamp(108px, 9.2cqw, 148px);
}

.next-day-save-button {
  min-width: clamp(92px, 8.4cqw, 132px);
}

.replay-complete-panel small {
  max-width: 35em;
  margin-top: clamp(9px, 0.72cqw, 13px);
  color: rgba(80, 66, 54, 0.5);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.78cqw, 14px);
  line-height: 1.55;
}

.replay-complete-actions {
  gap: clamp(9px, 0.7cqw, 12px);
}

.replay-again-button,
.replay-return-button {
  min-width: clamp(118px, 9.5cqw, 154px);
}

.next-day-hint {
  position: absolute;
  left: var(--start-hint-x);
  bottom: var(--start-hint-y);
  z-index: 967;
  margin: 0;
  color: rgba(80, 66, 54, 0.34);
  font-family: var(--start-hint-font);
  font-size: var(--start-hint-size);
  line-height: 1;
  letter-spacing: var(--start-hint-spacing);
  white-space: nowrap;
  transform: translateX(-50%);
}

.next-day-door-wrap.closed-door-wrap {
  margin-bottom: 1.15cqw;
}

@keyframes sign-flip {
  0% {
    transform: translate(-50%, -50%) rotateY(0deg) rotateZ(0deg);
  }

  28% {
    transform: translate(-50%, -50%) rotateY(74deg) rotateZ(-3.5deg);
  }

  50% {
    transform: translate(-50%, -50%) rotateY(178deg) rotateZ(2deg);
  }

  72% {
    transform: translate(-50%, -50%) rotateY(298deg) rotateZ(-2.4deg);
  }

  100% {
    transform: translate(-50%, -50%) rotateY(360deg) rotateZ(0deg);
  }
}

.editor-panel {
  position: relative;
  z-index: 1000;
  display: none;
  height: 100vh;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid rgba(80, 66, 54, 0.16);
  background: var(--panel);
  box-shadow: -10px 0 30px rgba(80, 66, 54, 0.08);
}

body.is-editing .editor-panel {
  display: block;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: 0;
}

.panel-head p,
.help p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.ghost-link {
  padding: 7px 12px;
  border: 1px solid rgba(80, 66, 54, 0.2);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  font-size: 13px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
}

.field span,
.range-row label {
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(80, 66, 54, 0.18);
  border-radius: 6px;
  color: var(--ink);
  background: #fffaf2;
}

.field input,
.field select {
  height: 36px;
  padding: 0 10px;
}

.field textarea {
  resize: vertical;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.grid-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.debug-state-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: end;
}

.debug-state-row button {
  height: 36px;
  margin-bottom: 13px;
  border-radius: 6px;
  color: #fffaf2;
  background: #6b9297;
}

.start-edit-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.start-edit-group[hidden] {
  display: none;
}

.start-json-field {
  margin-top: 10px;
}

.check-field {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 58px;
}

.start-preview-field {
  min-height: auto;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.range-row {
  display: grid;
  gap: 9px;
  margin: 2px 0 16px;
  font-size: 13px;
}

.range-row input {
  width: 100%;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.button-row:nth-of-type(2) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.button-row.two-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.button-row button,
.wide-button {
  min-height: 36px;
  border-radius: 6px;
  color: #fffaf2;
  background: #6b9297;
}

.secondary-button {
  background: #9b8670;
}

.wide-button {
  width: 100%;
}

.import-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: rgba(80, 66, 54, 0.72);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.35;
}

.import-status.is-error {
  color: #9a4d36;
}

.json-box {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(80, 66, 54, 0.13);
  border-radius: 7px;
  background: rgba(255, 250, 241, 0.5);
}

.json-box summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}

.json-box[open] summary {
  margin-bottom: 10px;
  color: var(--ink);
}

.sub-panel {
  margin: 16px 0;
  padding: 13px;
  border: 1px solid rgba(80, 66, 54, 0.13);
  border-radius: 8px;
  background: rgba(243, 236, 226, 0.62);
}

.sub-panel h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0;
}

.help {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(107, 146, 151, 0.1);
}

@media (max-width: 980px) {
  body.is-editing .app-shell {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    height: auto;
    border-left: 0;
    border-top: 1px solid rgba(80, 66, 54, 0.16);
  }
}

@media (max-width: 640px) {
  .scene-wrap {
    padding: 8px;
  }

  .day-notification {
    right: 11%;
    top: 39%;
    width: 78% !important;
    padding: 14px 16px 15px;
  }

  .day-dialogue {
    bottom: 4%;
    grid-template-columns: 60px minmax(0, 1fr) 18px;
    width: 92% !important;
    min-height: 120px;
    padding: 14px 15px 14px;
  }

  .day-dialogue.is-choice-required {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .day-dialogue-avatar {
    width: 54px;
    height: 64px;
    margin-top: -30px;
  }

  .day-floating-actions {
    bottom: calc(100% + 12px);
    max-width: 78vw;
  }

  .day-floating-actions button {
    min-width: 116px;
    min-height: 38px;
    padding: 8px 13px;
  }

  .order-modal {
    width: 88% !important;
    padding: 15px 17px 16px;
  }

  .order-head {
    min-height: 42px;
    padding-bottom: 8px;
  }

  .order-head span {
    bottom: -10px;
    padding: 0 8px;
  }

  .order-cover-card {
    width: clamp(96px, 31cqw, 128px);
    margin: 18px auto 15px;
  }

  .order-cover-title {
    gap: 5px;
    font-size: clamp(15px, 4cqw, 18px);
  }

  .order-cover-title.is-long {
    gap: 4px;
    font-size: clamp(13px, 3.5cqw, 16px);
  }

  .order-cover-title.is-very-long {
    gap: 3px;
    font-size: clamp(11px, 3cqw, 14px);
  }

  .order-options {
    gap: 12px;
  }

  .order-options button {
    min-height: 34px;
    padding: 5px 6px;
  }

  .catalog-panel {
    width: 86% !important;
    min-height: 0;
    padding: 16px 18px 17px;
  }

  .book-intro-panel {
    width: 86% !important;
    padding: 16px 18px 17px;
  }

  .catalog-person img {
    width: 43px;
    height: 43px;
  }

  .catalog-entry {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    padding: 7px 8px;
  }

  .catalog-entry > img {
    width: 43px;
    height: 43px;
  }

  .catalog-collection-scroll {
    max-height: 250px;
  }
}

/* Mobile landscape is a short, wide stage. Keep every interactive surface
   inside the scene and use the horizontal space instead of shrinking copy. */
@media (orientation: landscape) and (max-width: 1180px) {
  :root {
    --day-title-size: clamp(14px, 2.1cqw, 17px);
    --day-body-size: clamp(11px, 1.65cqw, 14px);
    --day-option-size: clamp(11px, 1.7cqw, 14px);
    --day-small-size: clamp(9px, 1.35cqw, 11px);
    --day-display-size: clamp(16px, 2.35cqw, 21px);
  }

  .day-panel-close {
    display: grid;
    width: 30px !important;
    height: 30px !important;
    place-items: center;
    font-size: 20px !important;
    line-height: 1;
    touch-action: manipulation;
  }

  .start-title {
    top: calc(var(--start-title-y) + 2.8%);
  }

  /* Runtime layout data gives the desktop HUD a percentage width and center
     anchor. On a short phone that leaves it visually oversized, so mobile
     landscape uses a content-sized top-right cluster instead. */
  .hud {
    top: 1% !important;
    right: 1.2% !important;
    left: auto !important;
    width: auto !important;
    gap: 7px;
    transform: none !important;
    transform-origin: top right !important;
  }

  .hud-tool-row {
    gap: 5px;
  }

  .hud-book,
  .hud-break {
    width: 25px;
    height: 29px;
  }

  .hud-status {
    min-height: 34px;
    padding: 4px 6px 4px 22px;
  }

  .hud-clock-icon {
    left: -14px;
    width: 31px;
  }

  .hud-status-copy {
    gap: 2px;
    min-width: 78px;
  }

  .hud-time-line {
    gap: 4px;
  }

  .hud-meta-line {
    gap: 5px;
  }

  .day-label,
  .hud-weather {
    font-size: 8px;
  }

  .time-label {
    font-size: 12px;
  }

  .hud-weather img {
    width: 11px;
    height: 11px;
  }

  .hud-revenue {
    gap: 2px;
    padding-left: 5px;
  }

  .hud-revenue strong {
    font-size: 9px;
  }

  .money-coin {
    width: 10px;
    height: 10px;
    font-size: 6px;
  }

  .character-nameplate {
    top: calc(100% - 1px);
    padding: 2px 5px;
    font-size: clamp(8px, 1.2cqw, 10px);
  }

  .attention-mark {
    font-size: clamp(22px, 4.3cqw, 30px) !important;
  }

  .customer-patience {
    gap: 2px;
    width: clamp(64px, 10.4cqw, 76px);
    padding: 3px 5px;
  }

  .customer-patience-detail b {
    gap: 2px;
    font-size: clamp(8px, 1.2cqw, 10px);
  }

  .customer-patience-detail b::before {
    width: 11px;
    height: 11px;
  }

  .customer-patience-detail > span {
    height: 4px;
  }

  .npc-dialogue-hint {
    width: 22px;
    height: 17px;
    font-size: 13px;
  }

  .scene-clue-marker {
    width: 25px;
    height: 20px;
    padding-bottom: 4px;
    font-size: 17px;
  }

  .scene-toast {
    top: 2.5% !important;
    right: auto !important;
    left: 45% !important;
    width: fit-content !important;
    max-width: min(46%, 420px);
    padding: 6px 12px 7px 14px;
    transform: translateX(-50%) !important;
  }

  .opening-banner {
    min-width: 170px;
    max-width: 68%;
    padding: 12px 20px 11px;
  }

  .opening-banner strong {
    font-size: clamp(20px, 3.1cqw, 27px);
  }

  .opening-banner-kicker,
  .opening-banner-goal {
    font-size: clamp(10px, 1.45cqw, 12px);
  }

  .music-panel {
    width: min(92%, 720px) !important;
    max-height: calc(100% - 16px);
    padding: 10px 15px 12px;
    overflow: hidden;
  }

  .music-panel .day-panel-close {
    top: 5px;
    right: 6px;
  }

  .music-panel-eyebrow {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .music-panel h2 {
    margin-bottom: 7px;
    font-size: clamp(15px, 2.2cqw, 18px);
  }

  .record-options {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    gap: 8px;
    padding: 3px 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .record-option {
    grid-template-rows: auto minmax(2.35em, auto);
    gap: 4px;
    padding: 5px;
    scroll-snap-align: start;
  }

  .record-copy strong {
    font-size: 11px;
  }

  .record-copy small {
    font-size: 9px;
  }

  .order-modal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    width: min(72%, 560px) !important;
    max-height: calc(100% - 16px);
    padding: 10px 15px 13px;
    overflow-y: auto;
  }

  .order-head {
    grid-column: 1 / -1;
  }

  .order-head h2 {
    max-width: calc(100% - 40px);
    font-size: clamp(18px, 2.65cqw, 21px);
    white-space: normal;
    text-wrap: balance;
  }

  .order-head span {
    margin-top: 2px;
    font-size: clamp(12px, 1.7cqw, 14px);
  }

  .order-modal .day-panel-close {
    top: -5px;
    right: -7px;
  }

  .order-cover-card {
    grid-row: 2 / span 2;
    grid-column: 1;
    width: clamp(84px, 13.5cqw, 100px);
    margin: 7px 0 2px;
  }

  .order-cover-title {
    gap: 4px;
    font-size: clamp(14px, 2.15cqw, 17px);
  }

  .order-cover-title.is-long {
    gap: 3px;
    font-size: clamp(13px, 1.95cqw, 16px);
  }

  .order-cover-title.is-very-long {
    gap: 2px;
    font-size: clamp(12px, 1.8cqw, 15px);
  }

  .order-question {
    grid-row: 2;
    grid-column: 2;
    align-self: end;
    margin: 5px 0 8px;
    font-size: clamp(15px, 2.25cqw, 18px);
    line-height: 1.4;
    text-align: center;
  }

  .order-options {
    grid-row: 3;
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    gap: clamp(12px, 2.7cqw, 22px);
    align-self: start;
  }

  .order-options button {
    min-width: 0;
    min-height: 34px;
    padding: 6px 7px;
    font-size: clamp(14px, 2.05cqw, 16px);
    line-height: 1.25;
    text-align: center;
  }

  .day-dialogue {
    bottom: 5%;
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    width: min(78%, 600px) !important;
    min-height: 76px;
    max-height: 38%;
    padding: 9px 11px 10px;
  }

  .day-dialogue.is-choice-required {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .day-dialogue-avatar {
    width: 44px;
    height: 52px;
    margin-top: -22px;
  }

  .day-dialogue-body {
    min-width: 0;
    max-height: 100%;
    overflow-y: auto;
  }

  .day-dialogue-title {
    margin-bottom: 3px;
  }

  .day-dialogue .day-panel-close {
    margin-top: -4px;
    margin-right: -5px;
  }

  .day-floating-actions {
    bottom: calc(100% + 8px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: min(72cqw, 520px);
    max-width: none;
    max-height: 132px;
    padding: 2px;
    overflow-y: auto;
  }

  .day-floating-actions button {
    min-width: 0;
    min-height: 34px;
    padding: 6px 10px;
  }

  .day-notification,
  .day-notification.task_online_orders_day01,
  .day-notification.computer-inbox-panel,
  .day-notification.email-list-panel,
  .day-notification.email-message-panel {
    top: 50% !important;
    right: auto !important;
    left: 50% !important;
    width: min(72%, 540px) !important;
    max-width: none;
    max-height: calc(100% - 18px);
    padding: 12px 16px 13px;
    overflow-y: auto;
    transform: translate(-50%, -50%);
  }

  .day-notification .day-panel-close,
  .computer-inbox-panel .day-panel-close,
  .email-list-panel .day-panel-close,
  .email-message-panel .day-panel-close {
    top: 5px;
    right: 6px;
  }

  .day-notification p {
    margin: 7px auto 8px;
    max-width: 28em;
  }

  .computer-inbox-list,
  .email-message-list {
    gap: 7px;
  }

  .computer-inbox-list > button,
  .email-message-row {
    min-height: 45px;
    padding: 8px 10px;
  }

  .email-body {
    max-height: min(205px, 31cqw);
    padding: 8px 0;
    overflow-y: auto;
    line-height: 1.62;
  }

  .save-panel,
  .scene-clue-panel,
  .scene-clue-panel.is-long-copy,
  .scene-clue-panel.is-lost-and-found,
  .book-intro-panel {
    width: min(72%, 560px) !important;
    max-height: calc(100% - 18px);
    padding: 13px 18px 14px;
    overflow-y: auto;
  }

  .save-panel .day-panel-close,
  .scene-clue-panel .day-panel-close,
  .book-intro-panel .day-panel-close {
    top: 5px;
    right: 6px;
  }

  .save-panel h2,
  .scene-clue-panel h2,
  .book-intro-panel h2 {
    font-size: clamp(16px, 2.35cqw, 20px);
  }

  .save-runtime-note {
    white-space: normal;
  }

  .save-stats {
    margin-top: 10px;
    padding: 7px 0;
  }

  .save-replay-section {
    margin-top: 10px;
    padding-top: 9px;
  }

  .save-clear-button,
  .save-cancel-button,
  .save-confirm-button,
  .save-return-button,
  .save-replay-confirm-button {
    margin-top: 8px;
  }

  .archive-panel,
  .catalog-panel {
    width: min(78%, 650px) !important;
    height: min(84%, 360px);
    min-height: 0;
    max-height: calc(100% - 18px);
    padding: 12px 17px 13px;
  }

  .archive-panel .day-panel-close,
  .catalog-panel .day-panel-close {
    top: 5px;
    right: 6px;
  }

  .archive-panel h2,
  .catalog-panel h2 {
    font-size: clamp(17px, 2.5cqw, 21px);
  }

  .archive-page-nav {
    margin: 7px 0 4px;
  }

  .archive-page-body {
    margin-top: 6px;
  }

  .catalog-tabs {
    margin-top: 8px;
  }

  .catalog-intro,
  .catalog-progress,
  .catalog-people,
  .catalog-collection-progress,
  .catalog-collection-scroll {
    margin-top: 6px;
  }

  .catalog-person img {
    width: 34px;
    height: 34px;
  }

  .catalog-collection-scroll {
    max-height: 190px;
  }

  .closing-summary-panel,
  .review-panel,
  .diary-panel,
  .next-day-ready-panel {
    width: min(74%, 620px) !important;
    max-height: calc(100% - 18px);
    overflow-y: auto;
  }

  .closing-summary-door {
    width: clamp(58px, 9cqw, 74px);
    margin-bottom: 12px;
  }

  .closing-summary-line,
  .closing-summary-panel .closing-summary-line,
  .next-day-ready-panel p {
    max-width: 100%;
    font-size: clamp(12px, 1.85cqw, 15px);
    white-space: normal;
    text-wrap: balance;
  }

  .closing-avatars {
    gap: 18px;
    margin-top: 9px;
  }

  .closing-avatar-wrap img,
  .review-avatar {
    width: 44px;
    height: 44px;
  }

  .review-heading {
    gap: 8px;
    margin-bottom: 8px;
  }

  .review-clues {
    max-height: 120px;
    overflow-y: auto;
  }

  .review-question {
    margin-top: 9px;
    margin-bottom: 6px;
    font-size: clamp(14px, 2cqw, 17px);
  }

  .review-next {
    margin-top: 10px;
  }

  .diary-panel {
    gap: 10px;
  }

  .diary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .diary-stats dt {
    font-size: 10px;
  }

  .diary-stats dd {
    margin-top: 2px;
    font-size: clamp(14px, 2cqw, 17px);
  }

  .next-day-actions {
    margin-top: 12px;
  }

  .primary-day-button,
  .save-confirm-actions button {
    min-width: 104px;
    min-height: 34px;
    padding: 6px 12px;
  }

  .book-hotspot .book-meta,
  .scene-clue-marker::after,
  .npc-dialogue-hint::after,
  .hud-book::after,
  .hud-break::after,
  .scene-layer.is-watering-target::after {
    display: none !important;
  }
}
