/* ══════════════════════════════════════════════════════
   LORICOMUNICA — DESIGN SYSTEM + APP STYLES
══════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ─────────────────────────────────── */
:root {
  --blue:       #3B7EF6;
  --blue-dark:  #2563EB;
  --indigo:     #5B47F5;
  --teal:       #00C2A0;
  --red:        #EF4444;
  --green:      #22C55E;
  --orange:     #F59E0B;
  --bg:         #F4F7FC;
  --surface:    #FFFFFF;
  --surface-2:  #F0F4FB;
  --border:     #E2E8F0;
  --text-1:     #0F172A;
  --text-2:     #334155;
  --text-3:     #64748B;
  --text-4:     #94A3B8;
  --hero-grad:  linear-gradient(135deg, #2563EB 0%, #5B47F5 100%);
  --bar-grad:   linear-gradient(180deg, #2563EB 0%, #3B7EF6 100%);
  --radius-sm:  0.375rem;
  --radius-md:  0.625rem;
  --radius-lg:  0.875rem;
  --radius-xl:  1.25rem;
  --radius-2xl: 1.75rem;
  --sh-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --sh-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --sh-lg: 0 10px 28px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.07);
  --sh-xl: 0 20px 48px rgba(0,0,0,.15);
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── PROTOTYPE SHELL ────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 24px 16px 48px;
  background: var(--bg);
}

.shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  margin-bottom: 24px;
}
.shell-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}
.shell-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-xl);
}
.shell-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 900px;
}

/* ── DEVICE FRAME ───────────────────────────────────── */
.device {
  width: 390px;
  min-height: 780px;
  background: #111;
  border-radius: 48px;
  padding: 14px;
  box-shadow: var(--sh-xl), 0 0 0 1px rgba(255,255,255,.06) inset;
  flex-shrink: 0;
  position: relative;
}
.device-notch {
  width: 120px;
  height: 30px;
  background: #111;
  border-radius: 0 0 20px 20px;
  margin: 0 auto 4px;
  position: relative;
  z-index: 10;
}
.device-screen {
  background: var(--bg);
  border-radius: 38px;
  overflow: hidden;
  height: 752px;
  position: relative;
}

/* ── VIEWS ──────────────────────────────────────────── */
.view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
/* Enforce single-screen rendering: only the active view is visible */
.view:not(.active) { display: none !important; }
.view.active { display: flex !important; }
.view.slide-in { animation: slideIn .35s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.view.slide-left { animation: slideLeft .35s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes slideLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ══════════════════════════════════════════════════════
   ONBOARDING SCREENS
══════════════════════════════════════════════════════ */

/* ── SCREEN 1: WELCOME ──────────────────────────────── */
#v-welcome {
  background: linear-gradient(160deg, #1a3a8f 0%, #2563EB 35%, #5B47F5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 0 28px;
  overflow: hidden;
}
.welcome-bg-circles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.welcome-bg-circles span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.welcome-bg-circles .c1 { width: 280px; height: 280px; top: -80px; left: -80px; }
.welcome-bg-circles .c2 { width: 200px; height: 200px; top: 120px; right: -60px; background: rgba(255,255,255,.05); }
.welcome-bg-circles .c3 { width: 150px; height: 150px; bottom: 200px; left: 40px; background: rgba(255,255,255,.04); }

.welcome-hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 0;
  width: 100%;
  flex: 0 0 auto;
}
.welcome-mascot {
  font-size: 72px;
  animation: mascotFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.25));
  margin-bottom: 24px;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.welcome-brand {
  font-size: 28px;
  font-weight: 800;
  color: #F8FBFF;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-align: center;
}
.welcome-tagline {
  font-size: 15px;
  color: rgba(240,246,255,.92);
  font-weight: 500;
  text-align: center;
  max-width: 300px;
  line-height: 1.5;
}

.welcome-actions {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-md);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); }
.btn-primary:active { transform: scale(.98); }
.btn-primary svg { width: 18px; height: 18px; }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(255,255,255,.3);
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.22); }

