/* ═══════════════════════════════════════════════
   TalkUp — English Speaking Club
   Ink & cobalt, mobile-first
═══════════════════════════════════════════════ */

:root {
  --primary: #0f9d8a;
  --primary-2: color-mix(in srgb, var(--primary) 72%, #fff);
  --tint: color-mix(in srgb, var(--primary) 16%, #fff);
  --primary-600: color-mix(in srgb, var(--primary) 80%, #000);
  --primary-50: color-mix(in srgb, var(--primary) 12%, #fff);
  --primary-100: color-mix(in srgb, var(--primary) 26%, #fff);
  --green: #3ccf6e;
  --coral: #ff6a4d;
  --red: #f04438;
  --orange: #ffb020;
  --text: #10231f;
  --muted: #7b8780;
  --line: #e6e6dc;
  --field: #f0f0e8;
  --bg-desktop: #eeeef3;
  --tab-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-desktop);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; }

.ico { width: 24px; height: 24px; flex: none; display: block; }

/* ───────── App frame ───────── */
#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(16, 35, 31, .12); }
}

.screen { position: absolute; inset: 0; display: none; flex-direction: column; background: #fff; }
.screen.on { display: flex; }

.scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ───────── Top bar ───────── */
.topbar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: -.1px; }
.topbar .icon-btn, .topbar .text-btn { position: absolute; top: calc(var(--safe-top) + 6px); }
.left { left: 6px; }
.right { right: 6px; }
.right2 { right: 54px; }
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
}
.icon-btn:active { background: var(--field); }
.text-btn { height: 44px; padding: 0 14px; font-size: 16px; font-weight: 500; color: var(--text); }
.topbar .text-btn.left { left: 4px; }
.dot-badge {
  position: absolute; top: 9px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); border: 2px solid #fff; box-sizing: content-box;
}

/* ───────── Pages ───────── */
.pages { position: relative; flex: 1; min-height: 0; }
.page { position: absolute; inset: 0; display: none; flex-direction: column; background: #fff; }
.page.on { display: flex; }
.page-body { flex: 1; min-height: 0; padding: 0 18px; }

.sec-title { font-size: 18px; font-weight: 700; letter-spacing: -.2px; margin: 22px 0 14px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 6px; }
.sec-row .sec-title { margin: 0; }

/* ───────── Buttons ───────── */
.btn-primary {
  width: 100%; height: 56px; border-radius: 28px;
  background: var(--primary); color: #fff;
  font-size: 17px; font-weight: 700;
  transition: background .15s, transform .1s;
}
.btn-primary:active { background: var(--primary-600); transform: scale(.99); }
.btn-primary:disabled { opacity: .55; }
.btn-grey {
  height: 52px; padding: 0 32px; border-radius: 18px;
  background: var(--field); font-size: 16px; font-weight: 500;
}
.btn-grey:active { background: #e8e9ec; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600;
}
.pill-btn .ico { width: 22px; height: 22px; }
.pill-btn.spin .ico { animation: spin .8s linear infinite; }
.link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-size: 16px; font-weight: 500;
}
.link-btn .ico { width: 22px; height: 22px; }
.link-btn.center { align-self: center; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Auth ───────── */
.auth-brand { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 40px; }
.auth-logo { width: 88px; height: 88px; margin-bottom: 26px; }
.auth-name { font-size: 32px; font-weight: 800; letter-spacing: -.8px; }
.auth-sub { font-size: 18px; font-weight: 500; margin-top: 4px; }
.auth-actions { padding: 0 18px calc(24px + var(--safe-bottom)); }
.auth-btn {
  position: relative;
  width: 100%; height: 58px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 29px;
  font-size: 17px; font-weight: 600; background: #fff;
  transition: background .15s;
}
.auth-btn:active { background: var(--field); }
.auth-btn .ico { position: absolute; left: 26px; width: 24px; height: 24px; }
.auth-terms { margin-top: 30px; text-align: center; font-size: 14px; line-height: 1.35; color: var(--muted); }
.auth-terms a { text-decoration: underline; }

/* ───────── Forms ───────── */
.form { padding: 18px 18px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 16px; }
.form.scroll { flex: 1; min-height: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8d96' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px;
}
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.field input:disabled { background: var(--field); color: var(--muted); }
.field small { min-height: 16px; font-size: 12.5px; color: var(--muted); }
.field small.ok { color: var(--green); }
.field small.err { color: var(--red); }
.form-error { min-height: 18px; margin-top: -6px; font-size: 14px; color: var(--red); }
.form-error:empty { min-height: 0; }

.setup-av { align-self: center; margin: 4px 0 4px; }

.lv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lv-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 17px; font-weight: 800; letter-spacing: .3px;
}
.lv-grid button span { font-size: 11px; font-weight: 500; color: var(--muted); }
.lv-grid button.on { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.lv-grid button.on span { color: var(--primary); }

/* ───────── Segmented ───────── */
.seg { display: flex; height: 50px; border-radius: 25px; background: var(--field); overflow: hidden; }
.seg button { flex: 1; font-size: 16px; font-weight: 500; transition: background .15s, color .15s; }
.seg button + button { box-shadow: -1px 0 0 rgba(255, 255, 255, .9); }
.seg button.on { background: var(--primary); color: #fff; font-weight: 600; }
.seg-page { margin: 14px 18px 4px; flex: none; height: 44px; }

/* ───────── Avatars ───────── */
.av { position: relative; width: var(--s, 56px); height: var(--s, 56px); flex: none; }
.av-clip {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: calc(var(--s, 56px) * .42);
  background: var(--primary);
}
.av-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-0 .av-clip { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.av-1 .av-clip { background: #12a37f; }
.av-2 .av-clip { background: #f08c00; }
.av-3 .av-clip { background: #e64980; }
.av-4 .av-clip { background: #2f80ed; }
.av-5 .av-clip { background: #0b5a4a; }
.av-flag {
  position: absolute; left: calc(var(--s, 56px) * -.02); bottom: calc(var(--s, 56px) * -.02);
  width: calc(var(--s, 56px) * .4); height: calc(var(--s, 56px) * .4);
  border-radius: 50%; overflow: hidden; background: #e5e5ea;
  border: 2px solid #fff; box-sizing: border-box;
}
.av-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ───────── Lobby: ready cards ───────── */
.ready-list {
  display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -18px; padding: 0 18px 2px; scroll-snap-type: x proximity; scroll-padding-left: 18px;
}
.ready-list::-webkit-scrollbar { display: none; }
.ready-card {
  flex: none; width: 140px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: center; background: #fff;
}
.rc-top { padding: 16px 8px 0; display: flex; flex-direction: column; align-items: center; }
.rc-name { margin-top: 10px; font-size: 16px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-meta { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rc-btn {
  display: block; width: 100%; height: 48px; margin-top: 14px;
  background: var(--green); color: #fff; font-size: 16px; font-weight: 600;
}
.rc-btn:active { filter: brightness(.94); }
.ready-empty {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 14px; line-height: 1.4;
}
.ready-empty .ico { width: 28px; height: 28px; color: var(--primary); }

.badge-new {
  display: inline-block; padding: 2px 6px; border-radius: 5px;
  background: var(--green); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; line-height: 1.25;
}
.rating { display: inline-flex; align-items: center; gap: 3px; }
.rating .ico { width: 15px; height: 15px; color: var(--orange); }
.rating b { font-weight: 500; }
.sep { width: 3px; height: 3px; border-radius: 50%; background: #c9cad1; display: inline-block; flex: none; }

/* ───────── People rows ───────── */
.people { display: flex; flex-direction: column; }
.person { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; cursor: pointer; }
.person + .person { border-top: 1px solid transparent; }
.p-left { width: 74px; flex: none; display: flex; flex-direction: column; align-items: center; }
.pstatus { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.pstatus.on { color: var(--green); }
.pstatus.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.p-main { flex: 1; min-width: 0; padding-top: 4px; }
.p-name { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-meta { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: #5f616b; }
.p-bio { margin-top: 5px; font-size: 14px; color: #3a4540; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-act { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 2px; }
.p-act span { font-size: 10.5px; font-weight: 600; letter-spacing: .6px; color: #5f616b; }
.round-act {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 25%, transparent);
}
.round-act:active { transform: scale(.94); }
.round-act .ico { width: 23px; height: 23px; }
.p-time { flex: none; font-size: 12px; color: var(--muted); padding-top: 6px; text-align: right; }
.unread { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 8px; }
.chat-row .p-main { padding-top: 2px; }
.chat-row .p-bio { margin-top: 3px; color: var(--muted); }
.chat-row.is-unread .p-bio { color: var(--text); font-weight: 600; }
.chat-row .p-left { width: 62px; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 70px 24px; color: var(--muted); font-size: 15px; line-height: 1.45;
}
.empty .ico { width: 40px; height: 40px; color: #c9cad1; }
.empty b { color: var(--text); font-size: 17px; }

/* ───────── Find partner CTA ───────── */
.cta-find {
  position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 5;
  height: 58px; border-radius: 29px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--primary); color: #fff; font-size: 17px; font-weight: 700;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 30%, transparent);
}
.cta-find:active { background: var(--primary-600); }
.cta-find .ico { width: 24px; height: 24px; }
.cta-find.searching { background: #1d1b26; box-shadow: 0 12px 26px rgba(20, 15, 40, .3); }
.cta-find.searching .ico { animation: spin 2.4s linear infinite; }
.cta-spacer { height: 92px; }

/* ───────── Tab bar ───────── */
.tabbar {
  flex: none; display: flex;
  height: calc(var(--tab-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: #fff; border-top: 1px solid var(--line);
}
.tab {
  position: relative; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #a2a5ad; font-size: 12.5px; font-weight: 500;
}
.tab .ico { width: 26px; height: 26px; }
.tab.on { color: var(--primary); }
.tab .dot-badge { top: 9px; right: calc(50% - 20px); }

/* ───────── Overlays & sheets ───────── */
.overlay { position: absolute; inset: 0; display: none; z-index: 40; background: #fff; }
.overlay.on { display: flex; flex-direction: column; }
#ov-chat { z-index: 41; }
.overlay.sheet-wrap { background: transparent; z-index: 50; align-items: flex-end; flex-direction: row; }
.overlay.sheet-wrap.on { display: flex; flex-direction: row; }
#ov-search { z-index: 55; }
#ov-feedback { z-index: 60; }
#ov-call { z-index: 70; }
#ov-incoming { z-index: 75; }

.backdrop { position: absolute; inset: 0; background: rgba(10, 8, 20, .5); animation: fade .2s ease; }
.sheet {
  position: relative; width: 100%;
  background: #fff; border-radius: 28px 28px 0 0;
  padding: 20px 18px calc(18px + var(--safe-bottom));
  max-height: 100%; overflow-y: auto;
  animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 26px; }
.sheet-title { text-align: center; font-size: 17px; font-weight: 600; margin-bottom: 20px; }
.sheet.center .sheet-title { margin-bottom: 0; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.menu { display: flex; flex-direction: column; }
.menu button, .menu a {
  display: flex; align-items: center; gap: 14px; height: 56px;
  font-size: 16px; font-weight: 500; text-decoration: none; text-align: left;
}
.menu .ico { width: 24px; height: 24px; color: var(--primary); }
.menu .danger, .menu .danger .ico { color: var(--red); }
.menu > * + * { border-top: 1px solid var(--line); }

/* filter sheet */
.f-label { font-size: 17px; font-weight: 600; margin: 4px 0 12px; }
.f-label.lv { margin-top: 26px; margin-bottom: 4px; }
.f-head { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.f-head .f-label { margin-bottom: 8px; }
.f-hint { display: flex; align-items: center; gap: 6px; color: #5f616b; font-size: 15px; margin-bottom: 4px; }
.f-hint .ico { width: 20px; height: 20px; color: var(--orange); }

.range { position: relative; height: 44px; margin-top: 6px; }
.range .rail {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px;
  background: var(--primary-100);
}
.range .rail.segs {
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(20% - 4px), transparent calc(20% - 4px), transparent 20%);
  mask-image: repeating-linear-gradient(90deg, #000 0, #000 calc(20% - 4px), transparent calc(20% - 4px), transparent 20%);
  background: color-mix(in srgb, var(--primary) 55%, #fff);
}
.range .fill { position: absolute; top: 50%; height: 4px; margin-top: -2px; background: var(--primary); border-radius: 2px; }
.range.r-rating .fill { display: none; }
.range input {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; outline: none;
}
.range input::-webkit-slider-runnable-track { -webkit-appearance: none; background: transparent; height: 44px; }
.range input::-moz-range-track { background: transparent; height: 44px; }
.range input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 34px; height: 34px; margin-top: 5px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary); box-sizing: border-box; cursor: grab;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 25%, transparent);
}
.range input::-moz-range-thumb {
  pointer-events: auto; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary); cursor: grab;
}
.range.levels { margin-left: calc(100% / 12 - 17px); margin-right: calc(100% / 12 - 17px); margin-bottom: 26px; }
.range.levels .rail { background: color-mix(in srgb, var(--primary) 55%, #fff); }

.histo { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; height: 170px; }
.h-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 10px; transition: opacity .2s; }
.h-col.off { opacity: .3; }
.h-bar { width: 26px; border-radius: 7px; background: linear-gradient(180deg, var(--primary-2), var(--primary)); min-height: 30px; transition: height .3s; }
.h-lab { font-size: 15px; font-weight: 600; color: var(--primary); }

/* search sheet */
.overlay.sheet-wrap.tall .sheet { height: calc(100% - 40px); padding: 0; display: flex; flex-direction: column; }
.sheet-head { position: relative; flex: none; height: 56px; display: flex; align-items: center; justify-content: center; }
.sheet-head h3 { font-size: 17px; font-weight: 600; }
.sheet-head .icon-btn { position: absolute; top: 6px; }
.search-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px 28px; text-align: center; }
.search-title { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.4px; }
.orb { position: relative; width: 210px; height: 210px; margin: 44px 0 36px; }
.orb-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 2.2s linear infinite; }
.orb-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.orb-emoji { font-size: 30px; line-height: 1; height: 34px; }
.orb-time { font-size: 34px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.orb-sub { font-size: 13px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.search-note { font-size: 15px; line-height: 1.4; color: #2b2c33; }
.search-body .link-btn { margin: 34px 0 0; }
.search-body .btn-grey { margin-top: auto; }
.search-body .link-btn + .btn-grey { margin-top: 70px; }

/* ───────── User / own profile ───────── */
.pf-head { display: flex; flex-direction: column; align-items: center; padding-top: 28px; text-align: center; }
.pf-name { margin-top: 14px; font-size: 21px; font-weight: 700; letter-spacing: -.3px; }
.pf-status { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.pf-status i { width: 8px; height: 8px; border-radius: 50%; background: #c4c6cc; }
.pf-status.on { color: var(--green); }
.pf-status.on i { background: var(--green); }
.pf-bio { margin-top: 18px; font-size: 16px; color: #2b2c33; word-break: break-word; }
.pf-rule { height: 1px; background: var(--line); margin: 28px 22px 0; }
.pf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pf-btn {
  height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 600; background: var(--primary); color: #fff;
}
.pf-btn .ico { width: 24px; height: 24px; }
.pf-btn.call { background: var(--green); }
.pf-btn:disabled { background: #ececef; color: #b9bbc2; }
.pf-btn:not(:disabled):active { filter: brightness(.94); }

.stats { display: flex; justify-content: space-between; padding: 26px 8px 22px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat .ico { width: 30px; height: 30px; color: #2b2c33; }
.stat small { display: block; font-size: 13px; color: var(--muted); }
.stat b { font-size: 18px; font-weight: 600; }

.card { margin: 0 -18px; padding: 22px 18px 24px; border-top: 8px solid #f4f4f7; }
.card h3 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 18px; }
.info-row { display: flex; align-items: center; gap: 16px; padding: 9px 0; }
.info-ic {
  width: 52px; height: 52px; flex: none; border-radius: 50%; background: #f1f2f4; color: var(--primary);
  display: grid; place-items: center;
}
.info-ic .ico { width: 26px; height: 26px; }
.info-row small { display: block; font-size: 14px; color: var(--muted); }
.info-row b { display: block; margin-top: 2px; font-size: 17px; font-weight: 600; }
.page-pad { height: 28px; }

/* ───────── Ranking ───────── */
.rank-list { display: flex; flex-direction: column; padding-top: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.rank-row.me { background: var(--primary-50); margin: 0 -18px; padding: 10px 18px; }
.rk-n { width: 28px; text-align: center; font-size: 16px; font-weight: 700; color: var(--muted); flex: none; }
.rk-n.top { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; }
.rk-1 { background: #f5b301; } .rk-2 { background: #a7adb8; } .rk-3 { background: #c98a52; }
.rk-main { flex: 1; min-width: 0; }
.rk-main .p-name { font-size: 16px; }
.rk-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.rk-val { font-size: 17px; font-weight: 700; color: var(--primary); text-align: right; }
.rk-val small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

/* ───────── Chat ───────── */
.chat-head .chat-peer { display: flex; align-items: center; gap: 10px; max-width: calc(100% - 120px); text-align: left; }
.chat-peer .cp-t { min-width: 0; }
.chat-peer b { display: block; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-peer small { display: block; font-size: 12px; color: var(--muted); }
.chat-peer small.on { color: var(--green); }
.chat-msgs { flex: 1; min-height: 0; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 6px; background: #fafafc; }
.msg { max-width: 78%; padding: 9px 13px 7px; border-radius: 18px; font-size: 15.5px; line-height: 1.38; word-break: break-word; white-space: pre-wrap; }
.msg time { display: block; margin-top: 2px; font-size: 10.5px; opacity: .6; text-align: right; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; }
.typing { padding: 4px 18px; font-size: 13px; color: var(--muted); background: #fafafc; }
.composer { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: #fff; }
.composer input { flex: 1; height: 46px; padding: 0 18px; border-radius: 23px; border: 1.5px solid var(--line); outline: none; font-size: 16px; }
.composer input:focus { border-color: var(--primary); }
.send-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.send-btn .ico { width: 22px; height: 22px; margin-left: 2px; }

/* ───────── Calls ───────── */
.overlay.call {
  align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, var(--tint) 0%, #fff 62%);
  padding: 0 24px;
}
.overlay.call.on { display: flex; flex-direction: column; }
.call-label { position: absolute; top: calc(22px + var(--safe-top)); left: 0; right: 0; font-size: 14px; font-weight: 600; color: var(--primary); letter-spacing: .2px; }
.call-peer { display: flex; flex-direction: column; align-items: center; }
.call-peer h2 { margin-top: 26px; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.call-av { position: relative; display: grid; place-items: center; }
.call-av::before, .call-av::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--primary) 25%, transparent);
  animation: ring 2.2s ease-out infinite;
}
.call-av::after { animation-delay: 1.1s; }
@keyframes ring { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.call-status { margin-top: 8px; font-size: 16px; color: var(--muted); }
.call-status.ok { color: var(--green); font-weight: 600; }
.call-timer { margin-top: 6px; min-height: 34px; font-size: 26px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.viz { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; margin: 28px 0 56px; }
.viz i { width: 5px; height: 10px; border-radius: 3px; background: var(--primary); opacity: .3; }
.viz.active i { opacity: 1; animation: viz 1s ease-in-out infinite; }
.viz.active i:nth-child(2) { animation-delay: .12s; } .viz.active i:nth-child(3) { animation-delay: .24s; }
.viz.active i:nth-child(4) { animation-delay: .36s; } .viz.active i:nth-child(5) { animation-delay: .48s; }
@keyframes viz { 0%, 100% { height: 8px; } 50% { height: 34px; } }
.call-actions { display: flex; gap: 28px; justify-content: center; margin-top: 54px; }
.call-peer + .viz + .call-actions { margin-top: 0; }
.round-btn {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--text); border: 1.5px solid var(--line); box-shadow: 0 8px 22px rgba(16, 35, 31, .1);
}
.round-btn .ico { width: 30px; height: 30px; }
.round-btn.danger { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(240, 68, 56, .35); }
.round-btn.accept { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(34, 192, 138, .35); animation: pulse 1.4s ease-in-out infinite; }
.round-btn.muted { background: #fff3f1; color: var(--red); border-color: #ffd4cf; }
.ico.hang { transform: rotate(135deg); }
@keyframes pulse { 50% { transform: scale(1.07); } }

.float-card {
  position: absolute; left: 14px; right: 14px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px); z-index: 65;
  display: none; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 14px 40px rgba(16, 35, 31, .18);
  animation: sheetUp .25s ease;
}
.float-card.on { display: flex; }
.fc-info { flex: 1; min-width: 0; }
.fc-info strong { display: block; font-size: 16px; font-weight: 700; }
.fc-info span { font-size: 13px; color: var(--muted); }
.fc-count { font-size: 15px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.round-sm { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--red); }
.round-sm .ico { width: 20px; height: 20px; }

/* feedback */
.fb-actions { display: flex; gap: 22px; margin: 12px 0 6px; }
.fb-btn { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: #fff; }
.fb-btn .ico { width: 34px; height: 34px; }
.fb-btn.up { color: var(--green); } .fb-btn.up:active { background: #e8f9f2; }
.fb-btn.down { color: var(--red); } .fb-btn.down .ico { transform: rotate(180deg); } .fb-btn.down:active { background: #fff0ee; }

/* ───────── Toast ───────── */
#toast {
  position: absolute; z-index: 95; top: calc(14px + var(--safe-top)); left: 50%;
  transform: translate(-50%, -220%); opacity: 0; max-width: calc(100% - 32px);
  padding: 11px 18px; border-radius: 14px; background: #17171c; color: #fff;
  font-size: 14px; font-weight: 500; text-align: center; line-height: 1.35;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
#toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ───────── Legal page ───────── */
.legal-body { background: #fff; }
.legal { max-width: 640px; margin: 0 auto; padding: 32px 20px; line-height: 1.6; }
.legal h1 { font-size: 28px; margin: 16px 0; }
.legal-back { color: var(--primary); text-decoration: none; font-weight: 600; }
.legal code { background: var(--field); padding: 2px 6px; border-radius: 6px; }

/* small phones */
@media (max-width: 360px) {
  .ready-card { width: 128px; }
  .p-left { width: 66px; }
  .sec-title { font-size: 17px; }
  .search-title { font-size: 22px; }
}
@media (max-height: 640px) {
  .orb { width: 170px; height: 170px; margin: 24px 0 20px; }
  .orb-time { font-size: 28px; }
  .search-body .link-btn { margin-top: 18px; }
  .search-body .link-btn + .btn-grey { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ═══════════════════════════════════════════════
   Desktop / large screens: Telegram-like two panes
   left = the app, right = conversation / call area
═══════════════════════════════════════════════ */
#stage, .call-bar { display: none; }

@media (min-width: 900px) {
  :root { --side: clamp(380px, 32vw, 440px); }

  /* signed-out screens stay a centred card */
  #app { max-width: none; box-shadow: none; background: #ecebe3; }
  #app:not(.in-shell) .screen {
    left: 50%; right: auto; width: min(480px, 100%); transform: translateX(-50%);
    box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(16, 35, 31, .12);
  }

  /* signed-in: left pane */
  #app.in-shell .screen { right: auto; width: var(--side); border-right: 1px solid var(--line); }
  #app.in-shell .overlay.sheet-wrap { right: auto; width: var(--side); }
  #app.in-shell .float-card { right: auto; width: calc(var(--side) - 28px); }

  /* right pane */
  #app.in-shell #stage {
    display: flex; position: absolute; top: 0; bottom: 0; left: var(--side); right: 0;
    align-items: center; justify-content: center;
    background: radial-gradient(90% 70% at 50% 30%, var(--tint) 0%, #f1f1ea 60%, #ecebe3 100%);
  }
  .stage-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 24px; }
  .stage-empty img { opacity: .9; }
  .stage-pill {
    padding: 8px 18px; border-radius: 20px; background: rgba(16, 35, 31, .7); color: #fff;
    font-size: 15px; font-weight: 500;
  }
  .stage-empty p { max-width: 340px; font-size: 14px; line-height: 1.5; color: #5b6a64; }

  #ov-user, #ov-chat, #ov-call, #ov-incoming { left: var(--side); }
  #ov-call { z-index: 35; }               /* chats / profiles can open above a running call */
  #app.in-shell #ov-feedback { left: var(--side); right: 0; width: auto; align-items: center; justify-content: center; }
  #ov-feedback .sheet { max-width: 380px; border-radius: 24px; }
  #ov-user .page-body { padding: 0 max(18px, calc((100% - 560px) / 2)); }
  .chat-msgs { padding-left: max(14px, calc((100% - 720px) / 2)); padding-right: max(14px, calc((100% - 720px) / 2)); }
  .composer, .typing { padding-left: max(12px, calc((100% - 720px) / 2)); padding-right: max(12px, calc((100% - 720px) / 2)); }
  .call-label { top: 28px; }

  /* running-call bar in the left pane */
  #app.in-shell .call-bar:not([hidden]) {
    display: flex; align-items: center; gap: 12px; flex: none; cursor: pointer;
    padding: 10px 14px; background: var(--primary-50); border-top: 1px solid var(--primary-100);
  }
  .cb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .cb-info strong { font-size: 15px; font-weight: 700; }
  .cb-info span { font-size: 13px; color: var(--primary); font-variant-numeric: tabular-nums; }

  /* mouse niceties */
  .person:hover, .rank-row:hover { background: #f3f6ff; }
  .person { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .ready-card { transition: box-shadow .15s; }
  .ready-card:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 12%, transparent); }
  .round-act, .rc-btn, .pf-btn, .btn-primary, .cta-find, .pill-btn, .tab { transition: filter .15s, background .15s; }
  .round-act:hover, .pf-btn:hover:not(:disabled), .cta-find:hover { filter: brightness(1.06); }
  .rc-btn:hover { filter: brightness(1.05); }
  .tab:hover:not(.on) { color: #6f7280; }
  .icon-btn:hover { background: var(--field); }
  .overlay { border-left: 0; }
}


/* ═══════════════════════════════════════════════
   Theme: ink · cobalt · coral
   (own identity: soft cards, floating dock, coral call buttons)
═══════════════════════════════════════════════ */
:root { --card-shadow: 0 1px 2px rgba(16,35,31,.05), 0 8px 24px rgba(16,35,31,.07); --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); }
body { background: #ecebe3; }
#app { background: #f7f6f1; }
.screen, .page, .overlay { background: #f7f6f1; }
.topbar { background: rgba(245,247,252,.9); border-bottom: 0; backdrop-filter: blur(10px); }
.topbar h1 { font-weight: 800; letter-spacing: -.3px; }
.sec-title { font-weight: 800; letter-spacing: -.3px; }

/* auth hero */
#screen-auth { background: radial-gradient(90% 55% at 50% 0%, var(--tint) 0%, #f7f6f1 70%); }
.auth-brand { position: relative; overflow: hidden; }
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; border-radius: 50%; filter: blur(2px); z-index: 0; }
.auth-brand::before { width: 220px; height: 220px; left: -70px; top: 40px; background: radial-gradient(circle at 30% 30%, #ffd9c7, #ff7a4533 70%); }
.auth-brand::after { width: 180px; height: 180px; right: -50px; bottom: 30px; background: radial-gradient(circle at 30% 30%, var(--primary-100), var(--primary)22 70%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { width: 96px; height: 96px; border-radius: 28px; box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 35%, transparent); }
.auth-name { font-weight: 800; font-size: 34px; }
.auth-sub { color: var(--muted); font-weight: 600; font-size: 16px; max-width: 280px; text-align: center; line-height: 1.4; }
.auth-btn { border: 0; border-radius: 18px; box-shadow: var(--card-shadow); height: 56px; }
.auth-btn:first-child { background: var(--text); color: #fff; }
.auth-btn:first-child .ico { filter: none; }
.btn-primary { background: var(--grad); border-radius: 18px; box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 28%, transparent); }
.btn-primary:active { background: var(--grad); filter: brightness(.94); }
.btn-grey { border-radius: 16px; }
.pill-btn { background: var(--grad); border-radius: 14px; }
.seg { border-radius: 16px; background: #e8e8df; padding: 4px; height: 48px; }
.seg button { border-radius: 12px; }
.seg button.on { background: #fff; color: var(--primary); box-shadow: var(--card-shadow); }
.field input, .field select { border-radius: 16px; border-color: #dedfd5; background: #fff; }
.lv-grid button { border-radius: 16px; border-color: #dedfd5; }

/* people become cards */
.person { background: #fff; border-radius: 22px; padding: 14px 14px; margin-bottom: 12px; box-shadow: var(--card-shadow); }
.people { padding-top: 4px; }
.p-name { font-weight: 800; }
.round-act { background: var(--coral); box-shadow: 0 8px 18px rgba(255,106,77,.35); border-radius: 18px; width: 52px; height: 52px; }
.p-act span { display: none; }
.p-act { width: 56px; justify-content: center; align-self: center; }
.p-left { width: 66px; }
.chat-row .p-left { width: 58px; }
.ready-card { border: 0; border-radius: 22px; box-shadow: var(--card-shadow); }
.rc-btn { background: var(--grad); }
.badge-new { background: var(--coral); }
.pstatus.on, .pf-status.on { color: var(--green); font-weight: 600; }
.pstatus.on::before { box-shadow: 0 0 0 3px rgba(60,207,110,.2); }
.av-clip { box-shadow: 0 2px 8px rgba(16,35,31,.12); }
.av-0 .av-clip { background: linear-gradient(135deg,var(--primary),var(--primary-2)); }
.av-1 .av-clip { background: linear-gradient(135deg,#3ccf6e,#0a8f78); }
.av-2 .av-clip { background: linear-gradient(135deg,#ffb020,#ff7a2f); }
.av-3 .av-clip { background: linear-gradient(135deg,#ff6a4d,#e6397e); }
.av-4 .av-clip { background: linear-gradient(135deg,#17a2ff,var(--primary)); }
.av-5 .av-clip { background: linear-gradient(135deg,#243b55,#10231f); }

/* floating dock */
.tabbar {
  position: absolute; left: 14px; right: 14px; bottom: calc(10px + var(--safe-bottom)); height: 64px; padding: 0 6px;
  background: rgba(255,255,255,.96); border: 0; border-radius: 26px; box-shadow: 0 14px 40px rgba(16,35,31,.16); z-index: 20;
}
.tab { border-radius: 20px; margin: 6px 2px; font-size: 11.5px; font-weight: 700; gap: 3px; color: #a0a79f; }
.tab.on { color: var(--primary); background: var(--primary-50); }
.tab .ico { width: 24px; height: 24px; }
.page-body, .rank-list, .people-wrap { padding-bottom: 96px; }
.cta-find { bottom: calc(var(--tab-h) + var(--safe-bottom) + 24px); background: var(--grad); border-radius: 20px; height: 56px; box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 35%, transparent); }
.cta-find.searching { background: var(--text); }
.cta-spacer { height: 150px; }
.call-bar { position: relative; z-index: 21; }

/* sheets */
.sheet { border-radius: 30px 30px 0 0; background: #fff; }
.backdrop { background: rgba(16,35,31,.55); }
.menu .ico { color: var(--primary); }
.sheet-note { text-align: center; margin: -10px 0 14px; font-size: 13px; color: var(--muted); }
.sheet-note:empty { display: none; }
.h-bar { background: var(--grad); border-radius: 9px; }

/* profile */
.pf-head { margin: 0 -18px; padding: 34px 18px 22px; background: linear-gradient(180deg, var(--tint) 0%, #f7f6f1 100%); }
.pf-name { font-weight: 800; font-size: 24px; }
.pf-btn { border-radius: 18px; background: var(--grad); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 25%, transparent); }
.pf-btn.call { background: var(--coral); box-shadow: 0 10px 22px rgba(255,106,77,.3); }
.pf-btn:disabled { background: #e8e8df; color: #adb3a8; box-shadow: none; }
.stats { background: #fff; border-radius: 22px; box-shadow: var(--card-shadow); margin-top: 18px; padding: 18px 16px; }
.card { border-top: 0; margin: 14px 0 0; padding: 20px 18px; background: #fff; border-radius: 22px; box-shadow: var(--card-shadow); }
.card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.info-ic { background: var(--primary-50); }
.pair-note { margin-top: 14px; padding: 11px 14px; border-radius: 14px; background: var(--primary-50); color: var(--primary); font-size: 14px; font-weight: 700; text-align: center; }
.pair-note.out { background: #fff0ee; color: var(--red); }
.pair-note.live { background: #e6f8ec; color: #1b9a49; }

/* ranking */
.rank-row { background: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--card-shadow); }
.rank-row.me { margin: 0 0 10px; padding: 12px 14px; background: var(--primary-50); box-shadow: none; outline: 2px solid var(--primary-100); }
.rk-val { color: var(--primary); }

/* chat */
.chat-msgs, .typing { background: #f7f6f1; }
.msg.me { background: var(--grad); border-bottom-right-radius: 6px; }
.msg.them { border: 0; box-shadow: var(--card-shadow); }
.composer { background: #f7f6f1; border-top: 0; }
.composer input { border: 0; background: #fff; box-shadow: var(--card-shadow); }
.send-btn { background: var(--grad); }

/* calls */
.overlay.call { background: radial-gradient(120% 70% at 50% 0%, var(--tint) 0%, #f7f6f1 62%); }
.call-av::before, .call-av::after { border-color: color-mix(in srgb, var(--primary) 28%, transparent); }
.call-info { margin-top: 6px; font-size: 14px; color: var(--muted); font-weight: 600; max-width: 300px; }
.call-info:empty { display: none; }
.call-left { margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: var(--primary-50); color: var(--primary); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.call-left.warn { background: #fff0ee; color: var(--red); animation: pulse 1s ease-in-out infinite; }
.call-profile { margin-top: 18px; height: 42px; padding: 0 20px; border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); font-size: 14px; font-weight: 700; color: var(--primary); }
.round-btn { border: 0; box-shadow: var(--card-shadow); }
.round-btn.accept { background: var(--green); }
.float-card { border: 0; border-radius: 22px; }
.viz i { background: var(--grad); }
#toast { background: var(--text); border-radius: 16px; }

/* keep profile/chat above a running call on phones */
#app.in-call #ov-user { z-index: 72; }
#app.in-call #ov-chat { z-index: 73; }
#app.in-call #ov-more { z-index: 80; }
#app.in-call #ov-settings { z-index: 80; }

@media (min-width: 900px) {
  #app { background: #ecebe3; }
  #app.in-shell .screen { border-right: 0; box-shadow: 1px 0 0 var(--line); }
  #app.in-shell #stage { background: radial-gradient(90% 70% at 50% 30%, var(--tint) 0%, #f1f1ea 60%, #ecebe3 100%); }
  #app.in-shell .tabbar { width: calc(var(--side) - 28px); right: auto; }
  #app.in-shell .call-bar:not([hidden]) { background: var(--primary-50); border-top: 0; margin: 0 14px 84px; border-radius: 18px; }
  #ov-call, #ov-incoming { background: radial-gradient(100% 70% at 50% 0%, var(--tint) 0%, #f1f1ea 70%); }
  .person:hover, .rank-row:hover { background: #fff; transform: translateY(-1px); }
  .person { margin-left: 0; margin-right: 0; padding-left: 14px; padding-right: 14px; transition: transform .15s; }
  #app.in-call #ov-user { z-index: 40; }
}

/* refresh: rounder, warmer */
.person, .ready-card, .rank-row, .stats, .card { border-radius: 26px; }
.round-act { border-radius: 50%; }
.tabbar { border-radius: 32px; }
.btn-primary, .cta-find, .pf-btn, .auth-btn { border-radius: 999px; }
.pf-btn.call, .round-act { background: #ff7a45; box-shadow: 0 8px 18px rgba(255,122,69,.35); }
.msg.me { border-radius: 20px 20px 6px 20px; }
.msg.them { border-radius: 20px 20px 20px 6px; }
#screen-auth { background: radial-gradient(90% 55% at 50% 0%, var(--tint) 0%, #f7f6f1 70%); }
.pf-btn.call:disabled { background: #e8e8df; color: #adb3a8; box-shadow: none; }

/* ── theme picker ── */
.theme-box { margin: 0 0 6px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.theme-box h4 { margin: 0 0 12px; font-size: 14px; font-weight: 800; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sw { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); position: relative; }
.sw.on { box-shadow: 0 0 0 3px var(--c); }
.sw.on::after { content: ''; position: absolute; left: 11px; top: 6px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.sw-custom { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; position: relative; background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); box-shadow: 0 0 0 1.5px var(--line); border: 3px solid #fff; }
.sw-custom input { position: absolute; inset: -10px; width: 60px; height: 60px; opacity: 0; cursor: pointer; }
