/* DWNC — one mobile canvas at every viewport; original sport controls retained. */
:root {
  --bg: #e3e5ea; --card: rgba(255,255,255,.5); --paper: #f9faf9;
  --ink: #1a1c21; --ink2: #59606a; --ink3: #626873;
  --line: rgba(26,28,33,.12); --line2: rgba(26,28,33,.2);
  --green: #347f42; --green2: #2c6d39; --deep: #1a1c21; --green-soft: rgba(62,154,80,.13); --lime: #c7e78a;
  --tennis: #78b23a; --tennis-soft: #eef6e0; --tennis-ink: #3b6912;
  --futsal: #d38a3d; --futsal-soft: #f9ecdb; --futsal-ink: #87511a;
  --running: #2c9c7a; --running-soft: #ddf2ea; --running-ink: #186450;
  --warn: #b5841c; --warn-soft: #fbf0d6; --bad: #bf5238; --bad-soft: #fbe7e1;
  --r: 22px; --r-sm: 14px;
  --shadow: 0 12px 28px rgba(60,66,84,.08), inset 0 1px 0 rgba(255,255,255,.9);
  --shadow-up: 0 16px 32px rgba(60,66,84,.12), inset 0 1px 0 rgba(255,255,255,.95);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: light;
  color: var(--ink); background: var(--bg); font-synthesis: none; -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-width: 0; background: #e3e5ea; }
#app { width: 100%; max-width: 390px; min-height: 100dvh; margin-inline: auto; background: var(--bg); }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8cc152; outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; display: block; }
.main { min-width: 0; }
.record-book { margin-top: 14px; }
.profile-sport-details { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.profile-sport-details summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.profile-sport-details .bsports { margin-top: 12px; }
.side { display: none; }
.brand { display:inline-flex; align-items:center; gap:6px; font-weight:900; font-size:24px; letter-spacing:-.065em; color:var(--deep); }
.brand img { width:28px; height:28px; flex:none; }
.top .brand { flex:none; font-size:20px; gap:4px; }
.top .brand img { width:24px; height:24px; }
.top .who { min-width:0; max-width:104px; }
.top .who strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:350px) {
  .top { padding-inline:10px; gap:6px; }
  .top .brand { font-size:19px; }
  .top .who { max-width:88px; padding-right:7px; }
  .top .icon-btn { width:36px; height:36px; min-width:36px; flex:none; }
}
.brand span { color: #8cc152; margin-left: 2px; font-size: .8em; vertical-align: .25em; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 16px; background: #eef1f4e6; backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid #14342a0d; }
.demo-tag { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--green); background: var(--green-soft); padding: 3px 6px; border-radius: 6px; }
.top__spacer { flex: 1; }
.who { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; transition: box-shadow .2s; }
.who:hover { box-shadow: inset 0 0 0 1px var(--line2), var(--shadow); }
.who .ic { width: 16px; height: 16px; color: var(--ink3); }
.who select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.content { width: 100%; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.banner { display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: #7a5a14; font-size: 13px; font-weight: 700; }
.banner.bad { background: var(--bad-soft); color: #8a3420; }
.tabbar { position: fixed; z-index: 30; left: 50%; width: min(390px, 100%); transform: translateX(-50%); bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: #ffffffeb; backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 14px; color: var(--ink3); font-size: 11px; font-weight: 700; transition: color .2s, background .25s var(--ease); }
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a.active { color: var(--green); background: var(--green-soft); }
.tabbar.moved a.active .ic, .side.moved a.active .ic { animation: pop .45s var(--spring); }
.dot-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px var(--card); animation: pop .4s var(--spring); }


/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 800; font-size: 15px; white-space: nowrap; transition: transform .14s var(--ease), background .2s, box-shadow .2s, color .2s; user-select: none; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px #1d5a3c33; }
.btn.primary:hover { background: var(--green2); box-shadow: 0 8px 22px #1d5a3c44; }
.btn.soft { background: var(--green-soft); color: var(--green); }
.btn.soft:hover { background: #dbe9cf; }
.btn.ghost { background: var(--card); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--line2); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.ghost.danger { background: var(--card); color: var(--bad); }
.btn.sm { min-height: 38px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn.wide { flex: 1; }
.btn:active, .icon-btn:active, .mcard:active, .row:active, .today:active, .gcard:active, .person:active, .link-tile:active, .stamp:active, .podium__spot:active, .playcard:active, .seg button:active, .host:active { transform: scale(.96); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--card); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .14s var(--ease), background .2s, color .2s, box-shadow .2s; }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2), var(--shadow); }
.icon-btn.on { background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px #c9ddb8; }
.icon-btn.solid { background: var(--green); color: #fff; box-shadow: none; }
.icon-btn.solid.ok { background: var(--green); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.bell.has .ic { animation: ring-bell 1.2s var(--ease) .3s; transform-origin: 50% 10%; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; margin: 28px auto 0; padding: 10px 14px; border-radius: 10px; color: var(--ink3); font-size: 13px; font-weight: 700; transition: color .2s, background .2s; }
.text-btn:hover { color: var(--bad); background: var(--bad-soft); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--green-soft); color: var(--green); }
.pill .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.pill.open { background: var(--lime); color: var(--deep); }
.pill.done { background: #dcefd0; color: #2f6a1e; }
.pill.wait { background: var(--warn-soft); color: #8a6312; }
.pill.bad { background: var(--bad-soft); color: #9a3b24; }
.pill.mute { background: #eceee8; color: #77847a; }
.pill.mine { background: #e2ebf2; color: #2f5873; }
.pill.ghost { background: #ffffff1a; color: #e3efda; }
.avatar { --s: 36px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; background: #d9edb9; color: #346c3d; font-weight: 900; font-size: calc(var(--s) * .42); box-shadow: 0 0 0 2px var(--card); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { --s: 24px; } .avatar.sm { --s: 30px; } .avatar.md { --s: 44px; } .avatar.lg { --s: 56px; }
.avatar.more { background: #eceee8; color: var(--ink2); font-size: 10px; }
.stack { display: inline-flex; }
.stack .avatar + .avatar { margin-left: -8px; }
.sport { --c: var(--tennis); --soft: var(--tennis-soft); width: 36px; height: 36px; flex: none; border-radius: 12px; display: inline-grid; place-items: center; background: var(--soft); color: var(--c); }
.sport .ic { width: 21px; height: 21px; }
.sport.futsal { --c: var(--futsal); --soft: var(--futsal-soft); }
.sport.running { --c: var(--running); --soft: var(--running-soft); }
.sport.xs { width: 24px; height: 24px; border-radius: 8px; } .sport.xs .ic { width: 15px; height: 15px; }
.sport.lg { width: 48px; height: 48px; border-radius: 15px; } .sport.lg .ic { width: 28px; height: 28px; }
.meta { display: inline-flex; align-items: center; gap: 5px; color: var(--ink2); font-size: 13px; font-weight: 600; min-width: 0; }
.meta .ic { width: 15px; height: 15px; color: var(--ink3); }
.meta .ic:not(:first-child) { margin-left: 6px; }
.seats { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--ink2); }
.seats i { width: 9px; height: 9px; border-radius: 50%; background: #e3e8dd; box-shadow: inset 0 0 0 1.5px #cbd5c3; }
.seats i.on { background: var(--green); box-shadow: none; }
.seats .ic { width: 15px; height: 15px; }
.chev { width: 18px; height: 18px; color: var(--ink3); transition: transform .2s var(--ease); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 34px 16px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink3); text-align: center; grid-column: 1 / -1; }
.empty > .ic { width: 34px; height: 34px; stroke-width: 1.6; color: #b7c4b1; }
.empty p { font-size: 14px; font-weight: 700; color: var(--ink2); }
.empty .btn { margin: 0 3px; }
.hint { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: #8a6312; font-size: 13px; font-weight: 700; }

/* ---------- page heads & blocks ---------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.head h1 { font-size: 28px; font-weight: 900; letter-spacing: -.05em; }
.head__actions { display: flex; gap: 8px; }
.head .btn > span { display: none; } .head .btn { width: 46px; padding: 0; }
.block { margin-top: 26px; }
.block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block__head h2, .sub { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 900; letter-spacing: -.04em; }
.sub { font-size: 16px; margin: 0 0 10px; }
.sub .ic { color: var(--ink3); }
.sub b { color: var(--green); }
.more { display: inline-flex; align-items: center; gap: 2px; color: var(--ink2); font-size: 13px; font-weight: 800; padding: 8px; border-radius: 10px; }
.more:hover { background: var(--green-soft); color: var(--green); }
.more .ic { width: 16px; height: 16px; }

/* ---------- home ---------- */
.hero { padding: 10px 0 18px; }
.hero h1 { font-size: clamp(32px, 8.5vw, 46px); line-height: 1.12; font-weight: 900; letter-spacing: -.065em; }
.hero h1 em { font-style: normal; color: #6aa338; }
.hero__actions { display: flex; gap: 8px; margin-top: 18px; }
.hero__actions .btn { flex: 1; }
.playcard { position: relative; display: block; overflow: hidden; isolation: isolate; padding: 18px; border-radius: 22px; background: var(--deep); color: #eef6e6; box-shadow: 0 16px 36px #173d2c33; transition: transform .25s var(--ease), box-shadow .25s; }
.playcard::after { content: ""; position: absolute; z-index: -1; width: 240px; height: 240px; right: -90px; top: -120px; border-radius: 50%; background: radial-gradient(circle, #c7e78a26, transparent 70%); }
.playcard:hover { transform: translateY(-2px); box-shadow: 0 22px 44px #173d2c40; }
.playcard__body { display: flex; align-items: center; gap: 16px; }
.ring { --size: 104px; flex: none; width: var(--size); height: var(--size); border-radius: 50%; background: var(--ring); display: grid; place-items: center; animation: ring-in .9s var(--ease) both; }
.ring > span { width: calc(var(--size) - 24px); height: calc(var(--size) - 24px); border-radius: 50%; background: var(--deep); display: grid; place-content: center; text-align: center; }
.ring strong { font-size: 32px; line-height: 1; font-weight: 900; letter-spacing: -.05em; color: #fff; }
.ring small { font-size: 11px; font-weight: 700; color: #a5c89d; margin-top: 3px; }
.playcard__who { display: grid; gap: 6px; min-width: 0; }
.playcard__who .avatar { box-shadow: 0 0 0 3px #2c5a41; }
.playcard__who strong { font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
.playcard__meta { display: flex; flex-wrap: wrap; gap: 5px; }
.playcard__tag { position: absolute; top: 16px; right: 16px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--deep); background: var(--lime); }
.tiles { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.tile { --c: var(--lime); display: grid; gap: 3px; padding: 11px 12px; border-radius: 14px; background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff14; animation: rise .5s var(--ease) both; }
.tile:nth-child(2) { animation-delay: .06s; } .tile:nth-child(3) { animation-delay: .12s; }
.tile.futsal { --c: #eac79a; } .tile.running { --c: #8fd6bd; }
.tile .ic { color: var(--c); width: 20px; height: 20px; }
.tile strong { font-size: 22px; font-weight: 900; letter-spacing: -.05em; color: var(--c); line-height: 1.1; }
.tile small { font-size: 11px; color: #a8bfa6; font-weight: 700; }
.today-sum { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.today-sum .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--c, var(--tennis)); }
.today-sum .dot.on { background: var(--c, var(--tennis)); }
.dot.tennis { --c: var(--tennis); } .dot.futsal { --c: var(--futsal); } .dot.running { --c: var(--running); }
.today-sum b { font-size: 13px; color: var(--ink3); margin-left: 3px; }
.today-list { display: grid; gap: 8px; }
.today { --c: var(--tennis); position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.today::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.today.futsal { --c: var(--futsal); } .today.running { --c: var(--running); }
.today:hover { box-shadow: var(--shadow-up); transform: translateY(-1px); }
.today__time { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; width: 46px; }
.today__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.today__body strong { font-size: 15px; font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.today__res { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px; background: #dcefd0; color: #2f6a1e; font-size: 12px; font-weight: 800; white-space: nowrap; }
.today__res .ic { width: 13px; height: 13px; stroke-width: 2.8; }
.today.is-done .today__time { color: var(--ink3); text-decoration: line-through; text-decoration-thickness: 2px; }
.note { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 6px 6px 14px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.note:focus-within { box-shadow: inset 0 0 0 2px #9fcf6a, var(--shadow); }
.note > .ic { color: var(--ink3); }
.note input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; padding: 10px 0; }
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* ---------- match card ---------- */
.mcard { --c: var(--tennis); --soft: var(--tennis-soft); position: relative; display: grid; gap: 7px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s; }
.mcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); opacity: .85; }
.mcard.futsal { --c: var(--futsal); --soft: var(--futsal-soft); } .mcard.running { --c: var(--running); --soft: var(--running-soft); }
.mcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.mcard:hover .chev { transform: translateX(3px); color: var(--ink); }
.mcard__top { display: flex; align-items: center; gap: 8px; }
.mcard__kind { font-size: 12px; font-weight: 800; color: var(--ink3); }
.mcard__vis { display: inline-grid; color: var(--ink3); }
.mcard__vis .ic { width: 15px; height: 15px; }
.mcard__top .pill { margin-left: auto; }
.mcard__title { font-size: 17px; font-weight: 900; letter-spacing: -.035em; line-height: 1.35; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard__foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.mcard__foot .level { font-size: 12px; font-weight: 800; color: var(--ink3); }
.mcard__foot .chev { margin-left: auto; }
.fits { display: flex; flex-wrap: wrap; gap: 5px; }
.fit { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #eef3e8; color: #46684c; white-space: nowrap; }
.fit .ic { width: 14px; height: 14px; }
.fit.friend, .fit.group, .fit.together { background: var(--green); color: #e4f6b9; }
.fit.new { background: var(--warn-soft); color: #8a6312; }
.fit.manner .ic { color: #d8a11e; }

/* ---------- segmented, filters ---------- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: #e9ece4; }
.seg button, .seg label { position: relative; flex: 1; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 10px; border-radius: 12px; font-size: 14px; font-weight: 800; color: var(--ink2); cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s, transform .14s var(--ease); }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px #14342a1a; }
.seg .s-tennis[aria-pressed="true"] .ic, .seg label.s-tennis:has(input:checked) .ic { color: var(--tennis); }
.seg .s-futsal[aria-pressed="true"] .ic, .seg label.s-futsal:has(input:checked) .ic { color: var(--futsal); }
.seg .s-running[aria-pressed="true"] .ic, .seg label.s-running:has(input:checked) .ic { color: var(--running); }
.seg button[aria-pressed="true"] .ic, .seg label:has(input:checked) .ic { animation: pop .4s var(--spring); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg.mini { padding: 3px; border-radius: 12px; }
.seg.mini button, .seg.mini label { min-height: 34px; font-size: 13px; padding: 0 12px; border-radius: 9px; }
.sports-seg button span, .sports-seg label span { font-size: 13px; } .sports-seg button, .sports-seg label { gap: 4px; padding: 0 6px; }
.filters { display: grid; gap: 8px; margin: 12px 0 14px; }
.filters__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink3); transition: box-shadow .2s; }
.search:focus-within { box-shadow: inset 0 0 0 2px #9fcf6a, var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.chip-select { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink3); max-width: 100%; }
.chip-select select { border: 0; outline: 0; background: transparent; font-weight: 800; font-size: 14px; color: var(--ink); padding: 8px 4px; max-width: 150px; }
.toggle-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 800; color: var(--ink2); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.toggle-chip input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-chip .ic { width: 15px; height: 15px; stroke-width: 3; opacity: 0; width: 0; transition: opacity .2s, width .2s var(--ease); }
.toggle-chip:has(input:checked) { background: var(--green); color: #fff; box-shadow: none; }
.toggle-chip:has(input:checked) .ic { opacity: 1; width: 15px; }
.toggle-chip:has(input:focus-visible) { outline: 3px solid #8cc152; outline-offset: 2px; }
.filters__row .icon-btn { margin-left: auto; }
.filters__more { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); animation: drop .3s var(--ease); }
.filters__more label { display: grid; gap: 5px; font-size: 12px; font-weight: 800; color: var(--ink3); }
.filters__more .btn { align-self: end; }
.count { font-size: 13px; font-weight: 900; color: var(--ink3); margin: 0 2px 8px; }

/* ---------- lists ---------- */
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
button.row:hover, label.row:hover { box-shadow: var(--shadow-up); transform: translateY(-1px); }
button.row:hover .chev { transform: translateX(3px); }
.row.static { box-shadow: inset 0 0 0 1px var(--line); }
.row__body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.row__body strong { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__body .meta { flex-wrap: wrap; }
.row__end { display: flex; align-items: center; gap: 6px; flex: none; }
.row__res { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #2f6a1e; }
.row__res .ic { width: 14px; height: 14px; stroke-width: 2.8; }
.row__person { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }
.content[data-page="activity"] .row__end { flex-direction: column; align-items: flex-end; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.stat .ic { color: var(--ink3); width: 18px; height: 18px; }
.stat strong { font-size: 26px; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat small { font-size: 12px; font-weight: 700; color: var(--ink3); }
.stat.hot { background: var(--warn-soft); }
.stat.hot .ic, .stat.hot strong { color: #8a6312; }
.notice { position: relative; }
.notice__dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; flex: none; }
.notice.unread { box-shadow: inset 3px 0 0 var(--green), var(--shadow); }
.notice.unread .notice__dot { background: var(--green); animation: pop .5s var(--spring); }
.notice:not(.unread) strong { font-weight: 600; color: var(--ink2); }
.notice .row__body strong { white-space: normal; }

/* ---------- ranking ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 16px 0 14px; }
.podium__spot { position: relative; display: grid; justify-items: center; gap: 4px; flex: 1; max-width: 170px; text-align: center; transition: transform .2s var(--ease); }
.podium__spot strong { font-size: 14px; font-weight: 800; }
.podium__spot b { font-size: 20px; font-weight: 900; letter-spacing: -.04em; color: var(--green); }
.podium__spot small { font-size: 12px; color: var(--ink3); font-weight: 700; }
.podium__bar { width: 100%; margin-top: 6px; border-radius: 14px 14px 6px 6px; background: linear-gradient(#dfeecd, #eef5e5); height: 54px; transform-origin: bottom; animation: grow .7s var(--ease) both; }
.podium__spot.p1 .podium__bar { height: 92px; background: linear-gradient(var(--lime), #e7f3cf); animation-delay: .1s; }
.podium__spot.p2 .podium__bar { height: 68px; animation-delay: .2s; }
.podium__spot.p3 .podium__bar { height: 48px; animation-delay: .3s; }
.medal { position: absolute; top: -6px; right: calc(50% - 38px); z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; background: #b8c3b2; box-shadow: 0 0 0 2px var(--bg); }
.p1 .medal { background: #e0aa1f; } .p2 .medal { background: #9aa7ad; } .p3 .medal { background: #c78450; }
.podium__spot.p1 .avatar { --s: 68px; box-shadow: 0 0 0 3px var(--lime), 0 0 0 5px var(--bg); }
.podium__spot.me strong::after { content: "나"; margin-left: 4px; padding: 1px 6px; border-radius: 6px; font-size: 11px; background: var(--green); color: #fff; }
.rank__n { width: 22px; text-align: center; font-weight: 900; color: var(--ink3); }
.rank__v { display: grid; text-align: right; }
.rank__v b { font-size: 17px; font-weight: 900; }
.rank__v small { font-size: 11px; color: var(--ink3); font-weight: 700; }
.row.me { box-shadow: inset 3px 0 0 var(--green), var(--shadow); }

/* ---------- people, groups, profile links ---------- */
.code-card { display: flex; align-items: center; gap: 10px; padding: 16px 16px 16px 18px; border-radius: var(--r); background: var(--deep); color: #eef6e6; }
.code-card__label { font-size: 12px; font-weight: 800; color: #a5c89d; }
.code-card strong { flex: 1; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 20px; letter-spacing: .04em; }
.code-card .icon-btn { background: #ffffff14; color: #eef6e6; box-shadow: none; }
.send-row { display: flex; gap: 8px; margin-top: 10px; }
.send-row .search { flex: 1; }
.send-row .icon-btn { width: 48px; height: 48px; border-radius: 14px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.person { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.person:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.person strong { font-size: 14px; font-weight: 800; }
.person__sports { display: flex; gap: 3px; }
.people.compact { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.people.compact .person { padding: 10px 6px; box-shadow: inset 0 0 0 1px var(--line); }
.people.compact .person strong { font-size: 12px; }
.gcard { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
.gcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.gcard__mark { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.gcard.member .gcard__mark { background: var(--green); color: var(--lime); }
.gcard__body { display: grid; gap: 3px; flex: 1; min-width: 0; }
.gcard__body strong { font-size: 16px; font-weight: 900; }
.gcard__body small { font-size: 13px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.link-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-weight: 800; transition: transform .2s var(--ease), box-shadow .2s; }
.link-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.link-tile > .ic { width: 22px; height: 22px; color: var(--green); }
.link-tile > b:not(.dot-count) { margin-left: auto; font-size: 20px; font-weight: 900; }
.link-tile .dot-count { top: -6px; right: -6px; }
.content[data-page="profile"] { display: flex; flex-direction: column; }
.content[data-page="profile"] > .text-btn { align-self: center; }

/* ---------- profile book ---------- */
.book { --paper: #fffdf6; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); border-radius: 22px; box-shadow: 0 0 0 1px #e2e7d6, 0 16px 36px #173d2c14; overflow: hidden; }
.page { padding: 20px 18px; min-width: 0; }
.page.id { border-bottom: 1.5px dashed #d6dfc8; }
.page__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.brandmark { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: #7c9a6c; }
.no { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; font-weight: 700; color: #2f5a3c; }
.id__main { display: flex; gap: 16px; align-items: flex-start; }
.photo { flex: none; width: 92px; height: 116px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: #d7efa7; color: #3a7241; font-size: 38px; font-weight: 900; box-shadow: inset 0 0 0 1px #c4dc9e; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.id__fields { display: grid; gap: 6px; min-width: 0; }
.id__fields > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--ink2); }
.id__fields .ic { width: 15px; height: 15px; color: #98a98f; }
.id__name { font-size: 26px; font-weight: 900; letter-spacing: -.05em; line-height: 1.15; margin-bottom: 2px; }
.together { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--green); color: #e4f6b9; font-size: 12px; }
.together .ic { color: #e4f6b9 !important; width: 13px !important; height: 13px !important; }
.bio { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #f1f6e8; font-size: 14px; line-height: 1.55; color: #45624b; }
.bsports { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.bsport { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e8ecdf; }
.bsport__name { display: grid; gap: 1px; flex: 1; min-width: 0; }
.bsport__name strong { font-size: 15px; font-weight: 900; }
.bsport__name em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ink3); margin-left: 6px; }
.bsport__name small, .bsport__metric small { font-size: 12px; color: var(--ink3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bsport__metric { display: grid; text-align: right; }
.bsport__metric b { font-size: 19px; font-weight: 900; letter-spacing: -.04em; }
.mrz { margin-top: 16px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; letter-spacing: .16em; color: #a9b6a0; white-space: nowrap; overflow: hidden; }
.stamp-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 900; color: var(--ink2); }
.stamp-count .ic { width: 14px; height: 14px; color: #98a98f; }
.stamp-count .ic:not(:first-child) { margin-left: 6px; }
.stamp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; justify-items: center; }
.stamp { --c: var(--tennis); width: 100%; max-width: 112px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 1px; padding: 10px; text-align: center; color: var(--ink); border: 2px dashed var(--c); box-shadow: inset 0 0 0 5px var(--paper, #fffdf6), inset 0 0 0 6.5px var(--c); transform: rotate(var(--tilt, 0deg)); animation: stamp-pop .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms); transition: transform .2s var(--ease); }
button.stamp:hover { transform: rotate(0deg) scale(1.06); }
.stamp.futsal { --c: var(--futsal); } .stamp.running { --c: var(--running); }
.stamp > .ic { width: 18px; height: 18px; color: var(--c); }
.stamp strong { font-size: 11px; font-weight: 900; line-height: 1.2; max-width: 80px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stamp span { font-size: 11px; font-weight: 900; color: var(--c); }
.stamp em { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: 10px; color: #7b8c7b; }
.stamp.private, .stamp.next, .stamp.more { --c: #c3ccbc; color: #94a290; }
.stamp.next > .ic { width: 26px; height: 26px; color: #b4bfae; }
.stamp.more { border-style: solid; box-shadow: none; font-size: 14px; font-weight: 900; }
.stamp.fresh { animation: stamp-land .8s var(--spring) .25s both; }
.book.compact { box-shadow: 0 0 0 1px #e2e7d6; }
.book.compact .page { padding: 16px; }
.book.compact .photo { width: 76px; height: 96px; font-size: 32px; }
.book.compact .id__name { font-size: 22px; }

/* ---------- editor & forms ---------- */
.panel { margin-bottom: 16px; padding: 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.edit-panel { animation: drop .35s var(--ease); }
.form, .editor { display: grid; gap: 14px; }
.form label, .editor label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ink2); }
.form label > .ic { display: none; }
.form label:has(> .ic) { grid-template-columns: auto 1fr; align-items: center; column-gap: 5px; }
.form label:has(> .ic) > .ic { display: inline-block; width: 15px; height: 15px; color: var(--ink3); }
.form label:has(> .ic) > input, .form label:has(> .ic) > select, .form label:has(> .ic) > textarea { grid-column: 1 / -1; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 0; background: #f4f6f0; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-weight: 600; color: var(--ink); outline: 0; transition: box-shadow .2s, background .2s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { background: #fff; box-shadow: inset 0 0 0 2px #9fcf6a; }
.note input, .search input, .chip-select select { min-height: 0; padding-left: 0; padding-right: 0; box-shadow: none !important; background: transparent !important; }
.chip-select select { padding: 8px 4px; }
.grid2, .grid3 { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 5px; padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--ink2); }
legend .ic { width: 15px; height: 15px; color: var(--ink3); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick legend { width: 100%; }
.pick-chip { position: relative; display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 6px !important; height: 42px; padding: 0 14px 0 10px; border-radius: 999px; background: #f1f4ec; color: var(--ink2) !important; font-size: 14px !important; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s, transform .14s var(--ease); }
.pick-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chip .ic { width: 18px; height: 18px; }
.pick-chip:has(input:checked) { background: var(--green); color: #fff !important; box-shadow: 0 4px 12px #1d5a3c33; }
.pick-chip:has(input:focus-visible) { outline: 3px solid #8cc152; outline-offset: 2px; }
.pick-chip:active { transform: scale(.95); }
.pick-chip.person-chip { padding-left: 5px; }
.pick-chip.person-chip:not(:has(input:checked)) .avatar { filter: grayscale(1); opacity: .6; }
.pick-chip.s-tennis:has(input:checked) { background: var(--tennis); } .pick-chip.s-futsal:has(input:checked) { background: var(--futsal); } .pick-chip.s-running:has(input:checked) { background: var(--running); }
.photo-row { display: flex; align-items: center; gap: 10px; }
.photo-row label.btn { display: inline-flex; color: var(--green); }
.sport-edit { padding: 14px; border-radius: 14px; background: #f7f9f3; box-shadow: inset 3px 0 0 var(--c, var(--tennis)); }
.sport-edit.s-futsal { --c: var(--futsal); } .sport-edit.s-running { --c: var(--running); }
.sport-edit legend .ic { color: var(--c, var(--tennis)); width: 18px; height: 18px; }
.sticky-actions, .sheet__actions { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; margin: 4px -18px -18px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(#ffffff00, #fff 22%); }
.toggle-chip { position: relative; }

/* ---------- sheet (modal) ---------- */
.backdrop { position: fixed; top: 0; bottom: 0; left: 50%; width: min(390px, 100%); transform: translateX(-50%); z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: #0f241b73; backdrop-filter: blur(2px); overflow: auto; overscroll-behavior: contain; }
.sheet-wrap { width: 100%; max-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet { position: relative; width: 100%; max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; padding: 8px 18px 18px; border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -10px 40px #0f241b33; outline: 0; }
.grip { display: block; width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: #dfe4d9; }
.sheet__head { position: sticky; top: -8px; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 0 -18px 12px; padding: 8px 14px 10px 18px; background: #fffffff2; backdrop-filter: blur(8px); }
.sheet__head h2 { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 20px; font-weight: 900; letter-spacing: -.04em; line-height: 1.3; }
.sheet__head h2 .ic { color: var(--green); }
.sheet__head .icon-btn { width: 40px; height: 40px; box-shadow: none; background: #f1f4ec; }
.sheet > .block:first-of-type { margin-top: 18px; }
.sheet .block { margin-top: 18px; }
.detail-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.detail-top__kind { font-size: 14px; font-weight: 800; color: var(--ink2); }
.detail-top .pill { margin-left: auto; }
.sheet .fits { margin-bottom: 12px; }
.info { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: #f5f7f1; }
.info > span { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; flex-wrap: wrap; }
.info .ic { width: 18px; height: 18px; color: var(--ink3); }
.info .seats { margin-left: 4px; }
.host { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, transform .14s var(--ease); }
.host:hover { background: #f7f9f3; }
.host__who { display: grid; flex: 1; text-align: left; }
.host strong { font-size: 15px; font-weight: 800; }
.host small { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.host small .ic { width: 14px; height: 14px; color: #d8a11e; }
.desc { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.result-box { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: #dcefd0; color: #24561a; animation: drop .4s var(--ease); }
.result-box > .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.result-box strong { font-size: 18px; font-weight: 900; flex: 1; }
.result-box small { display: flex; align-items: center; gap: 4px; font-weight: 800; }
.breakdown { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.breakdown li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.breakdown li:nth-child(odd) { background: #f6f8f2; }
.breakdown li b { margin-left: auto; font-size: 13px; }
.breakdown li small { width: 100%; padding-left: 32px; color: var(--ink3); font-weight: 600; }
.breakdown li.absent { color: var(--ink3); }
.stars { display: inline-flex; gap: 2px; }
.stars button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #d6dccf; transition: color .12s, transform .14s var(--spring); }
.stars button .ic { width: 22px; height: 22px; fill: currentColor; stroke-width: 1.5; }
.stars:hover button { color: #e6b73a; }
.stars button:hover ~ button { color: #d6dccf; }
.stars button:hover { transform: scale(1.18); }
.stars button:focus-visible { color: #e6b73a; }
.teams { display: grid; gap: 6px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 14px; background: #f5f7f1; font-weight: 800; }
.team-row > span:nth-child(2) { flex: 1; }
.ab { background: #e6eadf; }
.ab label:has(input:checked) { background: var(--green); color: #fff; box-shadow: none; }
.score { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border-radius: 18px; background: #f5f7f1; }
.score label { display: grid; justify-items: center; gap: 4px; font-size: 12px; }
.score input { width: 84px !important; height: 64px; text-align: center; font-size: 30px !important; font-weight: 900 !important; background: #fff !important; font-variant-numeric: tabular-nums; }
.score b { font-size: 28px; font-weight: 900; color: var(--ink3); }
.entries { display: grid; gap: 6px; }
.entry { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; padding: 8px 8px 8px 10px; border-radius: 14px; background: #f5f7f1; font-size: 14px !important; color: var(--ink) !important; flex-wrap: wrap; }
.entry > span:not(.avatar) { font-weight: 800; min-width: 52px; }
.entry > input { flex: 1; min-height: 40px !important; background: #fff !important; }
.entry.run label { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 92px; }
.entry.run label input { min-height: 40px; background: #fff; text-align: right; }
.entry.run i { font-style: normal; font-size: 12px; color: var(--ink3); font-weight: 800; }
.entry.run .review { width: 100%; min-height: 40px; background: #fff; }
.card-preview { width: 100%; border-radius: 16px; box-shadow: var(--shadow); animation: drop .4s var(--ease); }
.loading { display: grid; place-items: center; padding: 40px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--green-soft); border-top-color: var(--green); animation: spin .8s linear infinite; }
.confirm { display: grid; justify-items: center; gap: 10px; padding: 12px 6px 6px; text-align: center; font-size: 15px; line-height: 1.5; color: var(--ink2); }
.confirm > .ic { width: 40px; height: 40px; color: var(--bad); stroke-width: 1.8; }
.mini-ranks { display: grid; gap: 6px; margin-top: 14px; }
.mini-ranks > div { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; }
.mini-ranks > div > span:not(.sport) { display: inline-flex; align-items: center; gap: 4px; }
.mini-ranks span b { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 11px; }
.pick-row { cursor: pointer; }
.pick-row input { width: 20px; height: 20px; accent-color: var(--green); }
.pick-row:has(input:checked) { box-shadow: inset 0 0 0 2px var(--green), var(--shadow); }

/* ---------- toast & celebration ---------- */
.toast { position: fixed; z-index: 90; left: 50%; width: max-content; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; max-width: min(358px, calc(100vw - 32px)); padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--deep); color: #eef6e6; font-size: 14px; font-weight: 800; box-shadow: 0 14px 34px #0f241b4d; opacity: 0; transform: translate(-50%, 16px) scale(.96); transition: opacity .22s, transform .3s var(--spring); pointer-events: none; }
.toast .ic { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--lime); color: var(--deep); stroke-width: 3; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { background: #7d2f1c; border-radius: 18px; }
.toast.error .ic { background: #ffd9cc; color: #7d2f1c; }
.dialog-open .toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -16px) scale(.96); }
.dialog-open .toast.show { transform: translate(-50%, 0) scale(1); }
.celebrate { position: fixed; top: 0; bottom: 0; left: 50%; width: min(390px, 100%); transform: translateX(-50%); z-index: 95; display: grid; justify-items: center; align-items: end; padding-bottom: 110px; overflow: hidden; animation: fade .2s both; pointer-events: none; }
.celebrate__stamp { pointer-events: auto; cursor: pointer; }
.celebrate.out { animation: fade-out .28s both; }
.celebrate__stamp.stamp { --paper: #fffdf6; width: 168px; max-width: none; padding: 18px; background: var(--paper); box-shadow: inset 0 0 0 7px var(--paper), inset 0 0 0 9px var(--c), 0 24px 50px #0f241b55; animation: stamp-land .75s var(--spring) both; transform: rotate(-6deg); }
.celebrate__stamp > .ic { width: 30px; height: 30px; }
.celebrate__stamp strong { font-size: 16px; max-width: 120px; }
.celebrate__stamp span { font-size: 15px; }
.celebrate__stamp em { font-size: 12px; }
.spark { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 2px; background: var(--lime); transform: rotate(var(--a)) translateY(0); animation: burst .8s var(--ease) .32s both; }
.spark:nth-child(3n) { background: #8fd6bd; } .spark:nth-child(3n+1) { background: #eac79a; }

/* ---------- motion ---------- */
.content.enter > * { animation: rise .42s var(--ease) both; }
.content.enter > *:nth-child(2) { animation-delay: .04s; } .content.enter > *:nth-child(3) { animation-delay: .08s; } .content.enter > *:nth-child(4) { animation-delay: .12s; } .content.enter > *:nth-child(5) { animation-delay: .16s; } .content.enter > *:nth-child(n+6) { animation-delay: .2s; }
.content.enter .cards > *, .cards.enter > *, .content.enter .rows > *, .content.enter .today-list > * { animation: rise .4s var(--ease) both; }
.cards > *:nth-child(2), .rows > *:nth-child(2), .today-list > *:nth-child(2) { animation-delay: .05s; }
.cards > *:nth-child(3), .rows > *:nth-child(3), .today-list > *:nth-child(3) { animation-delay: .1s; }
.cards > *:nth-child(4), .rows > *:nth-child(4), .today-list > *:nth-child(4) { animation-delay: .15s; }
.cards > *:nth-child(n+5), .rows > *:nth-child(n+5) { animation-delay: .2s; }
.podium.enter .podium__spot, .content.enter .podium__spot { animation: rise .45s var(--ease) both; }
.backdrop.enter { animation: fade .22s both; }
.backdrop.enter .sheet { animation: sheet-up .38s var(--ease) both; }
.backdrop.leaving { animation: fade-out .18s both; }
.backdrop.leaving .sheet { animation: sheet-down .18s ease-in both; }
.pulse { animation: pulse 1.1s var(--ease) both !important; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(60%); opacity: .4; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes ring-in { from { opacity: 0; transform: rotate(-120deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes ring-bell { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stamp-pop { from { opacity: 0; transform: rotate(var(--tilt, 0deg)) scale(.6); } to { opacity: 1; transform: rotate(var(--tilt, 0deg)); } }
@keyframes stamp-land { 0% { opacity: 0; transform: rotate(-24deg) scale(2.3); } 55% { opacity: 1; transform: rotate(-4deg) scale(.9); } 75% { transform: rotate(-7deg) scale(1.04); } 100% { opacity: 1; transform: rotate(var(--tilt, -6deg)) scale(1); } }
@keyframes burst { from { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } to { opacity: 0; transform: rotate(var(--a)) translateY(-120px) scale(.4); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #8cc15288, var(--shadow); transform: scale(1); } 30% { transform: scale(1.02); } 100% { box-shadow: 0 0 0 14px #8cc15200, var(--shadow); transform: none; } }

/* ---------- recovery ---------- */
.recovery { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.recovery > .ic { width: 44px; height: 44px; color: var(--bad); }
.recovery h1 { font-size: 22px; font-weight: 900; }
.recovery p { max-width: 360px; color: var(--ink2); line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}
.form > .toggle-chip { justify-self: start; }
.who__name { white-space: nowrap; max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
.who { padding-right: 8px; }
.sport-edit legend { float: left; width: 100%; } .sport-edit .grid2 { clear: both; }
/* Account entry keeps the established A palette and mobile form controls. */
.auth-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:24px 16px}
.auth-panel{width:100%}
.auth-panel h1{font-size:28px;line-height:1.3;margin:0 0 8px}
.auth-panel>p{margin:0 0 24px;color:var(--muted,#68736a)}
.auth-panel .text-btn{display:block;margin:20px auto 0}
.auth-panel .form{display:grid;gap:16px}
.top .text-btn{white-space:nowrap;font-size:12px;padding:8px 2px}
.top .who{text-decoration:none;color:inherit;flex-shrink:0}
.top .who__name{max-width:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.auth-panel h1{font-size:24px}

.signup-recovery { flex-direction: column; align-items: flex-start; gap: 12px; }
.signup-recovery .btn { flex-shrink: 0; }