.welcome-footer {
  font-size: 11px;
  color: rgba(234,244,255,.85);
  text-align: center;
  margin-top: 16px;
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

/* ── SCREEN 2: USER TYPE ───────────────────────────── */
#v-auth {
  background: linear-gradient(180deg, #5EA0EE 0%, #6AA8F0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 20px 26px;
  color: #fff;
}
.auth-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-lang {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}
.auth-logo {
  margin-top: 30px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-card {
  margin-top: 28px;
  width: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--sh-md);
}
.auth-btn {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
}
.auth-google {
  background: #fff;
  border: 1.5px solid #D5DFEF;
  color: #23364B;
}
.auth-apple {
  background: #23252B;
  color: #fff;
}
.auth-or {
  margin: 18px 0 14px;
  width: 100%;
  text-align: center;
  position: relative;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.auth-or::before,
.auth-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 39%;
  height: 1px;
  background: rgba(255,255,255,.7);
}
.auth-or::before { left: 0; }
.auth-or::after { right: 0; }
.auth-email {
  width: 100%;
  background: #fff;
  color: #2B4058;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
}
.auth-skip {
  margin-top: 16px;
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  font-size: 14px;
  font-weight: 700;
}

#v-usertype {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ob-header {
  background: var(--hero-grad);
  padding: 52px 24px 28px;
  color: #fff;
}
.ob-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  margin-bottom: 16px;
  cursor: pointer;
}
.ob-back:hover { color: #fff; }
.ob-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.ob-header p { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.5; }
.ob-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.ob-progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: rgba(255,255,255,.3);
  transition: background .3s;
}
.ob-progress-dot.active { background: #fff; }

.ob-body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.type-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: left;
  transition: border-color .15s, background .15s, transform .1s;
  width: 100%;
}
.type-card:hover { border-color: var(--blue); background: #EEF4FF; }
.type-card:active { transform: scale(.98); }
.type-card.selected { border-color: var(--blue); background: #EEF4FF; }
.type-card-emoji { font-size: 32px; flex-shrink: 0; }
.type-card-text { flex: 1; }
.type-card-label { font-size: 15px; font-weight: 700; color: var(--text-1); display: block; }
.type-card-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.type-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.type-card.selected .type-check {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-size: 12px;
}
.ob-footer {
  padding: 16px 24px 32px;
}

/* ── SCREEN 3: PROFILE SETUP ────────────────────────── */
#v-profile {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.profile-form {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-input {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.form-input:focus { border-color: var(--blue); background: #fff; }
.form-hint { font-size: 12px; color: var(--text-4); }

.condition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.condition-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
  text-align: left;
}
.condition-chip:hover { border-color: var(--blue); background: #EEF4FF; color: var(--blue); }
.condition-chip.selected { border-color: var(--blue); background: #EEF4FF; color: var(--blue); }
.condition-chip-emoji { font-size: 18px; }
.lang-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
}
.lang-btn.selected { border-color: var(--blue); background: #EEF4FF; color: var(--blue); }

/* ── SCREEN 4: FEATURE TOUR ─────────────────────────── */
#v-tour {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tour-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.tour-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.tour-slide.active { opacity: 1; pointer-events: auto; }
.tour-icon-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  margin-bottom: 28px;
  box-shadow: var(--sh-lg);
}
.tour-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 12px;
}
.tour-desc {
  font-size: 15px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
  max-width: 280px;
}
.tour-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 16px 0;
}
.tour-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all .3s;
}
.tour-dot.active {
  background: var(--blue);
  width: 24px;
  border-radius: 4px;
}
.tour-nav {
  display: flex;
  gap: 12px;
  padding: 16px 24px 32px;
}
.btn-outline-blue {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--blue);
  border-radius: var(--radius-xl);
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
}
.btn-outline-blue:hover { background: #EEF4FF; }
.btn-filled-blue {
  flex: 2;
  padding: 14px;
  background: var(--hero-grad);
  border-radius: var(--radius-xl);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--sh-sm);
  transition: all .15s;
}
.btn-filled-blue:hover { opacity: .92; transform: translateY(-1px); }

/* ── SCREEN 5: TRIAL START ──────────────────────────── */
#v-trial {
  background: linear-gradient(160deg, #1a3a8f 0%, #2563EB 40%, #5B47F5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
}
.trial-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: mascotFloat 3s ease-in-out infinite;
}
.trial-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
}
.trial-sub {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  text-align: center;
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 32px;
}
.trial-perks {
  width: 100%;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trial-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
}
.trial-perk-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── SCREEN 6: REGISTER ─────────────────────────────── */
#v-register {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.reg-hero {
  background: var(--hero-grad);
  padding: 56px 24px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.reg-blobs { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.b1 { width: 200px; height: 200px; top: -80px; right: -60px; }
.b2 { width: 140px; height: 140px; bottom: -40px; left: -40px; }
.reg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.reg-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.reg-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.reg-sub {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  position: relative;
  z-index: 1;
}
.reg-form {
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field-label { font-size: 13px; font-weight: 700; color: var(--text-2); display: block; margin-bottom: 6px; }
.field-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s;
}
.field-wrap:focus-within { border-color: var(--blue); background: #fff; }
.field-icon { color: var(--text-4); margin: 0 10px; flex-shrink: 0; }
.field-input {
  flex: 1;
  padding: 13px 14px 13px 0;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-1);
  outline: none;
}
.field-input.prefix { padding-left: 8px; }
.field-prefix {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  border-right: 1px solid var(--border);
}
.flag { font-size: 18px; }
.check-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-3); line-height: 1.5;
}
.check-native { display: none; }
.check-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: all .15s;
  margin-top: 1px;
}
.check-native:checked + .check-box {
  background: var(--blue); border-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.485 1.431a1.473 1.473 0 0 0-2.084 0l-6.393 6.404-3.054-3.064a1.473 1.473 0 1 0-2.085 2.083l4.097 4.108a1.473 1.473 0 0 0 2.084 0l7.435-7.448a1.473 1.473 0 0 0 0-2.083z'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.reg-note { font-size: 13px; color: var(--text-3); text-align: center; }

/* ══════════════════════════════════════════════════════
   MAIN APP
══════════════════════════════════════════════════════ */
#v-app {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  /* Overlay children (sidebar, sheets, tutorial) are absolutely positioned
     relative to this element, so they never bleed onto onboarding screens */
  isolation: isolate;
}

