/* ==========================================================================
   Kids Video Box — interactive web demo
   Two design systems live here:
   - Kids Mode  : "Clay" light theme (cream + teal + yellow, chunky shadows)
   - Parent Mode: dark theme (near-black + violet/blue/green accents)
   ========================================================================== */

:root {
  /* Kids / clay palette */
  --bg: #FDF9F0;
  --surface: #ffffff;
  --surface-high: #ECE8DF;
  --primary: #006B5D;
  --ink: #1C1C17;
  --ink-soft: #3E4946;
  --accent: #fdd73b;
  --accent-ink: #715d00;

  /* Parent / dark palette */
  --p-bg: #131313;
  --p-surface: #1C1B1B;
  --p-surface-2: #232323;
  --p-high: #353534;
  --p-ink: #E5E2E1;
  --p-ink-soft: #9b9897;
  --p-violet: #9387f2;
  --p-blue: #4FA8FF;
  --p-green: #9BD46A;
  --p-red: #ef7d7d;
  --p-orange: #FF9D5C;

  --phone-w: 322px;
  --phone-h: 690px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #2a2a2a;
  background:
    radial-gradient(1200px 600px at 15% -10%, #fff7df 0%, transparent 55%),
    radial-gradient(1100px 700px at 110% 10%, #e8fff8 0%, transparent 50%),
    linear-gradient(180deg, #f6f1e7 0%, #efe9dd 100%);
  min-height: 100vh;
}

/* ---------- Page chrome ---------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.brand-badge {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff; font-size: 24px;
  box-shadow: 0 6px 0 #004a40, 0 12px 22px rgba(0,107,93,.30);
  flex: none;
}
.back-link {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; text-decoration: none;
  background: #fffdf7; border: 1px solid #e2dccd; color: #4a4a44;
  font-size: 20px; font-weight: 800; transition: transform .12s ease, box-shadow .12s ease;
}
.back-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.masthead h1 {
  font-size: 22px; margin: 0; color: #20302c; letter-spacing: -.4px;
}
.masthead p {
  margin: 2px 0 0; font-size: 13.5px; color: #6a6a64;
}

/* tour chip bar */
.tourbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 18px 0 22px;
}
.tour-chip {
  border: 1px solid #e2dccd;
  background: #fffdf7;
  color: #4a4a44;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tour-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.tour-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 0 #004a40;
}
.tour-chip .n {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.tour-chip.active .n { background: #fff; color: var(--primary); }

/* beta signup box */
.is-hidden { display: none !important; }
.beta-hp { position: absolute; left: -9999px; }
.beta {
  max-width: 620px; margin: 34px auto 0; text-align: center;
  background: #fffdf7; border: 1px solid #ece5d5; border-radius: 24px;
  padding: 28px 24px; box-shadow: 0 12px 34px rgba(60,50,20,.08);
}
.beta-ic {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 26px;
  background: var(--primary); color: #fff; box-shadow: 0 6px 0 #004a40;
}
.beta h2 { margin: 0 0 8px; font-size: 21px; color: #20302c; letter-spacing: -.3px; }
.beta > p { margin: 0 auto 18px; max-width: 460px; font-size: 14px; line-height: 1.55; color: #5d5d56; }
.beta > p b { color: var(--primary); }
.beta-fields { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.beta-fields input[type=email] {
  flex: 1 1 220px; min-width: 0; padding: 13px 15px; font-size: 14px;
  border: 1px solid #e2dccd; border-radius: 14px; background: #fff; color: var(--ink); outline: none;
}
.beta-fields input[type=email]:focus { border-color: var(--primary); }
.beta-fields select {
  padding: 13px 14px; font-size: 14px; border: 1px solid #e2dccd; border-radius: 14px;
  background: #fff; color: var(--ink); outline: none; cursor: pointer;
}
.beta-fields button {
  border: none; cursor: pointer; padding: 13px 22px; font-size: 14px; font-weight: 800;
  color: #fff; background: var(--primary); border-radius: 14px; box-shadow: 0 5px 0 #004a40;
  transition: transform .1s, box-shadow .1s; white-space: nowrap;
}
.beta-fields button:active { transform: translateY(3px); box-shadow: 0 2px 0 #004a40; }
.beta-small { margin: 12px 0 0; font-size: 11.5px; color: #8a8a82; }
.beta-thanks {
  font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.5;
  background: #f0faf6; border: 1px solid #cdeede; border-radius: 16px; padding: 18px;
}

/* layout: stage + side caption */
.layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 34px;
  align-items: start;
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidecard { order: -1; }
}

.stage {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* contextual caption / explainer */
.sidecard {
  position: sticky; top: 20px;
  background: #fffdf7;
  border: 1px solid #ece5d5;
  border-radius: 20px;
  padding: 20px 20px 22px;
  box-shadow: 0 10px 30px rgba(60,50,20,.06);
}
.sidecard .kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--primary); text-transform: uppercase;
}
.sidecard h2 { font-size: 18px; margin: 8px 0 8px; color: #2a2a26; }
.sidecard p { font-size: 14px; line-height: 1.55; color: #5d5d56; margin: 0 0 12px; }
.sidecard .hint {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13px; color: #6b6b63; background: #fbf6e9;
  border: 1px dashed #e3d8b8; border-radius: 12px; padding: 10px 12px;
}
.sidecard .hint b { color: var(--accent-ink); }
.sidecard .steps { margin: 4px 0 0; padding-left: 0; list-style: none; }
.sidecard .steps li {
  font-size: 13px; color: #5d5d56; padding: 6px 0 6px 24px; position: relative;
}
.sidecard .steps li::before {
  content: "→"; position: absolute; left: 4px; color: var(--primary); font-weight: 800;
}

.footnote {
  text-align: center; margin-top: 26px; font-size: 12.5px; color: #8a8a82;
}
.footnote code { background: #00000010; padding: 1px 6px; border-radius: 6px; }

/* ==========================================================================
   Phone frame
   ========================================================================== */
.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2b2b2b, #050505);
  box-shadow:
    0 2px 2px rgba(255,255,255,.18) inset,
    0 30px 60px rgba(0,0,0,.30),
    0 8px 18px rgba(0,0,0,.18);
  position: relative;
  flex: none;
}
.phone .screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.phone.dark .screen { background: var(--p-bg); }

.device-label {
  text-align: center; font-size: 12px; font-weight: 700;
  color: #7a756a; margin-bottom: 10px; letter-spacing: .2px;
}
.device-wrap { display: flex; flex-direction: column; align-items: center; }

/* notch */
.notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 116px; height: 26px; background: #000; border-radius: 0 0 16px 16px;
  z-index: 50;
}

/* status bar */
.statusbar {
  height: 44px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
  position: relative; z-index: 40;
}
.statusbar .sb-right { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.light .statusbar { color: #1c1c17; }
.dark .statusbar { color: #fff; }

/* scroll viewport */
.viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ==========================================================================
   Generic clay components (kids)
   ========================================================================== */
.clay-card {
  background: #fff; border-radius: 24px; padding: 6px;
  box-shadow: 0 8px 0 var(--surface-high), 0 16px 30px rgba(0,0,0,.06);
}
.btn-primary {
  background: var(--primary); color: #fff; border: none;
  border-radius: 16px; padding: 13px 22px; font-size: 15px; font-weight: 800;
  cursor: pointer; box-shadow: 0 5px 0 #004a40; transition: transform .1s, box-shadow .1s;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #004a40; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700;
}

/* ==========================================================================
   Kids overlay (top-right) + topbar
   ========================================================================== */
.kids-overlay {
  position: absolute; top: 48px; right: 12px; z-index: 30;
  display: flex; gap: 7px; align-items: center;
}
.ov-pill {
  background: #fff; border: 1px solid #ece6d8; color: #4a4a44;
  border-radius: 999px; padding: 6px 10px; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  box-shadow: 0 3px 8px rgba(0,0,0,.05);
}
.ov-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.ov-profile { gap: 6px; }
.ov-profile .av { width: 18px; height: 18px; border-radius: 50%; display:grid; place-items:center; font-size: 11px; }
.ov-lock { color: #8a8378; }

.kids-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 4px;
}
.logo-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  display: grid; place-items: center; color: #fff; font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,107,93,.35); flex: none;
}
.tab-chip {
  border: none; cursor: pointer;
  background: var(--surface-high); color: rgba(62,73,70,.6);
  border-radius: 14px; padding: 8px 15px; font-size: 13px; font-weight: 600;
}
.tab-chip.sel {
  background: var(--accent); color: var(--accent-ink); font-weight: 800;
  box-shadow: 0 3px 0 var(--accent-ink);
}

.section-label {
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px;
  color: rgba(62,73,70,.55); padding: 14px 20px 8px;
}

/* auto-play toggle card */
.toggle-card {
  margin: 12px 16px 0; background: #fff; border-radius: 18px;
  padding: 11px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 6px 0 var(--surface-high), 0 12px 20px rgba(0,0,0,.04);
}
.toggle-card .ic {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 15px; flex: none;
}
.toggle-card .lbl { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink); }

/* switch */
.switch {
  width: 46px; height: 27px; border-radius: 999px; background: #cfc9ba;
  position: relative; cursor: pointer; transition: background .18s; flex: none;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: left .18s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch.on { background: var(--primary); }
.switch.on .knob { left: 22px; }
.switch.violet.on { background: #6a5cf0; }

/* channel grid */
.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 4px 16px 24px;
}
.ch-card {
  position: relative; aspect-ratio: 1/1; border-radius: 22px; overflow: hidden;
  cursor: pointer; background: #fff;
  box-shadow: 0 8px 0 var(--surface-high), 0 16px 30px rgba(0,0,0,.05);
  border: 5px solid #fff;
  transition: transform .1s;
}
.ch-card:active { transform: scale(.95); }
.ch-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 17px; display:block; }
.ch-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 11px 11px;
  background: linear-gradient(0deg, rgba(0,0,0,.8), transparent);
  color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1.2;
}
.ch-card .play {
  position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center;
  color: var(--primary); font-size: 16px;
}

/* video cards (channel list) */
.vid-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 4px 16px 24px;
}
.vid-card {
  background: #fff; border-radius: 20px; padding: 5px; cursor: pointer;
  box-shadow: 0 8px 0 var(--surface-high), 0 14px 24px rgba(0,0,0,.05);
  transition: transform .1s;
}
.vid-card:active { transform: scale(.96); }
.vid-thumb {
  position: relative; aspect-ratio: 16/10; border-radius: 15px; overflow: hidden;
}
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-thumb .dur {
  position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.78); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 5px;
}
.vid-thumb .pbtn {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--primary); font-size: 14px;
}
.vid-thumb .heart {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: #b9b4ab; font-size: 13px; cursor: pointer;
}
.vid-thumb .heart.on { color: #ef5350; }
.vid-card .t {
  font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.25;
  padding: 7px 7px 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* channel header row (inside channel videos) */
.ch-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 8px;
}
.ch-head .back { background: none; border: none; cursor: pointer; font-size: 17px; color: var(--ink); padding: 4px; }
.ch-head .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.ch-head .nm { flex: 1; font-size: 15px; font-weight: 900; color: var(--ink); letter-spacing: -.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-head .cnt {
  font-size: 11px; font-weight: 700; color: var(--primary);
  background: rgba(0,107,93,.1); padding: 3px 8px; border-radius: 8px;
}

/* kids bottom nav */
.kids-nav {
  display: flex; background: #EDEEEF; padding: 8px 10px 14px; gap: 6px;
  border-top: 1px solid #e3e2dc;
}
.kids-nav .item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px; border-radius: 14px; cursor: pointer; border: none; background: none;
  color: #8a8d8b; font-size: 11px; font-weight: 700;
}
.kids-nav .item .i { font-size: 19px; }
.kids-nav .item.sel { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-ink); }

/* ==========================================================================
   Kids fullscreen player
   ========================================================================== */
.player {
  position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; z-index: 60;
}
.player .pbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; color: #fff;
}
.player .pbar .back { background: none; border: none; color: #fff; font-size: 17px; cursor: pointer; }
.player .pbar .ttl { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .stagev { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; }
.player .stagev img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.player .bigplay {
  position: absolute; width: 70px; height: 70px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.85);
  color: #fff; font-size: 34px; display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(2px);
}
.player .controls {
  padding: 10px 16px 18px; color: #fff;
}
.player .track { height: 5px; background: rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.player .track .fill { height: 100%; width: 0%; background: #ff4d4d; border-radius: 4px; }
.player .track .fill.run { animation: grow 18s linear forwards; }
.player .track .fill.paused { animation-play-state: paused; }
@keyframes grow { from { width: 4%; } to { width: 100%; } }
.player .ctrow { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 11px; color: #cfcfcf; }

/* break overlay (remote pause) */
.break-overlay {
  position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 30px;
  background: linear-gradient(160deg, rgba(0,107,93,.95), rgba(0,60,52,.97));
  color: #fff; gap: 14px;
}
.break-overlay .emoji { font-size: 60px; }
.break-overlay h3 { font-size: 22px; margin: 0; }
.break-overlay p { font-size: 14px; opacity: .9; margin: 0; line-height: 1.5; }
.break-overlay .chip {
  margin-top: 6px; background: rgba(255,255,255,.16); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 700;
}

/* ==========================================================================
   Parent (dark) components
   ========================================================================== */
.p-head {
  text-align: center; padding: 8px 16px 14px; position: relative;
}
.p-head .ttl { color: var(--p-violet); font-size: 19px; font-weight: 800; }
.p-head .lock {
  position: absolute; right: 14px; top: 6px; background: var(--p-high); border: none;
  color: var(--p-ink); border-radius: 12px; padding: 8px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.p-head .refresh {
  position: absolute; right: 16px; top: 8px; background: none; border: none; color: var(--p-ink-soft);
  font-size: 16px; cursor: pointer;
}

.p-section { color: var(--p-ink-soft); font-size: 11px; font-weight: 800; letter-spacing: 1.3px;
  padding: 16px 18px 8px; text-transform: uppercase; }

.p-card {
  background: var(--p-surface); border: 1px solid #2a2a2a; border-radius: 16px;
  margin: 0 16px; padding: 14px 15px;
}
.p-card + .p-card { margin-top: 10px; }

.qa-row { display: flex; gap: 10px; padding: 0 16px; }
.qa {
  flex: 1; border-radius: 14px; padding: 14px 8px; text-align: center; cursor: pointer;
  background: var(--p-surface); border: 1px solid #2c2c2c;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.qa .i { font-size: 20px; }
.qa .l { font-size: 11.5px; font-weight: 700; }
.qa.violet { border-color: #3a3470; } .qa.violet .i, .qa.violet .l { color: var(--p-violet); }
.qa.blue   { border-color: #1f3a52; } .qa.blue .i, .qa.blue .l { color: var(--p-blue); }
.qa.green  { border-color: #2c3f22; } .qa.green .i, .qa.green .l { color: var(--p-green); }

.remote-card .rc-top { display: flex; gap: 12px; align-items: flex-start; }
.remote-card .rc-ic {
  width: 38px; height: 38px; border-radius: 11px; background: #3a2a26; color: var(--p-orange);
  display: grid; place-items: center; font-size: 18px; flex: none;
}
.remote-card h4 { margin: 0 0 3px; color: var(--p-ink); font-size: 15px; }
.remote-card .sub { color: var(--p-ink-soft); font-size: 12px; line-height: 1.4; }
.remote-btns { display: flex; gap: 10px; margin-top: 13px; }
.remote-btns button {
  flex: 1; border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 800; cursor: pointer;
  background: transparent; border: 1.5px solid;
}
.rb-break { color: var(--p-orange); border-color: #5a3d2e; }
.rb-pause { color: var(--p-red); border-color: #5a2e2e; }
.rb-resume { color: var(--p-green); border-color: #2f5022; }
.remote-btns button.solid-resume { background: var(--p-green); color: #10240a; border-color: var(--p-green); }
.remote-btns button.solid-pause { background: var(--p-red); color: #2a0c0c; border-color: var(--p-red); }
.status-line { margin-top: 11px; font-size: 12px; font-weight: 700; }

/* usage rows on dashboard */
.kid-row { display: flex; align-items: center; gap: 12px; }
.kid-row .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; flex: none; }
.kid-row .nm { color: var(--p-ink); font-size: 15px; font-weight: 700; }
.kid-row .meta { color: var(--p-ink-soft); font-size: 11.5px; }
.kid-row .time { margin-left: auto; color: var(--p-violet); font-size: 15px; font-weight: 800; }

/* storage */
.storebar { height: 8px; border-radius: 5px; background: #2c2c2c; overflow: hidden; margin-top: 10px; }
.storebar .fill { height: 100%; width: 96%; background: linear-gradient(90deg,#ff7a3d,#ff9d5c); }

/* parent bottom nav */
.p-nav {
  display: flex; background: #0d0d0d; border-top: 1px solid #262626; padding: 8px 6px 12px;
}
.p-nav .item {
  flex: 1; background: none; border: none; cursor: pointer; color: #6f6f6f;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700;
  padding: 5px 2px;
}
.p-nav .item .i { font-size: 18px; }
.p-nav .item.sel { color: var(--p-violet); }

/* parent tabs (channel manager / transfer) */
.p-tabs { display: flex; padding: 4px 16px 0; border-bottom: 1px solid #262626; }
.p-tabs .t {
  flex: 1; text-align: center; padding: 11px 4px 12px; font-size: 13px; font-weight: 700;
  color: var(--p-ink-soft); cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none;
}
.p-tabs .t.sel { color: var(--p-violet); border-bottom-color: var(--p-violet); }

/* profile chips (channel manager / usage) */
.prof-chips { display: flex; gap: 9px; padding: 14px 16px 4px; flex-wrap: wrap; }
.prof-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid #333; background: var(--p-surface); color: var(--p-ink); font-size: 13px; font-weight: 700; cursor: pointer;
}
.prof-chip .av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; }
.prof-chip.sel { border-color: var(--p-violet); background: #2a2566; }

/* discover channel rows */
.disc-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 16px;
  border-bottom: 1px solid #1f1f1f;
}
.disc-row img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.disc-row .info { flex: 1; min-width: 0; }
.disc-row .nm { color: var(--p-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-row .subs { color: var(--p-ink-soft); font-size: 11.5px; }
.disc-row .add {
  border: 1.5px solid #5a4fd0; color: var(--p-violet); background: transparent;
  border-radius: 10px; padding: 8px 14px; font-size: 12.5px; font-weight: 800; cursor: pointer; flex: none;
}
.disc-row .add.added { background: #2a2566; color: #c9c2ff; border-color: #2a2566; }

/* filter chips */
.filter-row { display: flex; gap: 7px; padding: 10px 16px 4px; flex-wrap: wrap; }
.filter { padding: 6px 12px; border-radius: 999px; border: 1px solid #333; background: var(--p-surface);
  color: var(--p-ink-soft); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.filter.sel { background: #2a2566; color: #c9c2ff; border-color: #4a3fa0; }

/* forms (add profile / add link) */
.field { padding: 6px 16px 0; }
.field label { display: block; color: var(--p-ink-soft); font-size: 12px; font-weight: 700; margin: 12px 0 7px; }
.field input {
  width: 100%; background: #0e0e0e; border: 1px solid #333; border-radius: 12px;
  color: var(--p-ink); padding: 13px 14px; font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--p-violet); }
.avatar-picker { display: flex; gap: 9px; flex-wrap: wrap; padding: 4px 16px 0; }
.avatar-opt {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; cursor: pointer;
  border: 2px solid transparent;
}
.avatar-opt.sel { border-color: var(--p-violet); }
.p-btn-primary {
  margin: 18px 16px 0; width: calc(100% - 32px); background: var(--p-violet); color: #16112e;
  border: none; border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 800; cursor: pointer;
}
.p-btn-ghost {
  margin: 10px 16px 0; width: calc(100% - 32px); background: transparent; color: var(--p-ink-soft);
  border: 1px solid #333; border-radius: 14px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* transfer */
.server-card { margin: 16px; background: var(--p-surface); border-radius: 16px; padding: 16px; }
.server-card .row1 { display: flex; align-items: center; gap: 12px; }
.server-card .wifi { color: var(--p-violet); font-size: 24px; }
.server-card h4 { margin: 0; color: var(--p-violet); font-size: 16px; }
.server-card .url { color: var(--p-ink-soft); font-size: 12.5px; font-family: ui-monospace, Menlo, monospace; }
.server-card .desc { color: var(--p-ink-soft); font-size: 12.5px; line-height: 1.5; margin-top: 12px; }

/* fake browser uploader */
.uploader {
  margin: 0 16px 16px; border: 1.5px dashed #3a3a3a; border-radius: 14px; padding: 16px; text-align: center;
  background: #0e0e0e;
}
.uploader .head { font-size: 12px; color: var(--p-ink-soft); margin-bottom: 10px; }
.dropzone {
  border: 2px dashed #4a4a4a; border-radius: 12px; padding: 20px 12px; cursor: pointer;
  color: var(--p-ink-soft); font-size: 13px; transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--p-violet); background: #15122a; color: var(--p-violet); }
.upload-list { margin-top: 12px; text-align: left; }
.upload-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--p-ink); padding: 6px 0; }
.upload-item .ok { color: var(--p-green); }

/* usage report chart */
.stat-row { display: flex; gap: 10px; padding: 4px 16px 0; }
.stat {
  flex: 1; background: var(--p-surface); border: 1px solid #262626; border-radius: 14px; padding: 13px 10px;
}
.stat .i { font-size: 16px; }
.stat .v { font-size: 19px; font-weight: 800; margin-top: 6px; }
.stat .k { font-size: 10.5px; color: var(--p-ink-soft); margin-top: 2px; }
.stat.blue .v { color: var(--p-blue); }
.stat.green .v { color: var(--p-green); }
.stat.orange .v { color: var(--p-orange); }

.chart { display: flex; align-items: flex-end; gap: 9px; height: 120px; padding: 18px 20px 6px; }
.chart .bar { flex: 1; background: #7b6fe0; border-radius: 5px 5px 0 0; opacity: .85; }
.chart .bar.today { background: #b3a6ff; }
.chart-x { display: flex; gap: 9px; padding: 4px 20px 0; }
.chart-x span { flex: 1; text-align: center; font-size: 10px; color: var(--p-ink-soft); }

.bychan { padding: 6px 16px 16px; }
.bychan .r { padding: 10px 0; border-bottom: 1px solid #1d1d1d; }
.bychan .r .top { display: flex; align-items: center; gap: 10px; }
.bychan .r .rank { color: var(--p-ink-soft); font-size: 12px; width: 12px; }
.bychan .r .nm { flex: 1; color: var(--p-ink); font-size: 13px; }
.bychan .r .tm { font-size: 13px; font-weight: 800; }
.bychan .r .meter { height: 4px; border-radius: 3px; background: #242424; margin-top: 7px; overflow: hidden; }
.bychan .r .meter .f { height: 100%; border-radius: 3px; }

/* settings rows */
.set-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-bottom: 1px solid #1d1d1d; }
.set-row .i { width: 30px; color: var(--p-ink-soft); font-size: 17px; text-align: center; }
.set-row .tx { flex: 1; }
.set-row .tx .a { color: var(--p-ink); font-size: 14px; font-weight: 600; }
.set-row .tx .b { color: var(--p-ink-soft); font-size: 11.5px; margin-top: 2px; }

/* PIN gate */
.pin {
  position: absolute; inset: 0; z-index: 70; background: var(--p-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
}
.pin .lockic { font-size: 40px; margin-bottom: 8px; }
.pin h3 { color: var(--p-ink); margin: 0; font-size: 19px; }
.pin .hint { color: var(--p-ink-soft); font-size: 12.5px; margin: 6px 0 22px; }
.pin .dots { display: flex; gap: 16px; margin-bottom: 28px; }
.pin .dots .d { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #4a4a55; }
.pin .dots .d.on { background: var(--p-violet); border-color: var(--p-violet); }
.keypad { display: grid; grid-template-columns: repeat(3, 64px); gap: 14px; }
.keypad button {
  height: 64px; border-radius: 50%; border: 1px solid #2e2e34; background: var(--p-surface);
  color: var(--p-ink); font-size: 24px; font-weight: 600; cursor: pointer;
}
.keypad button:active { background: var(--p-high); }
.keypad .blank { background: none; border: none; cursor: default; }
.pin .cancel { margin-top: 22px; background: none; border: none; color: var(--p-ink-soft); font-size: 13px; cursor: pointer; }

/* welcome splash */
.welcome {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 26px; gap: 14px;
  background:
    radial-gradient(400px 260px at 50% 18%, #fff6d8 0%, transparent 60%),
    var(--bg);
}
.welcome .icon {
  width: 86px; height: 86px; border-radius: 24px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 44px;
  box-shadow: 0 10px 0 #004a40, 0 20px 34px rgba(0,107,93,.30);
}
.welcome h2 { font-size: 25px; margin: 6px 0 0; color: var(--ink); letter-spacing: -.5px; }
.welcome .tag { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.welcome ul { list-style: none; padding: 0; margin: 6px 0 6px; display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.welcome ul li {
  background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 11.5px; font-weight: 700; color: var(--primary);
  box-shadow: 0 4px 0 var(--surface-high);
}

/* generic empty state */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 50px 30px; color: var(--ink-soft); height: 100%; gap: 12px; }
.empty .bigic {
  width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 38px; color: var(--primary); box-shadow: 0 8px 0 var(--surface-high), 0 16px 26px rgba(0,0,0,.05);
}
.empty h3 { margin: 4px 0 0; font-size: 19px; font-weight: 900; color: var(--ink); }
.empty p { margin: 0; font-size: 13.5px; }

/* offline list */
.off-list { padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.off-item {
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px;
  box-shadow: 0 6px 0 var(--surface-high), 0 12px 20px rgba(0,0,0,.05); cursor: pointer;
}
.off-item .th { width: 70px; height: 46px; border-radius: 11px; background: var(--surface-high);
  display: grid; place-items: center; color: var(--primary); font-size: 20px; flex: none; overflow: hidden; }
.off-item .th img { width: 100%; height: 100%; object-fit: cover; }
.off-item .nm { font-size: 13px; font-weight: 700; color: var(--ink); }
.off-item .mt { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

/* pulse to draw attention to a tappable element */
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(0,107,93,.45); } 100% { box-shadow: 0 0 0 12px rgba(0,107,93,0); } }
.attn { animation: pulse-ring 1.6s ease-out infinite; }

.toast {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: rgba(20,20,20,.92); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; z-index: 120; white-space: nowrap;
  animation: toastin .25s ease;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
