/* SPDX-License-Identifier: AGPL-3.0-only — haiz campus adaptation, 2026. */
:root {
  --paper: #f3efe6;
  --ink: #243a31;
  --muted: #667169;
  --line: #d5d8ca;
  --green: #284f40;
  --clay: #a55f43;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a55f43;
  outline-offset: 4px;
}
button {
  background: none;
  border: 0;
}
button,
select {
  min-height: 44px;
}
textarea,
input,
select {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 12px;
  background: var(--paper);
}
.skip:focus {
  transform: none;
}
.site-head {
  max-width: 1480px;
  margin: auto;
  padding: 28px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: italic 700 36px var(--serif);
  letter-spacing: -2px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.wordmark span {
  font: 12px system-ui;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.site-head nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
}
.site-head nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 0 44px;
}
.intro {
  padding: 44px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.6;
  margin: 0 0 16px;
  color: var(--muted);
}
h1 {
  font: 400 clamp(36px, 4.2vw, 64px) / 1.16 var(--serif);
  letter-spacing: -0.035em;
  margin: 0;
}
h1 em {
  font-style: normal;
  color: var(--clay);
}
.intro-note {
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
  max-width: 370px;
}
.intro-note span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
  gap: 32px;
  align-items: start;
}
.scene-shell {
  min-width: 0;
}
.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 4/4.6;
  background: #c7c9bd;
  border-radius: 5px;
  overflow: hidden;
  isolation: isolate;
}
.poster,
.poster > img,
.poster-shade,
.scene-slot,
.scene-slot iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.poster > img {
  object-fit: cover;
}
.poster-shade {
  background: linear-gradient(
    180deg,
    transparent 25%,
    #142b2380 65%,
    #10271fe6
  );
}
.poster-copy {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  color: #fff8e7;
}
.poster-copy .eyebrow {
  color: #f1ead6;
  font-size: 10px;
}
.poster-copy h2 {
  font: 400 clamp(27px, 2.8vw, 43px) / 1.3 var(--serif);
  margin: 0 0 14px;
}
.poster-copy p {
  font-size: 13px;
  line-height: 1.9;
}
.poster-copy small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.07em;
  margin-top: 12px;
  color: #f1ead6;
}
.scene-slot {
  pointer-events: none;
}
.scene-slot iframe {
  border: 0;
  pointer-events: auto;
}
.scene-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.scene-bottom > p {
  font-size: 11px;
  line-height: 1.7;
  max-width: 300px;
  margin: 0;
  color: var(--muted);
}
.scene-options {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  flex-shrink: 0;
}
.scene-options select {
  border: 0;
  background: transparent;
  padding: 0 5px;
}
.weather-choices {
  padding: 18px 0 0;
  border: 0;
  display: flex;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}