/* ── APP BAR ────────────────────────────────────────── */
.app-bar {
  display: flex;
  align-items: center;
  height: 56px;
  background: var(--bar-grad);
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 10;
}
.app-bar-menu {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  transition: background .15s;
}
.app-bar-menu:hover { background: rgba(255,255,255,.15); }
.app-bar-center {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.app-bar-speech {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  color: #fff;
  transition: background .15s;
}
.app-bar-speech:hover { background: rgba(255,255,255,.3); }
.app-bar-speech:active { transform: scale(.9); }

/* ── PHRASE BAR ─────────────────────────────────────── */
.phrase-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
  flex-shrink: 0;
  box-shadow: var(--sh-sm);
}
.phrase-chips {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  overflow: hidden;
}
.phrase-placeholder {
  font-size: 13px;
  color: var(--text-4);
  font-style: italic;
}
.phrase-chip {
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  animation: chipPop .2s cubic-bezier(.16,1,.3,1);
}
@keyframes chipPop {
  from { transform: scale(.6); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.phrase-clear {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 50%;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all .15s;
}
.phrase-clear:hover { background: #fee2e2; color: var(--red); }

/* ── QUICK BAR ──────────────────────────────────────── */
.quick-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px 4px;
  flex-shrink: 0;
}
.quick-yes, .quick-no {
  padding: 10px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  transition: transform .12s;
  box-shadow: var(--sh-sm);
}
.quick-yes:active, .quick-no:active { transform: scale(.95); }
.quick-yes { background: var(--green); color: #fff; }
.quick-no  { background: var(--red);   color: #fff; }

/* ── BOARD / ITEM GRID ──────────────────────────────── */
.board-area {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}
.board-area.board-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: start;
}
.board-area.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
}

.board-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-sm);
  border: 1.5px solid var(--border);
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.board-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--board-color, var(--blue));
}
.board-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.board-card:active { transform: scale(.96); }
.board-card-emoji { font-size: 36px; }
.board-card-label { font-size: 13px; font-weight: 700; color: var(--text-1); text-align: center; }
/* Prevent long labels from visually overlapping neighboring UI */
.board-card-label,
.item-card-label,
.history-phrase,
.freq-item,
.trial-title,
.trial-sub,
.tour-title,
.tour-desc,
.reg-title,
.reg-sub,
.welcome-tagline {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-sm);
  border: 1.5px solid var(--border);
  transition: all .15s;
}
.item-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.item-card:active { transform: scale(.92); box-shadow: none; }
.item-card.tapped { animation: cardTap .3s ease; }
@keyframes cardTap {
  0% { transform: scale(1); }
  50% { transform: scale(.88); }
  100% { transform: scale(1); }
}
.item-card-emoji { font-size: 28px; }
.item-card-label { font-size: 11px; font-weight: 700; color: var(--text-2); text-align: center; line-height: 1.2; }

.back-card { background: var(--surface-2); border-color: var(--border); }
.back-card .item-card-emoji { font-size: 15px; color: var(--text-3); }

/* ── BOTTOM NAV ─────────────────────────────────────── */
.app-nav {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 0 10px;
  flex-shrink: 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  color: var(--text-4);
  font-size: 10px;
  font-weight: 600;
  transition: color .15s;
}
.nav-item:hover { color: var(--text-3); }
.nav-item.active { color: var(--blue); }
.nav-item.active svg path, .nav-item.active svg polyline, .nav-item.active svg line { stroke: var(--blue); }

/* ── TOAST ──────────────────────────────────────────── */
.speak-toast {
  position: absolute;
  bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(15,23,42,.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
  max-width: 280px;
  z-index: 200;
  backdrop-filter: blur(8px);
}
.speak-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════
   TAB PANELS
══════════════════════════════════════════════════════ */
.tab-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}
.tab-panel.active { display: flex; }

.panel-header { margin-bottom: 12px; }
.panel-header.mt { margin-top: 20px; }
.panel-header h3 { font-size: 16px; font-weight: 800; color: var(--text-1); }
.panel-header p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  transition: box-shadow .15s;
}
.history-item:hover { box-shadow: var(--sh-sm); }
.history-phrase {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
}
.history-phrase:hover { color: var(--blue); }
.history-meta { font-size: 11px; color: var(--text-4); margin-top: 4px; }

/* Predict */
.predict-section { margin-bottom: 8px; }
.predict-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.predict-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pred-chip {
  padding: 8px 14px;
  background: #EEF4FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  transition: all .15s;
}
.pred-chip:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.freq-list { display: flex; flex-direction: column; gap: 8px; }
.freq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  transition: all .15s;
}
.freq-item:hover { border-color: var(--blue); color: var(--blue); }
.freq-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-4);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: var(--radius-xl);
}

/* Progress */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--sh-sm);
}
.stat-num { display: block; font-size: 22px; font-weight: 800; color: var(--blue); }
.stat-lbl { display: block; font-size: 10px; font-weight: 600; color: var(--text-3); margin-top: 2px; }

.level-selector { display: flex; flex-direction: column; gap: 8px; }
.level-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  transition: all .15s;
}
.level-card.active { border-color: var(--blue); background: #EEF4FF; }
.level-info { flex: 1; }
.level-name { display: block; font-size: 14px; font-weight: 700; color: var(--text-1); }
.level-desc { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.level-check { color: var(--blue); font-weight: 800; font-size: 18px; }

/* Gamification */
.streak-banner {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--sh-md);
}
.streak-fire { font-size: 40px; animation: mascotFloat 2s ease-in-out infinite; }
.streak-text h4 { font-size: 16px; font-weight: 800; color: #fff; }
.streak-text p { font-size: 12px; color: rgba(255,255,255,.85); margin-top: 2px; }
.streak-count { font-size: 36px; font-weight: 900; color: #fff; margin-left: auto; }

.points-bar-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--sh-sm);
}
.points-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.points-level { font-size: 13px; font-weight: 700; color: var(--blue); }
.points-count { font-size: 13px; font-weight: 700; color: var(--text-2); }
.points-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.points-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--indigo));
  border-radius: 4px;
  transition: width .6s cubic-bezier(.16,1,.3,1);
}
.points-bar-label { font-size: 11px; color: var(--text-4); }

