:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --raise: #181818;
  --line: #242424;
  --line-2: #333333;
  --text: #f4f1ea;
  --muted: #8d8a83;
  --faint: #5c5a55;
  --accent: #e2532f;
  --accent-ink: #160805;
  --accent-soft: rgba(226, 83, 47, 0.14);
  --good: #6fbf73;
  --radius: 14px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
@font-face { font-family: 'Bodoni Moda'; src: url('/fonts/bodoni-moda.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
.display { font-family: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; line-height: 0.95; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
/* 16px or iPhone zooms in on tap */
input, textarea, select { font-size: 16px; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wordmark { font-weight: 800; letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.9; font-size: 20px; }
.wordmark span { color: var(--accent); margin-left: 0.18em; }
.logo { display: block; width: 132px; height: auto; }
.logo.lg { width: 240px; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot .logo { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--text); color: #0a0a0a; font-weight: 700; letter-spacing: -0.01em;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.danger { background: #3a1410; color: #ff9c86; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.input {
  width: 100%; height: 46px; padding: 0 14px; background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
  outline: none; transition: border-color 0.15s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.error { color: #ff8a70; font-size: 13px; min-height: 18px; }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- landing / auth ---------- */
.landing { position: relative; min-height: 100vh; background: #050505; overflow: hidden; }
.landing .bg { position: absolute; inset: 0; }
.landing .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; opacity: 0.55; }
.landing .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0.2) 0%, rgba(5,5,5,0.35) 45%, rgba(5,5,5,0.96) 100%); }
.landing .inner {
  position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; text-align: center;
  max-width: 520px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 24px calc(26px + var(--safe-b));
}
.landing .top .logo { margin: 0 auto; width: 150px; }
.landing .mid { padding: 40px 0 28px; display: grid; gap: 14px; justify-items: center; }
.eyebrow { font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: #bdb8ae; }
.landing h1 { font-size: clamp(56px, 16vw, 104px); margin: 2px 0 4px; color: var(--text); }
.landing .sub { margin: 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #d8d4cc; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; height: 54px; margin-top: 14px;
  background: var(--text); color: #0a0a0a; border-radius: 2px; font-size: 12px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase;
  text-decoration: none; transition: transform 0.12s ease, opacity 0.12s ease;
}
.cta:active { transform: scale(0.98); }
.cta:disabled { opacity: 0.5; }
.cta.inline { width: auto; padding: 0 28px; margin: 0; }
.cta-link { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #bdb8ae; text-decoration: underline; text-underline-offset: 4px; padding: 6px; }
.landing .tags { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: #8d8a83; }
.auth-card { display: grid; gap: 14px; }
.sheet-title { font-size: 22px; letter-spacing: 0.08em; }
.sheet.auth-sheet { top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 24px)); }
.fine { font-size: 12px; color: var(--faint); }

/* ---------- app shell ---------- */
body.in-app { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; }
/* Edge to edge by position alone: no height rule that can fail and leave the shell content-sized. */
.shell { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: grid; grid-template-columns: 240px 1fr; grid-template-rows: 100%; }
#callDock.full { top: 0; bottom: 0; height: 100%; }
/* iPhone home-screen app: never shorter than the real screen, even if iOS leaves its viewport shrunk. */
body.standalone .shell, body.standalone #callDock.full { min-height: var(--app-h, 100%); }
/* nothing in the app may ever scroll the page itself */
body.in-app { overscroll-behavior: none; }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.side-top { padding: 16px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.side-foot { padding-bottom: calc(12px + var(--safe-b)); }
.nav { display: grid; gap: 2px; padding: 4px 10px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-weight: 600; position: relative;
}
.nav a:hover { background: var(--raise); color: var(--text); }
.nav a.on { background: var(--raise); color: var(--text); }
.nav a.on .icon { color: var(--accent); }
.side-label { padding: 18px 20px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 700; }
.chan-list { display: grid; gap: 1px; padding: 0 10px; overflow-y: auto; min-height: 0; }
.chan-list a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.chan-list a:hover { background: var(--raise); color: var(--text); }
.chan-list a.on { background: var(--accent-soft); color: var(--text); }
.chan-list a.unread { color: var(--text); font-weight: 700; }
.chan-list a .hash { color: var(--faint); font-weight: 400; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.side-foot .who span { font-size: 12px; color: var(--muted); }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tabbar { display: none; }
.badge-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; margin-left: auto;
}
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); position: relative; flex: none; }
.icon-btn:hover { background: var(--raise); color: var(--text); }
.icon-btn .pip { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  font-weight: 800; font-size: 14px; color: #0a0a0a; text-transform: uppercase; position: relative;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.avatar.xs { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
.lvl { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 6px; background: var(--raise); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.lvl-wrap { display: grid; gap: 8px; }
.bar { height: 6px; border-radius: 3px; background: var(--raise); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.friend-btns { display: flex; gap: 6px; flex: none; }
.fit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.fit { position: relative; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.fit img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; cursor: zoom-in; }
.fit.featured { border-color: rgba(226,83,47,0.5); }
.fit .chip { position: absolute; left: 10px; top: 10px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(10,10,10,0.75); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.fit-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; }
.fit-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fit-bar .like { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.fit-bar .like.on { color: var(--accent); }
.fit-bar .like .icon { width: 16px; height: 16px; }
.sheet.fit-sheet, .sheet.shop-sheet { top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 24px)); max-height: 90%; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; }
.product .art { aspect-ratio: 4 / 5; background: #141414; position: relative; }
.product .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product .art .chip { position: absolute; left: 10px; top: 10px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(10,10,10,0.8); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; display: flex; align-items: center; }
.product.sold-out .art img { opacity: 0.55; }
.pinfo { padding: 10px 12px 12px; display: grid; gap: 2px; }
.pinfo b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo span { font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
.pinfo s { color: var(--faint); }
.gallery { position: relative; background: #141414; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.gallery .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.gallery .dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.gallery .dots button.on { background: var(--text); }
.pprice { font-weight: 700; font-size: 16px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size { height: 40px; min-width: 52px; padding: 0 14px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.size.on { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.size.off { opacity: 0.4; text-decoration: line-through; }
.bag-count { position: absolute; top: 4px; right: 2px; }
.bag-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.bag-line img, .bag-line .ph { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; background: #141414; }
.bag-line .who { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.bag-line .who span { font-size: 13px; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: var(--raise); border-radius: 999px; padding: 2px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; font-size: 16px; font-weight: 700; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; }
.avatar .online { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--panel); }

.view-head {
  height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t); box-sizing: content-box;
}
.view-head h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 6px; min-width: 0; }
.view-head h2 .hash { color: var(--faint); }
.view-head .desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.view-head .spacer { flex: 1; }
.scroll { overflow-y: auto; min-height: 0; flex: 1; -webkit-overflow-scrolling: touch; }
.page { padding: 24px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ---------- chat ---------- */
.msgs { padding: 16px 0 8px; display: flex; flex-direction: column; }
.msgs .older { align-self: center; margin: 4px 0 12px; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 0 12px; padding: 3px 20px; position: relative; }
.msg:hover { background: rgba(255,255,255,0.02); }
.msg.first { margin-top: 12px; }
.msg .gutter { grid-row: span 2; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; }
.msg .meta b { font-size: 14.5px; }
.msg .meta time { font-size: 11.5px; color: var(--faint); }
.role-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; color: #e9e5dd; }
.msg .body .mention { color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.msg.mentions-me { background: rgba(226, 83, 47, 0.06); box-shadow: inset 2px 0 0 var(--accent); }
.msg .body a { color: #f3a48d; }
.msg .deleted { color: var(--faint); font-style: italic; }
.msg .shot { margin-top: 6px; max-width: min(360px, 100%); border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.msg .state { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.msg.pending .body { opacity: 0.55; }
.msg.failed .state { color: #ff8a70; }
.msg .state button { text-decoration: underline; color: inherit; }
.msg .tools {
  position: absolute; right: 16px; top: -14px; display: none; gap: 2px; background: var(--raise); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 3px; z-index: 2;
}
.msg:hover .tools, .msg.tools-open .tools { display: flex; }
.msg .tools button { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: 16px; }
.msg .tools button:hover { background: var(--line); }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react {
  height: 26px; padding: 0 8px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line);
  font-size: 13px; display: inline-flex; align-items: center; gap: 5px;
}
.react.mine { border-color: var(--accent); background: var(--accent-soft); }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 18px 20px 4px; color: var(--faint); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.empty-chan { padding: 40px 24px 8px; }
.empty-chan h3 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.03em; }
.typing { height: 22px; padding: 0 20px; font-size: 12px; color: var(--muted); flex: none; }
.composer { padding: 0 16px calc(14px + var(--safe-b)); flex: none; }
.composer form {
  display: flex; align-items: flex-end; gap: 6px; background: var(--raise); border: 1px solid var(--line); border-radius: 16px; padding: 6px;
}
.composer form:focus-within { border-color: var(--line-2); }
.composer textarea {
  flex: 1; border: 0; outline: none; background: transparent; resize: none; padding: 9px 6px; max-height: 160px; min-height: 40px; line-height: 1.4; font-size: 16px;
}
.composer .send { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.composer .send:disabled { background: var(--line); color: var(--faint); }
.composer .attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px; }
.composer .attach-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.locked { padding: 14px 20px calc(18px + var(--safe-b)); color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); }
.jump { bottom: calc(96px + var(--safe-b));
  position: absolute; right: 24px; bottom: 96px; z-index: 3; height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--text); color: #0a0a0a; font-weight: 700; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* ---------- drops ---------- */
.drops-hero { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.drops-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.05em; line-height: 0.95; text-transform: uppercase; }
.drop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.drop { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.drop .art { aspect-ratio: 4 / 5; background: #1a0d0a; position: relative; overflow: hidden; }
.drop .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.drop:hover .art img { transform: scale(1.03); }
.drop .art .chip {
  position: absolute; left: 12px; top: 12px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(10,10,10,0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; display: flex; align-items: center; gap: 8px;
}
.drop .info { padding: 16px; display: grid; gap: 10px; }
.drop h3 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.drop p { margin: 0; color: #c9c5bd; font-size: 14px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.countdown div { background: var(--raise); border-radius: 10px; padding: 8px 0; text-align: center; }
.countdown b { display: block; font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.drop .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.composer-card { background: var(--panel); border: 1px dashed var(--line-2); border-radius: 20px; padding: 18px; display: grid; gap: 12px; margin-bottom: 22px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.giveaway .winner { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--accent-soft); border: 1px solid rgba(226,83,47,0.35); border-radius: 12px; }
.giveaway .winner b { display: block; }
.giveaway.done { opacity: 0.85; }
.giveaway .pick { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
@media (max-width: 400px) { .giveaway .pick { grid-template-columns: 1fr 1fr; } .giveaway .pick input { grid-column: span 2; } }

/* ---------- calls ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.room { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; }
.room h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.room .live { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.room .faces { display: flex; gap: -6px; min-height: 28px; }
.room .faces .avatar { margin-right: -6px; box-shadow: 0 0 0 2px var(--panel); }
.note { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--raise); color: var(--muted); font-size: 13px; }

#callDock { position: fixed; z-index: 40; }
#callDock.full { left: 240px; right: 0; background: var(--bg); display: flex; flex-direction: column; }
#callDock.mini {
  right: 16px; bottom: 16px; width: 300px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6); display: flex; flex-direction: column;
}
#callDock.mini .stage { display: none; }
.call-top { display: flex; align-items: center; gap: 10px; padding: calc(14px + var(--safe-t)) 16px 14px; }
.call-top .title { font-weight: 800; flex: 1; min-width: 0; }
.call-top .title small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.stage { flex: 1; min-height: 0; display: grid; gap: 10px; padding: 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-content: center; overflow-y: auto; }
.tile { position: relative; aspect-ratio: 16 / 10; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.no-video video { opacity: 0; }
.tile.speaking { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tile .label {
  position: absolute; left: 10px; bottom: 10px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(10,10,10,0.7);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; z-index: 1;
}
.tile .self video { transform: scaleX(-1); }
.call-controls { display: flex; justify-content: center; gap: 10px; padding: 14px 16px calc(16px + var(--safe-b)); }
.call-controls .round { width: 52px; height: 52px; border-radius: 50%; background: var(--raise); display: grid; place-items: center; }
.call-controls .round.off { background: #3a1410; color: #ff9c86; }
.call-controls .round.hang { background: #d6331c; color: #fff; }
#callDock.mini .call-controls { padding: 0 16px 14px; justify-content: flex-start; }
#callDock.mini .call-controls .round { width: 40px; height: 40px; }

/* ---------- members / profile ---------- */
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.member { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.member .who { min-width: 0; }
.member b { display: flex; align-items: center; gap: 8px; min-width: 0; }
.member b > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .who .lvl { margin-left: 0; }
.member span { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 14px; }
.card h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.stack { display: grid; gap: 16px; max-width: 640px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 10px; }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quick-links { display: grid; gap: 6px; }
.quick-links a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--raise); text-decoration: none; font-weight: 600; }
.quick-links a .icon { color: var(--accent); }
.icon.inline-sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* ---------- notifications panel, toasts, lightbox ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }
.sheet {
  position: fixed; z-index: 51; top: calc(12px + var(--safe-t)); right: 12px; width: min(380px, calc(100vw - 24px)); max-height: 85%;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.sheet header { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.notif { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.notif:hover { background: var(--raise); }
.notif b { display: block; font-size: 14px; }
.notif span { color: var(--muted); font-size: 13px; }
.notif time { color: var(--faint); font-size: 11px; display: block; margin-top: 2px; }
.notif.new b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: #0a0a0a; padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); animation: rise 0.2s ease; }
.toast.bad { background: #ff8a70; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.92); display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); cursor: zoom-out; }
.lightbox img { max-height: 100%; border-radius: 12px; }
.install-banner { margin: 10px; padding: 12px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(226,83,47,0.35); display: grid; gap: 8px; font-size: 13px; }
.install-banner b { font-size: 14px; }
.icon.inline { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; color: var(--accent); }
.icon.big { width: 44px; height: 44px; }
.steps { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: s; display: grid; gap: 12px; font-size: 15px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; counter-increment: s; }
.steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.install-strip {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 12px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px; text-align: left; padding-top: var(--safe-t); box-sizing: border-box;
}
.install-strip span { flex: 1; }
.install-strip b { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.install-sheet .point-down { position: absolute; left: 50%; bottom: 8px; width: 40px; height: 40px; display: grid; place-items: center; transform: translateX(-50%); color: var(--accent); animation: bounce 1s ease-in-out infinite; pointer-events: none; }
.install-sheet .point-down .icon { width: 40px; height: 40px; display: block; }
@keyframes bounce { 50% { transform: translateX(-50%) translateY(8px); } }
.offline-bar { background: #3a1410; color: #ffb4a3; text-align: center; font-size: 12px; font-weight: 700; padding: 6px; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .sheet.auth-sheet, .sheet.fit-sheet, .sheet.shop-sheet { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: auto; max-height: 90%; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fit-grid { grid-template-columns: 1fr 1fr; }
  .landing .inner { max-width: none; }
  .shell { display: block; }
  .shell > .main { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
  .shell.with-strip > .main { top: calc(44px + var(--safe-t)); }
  .tabbar { display: none; }
  .shell > .install-strip { position: absolute; left: 0; right: 0; top: 0; height: calc(44px + var(--safe-t)); z-index: 2; }
  .side { display: none; }
  .shell.chan-picker .side { display: flex; position: fixed; inset: 0; z-index: 30; border: 0; padding-top: var(--safe-t); }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: rgba(10,10,10,0.94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-bottom: max(0px, var(--safe-b) - 12px); box-sizing: border-box;
  }
  .tabbar a { height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--faint); font-size: 10px; font-weight: 700; position: relative; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .icon { color: var(--accent); }
  .tabbar .pip { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .view-head { padding-left: 12px; padding-right: 12px; }
  .shell.with-strip .view-head { padding-top: 0; }
  .sheet.install-sheet { top: auto; right: 0; left: 0; bottom: 0; width: auto; max-height: 85dvh; border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: calc(56px + var(--safe-b)); }
  .install-sheet .point-down { bottom: calc(6px + var(--safe-b)); }
  .page { padding: 16px 16px calc(24px + var(--safe-b)); }
  .msg { padding: 3px 12px; gap: 0 10px; }
  .msg .tools { right: 8px; }
  .composer { padding: 0 10px 10px; }
  .composer .jump { bottom: 80px; }
  #callDock.full { left: 0; }
  #callDock.mini { left: 10px; right: 10px; width: auto; bottom: calc(12px + var(--safe-b)); }
  .stage { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .desk-only { display: none !important; }
}
@media (min-width: 861px) { .phone-only { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
