/* HEAT's look ("Ember") for its PC games: the lobby's PC games band, a PC game's room and tables,
   and their dialogs. Everything is under `.heat` (body.heat on HEAT's screens, which app.js sets; the
   band and HEAT's dialogs carry it themselves), so the rest of Kibitz keeps its green. Kept apart
   from app.css, with its own font, so HEAT can move to a site of its own. */

/* Chakra Petch (SIL Open Font License 1.1, OFL.txt beside it), Latin, for HEAT's headings. */
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 500; font-display: swap; src: url("chakra-petch-500.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("chakra-petch-600.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("chakra-petch-700.woff2") format("woff2"); }

/* Ember's colors, and Kibitz's own names for them, so the page's panels, buttons, and chat follow. */
.heat {
  --h-ground: #120e0d; --h-bar: #1a1110; --h-panel: #1d1715; --h-raised: #2a1c17; --h-line: #3a2b26; --h-line2: #4a3830;
  --h-text: #efe6df; --h-muted: #a8968c; --h-dim: #9a877e; --h-accent: #ff6b2c; --h-on-accent: #1a0d08; --h-gold: #ffd84a;
  --h-tokens: #f2c14e; --h-link: #8fb8d8; --h-warm: #f0a46e; --h-cream: #fff3d6; --h-soft: #c8b6a6; --h-hot: #5a2a1c;
  --h-ember: #a8562f; --h-green: #5fc98d; --h-red: #f08a8a;
  --paper: var(--h-ground); --card: var(--h-panel); --line: var(--h-line); --ink: var(--h-text); --muted: var(--h-muted);
  --accent: var(--h-link); --gold: var(--h-tokens); --gold2: var(--h-gold); --felt: var(--h-accent); --felt2: var(--h-accent);
  --danger: var(--h-red); --shadow: none;
  color-scheme: dark;
  color: var(--h-text);
}
.heat h1, .heat h2, .heat h3, .heat .heat-mark { font-family: "Chakra Petch", system-ui, sans-serif; }
.heat a { color: var(--h-link); }
.heat a:hover { color: #bcd6ea; }
.heat .up { color: var(--h-green); }
.heat .button:hover:not(:disabled) { border-color: var(--h-accent); }
.heat .button.primary { background: var(--h-accent); color: var(--h-on-accent); border-color: transparent; box-shadow: none; }
.heat .badge.rated { border-color: var(--h-ember); color: var(--h-warm); background: transparent; }
.heat .chat-log .line .from { color: #8fd3ff; }
.heat .chat-log .line.mine .from { color: var(--h-tokens); }
.heat .chat-input { background: var(--h-ground); }

/* HEAT's screens: the page, and the site's bar in Ember, with HEAT's mark by Kibitz's name. */
body.heat { background: var(--h-ground); }
body.heat #topbar { background: var(--h-bar); border-bottom: 3px solid var(--h-accent); box-shadow: 0 1px 0 #ffc93c; }
body.heat .brand { display: inline-flex; align-items: center; gap: 10px; text-shadow: none; }
body.heat .brand > span { display: none; }
body.heat .brand::after { content: "HEAT"; font-family: "Chakra Petch", system-ui, sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .14em;
                          padding: 1px 8px; border-radius: 4px; background: var(--h-accent); color: var(--h-on-accent); }
body.heat #crumbs a, body.heat #crumbs span { color: #d6c8bf; }
body.heat #me .avatar { display: none; }
body.heat .token-chip { background: var(--h-raised); border-color: transparent; color: var(--h-tokens); font-weight: 800; }
body.heat .nav-badges { background: var(--h-raised); border-color: transparent; }
body.heat h1 .emoji { display: none; }

/* Initials in a colored circle: HEAT's avatars. */
.heat-avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
               font-size: 13px; font-weight: 800; background: var(--avatar, #d6c8bf); color: #1a0d08; }
.heat-avatar.small { width: 20px; height: 20px; font-size: 11px; }
.heat .seat .tag.heat-title { color: var(--h-warm); }
.heat-muted { color: var(--h-muted); font-size: 13px; }

/* The game's tile: its letters on its color ("D3D"). */
.heat-tile { width: 52px; height: 52px; flex: none; border-radius: 8px; background: #d8412f; display: flex; align-items: center; justify-content: center;
             color: var(--h-gold); font-weight: 900; font-size: 20px; letter-spacing: -.02em; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.heat-tile.big { width: 56px; height: 56px; font-size: 22px; }

/* The lobby's PC games band, under the Game Room's own games. */
.heat-band { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; padding: 18px 20px 20px; border-radius: 10px;
             background: var(--h-ground); border-top: 3px solid var(--h-accent); box-shadow: 0 -1px 0 #ffc93c; }
.heat-band-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.heat-band-head h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: .08em; color: var(--h-text); }
.heat-mark { font-weight: 700; font-size: 14px; letter-spacing: .14em; padding: 1px 8px; border-radius: 4px; background: var(--h-accent); color: var(--h-on-accent); }
.heat-band-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.heat-feature { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 10px;
                background: linear-gradient(100deg, #3a1610, #1f1411 70%); border: 1px solid var(--h-hot); }
.heat-feature-top { display: flex; gap: 14px; align-items: center; }
.heat-feature-top > div:last-child { flex: 1; min-width: 0; }
.heat-feature h3 { font-size: 18px; color: var(--h-cream); }
.heat-feature p { margin-top: 2px; font-size: 13px; color: var(--h-soft); }
.heat-feature-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.heat-counts { flex: 1; font-size: 13px; color: #f0d9c4; }
.heat-your-title { font-size: 13px; color: var(--h-warm); }
.heat .heat-enter { padding: 7px 14px; border-radius: 9px; background: var(--h-gold); color: #3a1610; font-weight: 800; text-decoration: none; white-space: nowrap; }
.heat .heat-enter:hover { color: #3a1610; filter: brightness(1.06); }
.heat .heat-enter.small { align-self: flex-start; margin-top: auto; padding: 5px 12px; font-size: 13px; }
.heat-shelf { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 10px; background: var(--h-panel); border: 1px solid var(--h-line); }
.heat-shelf p { font-size: 13px; color: var(--h-muted); }
.heat-tag { margin-top: auto; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px;
            border: 1px solid var(--h-line2); color: var(--h-muted); }

/* A PC game's room: the banner and the match tables, and beside them who's here and the chat. */
.heat-room { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.heat-room-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.heat-room-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 72px; }
.heat-banner { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 10px;
               background: linear-gradient(100deg, #3a1610, #1f1411 60%, #14110f); border: 1px solid var(--h-hot); }
.heat-banner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.heat-banner h1 { font-size: 24px; color: var(--h-cream); }
.heat-banner-body span { font-size: 13px; color: var(--h-soft); }
.heat-start { flex: none; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--h-gold); color: #3a1610;
              font-weight: 800; box-shadow: 0 3px 0 #a8871a; cursor: pointer; }
.heat-start:disabled { opacity: .5; cursor: default; }
.heat-section-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.heat-section-bar .heat-muted { font-size: 12px; }
.heat-tables { display: flex; flex-direction: column; gap: 10px; }
.heat-empty { padding: 28px 16px; text-align: center; border-radius: 10px; background: var(--h-panel); border: 1px dashed var(--h-line); color: var(--h-muted); }
.heat-empty b { color: var(--h-text); }
.heat-table { display: grid; grid-template-columns: 210px minmax(0, 1fr) 150px; gap: 16px; align-items: center; padding: 14px 16px;
              border-radius: 8px; background: var(--h-panel); border: 1px solid var(--h-line); }
.heat-table.mine { border-color: var(--h-tokens); }
.heat-table-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; color: #d6c8bf; }
.heat-table-what .heat-muted { font-size: 12px; }
.heat .heat-table-name { font-weight: 700; font-size: 16px; color: var(--h-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat .heat-table-name:hover { color: var(--h-text); text-decoration: underline; }
.heat-table-seats { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.heat-seat-row { display: flex; gap: 6px; flex-wrap: wrap; }
.heat-seat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: inherit; font-size: 13px;
             background: var(--h-raised); border: 1px solid var(--h-line); color: var(--h-text); }
.heat-seat.me { background: rgba(242,193,78,.12); border-color: var(--h-tokens); }
.heat-seat.open { background: transparent; border-color: var(--h-line2); color: var(--h-dim); }
button.heat-seat { cursor: pointer; }
button.heat-seat:hover { border-color: var(--h-accent); color: var(--h-text); }
.heat-note { font-size: 12px; color: var(--h-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat-note.hot { color: var(--h-warm); }
.heat-table-act { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.heat-state { align-self: flex-end; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px;
              background: #18232c; color: var(--h-link); }
.heat-state.playing { background: #3a1a12; color: #ffb08a; }
.heat-state.private { background: #1f1f2a; color: #b7b9e8; }
.heat .heat-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; border-radius: 9px;
                     border: 1px solid var(--h-accent); background: var(--h-accent); color: var(--h-on-accent); font: inherit; font-size: 14px;
                     font-weight: 700; cursor: pointer; text-decoration: none; }
.heat .heat-action.quiet { background: transparent; border-color: var(--h-line2); color: var(--h-text); }
.heat .heat-action.quiet:hover:not(:disabled) { border-color: var(--h-accent); }
.heat .heat-action:disabled { opacity: .6; cursor: default; }
.heat-needs { padding: 10px 14px; border-radius: 10px; background: #171210; border: 1px dashed var(--h-line); font-size: 13px; color: var(--h-muted); }
.heat-needs b { color: var(--h-text); }
.heat-people { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 10px; background: var(--h-panel); border: 1px solid var(--h-line); }
.heat-people .heat-section-bar { margin-bottom: 4px; }
.heat-people-list { display: flex; flex-direction: column; gap: 3px; max-height: 420px; overflow: auto; }
.heat-person { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 9px; border: 1px solid transparent; }
.heat-person.me { background: rgba(242,193,78,.1); border-color: var(--h-tokens); }
.heat-person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.heat-person .who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-person .note { font-size: 12px; color: var(--h-muted); }
.heat-person.me .note { color: var(--h-tokens); }
.heat-person.playing .note { color: var(--h-warm); }
.heat-person .rank { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.heat-person .rank b { font-variant-numeric: tabular-nums; }
.heat-person .rank span { font-size: 11px; color: var(--h-warm); }

/* A PC game's table: the board's frame gives way to Duke's own panels. */
.heat .board-wrap.duke-frame { display: block; padding: 0; background: none; border: 0; box-shadow: none; }
.heat .duke-frame .board-host { max-width: none; display: block; }
.duke { display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.duke h2 { font-size: 20px; color: var(--h-text); text-transform: none; letter-spacing: 0; }
.duke-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 10px; background: var(--h-panel); border: 1px solid var(--h-line); }
.duke-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.duke-head > div { display: flex; flex-direction: column; }
.duke-aside { font-size: 12px; color: var(--h-muted); }
.duke-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.duke-rules > div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--h-raised); min-width: 0; }
.duke-rules span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--h-muted); }
.duke-rules b { font-size: 14px; }
.duke-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.duke-chip { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 13px; background: var(--h-raised);
             border: 1px solid var(--h-line); color: var(--h-text); }
.duke-chip.me { background: rgba(242,193,78,.12); border-color: var(--h-tokens); }
.duke-chip.open { background: transparent; border-color: var(--h-line2); color: var(--h-dim); }
.duke-chip.in { background: rgba(95,201,141,.12); border-color: var(--h-green); color: #bfeccf; }
.duke-chip.joining { background: transparent; border-color: var(--h-hot); color: #9c8a7c; }
.duke-chip.left { background: transparent; border-color: #5a2a2a; border-style: dashed; color: #d9bcbc; }
.duke-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--h-line); font-size: 13px; color: var(--h-muted); }
.duke-foot > span { flex: 1; min-width: 12em; }
.heat .duke-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 12px; border-radius: 9px;
                     border: 1px solid var(--h-hot); background: transparent; color: #f0d9c4; font: inherit; font-size: 14px; font-weight: 600;
                     cursor: pointer; text-decoration: none; white-space: nowrap; }
.heat .duke-button:hover:not(:disabled) { border-color: var(--h-accent); }
.heat a.duke-button:not(.gold):not(.primary):hover { color: #f0d9c4; }
.heat .duke-button.gold { border: 0; background: var(--h-gold); color: #3a1610; font-weight: 800; }
.heat .duke-button.primary { border: 0; background: var(--h-accent); color: var(--h-on-accent); font-weight: 700; }
.heat .duke-button:disabled { opacity: .5; cursor: default; }
.duke-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

/* Opening MetalDuke: the steps, who's in, and your link. */
.duke-launch { background: linear-gradient(160deg, #3a1610, #1f1411); border-color: var(--h-ember); }
.duke-launch h2 { color: var(--h-cream); }
.duke-held { font-size: 13px; color: var(--h-warm); font-variant-numeric: tabular-nums; }
.duke-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.duke-steps li { display: flex; align-items: center; gap: 10px; }
.duke-steps .mark { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
                    font-size: 13px; font-weight: 800; border: 1px solid #7c6a5c; color: #7c6a5c; }
.duke-steps .done .mark { background: var(--h-accent); border-color: var(--h-accent); color: var(--h-on-accent); }
.duke-steps .now .mark { background: var(--h-gold); border-color: var(--h-gold); color: #3a1610; }
.duke-steps .text { flex: 1; color: var(--h-cream); }
.duke-steps .later .text { color: #9c8a7c; }
.duke-steps .side { font-size: 12px; color: var(--h-soft); }
.duke-help { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 13px; color: #d9c6b4; }
.duke-help b { color: var(--h-cream); }
.duke-refusals { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 8px; background: #2a1a1a; border: 1px solid #5a2a2a; font-size: 13px; }
.duke-refusals b { color: #f5b8b8; }
.duke-refusals span { color: #d9bcbc; }
.duke-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: #f5b8b8; text-decoration: underline; cursor: pointer; }
.duke-link:disabled { opacity: .6; cursor: default; }
.duke-live { display: flex; flex-direction: column; gap: 8px; }
.duke-tally { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.duke-tally li { display: inline-flex; gap: 8px; align-items: baseline; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 13px; }
.duke-tally li.left { opacity: .6; }
.duke-tally b { font-variant-numeric: tabular-nums; color: var(--h-gold); }
.duke-frags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--h-warm); }
.duke-frags.all { max-height: 220px; overflow: auto; color: var(--h-muted); }

/* Match over: places, frags, ratings, tokens, and a new title. */
.duke-kind { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--h-muted); }
.duke-result h2 { font-size: 22px; }
.duke-table { display: flex; flex-direction: column; font-size: 14px; }
.duke-table .row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 46px 46px 46px 92px 64px; gap: 0 10px; align-items: center; }
.duke-table .row > * { padding: 7px 0; border-top: 1px solid var(--h-line); min-width: 0; }
.duke-table .row.head > * { padding: 0 0 4px; border-top: 0; font-size: 11px; letter-spacing: .06em; color: var(--h-muted); }
.duke-table .row.head > :nth-child(n+3) { text-align: right; }
.duke-table .place { font-size: 18px; color: var(--h-muted); }
.duke-table .place.first { color: var(--h-gold); }
.duke-table .who { display: flex; flex-direction: column; line-height: 1.2; }
.duke-table .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duke-table .row.you .who b { color: var(--h-tokens); }
.duke-table .title { font-size: 12px; color: var(--h-warm); }
.duke-table .title.new { color: var(--h-gold); }
.duke-table .num { text-align: right; font-variant-numeric: tabular-nums; color: #d6c8bf; }
.duke-table .num.strong { font-weight: 700; color: var(--h-text); }
.duke-table .num.tokens { color: var(--h-tokens); font-weight: 700; }
.duke-table .rating { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; font-variant-numeric: tabular-nums; }
.duke-table .rating span { font-size: 12px; }
.duke-table .rating .up { color: var(--h-green); }
.duke-table .rating .down { color: var(--h-red); }
.duke-promotion { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px;
                  background: linear-gradient(100deg, #3a1610, #1f1411); border: 1px solid var(--h-ember); }
.duke-arrow { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--h-gold); color: #3a1610; display: flex;
              align-items: center; justify-content: center; font-weight: 900; font-size: 20px; }
.duke-promotion > div { display: flex; flex-direction: column; line-height: 1.3; }
.duke-promotion b { color: var(--h-cream); }
.duke-promotion > div span { font-size: 13px; color: #d9c6b4; }
.duke-note { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 8px; background: #171210; border: 1px dashed var(--h-line);
             font-size: 13px; color: var(--h-muted); }
.duke-note b { color: var(--h-text); }

/* Phones: one column; the room's rows stack, and the result's columns tighten. */
@media (max-width: 820px) {
  .heat-room { grid-template-columns: minmax(0, 1fr); }
  .heat-room-side { position: static; }
  .heat-band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .heat-band-grid > .heat-feature { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .heat-band { padding: 14px; }
  .heat-band-grid { grid-template-columns: minmax(0, 1fr); }
  .heat-banner { flex-wrap: wrap; }
  .heat-start { width: 100%; }
  .heat-table { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .heat-table-act { flex-direction: row; align-items: center; justify-content: space-between; }
  .heat-table-act .heat-state { align-self: center; }
  .heat-note { white-space: normal; }
  .duke-rules { grid-template-columns: minmax(0, 1fr); }
  .duke-table { font-size: 13px; }
  .duke-table .row { grid-template-columns: 22px minmax(0, 1fr) 34px 34px 34px 62px 40px; gap: 0 6px; }
  .duke-table .place { font-size: 15px; }
}
