:root {
  color-scheme: light;
  --ink: #322219;
  --muted: #634c3c;
  --red: #641e1b;
  --red-deep: #4a1513;
  --rule: #a8876f;
  --paper: #f7e9d3;
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--serif);
  color: var(--ink);
  background: #302922;
}
* { box-sizing: border-box; }
body { margin: 0; }
.sheet {
  width: min(100%, 32rem);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(.65rem,env(safe-area-inset-top)) max(1.05rem,env(safe-area-inset-right)) max(.7rem,env(safe-area-inset-bottom)) max(1.05rem,env(safe-area-inset-left));
  background: var(--paper) url('/art/papier.jpg') repeat;
  box-shadow: 0 0 3rem #110a06aa;
  overflow-wrap: anywhere;
}
h1,h2,h3,p,ul,dl { margin: 0; }
h1,h2,h3 { color: var(--red); font-weight: 700; line-height: 1.04; letter-spacing: -.045em; }
h1 { font-size: clamp(2.05rem, 8.5vw, 2.8rem); }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
p,li { line-height: 1.5; }
button,summary,input,select,a { touch-action: manipulation; }
button,select,input { font: inherit; }
button,summary { cursor: pointer; }
button { min-height: 44px; color: var(--ink); }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 3px solid #30606a; outline-offset: 3px; }
.skip { position: absolute; left: 0; top: 0; transform: translateY(-140%); background: var(--paper); color: var(--red); padding: .8em; z-index: 5; }
.skip:focus { transform: none; }
.mast { display: flex; align-items: center; justify-content: space-between; gap: .3rem; border-bottom: 2px solid var(--red); padding: .3rem .1rem .55rem; }
.brand { display: flex; align-items: center; min-width: 0; gap: .6rem; }
.brand img { width: 2.65rem; height: 3.35rem; object-fit: contain; mix-blend-mode: multiply; flex: none; }
.mast.session .brand img { width: clamp(3.1rem,16vw,4.65rem); height: 3.35rem; }
#brand-title { display: block; font-size: clamp(1.75rem,7.9vw,2.3rem); font-weight: 700; color: var(--red); line-height: 1.04; letter-spacing: -.055em; }
#brand-detail { display: block; margin-top: .25em; font: 600 .76rem/1.35 var(--mono); letter-spacing: .025em; }
#brand-detail:empty { display: none; }
.menu { position: relative; flex: none; }
.menu>summary { width: 44px; min-height: 44px; display: grid; place-items: center; list-style: none; }
summary::-webkit-details-marker { display: none; }
.menu-icon,.menu-icon::before,.menu-icon::after { display: block; width: 1.55rem; height: 2px; border-radius: 1px; background: var(--red); }
.menu-icon { position: relative; }
.menu-icon::before,.menu-icon::after { content: ""; position: absolute; left: 0; top: -.44rem; }
.menu-icon::after { top: .44rem; }
.menu-paper { position: absolute; right: 0; top: 100%; width: min(16rem, 76vw); border: 1px solid var(--red); padding: 1rem; z-index: 3; border-radius: 4px; background: var(--paper) url('/art/papier.jpg'); box-shadow: 0 6px 15px #32221935; }
.menu-paper p { margin-top: .4rem; font: .88rem/1.5 var(--sans); }
#net { color: var(--muted); }
#net.off { color: var(--red); font-weight: 700; }
main { padding: .78rem 0 1.25rem; min-width: 0; }
main:focus { outline: 0; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: .8rem; padding: .75rem 0 .2rem; border-top: 1px solid var(--rule); color: var(--muted); font: .69rem/1.5 var(--mono); }
.plate { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 3px; }
.cover { width: calc(100% + .8rem); max-width: none; margin-inline: -.4rem; aspect-ratio: 1.09; max-height: 44svh; object-position: 50% 48%; }
.entry-title { margin: .38rem 0 0; color: var(--red); font-size: clamp(2.35rem,11.5vw,3.5rem); }
.subtitle { margin: .04rem 0 .68rem .1rem; font-size: 1.2rem; line-height: 1.28; font-style: italic; letter-spacing: .045em; }
.tabs,.switch { display: flex; flex-wrap: wrap; gap: .28rem; padding-bottom: .18rem; border-bottom: 1.5px solid var(--red); margin-bottom: .85rem; }
.tabs button,.switch button { min-width: 0; flex: 1 1 4.6em; background: transparent; border: 0; color: var(--ink); min-height: 44px; padding: .45rem .2rem; border-radius: 5px; font: 700 1.05rem/1.16 var(--serif); overflow-wrap: anywhere; }
.switch { border-top: 1px solid var(--red); padding-top: .5rem; }
.switch .active,.tabs .active,.primary,.option b { background: var(--red) linear-gradient(115deg,#76292455,#4e141688); color: #fff6e6; }
.field { display: grid; min-width: 0; gap: .38rem; margin-bottom: .7rem; color: var(--ink); font: 700 .85rem/1.4 var(--sans); }
.field input,.field select,.sharelink { display: block; width: 100%; min-width: 0; min-height: 44px; border: 1.4px solid var(--red); border-radius: 5px; background-color: #fffaf116; padding: .52rem .66rem; font: 400 1rem/1.4 var(--sans); color: var(--ink); }
.field select { white-space: normal; }
.field #code { font: 700 1.15rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .15em; }
#code::placeholder { color: #7a6351; font-size: .95rem; letter-spacing: .06em; font-weight: 400; }
.primary,.secondary,.audio-toggle,.audio-stop { border-radius: 5px; border: 1.3px solid var(--red); padding: .55rem .8rem; line-height: 1.3; font-weight: 700; }
.primary { width: 100%; font-size: 1.17rem; }
.secondary,.audio-toggle,.audio-stop { background: #fff9ef25; color: var(--red); }
.secondary,.audio-toggle { width: 100%; }
.audio-toggle { display: flex; align-items: center; gap: .65rem; justify-content: center; font-size: 1rem; }
.audio-glyph { color: var(--red); font: .85rem/1 var(--sans); }
.primary:hover:enabled,.tabs .active:hover,.switch .active:hover { background-color: var(--red-deep); }
.secondary:hover,.option:hover,.audio-toggle:hover,.audio-stop:hover { background-color: #e7d5bb; }
.linkbutton { background: transparent; border: 0; color: var(--red); text-decoration: underline; text-underline-offset: .18em; font-weight: 700; padding: .45rem .1rem; }
.meta,.tag { font: 600 .77rem/1.4 var(--mono); letter-spacing: .025em; }
.meta { margin-bottom: .25rem; }
.tag { color: var(--muted); }
.story,.announce { font-family: var(--serif); font-size: 1.1rem; line-height: 1.48; }
.announce,.excerpt { font-style: italic; }
.small,.hint,.notes,.check { font: .9rem/1.52 var(--sans); }
.small,.hint,.notes { color: var(--muted); }
.hint { margin: .55rem 0; }
.error { color: var(--red); font: 700 .92rem/1.4 var(--sans); }
.error:not(:empty) { margin: .65rem 0; }
.panel+.panel,.fold+.panel { margin-top: 1.2rem; }
.panel>*+*,.cue>*+*,.body-copy>*+*,.fold-body>*+*,.formrow>*+* { margin-top: .7rem; }
.panel .tag+h1,.panel .tag+h2,.panel .meta+h1 { margin-top: .2rem; }
.stack { display: grid; gap: .8rem; }
.rule-section { border-top: 1px solid var(--rule); padding-top: .85rem; }
.seatgrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(6em,100%),1fr)); gap: .35rem; }
.seat { padding: .5rem .35rem; border: 1px dashed var(--rule); border-radius: 3px; text-align: center; font: .8rem/1.4 var(--mono); }
.seat b { display: block; }
.seat.taken { border: 1px solid var(--red); }
.seat.mine { color: var(--paper); background: var(--red); }
.roomcode { font: 700 clamp(2.3rem,10vw,3.15rem)/1.1 var(--mono); color: var(--red); letter-spacing: .11em; }
.sharelink { font-family: var(--mono); }
.call-art { aspect-ratio: 1.7; max-height: 33svh; }
.public-art { aspect-ratio: 1.76; }
.epilog-art { aspect-ratio: 2.4; }
.excerpt { font-size: 1.17rem; line-height: 1.4; }
.option { display: flex; align-items: stretch; width: 100%; min-height: 47px; padding: 0; overflow: hidden; border: 1.5px solid var(--red); border-radius: 5px; background: #fff7ed19; text-align: left; }
.option b { flex: 0 0 2.25rem; align-content: center; text-align: center; font-size: 1.5rem; }
.option span { align-self: center; padding: .5rem .65rem; font: 600 1rem/1.35 var(--serif); }
.option+.option { margin-top: .42rem; }
.reply { border-left: 3px solid var(--red); background: #ddc5a647; padding: .7rem .8rem; }
.reply>*+* { margin-top: .45rem; }
.fold { border-top: 1px solid var(--rule); }
.fold>summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; line-height: 1.32; padding: .55rem .15rem; font-weight: 700; color: var(--red); list-style: none; }
.fold>summary::after { content: ""; width: .46rem; height: .46rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-20%) rotate(45deg); margin: 0 .3rem 0 .5rem; flex: none; }
.fold[open]>summary::after { transform: translateY(20%) rotate(225deg); }
.fold-body { padding: .1rem 0 .8rem; }
.fold.box { border: 1.4px solid var(--red); border-radius: 5px; padding-inline: .7rem; }
.box>summary { font-size: 1.13rem; }
.transcript,.transfer { border-top: 0; }
.transcript>summary,.transfer>summary { justify-content: center; text-decoration: underline; text-underline-offset: .18em; font-size: .97rem; }
.table { border-top: 1.5px solid var(--red); border-bottom: 1.5px solid var(--red); }
.table>div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .45rem; padding: .44rem .08rem; align-items: baseline; line-height: 1.32; }
.table>div+div { border-top: 1px solid var(--rule); }
.table dt { font: 700 .85rem/1.4 var(--sans); }
.table dd { margin: 0; font-size: 1rem; }
.cue { margin: .85rem 0; padding: .7rem 0 .1rem; border-top: 1px solid var(--rule); }
.notes { padding-left: 1.2rem; }
.notes li+li { margin-top: .4rem; }
.check { display: flex; align-items: center; gap: .65rem; min-height: 44px; }
.check input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--red); }
.endconfirm { padding: .8rem; border: 1px solid var(--red); border-radius: 5px; }
.wrap-actions { display: grid; gap: .45rem; margin-top: .65rem; }
.bottom-action { display: block; margin: 1rem auto 0; }
.empty { font: italic 1.12rem/1.5 var(--serif); padding: .45rem 0; }
.audio-feedback { text-align: center; }
#audio-status:not(.audio-problem),.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
#audio-status.audio-problem { padding: .6rem; color: var(--red); font: 700 .9rem/1.45 var(--sans); border: 1px solid var(--red); }
.audio-stop { margin: .4rem 0; }
.ambience { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .8rem; }
.ambience button { flex: 1 1 10rem; font-size: .96rem; }
.ambience label { flex: 1 1 8rem; display: grid; color: var(--muted); font: 600 .78rem/1.4 var(--sans); }
.ambience input { width: 100%; min-height: 30px; margin: 0; accent-color: var(--red); }
[hidden] { display:none !important; }
#notice:not(:empty) { position: fixed; bottom: max(.8rem,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 4; width: max-content; max-width: min(90vw,28rem); border-radius: 4px; padding: .65rem .85rem; background: var(--ink); color: #fff8eb; font: .95rem/1.4 var(--sans); box-shadow: 0 2px 12px #0003; pointer-events: none; }
@media(max-width:350px) { .sheet { padding-inline: max(.78rem,env(safe-area-inset-left)); } }
@media(max-height:490px) and (orientation:landscape) { .cover { max-height: 29svh; } .public-art,.call-art,.epilog-art { max-height: 31svh; } }
.call-title { font-size: clamp(2.05rem,8.5vw,2.8rem); }
