/* 홈의 앱 화면: 아래 탭(게임·기록·내 정보), 기록·내 정보 화면, 처음 열 때 인사 */
.tabs { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 8px -12px calc(-16px - env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); background: var(--paper); box-shadow: 0 -1px 0 var(--line); }
.tab { display: grid; justify-items: center; align-content: center; gap: 3px; height: 58px; border: 0; background: none; color: var(--ink-muted); font: 600 11px/14px var(--font-sans); cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] svg .fillme { fill: currentColor; }
.tab:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.tab span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabv { overflow-y: auto; gap: 14px; }
.tabv h1 { margin: 8px 4px 0; font: 400 30px/36px var(--font-display); letter-spacing: -0.02em; }
.tabv > * { flex-shrink: 0; }
.acard { display: grid; gap: 10px; padding: 16px 18px; border-radius: 22px; background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.acard__t { margin: 0; font: 400 19px/26px var(--font-display); word-break: keep-all; }
.acard__p { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); word-break: keep-all; }
.acard__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acard .mn-btn { height: 46px; padding: 0 18px; font-size: 15px; }
.acard .kakao-btn { height: 50px; border-radius: 14px; }
.kakao-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: #FEE500; color: rgba(0, 0, 0, 0.85); font: 600 16px/1 var(--font-sans); cursor: pointer; }
.kakao-btn svg { width: 20px; height: 20px; color: #000; }
.kakao-btn:focus-visible, .acard .mn-btn:focus-visible, .rrow:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.who { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; }
.who__a { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 400 24px/1 var(--font-display); }
.who__n { margin: 0; font: 400 22px/28px var(--font-display); overflow-wrap: anywhere; }
.who__s { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
/* 기록 */
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rstat { display: grid; gap: 4px; padding: 14px 8px 12px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--line), 0 18px 36px -24px rgba(18, 22, 19, 0.22); text-align: center; }
.rstat b { font: 400 26px/30px var(--font-pixel); font-weight: 400; color: #17752F; }
.rstat span { font: 600 12px/16px var(--font-sans); color: var(--ink-muted); word-break: keep-all; }
.rsec { margin: 8px 4px 0; font: 600 13px/18px var(--font-sans); color: var(--ink-muted); }
.rlist { display: grid; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 50px; padding: 0 16px; color: inherit; text-decoration: none; font: 600 16px/22px var(--font-sans); }
.rrow + .rrow { box-shadow: inset 0 1px 0 var(--line); }
.rrow__v { font: 600 15px/1 var(--font-mono); color: #A86A00; }
.rrow__v.is-none { color: var(--ink-muted); font-weight: 500; opacity: 0.7; }
.rrow:active { background: rgba(0, 0, 0, 0.04); }
/* 지난 내기 (장부) */
.bday { margin: 6px 4px 0; font: 600 13px/18px var(--font-sans); color: var(--ink-muted); }
#betList { display: grid; gap: 8px; }
.blist { display: grid; gap: 8px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--radius-sm); background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); color: inherit; text-decoration: none; }
.brow:active { background: rgba(0, 0, 0, 0.04); }
.brow:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.brow__b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.brow__t { font-weight: 700; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.brow__s { font-size: 12px; line-height: 16px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-muted); }
.acard a.mn-btn { text-decoration: none; }
.fine { margin: 4px 6px 8px; font-size: 12px; line-height: 18px; color: var(--ink-muted); }
/* 처음 열 때 인사 */
.sheet { position: fixed; inset: 0; z-index: 30; display: grid; align-items: end; justify-items: center; background: rgba(18, 22, 19, 0.5); animation: sheet-bg 220ms ease-out; }
.sheet[hidden] { display: none; }
.sheet__box { width: min(100%, 440px); box-sizing: border-box; display: grid; gap: 10px; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--paper); animation: sheet-up 280ms cubic-bezier(.2, .8, .2, 1); }
.sheet__art { width: 64px; height: 64px; border-radius: 18px; }
.sheet__t { margin: 6px 0 0; font: 400 28px/34px var(--font-display); letter-spacing: -0.02em; word-break: keep-all; }
.sheet__p { margin: 0 0 8px; font-size: 15px; line-height: 23px; color: var(--ink-muted); word-break: keep-all; }
.sheet__box .mn-btn { width: 100%; }
.sheet__fine { margin: 2px 0 0; font-size: 12px; line-height: 18px; color: var(--ink-muted); text-align: center; }
.htoast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 14px/1 var(--font-sans); white-space: nowrap; opacity: 0; transition: opacity 180ms; pointer-events: none; }
.htoast.is-on { opacity: 1; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-bg { from { background: rgba(18, 22, 19, 0); } }
/* 넓은 화면: 탭은 위 오른쪽 줄로 */
@media (min-width: 960px) {
  .tabs { position: absolute; top: 20px; right: 28px; margin: 0; padding: 4px; grid-auto-flow: column; grid-template-columns: none; gap: 2px; border-radius: 999px; background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
  .tab { grid-auto-flow: column; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; }
  .tab svg { width: 18px; height: 18px; }
  .tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
  .tabv { max-width: 640px; width: 100%; margin: 0 auto; }
  .tabv h1 { font-size: 40px; line-height: 46px; margin-top: 20px; }
  .sheet { align-items: center; }
  .sheet__box { border-radius: 28px; padding-bottom: 24px; }
  .htoast { bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet__box { animation: none; } }
