/* TrigammonX Beta v5.9 / v5.9.1 — player-facing header and board-first page layout.
   Presentation only: board geometry, checker coordinates and hit targets are unchanged. */

/* ---------- Header: TrigammonX™ · Backgammon for Three · Beta v5.9 ---------- */
.tx-layout-05 .tx-header{padding-top:14px;padding-bottom:6px}
.tx59-brand{margin:0;line-height:0;font-size:inherit;font-weight:inherit}
.tx59-wordmark{position:relative;display:inline-block;line-height:0}
.tx59-wordmark .tx-header-mark{line-height:1.1}
/* The wordmark artwork has transparent margins (8.8% right, 16% top): anchor ™ to the visible letters. */
.tx59-tm{position:absolute;left:91.6%;top:14%;font:600 clamp(11px,1.3vw,16px)/1 Georgia,"Times New Roman",serif;color:#e9c77d;text-shadow:0 1px 2px #000}
.tx59-tagline{margin:6px 0 4px;font-family:"Palatino Linotype",Palatino,"Book Antiqua","URW Palladio L",Georgia,serif;font-style:italic;font-weight:400;
  font-size:clamp(17px,2.4vw,24px);letter-spacing:.07em;color:#f0d594;text-shadow:0 1px 0 rgba(0,0,0,.6),0 0 14px rgba(232,196,123,.18)}
.tx59-meta{margin-top:2px}
.tx-layout-05 #tx-beta-badge,#tx-beta-badge{font-size:11px!important;letter-spacing:.16em;padding:3px 10px;color:#d9c08a;border-color:rgba(201,164,104,.55);background:rgba(216,180,106,.08)}
#beta-banner[hidden]{display:none!important}
/* Give Beta Feedback sits beside the ☰ menu button (positioned by preview-ui.css at left:8px). */
.tx59-feedback{position:absolute;top:12px;left:62px;height:44px;margin:0;padding:0 14px;display:inline-flex;align-items:center;gap:7px;
  border:1px solid #866037;border-radius:10px;background:#241a12;color:#e5c285;font-family:inherit;font-weight:600;font-size:13px;line-height:1;letter-spacing:.03em;cursor:pointer;z-index:2}
.tx59-feedback:hover{border-color:#d6ad62;color:#ffe2a4}
.tx59-feedback:focus-visible{outline:3px solid #f6cd65;outline-offset:2px}
.tx59-feedback-icon{font-size:17px}
@media (max-width:980px){.tx59-feedback{padding:0;width:44px;justify-content:center}.tx59-feedback-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

/* ---------- Play area: always visible, directly beneath the header ---------- */
#tx59-play-area{width:100%;max-width:1240px;margin:6px auto 0;padding:0 8px;box-sizing:border-box}
#tx59-play-area>.board-column{width:100%;max-width:none;padding-top:4px;order:initial}
#tx59-play-area .board-panel{max-width:none;width:100%}   /* engine caps it at 980px for a board with nothing beside it */
#tx59-board-row{display:flex;align-items:flex-start;justify-content:center;gap:14px;width:100%}
#tx59-board-cell{flex:0 0 auto;min-width:0;display:flex;justify-content:center}
.tx-layout-05 .board-panel::before{display:none}            /* the stage carries its own frame; the old full-width backdrop assumed no side panel */

/* ---------- Players / Seats, to the right of the board ---------- */
#tx59-seats{flex:0 0 clamp(200px,22vw,280px);align-self:flex-start;box-sizing:border-box;border:1px solid #6b5333;border-radius:12px;
  background:linear-gradient(180deg,#191d29,#121621);color:#ecdcb8;overflow:hidden;transition:flex-basis .2s ease}
#tx59-seats.tx59-seats-closed{flex-basis:46px}
#tx59-seats-toggle{display:flex;align-items:center;gap:8px;width:100%;min-height:46px;padding:10px 12px;border:0;border-bottom:1px solid #4d3d27;
  background:#2a1f15;color:#e8c47b;font:inherit;font-weight:700;font-size:14px;letter-spacing:.04em;text-align:left;cursor:pointer}
#tx59-seats-toggle:focus-visible,#tx59-board-size-toggle:focus-visible,#tx59-back-to-top:focus-visible,.tx59-back-to-top-inline:focus-visible{outline:3px solid #f6cd65;outline-offset:2px}
#tx59-seats.tx59-seats-closed #tx59-seats-toggle{flex-direction:column;justify-content:flex-start;min-height:220px;border-bottom:0;padding:12px 0}
#tx59-seats.tx59-seats-closed .tx59-seats-label{writing-mode:vertical-rl;text-orientation:mixed}
#tx59-seats-body{padding:10px}
#tx59-seats-body .px-seats-panel{margin:0;padding:0;border:0;background:none}
#tx59-seats-body .px-seat-row{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"dot colour" "kind kind" "pick pick";gap:6px 8px;align-items:center;
  padding:10px 0;border-bottom:1px solid rgba(232,196,123,.14)}
#tx59-seats-body .px-seat-row:last-of-type{border-bottom:0}
#tx59-seats-body .px-dot{grid-area:dot}
#tx59-seats-body .px-seat-color{grid-area:colour;font-weight:700;letter-spacing:.06em;text-transform:uppercase;font-size:13px}
#tx59-seats-body .px-seat-kind{grid-area:kind}
#tx59-seats-body .px-seat-profile,#tx59-seats-body .px-seat-ai{grid-area:pick}
#tx59-seats-body select{width:100%;min-height:40px;font-size:15px;box-sizing:border-box}
#tx59-seats-body .px-seat-queued{grid-column:1/-1;font-size:12px;color:#d9b36a}
#tx59-seats-body .px-seats-actions{display:flex;flex-direction:column;gap:6px;margin-top:10px}
#tx59-seats-body .px-seats-actions input{flex:none;height:40px;min-height:40px;max-height:40px;font-size:15px;box-sizing:border-box;width:100%;padding:6px 10px}
#tx59-seats-body .px-seats-actions button{min-height:40px}
#tx59-seats-body .px-seats-note{margin-top:8px;font-size:12px;color:#cdbf9f}

/* ---------- Side column (v5.9.1): Players / Seats, then the Pip Race callout ---------- */
#tx591-side{flex:0 0 auto;align-self:flex-start;display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0}
#tx591-side>#tx59-seats{flex:none;width:clamp(200px,22vw,280px);transition:width .2s ease}
#tx591-side>#tx59-seats.tx59-seats-closed{width:46px}
#tx591-pips{box-sizing:border-box;width:clamp(200px,22vw,280px);border:1px solid #6b5333;border-radius:12px;background:linear-gradient(180deg,#191d29,#121621);color:#ecdcb8;overflow:hidden;transition:width .2s ease}
#tx591-pips.tx591-pips-closed{width:46px}
#tx591-pips-toggle{display:flex;align-items:center;gap:8px;width:100%;min-height:46px;padding:10px 12px;border:0;border-bottom:1px solid #4d3d27;
  background:#2a1f15;color:#e8c47b;font:inherit;font-weight:700;font-size:14px;letter-spacing:.04em;text-align:left;cursor:pointer}
#tx591-pips-toggle:focus-visible,.tx591-pip-more:focus-visible{outline:3px solid #f6cd65;outline-offset:2px}
#tx591-pips.tx591-pips-closed #tx591-pips-toggle{flex-direction:column;justify-content:flex-start;min-height:132px;border-bottom:0;padding:12px 0}
#tx591-pips.tx591-pips-closed .tx591-pips-label{writing-mode:vertical-rl;text-orientation:mixed}
#tx591-pips-body{padding:6px 12px 10px}
.tx591-pip-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name num" "track track";gap:4px 8px;align-items:center;padding:7px 0;border-bottom:1px solid rgba(232,196,123,.12)}
.tx591-pip-name{grid-area:name;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;font-size:13px;letter-spacing:.03em}
.tx591-pip-row[data-c=blue] .tx591-pip-name{color:#74b9ff}.tx591-pip-row[data-c=red] .tx591-pip-name{color:#ff7675}.tx591-pip-row[data-c=green] .tx591-pip-name{color:#55efc4}
.tx591-pip-row[data-current] .tx591-pip-name::before{content:'▸ ';color:#e8c47b}
.tx591-pip-num{grid-area:num;font:700 15px/1 'Courier New',monospace;color:#f4ead2}
.tx591-pip-leader .tx591-pip-num{color:#ffe08a}
.tx591-pip-track{grid-area:track;display:block;height:6px;border-radius:3px;background:#2b2b31;overflow:hidden}
.tx591-pip-fill{display:block;height:100%;border-radius:3px;transition:width .25s ease}
.tx591-pip-row[data-c=blue] .tx591-pip-fill{background:linear-gradient(90deg,#4a90d9,#8fc6ff)}
.tx591-pip-row[data-c=red] .tx591-pip-fill{background:linear-gradient(90deg,#c0392b,#ff9b9a)}
.tx591-pip-row[data-c=green] .tx591-pip-fill{background:linear-gradient(90deg,#00b894,#82f5d9)}
.tx591-pip-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;font-size:12px;color:#b9ab8c}
.tx591-pip-more{min-height:40px;padding:4px 12px;border:1px solid #705434;border-radius:8px;background:#251b16;color:#dec092;font:inherit;font-size:12px;cursor:pointer}
@media (prefers-reduced-motion:reduce){#tx591-side>#tx59-seats,#tx591-pips,.tx591-pip-fill{transition:none}}
/* Tablets: each seat's two choices sit side by side, so Players / Seats and the Pip Race tab fit beside the board */
@media (min-width:700px) and (max-width:1099px){
  #tx59-seats-body .px-seat-row{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"dot colour" "kind pick";padding:8px 0}
  #tx59-seats-body .px-seat-kind{min-width:4.6em}
  #tx59-seats-body select{font-size:13px;padding-left:6px;padding-right:2px}
}

/* ---------- Board Size: collapsible, directly beneath the board ---------- */
#tx59-board-size{width:100%;max-width:840px;margin:10px auto 0;border:1px solid #5f4a30;border-radius:10px;background:rgba(20,26,37,.75)}
#tx59-board-size-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;padding:8px 14px;border:0;border-radius:10px;
  background:transparent;color:#e0bd86;font:inherit;font-weight:600;font-size:13px;letter-spacing:.06em;cursor:pointer}
.tx59-size-pct{color:#cdbf9f;font-weight:400}
#tx59-board-size-body .classic-board-size{margin:0;padding:4px 14px 14px}
/* v5.9.1: header = Board Size toggle (with the current %) + Rotate Board + Auto-rotate; body = presets, slider, Reset */
.tx591-size-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding-right:8px}
.tx591-size-head>#tx59-board-size-toggle{flex:1 1 180px;width:auto}
#tx59-board-size .tx591-size-head>.classic-rotation-pair{flex:0 1 360px;width:auto;max-width:400px;padding:6px 0}
#tx59-board-size .classic-rotation-pair>button{min-height:40px;font-size:13px}
#tx59-board-size-body .classic-board-size{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:10px 14px;border-top:1px solid rgba(232,196,123,.14);padding-top:12px}
#tx59-board-size-body .classic-board-size>span{display:none}          /* the strip's header already says Board Size */
.tx591-size-presets{display:inline-flex;border:1px solid #725635;border-radius:8px;overflow:hidden}
#tx59-board-size-body .tx591-size-presets>button{min-height:40px;margin:0;padding:7px 14px;border:0;border-right:1px solid #725635;border-radius:0;box-shadow:none}
#tx59-board-size-body .tx591-size-presets>button:last-child{border-right:0}
#tx59-board-size-body .classic-board-size>label{flex:1 1 220px;display:flex;align-items:center;gap:10px;min-width:0}
#tx59-board-size-body .classic-board-size>label>input{flex:1 1 auto;width:auto;min-width:100px}
#tx59-board-size-body #classic-board-size-value{min-width:3.2em;text-align:right;font-weight:700;color:#f0d594}
#tx59-board-size-body #classic-board-size-reset{min-height:40px;margin-left:auto}
@media (max-width:699px){
  #tx59-board-size .tx591-size-head>.classic-rotation-pair{flex:1 1 100%;max-width:none;padding:0 0 8px 8px}
  .tx591-size-presets{flex:1 1 100%}.tx591-size-presets>button{flex:1 1 0}
}

/* ---------- Expand All / Collapse All / Back to Top ---------- */
.tx59-all{display:inline-flex;gap:6px}
.tx59-all button{padding:7px 14px!important;font-weight:700;color:#ffe2a4!important;background:#4a3518!important;border-color:#b48a3c!important}
.tx59-back-to-top-inline{display:block;margin:14px 0 2px auto;padding:8px 12px;border:1px solid #705434;border-radius:8px;background:#251b16;color:#dec092;font:inherit;font-size:13px;cursor:pointer}
#tx59-back-to-top{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:900;display:inline-flex;align-items:center;gap:6px;
  min-height:46px;padding:0 16px;border:1px solid #b48a3c;border-radius:23px;background:rgba(36,26,18,.94);color:#ffe2a4;font:inherit;font-weight:700;font-size:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.5);cursor:pointer}
#tx59-back-to-top[hidden]{display:none}

/* ---------- Tablet and phone ---------- */
@media (max-width:699px){
  #tx59-board-row{flex-direction:column;align-items:stretch;gap:10px}
  #tx59-board-cell{flex:none;width:100%}
  #tx59-seats,#tx59-seats.tx59-seats-closed{flex:none;width:100%}
  #tx591-side{width:100%;align-items:stretch}
  #tx591-side>#tx59-seats,#tx591-side>#tx59-seats.tx59-seats-closed,#tx591-side>#tx591-pips,#tx591-side>#tx591-pips.tx591-pips-closed{width:100%}
  #tx591-pips.tx591-pips-closed #tx591-pips-toggle{flex-direction:row;min-height:46px;padding:10px 12px}
  #tx591-pips.tx591-pips-closed .tx591-pips-label{writing-mode:horizontal-tb}
  #tx59-seats.tx59-seats-closed #tx59-seats-toggle{flex-direction:row;min-height:46px;padding:10px 12px}
  #tx59-seats.tx59-seats-closed .tx59-seats-label{writing-mode:horizontal-tb}
  #tx59-seats-body .px-seat-row{grid-template-columns:auto 5.5em 1fr 1fr;grid-template-areas:"dot colour kind pick"}
  #tx59-back-to-top{padding:0;width:46px;justify-content:center}
  #tx59-back-to-top .tx59-btt-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
@media (prefers-reduced-motion:reduce){#tx59-seats{transition:none}}

/* ---------- Bar and Bearing-Off trays (Beta v5.9.1): half as large again as v5.9, checkers the board's size ---------- */
/* Height: 50% taller than Beta v5.9 (desktop 50 → 75 px), never shorter than v5.9, and never so tall that a tray
   reaches the touch target of the nearest point. That gap was measured at every board size and at 0°, 120° and 240°:
   it is 26.85% of the board's height minus 33.7 px, so the tray is held at least 3 px clear of it. */
#board-stage>.board-tray-strip-inframe{height:max(clamp(26px,10.8%,50px),min(clamp(39px,16.2%,75px),calc(26.85% - 44px)))}
#board-stage>.board-tray-strip-inframe .board-tray-strip-title{font-size:11px}
#board-stage>.board-tray-strip-inframe .board-tray{gap:6px}
#board-stage>.board-tray-strip-inframe .board-tray-name{font-size:clamp(11px,calc(var(--tx591-checker,16px) * .55),13px)}
#board-stage>.board-tray-strip-inframe .board-tray-count{font-size:clamp(12px,calc(var(--tx591-checker,16px) * .6),14px)}
/* Checkers: the board's own checker size (set from the engine's checker radius by board-first.js), never smaller
   than v5.9's 16 px and never more than 50% larger. Stacking overlap stays proportional. */
#board-stage>.board-tray-strip-inframe .board-tray-chip{--tx591-chip:clamp(16px,var(--tx591-checker,16px),24px);width:var(--tx591-chip);height:var(--tx591-chip);margin-left:calc(var(--tx591-chip) * -.375)}
#board-stage>.board-tray-strip-inframe .board-tray-chip:first-child{margin-left:0}
#board-stage>.board-tray-strip-inframe .board-tray-more{font-size:12px}
@media (max-width:820px),(max-height:860px){
  #board-stage>.board-tray-strip-inframe{height:max(clamp(22px,9%,38px),min(clamp(33px,13.5%,57px),calc(26.85% - 44px)))}
}
@media (max-width:500px){
  #board-stage>.board-tray-strip-inframe{height:max(clamp(19px,8.4%,31px),min(clamp(28.5px,12.6%,46.5px),calc(26.85% - 44px)))}
  #board-stage>.board-tray-strip-inframe .board-tray-name{font-size:10px}
  #board-stage>.board-tray-strip-inframe .board-tray-count{font-size:11px}
  #board-stage>.board-tray-strip-inframe .board-tray-chip{--tx591-chip:clamp(14px,var(--tx591-checker,14px),21px)}
}

/* ---------- Centre-board dice (presentation only; never takes taps or drags) ---------- */
#tx59-board-dice{position:absolute;left:50%;top:50%;width:0;height:0;z-index:12;pointer-events:none;transition:opacity .35s ease}
#tx59-board-dice:not(.tx59-dice-on){opacity:0}
#tx59-board-dice.tx59-dice-spent{opacity:.42}
.tx59-die-slot{position:absolute;left:0;top:0;width:var(--die-size);height:var(--die-size);margin:calc(var(--die-size) / -2) 0 0 calc(var(--die-size) / -2);
  filter:drop-shadow(0 6px 6px rgba(0,0,0,.55));will-change:transform}
.tx59-die-slot .dice-lab-die{width:var(--die-size);height:var(--die-size)}
@media (prefers-reduced-motion:reduce){#tx59-board-dice{transition:none}}

/* ---------- Trophy Room ---------- */
#classic-badges .tx59-trophy-intro{margin:0 0 10px;color:#e3d4b2}
.tx59-trophy-bar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:12px}
.tx59-trophy-bar label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#cdbf9f}
.tx59-trophy-bar select{min-height:40px;font-size:15px;padding:6px 10px;background:#0f141d;color:#f4ead2;border:1px solid #6d5b40;border-radius:8px}
.tx59-trophy-summary{font-size:13px;color:#e8c47b}
.tx59-trophy-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr));gap:10px}
.tx59-trophy-card{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid #4d4130;border-radius:12px;background:#1b2030}
.tx59-trophy-card[data-state=earned]{border-color:#c9a468;background:linear-gradient(160deg,#2a2416,#1b2030)}
.tx59-trophy-art{flex:0 0 64px;width:64px;height:64px;padding:4px;border:1px solid #6b5333;border-radius:50%;background:#0e121b;cursor:zoom-in}
.tx59-trophy-art img{width:100%;height:100%;object-fit:contain;display:block}
.tx59-trophy-art:focus-visible{outline:3px solid #f6cd65;outline-offset:2px}
.tx59-trophy-card[data-state=open] .tx59-trophy-art img{filter:grayscale(1) brightness(.85);opacity:.75}
.tx59-trophy-card[data-state=locked] .tx59-trophy-art img{filter:grayscale(1) brightness(.6);opacity:.45}
.tx59-trophy-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.tx59-trophy-body strong{font-size:15px;color:#f4ead2}
.tx59-trophy-desc{margin:0;font-size:13px;color:#e0d3b6}
.tx59-trophy-how{margin:0;font-size:12px;color:#b9ab8c;line-height:1.45}
.tx59-trophy-status{align-self:flex-start;margin-top:4px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:700;background:#3a3326;color:#e6d6b0}
.tx59-trophy-card[data-state=earned] .tx59-trophy-status{background:#2f6a35;color:#fff}
.tx59-trophy-card[data-state=locked] .tx59-trophy-status{background:#2b2b31;color:#a9a39a}
.tx59-trophy-progress{display:block;height:6px;margin-top:6px;border-radius:3px;background:#2b2b31;overflow:hidden}
.tx59-trophy-progress>span{display:block;height:100%;background:#c9a468}
.tx59-trophy-note{font-size:12px;color:#b9ab8c;margin:12px 0 4px}
.tx59-account-badges .tx59-account-status{font-size:13px;color:#cdbf9f}
.tx59-account-refresh{margin-top:10px;padding:8px 12px;border:1px solid #705434;border-radius:8px;background:#251b16;color:#dec092;font:inherit;font-size:13px;cursor:pointer}
.tx59-trophy-big{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:18px}
.tx59-trophy-big img{width:min(260px,60vw);height:auto}
.tx59-trophy-big>div{flex:1 1 220px}
.tx59-trophy-dialog{width:min(640px,94vw)}
.tx59-trophy-dialog[data-state=open] .tx59-trophy-big img{filter:grayscale(1) brightness(.85)}
.tx59-trophy-dialog[data-state=locked] .tx59-trophy-big img{filter:grayscale(1) brightness(.6);opacity:.6}

/* ---------- Plus Features: flat grid ---------- */
.tx59-replaced{display:none!important}
.tx59-plus-intro{margin:0 0 12px;color:#e8c47b;font-size:14px}
.tx59-plus-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:980px){.tx59-plus-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.tx59-plus-grid{grid-template-columns:1fr}}
.tx59-plus-card{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px;border:1px solid #4d4130;border-radius:12px;background:#1b2030}
.tx59-plus-danger{border-color:#7a3d33;background:#221a1d}
.tx59-plus-icon{font-size:26px;line-height:1}
.tx59-plus-card h4{margin:2px 0 0;font-size:15px;color:#f0d594}
.tx59-plus-card p{margin:0;font-size:13px;line-height:1.5;color:#ddd0b1}
.tx59-plus-controls{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.tx59-plus-controls select{min-height:40px;font-size:15px;max-width:100%}
.tx59-plus-controls .panel-section-title{margin:0}
.tx59-plus-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:6px}
.tx59-plus-actions button{min-height:40px;padding:8px 12px;border:1px solid #705434;border-radius:8px;background:#251b16;color:#dec092;font:inherit;font-size:13px;cursor:pointer}
.tx59-plus-actions button:focus-visible{outline:3px solid #f6cd65;outline-offset:2px}

/* ---------- Membership levels ---------- */
.tx59-membership{margin:0 0 16px;padding:clamp(14px,2vw,26px);border:1px solid #6b5333;border-radius:14px;background:#121a20}
.tx59-membership h3{margin:0 0 10px;font-size:24px;color:#e8c47b}
.tx59-membership-intro{margin:0 0 22px;line-height:1.6;color:#d0c7b3}
.tx59-membership-intro strong{color:#a7d39b}
.tx59-level-grid,.tx59-price-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.tx59-level-card{--plan-accent:#a7b7c4;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #4d5359;border-top:4px solid var(--plan-accent);border-radius:13px;background:#171e28}
.tx59-level-card[data-level=free]{--plan-accent:#a7d39b}
.tx59-level-card[data-level=plus]{--plan-accent:#edc675;background:#211f22;border-color:#75603b;border-top-color:var(--plan-accent)}
.tx59-level-card.is-current{box-shadow:0 0 0 1px var(--plan-accent)}
.tx59-level-header{padding:22px;border-bottom:1px solid #51462f;min-height:210px}
.tx59-level-label{display:inline-block;margin:0 0 16px;padding:4px 9px;border:1px solid #5b594a;border-radius:6px;font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--plan-accent)}
.tx59-level-card.is-current .tx59-level-label{background:#283d2b;border-color:#648a5b;color:#c5e8bb}
.tx59-level-header h4{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:clamp(21px,2vw,28px);line-height:1.2;color:var(--plan-accent)}
.tx59-level-header h4 span{font-size:32px;line-height:1}
.tx59-level-lead{min-height:3em;margin:0 0 18px;font-size:15px;line-height:1.5;color:#d1c9b7}
.tx59-level-price{margin:0 0 5px;font-size:clamp(26px,2.6vw,36px);font-weight:800;line-height:1.2;color:#fff3d6}
.tx59-level-price-note{margin:0;font-size:13px;line-height:1.5;color:#beb6a5}
.tx59-level-features{display:flex;flex:1;flex-direction:column;padding:22px}
.tx59-level-includes{margin:0 0 20px;font-size:15px;font-weight:700;line-height:1.5;color:var(--plan-accent)}
.tx59-level-features ul{display:grid;gap:20px;margin:0 0 22px;padding:0;list-style:none}
.tx59-level-features li{display:flex;align-items:flex-start;gap:10px;margin:0;padding:0;line-height:1.5}
.tx59-level-check{flex:none;font-size:20px;line-height:1.2;color:var(--plan-accent)}
.tx59-level-features li strong{display:block;margin:0 0 4px;font-size:16px;color:#f1e5c9}
.tx59-level-features li div>span{display:block;font-size:14px;color:#c4bdad}
.tx59-level-note{margin:auto 0 0;padding-top:16px;border-top:1px solid #51462f;font-size:13px;line-height:1.6;color:#bcb4a5}
.tx59-level-footer{margin:0 22px 22px;padding:13px 8px;border:1px solid #5b594a;border-radius:8px;text-align:center;font-size:13px;font-weight:700;color:var(--plan-accent)}
.tx59-level-current{margin:14px 0 0;font-size:13px;color:#a7d39b}
#tx-plus-pricing{margin-top:28px;padding-top:22px;border-top:1px solid #625136}
#tx-plus-pricing>h4{margin:0 0 8px;font-size:21px;color:#e8c47b}
#tx-plus-pricing>p{margin:0 0 18px;line-height:1.5;color:#c4bdad}
.tx59-price-card{display:flex;flex-direction:column;min-width:0;padding:20px;border:1px solid #766442;border-radius:12px;background:#1b202d}
.tx59-price-card h4{margin:0 0 10px;font-size:18px;color:#edc675}
.tx59-price-card>strong{font-size:21px;color:#fff3d6}
.tx59-price-card>p{flex:1;font-size:14px;line-height:1.6;color:#c4bdad}
.tx59-price-card button:disabled{width:100%;min-height:44px;background:#35373c;color:#b9b9bd;border:1px solid #5d5d62;box-shadow:none;opacity:.7;cursor:not-allowed}
@media(max-width:760px){.tx59-level-grid,.tx59-price-grid{grid-template-columns:1fr}.tx59-level-header{min-height:0}.tx59-level-lead{min-height:0}.tx59-level-header h4{font-size:26px}.tx59-level-price{font-size:32px}}

/* ---------- What's new ---------- */
.tx59-whatsnew-head{margin:0 0 6px;font-weight:700;color:#e8c47b}
.tx59-whatsnew{margin:0 0 8px;padding-left:18px;line-height:1.6;color:#ddd0b1;font-size:14px}
.tx59-whatsnew-thanks{margin:0;font-size:13px;color:#b9ab8c}
.layout-section.layout-closed>.tx59-back-to-top-inline{display:none}
.layout-section>.tx59-back-to-top-inline{margin:8px 10px 2px auto}

/* Resume Play on the board while Auto-Pause holds the game and the board is back in view */
#tx59-board-resume{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:15;min-height:44px;padding:10px 22px;border:1px solid #c9a468;border-radius:999px;background:#2f6a35;color:#fff;font:inherit;font-weight:700;letter-spacing:.02em;box-shadow:0 6px 18px rgba(0,0,0,.55);cursor:pointer}
#tx59-board-resume[hidden]{display:none}
#tx59-board-resume:focus-visible{outline:3px solid #f3d27a;outline-offset:2px}

/* Header controls: ☰ keeps its 44 px square (40 px on phones) so Give Beta Feedback sits beside it with a clear gap and the same height */
.classic-header-control.classic-nav-button{width:44px;padding:0}
@media(max-width:600px){.classic-header-control.classic-nav-button{width:40px}.tx59-feedback{top:6px;height:40px;width:40px}}
/* Touch comfort for two small engine buttons: the opening-roll button and the landscape-tip dismiss */
@media (pointer:coarse){#orp-roll-btn{min-height:44px}#landscape-tip-dismiss{min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center}}

/* During a Human turn the centre logo (touch quick-Pause zone) lets taps through to the board */
#board-stage.tx59-human-turn #board-static-branding{pointer-events:none}
/* Phones: the feedback icon sits directly under ☰ so it never covers the TrigammonX wordmark */
@media(max-width:600px){.tx59-feedback{top:52px;left:8px}}

/* ---------- Classic Dial clock (v5.9.1): a dial large enough for its HH:MM:SS readout ---------- */
/* Beta v5.9 drew a 60 px dial with 13 px digits, so "00:00:00" (62 px wide) ran over the gold ring, and the dial
   ignored the Game Clock's Small / Medium / Large size. The dial now follows that size (136 px at Medium) and its
   digits stay inside the inner ring at every size. Timing is untouched: the same #clock-game / #clock-turn text. */
body.tx-clock-dial .clock-panel-compact .clock-card .clock-face{width:min(100%,calc(136px * var(--classic-clock-scale,1)));height:auto;aspect-ratio:1;flex:none;box-sizing:border-box}
body.tx-clock-dial .clock-panel-compact .clock-card .clock-face::before{inset:calc(9px * var(--classic-clock-scale,1))}
body.tx-clock-dial .clock-panel-compact .clock-card .clock-main{font-size:calc(18px * var(--classic-clock-scale,1));letter-spacing:0;font-variant-numeric:tabular-nums;white-space:nowrap}
body.tx-clock-dial .clock-panel-compact .clock-card .clock-sub{max-width:72%;margin-top:4px;font-size:calc(8.5px * var(--classic-clock-scale,1));line-height:1.25;text-align:center}

/* ---------- Borne-Off Race and Hit Battle on the main page (v5.9.1) ---------- */
.tx591-chart-note{margin:10px 2px 0;font-size:13px;line-height:1.5;color:#cdbf9f}
