/* Site look: late-night diner meets card room.
   Loaded after theme.css on pages that put class="diner" on <html>; every
   rule here is scoped to it. The clock, buy-in and seat draw don't load it.

   - Public pages (home, leaderboard, rules, next game, live tournament):
     plain class="diner" -- always the diner palette, whatever member
     theme the visitor picked in the portal.
   - Portal and its embedded tabs (stats, action, jukebox): class="diner
     diner-themed" -- the diner palette only for the default midnight-navy
     theme; poker-green and sand keep their own colors and just pick up the
     type.

   Keeps the site's original midnight navy; the accents come from the logo:
   toast cream, egg yolk, card red. The one loud element is the order
   ledger (standings); everything else stays quiet navy. */

html.diner{
  --red:#b02832;             /* fills: live pill, alerts */
  --on-accent:#21180a;
  --paper:#f6ebd0;
  --font-display:'Shrikhand',Georgia,serif;
  --font-body:'Public Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

html.diner:not(.diner-themed),
html.diner:not(.diner-themed)[data-theme],
html.diner.diner-themed:not([data-theme]),
html.diner.diner-themed[data-theme="midnight-navy"]{
  --bg:#00162a;
  --card:#0a2740;
  --card-line:#1a3c5c;
  --card-raised:#0f3150;
  --card-muted:#082238;
  --control-bg:#031424;
  --ink:#f3ead6;
  --ink-dim:#a9b8c6;
  --felt-green:#f2b632;      /* legacy name, now the yolk accent */
  --gold:#f2b632;
  --silver:#d6dbe0;
  --bronze:#e0a468;
  --danger:#f08a8e;          /* text-safe red on navy */
  --accent-rgb:242,182,50;
  color-scheme:dark;
}

/* ---- Type: one body family, display face for titles only ---- */
html.diner body,
html.diner body *{
  font-family:var(--font-body) !important;
  text-transform:none !important;
  letter-spacing:normal !important;
}
html.diner body{font-variant-numeric:tabular-nums; -webkit-font-smoothing:antialiased;}
html.diner h1{
  font-family:var(--font-display) !important;
  font-weight:400 !important;
  font-size:clamp(34px, 6vw, 50px) !important;
  line-height:1.05;
  color:var(--ink);
  text-wrap:balance;
}
html.diner h2{font-weight:700 !important; font-size:18px !important;}
/* Section labels that sat above every heading said nothing the heading
   didn't -- gone. */
html.diner .eyebrow{display:none !important;}

html.diner a:focus-visible,
html.diner button:focus-visible,
html.diner select:focus-visible,
html.diner input:focus-visible,
html.diner label:focus-visible{
  outline:2px solid var(--gold); outline-offset:2px;
}

/* ---- Nav ---- */
html.diner .site-nav .brand{
  font-family:var(--font-display) !important;
  font-weight:400; font-size:21px; color:var(--gold);
}
html.diner .site-nav .links a{font-size:14px; font-weight:600;}
html.diner .site-nav .links a.active{color:var(--gold); border-bottom-color:var(--gold);}

/* Everything below is for the public pages' own layouts -- the portal
   reuses some of these class names (.submit-btn, .row, .card-head ...) with
   different markup, so none of it reaches .diner-themed pages. */
/* ---- Buttons that sat on lime ---- */
html.diner:not(.diner-themed) .submit-btn,
html.diner:not(.diner-themed) .live-banner-link{color:var(--on-accent) !important;}

/* ---- Bookie's ledger (standings on home + leaderboard) ----
   An old book of accounts: aged paper, blue-gray ruled lines, double red
   ink rules framing the rank and points columns, names and tallies written
   in by hand. The column rules are drawn on each row's background so they
   run unbroken down the page without depending on the header's height. */
html.diner:not(.diner-themed) .ticket{
  --ledger-paper:#efe3c2;
  --ledger-ink:#1f2a44;      /* iron-gall blue-black */
  --ledger-red:#9c1f28;
  --ledger-green:#2f5d3a;
  --ledger-rule:rgba(70,110,140,.42);
  --ledger-dim:#5d5446;
  --ledger-rank:40px;
  --ledger-pts:76px;
  position:relative;
  color:var(--ledger-ink);
  background:
    radial-gradient(ellipse at 88% 8%, rgba(150,105,45,.20), transparent 42%),
    radial-gradient(ellipse at 6% 96%, rgba(120,80,30,.16), transparent 48%),
    linear-gradient(90deg, rgba(60,40,20,.22), transparent 18px),
    var(--ledger-paper);
  border:1px solid #c6b085;
  border-radius:2px 6px 6px 2px;
  box-shadow:0 1px 0 #dccaa0, 0 2px 0 #c7b385, 0 3px 0 #e3d3ac, 0 4px 0 #c2ad80, 0 18px 34px rgba(0,0,0,.45);
  padding:20px 22px 22px;
}
html.diner:not(.diner-themed) .ticket-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding-bottom:8px; margin-bottom:2px;
  border-bottom:3px double var(--ledger-red);
}
html.diner:not(.diner-themed) .ticket-head h2{
  margin:0; color:var(--ledger-ink);
  font-family:'IM Fell English SC',Georgia,serif !important;
  font-weight:400 !important; font-size:25px !important;
}
html.diner:not(.diner-themed) .ticket-head .ticket-meta{
  font-family:'IM Fell English',Georgia,serif !important;
  font-style:italic; font-size:15px; color:var(--ledger-dim);
}
html.diner:not(.diner-themed) .ticket a{color:var(--ledger-ink);}

