/* EasyProxy — dashboard
   Mobile first. Same system as the landing: black / chalk / ash,
   colour only on the spark (credits). */

:root {
  --void: #000;
  --chalk: #f1f0ec;
  --ash: #8d8c87;
  --smoke: #4c4b48;
  --raise: #0e0e0d;
  --raise-2: #161615;
  --line: rgba(241, 240, 236, 0.11);
  --line-strong: rgba(241, 240, 236, 0.26);
  --violet: #9b82ff;
  --amber: #ff9455;
  --spark: linear-gradient(135deg, var(--violet), var(--amber));

  --f-dot: 'Doto', ui-monospace, monospace;
  --f-mono: 'Martian Mono', ui-monospace, 'Cascadia Mono', monospace;
  --f-hand: 'Reenie Beanie', 'Segoe Print', cursive;

  --pad: 16px;
  --top-h: 56px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--chalk);
  font-family: var(--f-mono);
  font-stretch: 87.5%;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open { overflow: hidden; }

img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 1.5px solid var(--chalk); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--chalk); color: var(--void); padding: 10px 14px; border-radius: 99px;
}
.skip-link:focus { top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dim { color: var(--ash); }
.small { font-size: 11.5px; }

/* ---------- icons: 7×7 dot glyphs, drawn by JS ---------- */
.ico { display: inline-block; width: 22px; height: 22px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 99px; border: 1px solid transparent;
  font-weight: 500; font-size: 13px; line-height: 1;
  white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .38; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 12px; }
.btn-light { background: var(--chalk); color: var(--void); }
.btn-line { border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--chalk); }
.btn-dark { background: var(--void); color: var(--chalk); }
.btn-line-dark { border-color: rgba(0, 0, 0, .3); color: var(--void); }
.btn-spark, .btn-spark-fill { width: 14px; height: 14px; fill: url(#spark-grad); }

.link { font-size: 12px; color: var(--ash); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--smoke); }
.link:hover { color: var(--chalk); }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--chalk); font-size: 18px;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); }
.badge-dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--spark); box-shadow: 0 0 0 2px var(--void);
}

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  font-size: 11px; font-weight: 500; flex: none;
}

/* ---------- shell ---------- */
.side { display: none; }

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0 var(--pad);
  display: flex; align-items: center; gap: 10px;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; letter-spacing: -.02em; }
