/* Jamyvo — mobile-first, black theme */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --surface-3: #2a2a2a;
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --text-2: #c7c7c7;
  --muted: #8f8f8f;
  --accent: #fe2c55;
  --accent-press: #e0244a;
  --accent-2: #25f4ee;
  --gold: #face15;
  --danger: #ff4d6d;
  --radius: 12px;
  --tabbar-h: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --rail-w: 0px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); height: 100%; }
body { margin: 0; min-height: 100%; font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
html.immersive, html.immersive body, html.sheet-open, html.sheet-open body { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
::selection { background: rgba(254, 44, 85, 0.45); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.fine a, .check a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.center { text-align: center; }
.pad { padding: 4px 4px 0; }
.danger { color: var(--danger) !important; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.center { justify-content: center; }
.stack { display: grid; gap: 8px; margin-top: 16px; }
.grow { flex: 1; }
.noscript { padding: 24px; text-align: center; }

/* Icons */
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.xl { width: 44px; height: 44px; stroke-width: 1.6; }
svg.i.tiny { width: 12px; height: 12px; }
.verified { display: inline-flex; color: var(--accent-2); margin-left: 4px; vertical-align: -2px; }
.verified svg.i { width: 15px; height: 15px; }

/* Avatars */
.avatar { --s: 40px; width: var(--s); height: var(--s); min-width: var(--s); max-width: var(--s); aspect-ratio: 1; border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: hidden; font-weight: 700; font-size: calc(var(--s) * 0.38); color: #fff; background: linear-gradient(135deg, #3a3a3a, #1d1d1d); user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg.i { width: 55%; height: 55%; }
.avatar[data-hue="0"] { background: linear-gradient(135deg, #fe2c55, #8a1630); }
.avatar[data-hue="1"] { background: linear-gradient(135deg, #2a9d8f, #155e57); }
.avatar[data-hue="2"] { background: linear-gradient(135deg, #6c63ff, #3b2f99); }
.avatar[data-hue="3"] { background: linear-gradient(135deg, #f4a261, #a55a1c); }
.avatar[data-hue="4"] { background: linear-gradient(135deg, #25b4ee, #136b91); }
.avatar[data-hue="5"] { background: linear-gradient(135deg, #8a8a8a, #3a3a3a); }
.avatar.xs { --s: 20px; } .avatar.sm { --s: 32px; } .avatar.md { --s: 44px; } .avatar.lg { --s: 64px; } .avatar.xl { --s: 96px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: 15px; white-space: nowrap; transition: background 0.15s, transform 0.1s; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn svg.i { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff4268; }
.btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.btn-danger { background: #e5243b; color: #fff; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.lg { height: 50px; font-size: 16px; }
.btn.full, .full { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: var(--text); }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg.i { width: 18px; height: 18px; }
.link-btn { color: var(--text-2); font-weight: 600; font-size: 14px; }
.link-btn:hover { color: #fff; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; }
.field input, .field textarea, .field select, .search input, .composer-bar input, .composer-bar textarea { width: 100%; }
.field input, .field textarea, .field select { background: #161616; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px; color: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #aaa 50%), linear-gradient(135deg, #aaa 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 0 0 3px rgba(37, 244, 238, 0.15); }
::placeholder { color: #6a6a6a; }
.input-wrap { position: relative; display: flex; }
.input-wrap input { flex: 1; padding-right: 48px; }
.input-wrap .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.input-wrap.prefix b { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.input-wrap.prefix input { padding-left: 32px; padding-right: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin: 4px 0 14px; line-height: 1.45; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
.form-error { color: #ff7a8f; font-size: 14px; margin: 0 0 10px; }
.form-error:empty { display: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row > span:not(.avatar) { display: grid; gap: 2px; }
.switch-row small { color: var(--muted); font-size: 13px; }
input[role="switch"] { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: #3a3a3a; position: relative; flex: none; cursor: pointer; transition: background 0.2s; margin: 0; }
input[role="switch"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::before { transform: translateX(20px); }
.radio-list { display: grid; gap: 8px; margin-bottom: 14px; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: #181818; border: 1px solid transparent; cursor: pointer; }
.radio:has(input:checked) { border-color: rgba(254, 44, 85, 0.6); }
.radio input { accent-color: var(--accent); width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.radio span { display: grid; gap: 2px; }
.radio small { color: var(--muted); font-size: 13px; }

/* Segmented controls and chips */
.seg { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg > * { padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 650; font-size: 14px; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg > .active, .seg > [aria-selected="true"] { background: #2f2f2f; color: #fff; }
.seg.tabs3, .welcome-card .seg, .inbox-head .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); color: #e8e8e8; font-weight: 600; font-size: 14px; white-space: nowrap; flex: none; }
.chip.active { background: #fff; color: #000; }
.chip.outline { background: transparent; border: 1px solid var(--line); }
.chip.outline.active { background: #fff; border-color: #fff; color: #000; }
.chip.sm { padding: 3px 9px; font-size: 12px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; line-height: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; }
.tag { font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(254, 44, 85, 0.14); padding: 1px 6px; border-radius: 4px; }

/* Spinner */
.spinner { display: none; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.spinner.show { display: block; margin: 48px auto; }
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.spinner.show.sm { margin: 12px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* App shell */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot img { border-radius: 16px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
#main { min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); outline: none; }
.rail-nav { display: none; }
.tabbar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: #000; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; color: #8f8f8f; font-size: 10.5px; font-weight: 600; }
.tabbar a svg.i { width: 26px; height: 26px; }
.tabbar a.active { color: #fff; }
.tabbar a.active svg.i { stroke-width: 2.4; }
.tabbar .count { position: absolute; top: 5px; left: calc(50% + 6px); }
.tab-create { justify-self: center; width: 48px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.tab-create svg.i { width: 24px; height: 24px; stroke-width: 2.6; }

/* Pages */
.page { max-width: 720px; min-width: 0; overflow-x: clip; margin: 0 auto; padding: calc(var(--safe-t) + 10px) 16px 24px; }
.page-wide { max-width: 1120px; }
.section-title { font-size: 15px; font-weight: 700; margin: 20px 0 10px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 14px; font-weight: 600; margin: 4px 0 12px; }
.back-link svg.i { width: 18px; height: 18px; }
.empty { text-align: center; padding: 48px 16px; display: grid; justify-items: center; gap: 10px; color: var(--text); }
.empty svg.i.xl { color: #6a6a6a; }
.empty h2, .empty h3 { font-size: 18px; }
.empty p { color: var(--muted); max-width: 380px; }
.empty .btn, .empty .row { margin-top: 6px; }
.empty.compact { padding: 32px 12px; }
.intro-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; margin: 14px 0; border-radius: 16px; background: linear-gradient(135deg, #1f1f1f, #121212); border: 1px solid var(--line); }
.intro-card h2 { font-size: 18px; margin-bottom: 4px; }
.intro-card p { color: var(--text-2); font-size: 14px; max-width: 520px; }

/* ---------- Feed ---------- */
.feed-page { position: fixed; z-index: 1; top: 0; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); background: #000; padding: 0 !important; min-height: 0 !important; }
.feed-top { position: absolute; z-index: 6; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 6px) 8px 18px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(rgba(0, 0, 0, 0.55), transparent); pointer-events: none; }
.feed-top > * { pointer-events: auto; }
.icon-btn.ghost { color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }
.feed-tabs { display: flex; gap: 22px; }
.feed-tabs a { color: rgba(255, 255, 255, 0.65); font-weight: 700; font-size: 17px; padding: 6px 0; position: relative; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.feed-tabs a.active { color: #fff; }
.feed-tabs a.active::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 26px; height: 3px; margin-left: -13px; border-radius: 3px; background: #fff; }
.reels { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.loading-reel { display: grid; place-items: center; }
.stage { position: absolute; inset: 0; background: #000; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.backdrop { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(32px) brightness(0.42) saturate(1.2); pointer-events: none; }
.media-slot { position: absolute; inset: 0; display: grid; place-items: center; }
.media-slot > .media { width: 100%; height: 100%; object-fit: contain; grid-area: 1 / 1; }
.media-slot > .player { position: absolute; inset: 0; background: transparent; }
.poster-fallback { background: #111; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); pointer-events: none; z-index: 1; }
.tap-layer { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.big-play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: none; place-items: center; background: rgba(0, 0, 0, 0.35); pointer-events: none; }
.big-play svg.i { width: 40px; height: 40px; fill: #fff; stroke: none; margin-left: 4px; }
.reel.paused .big-play { display: grid; animation: pop 0.2s ease-out; }
.reel .spinner { position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -15px; z-index: 2; }
.reel.is-active.buffering .spinner { display: block; animation: spin 0.8s linear infinite, fadeIn 0.2s 0.4s both; }
@keyframes fadeIn { from { opacity: 0; } }
.media-error-note { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; background: rgba(0, 0, 0, 0.7); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.reel.media-error .media-error-note { display: block; }
.stage-tools { position: absolute; z-index: 4; top: calc(var(--safe-t) + 60px); right: 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.stage-tools .grow, .only-wide { display: none; }
.tool { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; }
.tool svg.i { width: 21px; height: 21px; }
.tool.is-muted { background: rgba(254, 44, 85, 0.85); }
.sound-hint { position: absolute; z-index: 5; left: 50%; top: calc(var(--safe-t) + 64px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.95); color: #000; font-weight: 700; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); animation: pop 0.25s ease-out; }
.sound-hint svg.i { width: 18px; height: 18px; }
.sound-hint[hidden] { display: none; }
.caption { position: absolute; z-index: 3; left: 12px; right: 78px; bottom: 18px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); display: grid; justify-items: start; gap: 3px; }
.cap-author { font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; }
.cap-meta { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin-top: -3px; }
.cap-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.cap-text { font-size: 14.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.92); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.caption.expanded { max-height: 55%; overflow-y: auto; background: rgba(0, 0, 0, 0.55); padding: 10px; border-radius: 10px; margin-left: -10px; }
.caption.expanded .cap-text { -webkit-line-clamp: unset; display: block; }
.cap-more { font-weight: 700; font-size: 14px; color: #fff; }
.caption .chip.sm { margin-top: 4px; }
.mention { color: #fff; font-weight: 700; }
.cap-text a, .bio a, .lesson-desc a, .bubble a { color: var(--accent-2); text-decoration: underline; }
.scrub { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 16px; display: flex; align-items: flex-end; }
.progress { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 16px; margin: 0; background: transparent; cursor: pointer; touch-action: none; }
.progress::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, rgba(255, 255, 255, 0.95) var(--p), rgba(255, 255, 255, 0.28) var(--p)); border-radius: 3px; margin-top: 10px; transition: height 0.1s; }
.progress::-moz-range-track { height: 3px; background: rgba(255, 255, 255, 0.28); border-radius: 3px; }
.progress::-moz-range-progress { height: 3px; background: #fff; border-radius: 3px; }
.progress::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4.5px; opacity: 0; transition: opacity 0.1s; }
.progress::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.progress:active::-webkit-slider-thumb, .scrub:hover .progress::-webkit-slider-thumb { opacity: 1; }
.actions { position: absolute; z-index: 4; right: 6px; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.act-author { position: relative; margin-bottom: 6px; }
.act-avatar .avatar { border: 2px solid #fff; --s: 46px; }
.follow-dot { position: absolute; left: 50%; bottom: -9px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; }
.follow-dot svg.i { width: 14px; height: 14px; stroke-width: 3; }
.follow-dot.on { background: #fff; color: var(--accent); }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: #fff; min-width: 52px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.act svg.i { width: 34px; height: 34px; stroke-width: 1.8; fill: rgba(255, 255, 255, 0.0); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45)); transition: transform 0.15s; }
.act:active svg.i { transform: scale(0.88); }
.act.liked svg.i { fill: var(--accent); stroke: var(--accent); animation: pop 0.3s ease-out; }
.act.saved svg.i { fill: var(--gold); stroke: var(--gold); }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.burst { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.burst-heart { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: var(--accent); animation: burst 0.85s ease-out forwards; }
.burst-heart svg.i { width: 100%; height: 100%; fill: var(--accent); stroke: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4)); }
@keyframes burst { 0% { transform: scale(0.3) rotate(-15deg); opacity: 0; } 20% { transform: scale(1.15) rotate(-8deg); opacity: 1; } 45% { transform: scale(1) rotate(-8deg); } 100% { transform: translateY(-80px) scale(1.4); opacity: 0; } }
.end-card { display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #1d1d1d, #000 70%); }
.end-inner { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px; max-width: 420px; }
.end-inner h2 { font-size: 20px; }
.end-inner p { color: var(--text-2); }
.pager { display: none; }
.stage:fullscreen { inset: 0; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.stage:-webkit-full-screen { width: 100vw; height: 100vh; }

/* ---------- Tiles & grids ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; margin-top: 14px; }
.grid > .empty, .grid > .spinner, .grid > p { grid-column: 1 / -1; }
.tile { display: grid; gap: 6px; min-width: 0; }
.tile-media { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #171717; display: block; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tile:hover .tile-media img { transform: scale(1.03); }
.tile-art { position: absolute; inset: 0; display: grid; place-items: center; color: #777; background: linear-gradient(140deg, #262626, #121212); }
.tile-kind { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); }
.tile-kind:empty { display: none; }
.tile-kind svg.i { width: 14px; height: 14px; }
.tile-kind svg.i[class] { fill: none; }
.tile-stats { position: absolute; bottom: 6px; left: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.tile-stats svg.i { width: 15px; height: 15px; }
.tile-title { font-weight: 650; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.tile-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid.tight { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0 -16px; }
.grid.tight .tile { gap: 0; }
.grid.tight .tile-media { border-radius: 0; }
.grid.tight .tile-title, .grid.tight .tile-meta { display: none; }

/* ---------- Explore ---------- */
.explore { max-width: 1120px; }
.explore-head { position: sticky; top: 0; z-index: 10; background: #000; padding: calc(var(--safe-t) + 10px) 16px 10px; margin: calc(-10px - var(--safe-t)) -16px 0; display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; height: 100%; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.people-list { display: grid; gap: 4px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.person-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.person-link > span:not(.avatar), .person > span:not(.avatar) { display: grid; flex: 1; min-width: 0; }
.person strong { display: flex; align-items: center; }
.person small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#more { margin: 18px 0; }

/* ---------- Lesson ---------- */
.lesson { max-width: 980px; }
.lesson-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; margin: 0 -16px; border-radius: 0; }
.lesson-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.audio-player, .doc-player { display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; min-height: 240px; }
.audio-card { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; text-align: center; padding: 20px; width: 100%; max-width: 520px; min-width: 0; }
.audio-card strong { font-size: 18px; }
.audio-card span { color: var(--text-2); font-size: 14px; }
.audio-card audio { width: 100%; min-width: 0; margin-top: 8px; }
.image-player { display: grid; place-items: center; }
.lesson-image { position: relative; max-height: 70vh; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.lesson-info { padding: 14px 0; display: grid; gap: 8px; justify-items: start; }
.lesson-info h1 { font-size: 21px; line-height: 1.25; }
.author-row { display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0; }
.author-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.author-link > span:not(.avatar) { display: grid; min-width: 0; }
.author-link strong { display: flex; align-items: center; }
.author-link small { color: var(--muted); font-size: 13px; }
.lesson-actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); font-weight: 650; font-size: 14px; flex: none; }
.pill svg.i { width: 20px; height: 20px; }
.pill.liked svg.i { fill: var(--accent); stroke: var(--accent); }
.pill.saved svg.i { fill: var(--gold); stroke: var(--gold); }
.lesson-desc { width: 100%; background: #161616; border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; line-height: 1.5; color: var(--text-2); }

/* ---------- Profile ---------- */
.profile-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 6px; }
.top-title { grid-column: 2; text-align: center; font-weight: 700; }
.profile-top .icon-btn { grid-column: 3; }
.profile-head { text-align: center; display: grid; justify-items: center; gap: 6px; padding-bottom: 14px; }
.p-avatar { position: relative; }
.p-avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); border: 3px solid #000; }
.p-avatar-edit svg.i { width: 16px; height: 16px; }
.profile-head h1 { font-size: 21px; display: inline-flex; align-items: center; margin-top: 6px; }
.handle { color: var(--muted); font-size: 14px; }
.stats { display: flex; gap: 28px; justify-content: center; margin: 8px 0; }
.stats > * { display: grid; justify-items: center; gap: 0; }
.stats strong { font-size: 17px; }
.stats span { font-size: 13px; color: var(--muted); }
.bio { max-width: 480px; white-space: pre-line; line-height: 1.45; }
.website { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-2); font-weight: 600; font-size: 14px; }
.website svg.i { width: 16px; height: 16px; }
.p-buttons { margin-top: 8px; }
.p-buttons .btn { min-width: 128px; }
.p-tabs { display: flex; border-bottom: 1px solid var(--line); margin: 6px -16px 2px; position: sticky; top: 0; background: #000; z-index: 5; }
.p-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 4px; color: var(--muted); font-weight: 650; font-size: 13.5px; border-bottom: 2px solid transparent; }
.p-tabs a svg.i { width: 20px; height: 20px; }
.p-tabs a.active { color: #fff; border-bottom-color: #fff; }
#p-more { margin: 16px 0; }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.photo-row > div { display: flex; align-items: center; gap: 14px; }

/* ---------- Inbox & messages ---------- */
.inbox-head { display: grid; gap: 12px; margin-bottom: 8px; }
.inbox-head h1 { font-size: 22px; }
.inbox-head .seg .count { margin-left: 4px; }
.notif-list { display: grid; }
.notif { display: flex; align-items: center; gap: 12px; padding: 10px 0; position: relative; }
.notif.new::before { content: ""; position: absolute; left: -10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.n-text { flex: 1; font-size: 14.5px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.n-text strong { display: inline-flex; align-items: center; }
.n-thumb { width: 44px; height: 58px; border-radius: 6px; overflow: hidden; flex: none; background: #1a1a1a; }
.n-thumb img { width: 100%; height: 100%; object-fit: cover; }
.msg-tools { display: flex; justify-content: flex-end; margin: 4px 0 8px; }
.requests-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; }
.requests-row > span:not(.avatar) { flex: 1; display: grid; }
.requests-row small { color: var(--muted); }
.conv-list { display: grid; }
.conv { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-radius: 10px; }
.conv:hover { background: rgba(255, 255, 255, 0.04); }
.conv-main { flex: 1; min-width: 0; display: grid; }
.conv-main strong { display: flex; align-items: center; }
.conv-last { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-last { color: #fff; font-weight: 600; }
.conv-side { display: grid; justify-items: end; gap: 4px; }
.conv-side small { color: var(--muted); font-size: 12px; }
.page.chat { position: fixed; top: 0; left: var(--rail-w); right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); max-width: none; padding: 0; display: flex; flex-direction: column; min-height: 0; z-index: 2; background: #000; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: calc(var(--safe-t) + 6px) 8px 6px; border-bottom: 1px solid var(--line); }
.chat-who { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-who > span:not(.avatar) { display: grid; min-width: 0; }
.chat-who strong { display: flex; align-items: center; font-size: 15px; }
.chat-who small { color: var(--muted); font-size: 12px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 8px 14px 12px; overscroll-behavior: contain; }
.chat-intro { display: grid; justify-items: center; gap: 4px; padding: 20px 0 24px; text-align: center; }
.chat-intro strong { display: flex; align-items: center; margin-top: 6px; font-size: 17px; }
.chat-intro small { color: var(--muted); margin-bottom: 8px; }
.day-sep { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 8px; }
.bubble-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 3px 0; }
.bubble-row.mine { align-items: flex-end; }
.bubble { max-width: min(78%, 520px); padding: 9px 14px; border-radius: 20px; background: var(--surface-3); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.mine .bubble { background: var(--accent); color: #fff; }
.mine .bubble a { color: #fff; }
.post-bubble { display: grid; width: 190px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.post-bubble img, .pb-art { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pb-art { display: grid; place-items: center; background: #222; color: #777; }
.post-bubble > span:not(.avatar) { display: grid; padding: 8px 10px; font-size: 13px; }
.post-bubble small { color: var(--muted); }
.seen { text-align: right; color: var(--muted); font-size: 12px; margin: 2px 4px 0; }
.request-bar { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; }
.request-bar p { font-size: 14px; color: var(--text-2); }
.request-bar .row { justify-content: flex-end; }
.composer-bar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.composer-bar input, .composer-bar textarea { flex: 1; min-width: 0; background: var(--surface-3); border: 0; border-radius: 22px; padding: 11px 16px; outline: none; color: #fff; resize: none; line-height: 1.35; max-height: 140px; }
.send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.send-btn svg.i { width: 20px; height: 20px; }
.composer-off { padding: 14px 16px; color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); }
.composer-off svg.i { width: 18px; height: 18px; }

/* ---------- Settings ---------- */
.sub-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-bottom: 8px; }
.sub-head h1 { font-size: 17px; text-align: center; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface); margin: 6px 0 14px; }
.me-card > span:not(.avatar) { flex: 1; display: grid; }
.me-card strong { display: flex; align-items: center; font-size: 17px; }
.me-card small { color: var(--muted); }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.settings-row > span:not(.avatar):not(.tunza-mark) { flex: 1; display: grid; gap: 1px; }
.settings-row small { color: var(--muted); font-size: 13px; }
.settings-row > svg.i:last-child { color: var(--muted); width: 18px; height: 18px; }
.card-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card-form h3 { font-size: 16px; margin-bottom: 10px; }
.card-form .muted.small { margin: -4px 0 12px; }
.danger-zone { border-color: rgba(229, 36, 59, 0.4); }
.report blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--text-2); }
.report strong { display: block; margin: 4px 0 8px; }
.report-post { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px; border-radius: 10px; background: #1a1a1a; }
.report-post img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; }
.user-admin .person { padding-top: 0; }

/* ---------- Live ---------- */
.live-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 10px 0 6px; }
.live-card { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.lc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.live-card h3 { font-size: 17px; }
.live-card p { color: var(--text-2); font-size: 14px; }
.room-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); color: #ddd; }
.room-badge.on { background: var(--accent); color: #fff; }
.room-host { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.room-host > span:not(.avatar) { display: grid; }
.room-host small { color: var(--muted); font-size: 12.5px; }
.room-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.room-heading h1 { font-size: 20px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--accent-2); }
.room-layout { display: grid; gap: 14px; }
.room-stage { position: relative; }
.room-stage > video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 14px; }
#live-placeholder { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 16 / 9; z-index: 1; border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 16px; background: #0d0d0d; color: var(--text-2); }
#live-placeholder[hidden] { display: none; }
#connection-status { position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 13px; color: #ddd; background: rgba(0, 0, 0, 0.6); border-radius: 8px; padding: 4px 8px; }
#connection-status:empty { display: none; }
#room-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#room-controls .broadcast-help { width: 100%; color: var(--muted); font-size: 13px; }
.room-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 14px; align-content: start; }
.room-panel h3 { font-size: 15px; margin-bottom: 8px; }
.room-panel p { color: var(--text-2); font-size: 14px; }
.admission-approved { color: var(--accent-2) !important; }
.waiting { color: var(--gold) !important; }
.admission-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.admission-row > span:not(.avatar) { display: grid; }
.admission-row small { color: var(--muted); font-size: 12px; }
.admission-row > div { display: flex; gap: 6px; }
#live-messages { max-height: 260px; overflow-y: auto; display: grid; gap: 6px; margin-bottom: 8px; font-size: 14px; }
#live-chat-form { border: 0; padding: 0; background: none; }

/* ---------- Sheets ---------- */
dialog.sheet { padding: 0; margin: 0; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: transparent; color: var(--text); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.6); }
.sheet-panel { position: fixed; left: 0; right: 0; bottom: 0; max-height: 90dvh; background: #161616; border-radius: 18px 18px 0 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--safe-b); animation: slideUp 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); transition: transform 0.15s; }
@keyframes slideUp { from { transform: translateY(100%); } }
.sheet-drawer .sheet-panel { height: 78dvh; display: flex; flex-direction: column; overflow: hidden; }
.sheet-drawer .sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet-full .sheet-panel { top: 0; max-height: none; border-radius: 0; padding-top: var(--safe-t); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 8px; background: #161616; border-bottom: 1px solid var(--line); }
.sheet-head h2 { text-align: center; font-size: 16px; font-weight: 700; }
.sheet-grip { justify-self: center; }
.sheet-bottom .sheet-head::before, .sheet-drawer .sheet-head::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.sheet-body { padding: 16px; }
.sheet-label { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 2px 0 10px; }
.comments-body { padding: 4px 16px; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.c-main { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.c-head a { display: inline-flex; align-items: center; }
.c-head .muted { font-size: 12px; }
.comment p { margin: 2px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.c-actions { display: flex; gap: 16px; }
.c-actions .link-btn { font-size: 12.5px; color: var(--muted); }
.send-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 14px; }
.send-to { display: grid; justify-items: center; gap: 5px; width: 62px; flex: none; font-size: 12px; color: var(--text-2); }
.send-to span { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-to.sent span { color: var(--accent-2); font-weight: 700; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; margin-bottom: 8px; }
.share-target { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--text-2); text-align: center; }
.share-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #2c2c2c; color: #fff; }
.s-whatsapp { background: #25d366; } .s-sms { background: #34c759; } .s-email { background: #5b5b5b; } .s-x { background: #000; border: 1px solid #444; } .s-facebook { background: #1877f2; } .s-linkedin { background: #0a66c2; } .s-copy { background: var(--accent); }
.menu-list { display: grid; margin-top: 12px; border-top: 1px solid var(--line); }
.menu-list > button, .menu-list > a { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 4px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.menu-list > :last-child { border-bottom: 0; }
.copy-field { margin-bottom: 16px; }
.compose-head { grid-template-columns: 40px 1fr 40px; }
.compose-hint { margin: 10px 0 14px; }
.dropzone { position: relative; display: grid; place-items: center; min-height: 180px; border: 2px dashed rgba(255, 255, 255, 0.2); border-radius: 14px; margin-bottom: 16px; cursor: pointer; overflow: hidden; background: #111; text-align: center; transition: border-color 0.15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.has-file input { pointer-events: none; }
.dz-empty { display: grid; justify-items: center; gap: 6px; padding: 24px; color: var(--text-2); pointer-events: none; }
.dz-empty small { color: var(--muted); }
.dropzone.has-file { border-style: solid; cursor: default; }
.dropzone.has-file .dz-empty { display: none; }
.dz-preview { width: 100%; display: grid; justify-items: center; gap: 6px; position: relative; z-index: 1; }
.dz-preview img, .dz-preview video { max-height: 46vh; width: 100%; object-fit: contain; background: #000; }
.dz-meta { color: var(--muted); padding: 4px 0 8px; }
.dz-file { display: grid; justify-items: center; gap: 6px; padding: 28px; }
.dz-file small { color: var(--muted); }
.dropzone.has-file::after { content: "Tap to change file"; position: absolute; top: 8px; right: 8px; z-index: 2; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.6); padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.dropzone.has-file input { pointer-events: auto; z-index: 3; height: 34px; top: 0; bottom: auto; }
.progress-wrap { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-bottom: 12px; }
.progress-wrap .bar { grid-column: 1 / -1; height: 6px; background: #2a2a2a; border-radius: 6px; overflow: hidden; }
.progress-wrap .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.progress-wrap small { color: var(--text-2); }

/* Toast */
#toast { position: fixed; z-index: 3000; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 12px; background: #fff; color: #000; font-weight: 650; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { color: var(--accent); font-weight: 800; }
dialog #toast { bottom: calc(var(--safe-b) + 18px); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(0, 0, 0, 0.96); display: grid; place-items: center; touch-action: none; overflow: hidden; animation: fadeIn 0.15s; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; transition: transform 0.08s; transform-origin: center; user-select: none; }
.lightbox.zoomed img { cursor: grab; }
.lb-close { position: absolute; top: calc(var(--safe-t) + 10px); right: 10px; background: rgba(255, 255, 255, 0.14); }
.lb-hint { position: absolute; bottom: calc(var(--safe-b) + 18px); left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; pointer-events: none; }

/* ---------- Welcome ---------- */
.welcome { min-height: 100dvh; display: grid; align-content: start; background: radial-gradient(80% 50% at 0% 0%, rgba(37, 244, 238, 0.10), transparent 70%), radial-gradient(70% 50% at 100% 40%, rgba(254, 44, 85, 0.14), transparent 70%), #000; }
.welcome.single { place-items: center; padding: 16px; }
.welcome-hero { padding: calc(var(--safe-t) + 22px) 22px 18px; display: grid; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand span { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.35em; color: var(--muted); font-weight: 700; margin-top: 2px; }
.welcome-hero h1 { font-size: clamp(34px, 9vw, 64px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 850; margin-top: 10px; }
.welcome-hero h1 em { font-style: normal; color: var(--accent); }
.welcome-hero > p { color: var(--text-2); font-size: 16px; max-width: 520px; }
.welcome-points { list-style: none; padding: 0; margin: 4px 0 0; display: none; gap: 10px; }
.welcome-points li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.welcome-points svg.i { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; }
.welcome-card { background: rgba(18, 18, 18, 0.92); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 20px calc(var(--safe-b) + 24px); display: grid; gap: 14px; align-content: start; }
.welcome.single .welcome-card { border-radius: 22px; width: min(100%, 440px); }
.welcome-card h2 { font-size: 22px; }
.welcome-card .link-btn { justify-self: start; margin: -6px 0 12px; }
.welcome-card .fine { text-align: center; margin: 0; }

/* ---------- Phones: small screens ---------- */
@media (max-width: 359px) {
  .act svg.i { width: 30px; height: 30px; }
  .feed-tabs { gap: 14px; }
  .feed-tabs a { font-size: 15px; }
  .share-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Tablets & computers ---------- */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lesson-player { margin: 0; border-radius: 14px; }
}
@media (min-width: 768px) {
  :root { --rail-w: 76px; --tabbar-h: 0px; }
  .tabbar { display: none; }
  #main { margin-left: var(--rail-w); padding-bottom: 0; }
  .rail-nav { display: flex; flex-direction: column; gap: 2px; position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--rail-w); padding: 14px 10px; background: #000; border-right: 1px solid rgba(255, 255, 255, 0.08); overflow-y: auto; scrollbar-width: none; }
  .rail-nav .brand { padding: 4px 8px 16px; }
  .rail-nav .brand span, .rail-nav nav span, .rail-nav .create-btn span, .rail-me span, .rail-legal { display: none; }
  .rail-nav nav { display: grid; gap: 2px; }
  .rail-nav nav a { position: relative; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; border-radius: 12px; font-weight: 650; font-size: 16px; color: #e6e6e6; }
  .rail-nav nav a:hover { background: rgba(255, 255, 255, 0.06); }
  .rail-nav nav a.active { color: var(--accent); }
  .rail-nav nav a.active svg.i { stroke-width: 2.4; }
  .rail-nav nav a .dot { position: absolute; top: 10px; left: 34px; margin: 0; }
  .create-btn { margin: 10px 0; padding: 0; }
  .rail-me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 8px; border-radius: 12px; }
  .rail-me:hover { background: rgba(255, 255, 255, 0.06); }
  .rail-me > span:not(.avatar) { display: grid; min-width: 0; }
  .rail-me small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .page { padding-top: 18px; }
  .page.chat { top: 0; bottom: 0; }
  .page.chat > * { width: 100%; max-width: 760px; margin-inline: auto; }
  .page.chat .chat-head { border-bottom: 1px solid var(--line); }
  .explore-head { padding-top: 16px; margin-top: -18px; }
  #toast { bottom: 24px; }

  /* Feed on computers: centered 9:16 card with actions beside it */
  .feed-page { left: var(--rail-w); bottom: 0; display: grid; grid-template-rows: 64px 1fr; }
  .feed-top { position: relative; background: none; padding: 0 20px; justify-content: center; gap: 24px; }
  .feed-top > .icon-btn.ghost { position: absolute; }
  .feed-top > .icon-btn.ghost:first-child { left: 20px; }
  .feed-top-right { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); gap: 8px; }
  .reels { min-height: 0; }
  .reel { display: flex; justify-content: center; align-items: flex-end; gap: 18px; padding: 0 0 20px; }
  .stage { position: relative; inset: auto; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - var(--rail-w) - 200px); border-radius: 16px; }
  .stage-tools { top: auto; bottom: 14px; left: 0; right: 0; padding: 0 12px; flex-direction: row; gap: 8px; opacity: 0; transition: opacity 0.2s; }
  .stage-tools .grow, .stage-tools .only-wide { display: flex; }
  .stage-tools .time { align-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
  .stage:hover .stage-tools, .reel.paused .stage-tools, .stage:focus-within .stage-tools, .stage:fullscreen .stage-tools { opacity: 1; }
  .tool { width: 38px; height: 38px; }
  .caption { bottom: 62px; right: 16px; }
  .sound-hint { top: 18px; }
  .actions { position: static; justify-content: flex-end; gap: 16px; padding-bottom: 6px; }
  .act { color: #fff; font-size: 12.5px; text-shadow: none; }
  .act svg.i { width: 50px; height: 50px; padding: 12px; border-radius: 50%; background: #1f1f1f; filter: none; stroke-width: 2; }
  .act:hover svg.i { background: #2b2b2b; }
  .act.liked svg.i, .act.saved svg.i { background: #1f1f1f; }
  .pager { display: flex; flex-direction: column; gap: 12px; position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 6; }
  .pager .icon-btn { width: 46px; height: 46px; background: #1f1f1f; }
  .pager .icon-btn:hover { background: #2b2b2b; }
  .end-card, .loading-reel { width: 100%; }

  /* Sheets become panels */
  .sheet-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 760px); border-radius: 16px; transform: translate(-50%, -50%); animation: fadeScale 0.18s ease-out; padding-bottom: 0; }
  @keyframes fadeScale { from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); } }
  .sheet-drawer .sheet-panel { left: auto; right: 0; top: 0; bottom: 0; height: 100%; max-height: none; width: 440px; border-radius: 0; transform: none; animation: slideLeft 0.22s ease-out; border-left: 1px solid var(--line); }
  @keyframes slideLeft { from { transform: translateX(100%); } }
  .sheet-full .sheet-panel { top: 50%; width: min(600px, calc(100vw - 32px)); max-height: 92vh; border-radius: 16px; padding-top: 0; }
  .sheet-bottom .sheet-head::before, .sheet-drawer .sheet-head::before { display: none; }
  .share-grid { grid-template-columns: repeat(4, 1fr); }

  .welcome { grid-template-columns: 1fr minmax(380px, 440px); align-items: center; gap: 48px; padding: 40px clamp(24px, 6vw, 96px); }
  .welcome-hero { padding: 0; }
  .welcome-points { display: grid; }
  .welcome-card { border-radius: 22px; padding: 26px; }
  .welcome.single { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.tight { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 4px; }
  .grid.tight .tile-media { border-radius: 6px; }
  .room-layout { grid-template-columns: 1fr 340px; }
  .profile .p-tabs { margin: 6px 0 2px; }
}
@media (min-width: 1200px) {
  :root { --rail-w: 240px; }
  .rail-nav { padding: 18px 14px; }
  .rail-nav .brand span, .rail-nav nav span, .rail-nav .create-btn span, .rail-me span, .rail-legal { display: revert; }
  .rail-nav .brand span { display: block; }
  .rail-me > span:not(.avatar) { display: grid; }
  .rail-nav nav a .dot { position: static; margin-left: auto; }
  .rail-legal { font-size: 12px; color: var(--muted); padding: 10px 8px 0; }
  .rail-legal a:hover { color: #fff; }
}
@media (hover: none) {
  .stage-tools { opacity: 1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 1.1: sideways rows (subject and format chips) scroll with a mouse too. */
.hscroll { position: relative; min-width: 0; }
.hscroll > .chips { cursor: grab; }
.hscroll > .chips.dragging { cursor: grabbing; user-select: none; }
.hscroll > .chips.dragging .chip { pointer-events: none; }
.hscroll-btn { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; place-items: center; background: rgba(28, 28, 30, 0.92); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.hscroll-btn .i { width: 18px; height: 18px; }
.hscroll-btn.prev { left: -6px; }
.hscroll-btn.next { right: -6px; }
.hscroll::before, .hscroll::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.15s; }
.hscroll::before { left: -16px; background: linear-gradient(90deg, var(--bg), transparent); }
.hscroll::after { right: -16px; background: linear-gradient(270deg, var(--bg), transparent); }
.hscroll.can-prev::before, .hscroll.can-next::after { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .hscroll.can-prev .hscroll-btn.prev, .hscroll.can-next .hscroll-btn.next { display: grid; }
  .hscroll > .chips { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; padding-bottom: 6px; }
  .hscroll > .chips::-webkit-scrollbar { display: block; height: 6px; }
  .hscroll > .chips::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 3px; }
  .hscroll > .chips::-webkit-scrollbar-track { background: transparent; }
}


/* ===================== 1.1 ===================== */
.wrap { flex-wrap: wrap; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding-inline: 0; }
.danger-text { color: var(--danger) !important; }
.held-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gold); margin-top: 4px; }
.held-note svg.i { width: 14px; height: 14px; flex: none; }
.hashtag { color: var(--accent-2); font-weight: 600; }
.hashtag:hover { text-decoration: underline; }
.menu-list > button > span, .menu-list > a > span { display: grid; gap: 1px; }
.menu-list small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.share-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.share-note svg.i { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Landing page */
.landing { min-height: 100dvh; background: radial-gradient(70% 40% at 0% 0%, rgba(37, 244, 238, 0.10), transparent 70%), radial-gradient(60% 40% at 100% 20%, rgba(254, 44, 85, 0.12), transparent 70%), #000; }
.land-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.land-head nav { display: flex; gap: 8px; }
.landing main { max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; display: grid; gap: 22px; }
.landing section { scroll-margin-top: 70px; }
.land-hero { padding: 40px 0 8px; display: grid; gap: 16px; }
.land-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.land-hero h1 { font-size: clamp(38px, 10vw, 76px); line-height: 1; letter-spacing: -0.04em; font-weight: 850; }
.land-hero h1 em { font-style: normal; color: var(--accent); }
.land-lead { color: var(--text-2); font-size: 17px; max-width: 640px; }
.land-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.land-ys { color: var(--muted); font-size: 14px; }
.land-ys a, .land-foot a, .land-faq a { color: var(--accent-2); }
.land-free { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(254, 44, 85, 0.18), rgba(37, 244, 238, 0.12)); border: 1px solid rgba(255, 255, 255, 0.12); }
.land-free strong { font-size: 20px; }
.land-free span { color: var(--text-2); }
.land-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.land-grid article { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.land-grid article svg.i { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: rgba(255, 255, 255, 0.08); }
.land-grid h2 { font-size: 17px; }
.land-grid p { color: var(--text-2); font-size: 14.5px; }
.land-share, .land-teach, .land-safety, .land-steps, .land-faq { padding: 22px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.land-share h2, .land-teach h2, .land-safety h2, .land-steps h2, .land-faq h2 { font-size: clamp(22px, 5vw, 30px); letter-spacing: -0.02em; }
.land-share p, .land-teach > p { color: var(--text-2); max-width: 720px; }
.land-ideas { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.land-ideas li { padding: 8px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.land-share .btn, .land-teach .btn, .land-steps .btn { justify-self: start; }
.land-teach { background: linear-gradient(160deg, rgba(250, 206, 21, 0.10), transparent 60%), var(--surface); }
.land-teach ul, .land-safety ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.land-teach li, .land-safety li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.land-teach li svg.i, .land-safety li svg.i { width: 22px; height: 22px; flex: none; color: var(--accent-2); }
.land-steps ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.land-steps li { display: grid; gap: 2px; padding-left: 42px; position: relative; counter-increment: s; }
.land-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); font-weight: 800; }
.land-steps li span { color: var(--text-2); font-size: 14.5px; }
.land-faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.land-faq summary { cursor: pointer; font-weight: 650; }
.land-faq details p { color: var(--text-2); margin-top: 8px; }
.land-foot { max-width: 1080px; margin: 0 auto; padding: 22px 16px calc(var(--safe-b) + 28px); display: grid; gap: 8px; border-top: 1px solid var(--line); }
.land-foot nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--text-2); }
@media (min-width: 900px) { .land-hero { padding: 72px 0 16px; } .land-share, .land-teach, .land-safety, .land-steps, .land-faq { padding: 30px; } }
.btn-ys { background: #fff; color: #000; }
.btn-ys:hover { background: #e9e9e9; }
/* 1.1: Continue with Apple / Google (each provider's own look for dark screens) */
.sso-list { display: grid; gap: 10px; }
.btn-sso { position: relative; gap: 10px; }
.btn-sso .sso-mark { flex: 0 0 auto; width: 20px; height: 20px; object-fit: contain; }
.btn-sso svg.sso-mark { width: 17px; height: 19px; margin-top: -2px; }
.btn-sso[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.btn-apple { background: #fff; color: #000; }
.btn-apple:hover { background: #e9e9e9; }
.btn-google { background: #131314; color: #e3e3e3; border: 1px solid #8e918f; font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-weight: 500; }
.btn-google:hover { background: #1f1f20; }
.gsi-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; width: 100%; color-scheme: normal; }
.gsi-slot > div { max-width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice { padding: 10px 12px; border-radius: 10px; background: rgba(250, 206, 21, 0.12); color: #f5e6a5; font-size: 14px; }
.code-input { letter-spacing: 0.4em; font-size: 22px !important; text-align: center; font-variant-numeric: tabular-nums; }
.qr { width: 220px; height: 220px; margin: 12px auto; border-radius: 12px; background: #fff; padding: 8px; image-rendering: pixelated; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.recovery-codes code { padding: 8px; border-radius: 8px; background: var(--surface-2); text-align: center; font-size: 15px; letter-spacing: 0.06em; }

/* Your content */
.content-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 10px; }
.content-bar .check { margin: 0; flex: 1; min-width: 160px; }
.content-list { display: grid; }
.content-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.content-item input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.content-item > span:last-child { display: grid; gap: 2px; min-width: 0; }
.content-item small { color: var(--muted); font-size: 12.5px; }
.ci-thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Feed: masterclass previews, narrated cards, audio */
.lesson-flag { position: absolute; z-index: 3; top: calc(var(--safe-t) + 62px); left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); font-size: 12.5px; font-weight: 700; }
.lesson-flag svg.i { width: 16px; height: 16px; }
.lesson-cta { position: absolute; z-index: 5; left: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 150px); display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.95); color: #000; font-weight: 750; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.lesson-cta svg.i { width: 16px; height: 16px; }
.sound-flag { position: absolute; z-index: 3; top: calc(var(--safe-t) + 62px); left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); font-size: 12px; font-weight: 700; }
.sound-flag svg.i { width: 15px; height: 15px; }
video.audio-only { opacity: 0; pointer-events: none; }
.feed-title { color: #fff; font-weight: 700; font-size: 17px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.feed-top-right { display: flex; align-items: center; gap: 2px; }
@media (max-width: 359px) { .feed-bell { display: none !important; } }
@media (min-width: 768px) { .lesson-cta { bottom: 120px; } }

/* Filters (CSS fallback when a filter isn't built into the file) */
[data-flt="bright"] { filter: brightness(1.12) contrast(1.05); }
[data-flt="warm"] { filter: sepia(0.2) saturate(1.2) brightness(1.04); }
[data-flt="cool"] { filter: hue-rotate(-10deg) saturate(1.05) brightness(1.03); }
[data-flt="vivid"] { filter: saturate(1.45) contrast(1.08); }
[data-flt="mono"] { filter: grayscale(1) contrast(1.08); }
[data-flt="vintage"] { filter: sepia(0.45) contrast(0.92) brightness(1.05) saturate(0.85); }
[data-flt="soft"] { filter: contrast(0.9) brightness(1.07) saturate(0.95); }
[data-flt="sharp"] { filter: contrast(1.35) brightness(1.06) saturate(0.9); }

/* Composer: filters, compression, #tags, privacy */
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.filter-pick { margin: -4px 0 14px; }
.filter-row { gap: 10px; }
.filter-chip { display: grid; justify-items: center; gap: 4px; flex: none; font-size: 12px; color: var(--text-2); }
.fc-swatch { width: 60px; height: 60px; border-radius: 10px; background: #333 center / cover no-repeat; border: 2px solid transparent; }
.filter-chip.active { color: #fff; font-weight: 700; }
.filter-chip.active .fc-swatch { border-color: var(--accent); }
.compress-row { border-bottom: 0; padding-top: 0; }
.tag-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 12px; }
.tag-suggest:empty { display: none; }
.tag-suggest .chip { padding: 5px 10px; font-size: 13px; }
.post-privacy { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.post-privacy legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 6px; }
.seg-choice { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg-choice label { cursor: pointer; padding: 9px 8px; }
.seg-choice label input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice label svg.i { width: 16px; height: 16px; }
.seg-choice label:has(input:focus-visible) { outline: 2px solid var(--accent-2); }

/* Tiles */
.tile-vis, .tile-review { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); font-size: 11px; font-weight: 700; }
.tile-vis svg.i, .tile-review svg.i { width: 12px; height: 12px; }
.tile-review { top: auto; bottom: 30px; right: 8px; color: var(--gold); }
.tile-more { position: absolute; bottom: 4px; right: 4px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff; z-index: 2; }
.tile-more svg.i { width: 18px; height: 18px; }
.grid.tight .tile-vis span { display: none; }

/* Explore: filters, trending, live now, Tunza */
.search-row { display: flex; align-items: center; gap: 6px; }
.search-row .search { flex: 1; min-width: 0; }
.filter-btn { position: relative; background: var(--surface-2); width: 46px; height: 46px; }
.filter-btn.on { background: #fff; color: #000; }
.filter-btn .count { position: absolute; top: -2px; right: -2px; }
.tunza-btn { background: var(--surface-2); width: 46px; height: 46px; }
.filter-group { border: 0; padding: 0; margin: 0 0 16px; }
.filter-group legend { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.filter-group .chip { cursor: pointer; }
.filter-actions { justify-content: space-between; margin-top: 6px; }
.trending, .live-strip { display: grid; gap: 6px; margin: 10px 0 2px; }
.trend-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--text-2); text-transform: uppercase; }
.trend-label svg.i { width: 15px; height: 15px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.6); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(254, 44, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); } }
.live-pill { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid rgba(254, 44, 85, 0.5); text-align: left; }
.live-pill .avatar { box-shadow: 0 0 0 2px var(--accent); }
.live-pill > span:last-child { display: grid; line-height: 1.2; }
.live-pill small { color: var(--muted); font-size: 11.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tunza-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), #7c5cff); color: #000; font-weight: 900; font-size: 15px; line-height: 1; flex: none; }
.tunza-mark.lg { width: 30px; height: 30px; font-size: 18px; justify-self: start; }
.icon-btn.tunza-top .tunza-mark { width: 26px; height: 26px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.tunza-card { margin: 12px 0 4px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(140deg, rgba(37, 244, 238, 0.10), rgba(124, 92, 255, 0.10)), var(--surface); border: 1px solid rgba(37, 244, 238, 0.25); display: grid; gap: 10px; }
.tunza-head { display: flex; align-items: center; gap: 8px; }
.tunza-head small { flex: 1; }
.tunza-summary { color: var(--text); font-size: 15px; line-height: 1.5; }
.tunza-tips { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 4px; }
.tunza-related .chip { font-size: 13px; padding: 6px 11px; }
.tunza-related svg.i { width: 13px; height: 13px; }

/* Tunza help drawer */
.sheet-head .tunza-mark + h2 { text-align: center; }
.sheet-head h2 small { font-weight: 500; font-size: 13px; margin-left: 4px; }
.tz-body { display: flex; flex-direction: column; gap: 10px; }
.tz-log { display: grid; gap: 10px; align-content: start; }
.tz-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; background: var(--surface-2); justify-self: start; border-bottom-left-radius: 4px; }
.tz-msg.me { justify-self: end; background: var(--accent); color: #fff; border-radius: 16px; border-bottom-right-radius: 4px; }
.tz-msg a { color: var(--accent-2); text-decoration: underline; }
.tz-more { margin-top: 8px; }
.tz-more .chip { font-size: 12.5px; padding: 5px 10px; }
.tz-topics { margin-top: 4px; }
.tz-topics .chip { font-size: 13px; }
.tz-msg.typing { display: inline-flex; gap: 4px; padding: 14px; }
.tz-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: tzDot 1s infinite; }
.tz-msg.typing span:nth-child(2) { animation-delay: 0.15s; } .tz-msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tzDot { 50% { opacity: 0.3; transform: translateY(-2px); } }
.tz-form { margin: 0 12px; }
.tz-foot { text-align: center; padding: 0 16px calc(var(--safe-b) + 10px); margin-top: 6px; }
.tz-foot a { color: var(--accent-2); }
.rail-help { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
.rail-help:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail-help span:last-child { display: none; }
@media (min-width: 1200px) { .rail-help span:last-child { display: inline; } }
.settings-row .tunza-mark { width: 24px; height: 24px; }

/* Admin console */
.admin-tabs { margin: 4px -16px 12px; }
.admin-tabs .chip { gap: 6px; }
.admin-tabs .count { margin-left: 2px; }
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.a-stat { padding: 12px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 2px; }
.a-stat strong { font-size: 22px; letter-spacing: -0.02em; }
.a-stat span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.a-stat small { font-size: 12px; color: var(--muted); }
.a-chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 14px 0 4px; }
.a-chart span { flex: 1; min-height: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(var(--accent), rgba(254, 44, 85, 0.4)); }
.q-item { display: grid; gap: 8px; }
.q-item.urgent { border-color: rgba(250, 206, 21, 0.6); }
.q-item blockquote, .report blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--text-2); background: var(--surface-2); border-radius: 0 8px 8px 0; white-space: pre-wrap; word-break: break-word; }
.q-author { display: flex; align-items: center; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.q-author > span:not(.avatar) { flex: 1; display: grid; min-width: 0; }
.q-author small { color: var(--muted); font-size: 12.5px; }
.tag.danger { color: #fff; background: var(--danger); }
.report-post { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.report-post img, .report-post .tile-art { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; position: static; }
.report-post > span:last-child { display: grid; gap: 2px; min-width: 0; }
.report-post small { color: var(--muted); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.a-post .row { margin-top: 10px; }
.a-log { display: grid; }
.a-log-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.user-admin .person { margin-bottom: 10px; }

/* Live classes 1.1 */
.room-badge.rec { background: #b91c1c; color: #fff; }
.room-heading { flex-wrap: wrap; }
.room-heading > div { flex: 1; min-width: 0; }
#room-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.stage-box { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.stage-box > video, .stage-box > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage-box > canvas.drawing { cursor: crosshair; touch-action: none; }
.stage-box:fullscreen { aspect-ratio: auto; border-radius: 0; }
.stage-box #live-placeholder { inset: 0; aspect-ratio: auto; }
.stage-overlay { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; pointer-events: none; }
.ov-chip { padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ov-chip.rec { background: #b91c1c; }
.ov-chip.done { background: var(--gold); color: #000; }
.ov-pinned { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.72); font-size: 14px; font-weight: 600; pointer-events: none; }
.ctl-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.ctl { display: inline-grid; justify-items: center; gap: 2px; min-width: 58px; padding: 7px 8px; border-radius: 10px; background: var(--surface-2); font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.ctl svg.i { width: 20px; height: 20px; color: #fff; }
.ctl:hover:not(:disabled) { background: var(--surface-3); }
.ctl.active { background: #fff; color: #000; }
.ctl.active svg.i { color: #000; }
.ctl.off { background: rgba(255, 77, 109, 0.18); color: var(--danger); }
.ctl.off svg.i { color: var(--danger); }
.ctl.danger { background: rgba(229, 36, 59, 0.9); color: #fff; }
.ctl.rec { background: #b91c1c; color: #fff; }
.rec-dot { width: 14px; height: 14px; margin: 3px; border-radius: 3px; background: #fff; }
.ctl-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.tools-bar { margin-top: 8px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.swatch { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid transparent; }
.swatch span { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); }
.swatch.active { border-color: #fff; }
.slide-count { font-size: 13px; color: var(--text-2); min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.ctl-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); padding: 0 6px; }
.room-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.room-tabs button { position: relative; padding: 8px 4px; }
.room-tabs .count { margin-left: 4px; }
.room-tabs .dot { position: absolute; top: 6px; right: 8px; margin: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.panel-head h3 { margin: 0; }
.live-messages { max-height: 300px; overflow-y: auto; display: grid; gap: 6px; margin-bottom: 8px; font-size: 14px; align-content: start; }
#panel .composer-bar { border: 0; padding: 0; background: none; margin-bottom: 10px; }
.qa-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa-item p { color: var(--text) !important; }
.qa-item.answered { opacity: 0.55; }
.qa-vote { display: grid; justify-items: center; min-width: 38px; padding: 4px; border-radius: 8px; background: var(--surface-2); font-size: 11px; color: var(--text-2); }
.qa-vote span { font-size: 13px; font-weight: 800; color: #fff; }
.qa-vote.on { background: var(--accent); color: #fff; }
.poll-card { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; }
.poll-card h3 { margin: 0; }
.poll-option { justify-content: flex-start; }
.poll-result { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 9px; background: #262626; overflow: hidden; font-size: 14px; }
.poll-result > span:not(.poll-bar), .poll-result strong { position: relative; z-index: 1; }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(37, 244, 238, 0.25); transition: width 0.3s; }
.poll-result.mine { outline: 2px solid var(--accent-2); }
@media (max-width: 600px) { .ctl { min-width: 52px; padding: 6px; } .ctl span { font-size: 10.5px; } .ctl-sep { display: none; } }
.tile-stats { padding: 1px 7px 1px 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); text-shadow: none; }
.sheet-panel .hscroll::before { background: linear-gradient(90deg, #161616, transparent); }
.sheet-panel .hscroll::after { background: linear-gradient(270deg, #161616, transparent); }
@media (max-width: 420px) { .seg.tabs3 > * { white-space: nowrap; padding-inline: 6px; } .seg.tabs3 > * svg.i { display: none; } }
.ctl.danger { color: #fff !important; }
.ctl.danger svg.i { color: #fff; }
@media (min-width: 768px) { .admin-tabs { flex-wrap: wrap; overflow: visible; margin: 4px 0 12px; padding-inline: 0; } }
/* The narrow side rail (tablets, small laptops) shows your picture, not a squeezed name. */
@media (min-width: 768px) and (max-width: 1199px) {
  .rail-me { justify-content: center; padding: 8px 0; }
  .rail-me > span:not(.avatar) { display: none; }
  .rail-me > .avatar { display: inline-grid; }
}

/* 1.1: refresh and reminders */
.feed-refresh { display: none; }
@media (min-width: 768px) and (hover: hover) { .feed-refresh { display: inline-grid; } }
.pull-hint { position: absolute; z-index: 7; left: 50%; top: calc(var(--safe-t) + 58px); transform: translate(-50%, calc(-20px + var(--pull, 0) * 20px)); opacity: calc(0.3 + var(--pull, 0) * 0.7); display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(28, 28, 28, 0.92); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); pointer-events: none; }
.pull-hint[hidden] { display: none; }
.pull-hint .pull-icon svg.i { width: 18px; height: 18px; transform: rotate(calc(var(--pull, 0) * 270deg)); transition: transform 0.1s; }
.pull-hint.busy { opacity: 1; transform: translate(-50%, 0); }
.pull-hint.busy .pull-icon svg.i { animation: spin 0.8s linear infinite; }
.new-pill { position: absolute; z-index: 7; left: 50%; top: calc(var(--safe-t) + 58px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.new-pill svg.i { width: 16px; height: 16px; }
@media (min-width: 768px) { .pull-hint, .new-pill { top: 72px; } }
.nudge-card { display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(254, 44, 85, 0.22), #000 70%); }
.nudge-card .end-inner > svg.i { color: var(--accent); }
@media (min-width: 768px) { .nudge-card { width: 100%; } }
.nudge-banner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 12px 14px; margin: 12px 0; border-radius: 14px; background: linear-gradient(135deg, rgba(254, 44, 85, 0.18), #151515 70%); border: 1px solid var(--line); }
.nudge-banner .nudge-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.nudge-banner strong { display: block; font-size: 15px; }
.nudge-banner span:not(.nudge-icon) { display: block; color: var(--text-2); font-size: 13px; line-height: 1.35; }
@media (max-width: 420px) { .nudge-banner { grid-template-columns: auto 1fr auto; } .nudge-banner [data-nudge-create] { grid-column: 2 / 3; justify-self: start; } .nudge-banner [data-nudge-close] { grid-row: 1; grid-column: 3; } }
.nudge-glow { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.55); animation: glow 2.4s ease-out 3; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.55); } 70% { box-shadow: 0 0 0 12px rgba(254, 44, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .nudge-glow, .pull-hint.busy .pull-icon svg.i { animation: none; } }
.explore.pulling .explore-head { transform: translateY(12px); transition: transform 0.15s; }
