.history-body { background: #f1f3f5; }
.history-wrap { width: min(820px, 100%); min-height: 100vh; margin: 0 auto; background: #fff; }
.history-topbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; padding: 0 13px; background: #e41f26; color: #fff; box-shadow: 0 2px 8px #87121935; }
.history-topbar strong, .history-back, .year-trigger { font-size: 19px; font-weight: 800; }
.history-topbar strong { letter-spacing: .04em; text-align: center; }
.history-back { justify-self: start; color: #fff; text-decoration: none; }
.year-trigger { justify-self: end; border: 0; padding: 0; background: transparent; color: #fff; cursor: pointer; }
.history-card { margin: 0; padding: 10px 13px 20px; border-radius: 0; box-shadow: none; }
.history-list { border: 0; }
.history-list .history-row { display: block; padding: 12px 0 13px; border-bottom: 1px solid #e4e8eb; }
.history-record-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.history-record-head strong { color: #1a222a; font-size: 16px; }
.history-record-head time { color: #798390; font-size: 13px; }
.history-balls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) 22px minmax(0, 1fr); align-items: stretch; gap: 7px; }
.history-ball-item { position: relative; display: flex; min-height: 91px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 7px 2px 5px; border: 1px solid #dfe4e9; border-radius: 9px; background: #fbfbfb; box-shadow: 0 2px 7px #13203110; }
.history-ball { display: grid; width: 43px; height: 43px; place-items: center; border: 6px solid #bfc8d2; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #fff; color: #18212a; font-size: 15px; font-style: normal; font-weight: 900; }
.history-ball.wave-red { border-color: #e91d24; }
.history-ball.wave-blue { border-color: #287ed9; }
.history-ball.wave-green { border-color: #18b540; }
.history-ball-meta { color: #3f4b57; font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; }
.history-plus { align-self: center; color: #bd8307; font-size: 25px; font-weight: 900; line-height: 1; text-align: center; }
.history-special { border: 2px solid #d9ae35; background: linear-gradient(155deg, #fffef8, #fff4cc); box-shadow: 0 3px 11px #a274092b; }
.year-sheet-open { overflow: hidden; }
.year-sheet { position: fixed; z-index: 20; inset: 0; }
.year-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); }
.year-sheet-panel { position: absolute; right: 0; bottom: 0; left: 0; min-height: 310px; border-radius: 14px 14px 0 0; background: #fff; box-shadow: 0 -8px 30px #0003; }
.year-sheet-panel header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 58px; padding: 0 24px; border-bottom: 1px solid #e6e6e6; }
.year-sheet-panel header strong { color: #151515; font-size: 17px; }
.year-sheet-panel header button { border: 0; padding: 7px 0; background: transparent; color: #606060; font: inherit; font-size: 16px; cursor: pointer; }
.year-sheet-panel .year-confirm { justify-self: end; color: #1479e9; }
.year-options { max-height: 300px; padding: 95px 12% 35px; overflow-y: auto; text-align: center; }
.year-options button { display: block; width: 100%; min-height: 51px; border: 0; border-top: 1px solid #ececec; background: #fff; color: #6b6b6b; font: inherit; font-size: 20px; cursor: pointer; }
.year-options button.selected { color: #111; font-weight: 900; }
@media (max-width: 600px) {
  .history-topbar { min-height: 42px; padding: 0 8px; }
  .history-topbar strong, .history-back, .year-trigger { font-size: 16px; }
  .history-card { padding: 8px 7px 15px; }
  .history-list .history-row { padding: 10px 0; }
  .history-record-head { margin: 0 3px 7px; }
  .history-record-head strong { font-size: 14px; }
  .history-record-head time { font-size: 11px; }
  .history-balls { grid-template-columns: repeat(6, minmax(0, 1fr)) 13px minmax(0, 1fr); gap: 3px; }
  .history-ball-item { min-height: 74px; gap: 4px; padding: 6px 1px 3px; border-radius: 7px; }
  .history-ball { width: 33px; height: 33px; border-width: 5px; font-size: 12px; }
  .history-ball-meta { font-size: 9px; }
  .history-plus { font-size: 18px; }
  .year-sheet-panel { min-height: 290px; }
  .year-sheet-panel header { min-height: 54px; padding: 0 18px; }
  .year-options { padding: 75px 12% 30px; }
}
