.page-game .game-shell.theme-rewrite:has(.rewrite-room) {
  --rewrite-ink:#273451;
  --rewrite-muted:#515967;
  --rewrite-line:#a8acbb;
  --rewrite-paper:#fff9ec;
  --rewrite-blue:#355b9b;
  --rewrite-orange:#a6421b;
  color:var(--rewrite-ink);
  background:radial-gradient(ellipse at 29% 11%,#fffaf1 0%,#faebda 71%,#f1dbc3);
}
.page-game .game-shell.theme-rewrite:has(.rewrite-room) .game-toolbar {
  background:#fcf1e6;
  border-bottom:1px solid #b4b3c5;
  color:var(--rewrite-ink);
}
.page-game .game-shell.theme-rewrite:has(.rewrite-room) .game-toolbar .button {
  min-height:44px;
  background:#fff9f1;
  border-color:#8798bd;
  color:var(--rewrite-ink);
}
.rewrite-room {width:min(100%,1210px);margin:0 auto;text-align:left;color:var(--rewrite-ink);scroll-margin-top:72px}
.game-shell .play .rewrite-room .session-banner {max-width:none;text-align:left;margin:0 0 clamp(14px,2.45vw,24px)}
.game-shell .play .rewrite-room .session-banner>:is(h2,.meta) {max-width:none;margin-inline:0;text-align:left;color:var(--rewrite-ink)}
.game-shell .play .rewrite-room .session-banner h2 {font-size:clamp(1.45rem,3.65vw,3.45rem);line-height:1.08;text-wrap:balance}
.game-shell .play .rewrite-room .session-banner .meta {color:var(--rewrite-blue);font-weight:750}
.game-shell .play .rewrite-room h3 {font-size:1.12rem;margin:0 0 10px;text-align:left}
.game-shell .play .rewrite-room p {max-width:none;text-align:left;line-height:1.52;color:var(--rewrite-muted);margin:0 0 12px}
.game-shell .play .rewrite-room .actions {justify-content:flex-start;align-items:stretch;gap:8px;margin:13px 0 0}
.game-shell .play .rewrite-room button {min-height:44px;min-width:44px;white-space:normal;touch-action:manipulation}
.game-shell .play .rewrite-room :is(.button.cta,.actions .button:not(.secondary)) {background:var(--rewrite-orange);color:#fffaf3;border-color:var(--rewrite-orange)}
.game-shell .play .rewrite-room :is(.button.cta,.actions .button:not(.secondary)):hover {background:#853310;border-color:#853310}
.game-shell .play .rewrite-room .button.secondary {background:#fffaf0;color:var(--rewrite-ink);border-color:#8d9fbc}
.rewrite-room :is(button,input,textarea,summary):focus-visible {outline:3px solid #2d63a1;outline-offset:3px}
.rewrite-desk {display:grid;grid-template-columns:minmax(0,1.48fr) minmax(232px,1fr);gap:clamp(16px,3.3vw,44px);align-items:start}
.rewrite-card {
  --rewrite-pad:clamp(14px,2.45vw,30px);
  position:relative;
  overflow:hidden;
  min-width:0;
  padding:calc(var(--rewrite-pad) + 8px) var(--rewrite-pad) var(--rewrite-pad);
  border:1px solid #aeb5c4;
  border-radius:9px;
  background:var(--rewrite-paper);
  box-shadow:0 5px 0 #53658c1c,0 10px 18px #474f671d;
}
.rewrite-card::before {
  content:"";
  position:absolute;
  height:9px;
  inset:0 0 auto;
  background:repeating-linear-gradient(122deg,#446ca7 0 13px,#e0e9f9 13px 26px);
}
.rewrite-card>span,.rewrite-format>span {font-size:.85rem;font-weight:700;color:#4d5869;display:block;margin:0 0 6px}
.game-shell .play .rewrite-room .rewrite-card>p {font-size:clamp(1.12rem,2.15vw,1.9rem);line-height:1.42;color:var(--rewrite-ink);margin:0;overflow-wrap:anywhere}
.rewrite-format {
  margin:clamp(12px,2vw,23px) calc(var(--rewrite-pad) * -1) calc(var(--rewrite-pad) * -1);
  padding:clamp(11px,1.7vw,21px) var(--rewrite-pad);
  background:#d4ebfa;
  border-block:1px solid #abc8dd;
}
.rewrite-format>span {color:#365275;margin:0 0 3px}
.rewrite-format>strong {display:block;font-size:clamp(1.35rem,3.2vw,2.9rem);line-height:1.13;font-weight:800;overflow-wrap:anywhere;color:var(--rewrite-ink)}
.game-shell .play .rewrite-room .rewrite-card>.rewrite-cue {
  font-size:clamp(.89rem,1.25vw,1.02rem);
  line-height:1.51;
  color:var(--rewrite-muted);
  margin:calc(var(--rewrite-pad) + 13px) 0 0;
  padding-inline-start:10px;
  border-inline-start:3px solid #b96133;
}
.rewrite-cue>b {font-weight:750;color:var(--rewrite-ink)}
.rewrite-console {
  min-width:0;
  padding:clamp(13px,2.25vw,26px);
  border:1px solid #a7b3cc;
  border-radius:9px;
  background:#fcf5ec;
  color:var(--rewrite-ink);
}
.rewrite-console>span {font-size:1.02rem;font-weight:760}
.game-shell .play .rewrite-room .rewrite-console .table-clock {
  display:grid;
  width:100%;
  margin:7px 0 0;
  padding:0;
  min-width:0;
  border:0;
  background:none;
  box-shadow:none;
  color:var(--rewrite-ink);
}
.rewrite-console .table-clock>span,
.game-shell .play .rewrite-room .rewrite-not-started {font-size:.88rem;color:var(--rewrite-muted)}
.game-shell .play .rewrite-room .rewrite-not-started {margin:8px 0 0}
.game-shell .play .rewrite-room .rewrite-console [data-time],.rewrite-not-started strong {
  display:block;
  color:var(--rewrite-ink);
  font-size:clamp(2.65rem,6.65vw,5.9rem);
  line-height:1.02;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  margin:4px 0 8px;
}
.rewrite-console progress {width:100%;height:7px;accent-color:#42649c}
.rewrite-console progress::-webkit-progress-bar {background:#cbdaeb}
.rewrite-console progress::-webkit-progress-value {background:#42649c}
.rewrite-console progress::-moz-progress-bar {background:#42649c}
.game-shell .play .rewrite-room .rewrite-console .rewrite-fineprint {color:var(--rewrite-muted);font-size:.86rem;line-height:1.45;margin:13px 0 0}
.rewrite-console .actions .button:not(.secondary) {width:100%}
.rewrite-fold {
  display:flex;
  justify-content:space-around;
  align-items:center;
  gap:18px;
  width:min(450px,100%);
  min-height:clamp(105px,18vw,165px);
  border:1px solid #8ca1c0;
  border-radius:8px;
  background:linear-gradient(166deg,#e1ecfb 0 50%,#b3c7e4 50.5% 52%,#d1e1f5 52.5%);
  box-shadow:0 5px 0 #7b98c235;
  margin:0 0 15px;
  color:var(--rewrite-blue);
}
.rewrite-fold>span {font-size:2.3rem}
.rewrite-stage-sign {
  max-width:680px;
  min-height:clamp(100px,16vw,180px);
  margin:0 0 13px;
  border:1px solid #8ca3c0;
  border-radius:9px;
  background:repeating-linear-gradient(90deg,#dbe9f5 0 36px,#ccdff0 36px 38px);
  display:grid;
  place-items:center;
  color:#2c4d86;
}
.rewrite-stage-sign span {font-size:clamp(2.3rem,5vw,4rem);font-weight:700}
.rewrite-scores {display:flex;flex-wrap:wrap;gap:10px 18px;list-style:none;padding:0!important;margin:17px 0 0!important}
.rewrite-scores li {display:flex;gap:14px;align-items:baseline;border-bottom:2px solid #8da1c4;padding:6px 2px;min-width:97px}
.rewrite-scores li>span {font-size:.85rem;color:var(--rewrite-muted)}
.rewrite-scores strong {font-size:1.5rem;line-height:1.1;font-variant-numeric:tabular-nums}
.game-shell .play .rewrite-room form {display:grid;gap:12px;min-width:0;margin-inline:0}
.rewrite-room fieldset {border:0;padding:0;margin:0;min-width:0}
.rewrite-room legend {font-size:.91rem;font-weight:750;margin-bottom:10px}
.rewrite-guess-form {max-width:880px}
.rewrite-guess-form fieldset {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.rewrite-guess-form legend {grid-column:1/-1}
.rewrite-guess-form fieldset label,.rewrite-check {
  display:flex;
  align-items:flex-start;
  gap:9px;
  min-height:54px;
  border:1px solid #a4b1c4;
  border-radius:6px;
  padding:11px 12px;
  background:#f9f7f0;
  color:var(--rewrite-ink);
  font-size:.92rem;
  line-height:1.5;
}
.rewrite-room input[type=radio],.rewrite-room input[type=checkbox] {width:20px;height:20px;flex:none;accent-color:#355b9b;margin:2px 0 0}
.rewrite-room :is(.rewrite-guess-form fieldset label,.rewrite-check):has(input:checked) {background:#deedf8;border-color:#4d73a1}
.rewrite-guess-form>label {display:grid;gap:8px;font-size:.92rem;font-weight:650}
.rewrite-room textarea {width:100%;min-height:98px;resize:vertical;border:1px solid #8c9fba;border-radius:6px;padding:10px;line-height:1.6;background:#fffdf7;color:var(--rewrite-ink);font:inherit}
.game-shell .play .rewrite-room [data-rewrite-guess-counter] {font-size:.85rem;color:var(--rewrite-muted);margin:0}
.game-shell .play .rewrite-room .rewrite-fineprint {font-size:.86rem;color:var(--rewrite-muted);margin:0}
.game-shell .play .rewrite-room [data-rewrite-error] {font-size:.9rem;color:#923829;margin:0}
.rewrite-room [data-rewrite-error]:empty,.rewrite-room [data-rewrite-setup-error]:empty {display:none}
.rewrite-room form>.button {justify-self:start}
.rewrite-locked-guess {padding:11px 13px;margin-top:14px;border-inline-start:3px solid #6d8cb8;background:#e8f0fa}
.rewrite-locked-guess>span {display:block;color:var(--rewrite-muted);font-size:.84rem;font-weight:700;margin-bottom:4px}
.game-shell .play .rewrite-room .rewrite-locked-guess p {font-size:.97rem;margin:0;color:var(--rewrite-ink);overflow-wrap:anywhere}
.rewrite-check {margin-bottom:8px}
.rewrite-check small {display:block;color:var(--rewrite-muted);font-size:.84rem;margin-top:4px}
.rewrite-check:has(input:disabled) {background:#f0ece7;color:#5d5650}
.rewrite-record {margin-top:15px;padding:clamp(13px,2vw,23px);border:1px solid #aeb8c9;border-radius:8px;background:#fff8ed}
.rewrite-record>.rewrite-card {box-shadow:none}
.game-shell .play .rewrite-room .rewrite-record .rewrite-card>p {font-size:1.08rem}
.rewrite-record .rewrite-format strong {font-size:1.22rem}
.rewrite-record-checks {list-style:none;padding:0!important;margin:14px 0 0!important}
.rewrite-record-checks li {display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #c9c5bf;font-size:.9rem}
.rewrite-record-checks li span {min-width:0;overflow-wrap:anywhere}
.rewrite-record-checks li strong {font-size:.83rem;flex-shrink:0;color:#87452c}
.rewrite-record-checks li[data-matched=true] strong {color:#2d644f}
.game-shell .play .rewrite-room .rewrite-timing {display:flex;flex-wrap:wrap;gap:6px 15px;font-size:.82rem;margin:13px 0 0;color:var(--rewrite-muted)}
.rewrite-archive {margin-top:18px}
.rewrite-archive-entry {border-top:1px solid #afb9cf}
.rewrite-archive-entry>summary {min-height:44px;padding:12px 3px;font-size:.91rem;font-weight:700;cursor:pointer}
.rewrite-archive-entry .rewrite-record {margin:0 0 12px}
@media(max-width:720px) {
  .rewrite-desk,.rewrite-guess-form fieldset {grid-template-columns:minmax(0,1fr)}
  .rewrite-console .actions .button {flex:1 1 100%}
  .rewrite-room form>.button {justify-self:stretch}
}