/* shared row ruling: blue line under each entry, red double rules after
   the rank column and before the points column */
html.diner:not(.diner-themed) .ticket .rn-top3-row,
html.diner:not(.diner-themed) .ticket #mainBoard .row{
  border-top:none; border-bottom:1px solid var(--ledger-rule); border-radius:0;
  background:
    linear-gradient(90deg, transparent calc(var(--ledger-rank) + 2px), var(--ledger-red) 0 calc(var(--ledger-rank) + 3px), transparent 0 calc(var(--ledger-rank) + 5px), var(--ledger-red) 0 calc(var(--ledger-rank) + 6px), transparent 0) no-repeat,
    linear-gradient(270deg, transparent calc(var(--ledger-pts) + 4px), var(--ledger-red) 0 calc(var(--ledger-pts) + 5px), transparent 0 calc(var(--ledger-pts) + 7px), var(--ledger-red) 0 calc(var(--ledger-pts) + 8px), transparent 0) no-repeat;
  background-size:100% 100%;
}
html.diner:not(.diner-themed) .ticket .rn-top3-rank,
html.diner:not(.diner-themed) .ticket #mainBoard .rank{
  font-family:'IM Fell English',Georgia,serif !important;
  font-variant-numeric:oldstyle-nums;
  color:var(--ledger-red); font-weight:400; font-size:19px; text-align:center;
}
html.diner:not(.diner-themed) .ticket .rn-top3-name,
html.diner:not(.diner-themed) .ticket #mainBoard .name{
  font-family:'Caveat','Segoe Print',cursive !important;
  color:var(--ledger-ink); font-weight:600; font-size:25px; line-height:1.1;
}
html.diner:not(.diner-themed) .ticket .rn-top3-pts,
html.diner:not(.diner-themed) .ticket #mainBoard .pts{
  font-family:'Caveat','Segoe Print',cursive !important;
  color:var(--ledger-ink); font-weight:700; font-size:27px; line-height:1; text-align:right;
}

/* home: three-line extract of the book */
html.diner:not(.diner-themed) .rightnow.ticket{margin-top:52px;}
html.diner:not(.diner-themed) .rightnow .rn-top3{margin-bottom:16px;}
html.diner:not(.diner-themed) .rightnow .rn-top3-row{padding:6px 0;}
html.diner:not(.diner-themed) .rightnow .rn-top3-row:last-child{border-bottom:1px solid var(--ledger-rule);}
html.diner:not(.diner-themed) .rightnow .rn-top3-rank{width:var(--ledger-rank); flex:0 0 var(--ledger-rank);}
html.diner:not(.diner-themed) .rightnow .rn-top3-name{padding-left:16px;}
html.diner:not(.diner-themed) .rightnow .rn-top3-pts{flex:0 0 var(--ledger-pts);}
html.diner:not(.diner-themed) .rightnow .rn-top3-row.first{background-color:transparent; padding-left:0; padding-right:0;}
html.diner:not(.diner-themed) .rightnow .rn-top3-row .rn-skel.name{margin-left:16px;}
html.diner:not(.diner-themed) .rightnow .rn-skel{background:var(--ledger-rule);}
html.diner:not(.diner-themed) .rightnow .prog-track{background:transparent; border:1px solid var(--ledger-ink); border-radius:0; height:12px;}
/* pencil hatching for the share of the season already played */
html.diner:not(.diner-themed) .rightnow .prog-fill{background:repeating-linear-gradient(-45deg, var(--ledger-ink) 0 1.5px, transparent 1.5px 5px);}
html.diner:not(.diner-themed) .rightnow .prog-fill span{display:none;}
html.diner:not(.diner-themed) .rightnow .prog-meta,
html.diner:not(.diner-themed) .rightnow .prog-meta *{
  font-family:'Caveat','Segoe Print',cursive !important;
  color:var(--ledger-dim); font-size:19px; margin-top:6px;
}
html.diner:not(.diner-themed) .rightnow .rn-loading{color:var(--ledger-dim);}