.daily-goal {
  background: linear-gradient(135deg, #EEF4FF, #E0EAFF);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.daily-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.daily-goal-title { font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.daily-goal-pct { font-size: 13px; font-weight: 700; color: var(--blue-dark); }
.daily-goal-bar-bg {
  height: 8px;
  background: rgba(59,126,246,.15);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.daily-goal-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
}
.daily-goal-label { font-size: 11px; color: var(--blue); font-weight: 600; }

.weekly-chart { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 12px; }
.weekly-chart h4 { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; }
.bar-chart {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 60px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--blue), var(--indigo));
  border-radius: 3px 3px 0 0;
  transition: height .5s cubic-bezier(.16,1,.3,1);
}
.bar-fill.today { background: linear-gradient(180deg, var(--teal), #00A891); }
.bar-label { font-size: 9px; font-weight: 600; color: var(--text-4); }

.badges-section { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; }
.badges-section h4 { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 12px; }
.badges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.badge-emoji {
  font-size: 28px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  transition: all .15s;
}
.badge-item.earned .badge-emoji {
  background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  border-color: #F59E0B;
  box-shadow: 0 0 12px rgba(245,158,11,.3);
}
.badge-item:not(.earned) .badge-emoji { filter: grayscale(1); opacity: .4; }
.badge-label { font-size: 10px; font-weight: 600; color: var(--text-3); }

/* Library tab */
.library-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}
.library-search svg { color: var(--text-4); flex-shrink: 0; }
.library-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
}

.library-list { display: flex; flex-direction: column; gap: 10px; }
.library-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-sm);
  transition: all .15s;
  text-align: left;
  width: 100%;
}
.library-item:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.library-item:active { transform: scale(.98); }
.lib-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.lib-info { flex: 1; }
.lib-title { font-size: 14px; font-weight: 700; color: var(--text-1); display: block; }
.lib-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.lib-meta { font-size: 11px; color: var(--text-4); margin-top: 3px; }
.lib-add {
  width: 32px; height: 32px;
  background: var(--hero-grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
  box-shadow: var(--sh-sm);
  transition: transform .15s;
}
.lib-add:active { transform: scale(.88); }
.lib-add.added { background: var(--green); }

/* ══════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════ */
.sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 50;
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 80%;
  max-width: 280px;
  background: var(--surface);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-xl);
}
.sidebar.open { transform: translateX(0); }

