﻿:root{color-scheme:dark;--bg:#151716;--surface:#202321;--line:#383c38;--text:#f4f5ef;--muted:#aeb5aa;--lime:#d0ef77;--beer:#f0c361;--spritz:#96d7ce;--red:#ff9b91}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:16px;line-height:1.5;letter-spacing:0}button,input{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--lime);outline-offset:4px}a{color:inherit;text-decoration:none}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid transparent;border-radius:6px;font-weight:700;touch-action:manipulation}button:hover:not(:disabled){filter:brightness(1.13)}svg{width:20px;height:20px;flex-shrink:0;vertical-align:middle}h1,h2,p{margin:0}h1{font-size:36px;line-height:1.15;font-weight:800}h2{font-size:20px}input{width:100%;min-width:0;background:#191b19;color:var(--text);border:1px solid #535950;border-radius:6px;padding:12px 14px;min-height:48px}input::placeholder{color:#9ba393}label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}[hidden]{display:none!important}.site-header{min-height:94px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px max(28px,calc((100% - 1280px)/2))}.brand{display:flex;align-items:center;gap:13px;font-size:10px;font-weight:700;line-height:1.2}.brand strong{display:block;font-size:25px;margin-top:3px}.brand-mark{background:var(--lime);color:#202719;width:47px;height:47px;display:grid;place-items:center;transform:skew(-8deg);border-radius:3px}.brand-mark svg{width:27px;height:27px}.site-header nav{display:flex;gap:10px}.nav-link{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;color:var(--muted);font-size:14px;border-radius:5px}.nav-link.active{background:#30352a;color:var(--lime)}main{margin:auto;padding:38px 28px 0;max-width:1336px}.input-main{max-width:1056px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:8px 0 32px}.eyebrow{font-size:11px;color:var(--lime);font-weight:700;margin-bottom:12px}.heading-actions{display:flex;align-items:center;gap:18px}.connection{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);white-space:nowrap}.connection:before{content:"";width:7px;height:7px;background:currentColor;border-radius:50%;flex-shrink:0}.connection.online{color:var(--lime)}.connection.offline{color:var(--red)}.icon-button{width:46px;padding:0;background:transparent;border-color:var(--line);color:var(--text)}.totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-block:1px solid var(--line);margin-bottom:32px;padding:26px 0}.stat{display:flex;gap:16px;align-items:center;padding:0 26px;border-left:1px solid var(--line)}.stat:first-child{padding-left:0;border:0}.stat>svg{width:30px;height:30px;color:var(--muted)}.stat span{display:block;font-size:13px;color:var(--muted)}.stat strong{display:block;font-size:38px;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.beer>svg,.beer strong,.beer-text{color:var(--beer)}.spritz>svg,.spritz strong,.spritz-text{color:var(--spritz)}.section-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.section-toolbar h2{display:flex;align-items:center;gap:10px}.section-toolbar h2 svg{color:var(--lime)}.segmented{display:flex;background:#232622;padding:4px;border-radius:6px;border:1px solid var(--line)}.segmented button{min-height:36px;min-width:84px;padding:6px 14px;background:transparent;color:var(--muted);font-size:13px}.segmented button[aria-pressed=true]{background:var(--lime);color:#202719}.table-wrap{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}th{font-size:12px;color:var(--muted);font-weight:400;text-align:left;padding:12px 18px;border-bottom:1px solid #5a6351}th.position-col{width:88px}th.number{width:15%}.number{text-align:right;font-variant-numeric:tabular-nums}td{padding:21px 18px;border-bottom:1px solid var(--line);font-size:22px;font-weight:700;overflow-wrap:anywhere}td.team-cell{font-size:22px}td.position{color:var(--muted);font-size:17px;font-weight:400}tr.leader{background:#262d21}tr.leader td.position{color:var(--lime);font-weight:800}tr.leader td:first-child{box-shadow:inset 3px 0 var(--lime)}td.total-cell{color:var(--lime);font-size:29px}.empty-state{padding:56px 16px;text-align:center;color:var(--muted)}.empty-state>svg{width:36px;height:36px;color:var(--lime);margin-bottom:18px}.empty-state h2{font-size:19px}footer{margin-top:32px;min-height:84px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:11px;color:var(--muted)}.footer-dot{margin:0 10px;color:var(--lime)}footer a{display:flex;align-items:center;gap:4px}.demo-banner{background:#d0ef77;color:#202719;padding:9px 14px;border-radius:4px;margin-bottom:24px;font-size:13px;font-weight:700}.error-banner{border-left:3px solid var(--red);background:#362522;color:#ffd1ca;padding:14px 18px;margin-bottom:24px;overflow-wrap:anywhere}.primary{background:var(--lime);color:#202719;padding:10px 20px}.secondary{background:var(--surface);border-color:var(--line);color:var(--text);padding:10px 16px}.danger{color:var(--red)}.text-button{padding:4px 0;background:transparent;color:var(--muted);font-size:13px}.login-section{max-width:390px;margin:60px auto 90px}.login-icon{width:32px;height:32px;color:var(--lime);margin-bottom:16px}.login-section h2{margin-bottom:26px}.login-section input{margin-bottom:20px}.login-section button{width:100%;margin-top:4px}.error-text{color:var(--red);margin-top:14px;font-size:14px}.session-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;color:var(--muted);border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:24px}.session-bar>span{overflow-wrap:anywhere;min-width:0}.team-form{display:flex;align-items:flex-end;gap:14px;padding-bottom:30px;border-bottom:1px solid var(--line);margin-bottom:30px}.team-form>div{flex:1}.team-form button{min-height:49px}.search{position:relative;max-width:280px}.search svg{position:absolute;top:14px;left:12px;color:var(--muted)}.search input{padding-left:40px;font-size:14px}.small-count{color:var(--muted);font-size:14px;font-weight:400}.team-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.team-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:20px}.team-card header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:22px}.team-card h3{margin:0;font-size:20px;overflow-wrap:anywhere;min-width:0}.team-tools{display:flex;flex-shrink:0;gap:2px}.team-tools .icon-button{width:38px;min-height:40px;border:0;color:var(--muted)}.drink-row+.drink-row{margin-top:18px}.drink-label{display:flex;align-items:center;justify-content:space-between;font-size:14px;margin-bottom:10px}.drink-label span{display:flex;align-items:center;gap:8px}.drink-label strong{font-size:24px;font-variant-numeric:tabular-nums}.drink-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.drink-controls button{min-height:54px;padding-inline:6px;white-space:nowrap}.drink-controls .minus,.drink-controls .batch{background:#2b2f2a;border-color:#495044;color:var(--text)}.drink-controls .add-beer{background:var(--beer);color:#282215;font-size:19px}.drink-controls .add-spritz{background:var(--spritz);color:#142c28;font-size:19px}.management{margin-top:30px;border-top:1px solid var(--line);padding-top:20px}.management summary{cursor:pointer;font-size:14px;color:var(--muted);padding:10px 0}.management-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--lime);color:#202719;box-shadow:0 6px 30px #0005;border-radius:6px;padding:14px 22px;max-width:calc(100% - 32px);width:max-content;z-index:100;overflow-wrap:anywhere;font-weight:700}.toast.error{background:#ffb2a7;color:#3b1813}dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:28px;width:440px;max-width:calc(100% - 32px)}dialog::backdrop{background:#000a}dialog p{color:var(--muted);margin:14px 0 22px;overflow-wrap:anywhere}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}noscript{display:block;text-align:center;padding:20px;color:var(--red)}
@media(min-width:1700px){.display-main{max-width:1656px}.display-main td{padding-block:27px;font-size:28px}.display-main td.total-cell{font-size:34px}.display-main h1{font-size:44px}}
@media(max-width:760px){.site-header{padding:16px 20px;gap:14px;min-height:80px}.brand-mark{width:35px;height:39px}.brand{gap:10px;font-size:9px}.brand strong{font-size:20px}.nav-link{padding:8px 10px}.nav-link span{display:none}main{padding:24px 20px 0}h1{font-size:29px}.page-heading{align-items:flex-start;flex-wrap:wrap;gap:18px;margin-bottom:26px}.heading-actions{width:100%;justify-content:space-between}.totals{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:24px;padding:22px 0}.stat{padding:0 16px;gap:12px}.stat:nth-child(3){border:0;padding-left:0}.stat strong{font-size:31px}.stat span{font-size:12px}.stat>svg{width:24px;height:24px}.section-toolbar{align-items:flex-start;flex-direction:column;gap:16px}.segmented{width:100%}.segmented button{flex:1;min-width:0}th,td{padding:15px 7px}th{font-size:11px}th.position-col{width:40px}th.number{width:18%}td,td.team-cell{font-size:15px}td.total-cell{font-size:21px}td.position{font-size:13px}footer{flex-wrap:wrap;justify-content:flex-start;gap:10px;padding:20px 0}.team-form{flex-direction:column;align-items:stretch}.team-form>div{width:100%}.team-list{grid-template-columns:1fr}.input-toolbar{flex-direction:row;align-items:center;gap:12px}.search{max-width:210px;min-width:0}.input-toolbar h2{flex-shrink:0}.team-card{padding:18px}.login-section{margin:30px auto 50px}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background .15s,filter .15s}.toast{animation:appear .15s ease-out}@keyframes appear{from{opacity:0}to{opacity:1}}}

