.route-room{--map-paper:#f3f5e9;--map-ink:#193e47;--map-line:#9daea3;--map-route:#28634c;--map-wrong:#a43230;color:var(--map-ink);max-width:1100px;margin:0 auto;text-align:left}
.route-room .session-banner{margin-bottom:16px}.route-room h2{margin:0 0 12px;text-align:left}.route-room p{max-width:60ch;text-align:left;margin:0 0 16px;line-height:1.55}.route-room .actions{justify-content:flex-start;margin:16px 0;gap:10px}.route-room button{touch-action:manipulation}
.route-desk{display:grid;grid-template-columns:minmax(270px,470px) minmax(220px,1fr);gap:32px;align-items:center}.route-desk aside{border-left:2px dashed var(--map-line);padding-left:26px}.route-room .route-note{font-size:.9rem;color:#4a625e}
.route-map{display:grid;grid-template-columns:14px repeat(5,minmax(0,1fr));gap:4px;padding:10px;background:var(--map-paper);border:1px solid var(--map-line);box-shadow:4px 5px 0 #d6ddcf;position:relative;isolation:isolate}.route-map:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;background:linear-gradient(90deg,transparent 33%,#9eaf9b22 33%,#ffffff80 34%,transparent 35%,transparent 66%,#9eaf9b22 66%,#ffffff80 67%,transparent 68%)}
.route-axis{display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700;min-width:0;height:20px}.route-map>.route-axis:nth-child(6n+1){height:auto}.route-cell{position:relative;min-width:0;min-height:44px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #b6c5b5;border-radius:0;background:#ffffff8c;color:var(--map-ink);padding:3px;line-height:1.05;box-shadow:none;font-size:1rem}.route-cell-address{position:absolute;top:4px;left:4px;font-size:.62rem;font-weight:500}.route-cell strong{font-size:clamp(1.1rem,2.8vw,1.9rem);font-weight:700}.route-cell:disabled{opacity:1;color:var(--map-ink);cursor:default}.route-cell[data-state=safe]{background:#d6e8bd;border:2px solid var(--map-route);color:#204b31}.route-cell[data-state=visited]{background:#d7e5e5;border-style:dashed}.route-cell[data-state=current]{background:var(--map-ink);color:white;border:3px double white;outline:1px solid var(--map-ink)}.route-cell[data-state=current]:disabled{color:white}.route-cell[data-state=wrong]{background:#fae1d7;color:var(--map-wrong);border:3px solid var(--map-wrong)}button.route-cell:not(:disabled):hover{background:#cfe0e7;border-color:#23566d}.route-cell:focus-visible{outline:3px solid #c07c13;outline-offset:1px;z-index:1}
button.route-cell:not(:disabled){border:2px solid #356173;background:#fff;cursor:pointer}button.route-cell:not(:disabled)[data-state=visited]{border-style:dashed;background:#d7e5e5}
.route-stats{display:flex;gap:28px;flex-wrap:wrap;margin:0 0 18px;padding:0}.route-stats div{display:grid;gap:3px}.route-stats dt{font-size:.78rem;color:#52675f}.route-stats dd{font-size:1.6rem;font-weight:750;line-height:1.1;margin:0;font-variant-numeric:tabular-nums}.route-fold{max-width:470px;min-height:150px;background:repeating-linear-gradient(90deg,#dfe8cd 0,#dfe8cd 32%,#b9c7a6 33%,#f2f6e8 34%);border:1px solid #9caa90;display:flex;justify-content:space-around;align-items:center;box-shadow:4px 5px 0 #d0d9c2;margin:20px 0 24px;color:#344f49}.route-fold strong{font-size:3rem}.route-fold span{font-size:1.5rem;font-weight:700}.route-time{font-variant-numeric:tabular-nums}.route-time strong{font-size:1.4rem}
.route-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,370px));gap:24px;margin-top:16px;justify-content:start}.route-comparison h3{font-size:1.05rem;margin:0 0 10px}.route-room .route-number-note{font-size:.8rem;margin:12px 0 0;line-height:1.4}.route-trail{list-style:none;padding:0;margin:12px 0;display:flex;gap:6px;flex-wrap:wrap}.route-trail li{display:flex;gap:5px;align-items:center;font-size:.85rem;border-bottom:1px solid var(--map-line);padding:5px 6px}.route-trail li span{display:inline-flex;justify-content:center;align-items:center;width:21px;height:21px;border:1px solid #8ba299;border-radius:50%;font-size:.7rem;color:#4a625e}.route-room [data-route-reason]:empty{display:none}
.game-shell.wide .play .route-room{width:min(1160px,100%);max-width:1160px;text-align:left}.game-shell.wide .play .route-room h2,.game-shell.wide .play .route-room p{text-align:left;max-width:none;margin-left:0;margin-right:0}.game-shell.wide .play .route-room h2{font-size:clamp(1.45rem,2.3vw,2.25rem);margin:0 0 12px}.game-shell.wide .play .route-desk{grid-template-columns:minmax(280px,430px) minmax(240px,1fr);gap:36px}.game-shell.wide .play .route-room .session-banner{margin:0 0 12px}.game-shell.wide .play .route-room .actions{justify-content:flex-start}
@media(min-width:900px) and (max-height:800px){.game-shell.wide .play .route-desk{grid-template-columns:minmax(260px,350px) minmax(240px,1fr)}.game-shell.wide .play .route-map{padding:6px;gap:3px}.game-shell.wide .play .route-stats{margin-bottom:12px}.game-shell.wide .play .route-room h2{font-size:1.6rem}.game-shell.wide .play .route-cell strong{font-size:1.5rem}}
@media(min-width:900px){.route-room[data-route-phase=result] .session-banner{margin-bottom:6px}.route-room[data-route-phase=result] .route-stats{margin-bottom:10px}.route-room[data-route-phase=result] p{margin-bottom:8px}.route-room[data-route-phase=result]>.actions{margin:8px 0 12px}}
@media(max-width:700px){.route-desk,.game-shell.wide .play .route-desk{display:flex;flex-direction:column;align-items:stretch;gap:20px}.route-desk aside{padding:0;border:0}.route-room .session-banner{margin-bottom:12px}.route-room h2{font-size:1.4rem}.route-stats{gap:16px;margin-bottom:16px}.route-stats dt{font-size:.7rem}.route-stats dd{font-size:1.3rem}.route-map{grid-template-columns:12px repeat(5,minmax(0,1fr));gap:2px;padding:3px}.route-cell{min-height:44px;padding:0}.route-cell-address{top:3px;left:3px;font-size:.55rem}.route-cell strong{font-size:1.25rem}.route-axis{height:18px}.route-comparison{grid-template-columns:1fr;gap:22px}.route-fold{min-height:130px}.route-room .actions>*{min-height:44px}.route-room .actions{align-items:stretch}.route-trail{gap:4px}.route-trail li{padding:4px}.game-shell.wide .play .route-room h2{font-size:1.4rem}}
@media(prefers-reduced-motion:reduce){.route-room *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.page-game .game-shell.theme-route:has(.route-room) {
  --route-surface:#fcf5e6;
  --route-ink:#16323e;
  --route-accent:#125b63;
  background:var(--route-surface);
  color:var(--route-ink);
}
.page-game .game-shell.theme-route:has(.route-room) .game-toolbar {
  background:var(--route-surface);color:var(--route-ink);border-color:#baab8e;
}
.page-game .game-shell.theme-route:has(.route-room) .game-toolbar .button,
.page-game .game-shell.theme-route .play .route-room .button.secondary {
  background:#fffaf0;color:var(--route-ink);border-color:#95856b;
}
.page-game .game-shell.theme-route .play .route-room .button:not(.secondary) {
  background:var(--route-accent);color:white;border-color:var(--route-accent);
}
.page-game .game-shell.theme-route .play .route-room .button:not(.secondary):hover {background:#094c54}
.game-shell.theme-route .play .route-room {
  --map-paper:#dfccab;--map-ink:var(--route-ink);--map-line:#a29375;--map-route:var(--route-accent);
  width:min(100%,76rem);max-width:none;
}
.game-shell.theme-route .play .route-room h2 {
  color:var(--route-ink);font-size:clamp(1.75rem,4.5vw,3.6rem);line-height:1.08;letter-spacing:-.035em;
}
.game-shell.theme-route .play .route-desk {
  grid-template-columns:minmax(0,30rem) minmax(0,1fr);
  gap:clamp(1.25rem,5vw,4rem);
}
.route-desk>div,.route-desk>aside {min-width:0}
.route-desk aside {border-color:#b7a387;padding-inline-start:clamp(1rem,3vw,2.6rem)}
.route-map {
  border-radius:.65rem;
  padding:clamp(.42rem,1.55vw,1.05rem);
  gap:clamp(.18rem,.6vw,.46rem);
  background:linear-gradient(135deg,#ecddbd,var(--map-paper));
  box-shadow:0 .32rem 0 #af9a75,0 .55rem 1.25rem #675a2f33;
}
.route-map::before {background:none}
.route-axis {font-size:.8rem}
.route-cell {
  border-color:#a7997b;border-radius:.3rem;background:#fbf5e5;
  box-shadow:0 1px 0 #a7997b80;font-weight:650;
}
.route-cell-address {font-weight:650}
.route-cell[data-state=safe] {background:#156b70;border-color:#094853;color:white}
.route-cell[data-state=safe][data-route-cell="0"] {background:#95501d;border-color:#703914;color:white}
.route-cell[data-state=safe][data-route-cell="24"] {background:#f4c568;border-color:#856139;color:#392818}
.route-cell[data-state=visited],button.route-cell:not(:disabled)[data-state=visited] {background:#dbebe8;border-color:#527d83}
.route-cell[data-state=current]:disabled {background:#183642}
.route-cell[data-state=wrong] {background:#fee3d5}
button.route-cell:not(:disabled) {background:#fffdf3;border-color:#24606d}
.game-shell.theme-route .play .route-room .route-time {
  display:flex;align-items:baseline;gap:.45rem;
  width:fit-content;padding:.25rem .7rem;border-radius:.4rem;background:#f1dfb9;color:#46331c;
}
.route-time strong {font-size:clamp(1.55rem,3.7vw,2.65rem);line-height:1.1}
.route-fold {border-radius:.6rem;background:repeating-linear-gradient(90deg,#e8d8b8 0,#e8d8b8 32%,#b3996e 33%,#f6ecd2 34%);border-color:#9e8863;box-shadow:0 .28rem 0 #af9a75}
.game-shell.theme-route .play .route-room .actions {flex-wrap:wrap;justify-content:flex-start}
@media(min-width:900px) and (max-height:800px) {
  .game-shell.theme-route.wide .play .route-desk {grid-template-columns:minmax(0,min(28rem,calc(100dvh - 15rem))) minmax(0,1fr)}
}
@media(max-width:700px) {
  .page-game .game-shell.theme-route.wide .play:has(.route-room) {
    justify-content:flex-start;min-height:0;margin-block:0;padding-block:1.15rem 2rem;
  }
  .route-desk aside {padding-inline:0}
}