.sidebar-profile {
  background: var(--hero-grad);
  padding: 52px 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sidebar-avatar {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.sidebar-info { flex: 1; }
.sidebar-name { font-size: 16px; font-weight: 700; color: #fff; }
.sidebar-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  font-size: 11px;
  color: rgba(255,255,255,.9);
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  margin-top: 4px;
  font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar-item:hover { background: var(--surface-2); color: var(--blue); }
.sidebar-item svg { color: var(--text-3); }
.sidebar-item:hover svg { color: var(--blue); }
.sidebar-setup-dot {
  display: none;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 20px; }

/* ══════════════════════════════════════════════════════
   MODAL SHEETS
══════════════════════════════════════════════════════ */
.sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
  z-index: 80;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-xl);
}
.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}
.sheet-title { font-size: 18px; font-weight: 800; color: var(--text-1); }
.sheet-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 50%;
  color: var(--text-3);
  font-size: 18px;
  font-weight: 300;
  transition: all .15s;
}
.sheet-close:hover { background: #fee2e2; color: var(--red); }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 20px 32px; }

/* Fullscreen settings/account pages (matches provided mobile references) */
.settings-page {
  position: absolute;
  inset: 0;
  background: #69A6EE;
  display: none;
  flex-direction: column;
  z-index: 95;
}
.settings-page.open { display: flex; }
.settings-header {
  padding: 48px 22px 16px;
  color: #fff;
}
.settings-back {
  color: #EAF2FF;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 18px;
}
.settings-header h3 {
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.settings-header p {
  font-size: 14px;
  color: rgba(255,255,255,.88);
  max-width: 300px;
}
.settings-body {
  flex: 1;
  background: #F5F8FC;
  border-radius: 28px 28px 0 0;
  padding: 24px 22px 20px;
  overflow-y: auto;
}
.settings-card {
  background: #fff;
  border: 1.5px solid #D5E3F7;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 12px;
}
.settings-card h4 {
  font-size: 15px;
  color: #2D76CB;
  margin-bottom: 8px;
}
.settings-row {
  padding: 14px 0;
  border-top: 1px solid #E5EDF8;
}
.settings-row:first-of-type { border-top: none; padding-top: 4px; }
.settings-row strong {
  display: block;
  color: #1D2A3B;
  font-size: 15px;
  margin-bottom: 4px;
}
.settings-row span {
  color: #55657A;
  font-size: 13px;
  line-height: 1.45;
  display: block;
}
.settings-btn {
  width: 100%;
  margin-top: 14px;
  border: 2px solid #8CB6E8;
  color: #5E98DD;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  background: #fff;
}
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #CFE1F8;
  border: 3px solid #93B8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.profile-meta strong { display: block; font-size: 14px; color: #223247; }
.profile-meta span { font-size: 12px; color: #5D6F86; }

/* QR Share Sheet */
.share-board-row { margin-bottom: 14px; }
.share-board-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}
.share-board-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
}
.share-board-hint {
  font-size: 11px;
  color: var(--text-3);
  margin: 8px 0 0;
  line-height: 1.45;
}

.qr-card {
  background: var(--hero-grad);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.qr-canvas-wrap {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.qr-canvas-wrap .qr-share-img {
  max-width: 100%;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 8px;
}
.qr-canvas-wrap .qr-fallback {
  padding: 20px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.qr-share-code {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,.95);
  margin-bottom: 10px;
}
.qr-name { font-size: 16px; font-weight: 700; color: #fff; }
.qr-sub { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 4px; }
.share-actions { display: flex; gap: 10px; }
.share-actions--wrap { flex-wrap: wrap; }
.share-actions--wrap .share-btn { flex: 1 1 42%; min-width: 118px; }
.share-import-hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
  margin: 0 0 10px;
}
.share-import-row { display: flex; gap: 10px; margin-top: 12px; }
.share-import-btn { flex: 1; padding: 12px; font-size: 13px; font-weight: 700; }
.share-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue); }
.share-btn span { font-size: 24px; }

/* AI Scanner Sheet */
.scanner-preview {
  background: #111;
  border-radius: var(--radius-xl);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.scanner-corners::before, .scanner-corners::after {
  content: '';
  position: absolute;
  width: 40px; height: 40px;
  border-color: var(--teal);
  border-style: solid;
}
.scanner-corners::before { top: 20px; left: 20px; border-width: 3px 0 0 3px; }
.scanner-corners::after  { bottom: 20px; right: 20px; border-width: 0 3px 3px 0; }
.scanner-line {
  position: absolute;
  left: 20px; right: 20px;
  height: 2px;
  background: var(--teal);
  animation: scanLine 2s ease-in-out infinite;
}
@keyframes scanLine {
  0%   { top: 20px;  opacity: 1; }
  90%  { top: calc(100% - 20px); opacity: 1; }
  100% { top: 20px;  opacity: 0; }
}
.scanner-label { color: var(--teal); font-size: 13px; font-weight: 600; position: relative; z-index: 1; }

.scan-result {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
}
.scan-result-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.scan-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scan-chip {
  padding: 6px 12px;
  background: #EEF4FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-dark);
  display: flex; align-items: center; gap: 4px;
}

/* Context Card Sheet */
.context-card-preview {
  background: var(--hero-grad);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  color: #fff;
  box-shadow: var(--sh-md);
}
.ctx-card-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.ctx-card-condition { font-size: 13px; color: rgba(255,255,255,.8); margin-bottom: 16px; }
.ctx-card-body { font-size: 13px; color: rgba(255,255,255,.9); line-height: 1.6; margin-bottom: 14px; }
.ctx-phrases { display: flex; flex-wrap: wrap; gap: 6px; }
.ctx-phrase {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 10px;
  border-radius: var(--radius-xl);
  font-size: 12px;
  color: #fff;
  font-weight: 600;
}
.ctx-emergency {
  background: rgba(239,68,68,.25);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-size: 13px;
  color: #fff;
  margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* Checklist Sheet */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
}
.checklist-item:hover { border-color: var(--blue); }
.checklist-item.done { opacity: .6; cursor: default; }
.check-circle {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.check-circle.checked { background: var(--green); border-color: var(--green); color: #fff; }
.cl-icon { font-size: 20px; }
.cl-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-1); }
.checklist-expand {
  display: none;
  padding: 0 14px 12px;
}
.checklist-expand.open { display: block; }
.expand-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  outline: none;
  margin-bottom: 8px;
  background: var(--surface);
}
.expand-input:focus { border-color: var(--blue); }
.expand-save {
  width: 100%;
  padding: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  transition: opacity .15s;
}
.expand-save:hover { opacity: .9; }

/* AI Facial Sheet */
.facial-preview {
  background: #111;
  border-radius: var(--radius-xl);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}
.facial-ring {
  width: 80px; height: 80px;
  border: 3px solid var(--teal);
  border-radius: 50%;
  animation: facialPulse 1.5s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
}
@keyframes facialPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,194,160,.4); }
  50% { box-shadow: 0 0 0 12px rgba(0,194,160,0); }
}
.facial-icon { font-size: 40px; }
.facial-status { color: var(--teal); font-size: 13px; font-weight: 600; }

/* Remote Edit Sheet */
.board-manage-list { display: flex; flex-direction: column; gap: 10px; }
.board-manage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
}
.bm-emoji { font-size: 24px; }
.bm-info { flex: 1; }
.bm-name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.bm-count { font-size: 12px; color: var(--text-3); }
.bm-toggle {
  width: 42px; height: 24px;
  background: var(--green);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background .15s;
}
.bm-toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px; right: 3px;
  transition: right .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.bm-toggle.off { background: var(--border); }
.bm-toggle.off::after { right: auto; left: 3px; }

/* ══════════════════════════════════════════════════════
   FLOAT SETUP PROMPT
══════════════════════════════════════════════════════ */
.float-setup {
  position: absolute;
  bottom: 72px; right: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px 14px;
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all .3s cubic-bezier(.16,1,.3,1);
  z-index: 30;
  max-width: 200px;
  cursor: pointer;
}
.float-setup.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.float-setup.done .float-setup-icon { background: var(--green); }
.float-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--red);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.float-setup-icon {
  width: 32px; height: 32px;
  background: var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.float-label { font-size: 12px; font-weight: 700; color: var(--text-2); }

/* ══════════════════════════════════════════════════════
   TUTORIAL OVERLAY
══════════════════════════════════════════════════════ */
.tut-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: none;
  z-index: 100;
}
.tut-overlay.active { display: block; }

.tut-spotlight {
  position: absolute;
  background: transparent;
  border-radius: var(--radius-lg);
  box-shadow: none;
  display: none;
  z-index: 101;
  pointer-events: none;
}

