:root {
  color-scheme: light;
  --ink: #3e3631;
  --muted: #897f74;
  --wine: #774c44;
  --line: #e1d9cd;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: #f7f4ee;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #bb8662; outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1456px; margin: auto; padding: 30px 48px; border-bottom: 1px solid var(--line); }
.brand { font-family: Georgia, serif; font-size: 17px; letter-spacing: .12em; color: inherit; text-decoration: none; }
.brand span { color: #a68962; padding: 0 4px; }
.brand small { font-family: inherit; font-size: 11px; margin-left: 24px; color: var(--muted); letter-spacing: .1em; }
.preview-label { font-size: 10px; letter-spacing: .13em; border: 1px solid var(--line); padding: 7px 11px; border-radius: 4px; color: var(--muted); white-space: nowrap; }
main { max-width: 1456px; margin: auto; padding: 42px 48px 24px; }
.intro { display: flex; justify-content: space-between; gap: 32px; align-items: end; margin-bottom: 30px; }
.eyebrow { font: 10px Georgia, serif; letter-spacing: .23em; color: #9b7951; margin: 0 0 16px; }
h1 { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(21px, 2.4vw, 31px); line-height: 1.6; font-weight: 500; letter-spacing: .06em; margin: 0; }
.introduction { color: var(--muted); font-size: 12px; line-height: 2.1; margin: 0; }
.viewer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 28px; }
.stage-column { min-width: 0; }
.stage { position: relative; height: min(62vh, 690px); min-height: 420px; background: #201f1d; color: #f7f4ee; border-radius: 8px; overflow: hidden; isolation: isolate; }
.render-host { position: absolute; inset: 0; }
.render-host canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-caption { position: absolute; z-index: 2; top: 28px; left: 30px; pointer-events: none; text-shadow: 0 2px 14px #201f1d; }
.scene-number { font: 11px Georgia, serif; letter-spacing: .17em; opacity: .65; }
.stage-caption h2 { font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 23px; font-weight: 500; margin: 10px 0 0; letter-spacing: .08em; }
.close-fullscreen { position: absolute; top: 22px; right: 22px; z-index: 4; min-height: 44px; padding: 10px 15px; border: 1px solid #ffffff66; border-radius: 5px; background: #201f1dcc; color: #f7f4ee; font-size: 12px; }
.stage-bottom { position: absolute; z-index: 2; bottom: 22px; left: 30px; right: 24px; display: flex; gap: 14px; justify-content: space-between; align-items: center; pointer-events: none; }
.stage-hint { font-size: 11px; letter-spacing: .04em; opacity: .75; text-shadow: 0 1px 5px #201f1d; }
.background-options { display: flex; gap: 12px; pointer-events: auto; }
.swatch { padding: 0; border: 2px solid #9e9990; width: 22px; height: 22px; border-radius: 50%; }
.swatch[aria-pressed="true"] { outline: 1px solid currentColor; outline-offset: 3px; }
.swatch.dark { background: #201f1d; }
.swatch.light { background: #eee9e0; }
.stage[data-background="light"] { color: #40382f; }
.stage[data-background="light"] .stage-caption, .stage[data-background="light"] .stage-hint { text-shadow: 0 1px 6px #eee9e0; }
.loading { position: absolute; z-index: 3; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; background: #201f1df2; color: #f7f4ee; }
.loading p { font-size: 13px; line-height: 1.8; max-width: 28em; }
.loading progress { width: min(240px, 80%); height: 3px; accent-color: #c7a879; }
.loading button { background: #f7f4ee; border: none; padding: 12px 22px; border-radius: 4px; }
.loading-spinner { width: 28px; height: 28px; border: 1px solid #ffffff25; border-top-color: #c7a879; border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { display: flex; align-items: center; gap: 8px; padding-top: 12px; flex-wrap: wrap; }
.toolbar button { border: 1px solid var(--line); border-radius: 5px; background: transparent; padding: 10px 14px; min-height: 44px; font-size: 12px; }
.toolbar button:hover, .toolbar button[aria-pressed="true"] { border-color: var(--wine); background: #ede4da; }
.zoom-controls { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.zoom-controls button { font-size: 20px; line-height: 1; width: 44px; padding: 0; }
.zoom-controls span { font: 9px Georgia, serif; letter-spacing: .1em; color: var(--muted); }
.collection-heading { display: flex; justify-content: space-between; font: 10px Georgia, serif; letter-spacing: .13em; margin: 5px 0 17px; }
.collection-heading span { color: var(--muted); font-size: 9px; }
.scene-list { display: grid; gap: 8px; }
.scene-button { width: 100%; display: flex; align-items: center; text-align: left; gap: 14px; border: 1px solid transparent; border-radius: 6px; background: #efeae1; padding: 14px; min-height: 76px; transition: background .15s; }
.scene-button[aria-pressed="true"] { border-color: #b29475; background: #e9e0d4; }
.scene-button:hover { background: #e9e0d4; }
.scene-button .number { font: 21px Georgia, serif; color: #a28c73; width: 29px; flex: 0 0 29px; }
.scene-button .name { font-size: 13px; letter-spacing: .03em; }
.scene-button .count { display: block; margin-top: 6px; font: 10px Georgia, serif; color: var(--muted); letter-spacing: .06em; }
.collection-note { color: var(--muted); font-size: 10px; line-height: 2; padding: 12px 3px 0; }
footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 10px; letter-spacing: .03em; margin-top: 25px; border-top: 1px solid var(--line); padding-top: 10px; }
.stage:fullscreen { border-radius: 0; height: 100%; min-height: 0; }
.stage.expanded { position: fixed; inset: 0; z-index: 10; width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
@media (max-width: 1000px) {
  .page-header { padding: 24px; }
  main { padding: 30px 24px 20px; }
  .intro { display: block; }
  .introduction { margin-top: 14px; }
  .viewer-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; }
  .scene-button { padding: 12px; gap: 8px; }
  .scene-button .name { font-size: 12px; }
}
@media (max-width: 700px) {
  .page-header { padding: 20px; }
  .brand { font-size: 13px; letter-spacing: .09em; }
  .brand small { display: none; }
  .preview-label { font-size: 8px; padding: 5px 7px; }
  main { padding: 28px 16px 16px; }
  .intro { margin-bottom: 22px; padding: 0 4px; }
  .eyebrow { font-size: 8px; margin-bottom: 12px; }
  h1 { font-size: 21px; letter-spacing: .025em; }
  .introduction { font-size: 11px; }
  .viewer-layout { display: flex; flex-direction: column; gap: 24px; }
  .stage { height: 57svh; min-height: 340px; max-height: 600px; }
  .stage-caption { top: 22px; left: 22px; }
  .stage-caption h2 { font-size: 21px; }
  .stage-bottom { left: 20px; right: 20px; bottom: 20px; }
  .stage-hint { font-size: 10px; }
  .toolbar { gap: 6px; }
  .toolbar button { padding: 8px 10px; font-size: 11px; }
  .zoom-controls { gap: 6px; }
  .zoom-controls span { display: none; }
  .zoom-controls button { width: 40px; font-size: 21px; }
  .scene-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-button .number { font-size: 18px; width: 23px; flex-basis: 23px; }
  .scene-button .name { font-size: 11px; overflow-wrap: anywhere; }
  .scene-button .count { font-size: 9px; }
  footer { flex-direction: column; gap: 0; line-height: 1.8; }
  footer p { margin: 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation-duration: 3s; }
  * { transition: none !important; }
}
