:root {
  color-scheme: dark;
  --bg: #07101f;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .1);
  --gold: #ffd166;
  --gold-2: #f39c12;
  --blue: #4da3ff;
  --text: #f7f9ff;
  --muted: #8fa0bd;
  --danger: #ff7b7b;
  --success: #5ee08a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { background: var(--bg); }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(77, 163, 255, .18), transparent 34%),
    radial-gradient(circle at 100% 32%, rgba(255, 209, 102, .1), transparent 28%),
    linear-gradient(160deg, #0a1730 0%, var(--bg) 52%, #040912 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body::after {
  content: "";
  position: fixed;
  right: -120px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 163, 255, .12), transparent 68%);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(30px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.brand-block {
  min-width: 0;
  max-width: 170px;
}

.brand {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .06em;
}

.brand-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
}

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
}

.lang-btn {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--gold);
  color: #181205;
}

.card {
  position: relative;
  margin-bottom: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
  animation: rise .45s ease both;
}

.hero {
  border-color: rgba(255, 209, 102, .28);
}

.hero-glow {
  position: absolute;
  top: -80px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, .28), transparent 65%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.status-pill.live {
  border: 1px solid rgba(255, 209, 102, .3);
  background: rgba(255, 209, 102, .12);
  color: var(--gold);
}

.status-pill.waiting {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
}

.round-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.round-line strong {
  color: var(--text);
  font-size: 16px;
}

