.story-room{width:min(100%,1180px);margin-inline:auto;color:var(--story-ink);text-align:left}
.story-room .session-banner{text-align:left;margin:0 0 20px}
.game-shell .play .story-room :is(.session-banner>.meta,.story-handoff-note,.story-copy-status){margin-inline:0;text-align:left}
.story-folded-page{position:relative;display:flex;align-items:stretch;width:min(100%,610px);height:clamp(145px,24vw,230px);margin:28px 0 21px;filter:drop-shadow(0 12px 10px #543f2825)}
.story-folded-page span{display:block;flex:1;background:linear-gradient(105deg,#e5d6bb,#f7eedc 9%,#f3e9d5 85%,#d6c3a1);clip-path:polygon(0 20%,100% 0,100% 80%,0 100%)}
.story-folded-page span:nth-child(2){background:linear-gradient(100deg,#d1bf9f,#e7dbc4 24%,#ede3cf 82%,#cbb795);clip-path:polygon(0 0,100% 20%,100% 100%,0 80%)}
.story-folded-page span:last-child{background:linear-gradient(95deg,#ddc9a9,#fff4de 22%,#efe0c4);animation:story-set-fold .22s ease-out both}
@keyframes story-set-fold{from{opacity:.65;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.game-shell .story-room .story-handoff-note{text-align:left;font-size:1rem;line-height:1.75;margin:22px 0;max-width:46rem;color:#71695e}
.story-writing-desk{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:44px;align-items:start;margin:24px 0}
.story-anchor-desk{min-width:0}
.story-anchor{margin:0;padding:24px 26px;background:var(--story-paper);border:1px solid #d8cbb7;border-left:4px solid #b8a082;border-radius:4px}
.game-shell .story-room .story-anchor-label{text-align:left;font-size:.82rem;font-weight:650;line-height:1.5;color:#756757;margin:0 0 16px}
.game-shell .story-room [data-story-anchor]{font-family:Georgia,'Songti SC',serif;text-align:left;font-size:clamp(1.15rem,2vw,1.5rem);line-height:1.8;overflow-wrap:anywhere;white-space:pre-wrap;margin:0}
.story-contributor-cue{padding:17px 20px;background:#edf1ef;border-left:3px solid #92a59a;border-radius:3px;margin:22px 0 0}
.story-contributor-cue>strong{font-size:.82rem;font-weight:700;color:#5a6a5f}
.game-shell .story-room .story-contributor-cue p{text-align:left;font-size:.94rem;line-height:1.75;overflow-wrap:anywhere;white-space:pre-wrap;margin:9px 0 0}
.story-room [data-table-form="sentence"]{min-width:0;display:grid;gap:12px}
.game-shell .play .story-room [data-table-form="sentence"]{width:100%;max-width:none;margin-inline:0}
.story-room [data-table-form="sentence"]>label{font-size:.95rem;font-weight:650;line-height:1.6}
.story-room [name="line"]{width:100%;min-width:0;min-height:240px;padding:18px 20px;border:1px solid #bcae99;border-radius:4px;background:#fffdf7;color:var(--story-ink);font:inherit;font-size:1.05rem;line-height:1.85;resize:vertical;box-shadow:inset 0 2px 4px #9986730a}
.game-shell .play .story-room [name="line"]{background:var(--story-paper);border-color:#bcae99}
.story-draft-meta{display:flex;justify-content:space-between;align-items:baseline;gap:15px}
.game-shell .story-room .story-draft-meta p{text-align:left;font-size:.8rem;line-height:1.6;color:#756757;margin:0;max-width:70%}
.story-draft-meta output{font-size:.8rem;line-height:1.6;white-space:nowrap;font-variant-numeric:tabular-nums;color:#71695e}
.story-room [data-table-form="sentence"]>.button{justify-self:start;min-height:50px;min-width:180px}
.game-shell .story-room [data-story-error]{text-align:left;margin:0;color:#9b5147;font-size:.88rem;line-height:1.65}
.game-shell .story-room [data-story-error]:empty{display:none}
.story-room textarea:focus-visible,.story-room summary:focus-visible{outline:3px solid #a59175;outline-offset:4px}
.game-shell .story-room .story-copy-status{text-align:left;font-size:.9rem;line-height:1.7;margin:18px 0;color:#6d7f70}
.game-shell .story-room .story-copy-status:empty{display:none}
.story-final-manuscript{max-width:950px;padding:30px 36px;margin:28px auto;background:var(--story-paper);border:1px solid #dfd5c6;border-radius:3px}
.story-final-manuscript>h3{font-family:Georgia,'Songti SC',serif;font-size:1.6rem;line-height:1.6;margin:0 0 30px;font-weight:650}
.story-room .story-manuscript{list-style:none;padding:0;margin:0}
.story-room .story-manuscript>li{display:grid;grid-template-columns:105px minmax(0,1fr);gap:0 22px;padding:18px 0 20px;border-top:1px solid #e5dccc;min-width:0}
.story-manuscript h4{grid-column:1;grid-row:1;font-size:.8rem;font-weight:650;line-height:1.7;color:#756757;margin:5px 0 0}
.game-shell .story-room .story-manuscript>li>p{grid-column:2;grid-row:1;font-family:Georgia,'Songti SC',serif;text-align:left;font-size:1.12rem;line-height:1.95;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.story-manuscript .story-contributor-cue{grid-column:2;grid-row:1;margin:0 0 17px;padding:12px 16px;background:#f0f2ed}
.game-shell .story-room .story-manuscript>li:has(.story-contributor-cue)>p{grid-row:2}
.story-manuscript .story-contributor-cue>strong{font-size:.74rem}
.game-shell .story-room .story-manuscript .story-contributor-cue p{font-size:.82rem;line-height:1.6}
.story-plain-text{max-width:950px;margin:24px auto;border-top:1px solid #cec3b1;padding-top:14px}
.story-plain-text>summary{font-size:.9rem;cursor:pointer;min-height:44px;padding:10px 0;line-height:1.6;font-weight:650}
.story-plain-text textarea{width:100%;min-height:270px;margin:15px 0;padding:18px 20px;font:inherit;font-size:.93rem;line-height:1.8;color:var(--story-ink);background:#fffdf7;border:1px solid #c9bda9;border-radius:4px;resize:vertical}
@media(max-width:799px){.story-writing-desk{grid-template-columns:minmax(0,1fr);gap:24px}.story-room [name="line"]{min-height:200px}.story-final-manuscript{padding:24px 26px}.story-final-manuscript>h3{font-size:1.4rem}.story-room .story-manuscript>li{grid-template-columns:82px minmax(0,1fr);gap:0 16px}}
@media(max-width:499px){.story-folded-page{margin-block:22px 16px}.story-anchor{padding:20px}.game-shell .story-room [data-story-anchor]{font-size:1.18rem}.story-room [name="line"]{padding:16px;font-size:1rem;min-height:205px}.story-draft-meta{gap:10px}.game-shell .story-room .story-draft-meta p{font-size:.75rem;max-width:65%}.story-draft-meta output{font-size:.73rem}.story-room [data-table-form="sentence"]>.button{width:100%}.story-final-manuscript{padding:20px;margin:24px 0}.story-room .story-manuscript>li{display:block;padding:16px 0}.story-manuscript h4{margin:0 0 10px;font-size:.76rem}.game-shell .story-room .story-manuscript>li>p{font-size:1.06rem;line-height:1.9}.story-manuscript .story-contributor-cue{margin:0 0 14px}.story-contributor-cue{padding:15px 17px}}
@media(prefers-reduced-motion:reduce){.story-room *{animation:none!important;transition:none!important}}

.page-game .game-shell.theme-story:not(.theme-wolf) {
  --story-ink:#172f4e;
  --story-paper:#fff7ea;
  --story-secondary:#405976;
  --story-rust:#853515;
  --brand:var(--story-ink);
  --stage-ink:var(--story-ink);
  --stage:#d1e4eb;
  --soft:#f9f0e4;
  --line:#b5c7ce;
  background:radial-gradient(ellipse at 25% 10%,#e3eef1,transparent 66%),#c5dee8;
}
.page-game .game-shell.theme-story .play {background:none}
.page-game .game-shell.theme-story .game-toolbar {background:var(--soft)}
.page-game .game-shell.wide.theme-story .play:has(.story-room) {
  max-width:100rem;
  min-height:0;
  justify-content:flex-start;
  margin:0 auto;
  padding:clamp(.85rem,3.2vw,3rem) clamp(.85rem,3.75vw,3.5rem) 2rem;
}
.game-shell .play .story-room {
  width:100%;
  max-width:89rem;
  color:var(--story-ink);
}
.game-shell .play .story-room .session-banner {
  margin:0 0 clamp(.75rem,2vw,1.4rem);
  max-width:none;
}
.game-shell .play .story-room .session-banner h2 {
  font-family:Georgia,'Songti SC','Noto Serif CJK SC',serif;
  font-size:clamp(1.75rem,5vw,4.4rem);
  line-height:1.06;
  color:var(--story-ink);
  margin:.45rem 0 0;
  text-wrap:balance;
}
.game-shell .play .story-room .session-banner .meta {
  display:inline-block;
  width:fit-content;
  padding:.36rem 1.1rem .36rem .65rem;
  margin:0;
  clip-path:polygon(0 0,100% 0,calc(100% - .48rem) 50%,100% 100%,0 100%);
  background:var(--story-rust);
  color:#fff9ec;
  font-size:clamp(.88rem,1.4vw,1.02rem);
  font-weight:750;
}
.game-shell .play .story-room .actions {
  justify-content:flex-start;
  gap:.6rem;
}
.game-shell.theme-story :is(.play .story-room,.game-toolbar) .button {
  min-height:46px;
  padding:.58rem .95rem;
  white-space:normal;
  font-size:.94rem;
  transition:background-color .16s ease,transform .16s ease;
}
.page-game .game-shell.theme-story .play .button:is(.cta,[data-action=open-turn],[data-action=copy-manuscript]) {
  color:#fff9ed;
  background:var(--story-ink);
  border-color:var(--story-ink);
}
.page-game .game-shell.theme-story .play .button:is(.cta,[data-action=open-turn],[data-action=copy-manuscript]):hover {
  background:#213f64;
  transform:translateY(-1px);
}
.page-game .game-shell.theme-story .button.secondary {
  color:var(--story-ink);
  background:#edf5f7;
  border-color:#7893a3;
}
.page-game .game-shell.theme-story .game-toolbar .button {
  color:var(--story-ink);
  background:var(--story-paper);
  border-color:#7893a3;
}
.game-shell .story-room :is(button,textarea,summary):focus-visible {
  outline:3px solid #335e7a;
  outline-offset:3px;
}

.story-handoff {
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:clamp(.9rem,4vw,4rem);
  align-items:center;
}
.story-folded-page {
  width:100%;
  max-width:40rem;
  height:clamp(7rem,21vw,17rem);
  margin:.4rem 0;
  padding:.32rem;
  filter:drop-shadow(0 11px 10px #2b4b6240);
}
.story-folded-page span {background:linear-gradient(96deg,#e3d2b7,#fff4dd 19%,#efdec1 89%,#cfb99a)}
.story-folded-page span:nth-child(2) {background:linear-gradient(98deg,#d9c7aa,#f7ebd0 40%,#e9d7ba)}
.story-folded-page span:last-child {background:linear-gradient(95deg,#e4d1ae,#fff3d9 28%,#fbebcc)}
.game-shell .story-room .story-handoff-note {color:var(--story-ink);margin:.65rem 0 1rem}

.story-writing-desk {
  grid-template-columns:minmax(0,.93fr) minmax(0,1.07fr);
  align-items:stretch;
  gap:clamp(1rem,3.1vw,2.6rem);
  margin:0 0 1rem;
}
.story-anchor-desk {
  display:flex;
  flex-direction:column;
  min-width:0;
}
.story-anchor {
  --story-fold:clamp(1.25rem,4vw,4rem);
  --story-paper-top:#fff4df;
  --story-paper-bottom:#f2e3c7;
  position:relative;
  flex:1;
  min-width:0;
  padding:clamp(.9rem,3.2vw,2.8rem);
  padding-inline-end:max(clamp(.9rem,3.2vw,2.8rem),var(--story-fold));
  background:linear-gradient(#fff8e9 0%,var(--story-paper-top) 70%,#d7c6a8 71%,var(--story-paper-bottom) 75%,#f8ecd5);
  border:0;
  border-radius:.45rem 0 .5rem .5rem;
  clip-path:polygon(0 0,calc(100% - var(--story-fold)) 0,100% var(--story-fold),100% 100%,0 100%);
}
.story-anchor::after {
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:var(--story-fold);
  aspect-ratio:1;
  background:linear-gradient(135deg,#e1ccac,#fff8e9 58%,#f7e5c6);
  box-shadow:-4px 5px 8px #684e3455;
  pointer-events:none;
}
.game-shell .story-room .story-anchor-label {
  color:var(--story-rust);
  font-size:clamp(.88rem,1.55vw,1.18rem);
  margin:0 0 .7rem;
}
.story-anchor-label::after {
  content:"";
  display:block;
  width:2.1rem;
  height:2px;
  margin-top:.48rem;
  background:currentColor;
}
.game-shell .story-room [data-story-anchor] {
  font-size:clamp(1.16rem,2.6vw,2.35rem);
  line-height:1.43;
}
.story-contributor-cue {
  border-left-color:#6b8e95;
  background:#eaf2f0;
  margin-top:.65rem;
  padding:.7rem .85rem;
}
.story-contributor-cue > strong {color:#325d64}
.game-shell .play .story-room [data-table-form="sentence"] {
  border:1px solid #bac6c4;
  border-radius:.45rem;
  background:var(--story-paper);
  box-shadow:0 6px 16px #2a4e6128;
  padding:clamp(.8rem,2.7vw,2.3rem);
  gap:clamp(.5rem,1.35vw,.9rem);
}
.game-shell .play .story-room [data-table-form="sentence"] > label {
  font:700 clamp(1.12rem,2.1vw,1.65rem)/1.25 Georgia,'Songti SC',serif;
  color:var(--story-ink);
}
.game-shell .play .story-room [name="line"] {
  --story-rule-height:2rem;
  min-height:clamp(10rem,25dvh,18rem);
  padding:.45rem .65rem;
  border-color:#869daa;
  background:repeating-linear-gradient(to bottom,#fffaf0 0 calc(var(--story-rule-height) - 1px),#c5d5dc calc(var(--story-rule-height) - 1px) var(--story-rule-height));
  background-position:0 .35rem;
  font-size:clamp(1rem,1.45vw,1.25rem);
  line-height:var(--story-rule-height);
  color:var(--story-ink);
}
.game-shell .story-room .story-draft-meta p,
.story-draft-meta output {color:var(--story-secondary);font-size:.83rem}
.game-shell .story-room [data-story-error] {color:#8c321b;font-weight:700}
.story-final-manuscript {
  max-width:60rem;
  margin:1rem 0;
  border-color:#a9b9bf;
  padding:clamp(.85rem,3.6vw,2.7rem);
  box-shadow:0 8px 18px #2a4e612a;
}
.story-final-manuscript > h3 {margin-bottom:.9rem}
.story-plain-text {margin:1rem 0;border-color:#8199a7}
.story-plain-text textarea {border-color:#849ba8;background:#fffaf0}
.story-manuscript h4 {color:var(--story-rust)}
.story-room .story-manuscript > li {border-color:#d6c6ae}
.game-shell .story-room .story-copy-status {color:#30594c}

@media (max-width:799px) {
  .story-handoff,.story-writing-desk {grid-template-columns:minmax(0,1fr)}
  .story-folded-page {width:min(100%,28rem)}
  .story-anchor {background:linear-gradient(120deg,#fff9ec,#f2e2c8)}
  .game-shell .play .story-room [name="line"] {min-height:9rem}
}
@media (max-width:420px) {
  .story-draft-meta {align-items:start;gap:.45rem}
  .game-shell .story-room .story-draft-meta p {max-width:none}
  .story-room [data-table-form="sentence"] > .button {min-width:0}
}
@media (prefers-reduced-motion:reduce) {
  .game-shell .play .story-room .button {transition:none;transform:none}
}