.brand em { font-style: normal; color: var(--ash); }
.brand-spark { width: 20px; height: 20px; fill: url(#spark-grad); }
.chip-sec { font-size: 11px; color: var(--ash); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; }
.top-title { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.main {
  padding: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 8px) var(--pad) calc(var(--tabs-h) + var(--safe-b) + 40px);
  max-width: 1180px;
}

.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  height: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabs a {
  display: grid; justify-items: center; gap: 4px;
  font-size: 10px; color: var(--smoke);
  padding: 8px 0;
  transition: color .15s;
}
.tabs a[aria-current="page"] { color: var(--chalk); }
.tab-request {
  justify-self: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--chalk);
  display: grid; place-items: center;
  margin-top: -22px;
  box-shadow: 0 0 0 5px var(--void), 0 10px 30px -6px rgba(155, 130, 255, .55);
}
.tab-request svg { width: 26px; height: 26px; fill: url(#spark-grad); }
.tab-request:active { transform: scale(.96); }

/* ---------- views ---------- */
.view { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.greet { padding: 18px 0 20px; display: grid; gap: 4px; }
.greet p { font-size: 12px; }
.greet h1, .view-head h1 { font-weight: 300; font-size: 28px; letter-spacing: -.045em; line-height: 1.1; }
.view-head { padding: 18px 0 22px; display: grid; gap: 8px; }
.view-head p { font-size: 12.5px; max-width: 52ch; }

.stack { display: grid; gap: 28px; align-content: start; }
.today-grid { display: grid; gap: 28px; }

.block { display: grid; gap: 12px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.block-head h2 { font-size: 14px; font-weight: 500; letter-spacing: -.02em; }
.count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 500; color: var(--void); background: var(--chalk);
}

.scribble { font-family: var(--f-hand); font-size: 26px; line-height: 1; color: var(--chalk); opacity: .8; transform: rotate(-2deg); }

/* hold the page until we know who's signed in */
.auth-pending .shell, .auth-pending .tabs { visibility: hidden; }

.preview-note {
  margin: -6px 0 22px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong); border-radius: 14px;
  font-size: 12px; color: var(--ash);
}

/* ---------- wallet ---------- */
.wallet {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 20px 20px 18px;
  background: var(--chalk); color: var(--void);
  display: grid; gap: 2px;
  box-shadow: 0 30px 60px -34px rgba(155, 130, 255, .6);
}
.wallet-art { position: absolute; right: -18px; top: -14px; width: 150px; height: 150px; }
.wallet-label { font-size: 11.5px; color: #5e5d58; position: relative; }
.wallet-num {
  position: relative;
  font-family: var(--f-dot); font-weight: 900;
  font-size: 96px; line-height: .95; letter-spacing: -.02em;
  margin-left: -4px;
}
.wallet-meta {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(0, 0, 0, .14);
  margin-top: 12px; padding-top: 12px;
}
.wallet-meta dt { font-size: 10.5px; color: #5e5d58; }
.wallet-meta dd { font-size: 14px; font-weight: 500; }
.wallet-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.wallet-actions .btn { padding: 0 10px; }
.wallet-num.bump, [data-bind].bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: translateY(-5px); } }

/* ---------- needs-you cards ---------- */
.needs { display: grid; gap: 10px; }
.need {
  border-radius: 18px; padding: 16px;
  display: grid; gap: 12px;
  background:
    linear-gradient(var(--raise), var(--raise)) padding-box,
    linear-gradient(135deg, rgba(155, 130, 255, .7), rgba(255, 148, 85, .55)) border-box;
  border: 1px solid transparent;
}
.need.done { background: none; border-color: var(--line); }
.need-kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ash); }
.need-kicker svg { width: 12px; height: 12px; fill: url(#spark-grad); }
.need h3 { font-size: 16px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.need p { font-size: 12.5px; color: var(--ash); }
.need-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.need-actions.one { grid-template-columns: 1fr; }
.need.done h3 { color: var(--ash); font-weight: 400; }
.empty { padding: 18px 4px; display: grid; gap: 6px; }

/* ---------- timeline ---------- */
.timeline { position: relative; }
.tl {
  position: relative;
  display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.tl:last-child { border-bottom: 0; }
.tl-time { font-size: 12px; color: var(--ash); padding-top: 1px; }
.tl-sub { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.tl-meta { grid-column: 2; font-size: 11.5px; color: var(--ash); }
.tl-status { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.tl.past .tl-sub, .tl.past .tl-time { color: var(--smoke); }
.tl.now::before {
  content: ''; position: absolute; left: -10px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
  background: var(--spark);
}
.tl.now .tl-time { color: var(--chalk); }
.tl.free .tl-sub { color: var(--smoke); font-weight: 300; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; line-height: 1; white-space: nowrap;
  padding: 6px 9px; border-radius: 99px;
  border: 1px solid var(--line-strong); color: var(--chalk);
}
.pill svg { width: 10px; height: 10px; fill: url(#spark-grad); }
.pill-quiet { border-color: var(--line); color: var(--ash); }
.pill-spark {
  border-color: transparent;
  background: linear-gradient(#000, #000) padding-box, var(--spark) border-box;
}
.pill-warn { border-color: rgba(255, 148, 85, .5); color: var(--amber); }
.pill-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- open requests ---------- */
.open-list { display: grid; gap: 10px; }
.req {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 14px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: center;
}
.req .avatar { width: 38px; height: 38px; }
.req-who { font-size: 13px; font-weight: 500; }
.req-who small { display: block; font-size: 11px; font-weight: 300; color: var(--ash); }
.req-price { text-align: right; }
.req-price b { display: block; font-family: var(--f-dot); font-weight: 900; font-size: 30px; line-height: .9; background: var(--spark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.req-price span { font-size: 10px; color: var(--ash); }
.req-class { grid-column: 1 / -1; font-size: 12px; color: var(--ash); display: flex; justify-content: space-between; gap: 10px; }
.req-class b { color: var(--chalk); font-weight: 500; }
.req .btn { grid-column: 1 / -1; }
.req.accepted { border-style: dashed; }

/* ---------- attendance watch ---------- */
.watch { display: grid; }
.watch li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.watch li:last-child { border-bottom: 0; }
.watch b { font-weight: 500; font-size: 13px; }
.watch .pct { font-family: var(--f-dot); font-weight: 900; font-size: 26px; line-height: 1; }
.watch .low .pct, .watch li.low .pct { color: var(--amber); }
.watch p { grid-column: 1 / -1; font-size: 11.5px; color: var(--ash); }

/* dot meters (shared) */
.meter {
  position: relative; height: 14px;
  background-image: radial-gradient(circle, var(--smoke) 1.2px, transparent 1.7px);
  background-size: 8px 8px; background-position: 0 50%; background-repeat: repeat-x;
}
.meter-fill {
  position: absolute; inset: 0 auto 0 0; width: var(--v);
  background-image: radial-gradient(circle, var(--chalk) 2.1px, transparent 2.6px);
  background-size: 8px 8px; background-position: 0 50%; background-repeat: repeat-x;
  transition: width .4s var(--ease);
}
.low .meter-fill { background-image: radial-gradient(circle, var(--amber) 2.1px, transparent 2.6px); }
.meter-ghost {
  position: absolute; inset: 0 auto 0 0; width: var(--g);
  background-image: radial-gradient(circle, rgba(241, 240, 236, .35) 2.1px, transparent 2.6px);
  background-size: 8px 8px; background-position: 0 50%; background-repeat: repeat-x;
}
.meter-line { position: absolute; left: 75%; top: -6px; bottom: -6px; width: 1px; background: var(--line-strong); }

/* ---------- timetable ---------- */
.days {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 calc(var(--pad) * -1) 18px; padding: 2px var(--pad);
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; min-width: 60px;
  display: grid; justify-items: center; gap: 2px;
  padding: 10px 12px; border-radius: 16px;
  border: 1px solid var(--line);
  font-size: 11px; color: var(--ash);
}
.day b { font-family: var(--f-dot); font-weight: 900; font-size: 24px; line-height: 1; color: var(--chalk); }
.day[aria-selected="true"] { background: var(--chalk); color: #5e5d58; border-color: var(--chalk); }
.day[aria-selected="true"] b { color: var(--void); }

.slots { display: grid; gap: 10px; }
.slot {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 16px;
  display: grid; gap: 12px;
}
.slot.hot { border-color: transparent; background: linear-gradient(var(--void), var(--void)) padding-box, linear-gradient(135deg, rgba(155, 130, 255, .75), rgba(255, 148, 85, .65)) border-box; }
.slot.past { opacity: .5; }
.slot.free { border-style: dashed; color: var(--smoke); padding: 14px 16px; }
.slot-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ash); }
.slot-price { display: flex; gap: 3px; }
.slot-price svg { width: 12px; height: 12px; fill: var(--chalk); }
.slot.hot .slot-price svg { fill: url(#spark-grad); }
.slot h3 { font-size: 20px; font-weight: 400; letter-spacing: -.04em; line-height: 1.1; }
.slot-prof { font-size: 11.5px; color: var(--ash); margin-top: 4px; }
.slot-demand { display: flex; gap: 18px; font-size: 11.5px; color: var(--ash); }
.slot-demand b { font-family: var(--f-dot); font-weight: 900; font-size: 22px; color: var(--chalk); margin-right: 4px; vertical-align: -2px; }
.slot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.slot-note { font-size: 11.5px; color: var(--ash); }
.slot-note.warn { color: var(--amber); }

/* toggle */
.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 46px; padding: 0 6px 0 14px;
  border: 1px solid var(--line-strong); border-radius: 99px;
  font-size: 12.5px; font-weight: 500;
}
.toggle-track {
  width: 40px; height: 24px; border-radius: 99px; flex: none;
  background: var(--raise-2); border: 1px solid var(--line-strong);
  position: relative; transition: background .2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ash); transition: transform .2s var(--ease), background .2s;
}
.toggle[aria-checked="true"] .toggle-track { background: var(--chalk); }
.toggle[aria-checked="true"] .toggle-track::after { transform: translateX(16px); background: var(--void); }

.legend { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 11.5px; color: var(--ash); }
.legend svg { width: 11px; height: 11px; fill: var(--chalk); flex: none; }

/* ---------- segmented ---------- */
.seg {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border: 1px solid var(--line); border-radius: 99px;
  margin-bottom: 18px;
}
.seg button { min-height: 38px; border-radius: 99px; font-size: 11.5px; color: var(--ash); }
.seg button[aria-selected="true"] { background: var(--chalk); color: var(--void); font-weight: 500; }
.seg-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.esc-actions .btn, .need-actions .btn { white-space: normal; text-align: center; line-height: 1.25; }

/* request / cover cards with escrow tracker */
.esc {
  border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  display: grid; gap: 14px;
}
.esc-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.esc-top h3 { font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.esc-top p { font-size: 11.5px; color: var(--ash); }
.esc-amt { text-align: right; flex: none; }
.esc-amt b { display: block; font-family: var(--f-dot); font-weight: 900; font-size: 28px; line-height: .9; }
.esc-amt b.spark-text { background: var(--spark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.esc-amt span { font-size: 10px; color: var(--ash); }
.esc-msg { font-size: 12.5px; color: #c9c8c3; }
.esc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.esc-actions.one { grid-template-columns: 1fr; }

.tracker { display: grid; gap: 8px; }
.tracker-dots { position: relative; display: flex; justify-content: space-between; }
.tracker-dots::before {
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--line-strong);
}
.tracker-dots::after {
  content: ''; position: absolute; left: 6px; top: 50%; height: 1px; background: var(--chalk);
  width: calc((100% - 12px) * var(--p));
}
.tracker-dots i {
  position: relative; z-index: 1;
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--smoke); background: var(--void);
}
.tracker-dots i.on { border-color: var(--chalk); background: var(--chalk); }
.tracker-dots i.cur {
  border: 0; background: var(--spark);
  box-shadow: 0 0 0 4px rgba(155, 130, 255, .18), 0 0 18px rgba(155, 130, 255, .6);
}
.tracker-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--ash); }
.tracker-label b { color: var(--chalk); font-weight: 500; }

/* ledger */
.ledger { display: grid; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger b { font-size: 13px; font-weight: 500; }
.ledger small { grid-column: 1; font-size: 11px; color: var(--ash); }
.ledger .amt { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--f-dot); font-weight: 900; font-size: 24px; }
.ledger .amt.minus { color: var(--ash); }

/* ---------- attendance ---------- */
.overall { display: flex; align-items: end; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.overall-num { font-family: var(--f-dot); font-weight: 900; font-size: 88px; line-height: .85; letter-spacing: -.03em; }
.overall-copy { font-size: 12.5px; color: var(--ash); max-width: 22ch; padding-bottom: 6px; }

.subjects { display: grid; }
.subj { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.subj-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.subj-head b { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.subj-head small { display: block; font-size: 11px; color: var(--ash); }
.subj-pct { font-family: var(--f-dot); font-weight: 900; font-size: 36px; line-height: .9; }
.subj.low .subj-pct, .subj.low .subj-verdict { color: var(--amber); }
.subj-verdict { font-size: 12px; color: var(--ash); }
.planner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--raise);
  font-size: 12px;
}
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 16px;
}
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--f-dot); font-weight: 900; font-size: 22px; }
.planner-result { font-weight: 500; }
.planner-result.bad { color: var(--amber); }

/* ---------- profile ---------- */
.me-grid { display: grid; gap: 28px; }
.idcard {
  position: relative;
  border-radius: 20px; padding: 18px;
  background: var(--chalk); color: var(--void);
  display: grid; gap: 12px;
  max-width: 380px;
}
.idcard::before { content: ''; position: absolute; top: 10px; left: 50%; width: 40px; height: 7px; transform: translateX(-50%); border-radius: 99px; background: var(--void); }
.idcard-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding-top: 8px; }
.idcard-top svg { width: 20px; height: 20px; fill: url(#spark-grad); }
.idcard-portrait { width: 100%; aspect-ratio: 1.3; border-radius: 12px; background: var(--void); }
.idcard h2 { font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
.idcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(0, 0, 0, .15); padding-top: 10px; }
.idcard-stats dt { font-size: 10.5px; color: #5e5d58; }
.idcard-stats dd { font-family: var(--f-dot); font-weight: 900; font-size: 28px; line-height: 1.1; }

.strike-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.strike-row p { font-size: 12.5px; color: var(--ash); }
.strike-dots { display: flex; gap: 6px; padding-top: 4px; }
.strike-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--smoke); }
.strike-dots i.on { background: var(--amber); border-color: var(--amber); }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge {
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 10px;
  display: grid; justify-items: center; gap: 8px; text-align: center;
  font-size: 10.5px; line-height: 1.3;
}
.badge canvas { width: 44px; height: 44px; }
.badge.locked { color: var(--smoke); border-style: dashed; }
.badge.locked canvas { opacity: .25; }

.board { display: grid; }
.board li { display: grid; grid-template-columns: 26px auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.board li:last-child { border-bottom: 0; }
.board .rank { font-family: var(--f-dot); font-weight: 900; font-size: 20px; color: var(--ash); }
.board .avatar { width: 30px; height: 30px; font-size: 10px; }
.board .score { font-size: 12px; color: var(--ash); }
.board li.you { color: var(--chalk); }
.board li.you .avatar { background: var(--chalk); color: var(--void); border-color: var(--chalk); }
.board li.you .rank { background: var(--spark); -webkit-background-clip: text; background-clip: text; color: transparent; }

.squad { display: grid; gap: 12px; font-size: 12.5px; }
.squad-faces { display: flex; }
.squad-faces .avatar { width: 36px; height: 36px; margin-right: -8px; background: var(--void); }

.settings { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.settings li + li { border-top: 1px solid var(--line); }
.settings a, .settings button {
  width: 100%; min-height: 52px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; text-align: left;
}
.settings span { color: var(--ash); font-size: 12px; }

/* ---------- sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, .66);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .25s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  max-height: 92svh;
  display: flex; flex-direction: column;
  background: var(--raise);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding-bottom: var(--safe-b);
  animation: up .38s var(--ease);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--smoke); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px 20px; flex: none; }
.sheet-head h2 { font-size: 16px; font-weight: 500; letter-spacing: -.02em; margin-right: auto; }
.sheet-back + h2 { margin-left: -6px; }
.sheet-back { margin-left: -12px; font-size: 24px; }
.sheet-body { overflow-y: auto; padding: 8px 20px 22px; display: grid; gap: 16px; overscroll-behavior: contain; }

.steps-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps-bar i { height: 3px; border-radius: 3px; background: var(--line-strong); }
.steps-bar i.on { background: var(--chalk); }

.pick { display: grid; gap: 8px; }
.pick-item {
  width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 14px; border-radius: 16px; border: 1px solid var(--line);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.pick-item:hover { border-color: var(--line-strong); }
.pick-item[aria-checked="true"] { border-color: var(--chalk); background: var(--raise-2); }
.pick-item[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pick-item b { font-size: 14px; font-weight: 500; }
.pick-item small { grid-column: 1; font-size: 11px; color: var(--ash); }
.pick-item small.warn { color: var(--amber); }
.pick-item .pick-side { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 3px; align-items: center; font-size: 11px; color: var(--ash); }
.pick-item .pick-side svg { width: 11px; height: 11px; fill: url(#spark-grad); }
.pick-item .avatar { display: none; }
.pick-person { grid-template-columns: auto 1fr auto; }
.pick-person .avatar { display: grid; grid-row: 1 / span 2; }
.pick-person b, .pick-person small { grid-column: 2; }
.pick-person .pick-side { grid-column: 3; }
.pick-label { font-size: 11.5px; color: var(--ash); }

.summary { border: 1px solid var(--line); border-radius: 16px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 12.5px; }
.summary div + div { border-top: 1px solid var(--line); }
.summary dt { color: var(--ash); }
.summary dd { text-align: right; font-weight: 500; }

.wallet-move {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 16px; border-radius: 16px; background: var(--void); border: 1px solid var(--line);
}
.wallet-move div { display: grid; }
.wallet-move div:last-child { text-align: right; }
.wallet-move span { font-size: 10.5px; color: var(--ash); }
.wallet-move b { font-family: var(--f-dot); font-weight: 900; font-size: 40px; line-height: 1; }
.wallet-move svg { width: 22px; height: 22px; fill: url(#spark-grad); }
.fine { font-size: 11.5px; color: var(--ash); }
.fine.warn { color: var(--amber); }

.success { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 10px 0 4px; }
.success canvas { width: 120px; height: 120px; }
.success h3 { font-size: 20px; font-weight: 400; letter-spacing: -.04em; }
.success p { font-size: 12.5px; color: var(--ash); max-width: 34ch; }

.radar { position: relative; width: 150px; height: 150px; margin: 6px auto; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); animation: ping 2.4s var(--ease) infinite; }
.radar i:nth-child(2) { animation-delay: .8s; }
.radar i:nth-child(3) { animation-delay: 1.6s; }
.radar svg { position: absolute; inset: 50% auto auto 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); fill: url(#spark-grad); filter: drop-shadow(0 0 14px rgba(155, 130, 255, .7)); }
@keyframes ping { from { transform: scale(.25); opacity: 1; } to { transform: scale(1); opacity: 0; } }

.reasons { display: grid; gap: 8px; }

.notes { display: grid; }
.notes li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notes li:last-child { border-bottom: 0; }
.notes .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--smoke); grid-row: 1 / span 2; }
.notes li.unread .dot { background: var(--spark); }
.notes p { font-size: 12.5px; }
.notes small { font-size: 11px; color: var(--ash); grid-column: 2; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 120;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 16px);
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 99px;
  background: var(--chalk); color: var(--void);
  font-size: 12.5px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- larger phones / small tablets ---------- */
@media (min-width: 600px) {
  :root { --pad: 28px; }
  .slots { grid-template-columns: 1fr 1fr; }
  .badges { grid-template-columns: repeat(6, 1fr); }
  .sheet { left: 50%; right: auto; width: 480px; transform: translateX(-50%); animation: upCenter .38s var(--ease); }
  @keyframes upCenter { from { transform: translate(-50%, 100%); } }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  :root { --pad: 40px; }
  body { font-size: 14.5px; }

  .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
  .side {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 28px;
    padding: 24px 20px;
    border-right: 1px solid var(--line);
  }
  .side .brand { padding-left: 8px; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px;
    font-size: 13px; color: var(--ash);
  }
  .side-nav a:hover { color: var(--chalk); background: rgba(255, 255, 255, .04); }
  .side-nav a[aria-current="page"] { color: var(--chalk); background: var(--raise-2); }
  .side-nav .ico { width: 18px; height: 18px; }
  .side-foot { margin-top: auto; font-size: 12px; display: grid; gap: 4px; padding-left: 8px; }
  .side-foot b { font-family: var(--f-dot); font-weight: 900; font-size: 20px; }

  .top { position: sticky; padding: 0 20px 0 var(--pad); }
  .brand-top, .chip-sec { display: none; }
  .top-title { display: block; font-size: 13px; color: var(--ash); }

  .tabs { display: none; }
  .main { padding: 8px var(--pad) 80px; }
  .toast { bottom: 28px; }

  .greet h1, .view-head h1 { font-size: 40px; }
  .today-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; }
  .wallet { padding: 26px 26px 22px; }
  .wallet-num { font-size: 120px; }
  .wallet-art { width: 190px; height: 190px; }
  .wallet-actions { grid-template-columns: auto auto; justify-content: start; }

  .slots { grid-template-columns: repeat(3, 1fr); }
  .seg { max-width: 460px; }
  .seg-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .seg-panel > .ledger, .seg-panel > .empty { grid-column: 1 / -1; max-width: 720px; }

  .subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }

  .me-grid { grid-template-columns: 340px minmax(0, 1fr); align-items: start; gap: 32px 48px; }
  .me-grid > .block { grid-column: 2; }
  .me-grid > .settings-block { grid-column: 1; grid-row: 2 / span 3; }

  .sheet { top: 50%; bottom: auto; border-radius: 24px; border-bottom: 1px solid var(--line); transform: translate(-50%, -50%); animation: pop .3s var(--ease); max-height: 86vh; padding-bottom: 6px; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
  .sheet-grab { display: none; }
  .sheet-head { padding-top: 14px; }
}

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