:root {
  color-scheme: light;
  --bg: #fff; --panel: #fff; --muted: #56616c; --line: #d8dde2;
  --cyan: #1769d2; --coral: #d14e4e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  color: #17212b; background: var(--bg); font-size: 14px;
}
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: #fff; line-height: 1.45; }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:is(button, select, a):focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
[hidden] { display: none !important; }
.records-shell { width: min(calc(100% - 40px), 940px); min-height: 100dvh; margin: auto; padding: max(20px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left)); display: flex; flex-direction: column; }
.records-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; gap: 3px; }
.brand strong { font-size: 20px; line-height: 1.1; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.3; font-weight: 750; letter-spacing: .12em; }
.language-control { display: flex; align-items: center; gap: 10px; }
.language-control label { color: var(--muted); font-size: 14px; }
.language-control select { min-width: 44px; min-height: 44px; width: 116px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: #17212b; font-size: 16px; }
.records-intro { padding: 34px 0 22px; }
h1 { margin: 10px 0 12px; font-size: clamp(34px, 6vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: -.055em; }
.intro-copy { max-width: 640px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.records-board { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.board-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.tabs { display: flex; gap: 4px; min-width: 0; padding: 3px; border-radius: 8px; background: #f3f5f7; }
.tab, .quiet-button, .page-button { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.25; font-weight: 650; cursor: pointer; }
.tab.is-active { color: #17212b; border-color: #b8cce4; background: #eaf1f8; }
.quiet-button, .page-button { border-color: var(--line); background: #f3f5f7; color: #17212b; }
.records-meta { display: flex; justify-content: space-between; gap: 12px; padding: 16px 19px 12px; color: var(--muted); font-size: 14px; }
.records-meta p { margin: 0; }
#records-total { color: #17212b; }
.timezone-note { text-align: right; }
.records-status { min-height: 24px; margin: 0; padding: 10px 19px 16px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.records-status[data-state="loading"] { color: var(--cyan); }
.records-status[data-state="error"], .records-status[data-state="malformed"] { margin: 0 12px 10px; padding: 12px; border-left: 2px solid var(--coral); border-radius: 4px; background: #fbf3f3; color: #8e3030; }
.records-status[data-state="ready"] { min-height: 0; padding-top: 0; padding-bottom: 0; }
.error-actions { padding: 0 16px 16px; }
.table-wrap { width: 100%; }
.records-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.records-table th, .records-table td { padding: 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.records-table thead th { color: var(--muted); background: #f7f8f9; font-size: 14px; line-height: 1.35; font-weight: 550; }
.records-table .rank-column { width: 64px; text-align: center; }
.records-table .time-column { width: 160px; text-align: right; }
.records-table tbody th { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; text-align: center; font-weight: 600; }
.records-table tbody tr:first-child th { color: var(--coral); }
.record-identity { min-width: 0; }
.record-name { display: block; color: #17212b; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.record-date { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.record-time { color: var(--cyan); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: clamp(16px, 3.5vw, 22px); font-weight: 750; letter-spacing: -.06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-cell { padding: 40px 20px !important; color: var(--muted); font-size: 15px; text-align: center !important; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; min-height: 78px; padding: 16px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.page-button { min-width: 84px; }
.page-button:disabled, .quiet-button:disabled, .tab:disabled { color: #87919b; border-color: var(--line); background: #f7f8f9; cursor: default; }
.records-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding: 28px 0 0; color: var(--muted); font-size: 14px; }
.back-link { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; gap: 8px; color: var(--cyan); font-size: 14px; font-weight: 650; text-decoration: none; }
@media (hover: hover) {
  .quiet-button:hover:not(:disabled), .page-button:hover:not(:disabled), .tab:hover:not(:disabled) { border-color: var(--cyan); color: #17212b; }
  .back-link:hover { text-decoration: underline; }
  .records-table tbody tr:hover { background: #f7f8f9; }
}
@media (max-width: 560px) {
  .records-shell { width: calc(100% - 24px); padding-top: max(14px, env(safe-area-inset-top)); }
  .records-header { gap: 8px; padding-bottom: 14px; }
  .language-control label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .records-intro { padding: 30px 0 22px; }
  h1 { font-size: 36px; }
  .board-heading { padding: 10px 10px 0; gap: 6px; }
  .tab, .quiet-button { padding-inline: 9px; }
  .records-meta { flex-direction: column; gap: 5px; padding: 13px 14px; }
  .timezone-note { text-align: left; }
  .records-status { padding-inline: 14px; }
  .records-table th, .records-table td { padding: 14px 10px; }
  .records-table .rank-column { width: 38px; }
  .records-table .time-column { width: 108px; }
  .record-name { font-size: 15px; }
  .pagination { gap: 12px; padding-block: 12px; min-height: 70px; }
}
@media (max-width: 350px) {
  .brand strong { font-size: 15px; }
  .language-control select { width: 108px; }
  h1 { font-size: 34px; }
  .tabs { gap: 0; padding: 2px; }
  .tab, .quiet-button { padding-inline: 7px; }
  .board-heading { padding-inline: 8px; gap: 4px; }
  .records-table .time-column { width: 98px; }
  .records-table th, .records-table td { padding-inline: 8px; }
  .page-button { min-width: 78px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .records-intro { padding: 24px 0 20px; }
  h1 { font-size: 34px; }
  .records-footer { margin-top: 0; padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