.tut-bubble {
  position: absolute;
  left: 16px; right: 16px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--sh-xl);
  z-index: 102;
  transition: opacity .2s, transform .2s;
}
.tut-bubble.pos-mid    { top: 50%; transform: translateY(-50%); }
.tut-bubble.pos-top    { bottom: 100px; }
.tut-bubble.pos-bottom { top: 80px; }
.tut-bubble.pos-tap    { top: 70px; }
.tut-bubble.tut-exit   { opacity: 0; transform: translateY(-50%) scale(.95); }
.tut-bubble.pos-bottom.tut-exit { transform: scale(.95); }
.tut-bubble.pos-top.tut-exit    { transform: scale(.95); }
.tut-bubble.pos-tap.tut-exit    { transform: scale(.95); }

.tut-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.tut-mascot {
  font-size: 36px;
  flex-shrink: 0;
  animation: mascotBounce .5s cubic-bezier(.16,1,.3,1);
}
@keyframes mascotBounce {
  from { transform: scale(.5) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1)  rotate(0deg);   opacity: 1; }
}
.tut-msg { font-size: 14px; color: var(--text-2); line-height: 1.5; flex: 1; }
.tut-footer { display: flex; align-items: center; justify-content: space-between; }
.tut-step-label { font-size: 11px; font-weight: 700; color: var(--text-4); text-transform: uppercase; letter-spacing: .05em; }
.tut-next {
  padding: 9px 18px;
  background: var(--hero-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-sm);
  transition: opacity .15s;
}
.tut-next:active { opacity: .8; }
.tut-dismiss {
  background: none;
  font-size: 12px;
  color: var(--text-4);
  padding: 4px 0;
}
.tut-dismiss:hover { color: var(--text-3); }

/* ══════════════════════════════════════════════════════
   CELEBRATION SCREEN
══════════════════════════════════════════════════════ */
.celebration {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #1a3a8f 0%, #2563EB 50%, #5B47F5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
  z-index: 120;
  border-radius: inherit;
  overflow: hidden;
}
.celebration.active { opacity: 1; pointer-events: all; }
.cel-emoji { font-size: 72px; margin-bottom: 20px; animation: mascotFloat 2s ease-in-out infinite; }
.cel-title { font-size: 28px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.cel-sub { font-size: 15px; color: rgba(255,255,255,.8); line-height: 1.6; margin-bottom: 32px; }
.cel-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute;
  top: -10px;
  animation: confettiFall ease-in forwards;
}
@keyframes confettiFall {
  to { top: 110%; transform: rotate(720deg); }
}
.btn-start-using {
  padding: 16px 32px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-md);
  transition: transform .15s;
}
.btn-start-using:hover { transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════
   INFO PANEL (right side of prototype shell)
══════════════════════════════════════════════════════ */
.info-panel {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}
.info-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--sh-sm);
}
.info-card h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.info-feature:last-child { border-bottom: none; padding-bottom: 0; }
.info-feature-icon {
  font-size: 18px;
  width: 32px; height: 32px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-feature-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text-1); }
.info-feature-text span { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.roadmap-item:last-child { border-bottom: none; }
.roadmap-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xl);
  flex-shrink: 0;
}
.rb-q2 { background: #DBEAFE; color: var(--blue-dark); }
.rb-q3 { background: #D1FAE5; color: #065F46; }
.rb-q4 { background: #FEF3C7; color: #92400E; }

/* ══════════════════════════════════════════════════════
   SCROLLBAR + UTILS
══════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.mt-8 { margin-top: 8px; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 700px) {
  .shell { padding: 12px 8px 32px; }
  .device { width: 100%; max-width: 390px; }
  .info-panel { display: none; }
  .shell-stage { justify-content: center; }
  .shell-bar { gap: 12px; flex-wrap: wrap; }
  .shell-tag { max-width: 100%; overflow-wrap: anywhere; }
}

/* ══════════════════════════════════════════════════════
   NEW FEATURE STYLES v3
   Role Select · Voice Train · Caretaker · Card Edit ·
   Notification Banner
══════════════════════════════════════════════════════ */

/* ── ROLE SELECTION (first screen) ──────────────────── */
#v-role-select {
  background: linear-gradient(160deg, #0f2860 0%, #1a47b5 45%, #4a35e8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 36px;
  overflow: hidden;
}
.role-hero {
  position: relative;
  width: 100%;
  padding: 64px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.role-hero-circles span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.role-hero-circles .rc1 { width: 300px; height: 300px; top: -120px; right: -100px; }
.role-hero-circles .rc2 { width: 180px; height: 180px; bottom: -20px; left: -60px; background: rgba(255,255,255,.04); }
.role-mascot {
  font-size: 64px;
  animation: mascotFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.3));
  position: relative; z-index: 1;
}
.role-brand {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  position: relative; z-index: 1;
}
.role-tagline {
  font-size: 15px;
  color: rgba(220,235,255,.85);
  text-align: center;
  line-height: 1.5;
  max-width: 260px;
  position: relative; z-index: 1;
}
.role-cards {
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.role-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius-xl);
  text-align: left;
  transition: all .2s;
  width: 100%;
}
.role-card:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.role-card:active { transform: scale(.97); }
.role-emoji { font-size: 36px; flex-shrink: 0; }
.role-text strong { display: block; font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.role-text p { font-size: 13px; color: rgba(220,235,255,.8); line-height: 1.4; margin: 0; }
.role-arrow {
  margin-left: auto;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}

.role-explore-footer {
  width: 100%;
  padding: 0 24px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.role-explore-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-xl);
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  background: rgba(255,255,255,.92);
  border: 1.5px solid rgba(255,255,255,.45);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.role-explore-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.role-onboarding-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(220,235,255,.72);
  text-align: center;
}
.role-inline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}

