@font-face { font-family: 'Jost'; font-weight: 400; src: url('/fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 700; src: url('/fonts/jost-latin-700-normal.woff2') format('woff2'); }
:root { --bg: #18181d; --panel: #221f2d; --panel2: #2c2840; --line: #3a3350; --text: #ecebf3; --muted: #9a95ad; --accent: #8b5cf6; --accent2: #b9a4ff; --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --font: Futura, 'Futura PT', Jost, 'Century Gothic', 'Segoe UI', system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; }
body { background: linear-gradient(160deg, #1b1b20 0%, #1e1c26 35%, #241c36 70%, #2c1748 100%) fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #93c5fd; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--ok); } .warn { color: var(--warn); }
.row { display: flex; align-items: center; gap: 8px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, #7c4ef0, #9b6bff); border-color: #8b5cf6; color: #fff; font-weight: 700; }
.btn.sm { padding: 6px 10px; font-size: 14px; border-radius: 8px; } .btn.ghost { background: transparent; border-color: transparent; }
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.card { background: linear-gradient(160deg, rgba(40,38,50,.92), rgba(42,31,64,.92)); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
h1 { font-size: 24px; margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 10px; } h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #2d2142; border: 1px solid #8b5cf6; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
#toast.on { opacity: 1; }

/* layout */
.shell { max-width: 1180px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 14px calc(92px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .topbar img { width: 34px; height: 34px; border-radius: 8px; } .topbar b { font-size: 17px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: rgba(27,25,36,.96); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 20; backdrop-filter: blur(10px); }
.tabbar button { background: none; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 14px; font-size: 12px; border-radius: 10px; }
.tabbar button span { font-size: 22px; } .tabbar button.on { color: #fff; background: rgba(139,92,246,.22); }
.tabbar .cap span { background: linear-gradient(135deg, #7c4ef0, #9b6bff); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 18px rgba(124,78,240,.5); font-size: 26px; }
@media (min-width: 900px) {
  .tabbar { position: sticky; top: 0; bottom: auto; justify-content: flex-start; gap: 6px; background: rgba(27,25,36,.85); border-top: none; border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .tabbar button { flex-direction: row; font-size: 15px; } .tabbar button span { font-size: 18px; } .tabbar .cap span { width: 28px; height: 28px; margin: 0; font-size: 18px; }
  .shell { padding-bottom: 30px; }
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
}

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; text-align: center; } .login img { width: 72px; height: 72px; border-radius: 16px; margin-bottom: 8px; }
.login form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* today */
.wx { display: flex; align-items: center; gap: 12px; } .wx .ic { font-size: 34px; } .wx b { font-size: 24px; }
.wx-days { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.focus { border-color: #f59e0b; background: linear-gradient(160deg, rgba(245,158,11,.16), rgba(42,31,64,.92)); }
.focus small { color: #f59e0b; font-weight: 700; letter-spacing: .08em; font-size: 11px; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel2); margin-bottom: 6px; }
.task input[type=checkbox] { width: 24px; height: 24px; accent-color: #34d399; flex: none; }
.task.done .tt { text-decoration: line-through; opacity: .5; } .task .tt { font-size: 16px; } .task .meta { font-size: 12px; color: var(--muted); }
.task .del { background: none; border: none; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.timer { background: var(--panel2); border-radius: 12px; padding: 12px; margin-bottom: 8px; } .timer b.left { font-size: 26px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 8px; } .bar i { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.timer-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* videos */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; } .chips button { flex: none; } .chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.vcard { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--panel2); margin-bottom: 8px; cursor: pointer; border: 1px solid transparent; }
.vcard:active, .vcard:hover { border-color: var(--accent2); }
.vcard b { display: block; } .vcard small { color: var(--muted); }
.vhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .vhead h1 { font-size: 20px; }
.subtabs { display: flex; gap: 4px; margin: 8px 0 12px; overflow-x: auto; } .subtabs button { flex: none; background: none; border: 1px solid transparent; color: var(--muted); padding: 8px 12px; border-radius: 10px; }
.subtabs button.on { background: var(--panel2); border-color: var(--line); color: #fff; }
.sec { border-left: 4px solid var(--c, #64748b); background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.sec .lab { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c, #9a95ad); margin-bottom: 4px; }
.sec .txt { white-space: pre-wrap; line-height: 1.5; }
.note { border-radius: 12px; padding: 12px; color: #1f2330; margin-bottom: 8px; white-space: pre-wrap; }
.group { border: 2px solid var(--gc, #a78bfa); border-radius: 14px; margin-bottom: 12px; overflow: hidden; } .group > b { display: block; padding: 8px 12px; background: color-mix(in srgb, var(--gc, #a78bfa) 30%, transparent); }
.link { display: block; padding: 10px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); } .link small { display: block; color: #93c5fd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .media a, .media div { display: block; border-radius: 10px; overflow: hidden; background: #000; position: relative; color: #fff; text-decoration: none; }
.media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; } .media span { display: block; padding: 6px 8px; font-size: 12px; background: var(--panel2); }
.frame { display: flex; gap: 10px; background: var(--panel2); border-radius: 10px; padding: 8px; margin-bottom: 8px; } .frame img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; } .frame b { color: #ec4899; }

/* teleprompter */
.prompter { position: fixed; inset: 0; height: 100vh; height: 100dvh; background: #000; color: #fff; z-index: 40; display: flex; flex-direction: column; }
.prompter .scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 7vw; line-height: 1.45; }
.prompter .scroll::before { content: ''; display: block; height: 44vh; } .prompter .scroll::after { content: ''; display: block; height: 60vh; }
.prompter.mirror .scroll { transform: scaleX(-1); }
.prompter .scroll p { margin: 0 0 1em; } .prompter .scroll .lab { color: #a78bfa; font-size: .45em; text-transform: uppercase; letter-spacing: .1em; margin-top: 1.2em; }
.prompter .line { position: absolute; left: 0; right: 0; top: 44vh; border-top: 2px solid rgba(167,139,250,.35); pointer-events: none; }
.prompter .ctl { flex: none; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #111; border-top: 1px solid #333; font-size: 14px; }
.prompter .ctl input[type=range] { width: 110px; }

/* capture sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: #241f33; border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .sheet-back { align-items: center; } .sheet { border-radius: 18px; } }
.seg { display: flex; gap: 4px; background: var(--panel2); padding: 3px; border-radius: 10px; } .seg button { flex: 1; background: none; border: none; padding: 8px; border-radius: 8px; color: var(--muted); } .seg button.on { background: var(--accent); color: #fff; }
.login .or { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 -4px; }
.login .check { display: flex; gap: 8px; align-items: center; margin-top: 12px; text-align: left; }
