.triangle-room{--tri-ink:#4c554b;--tri-muted:#686c5f;--tri-cell:clamp(44px,min(6.5vw,8vh),76px);width:min(100%,1160px);margin-inline:auto;text-align:left;color:var(--tri-ink);font-variant-numeric:tabular-nums}
.game-shell .play .triangle-room .session-banner{max-width:none;margin:0 0 24px;text-align:left}
.game-shell .play .triangle-room .session-banner>:is(h2,.meta){max-width:none;margin-inline:0;text-align:left}
.game-shell .play .triangle-room p{max-width:none;margin-inline:0;text-align:left;line-height:1.7;color:var(--tri-muted)}
.triangle-room .button{min-height:46px;font-size:.92rem;line-height:1.5;white-space:normal}
.game-shell .play .triangle-room .actions{justify-content:flex-start;margin:16px 0 0;gap:10px}
.triangle-room button:focus-visible{outline:3px solid #92774c;outline-offset:3px}
.triangle-desk{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:clamp(25px,4vw,65px);align-items:start}
.triangle-wood{position:relative;display:grid;gap:clamp(6px,1vw,15px);justify-items:center;max-width:650px;width:100%;padding:28px 12px 20px;isolation:isolate}
.triangle-wood:before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(13deg,#7d502a08 0 1px,transparent 2px 7px),linear-gradient(135deg,#e7d4a5,#c4aa76);clip-path:polygon(44% 0,56% 0,100% 100%,0 100%);filter:drop-shadow(0 7px 0 #a58c5d);z-index:-1}
.triangle-row{display:flex;gap:clamp(5px,1.3vw,14px);justify-content:center;min-width:0}
.triangle-hole{display:flex;flex-direction:column;align-items:center;gap:4px;width:var(--tri-cell);height:calc(var(--tri-cell) + 20px);padding:0;border:0;background:transparent;font:inherit;cursor:pointer;position:relative;touch-action:manipulation}
.triangle-well{position:relative;width:100%;aspect-ratio:1;border-radius:50%;background:radial-gradient(ellipse at 50% 67%,#ad9160,#91784d);box-shadow:inset 0 4px 6px #67543a55,0 1px 0 #fff6d5aa;display:grid;place-items:center}
.triangle-jade{display:block;width:84%;height:84%;border-radius:48% 48% 45% 47%;background:radial-gradient(ellipse at 30% 20%,#e5f8e2aa,transparent 64%),linear-gradient(140deg,#a7c9ad,#638e7a);border:1px solid #6c927c;box-shadow:inset 2px 3px 1px #e7f7d5bb,inset -3px -4px 1px #4a7b6655,0 5px 2px #5a604b44}
.triangle-number{font-size:.9rem;line-height:1.2;color:#6b604c;font-weight:600}
.triangle-hole[aria-pressed=true] .triangle-well{outline:3px double #587967;outline-offset:4px}
.triangle-hole[data-triangle-legal=true] .triangle-well{outline:2px dashed #8d6850;outline-offset:3px;background:#ead9ac}
.triangle-plus{font-size:1.6rem;font-style:normal;color:#947354;line-height:1}
.triangle-marker{position:absolute;right:-2px;top:-2px;min-width:22px;height:22px;display:grid;place-items:center;padding:0 3px;background:#fcf5e0;border:1px solid #b19b75;color:#806849;font-size:.8rem;font-style:normal;line-height:1}
.triangle-hole[data-triangle-last=from] .triangle-marker{border-radius:2px;border-style:dashed}
.triangle-hole[data-triangle-last=over] .triangle-marker{border-radius:0;transform:rotate(-8deg);background:#e9d4b8}
.triangle-hole[data-triangle-last=over] .triangle-well:after{content:'×';position:absolute;color:#d8c39b;font-size:1.8rem;line-height:1}
.triangle-hole[data-triangle-last=to] .triangle-marker{border-radius:50%;background:#dae7d4;border-color:#93ad8d;color:#5f7b60}
.triangle-hole:disabled{cursor:default;opacity:1}
.triangle-last-triple{display:flex;justify-content:center;gap:15px;flex-wrap:wrap;padding:18px 0;border-bottom:1px solid #dbd9c8;margin-top:4px;font-size:.9rem;color:#9b8b71}
.triangle-last-triple strong{font-size:1.1rem;color:#82745c;margin-left:5px}
.game-shell .play .triangle-room .triangle-board-help{font-size:.88rem;margin:17px 0;color:#6f6756}
.game-shell .play .triangle-room .triangle-count-label{font-size:1rem;margin:4px 0}
.triangle-count{display:block;font-size:4.5rem;font-weight:650;line-height:1.2;color:#72947e;margin:8px 0}
.game-shell .play .triangle-room .triangle-step-count{font-size:.9rem;margin:10px 0 23px}
.game-shell .play .triangle-room [data-triangle-selection]{font-size:1rem;color:#616e58;min-height:3.2em;margin:0}
.game-shell .play .triangle-room .triangle-small{font-size:.9rem}
.game-shell .play .triangle-room .triangle-hint{border-left:3px solid #a8b394;padding-left:14px;font-size:.94rem;color:#78846e}
.triangle-view-controls{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 16px}
.triangle-view-controls [aria-pressed=true]{background:#e8eddb!important;color:#6e7d62!important;border-color:#adb89b!important}
.triangle-history{margin-top:28px;padding-top:18px;border-top:1px solid #d1d7c7}
.triangle-history h3{font-size:1rem;font-weight:600;margin:0 0 14px}
.triangle-history ol{padding:0;list-style:none;display:grid;gap:5px;max-height:33dvh;overflow-y:auto;margin:0}
.triangle-history button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:15px;min-height:44px;padding:9px 11px;background:transparent;border:0;border-bottom:1px solid #e0e3d7;text-align:left;font:inherit;font-size:.9rem;color:#92977f;cursor:pointer}
.triangle-history button>strong{font-weight:600;color:#77836f;white-space:nowrap}
.triangle-history [aria-pressed=true]{background:#e6ecd9}
.triangle-undone{margin:25px 0;color:#a19379;font-size:.9rem;line-height:1.7}
.triangle-undone summary{min-height:44px;padding:7px 0;cursor:pointer}
.triangle-undone ol{padding-left:20px}
.triangle-undone li{margin:9px 0}
.game-shell .play .triangle-room .triangle-rule{border-top:1px solid #d6d8c7;margin-top:30px;padding-top:19px;font-size:.94rem}
@media(max-width:850px){.triangle-desk{grid-template-columns:minmax(0,1fr);gap:25px}.triangle-wood{max-width:570px}.triangle-desk>aside{max-width:570px}.triangle-history ol{max-height:none;overflow:visible}.triangle-count{font-size:3.7rem}.triangle-room .button{font-size:.9rem}}
@media(max-width:400px){.triangle-room{--tri-cell:44px}.triangle-wood{padding:24px 10px 18px;gap:9px}.triangle-number{font-size:.88rem}.triangle-marker{min-width:18px;height:18px;font-size:.78rem;right:-1px;top:-1px}.triangle-last-triple{gap:12px}.triangle-count{font-size:3.3rem}.triangle-room .button{font-size:.9rem}}

.page-game .game-shell.theme-triangle:has(.triangle-room) {
  --tri-stage:#f8efde;--tri-main:#253c31;--tri-accent:#1d604c;--tri-line:#baa58b;
  background:var(--tri-stage);color:var(--tri-main);
}
.page-game .game-shell.theme-triangle:has(.triangle-room) .game-toolbar {
  background:var(--tri-stage);color:var(--tri-main);border-color:var(--tri-line);
}
.page-game .game-shell.theme-triangle:has(.triangle-room) .game-toolbar .button,
.page-game .game-shell.theme-triangle .play .triangle-room .button.secondary {
  color:var(--tri-main);background:#fff9ed;border-color:#927e65;
}
.page-game .game-shell.theme-triangle .play .triangle-room .button:not(.secondary) {
  color:white;background:var(--tri-accent);border-color:var(--tri-accent);
}
.page-game .game-shell.theme-triangle .play .triangle-room .button:disabled {
  color:#545951;background:#e9e1d4;border-color:#ae9f8a;opacity:1;
}
.game-shell.theme-triangle .play .triangle-room {--tri-ink:var(--tri-main);--tri-muted:#46574c}
.game-shell.theme-triangle .play .triangle-room .session-banner h2 {
  color:var(--tri-main);font-size:clamp(1.65rem,4.25vw,3.4rem);line-height:1.08;letter-spacing:-.035em;
}
.game-shell.theme-triangle .play .triangle-room .session-banner .meta {color:#624f40}
.triangle-wood {filter:drop-shadow(0 .28rem 0 #5d3927) drop-shadow(0 .45rem .46rem #58382136)}
.triangle-wood::before {
  background:
    repeating-linear-gradient(13deg,#f1c29524 0 1px,transparent 2px 8px),
    linear-gradient(135deg,#9c6545,#724632);
  filter:none;
}
.triangle-well {background:radial-gradient(ellipse at 45% 68%,#6c4936,#3b2d24);box-shadow:inset 0 4px 7px #231a15aa,0 1px 0 #f2c7919e}
.triangle-jade {
  background:radial-gradient(ellipse at 30% 22%,#b9f4c5,#69b09a 33%,#317560 69%,#22493d);
  border-color:#3b826b;
  box-shadow:inset 1px 2px 1px #cbfcdc66,0 .2rem .28rem #241f1a9c;
}
.triangle-number {color:#fff2d1;font-weight:750;text-shadow:0 1px 1px #332015}
.triangle-hole[aria-pressed=true] .triangle-well {outline-color:#ffd777}
.triangle-hole[data-triangle-legal=true] .triangle-well {outline-color:#ffdd84;background:#503322}
.triangle-plus {color:#fff0ba}
.triangle-hole:focus-visible {outline-color:#ffe18f}
.triangle-hole:not(:disabled):hover .triangle-well {box-shadow:inset 0 0 0 2px #fff0ae,0 1px 0 #f2c7919e}
.triangle-count {font-size:clamp(2.85rem,7.5vw,6rem);line-height:1;color:var(--tri-accent);font-weight:800}
.game-shell .play .triangle-room [data-triangle-selection] {
  min-height:0;background:#fff1cf;color:#57391f;border-inline-start:3px solid #a76c37;
  padding:.45rem .65rem;
}
.game-shell .play .triangle-room .triangle-hint {color:#345243;border-color:#4d7b65}
.triangle-history button,.triangle-history button>strong,.triangle-undone {color:#425549}
.triangle-last-triple,.triangle-last-triple strong {color:#674b36}
.game-shell .play .triangle-room .actions {flex-wrap:wrap}
@media(max-width:850px) {
  .page-game .game-shell.theme-triangle.wide .play:has(.triangle-room) {
    justify-content:flex-start;min-height:0;margin-block:0;padding-block:1.15rem 2rem;
  }
  .triangle-desk {gap:1.15rem}
}


