:root{
  --ink:#304b70;
  --ink-soft:#5f7693;
  --paper:#fffaf3;
  --cream:#fff4e8;
  --rose:#f7d9df;
  --rose-strong:#d97d8b;
  --blue:#dfeeff;
  --blue-strong:#7fa6d6;
  --green:#e2efd9;
  --green-strong:#8caf82;
  --violet:#e8e0fb;
  --line:#e7e4df;
  --white:#fffdfa;
  --shadow:0 18px 50px rgba(76,79,97,.11);
  --shadow-soft:0 9px 28px rgba(76,79,97,.08);
  --control-height:48px;
  --compact-control-height:44px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:ui-rounded,"SF Pro Rounded","Nunito","Avenir Next",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 10% 4%,rgba(249,222,225,.52),transparent 24%),
    radial-gradient(circle at 92% 12%,rgba(223,238,255,.62),transparent 26%),
    linear-gradient(180deg,#fff9f1 0%,#fffdf9 60%,#fff9f4 100%);
  color:var(--ink);
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{color:inherit}
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(255,250,243,.88);
  backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(48,75,112,.07)
}
.topbar-inner{
  max-width:1180px;margin:auto;padding:13px 20px;
  display:flex;align-items:center;gap:16px
}
.brand{font-weight:850;font-size:21px;display:flex;align-items:center;gap:8px;letter-spacing:-.35px}
.paw{font-size:24px;filter:drop-shadow(0 2px 0 #fff)}
.heart{color:#d88391;font-size:21px}
.spacer{flex:1}
.nav-link{padding:9px 13px;border-radius:999px;color:var(--ink-soft);font-weight:700}
.nav-link:hover{background:#fff}
.parent-btn,.profile-btn{
  border:1px solid rgba(105,141,185,.32);
  background:rgba(247,251,255,.88);
  min-height:var(--control-height);
  padding:0 16px;
  border-radius:999px;
  color:var(--ink);cursor:pointer;font-weight:750;
  box-shadow:0 3px 14px rgba(76,79,97,.04);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.12;
  white-space:normal;
}
.wrap{max-width:1180px;margin:auto;padding:26px 20px 58px}
.home-wrap{padding-top:24px}
.hero{
  display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
  gap:28px;align-items:stretch
}
.hero-final{
  background:rgba(255,253,249,.72);
  border:1px solid rgba(255,255,255,.86);
  border-radius:38px;
  padding:22px;
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative
}
.hero-final:before{
  content:"";position:absolute;width:220px;height:220px;border-radius:50%;
  background:rgba(228,240,220,.52);left:-95px;bottom:-100px;filter:blur(2px)
}
.hero-copy{padding:38px 16px 34px 28px;align-self:center;position:relative;z-index:1}
.kicker{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 12px;border-radius:999px;
  font-size:15px;font-weight:800;color:#7a6b77;
  background:#fff3f0;border:1px solid #f2dfdd;margin-bottom:18px
}
.hero h1{
  font-size:clamp(50px,6.2vw,80px);
  line-height:.92;margin:0 0 22px;font-weight:900;letter-spacing:-3px
}
.hero h1 span{color:var(--rose-strong)}
.hero p{font-size:21px;line-height:1.5;max-width:570px;margin:0;color:#536b88}
.hero-note{
  margin-top:24px;max-width:560px;
  display:flex;align-items:center;gap:11px;
  background:rgba(255,255,255,.78);
  border:1px solid #eee7df;border-radius:20px;
  padding:13px 15px;color:#61738c;font-size:15px;line-height:1.35
}
.hero-note b{color:var(--ink)}
.mini-paw{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#f9e3e7;flex:0 0 auto}
.hero-art{
  border-radius:30px;overflow:hidden;background:#f5eee7;
  min-height:500px;position:relative
}
.final-art{box-shadow:inset 0 0 0 1px rgba(255,255,255,.75)}
.hero-art img{width:100%;height:100%;object-fit:cover;display:block}
.final-art img{object-position:center}
.hero-sticker{
  position:absolute;right:18px;bottom:18px;
  background:rgba(255,253,250,.9);backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.9);border-radius:999px;
  padding:10px 14px;font-size:14px;font-weight:850;color:#6f6073;
  box-shadow:0 8px 20px rgba(70,56,68,.12)
}
.modes-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:36px 4px 13px}
.modes-head h2{font-size:34px;margin:3px 0 0;letter-spacing:-1px}
.eyebrow{font-size:14px;text-transform:uppercase;letter-spacing:.08em;font-weight:850;color:#9a8190}
.modes-hint{color:#7a8ca1;font-size:15px;padding-bottom:5px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:0 0 16px}
.mode-card{
  min-height:210px;border-radius:30px;padding:22px 22px 21px;
  display:flex;flex-direction:column;justify-content:space-between;
  box-shadow:var(--shadow-soft);
  border:1px solid rgba(255,255,255,.85);
  transition:transform .18s ease,box-shadow .18s ease;
  overflow:hidden;position:relative
}
.mode-card:after{content:"";position:absolute;width:120px;height:120px;border-radius:50%;right:-45px;bottom:-48px;background:rgba(255,255,255,.35)}
.mode-card:hover{transform:translateY(-3px);box-shadow:0 14px 34px rgba(65,72,90,.12)}
.mode-top{display:flex;align-items:center;justify-content:space-between;position:relative;z-index:1}
.mode-card .icon{
  display:grid;place-items:center;width:54px;height:54px;border-radius:18px;
  font-size:29px;background:rgba(255,255,255,.6);box-shadow:inset 0 0 0 1px rgba(255,255,255,.75)
}
.arrow{
  display:grid;place-items:center;width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.55);font-size:22px;font-weight:800
}
.mode-card h3{font-size:27px;margin:22px 0 7px;letter-spacing:-.6px;position:relative;z-index:1}
.mode-card p{margin:0;color:#60728d;font-size:16px;line-height:1.43;position:relative;z-index:1;max-width:95%}
.pink{background:linear-gradient(145deg,#fff0f2,#f7d9df)}
.blue{background:linear-gradient(145deg,#f1f8ff,#dfeeff)}
.green{background:linear-gradient(145deg,#f3f8ed,#e2efd9)}
.camera{
  margin:17px 0 0;
  background:linear-gradient(135deg,#eee7ff,#ddd9fa);
  border:1px solid rgba(255,255,255,.8);border-radius:26px;
  padding:17px 20px;font-size:19px;font-weight:800;color:#455d87;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;
  cursor:pointer;box-shadow:var(--shadow-soft)
}
.camera-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:rgba(255,255,255,.62);font-size:25px}
.camera b{display:block}
.camera small{display:block;font-size:14px;font-weight:600;color:#687b96;margin-top:2px}
.camera-arrow{font-size:25px;padding-right:5px}
.trust{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:26px}
.trust div{
  background:rgba(255,255,255,.72);border:1px solid #ece8e2;border-radius:22px;
  padding:16px;text-align:center;color:#667990;box-shadow:0 6px 18px rgba(65,72,90,.045)
}
.trust span{font-size:23px;display:block;margin-bottom:6px}
.trust b{display:block;color:var(--ink);margin-bottom:4px;font-size:15px}
.trust small{font-size:12px;line-height:1.3}
.footer-note{text-align:center;color:#8795a8;margin-top:30px;font-size:13px}

/* Shared app screens */
.login-shell,.panel-shell,.chat-shell{max-width:980px;margin:34px auto;padding:0 20px}
.box{
  background:rgba(255,255,255,.87);border:1px solid #eee8df;border-radius:30px;
  padding:28px;box-shadow:var(--shadow);backdrop-filter:blur(10px)
}
.box h1,.box h2{margin-top:0}
.field{display:flex;flex-direction:column;gap:7px;margin:14px 0}
.field label{font-weight:750}
.field input,.field select,.composer textarea{
  border:1px solid #d9e0e7;border-radius:17px;padding:13px 15px;outline:none;background:#fffdfa;color:var(--ink)
}
.field input:focus,.field select:focus,.composer textarea:focus{
  border-color:#8eaed4;box-shadow:0 0 0 3px rgba(127,166,214,.13)
}
.primary{
  border:none;border-radius:16px;min-height:var(--control-height);padding:0 18px;
  background:linear-gradient(135deg,#668fbd,#557daf);color:white;font-weight:850;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.15
}
.secondary{
  border:1px solid #bdcde0;border-radius:16px;min-height:var(--control-height);padding:0 16px;
  background:#f8fbff;color:#34577f;font-weight:750;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.15
}
.muted{color:var(--ink-soft);font-size:14px}
.notice{background:#fff7df;border:1px solid #eedca9;border-radius:16px;padding:12px 14px;color:#725f29}
.error{background:#fff0f0;border:1px solid #efc7c7;color:#8b4141;border-radius:16px;padding:12px 14px}
.success{background:#eef8ee;border:1px solid #cbe3cb;color:#3f7042;border-radius:16px;padding:12px 14px}
.hidden{display:none!important}
.profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:18px}
.profile-card{border:1px solid #e4e8ec;border-radius:22px;padding:18px;background:#fffdfa;box-shadow:0 6px 16px rgba(65,72,90,.04)}
.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#f4f6f8;border-radius:10px;padding:8px 10px;display:inline-block;letter-spacing:1px}
.chat-header{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.chat-title{font-size:27px;font-weight:900}
.messages{display:flex;flex-direction:column;gap:12px;min-height:46vh;max-height:62vh;overflow:auto;padding:12px 2px 18px}
.bubble{max-width:82%;padding:14px 16px;border-radius:20px;line-height:1.48;white-space:pre-wrap}
.assistant{align-self:flex-start;background:#fffdfa;border:1px solid #e7e8ea;border-bottom-left-radius:8px}
.user{align-self:flex-end;background:#dfeeff;border-bottom-right-radius:8px}
.composer{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}
.composer textarea{resize:none;min-height:54px;max-height:140px}
.send{height:54px}
.photo-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0}
.photo-preview{width:110px;height:90px;object-fit:cover;border-radius:14px;border:1px solid #ddd}
.pill{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:#f1f5f8;color:#5f7288;font-size:14px}
.section-title{margin-top:28px}
.parent-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

@media(max-width:800px){
  body{background:linear-gradient(180deg,#fff8ef,#fffdf9 60%,#fff8f4)}
  .topbar-inner{padding:10px 13px;gap:8px}
  .brand{font-size:17px;gap:6px}
  .brand .heart{display:none}
  .paw{font-size:21px}
  .nav-link{display:none}
  .parent-btn,.profile-btn{font-size:12px;min-height:44px;padding:0 12px}
  .wrap{padding:13px 13px 38px}
  .home-wrap{padding-top:12px}
  .hero-final{grid-template-columns:1fr;padding:10px;border-radius:28px;gap:0}
  .hero-copy{order:2;padding:22px 13px 15px;text-align:left}
  .hero-art{order:1;min-height:0;height:auto;aspect-ratio:1.15/1;border-radius:22px}
  .hero h1{font-size:47px;letter-spacing:-2px;margin-bottom:15px}
  .hero p{font-size:17px;line-height:1.45}
  .kicker{font-size:12px;padding:7px 9px;margin-bottom:12px}
  .hero-note{font-size:13px;margin-top:17px;border-radius:17px;text-align:left}
  .hero-sticker{right:12px;bottom:12px;font-size:12px;padding:8px 11px}
  .modes-head{margin:26px 3px 11px;align-items:center}
  .modes-head h2{font-size:29px}
  .modes-hint{display:none}
  .cards{grid-template-columns:1fr;gap:11px}
  .mode-card{
    min-height:132px;padding:17px;border-radius:24px;
    display:grid;grid-template-columns:auto 1fr;column-gap:15px;align-items:center
  }
  .mode-top{display:block;grid-row:1/3}
  .mode-card .icon{width:52px;height:52px;border-radius:16px;font-size:27px}
  .mode-top .arrow{display:none}
  .mode-card h3{font-size:23px;margin:0 0 5px}
  .mode-card p{font-size:14px;line-height:1.38}
  .camera{border-radius:23px;padding:15px 16px;grid-template-columns:auto 1fr auto;font-size:17px}
  .camera-icon{width:44px;height:44px;font-size:23px}
  .camera small{font-size:12px}
  .trust{grid-template-columns:1fr 1fr;gap:9px}
  .trust div{padding:13px 9px;border-radius:19px}
  .footer-note{font-size:11px;line-height:1.4;margin-top:22px}
  .bubble{max-width:92%}
  .composer{grid-template-columns:1fr}
  .send{width:100%}
  .chat-shell,.login-shell,.panel-shell{margin:15px auto;padding:0 11px}
  .box{padding:17px;border-radius:23px}
}

/* Admin */
.admin-shell{max-width:1180px;margin:28px auto;padding:0 20px 56px}
.admin-head{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.admin-title{margin:0;font-size:36px;letter-spacing:-1px}
.admin-sub{color:var(--ink-soft);margin-top:5px}
.stat-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:18px 0 24px}
.stat-card{background:rgba(255,255,255,.82);border:1px solid #ebe7e1;border-radius:22px;padding:18px;box-shadow:var(--shadow-soft)}
.stat-value{font-size:32px;font-weight:900;letter-spacing:-1px}
.stat-label{color:var(--ink-soft);font-size:13px;margin-top:4px}
.admin-table-wrap{overflow:auto;border:1px solid #e8e5df;border-radius:22px;background:rgba(255,255,255,.8)}
.admin-table{width:100%;border-collapse:collapse;min-width:790px}
.admin-table th,.admin-table td{padding:14px 16px;text-align:left;border-bottom:1px solid #eeeae4;vertical-align:middle}
.admin-table th{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:#8290a2;background:#fbfaf7}
.admin-table tr:last-child td{border-bottom:0}
.status-badge{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:850}
.status-on{background:#e9f6e7;color:#477445}
.status-off{background:#f8e7e7;color:#8a4a4a}
.danger{background:#fff1f1;border-color:#efcaca;color:#9b4b4b}
.admin-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.admin-claim{max-width:560px}
@media(max-width:800px){
  .admin-shell{margin:14px auto;padding:0 11px 36px}
  .admin-title{font-size:29px}
  .stat-grid{grid-template-columns:1fr 1fr;gap:9px}
  .stat-card{padding:14px;border-radius:19px}
  .stat-value{font-size:27px}
  .admin-table-wrap{border-radius:18px}
}

.voice-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}
.voice-row textarea{width:100%}
.mic-btn{width:54px;height:54px;min-height:54px;padding:0;border-radius:17px;font-size:24px;flex:0 0 54px}
.mic-btn.recording{background:#fff0f0;border-color:#e7aaaa;color:#a84d4d;box-shadow:0 0 0 4px rgba(217,125,139,.13)}
.voice-status{margin-top:8px;min-height:20px}
@media(max-width:800px){
  .voice-row{grid-template-columns:minmax(0,1fr) 54px}
  .mic-btn{width:54px}
}


/* ===== Reference homepage, matched to approved visual direction ===== */
.home-ref{
  background:#fffaf2;
  color:#2f507d;
}
.home-topbar{
  position:relative;
  background:rgba(255,253,248,.96);
  border-bottom:1px solid rgba(47,80,125,.08);
}
.home-topbar .topbar-inner{max-width:1240px;padding:12px 22px}
.home-topbar .brand{font-size:24px;color:#274f82}
.home-nav{display:flex;align-items:center;gap:8px}
.nav-chip{
  min-height:38px;padding:0 14px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:750;color:#4f6787;font-size:14px
}
.nav-chip.active{background:#dceaff;color:#315887}
.home-parent-btn,.home-login-btn{min-height:42px}
.reference-home{max-width:1536px;margin:0 auto;overflow:hidden;background:#fffaf2}
.reference-hero{
  position:relative;
  min-height:710px;
  display:grid;
  grid-template-columns:minmax(530px,.95fr) minmax(560px,1.05fr);
  align-items:stretch;
  background:
    radial-gradient(circle at 8% 20%,rgba(228,241,221,.7),transparent 22%),
    radial-gradient(circle at 50% 12%,rgba(255,243,219,.78),transparent 30%),
    linear-gradient(90deg,#fffaf2 0%,#fff8ee 42%,#fff7eb 100%);
}
.reference-copy{
  position:relative;z-index:3;
  padding:55px 30px 34px clamp(58px,7vw,120px);
  display:flex;flex-direction:column;justify-content:center;
}
.reference-copy h1{
  margin:0 0 14px;
  font-size:clamp(64px,6.2vw,104px);
  line-height:.82;
  letter-spacing:-5px;
  font-weight:950;
  color:#315888;
  transform:rotate(-1deg);
  text-shadow:0 2px 0 rgba(255,255,255,.65)
}
.reference-copy h1 span{color:#dd7180}
.reference-copy h1 i{font-style:normal;color:#df7181;font-size:.65em;margin-left:8px}
.reference-sub{
  margin:0 0 22px;
  font-size:clamp(21px,2vw,28px);
  line-height:1.35;color:#365d8b;font-weight:650;
}
.scribble{
  position:absolute;right:28px;top:190px;
  transform:rotate(-8deg);color:#647ca7;
  font-size:18px;line-height:1.15;font-weight:700;
  opacity:.8
}
.reference-modes{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;max-width:640px
}
.ref-card{
  min-height:148px;border-radius:26px;padding:16px 14px;
  display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;
  position:relative;overflow:hidden;border:2px solid rgba(255,255,255,.8);
  box-shadow:0 9px 24px rgba(75,90,115,.08)
}
.ref-card .ref-icon{grid-column:1/-1;font-size:44px;line-height:1;margin-bottom:7px}
.ref-copy{display:flex;flex-direction:column;justify-content:flex-end}
.ref-copy b{font-size:21px;line-height:1.05;color:#305987}
.ref-copy small{font-size:13px;color:#55708f;margin-top:4px;line-height:1.25}
.ref-arrow{
  width:34px;height:34px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  align-self:end;font-size:30px;font-weight:900;line-height:1;
  background:rgba(255,255,255,.45);color:#365e8b
}
.ref-pink{background:linear-gradient(145deg,#f9dfe4,#f4cdd4)}
.ref-blue{background:linear-gradient(145deg,#e2f0ff,#cee4fa)}
.ref-green{background:linear-gradient(145deg,#e6f1de,#d4e8cc)}
.ref-camera{
  max-width:520px;margin:14px auto 0 70px;
  min-height:62px;border-radius:22px;padding:0 18px;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;
  background:linear-gradient(135deg,#e4dcff,#d7cdf8);
  color:#3d5b94;font-size:20px;font-weight:800;
  border:2px solid rgba(255,255,255,.8);box-shadow:0 8px 22px rgba(78,75,120,.09)
}
.ref-camera-icon{font-size:30px}
.mini-benefits{
  margin-top:14px;max-width:680px;padding:12px 15px;
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
  background:rgba(255,255,255,.7);border-radius:20px;border:1px solid rgba(222,215,204,.8)
}
.mini-benefits>div{display:flex;gap:7px;align-items:center;font-size:18px}
.mini-benefits span{display:flex;flex-direction:column}
.mini-benefits b{font-size:12px;line-height:1.1;color:#3a5d88}
.mini-benefits small{font-size:10px;color:#728299;margin-top:2px}
.reference-art{
  position:relative;min-height:710px;overflow:hidden;
  background:#f4e8d9
}
.reference-art:before{
  content:"";position:absolute;inset:0;z-index:1;
  box-shadow:inset 45px 0 70px rgba(255,250,242,.9)
}
.reference-art img{
  width:100%;height:100%;display:block;object-fit:cover;
  object-position:47% center;
  filter:saturate(1.03) contrast(1.04);
  transform:scale(1.005);
}
.note{
  position:absolute;z-index:2;background:rgba(255,247,231,.9);
  color:#5c74a0;padding:12px 15px;border-radius:4px;
  box-shadow:0 4px 12px rgba(70,70,70,.08);
  font-weight:700;line-height:1.25;text-align:center
}
.note-a{right:13%;top:55px;transform:rotate(7deg)}
.note-b{right:2%;top:295px;transform:rotate(-1deg)}
.note-c{right:25%;bottom:95px;transform:rotate(5deg)}
.leaf{position:absolute;z-index:4;font-size:52px;filter:saturate(.75);opacity:.35}
.leaf-a{left:-8px;top:210px;transform:rotate(-25deg)}
.leaf-b{left:15px;bottom:20px;transform:rotate(30deg)}

.reference-bottom{
  position:relative;
  display:grid;grid-template-columns:1.1fr repeat(4,1fr) 1.1fr;
  gap:16px;align-items:center;
  padding:28px clamp(26px,5vw,75px) 34px;
  background:linear-gradient(#fffdfa,#fffaf2);
}
.bottom-item{
  min-height:160px;padding:18px 12px;border-radius:40% 45% 38% 42%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center
}
.bottom-item span{font-size:46px;margin-bottom:7px}
.bottom-item b{font-size:16px;line-height:1.1;color:#315887}
.bottom-item small{margin-top:7px;font-size:12px;line-height:1.25;color:#728299}
.blue-soft{background:#eef4fb}
.green-soft{background:#edf3e7}
.pink-soft{background:#fae7e8}
.sky-soft{background:#edf5ff}
.hand-note{font-size:23px;line-height:1.15;color:#5877a4;font-weight:700;transform:rotate(-9deg)}
.right-note{transform:rotate(-8deg);text-align:center}
.mobile-logo,.mobile-parent-cta,.mobile-notes{display:none}
.home-footer{padding:0 20px 26px;margin-top:0}

@media(max-width:900px){
  .home-topbar{display:none}
  .reference-home{max-width:none}
  .reference-hero{
    display:flex;flex-direction:column;
    min-height:0;
    background:
      radial-gradient(circle at 5% 15%,rgba(221,238,211,.75),transparent 25%),
      linear-gradient(180deg,#fffaf2,#fffdf7);
  }
  .reference-copy{
    padding:18px 16px 24px;display:flex;flex-direction:column
  }
  .mobile-logo{
    display:flex;align-items:flex-start;gap:8px;
    margin:0 2px 10px;color:#315888;font-weight:950;
    font-size:27px;line-height:.9;letter-spacing:-1.2px
  }
  .mobile-logo b{color:#dd7180}
  .mobile-logo i{font-style:normal;color:#df7181;margin-left:3px}
  .reference-copy h1{display:none}
  .reference-sub{
    order:1;margin:0 0 12px 48px;font-size:18px;line-height:1.28;
    max-width:310px
  }
  .scribble{display:none}
  .reference-art{
    order:-1;
    min-height:0;height:auto;
    aspect-ratio:1.08/1;
    margin:0;
    border-radius:0;
  }
  .reference-art:before{box-shadow:none}
  .reference-art img{
    object-position:center 42%;
    width:100%;height:100%;object-fit:cover;
    filter:saturate(1.03) contrast(1.05)
  }
  .note{display:none}
  .reference-modes{
    order:2;
    grid-template-columns:1fr;
    gap:12px;max-width:none;margin-top:4px
  }
  .ref-card{
    min-height:118px;border-radius:28px;padding:16px 18px;
    grid-template-columns:78px 1fr 42px;grid-template-rows:1fr;
    align-items:center
  }
  .ref-card .ref-icon{
    grid-column:auto;margin:0;font-size:48px;text-align:center
  }
  .ref-copy{justify-content:center}
  .ref-copy b{font-size:26px}
  .ref-copy small{font-size:16px;margin-top:3px}
  .ref-arrow{width:42px;height:42px;font-size:36px}
  .ref-camera{
    order:3;
    max-width:none;width:100%;margin:12px 0 0;
    min-height:76px;border-radius:27px;
    font-size:19px;padding:0 18px
  }
  .ref-camera-icon{font-size:36px}
  .mini-benefits{display:none}
  .reference-bottom{display:none}
  .mobile-parent-cta{
    margin:2px auto 0;
    width:min(310px,calc(100% - 48px));min-height:56px;
    border:2px solid #a9c8e7;border-radius:999px;
    background:#edf6ff;color:#315887;font-size:18px;font-weight:850;
    display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:0 18px
  }
  .mobile-parent-cta b{font-size:28px}
  .mobile-notes{
    display:flex;justify-content:space-between;gap:20px;
    padding:14px 26px 2px;color:#6a80a5;font-weight:700;
    font-size:14px;line-height:1.15
  }
  .mobile-notes span:first-child{transform:rotate(-8deg)}
  .mobile-notes span:last-child{transform:rotate(6deg);text-align:right}
  .home-footer{font-size:10px;padding:13px 24px 24px}
}

/* Parent onboarding */
.onboarding-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.parent-auth-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px}
.parent-consent{margin-top:4px}
.primary:disabled,.secondary:disabled{opacity:.48;cursor:not-allowed;filter:grayscale(.15)}
.profile-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.admin-email{font-size:13px;word-break:break-word}
.admin-table{min-width:940px}
@media(max-width:800px){
  .onboarding-grid{grid-template-columns:1fr;gap:0}
  .parent-auth-actions{align-items:stretch}
  .parent-auth-actions .primary,.parent-auth-actions .secondary{width:100%}
}

/* Exact approved homepage images */
.exact-home{
  margin:0;
  background:#fffaf2;
  overflow-x:hidden;
}
.exact-home-wrap{
  width:100%;
  max-width:1536px;
  margin:0 auto;
}
.home-shot{
  position:relative;
  width:100%;
  line-height:0;
}
.home-shot picture,
.home-shot-image{
  display:block;
  width:100%;
  height:auto;
}
.home-shot-image{
  image-rendering:auto;
  -webkit-font-smoothing:antialiased;
}
.hotspot{
  position:absolute;
  z-index:5;
  display:block;
  border-radius:24px;
  background:transparent;
  -webkit-tap-highlight-color:transparent;
}
.hotspot:focus-visible{
  outline:4px solid rgba(49,88,136,.55);
  outline-offset:2px;
}

/* Desktop coordinates on the approved 1536×1158 image */
.hs-explain{left:8.1%;top:33.3%;width:12.4%;height:14.2%}
.hs-homework{left:20.9%;top:33.3%;width:12.8%;height:14.2%}
.hs-curious{left:34.2%;top:33.3%;width:12.9%;height:14.2%}
.hs-camera{left:13.1%;top:47.4%;width:29.4%;height:7.1%}
.hs-parent{left:78.6%;top:1.2%;width:13.8%;height:4.8%}

@media(max-width:900px){
  .exact-home-wrap{max-width:864px}
  .hs-explain{left:5.4%;top:42.2%;width:89.4%;height:10.8%}
  .hs-homework{left:5.4%;top:53.0%;width:89.4%;height:10.8%}
  .hs-curious{left:5.4%;top:63.9%;width:89.4%;height:10.8%}
  .hs-camera{left:5.4%;top:74.9%;width:89.4%;height:8.5%}
  .hs-parent{left:29.4%;top:86.8%;width:41.0%;height:6.0%}
}

/* ===== Rebuilt interactive homepage ===== */
.site-home{
  margin:0;
  min-height:100vh;
  background:#fffaf2;
  color:#315887;
  overflow-x:hidden;
}
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,253,248,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(49,88,136,.08);
}
.site-header-inner{
  max-width:1320px;
  min-height:64px;
  margin:0 auto;
  padding:8px 22px;
  display:flex;
  align-items:center;
  gap:22px;
}
.site-brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:23px;
  letter-spacing:-.5px;
  color:#244f86;
  white-space:nowrap;
}
.site-paw{font-size:25px}
.site-heart{color:#df7181;font-size:24px}
.site-nav{
  display:flex;
  align-items:center;
  gap:5px;
}
.site-nav a{
  min-height:38px;
  padding:0 14px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#4f6787;
  font-weight:750;
  font-size:14px;
}
.site-nav a.active{background:#dceaff;color:#315887}
.site-header-actions{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}
.site-parent-btn,.site-login-btn{
  min-height:42px;
  padding:0 16px;
  border:1.5px solid #a9c8e7;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  background:#eef6ff;
  color:#315887;
}
.site-login-btn{background:#fff}

.site-hero{
  max-width:1536px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(540px,.95fr) minmax(560px,1.05fr);
  min-height:700px;
  background:
    radial-gradient(circle at 6% 20%,rgba(222,239,213,.75),transparent 22%),
    linear-gradient(90deg,#fffaf2 0%,#fff8ee 48%,#fff6ea 100%);
}
.hero-left{
  position:relative;
  z-index:2;
  padding:48px 36px 38px clamp(58px,7vw,118px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.mobile-brand,.mobile-hero-art,.mobile-parent-button{display:none}
.hero-heading h1{
  margin:0;
  font-size:clamp(62px,6.1vw,100px);
  line-height:.84;
  letter-spacing:-5px;
  font-weight:950;
  color:#315888;
  transform:rotate(-1deg);
}
.hero-heading h1 span{color:#dd7180}
.hero-heading h1 i{font-style:normal;color:#dd7180;font-size:.6em;margin-left:8px}
.hero-heading p{display:none}
.hero-subtitle{
  margin:18px 0 18px;
  font-size:clamp(20px,1.8vw,27px);
  line-height:1.35;
  font-weight:650;
  color:#365d8b;
}
.action-stack{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  max-width:650px;
}
.lesson-card{
  min-height:150px;
  border-radius:27px;
  padding:15px 15px 16px;
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-rows:auto 1fr;
  border:2px solid rgba(255,255,255,.85);
  box-shadow:0 9px 24px rgba(74,88,112,.09);
  transition:transform .15s ease,box-shadow .15s ease;
}
.lesson-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(74,88,112,.13)}
.lesson-card:active{transform:translateY(-1px) scale(.995)}
.lesson-icon{grid-column:1/-1;font-size:44px;line-height:1}
.lesson-text{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.lesson-text b{font-size:21px;line-height:1.05;color:#315887}
.lesson-text small{margin-top:5px;font-size:13px;line-height:1.2;color:#587292}
.lesson-go{
  width:36px;height:36px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  align-self:end;
  font-size:31px;font-weight:900;line-height:1;
  background:rgba(255,255,255,.5);
}
.lesson-card.pink{background:linear-gradient(145deg,#f9dfe4,#f4cdd4)}
.lesson-card.blue{background:linear-gradient(145deg,#e2f0ff,#cee4fa)}
.lesson-card.green{background:linear-gradient(145deg,#e6f1de,#d4e8cc)}
.camera-card{
  margin:14px 0 0 70px;
  max-width:520px;
  min-height:64px;
  padding:0 18px;
  border-radius:22px;
  background:linear-gradient(135deg,#e6defd,#d9cff9);
  border:2px solid rgba(255,255,255,.85);
  box-shadow:0 8px 22px rgba(78,75,120,.10);
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  font-size:20px;
  font-weight:800;
  color:#3d5b94;
}
.camera-card:hover{filter:brightness(1.02)}
.camera-big{font-size:31px}
.hero-right{
  position:relative;
  overflow:hidden;
  min-height:700px;
  background:#f2e5d8;
}
.hero-right:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  box-shadow:inset 45px 0 70px rgba(255,250,242,.9);
  pointer-events:none;
}
.hero-right img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:73% 43%;
  transform:scale(1.02);
  filter:saturate(1.03) contrast(1.02);
}
.paper-note{
  position:absolute;
  z-index:2;
  background:rgba(255,247,231,.92);
  color:#5c74a0;
  padding:11px 14px;
  box-shadow:0 4px 12px rgba(70,70,70,.08);
  font-weight:750;
  line-height:1.2;
  text-align:center;
}
.note-top{right:14%;top:50px;transform:rotate(7deg)}
.note-mid{right:2%;top:290px;transform:rotate(-1deg)}
.note-bottom{right:24%;bottom:85px;transform:rotate(5deg)}

.benefits-strip{
  max-width:1536px;
  margin:0 auto;
  padding:28px clamp(24px,5vw,72px) 32px;
  display:grid;
  grid-template-columns:1.1fr repeat(4,1fr) 1.1fr;
  gap:16px;
  align-items:center;
  background:#fffdf8;
}
.benefit-hand{
  font-size:23px;
  line-height:1.15;
  color:#5877a4;
  font-weight:700;
  transform:rotate(-9deg);
}
.benefit-hand.right{transform:rotate(-8deg);text-align:center}
.benefit-card{
  min-height:155px;
  padding:16px 12px;
  border-radius:36% 44% 39% 42%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.benefit-card:nth-child(2){background:#eef4fb}
.benefit-card:nth-child(3){background:#edf3e7}
.benefit-card:nth-child(4){background:#fae7e8}
.benefit-card:nth-child(5){background:#edf5ff}
.benefit-card span{font-size:44px;margin-bottom:7px}
.benefit-card b{font-size:16px;line-height:1.1;color:#315887}
.benefit-card small{margin-top:7px;font-size:12px;line-height:1.25;color:#728299}
.about-line{
  text-align:center;
  padding:0 20px 26px;
  color:#647ca7;
  font-size:13px;
  letter-spacing:.18em;
  text-transform:uppercase;
  background:#fffdf8;
}

@media(max-width:900px){
  .site-header{display:none}
  .site-hero{
    display:block;
    min-height:0;
    background:#fffaf2;
  }
  .hero-left{
    padding:14px 14px 28px;
    display:block;
  }
  .mobile-brand{
    display:flex;
    align-items:flex-start;
    gap:8px;
    padding:5px 5px 10px;
    color:#315888;
    font-size:28px;
    font-weight:950;
    line-height:.9;
    letter-spacing:-1.2px;
  }
  .mobile-brand div{display:flex;flex-direction:column}
  .mobile-brand strong{color:#dd7180}
  .mobile-paw{font-size:28px}
  .mobile-heart{color:#dd7180;font-size:25px;margin-left:2px}
  .hero-heading h1{display:none}
  .hero-heading p{
    display:block;
    margin:0 0 12px 52px;
    color:#365d8b;
    font-size:19px;
    line-height:1.28;
    font-weight:700;
  }
  .desktop-subtitle{display:none}
  .mobile-hero-art{
    display:block;
    width:calc(100% + 28px);
    margin:0 -14px 14px;
    height:min(56vw,480px);
    overflow:hidden;
    background:#f2e5d8;
  }
  .mobile-hero-art img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:73% 43%;
    transform:scale(1.04);
    filter:saturate(1.03) contrast(1.02);
  }
  .hero-right{display:none}
  .action-stack{
    grid-template-columns:1fr;
    gap:12px;
    max-width:none;
  }
  .lesson-card{
    min-height:116px;
    padding:15px 18px;
    border-radius:28px;
    display:grid;
    grid-template-columns:82px 1fr 44px;
    grid-template-rows:1fr;
    align-items:center;
  }
  .lesson-icon{
    grid-column:auto;
    font-size:49px;
    text-align:center;
  }
  .lesson-text{justify-content:center}
  .lesson-text b{font-size:27px}
  .lesson-text small{font-size:16px}
  .lesson-go{width:44px;height:44px;font-size:37px}
  .camera-card{
    margin:12px 0 0;
    max-width:none;
    min-height:76px;
    border-radius:27px;
    font-size:19px;
    padding:0 18px;
  }
  .camera-big{font-size:37px}
  .mobile-parent-button{
    margin:18px auto 0;
    width:min(320px,calc(100% - 42px));
    min-height:58px;
    padding:0 18px;
    border-radius:999px;
    border:2px solid #a9c8e7;
    background:#eef6ff;
    color:#315887;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:10px;
    font-size:19px;
    font-weight:850;
    text-align:center;
  }
  .mobile-parent-button b{font-size:29px}
  .benefits-strip{
    padding:16px 18px 22px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .benefit-hand{display:none}
  .benefit-card{
    min-height:132px;
    border-radius:26px;
    padding:14px 10px;
  }
  .benefit-card span{font-size:34px}
  .benefit-card b{font-size:14px}
  .benefit-card small{font-size:11px}
  .about-line{padding:4px 20px 28px;font-size:10px}
}

/* ===== Final template-based homepage ===== */
.template-home{
  margin:0;
  background:#fffaf2;
  color:#315887;
  min-height:100vh;
  overflow-x:hidden;
}
.template-page{
  width:100%;
  min-height:100vh;
  background:
    radial-gradient(circle at 10% 90%,rgba(226,239,217,.5),transparent 28%),
    linear-gradient(180deg,#fffaf2 0%,#fffdf8 100%);
}
.template-stage{
  position:relative;
  width:min(100%,1491px);
  margin:0 auto;
  line-height:0;
  background:#fffaf2;
}
.template-stage picture,
.template-art{
  display:block;
  width:100%;
  height:auto;
}
.template-art{
  image-rendering:auto;
  user-select:none;
  -webkit-user-drag:none;
}
.template-hotspots{position:absolute;inset:0;pointer-events:none}
.hotspot{
  position:absolute;
  z-index:5;
  display:block;
  pointer-events:auto;
  border-radius:26px;
  background:rgba(255,255,255,0);
  -webkit-tap-highlight-color:transparent;
  transition:background .14s ease,box-shadow .14s ease,transform .14s ease,filter .14s ease;
}
.hotspot:hover{cursor:pointer}
.hotspot:active{transform:none}
.hotspot:focus-visible{
  outline:4px solid rgba(49,88,136,.55);
  outline-offset:3px;
}

/* desktop button coordinates on the approved 1491×1055 template */
.mode-explain{left:8.719%;top:35.071%;width:13.079%;height:15.355%}
.mode-homework{left:22.602%;top:35.071%;width:13.883%;height:15.355%}
.mode-curious{left:37.223%;top:35.071%;width:13.548%;height:15.355%}
.mode-camera{left:13.414%;top:51.469%;width:32.595%;height:6.066%}
.mode-parent{left:79.00%;top:1.25%;width:13.10%;height:4.75%}

.desk-home{left:36.2%;top:1.25%;width:6.8%;height:4.75%;border-radius:16px}
.desk-subjects{left:43.3%;top:1.25%;width:6.9%;height:4.75%;border-radius:16px}
.desk-useful{left:50.7%;top:1.25%;width:6.8%;height:4.75%;border-radius:16px}
.desk-about{left:57.7%;top:1.25%;width:6.6%;height:4.75%;border-radius:16px}

.template-footer{
  width:min(100%,1491px);
  margin:0 auto;
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 8% 110%,rgba(135,170,112,.18),transparent 24%),
    radial-gradient(circle at 92% 110%,rgba(135,170,112,.18),transparent 24%),
    #fffaf2;
  border-top:1px solid rgba(49,88,136,.05);
}
.template-footer-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:20px;
  color:#5575a0;
  font-size:14px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  text-align:center;
}
.template-footer-inner span:first-child{font-size:22px}
.template-footer-inner span:last-child{color:#df7180;font-size:20px}
.anchor-target{height:0;scroll-margin-top:20px}

@media(max-width:900px){
  .template-stage{width:100%;max-width:941px}
  .mode-explain{left:8.719%;top:35.071%;width:13.079%;height:15.355%}
  .mode-homework{left:22.602%;top:35.071%;width:13.883%;height:15.355%}
  .mode-curious{left:37.223%;top:35.071%;width:13.548%;height:15.355%}
  .mode-camera{left:13.414%;top:51.469%;width:32.595%;height:6.066%}
  .mode-parent{left:29.7%;top:86.75%;width:40.8%;height:5.95%;border-radius:999px}

  .desk-home,.desk-subjects,.desk-useful,.desk-about{display:none}

  .template-footer{
    min-height:116px;
    background:
      radial-gradient(circle at 2% 105%,rgba(117,156,95,.24),transparent 27%),
      radial-gradient(circle at 98% 105%,rgba(117,156,95,.24),transparent 27%),
      linear-gradient(180deg,#fffaf2,#fff8ee);
  }
  .template-footer-inner{
    padding:24px 18px 30px;
    font-size:11px;
    letter-spacing:.08em;
  }
}

@media(max-width:420px){
  .template-footer{min-height:132px}
  .template-footer-inner{max-width:320px;line-height:1.45}
}

/* ===== Stable template homepage v2 ===== */
.template-home{margin:0;background:#fffaf2;overflow-x:hidden}
.template-page{width:100%;min-height:100vh;background:#fffaf2}
.template-stage{
  position:relative;
  width:min(100%,1491px);
  margin:0 auto;
  line-height:0;
  overflow:hidden;
  background:#fffaf2;
}
.template-art{width:100%;height:auto;display:block;user-select:none;-webkit-user-drag:none}
.template-art-mobile{display:none}
.template-hotspots{position:absolute;inset:0;pointer-events:none}
.hotspot{
  position:absolute;
  z-index:8;
  display:block;
  pointer-events:auto;
  border-radius:26px;
  background:transparent;
  -webkit-tap-highlight-color:transparent;
}
.hotspot:hover{cursor:pointer}
.hotspot:active{transform:none}
.hotspot:focus-visible{outline:4px solid rgba(49,88,136,.55);outline-offset:3px}

/* Exact hit areas for 1491×1055 desktop artwork */
.mode-explain{left:8.719%;top:35.071%;width:13.079%;height:15.355%}
.mode-homework{left:22.602%;top:35.071%;width:13.883%;height:15.355%}
.mode-curious{left:37.223%;top:35.071%;width:13.548%;height:15.355%}
.mode-camera{left:13.414%;top:51.469%;width:32.595%;height:6.066%}
.mobile-only-hotspot{display:none}

/* Real desktop header covers the drawn navigation, so it never drifts */
.desktop-overlay-header{
  position:absolute;
  z-index:12;
  top:0;
  left:7.0%;
  right:4.0%;
  height:7.05%;
  min-height:58px;
  padding:0 18px;
  border-radius:0 0 24px 24px;
  background:rgba(255,253,248,.98);
  display:flex;
  align-items:center;
  gap:26px;
  line-height:1;
  box-shadow:0 2px 10px rgba(49,88,136,.04);
}
.overlay-brand{
  display:flex;align-items:center;gap:8px;
  color:#174b91;font-size:22px;font-weight:900;white-space:nowrap
}
.overlay-brand span{font-size:26px}
.overlay-brand i{font-style:normal;color:#e56f7e;font-size:23px}
.overlay-nav{display:flex;align-items:center;gap:6px;margin-left:auto}
.overlay-nav a{
  min-height:38px;padding:0 15px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#315887;font-size:14px;font-weight:800;
}
.overlay-nav a:hover,.overlay-nav a.active{background:#dceaff}
.overlay-parent{
  min-height:42px;padding:0 18px;border:2px solid #7baee1;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  color:#174b91;background:#edf6ff;font-size:15px;font-weight:850;white-space:nowrap
}

.info-page{
  min-height:100vh;
  background:
    radial-gradient(circle at 5% 6%,rgba(226,239,217,.55),transparent 24%),
    radial-gradient(circle at 94% 8%,rgba(238,224,251,.55),transparent 24%),
    #fffaf2;
}
.info-topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(255,253,248,.94);backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(49,88,136,.08)
}
.info-topbar-inner{
  max-width:1080px;margin:0 auto;padding:12px 20px;
  display:flex;align-items:center;gap:12px
}
.info-brand{font-size:20px;font-weight:900;color:#315887}
.info-topbar .spacer{flex:1}
.info-nav-link{
  min-height:42px;padding:0 15px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #bfd4e8;background:#f7fbff;color:#315887;font-weight:800
}
.info-shell{max-width:960px;margin:0 auto;padding:44px 20px 64px}
.info-hero{
  background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.9);
  border-radius:32px;padding:34px;box-shadow:0 18px 50px rgba(76,79,97,.08)
}
.info-hero h1{margin:0 0 12px;font-size:42px;letter-spacing:-1px}
.info-hero p{margin:0;color:#5f7693;font-size:18px;line-height:1.55}
.info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:18px}
.info-card{
  background:rgba(255,255,255,.8);border:1px solid #ebe7df;border-radius:24px;
  padding:22px;box-shadow:0 8px 24px rgba(76,79,97,.05)
}
.info-card .emoji{font-size:28px}
.info-card h2{font-size:22px;margin:10px 0 7px}
.info-card p{margin:0;color:#637792;line-height:1.5}
.info-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.info-primary,.info-secondary{
  min-height:48px;padding:0 18px;border-radius:16px;
  display:inline-flex;align-items:center;justify-content:center;font-weight:850
}
.info-primary{background:#5f89b9;color:#fff}
.info-secondary{background:#f4f8fd;color:#315887;border:1px solid #bfd4e8}

@media(max-width:900px){
  .desktop-overlay-header{display:none}
  .template-stage{width:100%;max-width:941px}
  .template-art-desktop{display:none}
  .template-art-mobile{display:block}

  /* Exact hit areas for 941×1672 mobile artwork */
  .mode-explain{left:8.719%;top:35.071%;width:13.079%;height:15.355%}
  .mode-homework{left:22.602%;top:35.071%;width:13.883%;height:15.355%}
  .mode-curious{left:37.223%;top:35.071%;width:13.548%;height:15.355%}
  .mode-camera{left:13.414%;top:51.469%;width:32.595%;height:6.066%}
  .mobile-only-hotspot{display:block;left:29.7%;top:86.75%;width:40.8%;height:5.95%;border-radius:999px}

  .info-topbar-inner{padding:10px 12px}
  .info-brand{font-size:17px}
  .info-nav-link{font-size:12px;padding:0 11px}
  .info-shell{padding:22px 12px 44px}
  .info-hero{padding:22px;border-radius:24px}
  .info-hero h1{font-size:32px}
  .info-hero p{font-size:16px}
  .info-grid{grid-template-columns:1fr}
}

/* Clean desktop artwork hit areas (1448×1086) */
@media(min-width:901px){
  .mode-explain{left:8.719%;top:35.071%;width:13.079%;height:15.355%}
  .mode-homework{left:22.602%;top:35.071%;width:13.883%;height:15.355%}
  .mode-curious{left:37.223%;top:35.071%;width:13.548%;height:15.355%}
  .mode-camera{left:13.414%;top:51.469%;width:32.595%;height:6.066%}
}

@media(max-width:900px){
  .mode-explain{left:6.270%;top:41.328%;width:87.460%;height:10.646%;border-radius:32px}
  .mode-homework{left:6.270%;top:52.572%;width:87.460%;height:10.706%;border-radius:32px}
  .mode-curious{left:6.270%;top:63.876%;width:87.460%;height:11.304%;border-radius:32px}
  .mode-camera{left:6.376%;top:75.778%;width:87.354%;height:8.254%;border-radius:30px}
  .mobile-only-hotspot{display:block;left:30.074%;top:88.158%;width:39.851%;height:5.682%;border-radius:999px}
}

/* ===== Main action feedback ===== */
.hotspot{
  --hotspot-rgb:95,137,185;
  overflow:hidden;
  isolation:isolate;
  touch-action:manipulation;
}
.mode-explain{--hotspot-rgb:220,112,135}
.mode-homework{--hotspot-rgb:91,153,218}
.mode-curious{--hotspot-rgb:91,164,116}
.mode-camera{--hotspot-rgb:126,103,214}
.mode-parent{--hotspot-rgb:70,135,201}

.hotspot::before{
  content:"";
  position:absolute;
  inset:2px;
  z-index:1;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  border:3px solid rgba(var(--hotspot-rgb),0);
  background:rgba(var(--hotspot-rgb),0);
  box-shadow:
    0 0 0 0 rgba(var(--hotspot-rgb),0),
    inset 0 0 0 0 rgba(255,255,255,0);
  transition:
    opacity .14s ease,
    border-color .14s ease,
    background .14s ease,
    box-shadow .14s ease;
}

.hotspot:hover::before{
  opacity:1;
  border-color:rgba(var(--hotspot-rgb),.62);
  background:rgba(var(--hotspot-rgb),.045);
  box-shadow:
    0 0 0 5px rgba(var(--hotspot-rgb),.11),
    0 0 24px rgba(var(--hotspot-rgb),.34),
    inset 0 0 16px rgba(255,255,255,.28);
}

.hotspot:active::before,
.hotspot.is-loading::before{
  opacity:1;
  border-color:rgba(var(--hotspot-rgb),.95);
  background:rgba(var(--hotspot-rgb),.10);
  box-shadow:
    0 0 0 6px rgba(var(--hotspot-rgb),.16),
    0 0 34px rgba(var(--hotspot-rgb),.52),
    inset 0 0 22px rgba(255,255,255,.42);
}

.hotspot.is-loading::before{
  animation:hotspot-pulse .72s ease-in-out infinite alternate;
}

.hotspot.is-loading::after{
  content:"";
  position:absolute;
  z-index:2;
  top:-35%;
  bottom:-35%;
  width:22%;
  left:-30%;
  pointer-events:none;
  transform:skewX(-18deg);
  background:linear-gradient(
    90deg,
    rgba(255,255,255,0),
    rgba(255,255,255,.74),
    rgba(255,255,255,0)
  );
  filter:blur(1px);
  animation:hotspot-sweep .72s ease-in-out infinite;
}

@keyframes hotspot-pulse{
  from{
    box-shadow:
      0 0 0 4px rgba(var(--hotspot-rgb),.12),
      0 0 18px rgba(var(--hotspot-rgb),.34),
      inset 0 0 18px rgba(255,255,255,.32);
  }
  to{
    box-shadow:
      0 0 0 8px rgba(var(--hotspot-rgb),.19),
      0 0 38px rgba(var(--hotspot-rgb),.58),
      inset 0 0 26px rgba(255,255,255,.48);
  }
}
@keyframes hotspot-sweep{
  0%{left:-35%}
  100%{left:118%}
}

@media (prefers-reduced-motion:reduce){
  .hotspot,
  .hotspot::before,
  .hotspot::after{animation:none!important;transition:none!important}
}

/* ===== Authoritative desktop hitboxes for current 1448×1086 clean artwork ===== */
@media(min-width:901px){
  .mode-explain{
    left:4.4890%;
    top:37.1087%;
    width:15.2624%;
    height:17.5875%;
    border-radius:24px;
  }
  .mode-homework{
    left:20.5801%;
    top:37.1087%;
    width:15.8149%;
    height:17.5875%;
    border-radius:24px;
  }
  .mode-curious{
    left:37.1547%;
    top:37.1087%;
    width:14.9171%;
    height:17.5875%;
    border-radius:24px;
  }
  .mode-camera{
    left:9.3232%;
    top:55.9853%;
    width:37.4309%;
    height:6.8140%;
    border-radius:22px;
  }
}

/* ===== Messenger-style chat viewport ===== */
.chat-page{
  margin:0;
  height:var(--chat-vh,100dvh);
  min-height:0;
  overflow:hidden;
  background:linear-gradient(180deg,#fff8ef,#fffdf9 62%,#fff8f4);
}
.chat-app{
  height:var(--chat-vh,100dvh);
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
}
.chat-topbar{
  position:relative;
  top:auto;
  flex:0 0 auto;
}
.chat-topbar .topbar-inner{
  min-height:58px;
}
.chat-shell{
  width:min(100%,980px);
  height:100%;
  min-height:0;
  margin:0 auto;
  padding:10px 12px 12px;
  display:flex;
  overflow:hidden;
}
.chat-box{
  width:100%;
  height:100%;
  min-height:0;
  padding:14px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
}
.chat-header{
  flex:0 0 auto;
  margin-bottom:8px;
}
.chat-heading{min-width:0}
.chat-title{font-size:24px;line-height:1.05}
.chat-back{width:44px;min-width:44px;padding:0}
.chat-notice{
  flex:0 0 auto;
  padding:9px 11px;
  border-radius:14px;
  font-size:12px;
  line-height:1.3;
  margin-bottom:6px;
}
.chat-page .messages{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:8px 2px 10px;
}
.chat-bottom{
  flex:0 0 auto;
  min-height:0;
  padding-top:5px;
  background:linear-gradient(180deg,rgba(255,253,250,0),rgba(255,253,250,.96) 18%);
}
.chat-page .photo-row{
  margin:2px 0 7px;
  min-height:44px;
}
.chat-page .composer{
  grid-template-columns:minmax(0,1fr) 110px;
  gap:8px;
  align-items:end;
}
.chat-page .voice-row{
  grid-template-columns:minmax(0,1fr) 54px;
}
.chat-page .composer textarea{
  min-height:54px;
  max-height:112px;
  resize:none;
}
.chat-page .send{
  width:110px;
  height:54px;
}
.chat-page .voice-status{
  min-height:16px;
  margin-top:5px;
  font-size:11px;
  line-height:1.2;
}
.chat-error{
  min-height:0;
  margin-top:5px;
  font-size:12px;
}
.chat-error:empty{display:none}
.chat-gate{
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:20px;
  background:
    radial-gradient(circle at 20% 10%,rgba(247,217,223,.58),transparent 30%),
    radial-gradient(circle at 80% 18%,rgba(223,238,255,.7),transparent 30%),
    #fffaf3;
}
.chat-gate-card{
  width:min(360px,100%);
  padding:26px 22px;
  border-radius:26px;
  background:rgba(255,255,255,.86);
  border:1px solid rgba(255,255,255,.95);
  box-shadow:0 18px 50px rgba(76,79,97,.10);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  color:#304b70;
}
.chat-gate-paw{font-size:34px}
.chat-gate-card b{font-size:19px}
.chat-gate-card span{font-size:13px;color:#6d8098;line-height:1.35}

@media(max-width:800px){
  .chat-page .topbar-inner{
    padding:8px 10px;
    min-height:52px;
  }
  .chat-page .brand{font-size:15px}
  .chat-page .profile-btn{min-height:38px;padding:0 10px}
  .chat-shell{
    padding:6px 7px 7px;
  }
  .chat-box{
    padding:10px;
    border-radius:18px;
  }
  .chat-header{
    margin-bottom:5px;
    gap:8px;
  }
  .chat-title{font-size:20px}
  .chat-header .muted{font-size:11px;line-height:1.15}
  .chat-back{width:40px;min-width:40px;min-height:40px}
  .chat-notice{
    padding:7px 9px;
    font-size:11px;
    margin-bottom:4px;
  }
  .chat-page .messages{
    padding:5px 1px 7px;
  }
  .chat-page .bubble{
    max-width:90%;
    padding:10px 12px;
    border-radius:17px;
    font-size:14px;
    line-height:1.38;
  }
  .chat-page .photo-row{
    margin:1px 0 6px;
    min-height:40px;
    gap:6px;
  }
  .chat-page .photo-row .secondary{
    min-height:40px;
    padding:0 11px;
    font-size:12px;
  }
  .chat-page .photo-preview{
    width:54px;
    height:40px;
    border-radius:10px;
  }
  .chat-page .pill{font-size:10px;padding:6px 8px}
  .chat-page .composer{
    grid-template-columns:minmax(0,1fr) 96px;
    gap:7px;
  }
  .chat-page .voice-row{
    grid-template-columns:minmax(0,1fr) 48px;
    gap:6px;
  }
  .chat-page .composer textarea{
    min-height:50px;
    max-height:86px;
    padding:10px 12px;
    border-radius:15px;
    font-size:14px;
  }
  .chat-page .mic-btn{
    width:48px;
    height:50px;
    min-height:50px;
    font-size:21px;
    border-radius:15px;
  }
  .chat-page .send{
    width:96px;
    height:50px;
    font-size:12px;
    padding:0 9px;
  }
  .chat-page .voice-status{font-size:10px;margin-top:4px}
}
@media(max-height:620px){
  .chat-notice{display:none}
  .chat-page .voice-status{display:none}
}

/* ===== Compact messenger composer with paw send ===== */
.sr-only{
  position:absolute!important;
  width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;
}
.chat-page .chat-bottom{
  padding-top:8px;
  background:rgba(255,253,250,.98);
}
.chat-page .compact-composer{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) 58px;
  gap:9px;
  align-items:end;
  width:100%;
}
.chat-page .composer-tools{
  display:flex;
  align-items:center;
  gap:8px;
}
.chat-page .compact-composer textarea{
  width:100%;
  min-height:54px;
  max-height:132px;
  resize:none;
  border:2px solid #d4e1ee;
  border-radius:20px;
  background:#fff;
  padding:14px 16px;
  font-size:16px;
  line-height:1.35;
  color:#40566f;
  outline:none;
  box-shadow:inset 0 1px 2px rgba(35,67,103,.03);
}
.chat-page .compact-composer textarea:focus{
  border-color:#9fbddc;
  box-shadow:0 0 0 4px rgba(95,137,185,.08);
}
.chat-page .composer-icon{
  width:54px;
  height:54px;
  min-width:54px;
  min-height:54px;
  padding:0;
  border:2px solid #d4e1ee;
  border-radius:18px;
  background:#f9fcff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  line-height:1;
  color:#547aa6;
  cursor:pointer;
  transition:transform .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease;
}
.chat-page .composer-icon .tool-icon{
  width:25px;
  height:25px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.chat-page .composer-icon .tool-icon-dot{
  fill:currentColor;
  stroke:none;
}
.chat-page .composer-icon .stop-icon{
  width:19px;
  height:19px;
  border-radius:5px;
  background:currentColor;
  display:block;
}
.chat-page .composer-icon:hover{
  border-color:#abc5df;
  background:#f1f7fd;
}
.chat-page .composer-icon:active{
  transform:scale(.96);
}
.chat-page .mic-btn.recording{
  background:#fff1f2;
  border-color:#e5a3ac;
  box-shadow:0 0 0 4px rgba(214,95,112,.10);
}
.chat-page .paw-send{
  width:58px;
  height:58px;
  min-width:58px;
  min-height:58px;
  padding:0;
  border:0;
  border-radius:50%;
  background:linear-gradient(145deg,#76a3d2,#4d7fb8);
  box-shadow:0 7px 18px rgba(64,105,153,.22);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
}
.chat-page .paw-send svg{
  width:34px;
  height:34px;
  fill:#fff;
}
.chat-page .paw-send:hover{
  filter:brightness(1.04);
  box-shadow:0 9px 22px rgba(64,105,153,.28);
}
.chat-page .paw-send:active{
  transform:scale(.94);
}
.chat-page .paw-send:disabled{
  opacity:1;
  cursor:wait;
}
.chat-page .paw-send.thinking{
  animation:paw-thinking .85s ease-in-out infinite alternate;
}
.chat-page .paw-send.thinking svg{
  animation:paw-breathe .85s ease-in-out infinite alternate;
}
@keyframes paw-thinking{
  from{box-shadow:0 0 0 0 rgba(89,137,190,.20),0 7px 18px rgba(64,105,153,.22)}
  to{box-shadow:0 0 0 8px rgba(89,137,190,.12),0 10px 24px rgba(64,105,153,.30)}
}
@keyframes paw-breathe{
  from{transform:scale(.90)}
  to{transform:scale(1.04)}
}
.chat-page .attachment-preview{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 7px;
  padding:6px 8px;
  min-height:48px;
  border-radius:14px;
  background:#f6f9fc;
  border:1px solid #e2e9f0;
  width:max-content;
  max-width:100%;
}
.chat-page .attachment-preview.hidden{display:none!important}
.chat-page .attachment-preview .photo-preview{
  width:56px;
  height:42px;
  object-fit:cover;
  border-radius:10px;
}
.chat-page .attachment-remove{
  width:30px;height:30px;
  border:0;border-radius:50%;
  background:#eaf0f6;
  color:#536a83;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.chat-page .voice-status{
  margin:6px 4px 0 4px;
  min-height:16px;
  color:#66809b;
}
@media(max-width:800px){
  .chat-page .compact-composer{
    grid-template-columns:auto minmax(0,1fr) 50px;
    gap:6px;
  }
  .chat-page .composer-tools{gap:6px}
  .chat-page .composer-icon{
    width:50px;
    height:50px;
    min-width:50px;
    min-height:50px;
    border-radius:15px;
    font-size:21px;
  }
  .chat-page .composer-icon .tool-icon{width:23px;height:23px}
  .chat-page .compact-composer textarea{
    min-height:50px;
    max-height:96px;
    border-radius:16px;
    padding:12px 13px;
    font-size:14px;
  }
  .chat-page .paw-send{
    width:50px;
    height:50px;
    min-width:50px;
    min-height:50px;
  }
  .chat-page .paw-send svg{width:29px;height:29px}
}
@media(max-width:420px){
  .chat-page .compact-composer{
    grid-template-columns:auto minmax(0,1fr) 48px;
    gap:5px;
  }
  .chat-page .composer-tools{gap:5px}
  .chat-page .composer-icon{
    width:48px;min-width:48px;height:48px;min-height:48px;
  }
  .chat-page .paw-send{
    width:48px;min-width:48px;height:48px;min-height:48px;
  }
}
@media(prefers-reduced-motion:reduce){
  .chat-page .paw-send,
  .chat-page .paw-send svg{animation:none!important}
}

/* ===== Home profile chip ===== */
.home-profile-chip{
  min-height:40px;
  padding:0 12px 0 8px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:rgba(255,255,255,.92);
  border:1.5px solid #bfd4e8;
  color:#315887;
  font-weight:850;
  line-height:1;
  box-shadow:0 5px 14px rgba(49,88,136,.08);
  white-space:nowrap;
}
.home-profile-avatar{
  width:30px;height:30px;border-radius:50%;
  display:grid;place-items:center;
  background:#eaf3fc;
  font-size:16px;
}
.home-profile-name{font-size:13px;max-width:110px;overflow:hidden;text-overflow:ellipsis}
.mobile-profile-chip{display:none}

@media(min-width:901px){
  .desktop-overlay-header{gap:12px}
  .overlay-nav{margin-left:auto}
  .desktop-profile-chip{margin-left:4px}
}

@media(max-width:900px){
  .desktop-profile-chip{display:none}
  .mobile-profile-chip{
    display:inline-flex;
    position:absolute;
    z-index:14;
    top:1.2%;
    right:2.8%;
    min-height:38px;
    padding-right:10px;
    background:rgba(255,255,255,.90);
    backdrop-filter:blur(8px);
  }
}

/* ===== Child profile page ===== */
.profile-page{
  min-height:100vh;
  background:
    radial-gradient(circle at 10% 8%,rgba(247,217,223,.5),transparent 24%),
    radial-gradient(circle at 90% 10%,rgba(223,238,255,.65),transparent 25%),
    #fffaf3;
}
.profile-shell{
  max-width:760px;
  margin:0 auto;
  padding:34px 18px 56px;
}
.profile-card-main{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.95);
  border-radius:30px;
  padding:28px;
  box-shadow:var(--shadow);
}
.profile-hero-row{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:24px;
}
.profile-avatar-big{
  width:78px;height:78px;
  border-radius:26px;
  display:grid;place-items:center;
  font-size:40px;
  background:linear-gradient(145deg,#eef7ff,#f9e9ef);
  border:1px solid #e6edf3;
}
.profile-kicker{
  color:#8090a3;
  font-size:13px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-bottom:4px;
}
.profile-card-main h1{
  margin:0 0 9px;
  font-size:32px;
  letter-spacing:-.8px;
}
.profile-details{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.profile-detail{
  padding:16px;
  border-radius:18px;
  background:#fbfcfd;
  border:1px solid #e8edf1;
}
.profile-detail span{
  display:block;
  color:#8190a2;
  font-size:12px;
  margin-bottom:5px;
}
.profile-detail b{
  font-size:17px;
  color:#34577f;
  word-break:break-word;
}
.profile-detail-wide{grid-column:1/-1}
.profile-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}
.profile-note{margin:18px 0 0;line-height:1.45}

@media(max-width:600px){
  .profile-shell{padding:16px 11px 36px}
  .profile-card-main{padding:18px;border-radius:24px}
  .profile-hero-row{gap:13px;margin-bottom:18px}
  .profile-avatar-big{width:62px;height:62px;border-radius:20px;font-size:32px}
  .profile-card-main h1{font-size:25px}
  .profile-details{grid-template-columns:1fr}
  .profile-detail-wide{grid-column:auto}
  .profile-actions .primary,.profile-actions .secondary{width:100%}
}

/* ===== Persistent chat history controls ===== */
.chat-header .chat-heading{flex:1 1 auto}
.new-chat-btn{
  flex:0 0 auto;
  min-height:42px;
  padding:0 14px;
  border-radius:14px;
  font-size:12px;
  white-space:nowrap;
}
.new-chat-btn:disabled{opacity:.55;cursor:wait}
@media(max-width:600px){
  .new-chat-btn{
    width:44px;
    min-width:44px;
    padding:0;
    overflow:hidden;
    color:transparent;
    position:relative;
  }
  .new-chat-btn::after{
    content:"+";
    color:#365a82;
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    font-size:25px;
    font-weight:700;
  }
}


/* ===== Optimized interactive chat composer v3 ===== */
.chat-page .compact-composer{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 58px;
  gap:9px;
  align-items:end;
  width:100%;
}
.chat-page .composer-tools{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-self:end;
}
.chat-page .composer-tools .composer-icon{
  width:48px;
  height:40px;
  min-width:48px;
  min-height:40px;
  border-radius:14px;
  font-size:20px;
}
.chat-page .compact-composer textarea{
  width:100%;
  min-height:82px;
  max-height:190px;
  resize:none;
  overflow-y:hidden;
  border:2px solid #d4e1ee;
  border-radius:20px;
  background:#fff;
  padding:13px 15px;
  font-size:16px;
  line-height:1.42;
  color:#40566f;
  outline:none;
  transition:height .12s ease,border-color .12s ease,box-shadow .12s ease;
}
.chat-page .compact-composer textarea:focus{
  border-color:#9fbddc;
  box-shadow:0 0 0 4px rgba(95,137,185,.08);
}
.chat-page .paw-send{
  align-self:end;
  margin-bottom:0;
}
.chat-page .message-image{
  display:block;
  width:min(260px,100%);
  max-height:220px;
  object-fit:cover;
  margin-top:10px;
  border-radius:14px;
  border:1px solid #dce4ec;
}
.chat-page .bubble strong{
  font-weight:850;
  color:inherit;
}
.chat-page .attachment-preview{
  width:100%;
  max-width:100%;
  padding:7px 9px;
}
.chat-page .attachment-preview .photo-preview{
  width:70px;
  height:52px;
}
@media(max-width:800px){
  .chat-page .compact-composer{
    grid-template-columns:42px minmax(0,1fr) 52px;
    gap:7px;
  }
  .chat-page .composer-tools{gap:5px}
  .chat-page .composer-tools .composer-icon{
    width:42px;
    min-width:42px;
    height:38px;
    min-height:38px;
    border-radius:13px;
    font-size:18px;
  }
  .chat-page .compact-composer textarea{
    min-height:82px;
    max-height:170px;
    padding:12px 13px;
    font-size:15px;
    border-radius:17px;
  }
  .chat-page .paw-send{
    width:52px;
    min-width:52px;
    height:52px;
    min-height:52px;
  }
  .chat-page .paw-send svg{width:30px;height:30px}
}
@media(max-width:420px){
  .chat-page .compact-composer{
    grid-template-columns:40px minmax(0,1fr) 50px;
    gap:6px;
  }
  .chat-page .composer-tools .composer-icon{
    width:40px;
    min-width:40px;
    height:37px;
    min-height:37px;
  }
  .chat-page .compact-composer textarea{
    min-height:80px;
    max-height:160px;
    font-size:15px;
  }
  .chat-page .paw-send{
    width:50px;min-width:50px;height:50px;min-height:50px;
  }
}
/* ===== End optimized interactive chat composer v3 ===== */


/* ===== Chat composer final polish v4 ===== */
.chat-page .compact-composer textarea{
  max-height:300px;
}
.chat-page .compact-composer.typing textarea{
  border-color:#9fbddc;
  box-shadow:0 0 0 4px rgba(95,137,185,.08);
}
.chat-page .composer-tools{
  align-self:end;
}
@media(max-width:800px){
  .chat-page .compact-composer textarea{
    max-height:240px;
  }
}
@media(max-width:420px){
  .chat-page .compact-composer textarea{
    max-height:220px;
  }
}
/* ===== End chat composer final polish v4 ===== */


/* ===== Learning profile onboarding and parent usage ===== */
.setup-page{
  min-height:100vh;
  background:
    radial-gradient(circle at 8% 8%,rgba(247,217,223,.52),transparent 26%),
    radial-gradient(circle at 92% 11%,rgba(223,238,255,.68),transparent 28%),
    #fffaf3;
}
.setup-shell{max-width:820px;margin:0 auto;padding:28px 16px 56px}
.setup-card{
  background:rgba(255,255,255,.9);
  border:1px solid rgba(255,255,255,.96);
  border-radius:30px;
  padding:28px;
  box-shadow:var(--shadow);
}
.setup-card h1{margin:0 0 8px;font-size:34px;letter-spacing:-.7px}
.setup-intro{margin:0 0 22px;line-height:1.5}
.setup-question{padding:18px 0;border-top:1px solid #ece8e2}
.setup-question:first-of-type{border-top:0}
.setup-question h2{font-size:19px;margin:0 0 6px}
.setup-question .muted{margin-bottom:11px}
.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.choice-card{
  position:relative;
  min-height:58px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border:1.5px solid #dce4ec;
  border-radius:17px;
  background:#fffdfa;
  cursor:pointer;
  font-weight:760;
  line-height:1.25;
}
.choice-card input{accent-color:#668fbd;flex:0 0 auto}
.choice-card:has(input:checked){
  border-color:#8eafd3;
  background:#eef6ff;
  box-shadow:0 0 0 3px rgba(127,166,214,.10);
}
.subject-grid{display:flex;flex-wrap:wrap;gap:8px}
.subject-choice{
  display:inline-flex;align-items:center;gap:6px;
  padding:9px 11px;border:1px solid #dce4ec;border-radius:999px;
  background:#fffdfa;font-size:13px;font-weight:720;cursor:pointer;
}
.subject-choice:has(input:checked){background:#eef6ff;border-color:#91b1d2}
.setup-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}
.setup-actions .primary{min-width:190px}
.setup-private-note{
  margin-top:18px;padding:12px 14px;border-radius:16px;
  background:#f7fbff;border:1px solid #dce8f3;color:#607791;font-size:13px;line-height:1.45
}
.usage-summary{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
  margin:14px 0 4px;
}
.usage-summary-card{
  padding:14px 15px;border:1px solid #e6e8ea;border-radius:18px;background:#fbfcfd;
}
.usage-summary-card b{display:block;font-size:22px;color:#34577f}
.usage-summary-card span{font-size:12px;color:#8190a2}
.profile-usage{
  margin-top:12px;padding:11px 12px;border-radius:15px;background:#f5f8fb;
  border:1px solid #e3eaf0;font-size:13px;line-height:1.45;color:#607791;
}
.profile-usage b{color:#34577f}
.usage-top{display:inline-flex;margin-left:6px;padding:3px 7px;border-radius:999px;background:#fff0d9;color:#8a6427;font-size:10px;font-weight:850}
.education-chip{
  display:inline-flex;align-items:center;gap:5px;margin-top:7px;
  padding:6px 9px;border-radius:999px;background:#eef6ff;color:#567493;font-size:12px;font-weight:750;
}
.profile-learning{margin-top:18px}
.profile-learning h2{font-size:19px;margin:0 0 10px}
.profile-learning-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.profile-learning-item{padding:13px 14px;border-radius:16px;background:#fbfcfd;border:1px solid #e8edf1}
.profile-learning-item span{display:block;color:#8190a2;font-size:11px;margin-bottom:4px}
.profile-learning-item b{color:#34577f;font-size:15px}
@media(max-width:600px){
  .setup-shell{padding:14px 10px 36px}
  .setup-card{padding:18px;border-radius:24px}
  .setup-card h1{font-size:27px}
  .choice-grid{grid-template-columns:1fr}
  .usage-summary{grid-template-columns:1fr}
  .profile-learning-grid{grid-template-columns:1fr}
}


/* ===== Parent learning editor and API budget ===== */
.usage-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.usage-note{margin:8px 0 18px;line-height:1.45}
.usage-summary-warning{
  grid-column:1/-1;
  padding:10px 12px;
  border-radius:14px;
  background:#fff7df;
  border:1px solid #eedca9;
  color:#725f29;
  font-size:12px;
}
.cost-line{margin-bottom:4px}
.cost-line b{font-size:17px}
.cost-warning{margin-top:6px;color:#8a6427;font-size:12px}
.budget-box{
  margin-top:10px;
  padding:11px 12px;
  border-radius:15px;
  border:1px solid #e4e8ec;
  background:#fbfcfd;
}
.budget-row{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px}
.budget-row span{color:#8190a2}
.budget-row b{color:#34577f;text-align:right}
.budget-track{
  height:7px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:#e7edf3;
}
.budget-track i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:#7ea6d1;
}
.budget-percent{margin-top:5px;color:#7c8da0;font-size:10px;text-align:right}
.budget-warn .budget-track i{background:#d7aa58}
.budget-high .budget-track i{background:#d78458}
.budget-over{background:#fff4f4;border-color:#ebcaca}
.budget-over .budget-track i{background:#c9636d}
.budget-over .budget-row b{color:#93474e}
.profile-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.small-action{min-height:42px;padding:0 13px;font-size:12px}

.profile-editor{
  width:min(760px,calc(100% - 24px));
  max-height:min(90dvh,900px);
  border:0;
  border-radius:28px;
  padding:0;
  color:var(--ink);
  background:transparent;
  overflow:visible;
}
.profile-editor::backdrop{background:rgba(39,57,79,.38);backdrop-filter:blur(4px)}
.profile-editor-card{
  max-height:min(90dvh,900px);
  overflow:auto;
  padding:24px;
  border-radius:28px;
  background:#fffdf9;
  border:1px solid rgba(255,255,255,.95);
  box-shadow:0 24px 70px rgba(50,61,78,.24);
}
.profile-editor-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:12px}
.profile-editor-head h2{margin:2px 0 0;font-size:28px}
.editor-close{
  margin-left:auto;
  width:42px;height:42px;min-width:42px;
  display:grid;place-items:center;
  border:1px solid #d9e2ea;border-radius:50%;
  background:#f7fafc;color:#58718d;
  font-size:25px;cursor:pointer;
}
.editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.editor-subjects{margin-top:2px}
.budget-editor{
  margin-top:18px;
  padding:16px;
  border-radius:20px;
  background:#f5f8fc;
  border:1px solid #dfe8f0;
}
.budget-editor h3{margin:0 0 4px;font-size:18px}
.budget-editor .muted{margin:2px 0 0;line-height:1.4}
.profile-editor-actions{display:flex;gap:9px;justify-content:flex-end;margin-top:18px}

@media(max-width:800px){
  .usage-summary{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .usage-summary{grid-template-columns:1fr}
  .profile-card-actions .primary,.profile-card-actions .secondary{flex:1 1 140px}
  .profile-editor{width:calc(100% - 12px);max-height:96dvh}
  .profile-editor-card{max-height:96dvh;padding:17px;border-radius:22px}
  .profile-editor-head h2{font-size:23px}
  .editor-grid{grid-template-columns:1fr}
  .profile-editor-actions{position:sticky;bottom:-17px;padding:12px 0 17px;background:linear-gradient(180deg,rgba(255,253,249,0),#fffdf9 20%)}
  .profile-editor-actions .primary,.profile-editor-actions .secondary{flex:1}
}

.budget-alert{margin-top:7px;font-size:11px;line-height:1.35;color:#78633a}
.budget-high .budget-alert{color:#9a5d32}
.budget-over .budget-alert{color:#93474e;font-weight:750}


/* ===== Unified controls, icons and parent knowledge map ===== */
.primary,.secondary,.parent-btn,.profile-btn,.profile-action-btn{
  box-sizing:border-box;
}
.primary:disabled,.secondary:disabled,.profile-action-btn:disabled{
  opacity:.52;
  cursor:not-allowed;
}
.ui-icon{
  width:18px;
  height:18px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.education-chip .ui-icon{width:15px;height:15px}
.cost-warning{
  display:flex;
  align-items:flex-start;
  gap:6px;
}
.cost-warning .ui-icon{width:14px;height:14px;margin-top:1px}

.profile-grid{
  grid-template-columns:repeat(auto-fit,minmax(292px,1fr));
}
.profile-card-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-top:12px;
}
.profile-action-btn{
  min-width:0;
  height:var(--compact-control-height);
  padding:0 9px;
  border:1px solid #bdcde0;
  border-radius:14px;
  background:#f8fbff;
  color:#34577f;
  font-weight:780;
  font-size:11.5px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  line-height:1;
  white-space:nowrap;
}
.profile-action-btn .ui-icon{width:16px;height:16px}
.profile-action-btn:hover{background:#f0f6fc;border-color:#a9bdd4}
.profile-action-accent{
  background:#eef6ff;
  border-color:#9fbad8;
  color:#345f8b;
}

.editor-close{
  width:var(--compact-control-height);
  height:var(--compact-control-height);
  min-width:var(--compact-control-height);
  font-size:0;
}
.editor-close .ui-icon{width:20px;height:20px}

.learning-dialog{
  width:min(900px,calc(100% - 24px));
  max-height:min(92dvh,980px);
  border:0;
  padding:0;
  border-radius:30px;
  color:var(--ink);
  background:transparent;
  overflow:visible;
}
.learning-dialog::backdrop{
  background:rgba(39,57,79,.38);
  backdrop-filter:blur(4px);
}
.learning-dialog-card{
  max-height:min(92dvh,980px);
  overflow:auto;
  padding:24px;
  border-radius:30px;
  background:#fffdf9;
  border:1px solid rgba(255,255,255,.96);
  box-shadow:0 24px 70px rgba(50,61,78,.24);
}
.learning-dialog-head{margin-bottom:18px}
.learning-loading{
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#70849b;
  font-weight:700;
}
.learning-loader{
  width:34px;
  height:34px;
  border-radius:50%;
  border:3px solid #dfe9f3;
  border-top-color:#668fbd;
  animation:learning-spin .8s linear infinite;
}
@keyframes learning-spin{to{transform:rotate(360deg)}}

.knowledge-empty{
  text-align:center;
  padding:38px 18px 34px;
  border:1px dashed #d7e1ea;
  border-radius:22px;
  background:#fbfcfd;
}
.knowledge-empty-icon{
  width:58px;height:58px;
  margin:0 auto 12px;
  display:grid;place-items:center;
  border-radius:19px;
  background:#eef6ff;
  color:#5d82aa;
}
.knowledge-empty-icon .ui-icon{width:28px;height:28px}
.knowledge-empty h3{margin:0 0 8px;font-size:22px}
.knowledge-empty p{max-width:590px;margin:0 auto;color:#687d94;line-height:1.5}

.weekly-report{
  border:1px solid #e1e8ef;
  border-radius:24px;
  padding:19px;
  background:linear-gradient(145deg,#fbfdff,#f5f9fd);
}
.weekly-report-head,.knowledge-map-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.weekly-report h3,.knowledge-map-section h3{margin:2px 0 0;font-size:23px}
.report-calendar{
  display:inline-flex;align-items:center;gap:6px;
  min-height:36px;padding:0 10px;border-radius:12px;
  background:#fff;border:1px solid #dfe7ee;
  color:#66809b;font-size:12px;font-weight:780;
}
.report-calendar .ui-icon{width:15px;height:15px}
.weekly-summary{
  margin:13px 0 15px;
  line-height:1.5;
  color:#556f8c;
}
.report-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.report-metrics div{
  min-height:76px;
  padding:11px 12px;
  border-radius:16px;
  background:#fff;
  border:1px solid #e3eaf0;
}
.report-metrics b{display:block;font-size:22px;color:#34577f}
.report-metrics span{font-size:11px;color:#7b8da1;line-height:1.25}
.report-subjects{
  display:flex;align-items:center;gap:7px;flex-wrap:wrap;
  margin-top:12px;color:#788ca2;font-size:12px;
}
.report-subject-chip{
  padding:6px 9px;border-radius:999px;
  background:#fff;border:1px solid #dfe8f0;
  color:#55718e;font-weight:720;
}
.report-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:13px;
}
.report-list{
  padding:13px 14px;
  border-radius:17px;
  background:#fff;
  border:1px solid #e4e9ee;
}
.report-list h4{
  margin:0 0 8px;
  display:flex;align-items:center;gap:7px;
  font-size:14px;color:#466483;
}
.report-list ul{list-style:none;margin:0;padding:0;display:grid;gap:7px}
.report-list li{display:flex;align-items:flex-start;gap:7px;font-size:13px;line-height:1.35;color:#5e738b}
.report-list li .ui-icon{width:15px;height:15px;margin-top:1px}
.report-list p{margin:0;line-height:1.4}

.knowledge-map-section{margin-top:18px}
.knowledge-legend{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.knowledge-explainer{margin:8px 0 12px;line-height:1.45}
.knowledge-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:30px;
  padding:0 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.knowledge-status .ui-icon{width:14px;height:14px}
.knowledge-strong{background:#edf7ea;color:#52774a;border:1px solid #d4e8cf}
.knowledge-growing{background:#eef6ff;color:#51759a;border:1px solid #d7e6f5}
.knowledge-revisit{background:#fff5e5;color:#8a672e;border:1px solid #efdcb8}

.knowledge-subjects{display:grid;gap:9px}
.knowledge-subject{
  border:1px solid #e3e8ed;
  border-radius:18px;
  background:#fff;
  overflow:hidden;
}
.knowledge-subject summary{
  min-height:58px;
  padding:11px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  list-style:none;
}
.knowledge-subject summary::-webkit-details-marker{display:none}
.knowledge-subject summary::after{
  content:"";
  width:8px;height:8px;
  border-right:2px solid #8296aa;
  border-bottom:2px solid #8296aa;
  transform:rotate(45deg);
  transition:transform .16s ease;
  margin-left:4px;
  flex:0 0 auto;
}
.knowledge-subject[open] summary::after{transform:rotate(225deg)}
.knowledge-subject-name{display:flex;align-items:center;gap:8px;min-width:0}
.knowledge-subject-name .ui-icon{color:#6789ad}
.knowledge-subject-summary{margin-left:auto;color:#8393a5;font-size:11px;text-align:right}
.knowledge-topic-list{border-top:1px solid #edf0f3}
.knowledge-topic{
  min-height:58px;
  padding:10px 13px 10px 40px;
  display:flex;
  align-items:center;
  gap:10px;
  border-top:1px solid #f0f2f4;
}
.knowledge-topic:first-child{border-top:0}
.knowledge-topic-main{min-width:0;flex:1}
.knowledge-topic-title{font-size:14px;font-weight:760;color:#3f5d7c}
.knowledge-topic-meta{margin-top:3px;font-size:10.5px;color:#8998a8}
.knowledge-footnote{
  margin:16px 2px 0;
  padding-top:12px;
  border-top:1px solid #ebeef1;
  line-height:1.45;
}

@media(max-width:700px){
  .report-metrics{grid-template-columns:1fr 1fr}
  .report-columns{grid-template-columns:1fr}
  .weekly-report-head,.knowledge-map-head{flex-direction:column}
  .knowledge-legend{justify-content:flex-start}
}
@media(max-width:600px){
  .profile-grid{grid-template-columns:1fr}
  .profile-card-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .profile-action-btn{font-size:11px;padding:0 6px;gap:4px}
  .profile-action-btn .ui-icon{width:15px;height:15px}
  .learning-dialog{width:calc(100% - 10px);max-height:97dvh}
  .learning-dialog-card{max-height:97dvh;padding:16px;border-radius:22px}
  .weekly-report{padding:14px;border-radius:19px}
  .report-metrics div{min-height:69px}
  .knowledge-subject summary{align-items:flex-start;flex-wrap:wrap}
  .knowledge-subject-summary{order:3;width:100%;margin-left:26px;text-align:left}
  .knowledge-topic{padding-left:14px}
  .knowledge-topic .knowledge-status span{display:none}
  .knowledge-topic .knowledge-status{width:32px;padding:0}
}


/* ===== Site-wide icon polish ===== */
.brand,.info-brand,.overlay-brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.brand-paw-icon{
  width:25px;
  height:25px;
  flex:0 0 auto;
  fill:#d97d8b;
  stroke:none;
}
.brand-heart-icon{
  width:21px;
  height:21px;
  fill:none;
  stroke:#e56f7e;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.overlay-brand .brand-paw-icon{width:27px;height:27px}
.overlay-brand .brand-heart-icon{width:22px;height:22px}
.overlay-brand span{font-size:inherit}
.overlay-parent{gap:7px}
.overlay-parent .ui-icon{width:18px;height:18px}
.home-profile-avatar{font-size:0;color:#52779d}
.home-profile-avatar .ui-icon{width:17px;height:17px}
.info-brand .brand-paw-icon{width:23px;height:23px}

.info-card .emoji{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#f1f6fb;
  color:#5c7da1;
}
.info-card .emoji .ui-icon{width:25px;height:25px}
.info-card .emoji .brand-paw-icon{width:27px;height:27px}
.info-card h2{margin-top:11px}

.chat-gate-paw{
  width:52px;
  height:52px;
  margin:0 auto 8px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:#fff1f3;
}
.chat-gate-paw .brand-paw-icon{width:31px;height:31px}
.chat-back .ui-icon{width:20px;height:20px}
.chat-notice{
  display:flex;
  align-items:center;
  gap:7px;
}
.chat-notice .ui-icon{width:17px;height:17px;flex:0 0 auto}
.attachment-preview .pill{gap:6px}
.attachment-preview .pill .ui-icon{width:14px;height:14px}
.attachment-remove{
  font-size:0;
  display:grid;
  place-items:center;
}
.attachment-remove .ui-icon{width:17px;height:17px}
.new-chat-btn{gap:6px}
.new-chat-btn .ui-icon{width:17px;height:17px}

.profile-avatar-big{font-size:0;color:#5f7fa3}
.profile-avatar-icon{
  width:40px;
  height:40px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}

@media(max-width:600px){
  .profile-avatar-icon{width:32px;height:32px}
  .new-chat-btn span{display:none}
  .new-chat-btn .ui-icon{width:21px;height:21px}
  .new-chat-btn::after{content:none}
}


/* ===== Control alignment audit ===== */
.chat-back,.new-chat-btn{
  height:var(--compact-control-height);
  min-height:var(--compact-control-height);
}
.home-profile-chip,.overlay-parent,.info-nav-link{
  min-height:42px;
}
@media(max-width:600px){
  .new-chat-btn{color:#365a82}
}


/* ===== Mobile homepage equal actions + finished footer ===== */
.mobile-action-content,
.mobile-home-footer{display:none}

@media(max-width:900px){
  .template-page{
    min-height:100svh;
    display:flex;
    flex-direction:column;
    background:#fffaf2;
  }
  .template-stage{flex:0 0 auto}

  .template-hotspots .mode-explain,
  .template-hotspots .mode-homework,
  .template-hotspots .mode-curious,
  .template-hotspots .mode-camera{
    left:6.27%;
    width:87.46%;
    height:10.646%;
    border-radius:30px;
    overflow:visible;
    box-shadow:0 8px 20px rgba(49,88,136,.08);
  }
  .template-hotspots .mode-explain{top:41.328%;background:linear-gradient(100deg,#f9e4e9,#f7dde5)}
  .template-hotspots .mode-homework{top:52.572%;background:linear-gradient(100deg,#e5f2ff,#dcecff)}
  .template-hotspots .mode-curious{top:63.876%;background:linear-gradient(100deg,#e9f4e3,#dff0d7)}
  .template-hotspots .mode-camera{top:75.778%;background:linear-gradient(100deg,#eee7ff,#e2dcfa)}

  .mobile-action-content{
    display:grid;
    grid-template-columns:clamp(58px,11.5vw,86px) minmax(0,1fr) clamp(48px,9vw,68px);
    align-items:center;
    gap:clamp(10px,2.2vw,18px);
    width:100%;
    height:100%;
    padding:0 clamp(16px,3vw,26px);
    border:2px solid rgba(255,255,255,.76);
    border-radius:inherit;
    line-height:1.1;
  }
  .mobile-action-icon{
    width:clamp(56px,10.8vw,80px);
    height:clamp(56px,10.8vw,80px);
    display:grid;
    place-items:center;
    color:#315887;
  }
  .mobile-action-icon svg{
    width:100%;
    height:100%;
    fill:none;
    stroke:currentColor;
    stroke-width:3.2;
    stroke-linecap:round;
    stroke-linejoin:round;
    filter:drop-shadow(0 2px 0 rgba(255,255,255,.55));
  }
  .mode-explain .mobile-action-icon{color:#9d3658}
  .mode-homework .mobile-action-icon{color:#1c5ea6}
  .mode-curious .mobile-action-icon{color:#1f6b52}
  .mode-camera .mobile-action-icon{color:#5546aa}

  .mobile-action-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    color:#254f83;
  }
  .mobile-action-copy b{
    display:block;
    font-size:clamp(23px,5.1vw,39px);
    font-weight:900;
    letter-spacing:-.035em;
    white-space:nowrap;
  }
  .mode-camera .mobile-action-copy b{
    font-size:clamp(19px,4.35vw,33px);
  }
  .mobile-action-copy small{
    display:block;
    margin-top:clamp(3px,.8vw,7px);
    color:#49698f;
    font-size:clamp(13px,2.9vw,21px);
    font-weight:650;
    white-space:nowrap;
  }
  .mobile-action-arrow{
    width:clamp(46px,8.5vw,64px);
    height:clamp(46px,8.5vw,64px);
    border-radius:50%;
    display:grid;
    place-items:center;
    justify-self:end;
    color:#214f82;
    background:rgba(255,255,255,.28);
  }
  .mobile-action-arrow svg{
    width:52%;
    height:52%;
    fill:none;
    stroke:currentColor;
    stroke-width:2.5;
    stroke-linecap:round;
    stroke-linejoin:round;
  }

  /* Keep interaction feedback inside the new equal-size cards. */
  .template-hotspots .mode-explain::before,
  .template-hotspots .mode-homework::before,
  .template-hotspots .mode-curious::before,
  .template-hotspots .mode-camera::before{
    inset:2px;
    border-radius:inherit;
  }

  .mobile-home-footer{
    position:relative;
    width:min(100%,941px);
    min-height:clamp(165px,29vw,230px);
    margin:-1px auto 0;
    display:flex;
    flex:1 0 auto;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:
      radial-gradient(circle at 50% 0,rgba(255,255,255,.7),transparent 43%),
      linear-gradient(180deg,#fffaf2 0%,#fff8ee 62%,#f9f2e8 100%);
    color:#5575a0;
  }
  .mobile-footer-note{
    position:relative;
    z-index:2;
    max-width:68%;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:12px 18px;
    border:1px solid rgba(141,177,211,.34);
    border-radius:999px;
    background:rgba(255,255,255,.54);
    box-shadow:0 7px 20px rgba(69,91,119,.06);
    font-size:clamp(12px,2.8vw,19px);
    font-weight:800;
    line-height:1.25;
    text-align:center;
  }
  .mobile-footer-paw{
    width:clamp(22px,5vw,34px);
    height:clamp(22px,5vw,34px);
    flex:0 0 auto;
    fill:#d97d8b;
  }
  .mobile-footer-star{
    width:clamp(20px,4.5vw,31px);
    height:clamp(20px,4.5vw,31px);
    flex:0 0 auto;
    fill:none;
    stroke:#e7aa32;
    stroke-width:1.8;
    stroke-linejoin:round;
  }
  .mobile-footer-sprig{
    position:absolute;
    bottom:-12px;
    width:clamp(105px,26vw,190px);
    height:auto;
    fill:#d9e8cc;
    stroke:#78a066;
    stroke-width:3;
    stroke-linecap:round;
    stroke-linejoin:round;
    opacity:.88;
  }
  .mobile-footer-sprig-left{left:-18px}
  .mobile-footer-sprig-right{right:-18px}
}

@media(max-width:420px){
  .mobile-action-content{
    grid-template-columns:52px minmax(0,1fr) 44px;
    gap:8px;
    padding:0 12px;
  }
  .mobile-action-icon{width:50px;height:50px}
  .mobile-action-copy b{font-size:22px}
  .mode-camera .mobile-action-copy b{
    font-size:18px;
    line-height:1.02;
    white-space:normal;
  }
  .mobile-action-copy small{
    font-size:12px;
    line-height:1.12;
    white-space:normal;
  }
  .mode-camera .mobile-action-copy small{display:none}
  .mobile-action-arrow{width:42px;height:42px}
  .mobile-footer-note{max-width:74%;padding:10px 13px}
}

/* Chat attachment controls: same square geometry on every phone width. */
@media(max-width:800px){
  .chat-page .composer-tools .composer-icon{
    width:42px;
    min-width:42px;
    height:42px;
    min-height:42px;
    border-radius:13px;
  }
}
@media(max-width:420px){
  .chat-page .composer-tools .composer-icon{
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
  }
}
/* ===== End mobile homepage equal actions + finished footer ===== */


/* ===== Final equal camera/microphone controls ===== */
@media(max-width:800px){
  .chat-page .composer-tools .composer-icon{
    box-sizing:border-box;
    width:42px;
    min-width:42px;
    max-width:42px;
    height:42px;
    min-height:42px;
    max-height:42px;
    flex:0 0 42px;
    padding:0;
    border-radius:13px;
  }
}
@media(max-width:420px){
  .chat-page .composer-tools .composer-icon{
    width:40px;
    min-width:40px;
    max-width:40px;
    height:40px;
    min-height:40px;
    max-height:40px;
    flex:0 0 40px;
  }
}
/* ===== End final equal camera/microphone controls ===== */


/* ===== Mobile form containment + rounded interaction audit ===== */

/* Grid/flex children must be allowed to shrink instead of forcing a horizontal overflow. */
.field,
.editor-grid,
.budget-editor,
.profile-editor-card,
.learning-dialog-card,
.setup-card,
.box,
.profile-card,
.profile-card-main,
.onboarding-grid,
.profile-actions,
.info-card,
.info-hero,
.admin-claim{
  min-width:0;
  max-width:100%;
}

.editor-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  width:100%;
}

.field > input:not([type="checkbox"]):not([type="radio"]),
.field > select,
.field > textarea{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
}

.field > select{
  text-overflow:ellipsis;
}

.budget-editor{
  width:100%;
  overflow:hidden;
}
.budget-editor .editor-grid{
  width:100%;
  min-width:0;
}
.budget-editor .field{
  width:100%;
  min-width:0;
}

.subject-grid,
.choice-grid{
  min-width:0;
  max-width:100%;
}
.subject-choice,
.choice-card{
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
}

/* Dialog content scrolls only vertically; form controls may never create a side scroll. */
.profile-editor-card,
.learning-dialog-card{
  overflow-x:hidden;
  overflow-y:auto;
}

@media(max-width:600px){
  .editor-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .profile-editor,
  .learning-dialog{
    max-width:calc(100vw - 10px);
  }
  .profile-editor-card,
  .learning-dialog-card{
    width:100%;
    max-width:100%;
  }
  .budget-editor{
    padding:14px;
  }
}

/* Android/Chrome otherwise paints a rectangular tap flash around rounded controls. */
button,
a,
label,
input,
select,
textarea{
  -webkit-tap-highlight-color:transparent;
}

:where(
  .primary,
  .secondary,
  .parent-btn,
  .profile-btn,
  .profile-action-btn,
  .info-primary,
  .info-secondary,
  .info-nav-link,
  .nav-chip,
  .home-profile-chip,
  .overlay-parent,
  .chat-back,
  .new-chat-btn,
  .composer-icon,
  .paw-send,
  .editor-close,
  .choice-card,
  .subject-choice
){
  touch-action:manipulation;
}

:where(
  .primary,
  .secondary,
  .parent-btn,
  .profile-btn,
  .profile-action-btn,
  .info-primary,
  .info-secondary,
  .info-nav-link,
  .nav-chip,
  .home-profile-chip,
  .overlay-parent,
  .chat-back,
  .new-chat-btn,
  .composer-icon,
  .paw-send,
  .editor-close,
  .choice-card,
  .subject-choice
):active{
  filter:brightness(.96);
}

/* Keyboard focus follows the rounded control instead of a rectangular browser outline. */
:where(
  .primary,
  .secondary,
  .parent-btn,
  .profile-btn,
  .profile-action-btn,
  .info-primary,
  .info-secondary,
  .info-nav-link,
  .nav-chip,
  .home-profile-chip,
  .overlay-parent,
  .chat-back,
  .new-chat-btn,
  .composer-icon,
  .paw-send,
  .editor-close,
  .choice-card,
  .subject-choice
):focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(95,137,185,.22);
}
form,
.profile-editor-actions,
.setup-actions,
.info-actions,
.parent-auth-actions,
.admin-actions{
  min-width:0;
  max-width:100%;
}

/* ===== End mobile form containment + rounded interaction audit ===== */


/* ===== Denser assistant text on tablets and phones ===== */
@media(max-width:1180px){
  .chat-page .bubble.assistant{
    line-height:1.36;
  }
}
@media(max-width:800px){
  .chat-page .bubble.assistant{
    line-height:1.34;
  }
}
/* ===== End denser assistant text ===== */


/* ===== Fit mobile homepage to the visible phone viewport ===== */
@media(max-width:600px) and (orientation:portrait){
  .template-home{
    min-height:100dvh;
    height:100dvh;
    overflow:hidden;
  }
  .template-page{
    min-height:100dvh;
    height:100dvh;
    overflow:hidden;
  }

  /*
   * The mobile artwork is 941 × 1672 (height = 177.6833vw).
   * Use only the actual viewport remainder for the decorative footer,
   * instead of forcing the old 165–230px minimum that caused scrolling.
   */
  .mobile-home-footer{
    flex:0 0 auto;
    min-height:0;
    height:clamp(48px,calc(100dvh - 177.6833vw),112px);
    max-height:112px;
    margin:-1px auto 0;
  }
  .mobile-footer-note{
    max-width:78%;
    min-height:38px;
    padding:7px 12px;
    gap:7px;
    font-size:clamp(10px,2.8vw,13px);
    line-height:1.15;
  }
  .mobile-footer-paw{
    width:22px;
    height:22px;
  }
  .mobile-footer-star{
    width:20px;
    height:20px;
  }
  .mobile-footer-sprig{
    bottom:-30px;
    width:clamp(78px,20vw,110px);
    opacity:.72;
  }
  .mobile-footer-sprig-left{left:-24px}
  .mobile-footer-sprig-right{right:-24px}
}

@media(max-width:600px) and (orientation:portrait) and (max-height:700px){
  .mobile-home-footer{
    height:clamp(40px,calc(100dvh - 177.6833vw),72px);
  }
  .mobile-footer-note{
    min-height:34px;
    padding:5px 10px;
    font-size:10px;
  }
  .mobile-footer-sprig{display:none}
}
/* ===== End fit mobile homepage to viewport ===== */


/* ===== Responsive wide desktop chat ===== */
@media(min-width:801px){
  .chat-shell{
    width:min(92vw,1480px);
    max-width:none;
    padding-left:14px;
    padding-right:14px;
  }

  .chat-topbar .topbar-inner{
    width:min(92vw,1480px);
    max-width:none;
    margin-left:auto;
    margin-right:auto;
    padding-left:14px;
    padding-right:14px;
  }

  .chat-box{
    padding:18px 20px;
  }

  /* Keep reading measure comfortable even when the chat canvas is wide. */
  .chat-page .bubble{
    max-width:min(76%,980px);
  }
  .chat-page .bubble.user{
    max-width:min(68%,820px);
  }

  .chat-page .messages{
    padding-left:4px;
    padding-right:4px;
  }
}

@media(min-width:1500px){
  .chat-shell,
  .chat-topbar .topbar-inner{
    width:min(88vw,1560px);
  }

  .chat-box{
    padding-left:22px;
    padding-right:22px;
  }
}
/* ===== End responsive wide desktop chat ===== */


/* ===== Final desktop composer balance ===== */
@media(min-width:801px){
  .chat-page .compact-composer{
    grid-template-columns:48px minmax(0,1fr) 58px;
    align-items:center;
  }

  .chat-page .composer-tools{
    align-self:center;
    justify-self:center;
    align-items:center;
  }

  .chat-page .composer-tools .composer-icon{
    box-sizing:border-box;
    width:48px;
    min-width:48px;
    max-width:48px;
    height:40px;
    min-height:40px;
    max-height:40px;
    flex:0 0 40px;
    padding:0;
  }

  .chat-page .paw-send{
    align-self:center;
    justify-self:center;
    margin:0;
  }
}
/* ===== End final desktop composer balance ===== */


/* ===== Dense chat text on every screen ===== */
.chat-page .bubble.assistant{
  line-height:1.34;
}
@media(max-width:800px){
  .chat-page .bubble.assistant{
    line-height:1.32;
  }
}
/* ===== End dense chat text ===== */