/* ── REGISTER (Option C improved design) ─────────────── */
#v-register .reg-title { font-size: 30px; letter-spacing: -.03em; }
.reg-skip-link {
  font-size: 13px;
  color: var(--text-4);
  text-align: center;
  cursor: pointer;
}
.reg-skip-link:hover { color: var(--text-3); }

.reg-onboarding-link {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-align: center;
  cursor: pointer;
}
.reg-onboarding-link:hover { text-decoration: underline; }

/* ── CARETAKER LOGIN ──────────────────────────────────── */
#v-caretaker-login {
  background: linear-gradient(160deg, #0a2a1e 0%, #064e3b 40%, #065f46 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ct-login-hero {
  padding: 64px 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ct-login-blob1, .ct-login-blob2 {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.ct-login-blob1 { width: 220px; height: 220px; top: -80px; right: -60px; }
.ct-login-blob2 { width: 150px; height: 150px; bottom: -30px; left: -40px; }
.ct-login-icon { font-size: 52px; margin-bottom: 16px; }
.ct-login-hero h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.ct-login-hero p { font-size: 14px; color: rgba(200,240,230,.8); line-height: 1.5; }

.ct-login-form {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  flex: 1;
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ct-login-form h3 { font-size: 18px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; }
.btn-filled-green {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-xl);
  box-shadow: var(--sh-sm);
  transition: all .15s;
}
.btn-filled-green:hover { opacity: .92; transform: translateY(-1px); }
.ct-login-divider {
  text-align: center;
  font-size: 13px;
  color: var(--text-4);
  position: relative;
}
.ct-login-divider::before, .ct-login-divider::after {
  content: ''; position: absolute; top: 50%; width: 42%;
  height: 1px; background: var(--border);
}
.ct-login-divider::before { left: 0; }
.ct-login-divider::after  { right: 0; }
.btn-outline-green {
  width: 100%;
  padding: 14px;
  border: 2px solid #059669;
  border-radius: var(--radius-xl);
  color: #059669;
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
}
.btn-outline-green:hover { background: #f0fdf4; }

.ct-onboarding-link {
  width: 100%;
  margin-top: 14px;
  padding: 0;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: rgba(6, 95, 70, .9);
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}
.ct-onboarding-link:hover { color: #065f46; }

/* ── EXPLORE (no setup) ──────────────────────────────── */
#v-explore {
  background: linear-gradient(160deg, #1e1b4b 0%, #3730a3 45%, #6366f1 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #fff;
}
.explore-hero {
  position: relative;
  padding: 52px 22px 28px;
}
.explore-blob1 {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -60px;
  right: -70px;
}
.explore-blob2 {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: 20px;
  left: -40px;
}
#v-explore .ob-back { color: rgba(255,255,255,.92); }
.explore-icon {
  font-size: 48px;
  text-align: center;
  margin: 10px 0 8px;
}
#v-explore h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  text-align: center;
}
#v-explore .explore-hero > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(226,232,255,.88);
  text-align: center;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.explore-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 22px 36px;
}
.btn-outline-explore {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-outline-explore:hover { background: rgba(255,255,255,.18); }

/* ── VOICE TRAINING ───────────────────────────────────── */
#v-voice-train {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vt-progress-bar {
  height: 4px;
  background: var(--border);
  margin: 0 0 0 0;
  flex-shrink: 0;
}
.vt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--blue));
  transition: width .5s cubic-bezier(.16,1,.3,1);
  border-radius: 0 2px 2px 0;
}
.vt-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vt-sentence-card {
  background: linear-gradient(135deg, #EEF4FF, #E0E7FF);
  border: 2px solid #BFDBFE;
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
}
.vt-sentence-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: 10px;
}
.vt-sentence-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.5;
}
.vt-record-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.vt-wave-wrap {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 20px;
}
.vt-wave-bar {
  width: 4px;
  height: 8px;
  background: var(--blue);
  border-radius: 2px;
  opacity: 0.3;
  transition: height .1s;
}
#vtWaveBars.active .vt-wave-bar {
  opacity: 1;
  animation: waveAnim .6s ease-in-out infinite alternate;
}
@keyframes waveAnim {
  from { height: 6px;  }
  to   { height: 36px; }
}
#vtWaveBars.active .vt-wave-bar { animation-delay: calc(var(--i, 0) * 0.05s); }