.countdown {
  margin: 18px 0 12px;
  color: var(--gold);
  font-size: clamp(46px, 14vw, 66px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(255, 209, 102, .2);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  transition: width .5s linear;
}

.finalizing {
  margin-top: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.time-grid,
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.time-grid { margin-top: 16px; }

.muted-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.time-grid time,
.result-value {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.commitment-box {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 8, 18, .55);
}

.commitment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.commitment-box code {
  display: block;
  margin-top: 8px;
  color: #cfe0ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
}

.copy-btn {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 209, 102, .35);
  border-radius: 999px;
  background: rgba(255, 209, 102, .1);
  color: var(--gold);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.decrypt-note {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 209, 102, .4);
  color: #c7d3e8;
}

.rule {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: #c7d3e8;
  font-size: 12px;
  line-height: 1.5;
}

.waiting-hero {
  padding: 34px 18px;
  text-align: center;
}

.waiting-hero .status-pill { margin-bottom: 14px; }

.hero-title {
  margin: 0 0 8px;
  font-size: 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-head h2,
.card h2 {
  margin: 0;
  font-size: 18px;
}

.play-rule {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.play-rule:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.play-rule h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 15px;
}

.play-rule p {
  margin: 0;
  color: #c7d3e8;
  font-size: 13px;
  line-height: 1.65;
}

.play-example {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(77, 163, 255, .08);
  color: #c7d3e8;
  font-size: 12px;
  line-height: 1.6;
}

.round-tag {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(77, 163, 255, .14);
  color: #9cc8ff;
  font-size: 12px;
  font-weight: 700;
}

.result-grid { margin-bottom: 16px; }

.ball-block { margin-top: 14px; }

.ball-block.win-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2e77d0, #1a4f96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px rgba(18, 80, 160, .25);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ball.win {
  background: linear-gradient(145deg, #ffd166, #f39c12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 16px rgba(243, 156, 18, .25);
  color: #2a1a00;
}

.balls-sm .ball {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.proof-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.proof-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 9px;
}

.proof-row code,
code.hash {
  color: #cfe0ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  word-break: break-all;
}

.proof-value {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.proof-value code {
  flex: 1;
  min-width: 0;
}

.proof-value .copy-btn { flex: none; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 10, 22, .45);
}

.history-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.history-period {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.history-period-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.history-period-line .muted-label {
  margin: 0;
}

.history-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.win-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.win-line .muted-label { margin: 0; }

details.proof {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

details.proof summary {
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

details.proof summary::-webkit-details-marker { display: none; }

details.proof summary::after {
  content: "+";
  float: right;
}

details.proof[open] summary::after { content: "−"; }

.ai-command {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.ai-command summary {
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

.ai-command summary::-webkit-details-marker { display: none; }

.ai-command summary::after {
  content: "+";
  float: right;
}

.ai-command[open] summary::after { content: "−"; }

.ai-command pre {
  margin: 9px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 8, 18, .55);
  color: #c7d3e8;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-command .copy-btn { margin-top: 2px; }

.empty {
  padding: 24px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.verify-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.verify-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(3, 8, 18, .65);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.verify-form textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(3, 8, 18, .65);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  resize: vertical;
}

.verify-form input:focus,
.verify-form textarea:focus {
  border-color: rgba(255, 209, 102, .6);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, .12);
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 10px 24px rgba(243, 156, 18, .2);
  color: #1a1305;
}

.btn-ghost {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn:disabled { opacity: .5; cursor: default; }

.btn.verified {
  border-color: rgba(94, 224, 138, .4);
  background: rgba(94, 224, 138, .08);
  color: var(--success);
}

.verify-result {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.verify-result.success { color: var(--success); }
.verify-result.error { color: var(--danger); }
.verify-result.loading { color: var(--muted); }

.verify-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: var(--text);
}

.verify-grid .balls { margin-top: 4px; }

.fairness-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fairness-link::after { content: "→"; }

.play-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 209, 102, .32);
  border-radius: 999px;
  background: rgba(255, 209, 102, .08);
  color: var(--gold);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.account-name {
  max-width: 120px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-balance {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(77, 163, 255, .3);
  border-radius: 999px;
  background: rgba(77, 163, 255, .08);
  color: #9cc8ff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.user-menu-toggle::-webkit-details-marker { display: none; }

.user-menu[open] .user-menu-toggle {
  border-color: rgba(255, 209, 102, .5);
  color: var(--gold);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c172b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.user-menu-name {
  padding: 8px 10px 10px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-balance {
  padding: 6px 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.user-menu-panel button,
.user-menu-panel a {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu-panel button:hover,
.user-menu-panel a:hover {
  background: rgba(255, 255, 255, .06);
}

.account-info {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  color: var(--text);
  font-size: 13px;
}

.account-info-row span { flex: none; color: var(--muted); }
.account-info-row strong { overflow-wrap: anywhere; text-align: right; }

.my-bets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.my-bet-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 10, 22, .45);
}

.my-bet-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: #c7d3e8;
  font-size: 12px;
}

.my-bet-line .muted-label { flex: none; }

.bet-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.bet-status.pending {
  background: rgba(77, 163, 255, .14);
  color: #9cc8ff;
}

.bet-status.won {
  background: rgba(94, 224, 138, .12);
  color: var(--success);
}

.bet-status.lost {
  background: rgba(143, 160, 189, .12);
  color: var(--muted);
}

.balance-chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.balance-chip.credit {
  background: rgba(94, 224, 138, .12);
  color: var(--success);
}

.balance-chip.debit {
  background: rgba(255, 123, 123, .1);
  color: var(--danger);
}

.balance-amount.credit { color: var(--success); }
.balance-amount.debit { color: var(--danger); }

.balance-reason {
  margin: 10px 0 0;
  color: #c7d3e8;
  font-size: 12px;
  line-height: 1.55;
}

.account-link {
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(77, 163, 255, .3);
  border-radius: 999px;
  background: rgba(77, 163, 255, .08);
  color: #9cc8ff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.account-tabs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 8, 18, .45);
}

.account-tab {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.account-tab.active {
  background: rgba(255, 209, 102, .14);
  color: var(--gold);
}

.account-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.account-form input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(3, 8, 18, .65);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.account-form input:focus {
  border-color: rgba(255, 209, 102, .6);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, .12);
}

.account-error {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 123, 123, .3);
  border-radius: 10px;
  background: rgba(255, 123, 123, .08);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.account-error.success {
  border-color: rgba(94, 224, 138, .3);
  background: rgba(94, 224, 138, .08);
  color: var(--success);
}

.bet-open {
  width: 100%;
  margin-top: 12px;
}

.bet-balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.bet-balance strong {
  color: var(--gold);
  font-size: 14px;
}

.bet-tabs { margin-top: 14px; }

.bet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.bet-number {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 8, 18, .55);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bet-number.active {
  border-color: rgba(255, 209, 102, .7);
  background: var(--gold);
  color: #181205;
}

.bet-number:disabled {
  opacity: .35;
  cursor: default;
}

.bet-selected {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.bet-input {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(3, 8, 18, .65);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.bet-input:focus {
  border-color: rgba(255, 209, 102, .6);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, .12);
}

.bet-odds {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

#bet-submit { width: 100%; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(2, 6, 16, .72);
  backdrop-filter: blur(4px);
}

.modal-backdrop.open { display: flex; }

.play-modal { display: none; }

.play-modal:target { display: flex; }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: #0c172b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: sheetUp .25s ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.modal-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}

.modal-intro {
  margin: 12px 0 0;
  color: #c7d3e8;
  font-size: 13px;
  line-height: 1.7;
}

.modal-step { margin-top: 16px; }

.modal-step h3,
.modal-note h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 13px;
}

.modal-step p,
.modal-note p {
  margin: 0 0 8px;
  color: #c7d3e8;
  font-size: 13px;
  line-height: 1.7;
}

.modal-note {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
}

.modal-note h3:not(:first-child) { margin-top: 14px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .btn { flex: 1; }

body.modal-open { overflow: hidden; }

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.footer {
  padding: 10px 4px 0;
  color: #7f8ea8;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 640px) {
  .page { padding-right: 20px; padding-left: 20px; }
  .card { padding: 22px; }
  .ball { width: 42px; height: 42px; font-size: 14px; }
  .verify-form { grid-template-columns: 1fr 1fr; }
  .verify-form .btn { grid-column: 1 / -1; }
  .modal-backdrop { align-items: center; }
}

@media (max-width: 360px) {
  .time-grid,
  .result-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
