.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { padding: 0 14px; font-size: 16px; white-space: nowrap; min-width: 0; }
.sheet-actions .btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.btn-ico { display: inline-grid; margin-right: -6px; }
.btn-ico svg { width: 18px; height: 18px; }

.confirm-text { font-size: 17px; font-weight: 600; color: var(--ink); padding: 4px 2px 0; }

/* Help */
.help-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.help-head h2 { margin: 0; }
.help-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.help-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink-2); font-weight: 600; animation: help-in .36s var(--ease-out) backwards; }
.help-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; }
@keyframes help-in { from { opacity: 0; transform: translateY(8px); } }

/* Stars */
.stars { display: flex; gap: 4px; justify-content: center; }
.star { display: inline-grid; color: var(--surface-3); }
.star svg { width: 22px; height: 22px; }
.stars.lg .star svg { width: 38px; height: 38px; }
.star.on { color: #ffb21e; }

/* Solved card (daily) */
.solved-card {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(8px + var(--safe-bottom));
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 12px 12px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
/* The button sits beside the result while its whole label fits ("Дараа нь: Эвлүүлэг"), and drops to
   its own full-width line when it doesn't (320px): main takes the spare room (grow 999), the button
   only grows once it is alone on its line. */
.solved-main { flex: 999 1 auto; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.solved-main .stars { justify-content: flex-start; }
.solved-title { font-size: 20px; font-weight: 800; color: var(--good); }
.solved-time { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.solved-next { flex: 1 0 auto; max-width: 100%; min-height: 48px; padding: 0 16px; font-size: 15px; }
.solved-next span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Practice result */
.result { display: grid; justify-items: center; gap: 10px; text-align: center; padding-top: 6px; }
.result .sheet-actions { width: 100%; }
.result-badge { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.result-badge svg { width: 34px; height: 34px; }
.result-title { font-size: 24px; font-weight: 800; }
.result-level { font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--accent) var(--text-mix), var(--ink)); }
.record-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: #fff1c2; color: #6b4a00; font-weight: 800; font-size: 14px; animation: toast-in .5s var(--ease-spring) .5s backwards; }
:root[data-theme='dark'] .record-pill { background: #3e3110; color: #ffd76a; }
.record-pill svg { width: 18px; height: 18px; }

/* Records */
.records-sub { color: var(--ink-3); font-weight: 600; margin-bottom: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin-bottom: 10px; }
.seg-btn { appearance: none; border: 0; min-height: 40px; border-radius: var(--r-pill); background: transparent; font-weight: 800; color: var(--ink-2); cursor: pointer; transition: background-color .2s; }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 120px; align-content: start; }
.board-msg { padding: 24px 8px; text-align: center; color: var(--ink-3); font-weight: 600; }
.board-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: var(--r-sm); }
.board-row.me { background: var(--surface-2); }
/* Another player's row: the whole row is a button that opens their profile. */
.board-row.tappable { padding: 0; }
.board-tap {
  appearance: none; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
  flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 6px 10px;
  border-radius: inherit; transition: background-color .15s;
}
.board-tap:active { background: var(--surface-2); }
.board-tap:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.rank { width: 26px; text-align: center; font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; color: var(--ink-2); }
.board-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.board-sub { font-size: 12px; font-weight: 600; color: var(--ink-3); line-height: 1.25; }
.board-score { flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: 17px; }
.mine-title { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mine li { display: flex; align-items: center; gap: 12px; }
.mine .row-icon { width: 32px; height: 32px; border-radius: 10px; }
.mine .row-icon svg { width: 18px; height: 18px; }
.mine-name { flex: 1; font-weight: 700; }
.mine-val { font-weight: 800; color: color-mix(in srgb, var(--accent) var(--text-mix), var(--ink)); font-variant-numeric: tabular-nums; }
.mine-foot { margin-top: 12px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.help-actions { display: grid; gap: 10px; }
.help-actions.two { grid-template-columns: 1fr 1fr; }
.btn-play { font-size: 13px; color: color-mix(in srgb, var(--accent) var(--text-mix), var(--ink)); }

/* Ranking boards (today's combo + per-game records) */
.seg.big .seg-btn { min-height: 44px; font-size: 16px; }
.board-wrap { display: grid; gap: 6px; }
.board-times { flex-shrink: 0; display: grid; justify-items: end; white-space: nowrap; line-height: 1.15; font-variant-numeric: tabular-nums; }
.board-times strong { font-size: 16px; }
.board-times span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.board-gap { text-align: center; color: var(--ink-3); line-height: 1; }
.board-foot { font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: center; min-height: 18px; }

/* Practice result: my record + the game's board */
.result-records { width: 100%; text-align: left; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.my-record { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.my-record-icon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #ffc53d; color: #3d2a00; }
.my-record-icon svg { width: 20px; height: 20px; }
.my-record-main { flex: 1; display: grid; }
.my-record-main strong { font-size: 18px; font-weight: 800; }
.my-record-time { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.records-title { font-size: 16px; font-weight: 800; margin: 16px 0 8px; }
/* Side by side while both labels fit whole; otherwise "Дараагийн түвшин" goes on top, full width
   (wrap-reverse), and "Нүүр хуудас" below it. */
.result .sheet-actions { display: flex; flex-wrap: wrap-reverse; }
.result .sheet-actions .btn { flex: 1 1 auto; }
.result .sheet-actions .btn.accent { flex-grow: 1.4; }
.my-total { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.my-total-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.my-total-item strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.iq-earned { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); background: #eae4ff; color: #3a2a8c; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
:root[data-theme='dark'] .iq-earned { background: #2b2552; color: #cfc4ff; }
.solved-main .iq-earned { font-size: 12px; padding: 2px 8px; }
.iq-line { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.iq-avg { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; color: var(--ink-2); }
.iq-avg strong { font-size: 20px; font-weight: 800; color: var(--ink); }

/* Notification soft-ask */
.notify-ask { display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 4px; }
.notify-ask p { color: var(--ink-2); font-weight: 600; max-width: 340px; }
.notify-ask .sheet-actions { width: 100%; }
.notify-bell { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff1c2; color: #8a5a00; animation: bell-ring 1.6s var(--ease-out) .3s 2; transform-origin: 50% 10%; }
:root[data-theme='dark'] .notify-bell { background: #3e3110; color: #ffd76a; }
.notify-bell svg { width: 34px; height: 34px; }
@keyframes bell-ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-12deg); } }