/* TV landscape mode: keep the live board within the visible Fire TV viewport. */
@media (min-width: 700px) and (orientation: landscape) and (max-height: 1200px) {
  body[data-page="display"] .site-header { min-height: 66px; padding-block: 10px; }
  body[data-page="display"] .brand-mark { width: 38px; height: 38px; }
  body[data-page="display"] .brand strong { font-size: 22px; }
  body[data-page="display"] main { padding-top: 20px; }
  body[data-page="display"] .page-heading { margin: 0 0 16px; }
  body[data-page="display"] h1 { font-size: 34px; }
  body[data-page="display"] .eyebrow { margin-bottom: 6px; }
  body[data-page="display"] .totals { padding-block: 14px; margin-bottom: 16px; }
  body[data-page="display"] .stat { padding-inline: 18px; gap: 10px; }
  body[data-page="display"] .stat strong { font-size: 29px; }
  body[data-page="display"] .section-toolbar { margin-bottom: 10px; }
  body[data-page="display"] .split-ranking { gap: 20px; }
  body[data-page="display"] .split-board td { padding-block: 9px; font-size: 16px; }
  body[data-page="display"] .split-board td.total-cell { font-size: 20px; }
  body[data-page="display"] th { padding-block: 7px; }
  body[data-page="display"] footer { min-height: 44px; margin-top: 14px; }
}

