:root{color-scheme:dark;--bg:#08110f;--surface:#101d19;--line:#294037;--text:#ecf6f0;--muted:#a4b9ad;--green:#47e1a0;--gold:#ffbd54;--red:#ff7f7f;font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}a{color:inherit;text-decoration:none}button{cursor:pointer}button:disabled,input:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.5rem,3vw,2.2rem);line-height:1.3;margin-bottom:.6rem}h2{font-size:1.15rem;margin-bottom:1rem}p{margin-bottom:1rem}svg{max-width:100%}.muted,.label-en,.en{color:var(--muted)}.eyebrow{font-size:.875rem;letter-spacing:.12em;color:var(--green);margin-bottom:.45rem}.empty{text-align:center;padding:3rem 1rem;color:var(--muted)}.empty a{margin:.5rem}.full,.full-btn{width:100%}
button,.ghost-btn,.primary-btn,.danger-btn,.plain-btn,.icon-btn,.orange-action{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;border:1px solid var(--line);border-radius:9px;padding:.65rem 1rem;background:#172a22;color:var(--text);font-size:.9rem;font-weight:600;line-height:1.3;transition:background .15s,border-color .15s}
button:hover,.ghost-btn:hover{background:#254434;border-color:#508869}.primary-btn,button.primary{background:var(--green);border-color:var(--green);color:#042517}.primary-btn:hover{background:#78edbd}.danger-btn,button.danger{color:var(--red);border-color:#713e3e;background:#29191b}.plain-btn{background:transparent;border-color:transparent;color:var(--green)}.icon-btn{width:44px;padding:.5rem}.badge,.status-pill{display:inline-block;border-radius:99px;font-size:.8rem;line-height:1.5;padding:.25rem .7rem;color:var(--green);background:#133d2c;white-space:normal}.badge.warn{background:#3d301b;color:var(--gold)}.badge.danger{background:#402224;color:var(--red)}.toolbar,.top-actions,.segmented,.tabs,.structure-tools,.mobile-structure-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}.segmented button,.tabs button{background:transparent}.segmented .active,.tabs .active,.nav .active,.mobile-tabs .active,.mobile-console-tabs .active{background:#204633;color:var(--green);border-color:#488e66}
.app-shell{min-height:100dvh}.topbar{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;padding:1.25rem 2.5rem;background:#0c1713;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:.8rem}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--green);color:#073722;font-weight:900;font-size:1.35rem}.brand-title{font-size:1.05rem;font-weight:700}.brand-subtitle{color:var(--muted);font-size:.8rem}.nav{display:flex;gap:.35rem;flex-wrap:wrap}.nav button{background:transparent;border-color:transparent}.page{max-width:1440px;margin:auto;padding:2rem 2.5rem}.page-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.5rem;flex-wrap:wrap}.page-header h1,.page-header h2{margin-bottom:0}.card{border:1px solid var(--line);border-radius:14px;background:var(--surface)}.panel{padding:1.5rem}.grid{display:grid;gap:1rem}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.stat{display:flex;align-items:center;gap:1rem}.stat-icon{color:var(--green);border:1px solid var(--line);border-radius:10px;padding:.7rem}.stat-value{font-size:2rem;line-height:1.3;font-weight:750;font-variant-numeric:tabular-nums}.stat-label{font-size:.85rem;color:var(--muted)}.chart{width:100%;height:270px;margin-top:.5rem}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.9rem}th,td{border-bottom:1px solid var(--line);padding:.85rem .7rem;white-space:nowrap}th{font-weight:500;color:var(--muted)}td:last-child{white-space:nowrap}td button{margin-right:.4rem}tbody tr:last-child td{border-bottom:0}
.field{display:flex;flex-direction:column;gap:.4rem;margin-bottom:1rem;min-width:0}.field label,.mobile-structure-fields>label{font-size:.9rem;color:var(--muted)}input,select,textarea{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:8px;background:#0b1612;color:var(--text);padding:.65rem .8rem}input[type=checkbox]{width:19px;height:19px;min-height:0;accent-color:var(--green);flex-shrink:0}input[type=range]{padding:0;border:0;background:transparent;accent-color:var(--green)}input[type=color]{padding:5px;min-width:54px}input[type=file]{padding:.5rem;font-size:.85rem}input::placeholder{color:#7e9689}.checkbox-row{display:flex;align-items:center;gap:.6rem;margin:.7rem 0;font-size:.9rem}.setup-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(480px,1.4fr);gap:1.25rem;align-items:start}.setup-mark{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:5px;margin-right:.4rem;background:#244b38;color:var(--green);font-size:.75rem}.setup-grid .grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.structure-editor{overflow:auto}.structure-tools{margin-bottom:1rem}.structure-line{display:grid;grid-template-columns:40px repeat(4,minmax(60px,1fr)) 70px 44px;gap:.4rem;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--line);min-width:570px}.structure-line input{padding:.5rem;font-size:.85rem}.structure-line .danger-btn{padding:.5rem}.structure-line>strong{font-size:.85rem}.marked-btn{gap:.5rem}.preview-list{display:grid;gap:.5rem}.level-row{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:1rem;border-bottom:1px solid var(--line);padding:.7rem 0;align-items:center;font-size:.9rem}.level-blinds{overflow-wrap:anywhere}.level-time{color:var(--muted)}.remote-layout{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(300px,1.15fr);gap:1.25rem}.qr-card{text-align:center}.qr-card .field{text-align:left}.qr-code{width:min(260px,100%);margin:1.25rem auto;background:#fff;border-radius:10px;overflow:hidden;line-height:0}.qr-code svg{width:100%;height:auto}.code-pill{font:750 1.7rem/1.5 ui-monospace,monospace;letter-spacing:.2em;margin:1rem 0}.qr-card #remote-link{margin-bottom:1rem}
.display-toolbar{padding:.65rem 1.2rem;border-bottom:1px solid var(--line);background:#0b1812}.stage-page{min-height:100dvh}.stage-shell{position:relative;background:#030a07;min-height:calc(100dvh - 65px);display:flex;flex-direction:column}.stage{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(130px,1fr) minmax(400px,3.2fr) minmax(130px,1fr);gap:2vw;flex:1;min-height:calc(100dvh - 136px);padding:2.5vh 3vw 7vh;background-position:center;--panel-scale:1.15;--metric-color:#47e1a0;--countdown-color:#fff;--blind-color:#fff;--ante-color:#ffbd54;--panel-text-color:#fff}.stage:before{content:"";position:absolute;inset:0;z-index:-1;background-image:inherit;background-size:inherit;background-position:inherit;filter:blur(var(--stage-blur,0px))}.side-panel{display:flex;flex-direction:column;justify-content:space-around;gap:1rem;padding:1vh 0}.stage-metric{text-align:center;padding:1rem .4rem;border-top:1px solid #b2f5d82c}.stage-metric .label-cn{font-size:clamp(.85rem,1.1vw,1.3rem);color:var(--panel-text-color)}.stage-metric .label-en{font-size:clamp(.65rem,.8vw,1rem);opacity:.8}.stage-metric .value{font-size:clamp(1.2rem,2.35vw,3.6rem);font-weight:750;line-height:1.35;color:var(--metric-color);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;transform:scale(var(--panel-scale));margin-top:.5rem}.stage-center{text-align:center;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1.3vh}.stage-event-title{font-size:clamp(1.3rem,2.1vw,3rem);font-weight:700;letter-spacing:.08em;overflow-wrap:anywhere}.level-status{display:flex;justify-content:center;gap:.8rem;align-items:center;font-size:clamp(1rem,1.4vw,1.7rem);color:var(--panel-text-color)}.blind-labels{display:flex;gap:5vw;justify-content:center;color:#adcabd;font-size:clamp(.8rem,1.1vw,1.4rem)}.blind-value{font-size:clamp(1.8rem,4vw,5.5rem);line-height:1.3;color:var(--blind-color);font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ante-line{font-size:clamp(.8rem,1vw,1.4rem);color:#b5caba}.ante-value{font-size:1.5em;color:var(--ante-color);font-weight:700;margin-left:.5em}.countdown{font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;font-size:clamp(4rem,10.8vw,13rem);font-weight:800;line-height:1.12;letter-spacing:-.06em;color:var(--countdown-color);font-variant-numeric:tabular-nums;text-shadow:0 2px 30px #0008}.next-level{font-size:clamp(.85rem,1.2vw,1.5rem);color:#b4c8bc;margin:.5rem}.progress-track{height:5px;background:#fff2;border-radius:10px;overflow:hidden;margin:1rem auto;max-width:90%}.progress-bar{height:100%;background:var(--green);transition:width .25s}.stage-level-list{font-size:clamp(.75rem,1vw,1.3rem);max-width:90%;width:100%;margin:.3vh auto 0}.stage-list-head,.stage-list-row{display:grid;grid-template-columns:1fr 2fr 1fr;gap:.5rem;padding:.45em .5em;border-bottom:1px solid #fff1;color:var(--panel-text-color)}.stage-list-head{color:#99b6a5}.stage-list-row.active{background:#215c43;color:#b2ffdd;border-radius:6px}.stage-logo{position:absolute;top:1.2rem;left:50%;transform:translateX(-50%);max-width:140px;max-height:70px;z-index:1}.stage-logo img{display:block;max-width:100%;max-height:70px}.stage:has(.stage-logo) .stage-center{padding-top:75px}.floating-text{position:absolute;transform:translate(-50%,-50%);max-width:94%;text-align:center;font-weight:700;z-index:2;touch-action:none;cursor:move;line-height:1.2;overflow-wrap:anywhere}.control-dock{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.5rem;padding:.7rem 1rem;background:#07110dee;border-top:1px solid #ffffff18}.control-dock button{min-height:40px}.stage-shell:fullscreen,#display-root:fullscreen{width:100%;height:100%;background:#030a07}#display-root:fullscreen .stage-shell{height:100%;min-height:0}#display-root:fullscreen .stage{min-height:0}.stage-shell:fullscreen .stage{min-height:0}
.modal-backdrop{position:fixed;inset:0;background:#000b;backdrop-filter:blur(5px);z-index:1000;display:flex;align-items:center;justify-content:center;padding:1rem}.modal{width:min(760px,100%);max-height:90dvh;overflow:auto;border:1px solid #4e6b5b;border-radius:16px;background:#101e18;box-shadow:0 24px 90px #0009}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.5rem;border-bottom:1px solid var(--line);position:sticky;top:0;background:#101e18;z-index:1}.modal-header h2{margin:0}.modal-body{padding:1.5rem}.modal-body .tabs{margin-bottom:1.5rem}.modal-body .tabs button{font-size:.85rem;padding:.5rem .65rem}.color-row{display:grid;grid-template-columns:1fr 64px;align-items:end;gap:1rem}.color-row>input{margin-bottom:1rem}.toast{position:fixed;left:50%;bottom:1.5rem;transform:translateX(-50%);padding:.85rem 1.3rem;max-width:90vw;background:#ebfff4;color:#143423;border:1px solid #86d5ad;border-radius:10px;box-shadow:0 8px 40px #0008;z-index:2000;text-align:center}
.mobile-shell{max-width:680px;min-height:100dvh;margin:auto;padding:1rem;background:#0b1511}.mobile-console-shell{padding:0 0 max(1rem,env(safe-area-inset-bottom))}.mobile-panel{padding:1.3rem}.mobile-tabs,.mobile-console-tabs{display:flex;gap:.4rem;padding:.6rem 0;flex-wrap:wrap;margin-bottom:1rem}.mobile-tabs button{flex:1}.mobile-console-top{display:flex;align-items:center;gap:.65rem;padding:1rem;background:#10241a;border-bottom:1px solid var(--line)}.mobile-console-top h1{font-size:1.1rem;flex:1;margin:0;line-height:1.4}.mobile-top-actions{display:flex;gap:.4rem;flex-shrink:0}.mobile-top-action{min-height:40px;padding:.45rem .6rem;font-size:.8rem;white-space:nowrap;background:transparent}.mobile-console-top h1{min-width:0;overflow-wrap:anywhere}.mobile-icon-link,.mobile-pill-icon,.mobile-round-icon{min-width:40px;min-height:40px;padding:.4rem;background:transparent}.mobile-scoreboard{padding:1rem .8rem;background:#0c1f16;border-bottom:1px solid #345642}.mobile-board-grid{display:grid;grid-template-columns:1fr 1.8fr 1fr;gap:.6rem;align-items:center}.mobile-board-side{display:grid;gap:.8rem}.mobile-board-metric{text-align:center}.mobile-board-metric .cn{font-size:.8rem}.mobile-board-metric .en{font-size:.65rem}.mobile-board-metric .val{font-size:1.15rem;font-weight:700;color:var(--green);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.mobile-board-main{text-align:center;min-width:0}.mobile-board-clock{font-size:clamp(2.25rem,8vw,4rem);font-family:ui-monospace,monospace;line-height:1.3;letter-spacing:-.06em;font-weight:800}.mobile-board-status{font-size:.8rem;color:var(--gold);margin-bottom:.65rem}.mobile-blind-line{font-size:.8rem;display:flex;justify-content:center;gap:.35rem;flex-wrap:wrap}.mobile-blind-line strong{font-weight:500;color:var(--muted)}.mobile-board-strip{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.4rem;margin-top:1rem;padding-top:.7rem;border-top:1px solid var(--line);font-size:.75rem;color:var(--muted)}.mobile-console-tabs{margin:0;padding:.7rem 1rem;background:#0c1913}.mobile-console-tabs button{flex:1}.mobile-control-surface,.mobile-form,.mobile-section{padding:1rem}.mobile-action-grid{display:grid;gap:.6rem;margin-bottom:1rem}.mobile-action-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.mobile-action-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.orange-action{background:#c87d26;color:#fff;border-color:#da9c50;min-height:50px;width:100%;font-size:.95rem}.orange-action:hover{background:#a8671c}.orange-action.danger{background:#47221d;color:#ffb5a6;border-color:#805047}.mobile-adjust-row,.mobile-total-row{display:flex;align-items:center;gap:.65rem;margin:1rem 0}.mobile-adjust-label{flex:1;min-width:100px}.mobile-adjust-label strong{display:block;font-size:1.1rem;color:var(--green)}.mobile-adjust-row button{min-width:46px}.mobile-total-row input{flex:1}.mobile-total-row button{white-space:nowrap;padding:.6rem}.mobile-divider{height:1px;background:var(--line);margin:1.2rem 0}.mobile-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1rem}.mobile-form-section{padding:1rem 0;border-bottom:1px solid var(--line);margin-bottom:.5rem}.mobile-section-title{font-size:1.1rem;color:var(--gold);margin-bottom:1rem}.mobile-level-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 .6rem}.mobile-level-form{padding:1rem 0}.mobile-structure-row{border:1px solid var(--line);border-radius:9px;padding:.8rem;margin:.65rem 0;background:#102017}.mobile-structure-row.is-break{background:#302619}.mobile-structure-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.6rem}.mobile-structure-head label{display:flex;align-items:center;gap:.4rem;font-size:.8rem}.mobile-structure-head button{font-size:.8rem;min-height:36px;padding:.4rem .6rem}.mobile-structure-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.45rem}.mobile-structure-fields input{padding:.5rem}.mobile-structure-empty{padding:2rem;text-align:center;color:var(--muted)}.mobile-toolbar>*{flex:1}.mobile-form .full-btn{margin-top:1rem}
@media(min-width:1600px){.page{padding-top:3rem}.stage{gap:3vw}.side-panel{gap:2vh}}
@media(max-width:1100px){.topbar{padding:1rem 1.5rem;gap:1rem}.nav{order:3;width:100%;border-top:1px solid var(--line);padding-top:.6rem}.page{padding:1.5rem}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-grid{grid-template-columns:1fr}.stage{grid-template-columns:minmax(100px,1fr) minmax(340px,3fr) minmax(100px,1fr);gap:1.5vw;padding:2vh 2vw 8vh}.stage-metric{padding:.6rem .2rem}.stage-metric .value{font-size:1.5rem}.stage-level-list{font-size:.75rem}}
@media(max-width:760px){.topbar{padding:1rem}.brand-subtitle{display:none}.top-actions .ghost-btn{font-size:.8rem;padding:.5rem}.page{padding:1rem}.panel{padding:1rem}.nav{gap:.3rem}.nav button{padding:.5rem .65rem;font-size:.85rem;flex:1;white-space:nowrap}.two-col,.remote-layout{grid-template-columns:1fr}.stat{gap:.6rem}.stat-icon{display:none}.stat-value{font-size:1.7rem}.page-header{align-items:flex-start}.structure-editor{max-width:100%;overflow-x:auto}.chart{height:210px}.modal-body{padding:1rem}.modal-backdrop{padding:.5rem}.level-row{grid-template-columns:55px minmax(0,1fr) auto;gap:.5rem}.display-toolbar{padding:.5rem}.display-toolbar .ghost-btn{font-size:.8rem}.stage{grid-template-columns:1fr 1fr;gap:1rem;min-height:0;padding:1.2rem 1rem 5rem}.stage-center{grid-column:1/-1;grid-row:1;gap:.7rem}.side-panel{grid-row:2;display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.stage-metric:last-child{grid-column:1/-1}.stage-metric .value{font-size:1.3rem;transform:none}.stage-metric .label-cn{font-size:.8rem}.stage-metric .label-en{font-size:.65rem}.stage-event-title{font-size:1.5rem}.blind-value{font-size:2.5rem}.countdown{font-size:5.5rem}.stage-level-list{max-width:100%;font-size:.85rem}.floating-text{max-width:90%;font-size:24px!important}.control-dock{gap:.35rem;padding:.5rem}.control-dock button{font-size:.8rem;padding:.5rem .65rem}.control-dock .icon-btn{width:38px}.stage-logo{max-width:90px;max-height:50px}.stage-logo img{max-height:50px}.stage:has(.stage-logo) .stage-center{padding-top:55px}.stage-shell{min-height:calc(100dvh - 61px)}#display-root:fullscreen .stage{overflow:auto}.modal .tabs{gap:.35rem}}
@media(max-width:390px){.mobile-shell{padding:.65rem}.mobile-console-shell{padding:0}.mobile-console-top{padding:.8rem .6rem}.mobile-console-top h1{font-size:.95rem}.mobile-board-grid{grid-template-columns:1fr 1.6fr 1fr;gap:.3rem}.mobile-board-metric .cn{font-size:.7rem}.mobile-board-metric .en{font-size:.6rem}.mobile-board-metric .val{font-size:1rem}.mobile-board-clock{font-size:2.4rem}.mobile-blind-line{font-size:.7rem}.mobile-control-surface,.mobile-form{padding:.75rem}.mobile-form-grid{gap:0 .6rem}.mobile-action-grid{gap:.4rem}.orange-action{font-size:.85rem;padding:.6rem .4rem}.mobile-structure-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Fit the TV layout to the screen height as well as its width. */
@media(min-width:761px){
 .stage-shell{height:calc(100dvh - 65px);min-height:0}
 .stage{min-height:0;padding:1.5vh 3vw 7vh}
 .stage-center{gap:.5vh;min-height:0}
 .side-panel{gap:.5vh;min-height:0}
 .stage-metric{padding:.5vh .4rem}
 .countdown{font-size:min(10.8vw,17vh)}
 .blind-value{font-size:min(4vw,7vh)}
 .stage-event-title{font-size:min(2.1vw,3.5vh)}
 .stage-level-list{margin:0 auto;font-size:min(1vw,1.8vh)}
 .stage-list-head,.stage-list-row{padding:.25em .5em}
 .progress-track{margin:.65vh auto}
 .next-level{margin:.2vh}
 #display-root:fullscreen .stage-shell{height:100dvh}
}

/* Keep score input usable between the two mobile actions. */
.mobile-total-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.mobile-total-row input{grid-column:1/-1;grid-row:1}
.mobile-total-row button{width:100%}
.mobile-divider{height:auto;min-height:1px;text-align:center;color:var(--muted);font-size:.85rem}

/* Blue TV display: a 1920 × 1080 composition, isolated from the mobile console. */
.stage-page.blue-display-page {
  --blue-ink: #c0f4ff;
  --blue-accent: #00e0f5;
  --blue-font-scale: 1;
  --blue-available-height: 100dvh;
  --blue-background-filter: hue-rotate(0deg);
  min-height: 100dvh;
  background: #000714;
  color: var(--blue-ink);
}
.blue-display-page #display-root {
  width: 100%;
  background: #000714;
}
.blue-display-page .stage-shell.blue-stage-shell {
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--blue-available-height);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #000714;
}
.blue-display-page .stage.blue-stage {
  --blue-unit: min(1vw, calc(var(--blue-available-height) * 0.01777778));
  position: relative;
  display: block;
  flex: none;
  width: min(100%, calc(var(--blue-available-height) * 16 / 9));
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--blue-ink);
  background: #03152b;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.2;
  text-shadow: 0 2px 3px #0008;
}
.blue-display-page .stage.blue-stage::before { content: none; }
@supports (width: 1cqw) {
  .blue-display-page .stage.blue-stage { --blue-unit: 1cqw; }
}
.blue-display-page .blue-stage-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  filter: var(--blue-background-filter) blur(var(--blue-background-blur, 0px));
}
.blue-display-page[data-blue-theme="teal"],
.blue-display-page .blue-stage[data-blue-theme="teal"] {
  --blue-background-filter: hue-rotate(-24deg) saturate(.88);
  --blue-ink: #c5fff0;
  --blue-accent: #38f9d3;
}
.blue-display-page[data-blue-theme="violet"],
.blue-display-page .blue-stage[data-blue-theme="violet"] {
  --blue-background-filter: hue-rotate(35deg) saturate(.86);
  --blue-ink: #e2d9ff;
  --blue-accent: #cba5ff;
}
.blue-display-page .blue-stage-badge {
  position: absolute;
  top: 7.2222%;
  left: 5.1042%;
  width: 7.6042%;
  height: 13.5185%;
}
.blue-display-page .blue-stage-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.screen-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.screen-preset-card { position: relative; min-width: 0; cursor: pointer; }
.screen-preset-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}
.screen-preset-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px;
  border: 2px solid #ffffff20;
  border-radius: 12px;
  background: #ffffff06;
  text-align: center;
}
.screen-preset-card input:checked + .screen-preset-content {
  border-color: #54dba3;
  background: #54dba314;
}
.screen-preset-card input:focus-visible + .screen-preset-content { outline: 3px solid #ffe19c; outline-offset: 3px; }
.screen-preset-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  aspect-ratio: 4 / 3;
  gap: 6px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 6px;
  color: #c0f4ff;
  background: #03152b;
}
.screen-preset-background { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -1; }
.screen-preset-preview[data-screen-preset="teal"] { color: #cefff0; }
.screen-preset-preview[data-screen-preset="teal"] .screen-preset-background { filter: hue-rotate(-24deg) saturate(.88); }
.screen-preset-preview[data-screen-preset="violet"] { color: #e5dcff; }
.screen-preset-preview[data-screen-preset="violet"] .screen-preset-background { filter: hue-rotate(35deg) saturate(.86); }
.screen-preset-clock { font-size: clamp(20px, 5vw, 32px); font-weight: 900; line-height: 1; }
.screen-preset-blinds { font-size: 9px; font-weight: 700; }
.screen-preset-name { font-size: 14px; font-weight: 700; }
.screen-preset-caption { font-size: 11px; color: #72e3b5; }
.screen-default-choice { font-size: 16px; }
.screen-default-note { font-size: 13px; line-height: 1.6; margin: 10px 0 18px; }
.screen-more-settings { border-top: 1px solid #ffffff20; margin-top: 26px; padding-top: 18px; }
.screen-more-settings > summary { cursor: pointer; color: #a8b9b1; font-size: 14px; }
.screen-more-settings .mobile-form { padding: 20px 0 0; }
.blue-display-page .blue-stage-brand {
  position:absolute;top:5.2%;left:16.1458%;color:#bad8ef;
  font-size:calc(1.1458 * var(--blue-unit));letter-spacing:.16em;
}
.blue-display-page .blue-stage-title {
  position:absolute;top:12.5%;left:19.7917%;width:60.4167%;height:8.3333%;margin:0;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  color:#fff;font-size:calc(2.7083 * var(--blue-unit));font-weight:700;line-height:1.15;
  overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;white-space:normal;text-align:center;
}
.blue-display-page .blue-stage-title.is-long-title {font-size:calc(1.875 * var(--blue-unit));}
.blue-display-page .blue-stage-title.is-very-long-title {font-size:calc(1.5625 * var(--blue-unit));}
.blue-display-page .blue-stage-time {
  position: absolute;
  top: 4.7%;
  left: 69%;
  width: 11%;
  text-align: center;
  font-size: calc(1.6146 * var(--blue-unit) * var(--blue-font-scale));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.blue-display-page .blue-stage-timing {
  position: absolute;
  top: 9%;
  left: 16.1458%;
  max-width: 46%;
  color: #bad8ef;
  font-size: calc(.8333 * var(--blue-unit));
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.blue-display-page .blue-stage-slogan {
  position: absolute;
  top: 6%;
  right: 4.1667%;
  margin: 0;
  color: #bad8ef;
  font-size: calc(.7292 * var(--blue-unit));
  line-height: 1.2;
  letter-spacing: .3em;
  text-align: right;
}
.blue-display-page .blue-stage-connection {
  position: absolute;
  top: 13.5%;
  right: 4.0625%;
  max-width: 27%;
  color: #bad8ef;
  font-size: calc(.8854 * var(--blue-unit));
  line-height: 1.3;
  text-align: right;
}
.blue-display-page .blue-stage-side {
  position: absolute;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  width: 18.75%;
  height: 52.96%;
  margin: 0;
  padding: 0;
  text-align: center;
}
.blue-display-page .blue-stage-left { top: 25.8333%; left: 1.7188%; }
.blue-display-page .blue-stage-right { top: 23.7963%; right: 1.3021%; }
.blue-display-page .blue-stage-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1.0417 * var(--blue-unit));
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.blue-display-page .blue-metric-label {
  color: #bad8ef;
  font-size: calc(1.1458 * var(--blue-unit));
  line-height: 1.2;
  white-space: nowrap;
}
.blue-display-page .blue-metric-value {
  display: block;
  max-width: 100%;
  color: var(--blue-ink);
  font-size: calc(3.5417 * var(--blue-unit) * var(--blue-font-scale));
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.blue-display-page .blue-stage-right .blue-stage-metric:last-child .blue-metric-value {
  font-size: calc(3.125 * var(--blue-unit) * var(--blue-font-scale));
}
.blue-display-page .blue-stage-countdown {
  position: absolute;
  top: 24.537%;
  left: 18%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64%;
  height: 31.9444%;
  margin: 0;
  color: var(--blue-countdown, var(--blue-ink));
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: calc(15.2083 * var(--blue-unit) * var(--blue-font-scale));
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.025em;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 4px 6px #0005;
}
.blue-display-page .blue-stage-countdown.is-long {
  font-size: calc(11.1 * var(--blue-unit) * var(--blue-font-scale));
}
.blue-display-page .blue-stage-status {
  position: absolute;
  top: 58.1%;
  left: 25%;
  width: 50%;
  color: var(--blue-accent);
  font-size: calc(2.2396 * var(--blue-unit));
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.blue-display-page .blue-stage-blinds {
  position: absolute;
  top: 68.9815%;
  left: 20.8333%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6%;
  width: 58.8542%;
  height: 17.5926%;
  text-align: center;
}
.blue-display-page .blue-stage-blinds::after {
  content: "";
  position: absolute;
  top: 19.4737%;
  left: 50%;
  width: max(1px, calc(.1042 * var(--blue-unit)));
  height: 77.8947%;
  background: var(--blue-ink);
  opacity: .85;
}
.blue-display-page .blue-blind-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.blue-display-page .blue-blind-label {
  margin-bottom: calc(1.0417 * var(--blue-unit));
  font-size: calc(1.4063 * var(--blue-unit));
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.blue-display-page .blue-blind-group + .blue-blind-group .blue-blind-label {
  color: #bad8ef;
  font-weight: 400;
}
.blue-display-page :is(.blue-blind-value, .blue-blind-ante) {
  display: block;
  max-width: 100%;
  color: var(--blue-blind, var(--blue-ink));
  font-size: calc(3.75 * var(--blue-unit) * var(--blue-font-scale));
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.blue-display-page .blue-blind-ante { color: var(--blue-ante, var(--blue-ink)); }
.blue-display-page :is(.blue-stage-bottom-left, .blue-stage-bottom-right) {
  position: absolute;
  top: 86.4815%;
  max-width: 20%;
  margin: 0;
  color: #bad8ef;
  font-size: calc(.8333 * var(--blue-unit));
  line-height: 1.2;
  letter-spacing: .24em;
}
.blue-display-page .blue-stage-bottom-left { left: 3.125%; }
.blue-display-page .blue-stage-bottom-right { right: 3.6458%; text-align: right; }
.blue-display-page .blue-stage-notice {
  position: absolute;
  z-index: 3;
  top: 90%;
  left: 50%;
  bottom: auto;
  width: max-content;
  max-width: 60%;
  max-height: 4.5%;
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: calc(.3125 * var(--blue-unit)) calc(.625 * var(--blue-unit));
  border: 1px solid #8ac9ed80;
  border-radius: calc(.5 * var(--blue-unit));
  background: #04152bef;
  color: var(--blue-ink);
  font-size: calc(1.4583 * var(--blue-unit));
  line-height: 1.1;
  text-align: center;
  cursor: default;
  touch-action: auto;
}

/* Display-only shortcuts sit below the notice and the corner slogans. */
.blue-display-page .blue-view-actions {
  position: absolute;
  z-index: 4;
  right: 3.125%;
  bottom: 1.4815%;
  display: flex;
  align-items: center;
  gap: clamp(6px, calc(.625 * var(--blue-unit)), 12px);
  margin: 0;
  padding: 0;
}
.blue-display-page .blue-view-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  width: auto;
  min-width: 0;
  min-height: clamp(26px, calc(2.2917 * var(--blue-unit)), 44px);
  margin: 0;
  padding: .35em .7em;
  border: 1px solid #9bdaed45;
  border-radius: 6px;
  background: #08203a30;
  color: var(--blue-ink);
  font-size: clamp(11px, calc(1.0417 * var(--blue-unit)), 20px);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  opacity: .65;
}
.blue-display-page .blue-view-actions button:hover,
.blue-display-page .blue-view-actions button:focus-visible {
  border-color: #a3e2ff;
  background: #0b335b99;
  color: #fff;
  opacity: 1;
}
.blue-display-page .blue-view-actions button:focus-visible {
  outline: 2px solid #a3e2ff;
  outline-offset: 2px;
}
.blue-display-page .blue-stage.is-empty :is(.blue-stage-countdown, .blue-stage-status,
  .blue-stage-chips, .blue-stage-blinds, .blue-stage-notice) { display: none; }
.blue-display-page .blue-stage-empty {
  position: absolute;
  inset: 25% 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(2 * var(--blue-unit));
  color: var(--blue-ink);
  text-align: center;
}
.blue-display-page .blue-stage-empty h2 {
  margin: 0 0 calc(1 * var(--blue-unit));
  font-size: calc(3 * var(--blue-unit));
}
.blue-display-page .blue-stage-empty p {
  margin: 0 0 calc(1.6 * var(--blue-unit));
  font-size: calc(1.5 * var(--blue-unit));
}
.blue-display-page .blue-stage-empty button[data-display-pair] {
  min-height: 0;
  padding: calc(.8 * var(--blue-unit)) calc(1.5 * var(--blue-unit));
  border: 1px solid #85bfdd;
  border-radius: calc(.5 * var(--blue-unit));
  background: #0b3e69;
  color: var(--blue-ink);
  font-size: calc(1.4 * var(--blue-unit));
}
.blue-display-page #display-root:fullscreen,
.blue-display-page .blue-stage-shell:fullscreen {
  --blue-available-height: 100dvh;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  background: #000714;
}
.blue-display-page #display-root:fullscreen .blue-stage-shell {
  height: 100dvh;
  min-height: 0;
}
.blue-display-page #display-root:fullscreen .stage.blue-stage { overflow: hidden; }

/* Pairing is separate from the administration and mobile-console modals. */
.modal-backdrop.blue-pairing-backdrop {
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: #000a;
  backdrop-filter: blur(6px);
}
.blue-pairing-backdrop .modal.blue-pairing-modal {
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
  border: 1px solid #6aa6cf;
  border-radius: 16px;
  background: #061b31;
  color: #d5f4ff;
  box-shadow: 0 24px 80px #000a;
  text-align: center;
  text-shadow: none;
}
.blue-pairing-modal h3 {
  margin: 0 0 10px;
  color: #edfbff;
  font-size: 22px;
  line-height: 1.35;
}
.blue-pairing-modal p {
  margin: 0 0 20px;
  color: #a9c9de;
  font-size: 14px;
  line-height: 1.5;
}
.blue-pairing-modal .blue-pairing-content {
  margin: 0 0 20px;
}
.blue-pairing-modal .qr-code {
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 16px;
  padding: 16px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  line-height: 0;
}
.blue-pairing-modal .qr-code :is(svg, img, canvas) {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: #fff;
}
.blue-pairing-modal .blue-pair-url {
  max-width: 100%;
  color: #c7e9fc;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: text;
}
.blue-pairing-modal button[data-close-pair] {
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid #70acce;
  border-radius: 8px;
  background: #0c3655;
  color: #d5f4ff;
  font-size: 14px;
}
.blue-pairing-modal button[data-close-pair]:hover {
  border-color: #b4e6ff;
  background: #155077;
}
.blue-pairing-modal button[data-close-pair]:focus-visible {
  outline: 2px solid #b4e6ff;
  outline-offset: 3px;
}

/* Portrait screens use the space below the 16:9 picture for the two shortcuts. */
@media (max-width: 760px) and (orientation: portrait) {
  .blue-display-page .stage.blue-stage,
  .blue-display-page #display-root:fullscreen .stage.blue-stage { overflow: visible; }
  .blue-display-page .blue-view-actions {
    right: 3.125%;
    bottom: -52px;
  }
  .blue-display-page .blue-view-actions button {
    min-height: 40px;
    font-size: 12px;
  }
  .blue-display-page .blue-stage-empty button[data-display-pair] {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Phone control: temporary breaks keep the current blind clock. */
.mobile-break-controls { margin: 14px 0; padding: 14px; border: 1px solid #385c4c; border-radius: 12px; background: #14271f; }
.mobile-break-form { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 12px; }
.mobile-break-form label { color: #b5c8bd; font-size: 14px; }
.mobile-break-form input { margin-top: 8px; width: 100%; }
.mobile-break-controls .muted { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.mobile-break-controls [hidden], .mobile-level-form[hidden] { display: none !important; }

/* Real TV previews in the phone screen picker. */
.screen-preset-preview{aspect-ratio:16/9;min-height:0;display:block;background:#071426}.screen-preset-image{display:block;width:100%;height:100%;object-fit:contain}.screen-preset-preview[data-screen-preset="ivory"]{background:#f1efea}.screen-preset-preview[data-screen-preset="lounge"],.screen-preset-preview[data-screen-preset="pro"]{background:#111210}

/* A persistent phone field edits the live TV title without restarting its event. */
.mobile-name-form{margin:0 0 20px;padding:16px;border:1px solid #ffffff20;border-radius:12px;background:#ffffff05}
.mobile-name-form>label{display:block;margin-bottom:10px;color:#ffe0a3;font-size:16px;font-weight:700}
.mobile-name-fields{display:flex;gap:10px;align-items:stretch}
.mobile-name-fields input{flex:1;min-width:0;width:0}
.mobile-name-fields button{flex:0 0 auto;width:auto;white-space:nowrap;padding:12px 16px}
.mobile-name-form .muted{font-size:13px;line-height:1.5;margin:10px 0 0}
@media(max-width:360px){.mobile-name-fields{flex-direction:column}.mobile-name-fields input{width:100%}}

/* Customer logos stay transparent and disappear entirely until one is saved. */
.blue-display-page .blue-stage-badge[hidden],.tv-layout .tv-layout-logo[hidden]{display:none!important}
.blue-display-page .blue-stage-badge{object-fit:contain;background:transparent;border:0;box-shadow:none}
.branding-entry{display:flex;align-items:center;gap:16px;padding:16px;margin:0 0 24px;border:1px solid var(--line);border-radius:12px;background:#13291e}
.branding-entry>div{flex:1;min-width:0}.branding-entry h3{font-size:16px;margin:0 0 6px;color:#edf5ef}.branding-entry p{font-size:13px;line-height:1.6;color:#a8c1b1;margin:0}.branding-entry button{flex-shrink:0}
.mobile-branding-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-branding-heading h1{margin:0}
.branding-backdrop{position:fixed;inset:0;z-index:12000;background:#020b09c9;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
.branding-dialog{box-sizing:border-box;width:100%;max-width:460px;max-height:calc(100dvh - 32px);overflow:auto;background:#10251b;color:#edf6f0;border:1px solid #375646;border-radius:18px;padding:22px;box-shadow:0 12px 60px #0008}
.branding-dialog *{box-sizing:border-box}.branding-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.branding-dialog h2{margin:0;font-size:21px}.branding-dialog [data-branding-close]{border:0;background:transparent;color:#a8c5b7;font-size:28px;line-height:1;min-width:44px;min-height:44px;padding:6px}
.branding-help{font-size:14px;line-height:1.7;color:#b7cdbf;margin:12px 0 20px}.branding-preview{display:flex;align-items:center;justify-content:center;min-height:180px;border:1px dashed #668776;border-radius:12px;background:repeating-conic-gradient(#ffffff0b 0% 25%,transparent 0% 50%) 0 0/20px 20px;text-align:center;overflow:hidden;padding:16px}.branding-preview img{display:block;max-width:100%;height:160px;object-fit:contain}.branding-preview span{color:#becfc4;font-size:16px;line-height:1.7}.branding-preview small{font-size:13px;color:#88a494}
.branding-status{min-height:46px;margin:14px 0;font-size:14px;line-height:1.65;color:#88e0b3}.branding-status.is-error{color:#ffb4a5}.branding-actions{display:flex;flex-wrap:wrap;gap:10px}.branding-actions button{min-height:46px;flex:1;white-space:nowrap}.branding-dialog [hidden]{display:none!important}.branding-formats{font-size:12px;line-height:1.7;color:#91ac9d;margin:16px 0 0}.branding-dialog button:disabled{opacity:.55;cursor:wait}
@media(max-width:390px){.branding-dialog{padding:18px}.branding-entry{gap:10px;padding:12px}.branding-entry button{padding:8px}.branding-entry p{font-size:12px}}

/* Customer-wide blind structures: five named plans shared by every TV in one subsystem. */
.mobile-preset-section{padding-top:1.2rem}
.mobile-preset-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.mobile-preset-heading .mobile-section-title{margin:0 0 5px}.mobile-preset-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.mobile-preset-count{flex:0 0 auto;min-width:48px;padding:6px 10px;border-radius:999px;background:#183d2c;color:#8ff0bd;text-align:center;font-weight:750;font-variant-numeric:tabular-nums}
.mobile-preset-list{display:grid;gap:10px}
.mobile-preset-card{overflow:hidden;border:1px solid #315443;border-radius:12px;background:#0d1e16;transition:border-color .15s,box-shadow .15s}
.mobile-preset-card.is-selected{border-color:#6ee4ac;box-shadow:0 0 0 1px #6ee4ac40}
.mobile-preset-use{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name action" "meta action";width:100%;min-height:64px;padding:12px 14px;border:0;border-radius:0;background:transparent;text-align:left}
.mobile-preset-use:hover{background:#153023}.mobile-preset-name{grid-area:name;min-width:0;color:#f1f8f3;font-size:16px;font-weight:750;overflow-wrap:anywhere}.mobile-preset-meta{grid-area:meta;color:#91aa9b;font-size:12px;font-weight:500}.mobile-preset-use-label{grid-area:action;align-self:center;color:#7fe6b0;font-size:13px;white-space:nowrap}
.mobile-preset-actions{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #294838}
.mobile-preset-actions button{min-height:38px;padding:7px;border:0;border-right:1px solid #294838;border-radius:0;background:#10251b;color:#bcd1c4;font-size:12px}.mobile-preset-actions button:last-child{border-right:0}.mobile-preset-actions button:hover{background:#1a3527}.mobile-preset-actions button.danger{color:#ffb1a4}
.mobile-preset-empty{padding:18px;border:1px dashed #436553;border-radius:12px;color:#9db4a6;font-size:13px;line-height:1.65;text-align:center}
.mobile-preset-save{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:12px}.mobile-preset-save input{margin:0}.mobile-preset-save button{white-space:nowrap}.mobile-preset-save :disabled{opacity:.55;cursor:not-allowed}
@media(max-width:390px){.mobile-preset-save{grid-template-columns:1fr}.mobile-preset-save button{width:100%}}

/* Shared black and gold language for the control desk, phone and TV display. */
:root {
  --bg: #080807;
  --surface: #151411;
  --line: #3c3428;
  --text: #f6f2e9;
  --muted: #b7ad9e;
  --green: #dbb97e;
  --gold: #dbb97e;
  --red: #e8a09a;
}
body { background: var(--bg); }
a:hover { color: #f0d4a2; }
button,
.ghost-btn,
.primary-btn,
.danger-btn,
.plain-btn,
.icon-btn,
.orange-action {
  border-color: #534633;
  border-radius: 10px;
  background: #1b1915;
  color: #eee8dc;
  font-weight: 650;
  transition: background .18s ease, border-color .18s ease, color .18s ease,
    box-shadow .18s ease, transform .18s ease;
}
button:hover,
.ghost-btn:hover,
.icon-btn:hover { background: #29241c; border-color: #a7895b; color: #fff7e8; }
button:active,
.ghost-btn:active,
.primary-btn:active { transform: translateY(1px); }
.primary-btn,
button.primary,
.orange-action {
  border-color: #e2c18a;
  background: linear-gradient(135deg, #c69c5c, #e3c58b);
  color: #21190e;
  box-shadow: inset 0 1px #fff5d15c;
}
.primary-btn:hover,
button.primary:hover,
.orange-action:hover {
  border-color: #f1d69e;
  background: linear-gradient(135deg, #d4aa6d, #f0d49c);
  color: #17130d;
}
.plain-btn { border-color: transparent; background: transparent; color: #e9c68a; box-shadow: none; }
.plain-btn:hover { border-color: transparent; background: #d6ac6b16; color: #ffe3ae; }
.danger-btn,
button.danger,
.orange-action.danger {
  border-color: #79544d;
  background: #30211f;
  color: #ffd0c7;
  box-shadow: none;
}
.danger-btn:hover,
button.danger:hover,
.orange-action.danger:hover { border-color: #ad756d; background: #442b27; color: #ffe3da; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #f1d399;
  outline-offset: 3px;
}
.badge,
.status-pill,
.mobile-preset-count { border: 1px solid #735c37; background: #342a1b; color: #f1d49a; }
.badge.warn { background: #3b2c16; color: #f2d39a; }
.badge.danger { background: #3d2422; color: #ffc2b9; border-color: #73504c; }
.segmented .active,
.tabs .active,
.nav .active,
.mobile-tabs .active,
.mobile-console-tabs .active {
  border-color: #ad8851;
  background: #3b2e1c;
  color: #f4d69f;
}
.eyebrow { color: #daba81; }
.empty { color: #b8aea0; }
.topbar { border-color: #3e3426; background: #100f0d; }
.brand-mark { border: 1px solid #d9b778; background: #d1a968; color: #19130b; }
.brand-title { color: #fff5e5; }
.nav button:hover { border-color: #604b2e; background: #211a12; }
.card { border-color: #3f362a; background: #151411; box-shadow: inset 0 1px #ffffff08; }
.stat-icon { border-color: #6e5836; background: #2c2418; color: #e9c98f; }
.stat-value { color: #f9f2e5; }
.table-wrap { border-radius: 10px; }
tbody tr:hover { background: #cda7620b; }
th { color: #c9bba7; }
input,
select,
textarea {
  border-color: #514532;
  border-radius: 9px;
  background: #0e0d0b;
  color: #f8f2e7;
}
input::placeholder,
textarea::placeholder { color: #928778; }
input:hover,
select:hover,
textarea:hover { border-color: #8e754d; }
input:focus,
select:focus,
textarea:focus { border-color: #d8b77d; background: #12100d; }
input[type=checkbox],
input[type=radio],
input[type=range] { accent-color: #d8b77d; }
.setup-mark { border: 1px solid #715936; background: #352a1b; color: #f0cd90; }
.code-pill { color: #f3d69f; }
.display-toolbar,
.control-dock { border-color: #3d3428; background: #100f0d; }
.modal { border-color: #735c3f; background: #17140f; }
.modal-header { border-color: #4b3d2d; background: #17140f; }
.toast { border-color: #c19a5e; background: #241d13; color: #fff0d4; }
.mobile-shell { background: #0d0c0a; }
.mobile-console-top { border-color: #4c3b25; background: #18150f; }
.mobile-scoreboard { border-color: #6d522d; background: #17140e; }
.mobile-board-metric .val,
.mobile-adjust-label strong { color: #ecc98d; }
.mobile-console-tabs { background: #14120e; }
.mobile-structure-row { border-color: #544632; background: #19160f; }
.mobile-structure-row.is-break { border-color: #735a39; background: #2a2115; }
.mobile-break-controls { border-color: #70583b; background: #201a12; }
.mobile-break-form label { color: #c5b7a2; }
.screen-preset-content { border-color: #51432f; background: #1b1813; }
.screen-preset-card input:checked + .screen-preset-content {
  border-color: #ddb675;
  background: #392d1d;
  box-shadow: 0 0 0 1px #d9b3735c;
}
.screen-preset-card input:focus-visible + .screen-preset-content { outline-color: #f1d399; }
.screen-preset-image { border-radius: 5px; }
.screen-preset-caption { color: #d9b77c; }
.screen-more-settings > summary { color: #cfbd9e; }
.mobile-name-form { border-color: #5b4932; background: #1b1813; }
.mobile-name-form > label { color: #f0d39d; }
.branding-entry { border-color: #5c4930; background: #1d1912; }
.branding-entry h3 { color: #f8f1e4; }
.branding-entry p { color: #c0b29d; }
.branding-backdrop { background: #070604d9; }
.branding-dialog { border-color: #8c6c3c; background: #17140f; color: #f8f1e5; }
.branding-dialog [data-branding-close] { color: #d2bd9d; }
.branding-help { color: #c6b69c; }
.branding-preview { border-color: #866e4d; }
.branding-preview span { color: #d8c9af; }
.branding-preview small { color: #b39d7c; }
.branding-status { color: #ebca91; }
.branding-formats { color: #aa9980; }
.mobile-preset-card { border-color: #5b4c35; background: #16130e; }
.mobile-preset-card.is-selected { border-color: #dcb779; box-shadow: 0 0 0 1px #dcb77955; }
.mobile-preset-use:hover { background: #2a2117; }
.mobile-preset-name { color: #fbf3e5; }
.mobile-preset-meta { color: #baab94; }
.mobile-preset-use-label { color: #eac88c; }
.mobile-preset-actions { border-color: #54412a; }
.mobile-preset-actions button { border-color: #54412a; background: #211b13; color: #d6c8b4; }
.mobile-preset-actions button:hover { background: #322718; }
.mobile-preset-empty { border-color: #806b4a; color: #c4b69f; }

/* Keep the existing 16:9 TV geometry and large clock, with a dark gold picture. */
.stage { --metric-color: #e7c88f; --ante-color: #eac98b; }
.stage-metric { border-color: #d9b57836; }
.blind-labels,
.ante-line,
.next-level,
.stage-list-head { color: #c1b092; }
.stage-list-row.active { background: #614b2870; color: #f9dfaa; }
.blue-pairing-backdrop .modal.blue-pairing-modal { border-color: #a68049; background: #17130d; color: #f9ebd2; }
.blue-pairing-modal h3 { color: #fff2dd; }
.blue-pairing-modal p,
.blue-pairing-modal .blue-pair-url { color: #cbbb9f; }
.blue-pairing-modal button[data-close-pair] { border-color: #b9955c; background: #4c361b; color: #fff0d6; }
.blue-pairing-modal button[data-close-pair]:hover { border-color: #ebc88b; background: #604321; }
.blue-pairing-modal button[data-close-pair]:focus-visible { outline-color: #f1d399; }

@media(prefers-reduced-motion:reduce) {
  button,.ghost-btn,.primary-btn,.danger-btn,.plain-btn,.icon-btn,.orange-action { transition: none; }
}