.vt-record-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(59,126,246,.4);
  transition: all .2s;
  position: relative;
  flex-shrink: 0;
}
.vt-record-btn:hover   { transform: scale(1.05); box-shadow: 0 6px 28px rgba(59,126,246,.55); }
.vt-record-btn:active  { transform: scale(.95); }
.vt-record-btn.recording {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  box-shadow: 0 0 0 8px rgba(239,68,68,.2);
  animation: recordPulse 1s ease-in-out infinite;
}
@keyframes recordPulse {
  0%,100% { box-shadow: 0 0 0 8px rgba(239,68,68,.15); }
  50%     { box-shadow: 0 0 0 16px rgba(239,68,68,.0); }
}
.vt-record-btn.captured { background: linear-gradient(135deg, #10B981, #059669); }
.vt-record-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.vt-sentences-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vt-sent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .2s;
}
.vt-sent-row.done    { border-color: #10B981; background: #ECFDF5; }
.vt-sent-row.current { border-color: var(--blue); background: #EEF4FF; }
.vt-sent-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
}
.vt-sent-row.done    .vt-sent-check { background: #10B981; color: #fff; }
.vt-sent-row.current .vt-sent-check { background: var(--blue); color: #fff; }
.vt-sent-label { font-size: 13px; color: var(--text-2); font-weight: 500; flex: 1; line-height: 1.4; }

.vt-footer {
  padding: 12px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.vt-skip-link {
  font-size: 13px;
  color: var(--text-4);
  text-align: center;
  cursor: pointer;
}
.vt-skip-link:hover { color: var(--text-3); }

/* ── CARETAKER DASHBOARD ──────────────────────────────── */
#v-caretaker-app {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ct-app-bar {
  background: linear-gradient(135deg, #065f46, #059669);
  padding: 48px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}
.ct-app-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ct-app-bar-top h3 {
  font-size: 16px; font-weight: 800; color: #fff;
}
.ct-switch-btn {
  font-size: 12px; font-weight: 700;
  color: rgba(200,240,230,.9);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 12px;
  border-radius: var(--radius-xl);
}
.ct-onboarding-bar-btn {
  width: 100%;
  margin: -4px 0 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-lg);
  cursor: pointer;
}
.ct-onboarding-bar-btn:hover { background: rgba(255,255,255,.2); }

.ct-user-card {
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.2);
}
.ct-user-avatar {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.ct-user-info { flex: 1; }
.ct-user-info strong { display: block; font-size: 15px; font-weight: 800; color: #fff; }
.ct-user-status { font-size: 12px; color: rgba(200,240,230,.8); margin-top: 2px; }
.ct-live-dot {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; color: #86EFAC;
  text-transform: uppercase; letter-spacing: .05em;
}
.ct-live-dot::before {
  content: ''; width: 8px; height: 8px;
  background: #86EFAC; border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

.ct-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ct-section-title {
  font-size: 13px; font-weight: 800;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.ct-count-badge {
  background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: var(--radius-xl);
}

.ct-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.ct-notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  animation: notifSlide .3s cubic-bezier(.16,1,.3,1);
}
@keyframes notifSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ct-notif-emoji {
  font-size: 28px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #EEF4FF, #E0E7FF);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ct-notif-info { flex: 1; }
.ct-notif-info strong { display: block; font-size: 13px; font-weight: 700; color: var(--text-1); }
.ct-notif-info span   { font-size: 11px; color: var(--text-4); margin-top: 2px; }
.ct-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-4);
  font-size: 13px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
}
.ct-empty span { font-size: 28px; display: block; margin-bottom: 8px; }

.ct-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ct-stat {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--sh-sm);
}
.ct-stat span { display: block; font-size: 20px; font-weight: 800; color: #059669; }
.ct-stat p    { font-size: 10px; font-weight: 600; color: var(--text-3); margin-top: 3px; }

.ct-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ct-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 11px; font-weight: 700; color: var(--text-2);
  box-shadow: var(--sh-sm);
  transition: all .15s;
  line-height: 1.3;
  text-align: center;
}
.ct-action-btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.ct-action-btn.emergency { border-color: #FCA5A5; color: var(--red); }
.ct-action-btn.emergency:hover { background: #FEF2F2; }

/* ── CARETAKER NOTIFICATION BANNER ───────────────────── */
#ctBanner {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: #059669;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  z-index: 150;
  font-size: 13px; font-weight: 700;
}
#ctBanner.show { transform: translateY(0); }
#ctBanner .ctb-icon { font-size: 18px; }
#ctBanner .ctb-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }

/* ── CARD EDIT SHEET ──────────────────────────────────── */
.card-edit-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 16px;
}
.card-edit-emoji-wrap {
  width: 72px; height: 72px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.card-edit-emoji-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-edit-info strong { display: block; font-size: 16px; font-weight: 800; color: var(--text-1); }
.card-edit-info span   { font-size: 13px; color: var(--text-3); margin-top: 2px; }

.card-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.card-edit-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  transition: all .15s;
}
.card-edit-btn:hover { border-color: var(--blue); background: #EEF4FF; color: var(--blue); }
.card-edit-btn .btn-icon { font-size: 24px; }
.card-edit-btn-remove {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600;
  color: var(--red);
  transition: all .15s;
}
.card-edit-btn-remove:hover { background: #FEE2E2; }

/* ── CUSTOM CARD IMAGE ────────────────────────────────── */
.item-card-img-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.item-card-custom-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-voice-dot {
  position: absolute;
  bottom: 2px; right: 2px;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}
.item-card { position: relative; }

/* ── VOICE TRAINED BADGE in app bar ─────────────────── */
#voiceTrainedBadge {
  display: none;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-xl);
  margin-left: 6px;
  vertical-align: middle;
}
#voiceTrainedBadge.show { display: inline; }

/* ── CARETAKER SIDEBAR ITEM ──────────────────────────── */
.sidebar-item.sidebar-ct-item {
  color: #059669;
  font-weight: 700;
}
.sidebar-item.sidebar-ct-item svg { color: #059669; }
.sidebar-item.sidebar-ct-item:hover { background: #f0fdf4; }

/* ── SIDEBAR NEW BADGE ────────────────────────────────── */
.sidebar-new {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xl);
}

/* ── PROGRESS STATS: 4-column variant ────────────────── */
.progress-stats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 320px) { .progress-stats { grid-template-columns: repeat(4, 1fr); } }