/* ---- Home ---- */
html.diner:not(.diner-themed) .hero img{max-width:240px;}
html.diner:not(.diner-themed) .tagline{color:var(--ink); opacity:.88; font-size:17px; line-height:1.65;}
html.diner:not(.diner-themed) .tagline strong{color:var(--gold);}

html.diner:not(.diner-themed) .live-banner{
  background:var(--card); border:1px solid var(--red); border-left:6px solid var(--red);
}
html.diner:not(.diner-themed) .live-banner-pill{background:var(--red); color:var(--paper) !important;}

html.diner:not(.diner-themed) .connect h2{font-size:15px !important; font-weight:600 !important; color:var(--ink-dim);}
html.diner:not(.diner-themed) .social-btn:hover{border-color:var(--gold);}
html.diner:not(.diner-themed) .footnote p{font-size:13px; color:var(--ink-dim);}
html.diner:not(.diner-themed) .footnote a:hover{color:var(--gold); text-decoration-color:var(--gold);}

/* ---- Leaderboard ---- */
/* ---- Leaderboard: the full book ---- */
html.diner:not(.diner-themed) .board.ticket{padding:20px 22px 26px;}
html.diner:not(.diner-themed) #mainBoard .row{padding:7px 0; gap:16px; grid-template-columns:var(--ledger-rank) 1fr var(--ledger-pts);}
html.diner:not(.diner-themed) #mainBoard .row:last-child{border-bottom:none;}
html.diner:not(.diner-themed) #mainBoard .row.top1,
html.diner:not(.diner-themed) #mainBoard .row.top2,
html.diner:not(.diner-themed) #mainBoard .row.top3{background-color:transparent;}
html.diner:not(.diner-themed) #mainBoard .row .rank,
html.diner:not(.diner-themed) #mainBoard .row .name{color:var(--ledger-ink);}
html.diner:not(.diner-themed) #mainBoard .row .rank{color:var(--ledger-red);}
html.diner:not(.diner-themed) #mainBoard .crown path{fill:var(--ledger-red);}
html.diner:not(.diner-themed) #mainBoard .pts{padding-right:4px;}
html.diner:not(.diner-themed) #mainBoard .pts-label{display:none;}
html.diner:not(.diner-themed) #mainBoard .move{
  font-family:'Caveat','Segoe Print',cursive !important;
  font-weight:700; font-size:19px;
}
html.diner:not(.diner-themed) #mainBoard .move-up{color:var(--ledger-green);}
html.diner:not(.diner-themed) #mainBoard .move-down{color:var(--ledger-red);}
html.diner:not(.diner-themed) #mainBoard .move-flat{color:var(--ledger-dim);}
html.diner:not(.diner-themed) #mainBoard .move-new{color:#7a4f00;}
html.diner:not(.diner-themed) #mainBoard .loading,
html.diner:not(.diner-themed) #mainBoard .empty{color:var(--ledger-dim);}
html.diner:not(.diner-themed) #mainBoard .error{color:var(--ledger-red);}
html.diner:not(.diner-themed) .ls-pts{color:var(--ink);}
html.diner:not(.diner-themed) .ls-pts .bonus{color:var(--gold);}

/* ---- Rules: one display title per page, the rest plain ---- */
html.diner:not(.diner-themed) .rules-section + .rules-section h1{
  font-family:var(--font-body) !important;
  font-weight:800 !important;
  font-size:26px !important;
}
html.diner:not(.diner-themed) .side .buy-head{background:var(--card-raised); color:var(--ink); border-bottom:1px solid var(--card-line);}
html.diner:not(.diner-themed) .featured .buy-head{background:var(--gold); color:var(--on-accent);}
html.diner:not(.diner-themed) .buy-total,
html.diner:not(.diner-themed) .tier-price{font-weight:800;}
html.diner:not(.diner-themed) table.schedule th{color:var(--on-accent);}
html.diner:not(.diner-themed) table.schedule td.level{color:var(--gold); font-weight:700;}
html.diner:not(.diner-themed) tr.break-row td{background:rgba(242,182,50,.10); border-color:rgba(242,182,50,.35);}

/* ---- Live tournament empty state ---- */
html.diner:not(.diner-themed) .lt-next{
  max-width:460px; margin:28px auto 0; text-align:center;
  background:var(--card); border:1px solid var(--card-line); border-radius:10px; padding:26px 22px;
}
html.diner:not(.diner-themed) .lt-next p{margin:0 0 18px; color:var(--ink); font-size:16px; line-height:1.6;}
html.diner:not(.diner-themed) .lt-next a{
  display:inline-block; background:var(--gold); color:var(--on-accent); text-decoration:none;
  font-weight:700; font-size:15px; padding:11px 20px; border-radius:8px;
}

@media (prefers-reduced-motion:reduce){
  html.diner .rn-skel{animation:none;}
}