@media (min-width: 700px) and (orientation: landscape) and (max-height: 800px) {
  body[data-page="display"] .site-header nav,
  body[data-page="display"] footer { display: none; }
  body[data-page="display"] .site-header { min-height: 54px; }
  body[data-page="display"] main { padding-top: 12px; }
  body[data-page="display"] .page-heading { margin-bottom: 9px; }
  body[data-page="display"] h1 { font-size: 29px; }
  body[data-page="display"] .totals { padding-block: 8px; margin-bottom: 10px; }
  body[data-page="display"] .stat strong { font-size: 24px; }
  body[data-page="display"] .stat span { font-size: 11px; }
  body[data-page="display"] .split-board td { padding-block: 5px; }
}

@media (min-width: 700px) and (orientation: landscape) and (max-height: 600px) {
  body[data-page="display"] .demo-banner { display: none; }
  body[data-page="display"] .site-header { min-height: 45px; padding-block: 5px; }
  body[data-page="display"] .brand-mark { width: 30px; height: 30px; }
  body[data-page="display"] .brand strong { font-size: 18px; }
  body[data-page="display"] main { padding: 7px 16px 0; }
  body[data-page="display"] .page-heading { margin-bottom: 5px; }
  body[data-page="display"] h1 { font-size: 24px; }
  body[data-page="display"] .eyebrow { margin-bottom: 2px; font-size: 9px; }
  body[data-page="display"] .totals { padding-block: 5px; margin-bottom: 6px; }
  body[data-page="display"] .stat { padding-inline: 10px; gap: 5px; }
  body[data-page="display"] .stat>svg { width: 19px; height: 19px; }
  body[data-page="display"] .stat strong { font-size: 20px; }
  body[data-page="display"] .stat span { font-size: 10px; }
  body[data-page="display"] .section-toolbar h2 { font-size: 18px; }
  body[data-page="display"] .split-board h3 { font-size: 14px; margin-bottom: 2px; }
  body[data-page="display"] .split-board h3 svg { width: 16px; height: 16px; }
  body[data-page="display"] th { padding-block: 3px; font-size: 10px; }
  body[data-page="display"] .split-board td { padding-block: 3px; font-size: 13px; }
  body[data-page="display"] .split-board td.total-cell { font-size: 16px; }
}

/* Tablet portrait mode: keep every team on one compact row. */
@media (min-width: 600px) and (max-width: 1100px) {
  .input-main .team-list { grid-template-columns: 1fr; gap: 8px; }
  .input-main .team-card { display: grid; grid-template-columns: minmax(120px, .85fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 10px; }
  .input-main .team-card header { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 0; min-width: 0; }
  .input-main .team-card h3 { font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .input-main .team-tools { justify-content: flex-end; margin-top: 0; }
  .input-main .team-tools .icon-button { width: 28px; min-height: 28px; }
  .input-main .drink-row, .input-main .drink-row + .drink-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 5px; margin-top: 0; min-width: 0; }
  .input-main .drink-label { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
  .input-main .drink-label span { font-size: 11px; line-height: 1.1; }
  .input-main .drink-label span svg { width: 14px; height: 14px; }
  .input-main .drink-label strong { font-size: 18px; line-height: 1.1; }
  .input-main .drink-controls { gap: 5px; }
  .input-main .drink-controls button { min-height: 36px; font-size: 12px; }
  .input-main .drink-controls .add-beer, .input-main .drink-controls .add-spritz { font-size: 15px; }
}

/* Optional event display mode: separate drink leaderboards. */
.split-ranking{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px}.split-board{min-width:0}.split-board h3{display:flex;align-items:center;gap:10px;margin:0 0 8px;font-size:18px}.split-board h3 svg{width:21px;height:21px}.beer-board h3{color:var(--beer)}.spritz-board h3{color:var(--spritz)}.split-board table{border-top:1px solid var(--line)}.split-board td{font-size:19px;padding-block:16px}.split-board td.total-cell{font-size:25px}
@media(max-width:760px){.split-ranking{grid-template-columns:1fr;gap:28px}.split-board td{font-size:15px}.split-board td.total-cell{font-size:21px}}
