:root {
  --bg: #f4efe4;
  --card: #fffdf8;
  --ink: #14203a;
  --ink-2: #3a4560;
  --muted: #7b7466;
  --line: #e4dac6;
  --line-2: #efe7d7;
  --navy: #14203a;
  --navy-2: #1f2e52;
  --accent: #d63c22;
  --accent-soft: #fbe3dc;
  --gold: #c8901a;
  --yes: #2f8a57;
  --maybe: #d29a1c;
  --no: #b5473a;
  --wood: #e8d3ad;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(20, 32, 58, .04), 0 6px 18px -10px rgba(20, 32, 58, .25);
  --t-reg: #d63c22; --t-prac: #2f6fb5; --t-flash: #d29a1c; --t-comp: #7a3fb0; --t-party: #2f8a57; --t-etc: #7b7466;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1322; --card: #161d31; --ink: #ece6d8; --ink-2: #c5bfb2; --muted: #9089a0;
    --line: #2a3350; --line-2: #222a42; --navy: #0a0f1c; --navy-2: #1b2440;
    --accent: #ff6a4d; --accent-soft: #3a1f1c; --gold: #f0b43c; --wood: #3a3122;
    --shadow: 0 6px 18px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15px; line-height: 1.5; letter-spacing: -0.01em;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 17px; font-weight: 750; }
h2 small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
h4 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small-p { font-size: 13px; margin: 8px 0; }
.err { color: var(--no); font-size: 13px; min-height: 1em; }

