/* Team One App - styles.css
   Look: black canvas, translucent "liquid glass" surfaces, single red accent,
   SF-style type, floating glass tab bar. Modeled on the fitness-app templates. */
:root {
  --bg: #000;
  --text: #fff;
  --text-2: rgba(235,235,245,0.62);
  --text-3: rgba(235,235,245,0.36);
  --glass: rgba(255,255,255,0.07);
  --glass-strong: rgba(255,255,255,0.11);
  --glass-line: rgba(255,255,255,0.10);
  --glass-hi: rgba(255,255,255,0.16);
  --red: #E02E36;
  --red-hi: #ff5158;
  --blue: #2A419B;
  --green: #30d158;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; overscroll-behavior-y: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; }

/* soft ambient light so the glass has something to refract */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 38% at 88% -6%, rgba(224,46,54,0.26), transparent 70%),
    radial-gradient(55% 34% at -8% 104%, rgba(255,255,255,0.07), transparent 70%),
    radial-gradient(60% 22% at 70% 100%, rgba(224,46,54,0.22), transparent 70%),
    #000; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0,0,0,0.45);
}

/* ---------- PIN ---------- */
#pin-gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: #000; }
#pin-gate::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 50% at 50% 0%, rgba(224,46,54,0.28), transparent 70%); }
.pin-card { position: relative; width: 100%; max-width: 340px; border-radius: var(--radius-xl); padding: 34px 26px 26px; text-align: center; }
.pin-card img.logo-symbol { width: 64px; height: 44px; object-fit: contain; margin: 0 auto 18px; }
.pin-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; margin: 0 0 6px; }
.pin-card p.sub { color: var(--text-2); font-size: 14px; margin: 0 0 22px; }
#pin-input { width: 100%; padding: 15px; font-size: 24px; letter-spacing: 12px; text-align: center; border-radius: var(--radius-md); border: 1px solid var(--glass-line); background: rgba(255,255,255,0.06); color: var(--text); margin-bottom: 12px; outline: none; }
#pin-input:focus { border-color: rgba(255,255,255,0.32); }
#pin-error { color: var(--red-hi); font-size: 13px; min-height: 18px; margin-bottom: 10px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px; padding: 15px 22px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; letter-spacing: -0.1px; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--red); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 22px rgba(224,46,54,0.35); }
.btn-glass { background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn-sm { width: auto; padding: 9px 16px; font-size: 14px; }

/* ---------- shell ---------- */
#app { display: none; min-height: 100vh; padding-bottom: calc(110px + var(--safe-bottom)); }
#app.visible { display: block; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-top)) 20px 12px;
  background: linear-gradient(#000 40%, rgba(0,0,0,0)); }
.topbar img.logo-symbol { width: 34px; height: 24px; object-fit: contain; }
.topbar .brandname { font-weight: 700; font-size: 15px; letter-spacing: 0.4px; }
.topbar .spacer { flex: 1; }
.topbar a.site-link { font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; }

main.view { padding: 4px 20px 20px; max-width: 620px; margin: 0 auto; }
.eyebrow { font-size: 13px; color: var(--text-2); margin: 0 0 2px; }
h2.view-title { font-size: 34px; font-weight: 700; letter-spacing: -0.8px; margin: 0 0 6px; line-height: 1.08; }
p.view-sub { color: var(--text-2); font-size: 15px; line-height: 1.4; margin: 0 0 20px; }
.section-label { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin: 26px 0 12px; }

.card { border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; }

/* grouped list rows (iOS style) */
.list-group { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; position: relative; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--glass-line); }
.list-row:active { background: rgba(255,255,255,0.06); }
.list-row .body { flex: 1; min-width: 0; }
.list-row .t { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.list-row .s { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.list-row .chev { color: var(--text-3); }
.icon-badge { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(224,46,54,0.16); color: var(--red-hi); }
.icon-badge.neutral { background: rgba(255,255,255,0.09); color: #fff; }

/* day strip */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day { flex: 1 0 52px; padding: 12px 0 8px; border-radius: 26px; text-align: center; background: var(--glass); border: 1px solid var(--glass-line); cursor: pointer; }
.day .dn { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.day .dd { width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.day.active { background: var(--red); border-color: transparent; box-shadow: 0 8px 22px rgba(224,46,54,0.35), inset 0 1px 0 rgba(255,255,255,0.3); }
.day.active .dn { color: rgba(255,255,255,0.85); }
.day.active .dd { background: #fff; color: #000; }

.class-row { display: flex; gap: 14px; align-items: center; padding: 13px 16px; }
.class-row + .class-row { border-top: 1px solid var(--glass-line); }
.class-row .time { width: 92px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.25; }
.class-row .name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.class-row .tag { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.empty-note { padding: 22px 16px; text-align: center; color: var(--text-2); font-size: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 16px 6px; }
.stat-row .n { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.stat-row .l { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-row > div + div { border-left: 1px solid var(--glass-line); }

/* ---------- floating glass tab bar ---------- */
.tabbar { position: fixed; left: 14px; right: 14px; bottom: calc(10px + var(--safe-bottom)); z-index: 20; max-width: 520px; margin: 0 auto;
  display: flex; justify-content: space-between; padding: 6px; border-radius: 34px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.07) 45%, rgba(255,255,255,0.10) 100%);
  -webkit-backdrop-filter: blur(30px) saturate(220%) brightness(1.15); backdrop-filter: blur(30px) saturate(220%) brightness(1.15);
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(255,255,255,0.10), inset 0 0 22px rgba(255,255,255,0.07), 0 14px 36px rgba(0,0,0,0.55); }
.tabbar::before { content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent); pointer-events: none; }
.tab { position: relative; z-index: 1; flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 28px; font-size: 10.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.tab.active { color: #fff; background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0.10)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 0 14px rgba(255,255,255,0.08), 0 4px 14px rgba(0,0,0,0.35); }
.tab.active svg { color: var(--red-hi); }

/* ---------- belts ---------- */
.belt-chip { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.belt-hero { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.belt-hero h2 { margin: 0; font-size: 28px; letter-spacing: -0.6px; }
.belt-hero .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.ring { position: relative; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(255,255,255,0.10); }
.ring .fill { stroke: url(#redgrad); transition: stroke-dashoffset 0.25s linear; }
.ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.term-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; font-size: 15px; }
.term-row + .term-row { border-top: 1px solid var(--glass-line); }
.term-row .term { font-weight: 600; }
.term-row .meaning { color: var(--text-2); text-align: right; }
ul.req-list { margin: 0; padding: 14px 18px 14px 34px; color: var(--text-2); font-size: 15px; line-height: 1.55; }

.video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; background: #0b0b0c; border: 1px solid var(--glass-line); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; height: 100%; color: var(--text-2); font-size: 14px; text-align: center; padding: 20px; }

/* ---------- roster ---------- */
.search { width: 100%; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); margin-bottom: 14px; font-size: 16px; outline: none; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.search::placeholder { color: var(--text-3); }
img.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.18); flex-shrink: 0; }

.tracker-track { display: flex; gap: 7px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.tracker-track::-webkit-scrollbar { display: none; }
.tracker-step { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.2); }
.tracker-step.current { outline: 2px solid #fff; outline-offset: 2px; }
.tracker-legend { font-size: 13px; color: var(--text-2); }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s ease; }
.sheet { width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; border-radius: 32px 32px 0 0; padding: 10px 22px calc(28px + var(--safe-bottom)); background: rgba(24,24,26,0.72);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--glass-line); border-bottom: none; box-shadow: inset 0 1px 0 var(--glass-hi); animation: rise .28s cubic-bezier(.2,.9,.3,1); }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.28); margin: 0 auto 8px; }
.sheet .close-btn { display: flex; margin-left: auto; width: 32px; height: 32px; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(255,255,255,0.12); cursor: pointer; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 0 0 10px; }
.profile-head img.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); margin-bottom: 6px; }
.profile-head .pname { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.profile-head .pbelt { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
.profile-stat { background: rgba(255,255,255,0.07); border: 1px solid var(--glass-line); border-radius: var(--radius-md); padding: 13px 14px; }
.profile-stat .k { font-size: 12px; color: var(--text-2); }
.profile-stat .v { font-size: 15px; font-weight: 600; margin-top: 4px; letter-spacing: -0.2px; }
.award { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.award + .award { border-top: 1px solid var(--glass-line); }
.award svg { color: #f4c868; flex-shrink: 0; }

/* ---------- quizzes ---------- */
.quiz-belt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quiz-belt-tile { border-radius: var(--radius-md); padding: 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.quiz-belt-tile .belt-chip { width: 30px; height: 30px; border-radius: 9px; }
.quiz-belt-tile .nm { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.2; }
.game-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-type-tile { border-radius: var(--radius-lg); padding: 18px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 22px; min-height: 130px; }
.game-type-tile .lbl { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; }
.game-type-tile .desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

.quiz-progress { display: flex; gap: 5px; margin: 6px 0 22px; }
.quiz-progress .seg { flex: 1; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.12); }
.quiz-progress .seg.done { background: #fff; }
.quiz-progress .seg.current { background: var(--red); }
.quiz-question { font-size: 26px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.18; margin-bottom: 24px; }
.choice-btn { display: block; width: 100%; text-align: left; padding: 16px 18px; margin-bottom: 10px; border-radius: var(--radius-md); font-size: 16px; font-weight: 500; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); box-shadow: inset 0 1px 0 var(--glass-hi); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.choice-btn:active { transform: scale(0.99); }
.choice-btn.correct { border-color: var(--green); background: rgba(48,209,88,0.18); }
.choice-btn.wrong { border-color: var(--red); background: rgba(224,46,54,0.2); }
.tf-row { display: flex; gap: 12px; }
.tf-row .choice-btn { text-align: center; font-weight: 700; font-size: 18px; padding: 22px 0; }
.quiz-result { text-align: center; padding: 40px 10px; }
.quiz-result .score { font-size: 64px; font-weight: 800; letter-spacing: -2px; margin: 4px 0 22px; }

.memory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.memory-card { aspect-ratio: 1; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; font-weight: 600; padding: 6px; cursor: pointer; color: transparent; transition: transform .2s; }
.memory-card.flipped { color: #fff; background: rgba(255,255,255,0.16); }
.memory-card.matched { color: #fff; background: rgba(48,209,88,0.2); border-color: var(--green); }

.jeopardy-score { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.jeopardy-score .n { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; }
.jeopardy-cat { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); margin: 20px 0 8px; }
.jeopardy-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jeopardy-cell { border-radius: 14px; padding: 16px 0; text-align: center; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-hi); }
.jeopardy-cell.used { opacity: 0.2; pointer-events: none; }
.jeopardy-modal-q { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; text-align: center; margin: 26px 8px 28px; line-height: 1.2; }

/* ---------- tools ---------- */
.segmented { display: flex; padding: 4px; border-radius: 999px; margin-bottom: 26px; background: var(--glass); border: 1px solid var(--glass-line); }
.segmented .seg { flex: 1; text-align: center; padding: 9px 0; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.segmented .seg.active { background: rgba(255,255,255,0.16); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }
.dial { display: flex; justify-content: center; margin: 6px 0 30px; }
.dial .time { font-size: 50px; font-weight: 700; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.dial .cap { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.tool-btn-row { display: flex; gap: 12px; }
.preset-row { display: flex; gap: 8px; margin-top: 18px; justify-content: center; flex-wrap: wrap; }
.preset-chip { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--glass); border: 1px solid var(--glass-line); cursor: pointer; }
.preset-chip.active { background: rgba(255,255,255,0.18); }

.point-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.point-side { border-radius: var(--radius-xl); padding: 22px 12px 18px; text-align: center; border: 1px solid rgba(255,255,255,0.14); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 14px 36px rgba(0,0,0,0.5); }
.point-side.blue { background: linear-gradient(170deg, #2f4bb0, #0f1a4a); }
.point-side.red { background: linear-gradient(170deg, #ec3a42, #5c0d12); }
.point-side .label { font-weight: 700; letter-spacing: 1.2px; font-size: 12px; opacity: 0.85; }
.point-side .score { font-size: 84px; font-weight: 800; letter-spacing: -3px; margin: 8px 0 14px; line-height: 1; font-variant-numeric: tabular-nums; }
.point-side .pbtns { display: flex; justify-content: center; gap: 10px; }
.pbtn { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.16); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
.pbtn:active { transform: scale(0.94); }

/* ---------- community ---------- */
iframe.embed { width: 100%; border: 0; display: block; background: rgba(255,255,255,0.04); }
.embed-card { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
.footer-brand { text-align: center; padding: 30px 0 6px; color: var(--text-3); font-size: 13px; }
.footer-brand img { width: 48px; margin: 0 auto 10px; opacity: 0.9; }

::-webkit-scrollbar { display: none; }
.embed-card .fb-page { min-height: 200px; display: block; }

.belt-dots { display: flex; gap: 4px; margin-top: 9px; }
.belt-dots i { width: 15px; height: 15px; border-radius: 5px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.25); }
.belt-dots i.cur { outline: 1.5px solid #fff; outline-offset: 1.5px; }
