diff --git a/src/main.ts b/src/main.ts index 4351862..a3a016f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1417,13 +1417,14 @@ function attachEvents() { } function render() { + const playerCount = state.players.length; app.innerHTML = ` -
+
${renderBoard()} - ${renderSidebar()}
-
diff --git a/src/styles.css b/src/styles.css index d48086f..f8a374e 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,3 +1,5 @@ +/* Grid-based TV-Optimized Layout Framework */ + :root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; @@ -5,22 +7,29 @@ radial-gradient(circle at top, rgba(48, 72, 104, 0.35), transparent 42%), linear-gradient(180deg, #0b1220 0%, #070b13 100%); color: #f4f7fb; + + /* Layout constants */ + --bottom-bar-height: 100px; + --sidebar-min-width: 280px; + --sidebar-max-width: 380px; + --gap-size: 0.75rem; + --padding-size: 0.75rem; } * { box-sizing: border-box; + margin: 0; + padding: 0; } html, body { - margin: 0; - padding: 0; height: 100%; width: 100%; overflow: hidden; background: transparent; } -/* TV/Fullscreen optimized container - 16:9 aspect ratio accounting for browser chrome */ +/* Main App Container - 16:9 aspect ratio for TV */ #app { width: 100%; height: 100%; @@ -28,84 +37,103 @@ html, body { align-items: center; justify-content: center; padding: 0.5rem; - min-height: auto; } #app > * { - /* 16:9 aspect ratio container */ aspect-ratio: 16 / 9; - /* Account for browser chrome (~100px) on height, then let width follow 16:9 */ max-height: calc(100vh - 100px); max-width: 100vw; width: auto; height: auto; - /* Ensure it doesn't overflow */ min-width: 0; min-height: 0; - /* Contain everything inside */ - display: flex; - flex-direction: column; -} - -/* When in fullscreen, use full viewport */ -:fullscreen #app > *, -:-webkit-full-screen #app > *, -:-moz-full-screen #app > * { - max-height: 100vh; - padding: 0; -} - -button, -input, -select { - font: inherit; -} - -input[type="number"], -input[type="text"], -select { - width: 100%; - min-height: 2.8rem; - padding: 0.7rem 0.85rem; - border-radius: 0.9rem; - border: 1px solid rgba(255, 255, 255, 0.12); - background: rgba(255, 255, 255, 0.05); - color: #f4f7fb; -} - -button { - border: 0; - cursor: pointer; } +/* Main Layout Grid */ .layout { width: 100%; height: 100%; - padding: 0.5rem; - display: flex; - flex-direction: column; - gap: 0.5rem; + display: grid; + grid-template-areas: + "main sidebar" + "bottom bottom"; + grid-template-columns: 1fr minmax(var(--sidebar-min-width), var(--sidebar-max-width)); + grid-template-rows: 1fr var(--bottom-bar-height); + gap: var(--gap-size); + padding: var(--padding-size); overflow: hidden; } -.scoreboard { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); - gap: 0.75rem; +/* Game Area - Main left section */ +.game-area { + grid-area: main; + display: flex; + flex-direction: column; + min-width: 0; + min-height: 0; + overflow: hidden; } -.scoreboard--bottom { - align-items: end; +/* Board shell fills the game area */ +.board-shell { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + border-radius: 1.25rem; + border: 1px solid rgba(255, 255, 255, 0.08); + background: rgba(9, 16, 29, 0.72); + backdrop-filter: blur(20px); + padding: 0.5rem; + min-height: 0; + overflow: hidden; +} + +/* Board - fits within shell */ +.board { position: relative; - z-index: 25; + width: 100%; + height: 100%; + max-width: 100%; + max-height: 100%; + aspect-ratio: var(--board-columns) / var(--board-rows); + display: grid; + grid-template-columns: repeat(var(--board-columns), 1fr); + grid-template-rows: repeat(var(--board-rows), 1fr); + gap: clamp(2px, 0.3cqmin, 4px); + margin: 0 auto; +} + +/* Sidebar - Right panel */ +.sidebar { + grid-area: sidebar; + display: flex; + flex-direction: column; + gap: 0.75rem; + min-width: 0; + overflow: hidden; +} + +/* Bottom bar - Fixed height player scores */ +.scoreboard { + grid-area: bottom; + display: grid; + grid-template-columns: repeat(var(--player-count, 3), 1fr); + gap: 0.75rem; + height: 100%; + overflow: hidden; } .score-card { border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 1.25rem; - padding: 0.8rem 1rem; + border-radius: 1rem; + padding: 0.75rem 1rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); + display: flex; + flex-direction: column; + justify-content: center; + min-height: 0; } .score-card.active { @@ -113,157 +141,40 @@ button { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 24px var(--player-glow); } -.score-card__head, -.score-card__numbers, -.panel__title-row, -.button-row, -.setup-grid, -.toggle-row, -.active-turn { - display: flex; - align-items: center; -} - -.score-card__head, -.panel__title-row, -.button-row, -.toggle-row { - justify-content: space-between; -} - -.score-card__identity { - display: flex; - align-items: center; - gap: 0.6rem; -} - -.score-card__head h2, -.panel h1, -.panel h2, -.active-turn h2 { - margin: 0; -} - -.score-card__numbers { - margin-top: 0.65rem; - gap: 1rem; -} - -.score-card__footer { - margin-top: 0.65rem; - padding-top: 0.55rem; - border-top: 1px solid rgba(255, 255, 255, 0.08); - color: rgba(231, 238, 247, 0.72); - font-size: 0.82rem; -} - -.score-card__numbers div { - display: grid; - gap: 0.15rem; -} - -.score-card__numbers span, -.eyebrow, -label span, -.log-list p, -.status-panel p, -.active-turn p, -.effect-empty { - color: rgba(231, 238, 247, 0.72); -} - -.score-card__meta { - font-size: 0.82rem; - color: rgba(231, 238, 247, 0.7); -} - -.score-card__numbers strong { - font-size: 1.35rem; -} - -.score-value { - display: inline-block; -} - -.score-value.changed { - animation: score-pop 0.7s ease; -} - -.player-dot { - width: 0.95rem; - height: 0.95rem; - border-radius: 999px; - background: var(--player-color); - box-shadow: 0 0 18px var(--player-glow); -} - -.game-area { - flex: 1; - position: relative; - display: grid; - grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.85fr); - gap: 0.5rem; - min-height: 0; - align-items: center; - overflow: hidden; -} - -.board-shell, +/* Sidebar panels */ .panel { - border-radius: 1.5rem; + border-radius: 1.25rem; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(9, 16, 29, 0.72); backdrop-filter: blur(20px); -} - -.board-shell { - min-height: 0; - padding: 0.4rem; + padding: 0.75rem; display: flex; - align-items: center; - justify-content: center; - overflow: hidden; + flex-direction: column; + min-height: 0; } -.board { - position: relative; - width: 100%; - height: auto; - max-width: 100%; - max-height: 100%; - aspect-ratio: var(--board-columns) / var(--board-rows); - display: grid; - gap: 0.15rem; - margin: 0 auto; - align-self: center; +.controls-panel { + flex: 1; + display: flex; + flex-direction: column; + gap: 0.6rem; + overflow: auto; } -.board__lines { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - pointer-events: none; - filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.18)); - z-index: 1; -} - -.board__fx { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: 4; +.log-panel { + max-height: 120px; + flex-shrink: 0; } +/* Cell styling */ .cell { position: relative; background: rgba(255, 255, 255, 0.03); - border-radius: 0.8rem; + border-radius: clamp(4px, 15%, 0.6rem); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; - z-index: 2; + min-width: 0; + min-height: 0; } .cell__shade { @@ -287,13 +198,13 @@ label span, } .cell__node { - width: min(1.5em, 1.6rem); - height: min(1.5em, 1.6rem); - min-width: 1rem; - min-height: 1rem; + width: min(40%, 1.4rem); + height: min(40%, 1.4rem); + min-width: 8px; + min-height: 8px; border-radius: 50%; background: var(--node-color); - box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.06), 0 0 1.2rem var(--node-glow); + box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.06), 0 0 1rem var(--node-glow); } .cell.selected { @@ -307,7 +218,48 @@ label span, } .cell.pending .cell__node { - box-shadow: 0 0 0 0.22rem rgba(255, 255, 255, 0.08), 0 0 1.4rem var(--node-glow), 0 0 2rem rgba(255, 255, 255, 0.08); + box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.08), 0 0 1.1rem var(--node-glow), 0 0 1.5rem rgba(255, 255, 255, 0.08); +} + +.cell.target { + border-color: rgba(255, 255, 255, 0.22); + background: rgba(255, 255, 255, 0.05); +} + +.cell.target:hover { + transform: translateY(-1px); +} + +.cell__target-label { + width: min(60%, 1.5rem); + height: min(60%, 1.5rem); + display: grid; + place-items: center; + border-radius: 999px; + background: rgba(255, 255, 255, 0.09); + border: 1px solid rgba(255, 255, 255, 0.18); + font-weight: 700; + font-size: clamp(0.6rem, 2cqmin, 0.9rem); +} + +/* Board overlays */ +.board__lines { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + pointer-events: none; + filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.18)); + z-index: 1; +} + +.board__fx { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 4; } .board__drop-layer { @@ -327,7 +279,7 @@ label span, .board__energy-cell { position: absolute; - border-radius: 0.8rem; + border-radius: clamp(4px, 15%, 0.6rem); background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), color-mix(in srgb, var(--flash-color) 70%, #ffe08a) 34%, rgba(255, 224, 138, 0.18) 72%, transparent 100%), linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent); @@ -426,52 +378,192 @@ label span, font-weight: 800; } -.cell.target { - border-color: rgba(255, 255, 255, 0.22); - background: rgba(255, 255, 255, 0.05); -} - -.cell.target:hover { - transform: translateY(-1px); -} - -.cell__target-label { - width: 2rem; - height: 2rem; - display: grid; - place-items: center; - border-radius: 999px; - background: rgba(255, 255, 255, 0.09); - border: 1px solid rgba(255, 255, 255, 0.18); - font-weight: 700; -} - -.sidebar { +/* Score card content */ +.score-card__head, +.score-card__numbers, +.panel__title-row, +.button-row, +.setup-grid, +.toggle-row, +.active-turn { display: flex; - flex-direction: column; - gap: 1rem; + align-items: center; } -.panel { - padding: 1rem; +.score-card__head, +.panel__title-row, +.button-row, +.toggle-row { + justify-content: space-between; } -.controls-panel { +.score-card__identity { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.score-card__head h2, +.panel h1, +.panel h2, +.active-turn h2 { + margin: 0; + font-size: clamp(0.9rem, 2.5cqmin, 1.2rem); +} + +.score-card__numbers { + margin-top: 0.5rem; + gap: 0.75rem; +} + +.score-card__footer { + margin-top: 0.5rem; + padding-top: 0.4rem; + border-top: 1px solid rgba(255, 255, 255, 0.08); + color: rgba(231, 238, 247, 0.72); + font-size: 0.75rem; +} + +.score-card__numbers div { display: grid; - gap: 0.8rem; + gap: 0.1rem; } +.score-card__numbers span, +.eyebrow, +label span, +.log-list p, +.status-panel p, +.active-turn p, +.effect-empty { + color: rgba(231, 238, 247, 0.72); +} + +.score-card__meta { + font-size: 0.75rem; + color: rgba(231, 238, 247, 0.7); +} + +.score-card__numbers strong { + font-size: 1.2rem; +} + +.score-value { + display: inline-block; +} + +.score-value.changed { + animation: score-pop 0.7s ease; +} + +.player-dot { + width: 0.85rem; + height: 0.85rem; + border-radius: 999px; + background: var(--player-color); + box-shadow: 0 0 16px var(--player-glow); +} + +/* Sidebar content */ .panel__actions { display: flex; - gap: 0.55rem; + gap: 0.5rem; } +.eyebrow { + margin: 0 0 0.25rem; + font-size: 0.75rem; + letter-spacing: 0.1em; + text-transform: uppercase; +} + +.button-row { + gap: 0.5rem; +} + +.button-row button, +.ghost-button { + min-height: 2.4rem; + padding: 0.5rem 0.75rem; + border-radius: 0.85rem; + background: #f4f7fb; + color: #0a1020; + font-weight: 700; + font-size: 0.9rem; + border: none; + cursor: pointer; +} + +.ghost-button, +#finish-game { + background: rgba(255, 255, 255, 0.08); + color: #f4f7fb; + border: 1px solid rgba(255, 255, 255, 0.1); +} + +button:disabled { + opacity: 0.45; + cursor: not-allowed; +} + +.log-list { + display: grid; + gap: 0.4rem; + font-size: 0.8rem; + overflow: auto; +} + +.log-list p, +.status-panel p, +.active-turn p { + margin: 0; +} + +.event-note { + color: #ffd577; +} + +.active-turn { + flex-direction: column; + align-items: flex-start; + gap: 0.25rem; + padding: 0.6rem; + border-radius: 0.85rem; + background: linear-gradient(135deg, color-mix(in srgb, var(--player-color) 22%, rgba(255, 255, 255, 0.04)), rgba(255, 255, 255, 0.04)); + border: 1px solid color-mix(in srgb, var(--player-color) 35%, rgba(255, 255, 255, 0.08)); +} + +/* Form elements */ +button, +input, +select { + font: inherit; +} + +input[type="number"], +input[type="text"], +select { + width: 100%; + min-height: 2.4rem; + padding: 0.5rem 0.75rem; + border-radius: 0.75rem; + border: 1px solid rgba(255, 255, 255, 0.12); + background: rgba(255, 255, 255, 0.05); + color: #f4f7fb; + font-size: 0.9rem; +} + +input[type="range"] { + width: 100%; +} + +/* Modal styles */ .modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; - padding: 1.25rem; + padding: 1rem; background: rgba(3, 8, 16, 0.72); backdrop-filter: blur(14px); z-index: 20; @@ -481,6 +573,11 @@ label span, width: min(1180px, 100%); max-height: min(92%, 980px); overflow: auto; + border-radius: 1.25rem; + border: 1px solid rgba(255, 255, 255, 0.08); + background: rgba(9, 16, 29, 0.72); + backdrop-filter: blur(20px); + padding: 1rem; } .draft-panel { @@ -498,352 +595,21 @@ label span, box-shadow: 0 16px 48px rgba(0, 0, 0, 0.32); } -.modal-setup-grid, -.modal-grid { - display: grid; - gap: 0.9rem; -} - -.modal-setup-grid { - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); -} - -.modal-grid { - margin-top: 0.9rem; - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.modal-actions { - margin-top: 0.9rem; - justify-content: flex-end; -} - -.eyebrow { - margin: 0 0 0.3rem; - font-size: 0.82rem; - letter-spacing: 0.12em; - text-transform: uppercase; -} - -.setup-grid { - gap: 1rem; - align-items: end; -} - -.setup-grid label { - flex: 1; - display: grid; - gap: 0.35rem; -} - -.seed-editor { - display: grid; - gap: 0.65rem; - padding: 0.8rem; - border-radius: 1rem; - background: rgba(255, 255, 255, 0.03); - border: 1px solid rgba(255, 255, 255, 0.06); -} - -.seed-row { - display: grid; - gap: 0.35rem; -} - -.order-row, -.order-row__label, -.order-row__actions { - display: flex; - align-items: center; -} - -.order-row { - justify-content: space-between; - gap: 0.75rem; -} - -.order-row__label { - gap: 0.6rem; - font-weight: 600; -} - -.order-row__actions { - gap: 0.4rem; -} - -.mini-button { - min-height: 2rem; - padding: 0.35rem 0.65rem; - border-radius: 0.7rem; - background: rgba(255, 255, 255, 0.08); - color: #f4f7fb; - border: 1px solid rgba(255, 255, 255, 0.1); - font-weight: 600; -} - -.seed-help { - margin: 0; - color: rgba(231, 238, 247, 0.72); -} - -.initiative-order-row { - display: flex; - flex-wrap: wrap; - gap: 0.55rem; -} - -.initiative-pill { - padding: 0.45rem 0.7rem; - border-radius: 999px; - background: rgba(255, 255, 255, 0.06); - border: 1px solid rgba(255, 255, 255, 0.08); - color: rgba(231, 238, 247, 0.76); -} - -.initiative-pill--active { - border-color: color-mix(in srgb, var(--player-color) 62%, white); - box-shadow: 0 0 18px color-mix(in srgb, var(--player-color) 40%, transparent); - color: #f4f7fb; -} - -.initiative-seat-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); - gap: 0.8rem; - margin-top: 0.9rem; -} - -.initiative-seat { - min-height: 8rem; - padding: 0.9rem; - border-radius: 1rem; - display: grid; - gap: 0.35rem; - text-align: left; - background: rgba(255, 255, 255, 0.06); - color: #f4f7fb; - border: 1px solid rgba(255, 255, 255, 0.1); -} - -.initiative-seat--taken { - opacity: 0.68; -} - -.weather-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); - gap: 0.9rem; - margin-top: 0.9rem; -} - -.weather-card { - display: grid; - gap: 0.8rem; - padding: 0.95rem; - border-radius: 1rem; - background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.08); -} - -.weather-card h2, -.weather-card p { - margin: 0; -} - -.weather-card--drafted { - border-color: rgba(130, 224, 182, 0.55); -} - -.weather-card--banned { - border-color: rgba(255, 128, 128, 0.45); - opacity: 0.72; -} - -.weather-card__actions { - display: flex; - gap: 0.6rem; - flex-wrap: wrap; -} - -.weather-key { - display: grid; - gap: 0.25rem; - color: rgba(231, 238, 247, 0.78); - font-size: 0.86rem; -} - -.active-effects { - display: grid; - gap: 0.55rem; - margin-top: 0.65rem; -} - -.effect-chip { - display: flex; - align-items: center; - min-height: 3rem; - padding: 0.75rem 0.9rem; - border-radius: 1rem; - background: linear-gradient(180deg, rgba(255, 208, 96, 0.14), rgba(255, 208, 96, 0.04)); - border: 1px solid rgba(255, 208, 96, 0.2); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); -} - -.effect-chip__title { - font-size: 1rem; - font-weight: 700; - color: #f4f7fb; -} - -.weather-action { - flex: 1; - min-width: 0; - display: flex; - align-items: center; - gap: 0.7rem; - padding: 0.75rem 0.85rem; - border-radius: 0.95rem; - color: #f4f7fb; - border: 1px solid rgba(255, 255, 255, 0.12); - background: rgba(255, 255, 255, 0.06); - text-align: left; -} - -.weather-action span { - display: grid; - gap: 0.12rem; -} - -.weather-action strong { - display: block; -} - -.weather-action__icon { - width: 2rem; - height: 2rem; - display: grid; - place-items: center; - border-radius: 999px; - font-size: 1rem; - line-height: 1; - background: rgba(255, 255, 255, 0.12); - flex: 0 0 auto; -} - -.weather-action--draft { - background: linear-gradient(180deg, rgba(255, 208, 96, 0.2), rgba(255, 208, 96, 0.08)); - border-color: rgba(255, 208, 96, 0.4); -} - -.weather-action--draft .weather-action__icon { - background: rgba(255, 208, 96, 0.22); -} - -.weather-action--ban { - background: linear-gradient(180deg, rgba(255, 110, 110, 0.16), rgba(255, 110, 110, 0.06)); - border-color: rgba(255, 110, 110, 0.32); -} - -.weather-action--ban .weather-action__icon { - background: rgba(255, 110, 110, 0.18); -} - -.weather-action:hover { - transform: translateY(-1px); -} - -.randomize-button { - width: 100%; -} - -.finish-game-button { - width: 100%; -} - -input[type="range"] { - width: 100%; -} - -.active-turn { - flex-direction: column; - align-items: flex-start; - gap: 0.35rem; - padding: 0.8rem; - border-radius: 1rem; - background: linear-gradient(135deg, color-mix(in srgb, var(--player-color) 22%, rgba(255, 255, 255, 0.04)), rgba(255, 255, 255, 0.04)); - border: 1px solid color-mix(in srgb, var(--player-color) 35%, rgba(255, 255, 255, 0.08)); -} - -.root-shift-row { - display: flex; - gap: 0.55rem; - flex-wrap: wrap; -} - -.root-shift-button { - min-height: 2.2rem; -} - -.button-row { - gap: 0.75rem; -} - -.button-row button, -.ghost-button { - min-height: 2.7rem; - padding: 0.65rem 0.9rem; - border-radius: 0.95rem; - background: #f4f7fb; - color: #0a1020; - font-weight: 700; -} - -.ghost-button, -#finish-game { - background: rgba(255, 255, 255, 0.08); - color: #f4f7fb; - border: 1px solid rgba(255, 255, 255, 0.1); -} - -button:disabled { - opacity: 0.45; - cursor: not-allowed; -} - -.log-list { - display: grid; - gap: 0.55rem; - max-height: 30%; - overflow: auto; -} - -.log-list p, -.status-panel p, -.active-turn p { - margin: 0; -} - -.event-note { - color: #ffd577; -} - +/* Animations */ @keyframes sunlight-drop { 0% { opacity: 0; top: -0.9rem; transform: scale(0.65); } - 12% { opacity: 1; } - 85% { opacity: 1; top: calc(var(--drop-end) - 0.55rem); transform: scale(1); } - 100% { opacity: 0; top: calc(var(--drop-end) - 0.55rem); @@ -856,12 +622,10 @@ button:disabled { opacity: 0; transform: scale(0.65); } - 25% { opacity: 1; transform: scale(1); } - 100% { opacity: 1; transform: scale(1); @@ -872,11 +636,9 @@ button:disabled { 0% { opacity: 0; } - 20% { opacity: 0.98; } - 100% { opacity: 0; } @@ -888,13 +650,11 @@ button:disabled { color: #fff7d6; text-shadow: 0 0 0 rgba(255, 235, 153, 0); } - 35% { transform: scale(1.18); color: #ffe480; text-shadow: 0 0 16px rgba(255, 228, 128, 0.9); } - 100% { transform: scale(1); color: inherit; @@ -902,36 +662,57 @@ button:disabled { } } -@media (max-width: 1100px) { - .game-area { - grid-template-columns: 1fr; - } - - .modal-grid { - grid-template-columns: 1fr; - } - - .board { - max-height: none; - width: 100%; - } +/* Fullscreen mode adjustments */ +:fullscreen #app > *, +:-webkit-full-screen #app > *, +:-moz-full-screen #app > * { + max-height: 100vh; + padding: 0; } -@media (max-width: 720px) { +/* Responsive adjustments */ +@media (max-width: 900px) { + :root { + --bottom-bar-height: 80px; + --sidebar-min-width: 240px; + } + .layout { - padding: 1rem; + grid-template-columns: 1fr minmax(var(--sidebar-min-width), 320px); + gap: 0.5rem; + padding: 0.5rem; } - - .scoreboard { - grid-template-columns: repeat(2, minmax(0, 1fr)); + + .score-card { + padding: 0.5rem 0.75rem; } - - .score-card__numbers { - gap: 1rem; + + .score-card__head h2 { + font-size: 0.9rem; } - - .cell__node { - width: 1rem; - height: 1rem; + + .score-card__numbers strong { + font-size: 1rem; + } +} + +@media (max-width: 700px) { + .layout { + grid-template-areas: + "main" + "sidebar" + "bottom"; + grid-template-columns: 1fr; + grid-template-rows: 2fr auto var(--bottom-bar-height); + } + + .sidebar { + flex-direction: row; + gap: 0.5rem; + } + + .panel { + flex: 1; + min-width: 0; } }