.tower-room{--tw-ink:#3b4544;--tw-muted:#5d6b69;--tw-paper:#f2efe2;--tw-fold:#bcbfae;--tw-green:#557363;--tw-gold:#9d7950;width:min(100%,1110px);margin-inline:auto;text-align:left;color:var(--tw-ink);font-variant-numeric:tabular-nums}
.game-shell .play .tower-room .session-banner{max-width:none;text-align:left;margin:0 0 22px}.game-shell .play .tower-room .session-banner>:is(h2,.meta){max-width:none;text-align:left;margin-inline:0}
.game-shell .play .tower-room p{max-width:none;text-align:left;margin-inline:0;color:var(--tw-muted);line-height:1.65}.game-shell .play .tower-room h3{max-width:none;text-align:left;margin:0 0 15px;line-height:1.4;color:var(--tw-ink);font-size:1.35rem}
.game-shell .play .tower-room .actions{justify-content:flex-start;gap:10px;margin:16px 0}.game-shell.theme-tower.wide .play{justify-content:flex-start}.tower-room .button{min-height:46px;white-space:normal;font-size:.92rem;line-height:1.5}.tower-room button:focus-visible,.tower-room input:focus-visible,.tower-room textarea:focus-visible{outline:3px solid #9d7950;outline-offset:3px}
.tower-desk{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:clamp(35px,6vw,85px);align-items:start}
.tower-paper{position:relative;width:min(100%,350px);height:270px;margin:2px auto 25px;isolation:isolate;background:radial-gradient(ellipse at 50% 95%,#868d7130 0 20%,transparent 55%)}
.tower-paper span{position:absolute;bottom:25px;height:210px;width:110px;background:linear-gradient(90deg,#e6e6da,#fcfaf1 48%,#c3c8b3 50%,#ebeddf 70%,#d7dccb);clip-path:polygon(50% 0,100% 100%,0 100%);filter:drop-shadow(1px 2px 2px #75846d55);transform-origin:center bottom}
.tower-paper span:nth-child(1){left:25%;transform:rotate(-12deg);height:180px}.tower-paper span:nth-child(2){left:39%;height:235px;transform:rotate(5deg);z-index:2}.tower-paper span:nth-child(3){left:50%;transform:rotate(17deg);height:162px;background:linear-gradient(90deg,#d1d8c6,#f6f5e9 48%,#aebaa2 50%,#e6ecda 75%)}
.tower-paper i{position:absolute;left:10%;right:8%;bottom:20px;height:6px;border-top:2px solid #939b7c;background:linear-gradient(#c1c4b1,#dedecd);transform:skew(-20deg);box-shadow:0 7px 8px #78876b14}
.tower-checklist{display:grid;gap:18px;margin:6px 0 25px}.tower-checklist label,.tower-both{display:flex;align-items:flex-start;gap:13px;line-height:1.65;color:#43534a;font-size:.98rem}.tower-checklist input,.tower-both input{width:20px;height:20px;flex-shrink:0;margin:3px 0 0;accent-color:#61795c}.tower-room form>.button{margin:5px 10px 8px 0}
.tower-clock{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;padding:15px 0 25px}.tower-clock strong{font:700 clamp(85px,12vw,150px)/1 Georgia,serif;letter-spacing:-.065em;color:#54745f}.tower-clock>span{font-size:1.25rem;color:#5a6d5e}.tower-clock progress{flex-basis:100%;width:100%;height:7px;margin-top:17px;appearance:none;border:0;border-radius:4px;background:#d0d5c33d}.tower-clock progress::-webkit-progress-bar{background:#d0d5c33d;border-radius:4px}.tower-clock progress::-webkit-progress-value{background:#839873;border-radius:4px}.tower-room[data-tower-phase=paused] .tower-clock strong{color:#967448}
.tower-both{margin:15px 0 23px}.tower-reset{border-top:1px solid #8d977735;margin-top:25px;padding-top:13px}.tower-controls{padding-top:6px}
.tower-stability{display:flex;gap:15px;margin:30px 0 25px}.tower-stability span{width:65px;height:65px;display:grid;place-items:center;background:#e7eadd;border:1px solid #a4af9655;border-radius:4px 4px 16px 4px;color:#5a6b59;font:1.65rem Georgia,serif}.tower-stability [data-tower-beat-state=active]{background:#e5d9b7;border:2px solid #a28855;color:#57492f}.tower-stability [data-tower-beat-state=done]{background:#73906c;border:2px solid #5e7e57;color:#fffdf5;box-shadow:inset 0 0 0 5px #c9d6b51c}.tower-observation-clock{padding-bottom:0}.tower-room[data-tower-phase=interrupted] .tower-stability span{background:#eee3cf;color:#866342}
.tower-measure-desk{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(35px,6vw,80px)}.tower-measure-team{border-top:3px solid #8f9d7d;padding-top:20px;min-width:0}.tower-measure-team:nth-child(2){border-top-color:#ab9471}.game-shell .play .tower-room .tower-status-label{margin:0 0 11px;font-size:.9rem}
.tower-statuses{display:grid;gap:8px}.tower-statuses button{min-height:44px;padding:10px 13px;border:1px solid #9aa18d55;border-left:3px solid transparent;border-radius:2px;background:transparent;font:inherit;font-size:.92rem;line-height:1.5;color:#4d5c50;text-align:left;cursor:pointer;touch-action:manipulation}.tower-statuses [aria-pressed=true]{background:#e4e9d9;border-left-color:#6c865e;border-color:#8d9d7855;font-weight:650}.tower-height-label{display:grid;gap:8px;margin:18px 0;font-size:.95rem;color:#3f5046}.tower-height-label input{height:49px;font:600 1.4rem Georgia,serif;padding:8px 13px;border:1px solid #7c8e7266;border-radius:3px;box-sizing:border-box;width:100%;background:#fcfcf5;color:#405a45}.tower-height-label small,.tower-note-label small{font-size:.76rem;color:var(--tw-muted);line-height:1.55}.tower-height-label input[aria-invalid=true]{border-color:#9d604d}.game-shell .play .tower-room .tower-zero{font-size:.92rem;color:#7c6546;margin:17px 0}
.tower-note-label{display:grid;gap:6px;margin:17px 0 0;font-size:.9rem;color:#45554a}.tower-note-label textarea{min-height:65px;resize:vertical;box-sizing:border-box;width:100%;padding:9px 12px;border:1px solid #919c8055;border-radius:3px;font:inherit;font-size:.94rem;line-height:1.55;color:#42584a;background:#fcfcf6}.game-shell .play .tower-room [data-tower-error]{font-size:.9rem;color:#945c45;margin:13px 0}
.tower-best{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:35px;margin-bottom:23px}.tower-best p{display:grid;gap:8px;margin:0}.tower-best span{font-size:.82rem}.tower-best strong{font:700 2.4rem Georgia,serif;color:#4e6d58}
.tower-record{border-top:2px solid #9ca18a55;padding-top:20px}.game-shell .play .tower-room .tower-record-time{font-size:.82rem;margin:0 0 18px}.tower-record-teams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:35px}.tower-record-teams section{border-left:3px solid #8e9d7c;padding-left:20px}.tower-record-teams section:nth-child(2){border-left-color:#b19b75}.tower-record h4{font-size:1rem;color:#475848;margin:0 0 13px}.tower-record-height{font:700 2rem Georgia,serif;color:#4d6c55}.game-shell .play .tower-room .tower-record-teams p{font-size:.9rem;margin:12px 0}.tower-variable{overflow-wrap:anywhere}.tower-archive{display:grid;gap:25px;margin-top:30px}
@media(min-width:1100px) and (max-height:780px){.tower-paper{height:235px;margin-bottom:16px}.tower-paper span:nth-child(1){height:155px}.tower-paper span:nth-child(2){height:205px}.tower-paper span:nth-child(3){height:140px}.tower-checklist{gap:14px}.tower-checklist label{font-size:.94rem}.game-shell .play .tower-room .session-banner{margin-bottom:18px}.tower-measure-team{padding-top:15px}.tower-statuses{gap:6px}.tower-statuses button{padding-block:8px}.tower-height-label{margin:13px 0;gap:6px}.tower-height-label input{height:44px}.tower-note-label{margin-top:12px;gap:4px}.tower-note-label textarea{min-height:55px}.tower-stability{margin-block:23px}.tower-clock{padding-top:7px}}
@media(max-width:850px){.tower-desk{gap:30px;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)}.tower-paper{height:240px}.tower-paper span:nth-child(2){height:210px}.tower-clock strong{font-size:110px}.tower-measure-desk{gap:30px}.tower-checklist label{font-size:.93rem}.tower-statuses button{font-size:.9rem}}
@media(max-width:650px){.tower-desk,.tower-measure-desk{grid-template-columns:1fr;gap:24px}.tower-paper{height:205px;max-width:290px;margin-bottom:17px}.tower-paper span:nth-child(1){height:135px;left:20%}.tower-paper span:nth-child(2){height:180px;left:34%}.tower-paper span:nth-child(3){height:120px;left:46%}.tower-clock{padding-top:0}.tower-clock strong{font-size:100px}.tower-checklist{gap:17px}.tower-controls{padding-top:0}.tower-stability{margin-top:15px}.tower-stability span{width:60px;height:60px}.tower-measure-team{padding-top:17px}.tower-statuses button{font-size:.92rem}.tower-best{gap:20px}.tower-best strong{font-size:1.8rem}.tower-record-teams{grid-template-columns:1fr;gap:23px}.tower-record-teams section{padding-left:15px}.tower-record-height{font-size:1.8rem}.tower-room .button{font-size:.9rem}.tower-note-label textarea{min-height:75px}}
@media(prefers-reduced-motion:no-preference){.tower-stability span{transition:background .15s,border-color .15s}.tower-stability [data-tower-beat-state=active]{animation:tower-glow .6s ease-in-out alternate infinite}@keyframes tower-glow{from{box-shadow:0 0 0 0 #ad92551a}to{box-shadow:0 0 0 5px #ad92551a}}}
.game-shell .play .tower-room form{max-width:none;width:100%;min-width:0;margin-inline:0}.game-shell .play .tower-room :is(.tower-height-label,.tower-note-label){color:#45554a;font-weight:400}.game-shell .play .tower-room .tower-height-label small{font-weight:400}
.tower-note-label input{height:44px;box-sizing:border-box;width:100%;padding:8px 12px;border:1px solid #919c8055;border-radius:3px;font:inherit;font-size:.94rem;line-height:1.5;color:#42584a;background:#fcfcf6}.tower-note-label input[aria-invalid=true]{border-color:#9d604d}@media(min-width:1100px) and (max-height:780px){.tower-note-label{grid-template-columns:minmax(0,1fr) auto;column-gap:8px;align-items:baseline}.tower-note-label input{grid-column:1/-1}.game-shell .play .tower-room[data-tower-phase=measure]>p{margin:8px 0 12px;line-height:1.5;font-size:.92rem}.game-shell .play .tower-room[data-tower-phase=measure] .actions{margin-top:10px}}

.game-shell.theme-tower {
  --tower-stage:#f8eddd;
  --tower-ink:#152b43;
  --tower-blue:#1b5bb1;
  --tower-orange:#ff903f;
}
.page-game .game-shell.theme-tower:has(.tower-room) {
  background:radial-gradient(ellipse at 24% 30%,#fffaf1 5%,transparent 70%),var(--tower-stage);
  color:var(--tower-ink);
}
.page-game .game-shell.theme-tower:has(.tower-room) .game-toolbar {
  color:var(--tower-ink); background:#fbf3e6eb; border-color:#b2b6b3; backdrop-filter:blur(12px);
}
.game-shell.theme-tower:has(.tower-room) .game-toolbar .button {
  color:var(--tower-ink); background:#fff8ec; border-color:#6d7b86;
}
.page-game .game-shell.theme-tower .play .tower-room {
  --tw-ink:var(--tower-ink); --tw-muted:#45596b;
  width:min(100%,79rem);
}
.page-game .game-shell .play .tower-room .session-banner h2 {
  color:var(--tw-ink); font-size:clamp(1.65rem,4vw,3.5rem); line-height:1.1; text-wrap:balance;
}
.game-shell .play .tower-room .session-banner .meta { color:var(--tw-muted) }
.tower-desk { gap:clamp(1.2rem,4vw,3.8rem); align-items:center }
.tower-desk>section { min-width:0 }
.tower-paper {
  width:100%; height:clamp(13rem,32vw,23rem); margin:0 0 1rem; isolation:isolate;
  background:
    linear-gradient(90deg,#4f80a41c 1px,transparent 1px) center / 26px 26px,
    linear-gradient(#4f80a41c 1px,transparent 1px) center / 26px 26px,
    linear-gradient(150deg,#e5f1fa,#f7f8f0);
  border:1px solid #99afbf; border-radius:.85rem;
  box-shadow:inset 0 0 24px #99aec61f;
}
.tower-paper::before {
  content:""; position:absolute; inset:9% 8% 25% auto; width:7%;
  border-inline-end:1px solid #47658b;
  background:repeating-linear-gradient(to bottom,#47658ba3 0 1px,transparent 1px 14px) right top / 58% 100% no-repeat;
}
.tower-paper::after {
  content:""; position:absolute; left:14%; right:13%; bottom:15%; height:10%; z-index:1;
  border-radius:50%; background:#4a351e45; filter:blur(9px);
}
.tower-paper span { bottom:17%; width:29%; z-index:2; filter:none }
.tower-paper span:nth-child(1) {
  left:19%; height:58%; transform:rotate(-9deg);
  background:conic-gradient(from 0deg at 48% 0,#fff8e7 0deg 136deg,#ccb38b 139deg 175deg,#f9eccf 176deg 199deg,#fff9eb 200deg);
}
.tower-paper span:nth-child(2) {
  left:35%; height:72%; transform:rotate(3deg); z-index:3;
  background:conic-gradient(from 0deg at 52% 0,#d0b78d 0deg 166deg,#f2dfb9 168deg 179deg,#fff6dc 180deg 193deg,#efddbb 195deg);
}
.tower-paper span:nth-child(3) {
  left:51%; height:53%; transform:rotate(13deg);
  background:conic-gradient(from 0deg at 51% 0,#bda47e 0deg 160deg,#e0c299 161deg 179deg,#fff2d7 180deg 194deg,#ecdabc 195deg);
}
.tower-paper i {
  inset:auto 8% 10%; height:19%; border:4px solid #394c62; border-radius:.7rem;
  background:repeating-linear-gradient(2deg,#9f6e3b25 0 1px,transparent 2px 6px,#ffecba50 7px 8px,transparent 11px 16px),
    linear-gradient(150deg,#f7d7a7,#cf965c 58%,#edc291);
  transform:perspective(320px) rotateX(25deg);
  box-shadow:0 .25rem 0 #213548,0 .55rem .9rem -.3rem #46322e68;
}
.tower-clock {
  justify-content:center; gap:.5rem .7rem; padding:clamp(.8rem,2vw,1.3rem);
  border:2px solid var(--tw-ink); border-radius:.65rem; background:#fff9ed;
}
.tower-clock strong {
  font-family:inherit; font-weight:850; font-size:clamp(3.25rem,8.2vw,7rem); line-height:1;
  color:var(--tw-ink); letter-spacing:-.045em; font-variant-numeric:tabular-nums;
}
.tower-clock>span { color:var(--tw-ink); font-weight:750 }
.tower-clock progress { height:.65rem; margin-top:.55rem; background:#d9e1e5 }
.tower-clock progress::-webkit-progress-bar { background:#d9e1e5 }
.tower-clock progress::-webkit-progress-value { background:var(--tower-blue) }
.tower-clock progress::-moz-progress-bar { background:var(--tower-blue); border-radius:4px }
.tower-room[data-tower-phase=paused] .tower-clock strong { color:#85502c }
.game-shell .play .tower-room .tower-both {
  display:flex; align-items:center; padding:.5rem 0; margin:.65rem 0; color:var(--tw-ink); font-weight:700;
}
.tower-checklist input,.tower-both input { accent-color:var(--tower-blue) }
.game-shell .play .tower-room .actions { flex-wrap:wrap; gap:.5rem; margin:.6rem 0 }
.page-game .game-shell.theme-tower .play .tower-room .button.cta {
  background:var(--tower-orange); border-color:#c65322; color:#252b2c; font-weight:800;
}
.page-game .game-shell.theme-tower .play .tower-room .button.cta:enabled:hover { background:#ffa66b }
.page-game .game-shell.theme-tower .play .tower-room .button.cta:disabled {
  background:#eee4d4; border-color:#a89481; color:#4b514e; opacity:1;
}
.game-shell .play .tower-room .button.secondary {
  background:#fff8ec; border-color:#798993; color:var(--tw-ink);
}
.tower-stability { gap:.65rem; margin:1rem 0 }
.tower-stability span { color:var(--tw-ink); background:#fff9ed; border-color:#859bad; border-radius:.55rem; font-family:inherit }
.tower-stability [data-tower-beat-state=active] { background:#ffcf98; color:#422e1a; border-color:#ac4b25 }
.tower-stability [data-tower-beat-state=done] { background:#225b9f; color:white; border-color:#194577; box-shadow:none }
.tower-measure-team,.tower-record-teams section { border-color:var(--tower-blue) }
.tower-measure-team:nth-child(2),.tower-record-teams section:nth-child(2) { border-color:#b75a35 }
.tower-statuses [aria-pressed=true] { background:#e2effa; color:var(--tw-ink); border-color:#6b8fae; border-left-color:var(--tower-blue) }
.tower-room :is(.tower-best strong,.tower-record-height) { font-family:inherit; color:var(--tw-ink) }
@media(max-width:650px) {
  .tower-desk { gap:1rem }
  .tower-paper { height:clamp(10.25rem,49vw,16rem); width:100%; max-width:none }
  .tower-clock strong { font-size:clamp(3.25rem,14vw,4.5rem) }
}