/* 헤더 */
.top { background: var(--navy); color: #f4efe4; position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.top-in { max-width: 820px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.ball { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8d72, var(--accent) 55%, #8f2414); position: relative; box-shadow: inset -2px -2px 4px rgba(0,0,0,.3); }
.ball::before, .ball::after { content: ""; position: absolute; width: 3.5px; height: 3.5px; border-radius: 50%; background: #2a0d07; top: 6px; left: 8px; }
.ball::after { top: 6px; left: 13px; box-shadow: -2.5px 4px 0 #2a0d07; }
.top-r { display: flex; align-items: center; gap: 6px; }
.me { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #c9c2b3; }
.me select { background: var(--navy-2); color: #f4efe4; border: 1px solid #34406a; border-radius: 10px; padding: 6px 8px; max-width: 120px; }

/* 탭 */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; border-radius: 10px; }
.tab.on { color: var(--accent); }
.tab.on svg { stroke-width: 2.3; }
@media (min-width: 760px) {
  body { padding-bottom: 40px; }
  .tabs { position: sticky; top: 52px; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; gap: 6px; padding: 6px; background: var(--bg); }
  .tab { flex: 0 0 auto; flex-direction: row; gap: 6px; font-size: 14px; padding: 8px 16px; }
  .tab svg { width: 18px; height: 18px; }
  .tab.on { background: var(--card); box-shadow: var(--shadow); }
}

main { max-width: 820px; margin: 0 auto; padding: 16px; }
section { margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.tight { padding: 6px 4px; }
.card.tight .grp-h { padding: 10px 12px 4px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; min-height: 30px; }
.card .sec-h { margin-top: 0; }
.modal .sec-h { margin-top: 18px; }
.hero { background: var(--navy); color: #f4efe4; border: 0; }
.hero p { color: #c9c2b3; }
.hint-card { background: var(--accent-soft); border-color: transparent; box-shadow: none; padding: 12px 16px; }
.hint-card p { margin: 0; font-size: 14px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 11px; padding: 10px 16px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: transform .06s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.danger { color: var(--no); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn:disabled { opacity: .5; }
.link { border: 0; background: none; color: var(--accent); font-weight: 650; font-size: 13px; cursor: pointer; padding: 4px; }
.icon-btn { border: 0; background: none; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; font-size: 20px; color: var(--ink); }
.icon-btn:hover { background: var(--line-2); }
.icon-btn.light { color: #c9c2b3; }
.icon-btn.light:hover { background: var(--navy-2); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.action-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.action-bar .btn { flex: 1; }

/* 입력 */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filters select { flex: 1; background: var(--card); }
.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.inline select { width: auto; padding: 6px 10px; }
.summary { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.add-member { display: grid; grid-template-columns: 1fr 76px auto; gap: 8px; }

/* 뱃지/칩 */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: #fff; vertical-align: 1px; }
.t-reg { --c: var(--t-reg); } .t-prac { --c: var(--t-prac); } .t-flash { --c: var(--t-flash); } .t-comp { --c: var(--t-comp); } .t-party { --c: var(--t-party); } .t-etc { --c: var(--t-etc); }
.badge { background: var(--c); }
.chip { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
.chip.gray { background: var(--line-2); color: var(--muted); }
.dday { font-size: 12px; font-weight: 750; color: var(--accent); margin-left: 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 3px 1px 8px; vertical-align: middle; }
.dot:first-child { margin-left: 0; }
.dot.yes { background: var(--yes); } .dot.maybe { background: var(--maybe); } .dot.no { background: var(--no); }

/* 일정 카드 */
.ev-card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); }
.ev-card:hover { border-color: var(--wood); }
.ev-date { flex: 0 0 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--navy); color: #f4efe4; border-radius: 11px; padding: 6px 0; line-height: 1.15; align-self: flex-start; }
.ev-date span { font-size: 11px; color: #c9c2b3; }
.ev-date b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-weight: 720; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ev-att { font-size: 13px; margin-top: 6px; color: var(--ink-2); }
.att-row { display: inline-flex; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.att { border: 0; background: var(--card); padding: 6px 12px; font-size: 13px; font-weight: 650; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.att:last-child { border-right: 0; }
.att.yes.on { background: var(--yes); color: #fff; }
.att.maybe.on { background: var(--maybe); color: #fff; }
.att.no.on { background: var(--no); color: #fff; }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.att-list li .att-row { margin-top: 0; }
.att-list li.me-row > span { font-weight: 750; color: var(--accent); }
.ev-info p { margin: 0 0 6px; }
.ev-info .memo { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* 통계 타일 */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--bg); border-radius: 11px; padding: 10px 12px; }
.tile span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.tile b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.tile.main { background: var(--navy); color: #f4efe4; }
.tile.main span { color: #c9c2b3; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.sc-hot { color: var(--accent) !important; }
.sc-gold { color: var(--gold) !important; }

/* 게임 리스트 */
.g-list { list-style: none; margin: 0; padding: 0; }
.g-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.g-row:last-child { border-bottom: 0; }
.g-row:hover { background: var(--bg); }
.card:not(.tight) .g-row { padding-left: 0; padding-right: 0; }
.g-name { font-weight: 700; min-width: 64px; }
.g-sub { flex: 1; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-score { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.gm-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
.gm-row:last-child { border-bottom: 0; }
.gm-scores { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.sc-chip { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 4px 9px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); min-width: 48px; }
.sc-chip:hover { border-color: var(--ink-2); }
.sc-chip i { font-style: normal; font-size: 10px; color: var(--accent); margin-left: 2px; vertical-align: 5px; }
.gm-avg { font-size: 12px; color: var(--muted); white-space: nowrap; }
.gm-avg b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .rank th, .rank td { padding-left: 5px; padding-right: 5px; }
  .rank .strong { font-size: 15px; }
  .rank td.name small { display: none; }
  .medal { width: 24px; height: 24px; font-size: 12px; }
}
.grp-h { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.grp-n { margin-left: auto; font-size: 12px; }

/* 포디움 */
.podium { list-style: none; margin: 0; padding: 0; }
.podium li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.podium li:last-child { border-bottom: 0; }
.podium .p-name { font-weight: 700; }
.podium .p-sub { color: var(--muted); font-size: 12px; flex: 1; }
.podium b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 800; background: var(--line-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.medal.m1 { background: #f2c14e; color: #5a3d00; }
.medal.m2 { background: #cfd4dc; color: #3a4252; }
.medal.m3 { background: #e0a878; color: #5a2e0b; }

/* 표 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { font-size: 12px; color: var(--muted); font-weight: 650; text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.strong { font-weight: 800; font-size: 16px; }
td.name { font-weight: 700; }
.rank tbody tr { cursor: pointer; }
.rank tbody tr:hover { background: var(--bg); }
.board tbody tr { cursor: default; }
.board td[data-action] { cursor: pointer; text-decoration: underline dotted var(--line); }
.sortable { cursor: pointer; user-select: none; }
.sortable.on { color: var(--accent); }
.qe th, .qe td { padding: 5px 4px; }
.qe input { width: 64px; padding: 8px 6px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qe .qe-avg { color: var(--muted); font-size: 13px; min-width: 44px; }

/* 구간 선택 */
.seg { display: flex; background: var(--line-2); border-radius: 12px; padding: 3px; margin-bottom: 10px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* 멤버 */
.m-list { list-style: none; margin: 0; padding: 0; }
.m-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.m-list li:last-child { border-bottom: 0; }
.m-list li.inactive { opacity: .55; }
.m-main { flex: 1; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 6px 0; cursor: pointer; min-width: 0; }
.avatar { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #f4efe4; display: grid; place-items: center; font-weight: 800; }
.m-name { font-weight: 700; min-width: 0; }
.m-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 캘린더 */
.cal-h { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.cal-h h2 { margin: 0 4px; min-width: 104px; text-align: center; }
.cal-h .btn:first-of-type { margin-left: auto; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-w span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 650; padding-bottom: 4px; }
.cal-w span:first-child { color: var(--no); } .cal-w span:last-child { color: var(--t-prac); }
.cal-c { aspect-ratio: 1 / 1.05; border: 0; background: var(--bg); border-radius: 9px; padding: 4px 3px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; overflow: hidden; min-width: 0; }
.cal-c.blank { background: transparent; cursor: default; }
.cal-c.sun .cal-d { color: var(--no); } .cal-c.sat .cal-d { color: var(--t-prac); }
.cal-c.today .cal-d { background: var(--accent); color: #fff !important; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-c.sel { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-d { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 22px; }
.cal-dots { display: flex; gap: 2px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cal-t { display: none; font-size: 10.5px; color: var(--ink-2); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
@media (min-width: 600px) { .cal-c { aspect-ratio: 1 / .8; } .cal-t { display: block; } }

/* 그래프 */
.chart { margin: 14px 0 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .avg { stroke: var(--muted); stroke-dasharray: 3 4; stroke-width: 1; }
.chart .sc { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .ma { fill: none; stroke: var(--accent); stroke-width: 2.5; opacity: .75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .pt { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.chart .pt.hot { fill: var(--accent); stroke: var(--accent); }
.chart figcaption { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lg { display: inline-block; width: 14px; height: 0; border-top: 2px solid; margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg.sc { border-color: var(--ink); } .lg.ma { border-color: var(--accent); } .lg.avg { border-top: 1px dashed var(--muted); }

/* 스코어시트 */
.sheet { display: grid; grid-template-columns: repeat(5, 1fr); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; margin: 4px 0 10px; background: var(--card); }
@media (min-width: 640px) { .sheet { grid-template-columns: repeat(9, 1fr) 1.35fr; } }
.fr { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; cursor: text; }
.fr-n { font-size: 11px; font-weight: 700; background: var(--navy); color: #f4efe4; padding: 2px 0; }
.fr input { border: 0; border-radius: 0; background: transparent; text-align: center; font-weight: 800; font-size: 17px; padding: 6px 2px; letter-spacing: .08em; box-shadow: none; text-transform: uppercase; }
.fr input:focus { box-shadow: none; }
.fr-c { font-size: 15px; font-weight: 700; color: var(--ink-2); min-height: 26px; padding-bottom: 4px; font-variant-numeric: tabular-nums; }
.fr.active { background: var(--accent-soft); }
.fr.active .fr-n { background: var(--accent); }
.fr.bad input { color: var(--no); }
.fr.bad { background: #f8d9d4; }
@media (prefers-color-scheme: dark) { .fr.bad { background: #4a2020; } }
.keypad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.keypad button { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px 0; font-size: 18px; font-weight: 750; cursor: pointer; }
.keypad button:active { background: var(--line); }
.keypad button.hot { background: var(--navy); color: #f4efe4; border-color: var(--navy); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sheet-foot b { font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; }

/* 일정 종류 선택 */
.type-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.type-pick input { display: none; }
.type-pick span { display: inline-block; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); font-size: 13px; font-weight: 650; cursor: pointer; color: var(--muted); }
.type-pick input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }

/* 빈 상태 */
.empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: 14px; }
.empty p { margin: 0 0 10px; }
.card .empty { padding: 14px 8px; }

/* 모달 */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 26, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 12px 8px 18px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 18px; font-weight: 780; }
.modal-b { padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 20px; } .modal { border-radius: 18px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

/* 토스트 */
#toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--navy); color: #f4efe4; padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--no); }

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  repeating-linear-gradient(90deg, transparent 0 38px, rgba(0,0,0,.035) 38px 40px), linear-gradient(180deg, var(--wood), var(--bg)); }
.login-card { width: 100%; max-width: 340px; background: var(--card); border-radius: 20px; padding: 28px 24px; text-align: center; box-shadow: 0 20px 50px -20px rgba(20,32,58,.45); }
.login-card h1 { font-size: 30px; font-weight: 850; letter-spacing: -0.04em; margin-top: 6px; }
.login-card p { margin: 2px 0 18px; }
.login-card form { text-align: left; }
.lane-art { color: var(--ink); }

/* 계정 / 알림 */
.me-btn { display: flex; align-items: center; gap: 8px; background: var(--navy-2); border: 1px solid #34406a; color: #f4efe4; border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; position: relative; font-weight: 650; font-size: 14px; }
.me-btn .chip { background: rgba(255,255,255,.12); color: #f4efe4; }
.me-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.sm { flex: 0 0 28px; width: 28px; height: 28px; font-size: 13px; background: var(--accent); }
.avatar.admin { background: var(--accent); }
.bell-dot { position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--maybe); border: 2px solid var(--navy); }
.auth-seg { margin: 4px 0 16px; }
.field > span small { font-weight: 500; color: var(--muted); opacity: .85; margin-left: 4px; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; text-align: left; margin: 0 0 12px !important; }
.center { text-align: center; }
.att-label { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 650; padding: 5px 12px; border-radius: 9px; background: var(--line-2); color: var(--muted); }
.att-list .att-label { margin-top: 0; }
.att-label.yes { background: var(--yes); color: #fff; }
.att-label.maybe { background: var(--maybe); color: #fff; }
.att-label.no { background: var(--no); color: #fff; }
.toggles { list-style: none; margin: 12px 0 0; padding: 0; }
.toggles li { border-bottom: 1px solid var(--line-2); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { flex: 0 0 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--yes); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.temp-pw { margin-top: 14px; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; font-size: 15px; }
.temp-pw b { font-size: 20px; letter-spacing: .05em; }
.me-head { display: flex; align-items: center; gap: 12px; }
.m-main.static { cursor: default; }
.ok { color: var(--yes); font-weight: 650; }
.push-hint .row-btns { margin-top: 8px; }

/* 실시간 연결 표시 */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; margin-left: -2px; align-self: flex-start; margin-top: 4px; transition: background .3s; }
.live-dot.on { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .2); animation: livepulse 2.4s ease-in-out infinite; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 5px rgba(61, 220, 132, 0); } }
