.utility-page { width: min(1280px, 100%); margin: 0 auto; }
.utility-intro { margin: 20px 0 22px; }
.utility-intro h1 { margin: 2px 0 8px; font-size: clamp(1.8rem, 5vw, 2.5rem); }
.utility-intro p { max-width: 760px; color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.utility-card { margin: 18px 0; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.utility-card h2 { margin: 0 0 8px; }
.utility-card h3 { margin: 14px 0 8px; }
.utility-card p { color: var(--muted); }
.recorder-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.utility-page label { display: grid; gap: 5px; font-weight: 650; }
.utility-page input, .utility-page select { min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--control-bg); color: var(--foreground); font: inherit; }
.utility-page input:focus-visible, .utility-page select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sets-input { margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: 9px; }
.sets-input legend { padding: 0 6px; font-weight: 750; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; align-self: end; min-height: 42px; }
.check-label input { width: 20px; min-height: 20px; }
.set-row { display: grid; grid-template-columns: 52px minmax(220px, 1fr) 110px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-win-buttons { display: flex; gap: 4px; }
.set-win-buttons button { flex: 1 1 0; min-width: 32px; min-height: 36px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--control-bg); color: var(--foreground); font: inherit; cursor: pointer; }
.set-win-buttons button[aria-pressed="true"] { border-color: var(--accent); background: var(--action); color: #fff; font-weight: 800; }
.played-label { grid-template-columns: auto 58px !important; align-items: center; gap: 6px !important; font-size: .85rem; }
.played-label input { min-height: 36px; padding-inline: 6px; }
.rating-delta { align-self: center; margin: 0; font-weight: 750; }
.form-actions, .section-title-row, .movedle-input { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.primary-button, .secondary-button, .cmp-answers button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--control-bg); color: var(--foreground); font: inherit; font-weight: 700; cursor: pointer; }
.primary-button { border-color: var(--accent); background: var(--action); color: #fff; }
.primary-button:hover, .secondary-button:hover, .cmp-answers button:hover { filter: brightness(1.08); }
.file-button { display: inline-flex !important; align-items: center; cursor: pointer; }
.section-title-row h2, .section-title-row h3 { margin: 0; }
.section-title-row p { margin: 5px 0 0; }
.season-filter { display: flex !important; align-items: center; gap: 8px !important; }
.season-filter select { min-width: 150px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.metric-card { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--background); }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { font-size: 1.5rem; }
.chart-wrap { margin: 22px 0; }
#elo-chart { width: 100%; min-height: 250px; overflow-x: auto; }
#elo-chart svg { display: block; width: 100%; min-width: 480px; height: 270px; overflow: visible; }
#elo-chart text { fill: var(--muted); font: 12px system-ui, sans-serif; }
#elo-chart .chart-grid { stroke: var(--border); stroke-dasharray: 4 5; }
#elo-chart .chart-line { fill: none; stroke: var(--accent); stroke-width: 3; }
#elo-chart .chart-point { fill: var(--accent); stroke: var(--background); stroke-width: 2; }
.dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.table-scroll { overflow-x: auto; }
.utility-page table { width: 100%; border-collapse: collapse; }
.utility-page th, .utility-page td { padding: 9px; border: 1px solid var(--border); text-align: left; }
.utility-page tbody tr:nth-child(odd) { background: var(--background); }
.history-list { display: grid; gap: 9px; margin-top: 14px; }
.history-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); }
.history-entry p { margin: 3px 0 0; }
.utility-notice { min-height: 1.4em; color: var(--muted); }
.utility-notice.success { color: #248449; }
.utility-notice.error { color: #bd3939; }
.quiz-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0; }
.quiz-tabs button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 7px 7px 0 0; background: var(--surface); color: var(--foreground); cursor: pointer; }
.quiz-tabs button.active { border-color: var(--accent); color: var(--accent); font-weight: 800; }
.quiz-panel[hidden] { display: none !important; }
.movedle-input { justify-content: flex-start; margin: 16px 0; }
.movedle-search { position: relative; flex: 1 1 280px; min-width: 0; }
.movedle-search input { width: 100%; }
.move-suggestions { position: absolute; z-index: 100; top: calc(100% + 4px); left: 0; width: 100%; max-width: min(360px, calc(100vw - 40px)); max-height: 210px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 8px; background: var(--background); box-shadow: 0 10px 24px #0004; }
.move-suggestions[hidden] { display: none; }
.move-suggestion { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--foreground); font: inherit; text-align: left; cursor: pointer; }
.move-suggestion:last-child { border-bottom: 0; }
.move-suggestion:hover, .move-suggestion[aria-selected="true"] { background: var(--selected); }
.move-suggestion small { flex: 0 0 auto; color: var(--muted); font-size: .72rem; font-weight: 800; }
.share-result-button { margin-left: 24px; border-color: var(--accent); background: var(--selected); color: var(--accent); }
.share-result-button:not(:disabled) { font-weight: 800; }
.share-result-button:hover:not(:disabled) { background: var(--action); color: #fff; }
.movedle-table { width: 100%; min-width: 680px; table-layout: fixed; }
.movedle-table th, .movedle-table td { padding: 6px 5px; font-size: .82rem; overflow-wrap: anywhere; }
.movedle-table th:nth-child(1), .movedle-table td:nth-child(1) { width: 20%; }
.movedle-table th:nth-child(2), .movedle-table td:nth-child(2) { width: 10%; }
.movedle-table th:nth-child(3), .movedle-table td:nth-child(3) { width: 9%; }
.movedle-table th:nth-child(4), .movedle-table td:nth-child(4) { width: 10%; }
.movedle-table th:nth-child(5), .movedle-table td:nth-child(5) { width: 12%; }
.movedle-table th:nth-child(6), .movedle-table td:nth-child(6) { width: 39%; }
.movedle-table th { background: var(--control-bg); }
.guess-correct { background: #267b49 !important; color: #fff; }
.guess-wrong { background: #777 !important; color: #fff; }
.guess-higher, .guess-lower { background: #8c682f !important; color: #fff; }
.guess-partial { background: #b56a22 !important; color: #fff; }
.quiz-prompt { margin: 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--background); }
.quiz-prompt strong { color: var(--accent); }
.count-inputs { max-width: 700px; margin: 14px 0; }
.cmp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.cmp-league-select { min-width: 170px; }
.cmp-league-row { display: flex; align-items: end; gap: 18px; margin: 12px 0 18px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--background); }
.cmp-league-select { width: min(280px, 100%); }
.cmp-league-row > p { flex: 1; margin: 0 0 8px; }
.cmp-pokemon { padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); text-align: center; }
.cmp-pokemon h3 { margin: 0 0 6px; }
.cmp-pokemon strong { display: block; font-size: 1.8rem; }
.cmp-answers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
.cmp-answers button { min-width: 0; white-space: normal; }
.cmp-answers .tie-answer { min-width: 74px; }
.league-aggregate { font-weight: 800; background: var(--selected) !important; }
.movedle-dialog { width: min(500px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--foreground); box-shadow: 0 20px 60px #0006; }
.movedle-dialog::backdrop { background: #100c08a8; }
.movedle-dialog h2 { margin-top: 0; }
.movedle-dialog p { color: var(--muted); }
.movedle-dialog .form-actions { justify-content: flex-end; margin-top: 20px; }
.movedle-dialog .primary-button { white-space: nowrap; }
.text-muted { color: var(--muted); }
@media (max-width: 720px) { .dashboard-columns { grid-template-columns: 1fr; } .section-title-row { align-items: flex-start; } .history-entry { align-items: flex-start; } }
@media (max-width: 540px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cmp-pair { grid-template-columns: 1fr; } .cmp-league-row { align-items: stretch; flex-direction: column; gap: 8px; } .cmp-league-row > p { margin: 0; } .cmp-league-select { width: 100%; } .rating-fields { grid-template-columns: 1fr; } .set-row { grid-template-columns: 1fr; } .set-win-buttons { max-width: 420px; } .played-label { justify-content: start; } .movedle-dialog .form-actions { align-items: stretch; flex-direction: column; } }
