:root {
  color-scheme: light;
  --paper: #fafaf6;
  --ink: #353d34;
  --muted: #596355;
  --sage: #53684f;
  --line: #d5d9cf;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(95%, 1520px); margin-inline: auto; }
.site-header, nav, .brand, .album-link, .controls, .episode, .sound-option, .quiet, .primary, .dialog-bar, .photo-actions { display: flex; align-items: center; }
.site-header { justify-content: space-between; min-height: 70px; }
.brand { gap: 9px; color: #4d5c49; font: 500 25px/1.3 var(--serif); letter-spacing: .15em; }
.brand svg { width: 28px; height: 28px; }
nav { gap: 18px; color: var(--muted); font-size: 13px; }
nav a { padding: 12px 4px; }
.album-link, .quiet, .icon-button { background: transparent; border: 1px solid var(--line); }
.album-link { gap: 7px; padding: 8px 14px; border-radius: 20px; min-height: 42px; }
.album-link:hover, .quiet:hover, .icon-button:hover { background: #edf0e7; }
nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stage { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 2.48; background: #e7e2d5; }
#room { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 76%; }
#loading { position: absolute; inset: 45% 0 auto; text-align: center; font-size: 14px; }
.player { display: grid; grid-template-columns: auto 1fr; padding: 22px 4px 20px; gap: 10px 16px; align-items: center; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.45; letter-spacing: .12em; }
.episode { gap: 9px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #6a8060; }
.player[data-paused="true"] .live-dot { background: #92968c; }
.divider { height: 11px; width: 1px; background: var(--line); }
#watch-time { font-variant-numeric: tabular-nums; }
.controls { justify-self: end; gap: 10px; }
.quiet, .primary, .icon-button { justify-content: center; border-radius: 24px; min-height: 44px; }
.quiet, .primary { gap: 8px; padding: 10px 17px; font-weight: 600; font-size: 13px; }
.primary { border: 1px solid var(--sage); background: var(--sage); color: white; }
.primary:hover { background: #40563e; }
.sound-option { grid-column: 2; justify-self: end; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.sound-option input { accent-color: var(--sage); }
#cast { border-top: 1px solid var(--line); padding: 23px 4px 36px; scroll-margin-top: 16px; }
#cast h2, .dialog-bar h2 { font-size: 22px; letter-spacing: .12em; }
#cast-list { margin-top: 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-info { display: flex; align-items: center; gap: 13px; }
.portrait { width: clamp(56px, 6.2vw, 88px); height: auto; border-radius: 50%; background: #eeeee6; }
.cat-info h3 { font-size: 19px; letter-spacing: .12em; }
.cat-info p { font-size: 12px; line-height: 1.65; color: var(--muted); }
.cat-info .cat-now { color: #485a44; margin-top: 3px; }
dialog { width: min(680px, calc(100% - 28px)); max-height: 92vh; max-height: 92dvh; overflow: auto; padding: 22px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 80px #16201536; }
dialog::backdrop { background: #20281f8c; }
.dialog-bar { gap: 10px; margin-bottom: 16px; }
.icon-button { display: grid; place-items: center; width: 44px; padding: 0; }
#photo-close { margin-left: auto; }
.album-note, #photo-message { font-size: 13px; line-height: 1.7; color: var(--muted); }
#photo-message:not(:empty) { margin-top: 12px; }
#gift-feedback:not(:empty) { grid-column: 1/-1; font-size: 13px; line-height: 1.65; color: var(--sage); }
#gift-feedback:empty { display: none; }
#gift-panel { margin-top: 16px; border-top: 1px solid var(--line); padding: 14px 2px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#gift-art { object-fit: contain; }
#gift-panel h3 { font-size: 17px; }
#gift-panel p { font-size: 12px; line-height: 1.65; color: var(--muted); }
#gift-panel > div:first-of-type { flex: 1; min-width: 145px; }
#recipients { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
#album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.thumbnail { border: 1px solid var(--line); border-radius: 3px; padding: 5px; overflow: hidden; background: #fffdf6; text-align: left; }
.thumbnail:hover { box-shadow: 0 2px 10px #25312420; }
.thumbnail img, #photo-print { width: 100%; height: auto; display: block; }
.thumbnail img { aspect-ratio: 1.82; object-fit: cover; object-position: 50% 7%; }
.thumbnail span, .thumbnail time { display: block; margin-inline: 5px; }
.thumbnail span { font: 500 16px/1.5 var(--serif); margin-top: 5px; }
.thumbnail time { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
#photo-print { border: 1px solid var(--line); border-radius: 3px; }
.photo-actions { flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
#album-empty { text-align: center; padding: 32px 4px 38px; }
#album-empty svg { width: 36px; height: 36px; color: #697b64; }
#album-empty p { margin-top: 10px; }
#album-empty p:last-child { font-size: 13px; color: var(--muted); }
@media (max-width: 800px) {
  #cast-list { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 24px); }
  .site-header { min-height: 60px; }
  .brand { font-size: 21px; gap: 4px; }
  .brand svg { width: 23px; height: 23px; }
  nav { gap: 8px; font-size: 12px; }
  .album-link { padding: 7px 10px; }
  .stage { aspect-ratio: 1672/941; border-radius: 8px; }
  .player { grid-template-columns: 1fr; justify-items: center; padding: 16px 0; gap: 12px; }
  .room-info { text-align: center; }
  .episode { justify-content: center; }
  .controls, .sound-option { justify-self: center; }
  .controls { gap: 6px; flex-wrap: wrap; justify-content: center; }
  .quiet, .primary { padding: 9px 11px; gap: 4px; }
  .sound-option { grid-column: 1; }
  #cast { padding-top: 18px; }
  .cat-info { gap: 8px; }
  .cat-info h3 { font-size: 17px; }
  dialog { padding: 14px; }
  #album-grid { gap: 8px; }
}