.weather-choices legend {
  padding: 16px 0 0;
  font-size: 12px;
}
.weather-choices legend span {
  font-size: 10px;
  color: var(--muted);
  margin-left: 10px;
}
.weather-choices button {
  padding: 7px 17px;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 12px;
}
.weather-choices button[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}
.scene-caption {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.scene-caption span {
  color: var(--clay);
  margin-right: 10px;
}
.bench-heading {
  padding: 6px 0 20px;
}
.bench-heading .eyebrow {
  margin-bottom: 6px;
}
h2 {
  font: 400 24px/1.4 var(--serif);
  margin: 0;
}
.object-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.object-list button {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 9px;
  transition: background 0.2s;
}
.object-list button:hover {
  background: #e9eadd;
}
.object-list button[aria-pressed="true"] {
  background: #e1e7d8;
  box-shadow: inset 0 -2px var(--green);
}
.object-list button img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  opacity: 0.85;
}
.object-list button span {
  font-size: 12px;
  line-height: 1.4;
}
.object-list button small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
}
.panels {
  padding: 28px 2px 0;
  min-height: 480px;
}
.panel-kicker {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--clay);
  margin: 0 0 9px;
}
h3 {
  font: 400 24px/1.5 var(--serif);
  margin: 0 0 12px;
  letter-spacing: -0.025em;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.sticky-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.sticky-list label {
  display: block;
  background: #ebe7cf;
  padding: 9px 14px 5px;
  border-left: 2px solid #b8b08a;
  box-shadow: 0 3px 6px #22332205;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #72735e;
}
.sticky-list label:nth-child(2) {
  background: #dfe7d7;
  border-color: #9aaf93;
}
.sticky-list label:nth-child(3) {
  background: #eaded0;
  border-color: #b9a28e;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  background: #fbf9f180;
  padding: 12px;
  font-size: 14px;
  line-height: 1.8;
  border-radius: 3px;
}
.sticky-list textarea {
  background: none;
  border: 0;
  min-height: 65px;
  padding: 3px 0;
  font: 17px/1.8 var(--serif);
  color: var(--ink);
}
.save-state {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.field {
  display: block;
  font-size: 12px;
  line-height: 1.8;
  margin: 18px 0;
}
.field textarea,
.field select {
  margin-top: 8px;
}
.field small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.field select {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.6;
}
.primary {
  background: var(--green);
  color: #fff8e7;
  border-color: var(--green);
}
.poster-copy .primary {
  background: #f1ead7;
  color: var(--ink);
  border-color: #f1ead7;
  font-weight: 600;
}
.button:hover:not(:disabled) {
  filter: brightness(0.95);
}
.text-button {
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px 2px;
  min-height: 44px;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.button-row label {
  font-size: 12px;
}
.button-row select {
  background: transparent;
  border: 0;
}
.timer {
  display: block;
  font: 400 clamp(68px, 6vw, 92px) / 1.4 var(--serif);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  padding: 28px 0;
}
.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 22px;
}
.timer-presets button {
  border: 1px solid var(--line);
  padding: 8px;
  font-size: 11px;
  flex: 1;
  white-space: nowrap;
}
.timer-presets button[aria-pressed="true"] {
  border-color: var(--green);
  background: #e1e7d8;
}
.letter-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 20px;
  gap: 12px;
}
.file-field {
  display: block;
  margin: 20px 0;
  padding: 16px;
  border: 1px dashed #9ba897;
  font-size: 13px;
  cursor: pointer;
}
.file-field small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 7px 0 12px;
}
.file-field input {
  font-size: 11px;
  width: 100%;
}
.file-field input::file-selector-button {
  background: #e1e7d8;
  border: 1px solid var(--line);
  padding: 11px;
  font: inherit;
  color: inherit;
  margin-right: 8px;
}
.book-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 24px 0;
  background: #faf6e9;
  box-shadow: 0 4px 10px #2031260a;
  min-height: 250px;
}
.book-pages p {
  margin: 0;
  white-space: pre-line;
  font: 14px/2.15 var(--serif);
  padding: 22px 16px;
}
.book-pages p + p {
  border-left: 1px solid #d8d5c6;
}
.underlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.tool-panel blockquote {
  font: 26px/1.9 var(--serif);
  margin: 30px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--clay);
}
#voiceSlot {
  margin: 24px 0 5px;
  min-height: 0;
}
#voiceSlot .vn-bub {
  max-width: 100%;
}
.afterword {
  margin: 70px 0 40px;
  padding: 36px 0 0;
  border-top: 1px solid var(--line);
  max-width: 700px;
}
.afterword p:not(.eyebrow) {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
}
.afterword h2 {
  font-size: 27px;
}
footer {
  max-width: 1480px;
  margin: auto;
  padding: 24px 44px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  font-size: 10px;
  line-height: 2;
  color: var(--muted);
}
footer p {
  margin: 0;
  max-width: 600px;
}
footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.noscript {
  padding: 24px;
  border: 2px solid var(--clay);
}
@media (min-width: 1100px) {
  .scene-shell {
    position: sticky;
    top: 18px;
  }
  .intro {
    animation: arrive 0.65s both;
  }
  .workbench {
    animation: arrive 0.75s 0.08s both;
  }
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1050px) {
  .desk-grid {
    gap: 24px;
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 1fr);
  }
  main {
    padding: 0 25px;
  }
  .site-head {
    padding: 20px 25px;
  }
  .wordmark span {
    display: none;
  }
  .scene-bottom {
    flex-wrap: wrap;
  }
  .scene {
    aspect-ratio: 3/4.6;
  }
  .object-list button {
    flex-direction: column;
    align-items: flex-start;
  }
  .intro-note {
    max-width: 300px;
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .site-head {
    padding: 12px 20px;
    gap: 15px;
  }
  .wordmark {
    font-size: 31px;
  }
  .site-head nav {
    gap: 16px;
    font-size: 10px;
  }
  .site-head nav a:nth-child(2) {
    display: none;
  }
  main {
    padding: 0 20px;
  }
  .intro {
    padding: 30px 0 26px;
    display: block;
  }
  .intro-note {
    margin-top: 20px;
    max-width: none;
    font-size: 12px;
  }
  .intro .eyebrow {
    font-size: 8px;
    margin-bottom: 12px;
  }
  h1 {
    font-size: 39px;
  }
  .desk-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .scene {
    aspect-ratio: 4/5;
    max-height: 620px;
  }
  .poster-copy h2 {
    font-size: 32px;
  }
  .scene-bottom {
    flex-wrap: nowrap;
  }
  .scene-bottom > p {
    font-size: 10px;
    max-width: 220px;
  }
  .weather-choices {
    gap: 6px;
  }
  .weather-choices button {
    padding: 5px 12px;
    flex: 1;
    font-size: 11px;
  }
  .scene-caption {
    font-size: 10px;
  }
  .workbench {
    scroll-margin-top: 20px;
  }
  .bench-heading {
    padding: 0 0 18px;
  }
  .bench-heading h2 {
    font-size: 24px;
  }
  .object-list button {
    flex-direction: row;
    padding: 14px 8px;
    gap: 5px;
  }
  .object-list button img {
    width: 25px;
    height: 25px;
  }
  .object-list button span {
    font-size: 11px;
  }
  .object-list button small {
    font-size: 8px;
  }
  .panels {
    padding-top: 26px;
    min-height: 440px;
  }
  h3 {
    font-size: 24px;
  }
  .timer {
    font-size: 80px;
  }
  .book-pages p {
    padding: 20px 12px;
    font-size: 13px;
  }
  .afterword {
    margin-top: 38px;
  }
  .afterword h2 {
    font-size: 24px;
  }
  footer {
    padding: 24px 20px;
    display: block;
  }
  footer p + p {
    margin-top: 12px;
  }
}
@media (max-width: 360px) {
  main {
    padding: 0 14px;
  }
  .site-head {
    padding: 10px 14px;
  }
  .site-head nav {
    gap: 12px;
  }
  .intro-note br {
    display: none;
  }
  h1 {
    font-size: 35px;
  }
  .weather-choices button {
    font-size: 10px;
    padding: 6px;
  }
  .scene-options {
    font-size: 10px;
    gap: 3px;
  }
  .scene-bottom {
    gap: 6px;
  }
  .scene-bottom > p {
    max-width: 170px;
  }
  .object-list button {
    flex-direction: column;
  }
  .letter-meta {
    font-size: 9px;
  }
  .button {
    padding: 10px 12px;
  }
  .book-pages p {
    font-size: 12px;
    padding: 16px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep the skip link genuinely clipped until keyboard focus, even in a scrolled
   full-page capture; not merely translated just beyond the current viewport. */
.skip:not(:focus-visible) {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  transform: none;
}
.source-page {
  max-width: 1000px;
}
.source-page .intro {
  padding-bottom: 0;
}
.source-page .afterword {
  max-width: 820px;
  margin: 36px 0 42px;
}
.source-page .afterword p {
  font-size: 14px;
  line-height: 2.1;
}
.source-page .afterword a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.source-page .button-row {
  margin: 22px 0;
}
