/* TrigammonX Classic Preview 15 — Music Library, Board Library, version badge and
   public-interface styling. Presentation only; board geometry is untouched. */
:root{--tx15-gold:#e8c47b;--tx15-gold-soft:#9b7a45;--tx15-ink:#f4ead2;--tx15-dim:#cdbf9f;--tx15-panel:#141a25;--tx15-panel-2:#1c2330;--tx15-line:#5f4f36;--tx15-live:#2f4a2c}

/* Version: always visible at the top, at every width. */
.tx-layout-05 #tx-beta-badge,#tx-beta-badge{display:inline-flex!important;align-items:center;justify-content:center;font-size:clamp(12.5px,1.5vw,14px);letter-spacing:.12em;padding:4px 12px;color:#ffe2a4;border-color:#c9a468;background:rgba(216,180,106,.14);white-space:nowrap;text-transform:uppercase}
.tx-header-meta-row{flex-wrap:wrap;justify-content:center;row-gap:6px}

html.tx15-modal-open{overflow:hidden}

/* Music settings: one level of disclosure, not two. */
.tx15-music-settings>#under-board-music>.panel-title{display:none}
.tx15-music-settings>#under-board-music.tx-collapsible.tx-collapsed>.music-controls{display:flex}
.tx15-music-settings>#under-board-music.tx-collapsible.tx-collapsed>.music-status{display:block}
.tx15-music-settings>summary{cursor:pointer;padding:8px 2px;color:var(--tx15-dim)}

/* Touch quick-Pause on the centre logo: keep the tap area to the logo itself, so taps on
   tall checker stacks near the centre reach the checkers instead of pausing the game. */
@media (pointer:coarse){#board-stage #board-static-branding{width:11%;height:11%;border-radius:50%}}

/* Bar and bear-off trays: they are inset by left/right, but a shared width:100% rule made them
   12px wider than the board stage, so the right-hand (green) tray was clipped by the stage edge. */
#board-stage>.board-tray-strip-inframe{width:auto}

/* Shared controls */
.tx15-dialog button,.tx15-music-entry button,.tx15-board-entry button,.tx15-nav-libraries button{font:inherit;font-size:.92rem;min-height:40px;padding:8px 12px;border:1px solid #7a6544;border-radius:9px;background:#272c36;color:var(--tx15-ink);cursor:pointer;touch-action:manipulation}
.tx15-dialog button:hover:not(:disabled),.tx15-music-entry button:hover,.tx15-board-entry button:hover{border-color:var(--tx15-gold)}
.tx15-dialog button:focus-visible,.tx15-dialog input:focus-visible,.tx15-dialog select:focus-visible,.tx15-music-entry button:focus-visible,.tx15-board-entry button:focus-visible{outline:3px solid var(--tx15-gold);outline-offset:2px}
.tx15-dialog button:disabled{opacity:.4;cursor:default}
.tx15-dialog .tx15-primary,.tx15-open{background:#6e4f1c!important;border-color:#d1ad6a!important;color:#fff!important;font-weight:700}
.tx15-icon{min-width:42px;padding:6px 8px!important;font-size:1rem!important;line-height:1}
.tx15-visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tx15-dialog input[type=text],.tx15-dialog input[type=search],.tx15-dialog select{font:inherit;font-size:16px;min-height:40px;padding:6px 10px;border:1px solid #6d5b40;border-radius:8px;background:#0f141d;color:var(--tx15-ink);min-width:0;max-width:100%}
.tx15-dialog label{display:flex;flex-direction:column;gap:4px;font-size:.8rem;color:var(--tx15-dim)}
.tx15-dialog label.tx15-check{flex-direction:row;align-items:center;gap:8px;font-size:.9rem;color:var(--tx15-ink)}
.tx15-check input{width:20px;height:20px;accent-color:#c9a468}

/* Entry points on the page */
.tx15-music-entry{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:10px 0 4px;padding:10px 12px;border:1px solid var(--tx15-line);border-radius:12px;background:rgba(20,26,37,.75)}
.tx15-mini-now{flex:1 1 220px;min-width:0;color:var(--tx15-dim);font-size:.9rem;overflow-wrap:anywhere}
.tx15-mini-controls{display:flex;gap:6px}
.tx15-board-entry{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--tx15-line);border-radius:12px;background:rgba(20,26,37,.75)}
.tx15-entry-art{flex:0 0 auto;width:72px;height:72px}
.tx15-entry-text{flex:1 1 160px;min-width:0;display:flex;flex-direction:column;gap:2px}
.tx15-entry-k,.tx15-now-k{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--tx15-gold-soft)}
.tx15-entry-name{font-size:1.1rem;color:var(--tx15-ink)}
.tx15-entry-status{margin:0;font-size:.85rem;color:#a7d39b;min-height:1em}
.tx15-nav-libraries{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:6px 0 12px}
.tx15-nav-libraries button{display:block;width:100%;text-align:center!important;font-weight:700}

/* Artwork (thumbnail and preview). Layered boards stack art over their still background. */
.tx15-art{position:relative;display:block;width:100%;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:#06080d}
.tx15-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.tx15-art-layered .tx15-art-bg{object-fit:fill}
.tx15-img-failed{visibility:hidden}

/* Dialog shell */
.tx15-dialog{box-sizing:border-box;position:fixed;inset:0;margin:auto;height:fit-content;width:min(1120px,96vw);max-width:96vw;max-height:92vh;max-height:92dvh;padding:0;border:1px solid #8a6c3d;border-radius:16px;background:var(--tx15-panel);color:var(--tx15-ink);overflow:hidden;flex-direction:column}
.tx15-dialog[open]{display:flex}
.tx15-dialog::backdrop{background:rgba(0,0,0,.72)}
.tx15-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--tx15-line);background:var(--tx15-panel-2)}
.tx15-dialog-head h2{margin:0;font-size:1.25rem;color:var(--tx15-gold)}
.tx15-status{margin:0;padding:8px 16px;min-height:1.3em;font-size:.88rem;color:#a7d39b;border-top:1px solid var(--tx15-line)}
.tx15-status:empty{display:none}
.tx15-foot{margin:0;padding:8px 16px 12px;font-size:.78rem;color:#a99d84}
.tx15-empty{list-style:none;padding:14px;color:var(--tx15-dim);font-size:.9rem}
.tx15-results{margin:4px 0 8px;font-size:.8rem;color:var(--tx15-dim)}
.tx15-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.tx15-filters label{flex:1 1 180px}

/* Music Library */
.tx15-transport{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 16px;border-bottom:1px solid var(--tx15-line)}
.tx15-now{flex:1 1 240px;min-width:0;margin:0;display:flex;flex-direction:column}
.tx15-now strong{font-size:1rem;overflow-wrap:anywhere}
.tx15-now span:last-child{font-size:.82rem;color:var(--tx15-dim)}
.tx15-view-switch{display:none;gap:6px;padding:8px 16px 0}
.tx15-view-switch button{flex:1}
.tx15-view-switch [aria-pressed=true]{background:#5b4420;border-color:var(--tx15-gold)}
.tx15-music-body{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:0}
.tx15-pane{min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 16px 16px}
.tx15-lists{border-right:1px solid var(--tx15-line)}
.tx15-pane-title{margin:0 0 10px;font-size:1rem;color:var(--tx15-gold)}
.tx15-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}
.tx15-slot{display:flex!important;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;min-width:0}
.tx15-slot-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.tx15-slot-count{font-size:.75rem;color:var(--tx15-dim)}
.tx15-slot[aria-pressed=true]{background:#5b4420;border-color:var(--tx15-gold)}
.tx15-slot.tx15-live .tx15-slot-count::after{content:" · ♪"}
.tx15-list-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.tx15-name{flex:1 1 200px}
.tx15-count{font-size:.85rem;color:var(--tx15-dim);padding-bottom:10px}
.tx15-tracks,.tx15-catalog{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.tx15-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #3a3326;border-radius:10px;background:#181e29}
.tx15-row.tx15-live{border-color:#7fb06c;background:var(--tx15-live)}
.tx15-num{flex:0 0 1.6em;text-align:right;color:var(--tx15-gold-soft);font-variant-numeric:tabular-nums}
.tx15-row-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.tx15-row-text strong{font-size:.95rem;overflow-wrap:anywhere}
.tx15-row-text small{font-size:.78rem;color:var(--tx15-dim);overflow-wrap:anywhere}
.tx15-row-acts{flex:0 0 auto;display:flex;gap:4px;flex-wrap:nowrap}
.tx15-add{min-width:86px}
.tx15-remove:hover:not(:disabled){border-color:#d87a6a!important}
.tx15-list-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px}

/* Board Library */
.tx15-board-body{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(0,1.4fr)}
.tx15-board-preview{min-height:0;overflow:auto;padding:16px;border-right:1px solid var(--tx15-line);display:flex;flex-direction:column;gap:12px}
.tx15-preview-art{width:100%;max-width:520px;align-self:center}
.tx15-preview-name{margin:0;font-size:1.2rem;color:var(--tx15-gold)}
.tx15-preview-note{margin:4px 0 10px;font-size:.9rem;color:var(--tx15-dim);line-height:1.45}
.tx15-preview-acts .tx15-use{width:100%;min-height:48px;font-size:1rem}
.tx15-board-browse{min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 16px 16px}
.tx15-chips{display:flex;gap:6px;flex-wrap:wrap}
.tx15-chips [aria-pressed=true]{background:#5b4420;border-color:var(--tx15-gold)}
.tx15-board-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px}
.tx15-board-card{position:relative;display:flex!important;flex-direction:column;gap:6px;padding:6px!important;text-align:center;border-radius:12px!important;background:#181e29!important}
.tx15-board-card[aria-pressed=true]{border-color:var(--tx15-gold)!important;box-shadow:0 0 0 2px rgba(232,196,123,.45)}
.tx15-card-name{font-size:.82rem;line-height:1.25;overflow-wrap:anywhere}
.tx15-badge{position:absolute;top:10px;left:10px;padding:2px 8px;border-radius:99px;background:#2f6a35;color:#fff;font-size:.7rem;font-weight:700;letter-spacing:.04em}
.tx15-badge-soft{background:#5b4420}

/* Tablet and narrower: one column, switchable views. */
@media (max-width:900px){
  .tx15-view-switch{display:flex}
  .tx15-music-body{display:block;overflow:auto;overscroll-behavior:contain}
  .tx15-music-body .tx15-pane{overflow:visible;border-right:0}
  .tx15-music-body[data-view=lists] .tx15-songs,.tx15-music-body[data-view=songs] .tx15-lists{display:none}
  .tx15-pane-title{display:none}
  .tx15-board-body{display:block;overflow:auto;overscroll-behavior:contain}
  .tx15-board-preview{border-right:0;border-bottom:1px solid var(--tx15-line);flex-direction:row;align-items:center;overflow:visible}
  .tx15-preview-art{flex:0 0 min(40vw,260px)}
  .tx15-preview-info{flex:1 1 auto;min-width:0}
  .tx15-board-browse{overflow:visible}
}
/* Phone: full-screen sheet, large touch targets. */
@media (max-width:560px){
  .tx15-dialog{width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;border-radius:0;border:0}
  .tx15-dialog-head{padding:10px 12px}
  .tx15-now{flex-basis:100%}
  .tx15-transport,.tx15-pane,.tx15-board-browse{padding-left:12px;padding-right:12px}
  .tx15-board-preview{flex-direction:column;align-items:stretch;padding:12px}
  .tx15-preview-art{flex:none;max-width:min(70vw,320px)}
  .tx15-board-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
  .tx15-row{flex-wrap:wrap}
  .tx15-row-acts{width:100%;justify-content:flex-end}
  .tx15-tracks .tx15-row-acts{width:auto;margin-left:auto}
  .tx15-slots{grid-template-columns:1fr}
  .tx15-slot{flex-direction:row!important;justify-content:space-between;align-items:center!important}
  .tx15-entry-art{width:56px;height:56px}
}

/* ---- Beta v5.9: waveforms, durations and now playing ---- */
.tx59-row-wave{flex:1 1 140px;min-width:90px;display:flex;align-items:center;gap:8px}
.tx59-wave{display:block;flex:1 1 auto;min-width:60px;width:100%;height:26px;cursor:pointer;border-radius:4px}
.tx59-wave-big{height:44px}
.tx59-wave:focus-visible{outline:3px solid var(--tx15-gold);outline-offset:2px}
.tx59-time{flex:0 0 auto;font-size:.78rem;color:var(--tx15-dim);font-variant-numeric:tabular-nums;white-space:nowrap;min-width:3.2em;text-align:right}
.tx15-row.tx59-current{border-color:#b39556}
.tx15-row.tx59-current .tx59-time{color:var(--tx15-gold)}
.tx15-now-progress{font-size:.8rem;color:var(--tx15-dim)}
.tx59-transport-wave{flex:1 1 100%;order:9}
.tx59-now-playing{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"open info controls" "wave wave wave";align-items:center}
.tx59-now-playing>.tx15-open{grid-area:open}
.tx59-np-info{grid-area:info;min-width:0;display:flex;flex-direction:column;gap:1px}
.tx59-np-info .tx15-mini-now{font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--tx15-gold-soft);flex:none}
.tx59-np-title{font-size:1rem;color:var(--tx15-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tx59-np-sub{font-size:.8rem;color:var(--tx15-dim);overflow-wrap:anywhere}
.tx59-now-playing>.tx15-mini-controls{grid-area:controls}
.tx59-np-wave{grid-area:wave;display:flex;align-items:center;gap:10px;min-width:0}
.tx59-np-wave:empty{display:none}
.tx15-slot-count{white-space:nowrap}
@media (max-width:560px){
  .tx59-now-playing{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"info controls" "wave wave" "open open"}
  .tx59-now-playing>.tx15-open{justify-self:start}
  .tx15-row .tx59-row-wave{flex:1 1 100%;order:5}
  .tx15-catalog .tx15-row-acts,.tx15-tracks .tx15-row-acts{order:4}
}
