/* App layer on top of app.css: illustrated headers, depth, motion, navigation. */
body{background:
  radial-gradient(1200px 500px at 50% -120px, #DDE4EE 0%, rgba(221,228,238,0) 70%),
  var(--ground);min-height:100vh}
.shell{padding-bottom:104px}

/* --- hero */
.hero{position:relative;overflow:hidden;margin:0 -14px 0;padding:18px 20px 66px;color:#fff;
  border-radius:0 0 28px 28px;
  background:linear-gradient(155deg,#1C2541 0%,#27336A 58%,#43305F 100%)}
.hero.tone-family{background:linear-gradient(155deg,#1C2541 0%,#3A2A52 55%,#7A2C33 100%)}
.hero.tone-teach{background:linear-gradient(155deg,#172038 0%,#1F3A4A 55%,#35583F 100%)}
.hero-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12.5px;color:#C3CBDD;margin-bottom:14px;position:relative;z-index:2}
.hero-top a,.hero-top button{color:#fff;font:inherit;background:rgba(255,255,255,.12);border:0;border-radius:999px;
  padding:5px 12px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.hero-top svg{width:15px;height:15px}
.hero-body{position:relative;z-index:2;padding-right:104px;min-height:84px}
.hero .kicker{font-size:12.5px;color:#C9D0E2;margin:0}
.hero h1{font-size:30px;font-weight:700;margin:2px 0 0;letter-spacing:-.01em;line-height:1.2}
.hero h1 span{display:block;font-size:19px;font-weight:300;color:#D9DEEC;margin-top:1px}
.hero .sub{font-size:13.5px;color:#C9D0E2;margin:8px 0 0;font-weight:300}
.hero-emblem{position:absolute;right:14px;top:40px;width:112px;height:112px;z-index:2}
.hero-emblem svg{width:100%;height:100%;display:block;filter:drop-shadow(0 8px 14px rgba(0,0,0,.28))}
.hero-ridge{position:absolute;left:0;right:0;bottom:0;width:100%;height:96px;z-index:1;display:block}
.hero-sun{position:absolute;right:54px;top:26px;width:92px;height:92px;border-radius:50%;z-index:0;
  background:radial-gradient(circle,rgba(192,138,46,.55) 0%,rgba(192,138,46,.16) 55%,rgba(192,138,46,0) 72%)}
.lift{margin-top:-44px;position:relative;z-index:3}
@media (prefers-reduced-motion:no-preference){
  .hero-emblem{animation:bob 5s ease-in-out infinite}
  @keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
}

/* --- cards and headings */
.card{border-radius:18px;box-shadow:0 1px 2px rgba(28,37,65,.05),0 10px 26px -14px rgba(28,37,65,.22)}
.head{display:flex;align-items:center;gap:11px;margin:0 0 12px}
.head .ico{flex:none;width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#EEF1F7;color:var(--ink)}
.head .ico svg{width:20px;height:20px}
.head .ico.moss{background:#E7EFE8;color:var(--moss)}
.head .ico.brass{background:#F8EEDB;color:#9A6C1C}
.head .ico.madder{background:#F7E9E7;color:var(--madder)}
.head .ico.clay{background:#F7EAE5;color:var(--clay)}
.head h2{font-size:16px;font-weight:600;margin:0;line-height:1.25}
.head p{font-size:12.5px;color:var(--ink-3);font-weight:300;margin:0}
.head .count{margin-left:auto;font-size:12.5px;font-weight:600;color:var(--ink-2);background:var(--wash);border-radius:999px;padding:3px 10px;white-space:nowrap}
svg.i{width:18px;height:18px;flex:none;vertical-align:-3px}

/* --- touch feedback */
button,.btn,.post,.chip,.navcard{transition:transform .12s ease,background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease}
button:active:not(:disabled),.btn:active,.post:active:not(:disabled),.navcard:active{transform:scale(.97)}
.att button{border-radius:999px;padding:8px 13px 8px 9px;display:inline-flex;align-items:center;gap:7px}
.att button .tick{width:18px;height:18px;border-radius:50%;background:var(--moss);display:grid;place-items:center;color:#fff}
.att button .tick svg{width:12px;height:12px}
.att button[data-here="false"] .tick{background:var(--rule);color:transparent}
.mastery button{position:relative;overflow:hidden}
.mastery button[aria-pressed="true"]{box-shadow:0 6px 14px -6px rgba(28,37,65,.45)}
@media (prefers-reduced-motion:no-preference){
  .mastery button[aria-pressed="true"]{animation:pop .28s cubic-bezier(.2,1.4,.4,1)}
  @keyframes pop{0%{transform:scale(.9)}100%{transform:scale(1)}}
  .card{animation:cardin .32s ease-out both}
  @keyframes cardin{from{opacity:0;transform:translateY(8px)}}
  .photo img,.thumbs img{animation:fade .3s ease-out}
  @keyframes fade{from{opacity:0}}
}
.pupil .donemark{display:none;width:18px;height:18px;border-radius:50%;background:var(--moss);color:#fff;place-items:center;margin-left:7px;vertical-align:-3px}
.pupil .donemark svg{width:12px;height:12px}
.pupil.done .donemark{display:inline-grid}

.addphoto{position:relative;flex-direction:column}
.addphoto svg{width:22px;height:22px}
.savebar{margin-top:6px}

/* --- progress */
.meter{height:8px;background:#E4E9E8;border-radius:5px;overflow:hidden;margin:0 0 14px}
.meter i{display:block;height:100%;background:linear-gradient(90deg,var(--brass),var(--moss));border-radius:5px;transition:width .35s ease}
.ring{position:relative;width:92px;height:92px;flex:none}
.ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:9;stroke-linecap:round}
.ring .bg{stroke:#E4E9E8}
.ring .fg{stroke:var(--moss)}
.ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:22px;font-weight:700;letter-spacing:-.02em}
.statrow{display:flex;align-items:center;gap:16px}
.statrow p{margin:0;font-size:14px;color:var(--ink-2);line-height:1.4}
.statrow p b{display:block;font-size:17px;color:var(--ink);font-weight:600}

/* --- date tile, pills, list rows */
.datetile{flex:none;width:52px;border-radius:12px;overflow:hidden;text-align:center;background:var(--card);
  box-shadow:0 0 0 1px var(--rule);line-height:1.1}
.datetile span{display:block;background:var(--madder);color:#fff;font-size:11px;font-weight:600;padding:3px 0 2px}
.datetile b{display:block;font-size:21px;font-weight:700;padding:5px 0 6px}
.pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;border-radius:999px;padding:3px 10px;background:var(--wash);color:var(--ink-2)}
.pill.ok{background:#E7EFE8;color:var(--moss)}
.pill.warn{background:#F8EEDB;color:#8A5F16}
.pill.hot{background:#F7E9E7;color:var(--madder)}
.navcard{display:flex;align-items:center;gap:13px;padding:13px 0;border-top:1px solid var(--rule);text-decoration:none;color:inherit}
.navcard:first-of-type{border-top:0;padding-top:2px}
.navcard .mid{flex:1;min-width:0}
.navcard .mid b{display:block;font-size:16px;font-weight:600;line-height:1.3}
.navcard .mid span{display:block;font-size:12.5px;color:var(--ink-3)}
.navcard .mid span.pill{display:inline-flex}
.navcard .go{flex:none;width:30px;height:30px;border-radius:50%;background:var(--wash);display:grid;place-items:center;color:var(--ink-2)}
.navcard .go svg{width:16px;height:16px}
.avatar{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:19px;font-weight:600;
  background:linear-gradient(140deg,var(--brass),var(--clay))}
.typeico{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#EEF1F7;color:var(--ink)}
.typeico svg{width:18px;height:18px}
.typeico.t-write{background:#F7EAE5;color:var(--clay)}
.typeico.t-speak{background:#E7EFE8;color:var(--moss)}
.typeico.t-practice{background:#F8EEDB;color:#9A6C1C}
.hwitem{align-items:flex-start}
.nextclass{display:flex;align-items:center;gap:13px}
.nextclass p{margin:0;font-size:14px;color:var(--ink-2);line-height:1.4}
.nextclass p b{display:block;color:var(--ink);font-size:16px}

/* --- bottom navigation and action dock */
.tabbar,.dock{position:fixed;left:0;right:0;bottom:0;z-index:30;background:rgba(255,255,255,.92);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid var(--rule);
  padding:8px 14px calc(8px + env(safe-area-inset-bottom))}
.tabbar nav{max-width:440px;margin:0 auto;display:flex;gap:4px}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;text-decoration:none;font-size:11.5px;font-weight:500;
  color:var(--ink-3);padding:6px 2px;border-radius:12px}
.tabbar a svg{width:22px;height:22px}
.tabbar a[aria-current="page"]{color:var(--ink);background:#EEF1F7;font-weight:600}
.dock .inner{max-width:440px;margin:0 auto}
.dock .post{box-shadow:0 10px 22px -10px rgba(158,43,43,.7)}
.dock .post:disabled{box-shadow:none}
.dock .post-note{margin:6px 0 0}
.post{display:flex;align-items:center;justify-content:center;gap:9px;border-radius:14px}
.post svg{width:20px;height:20px}
.cbtns button,.cbtns a{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:14px}
.cbtns svg{width:18px;height:18px}
.cbtns .wa{background:#1F8F4E;color:#fff}

/* --- the message preview reads like a chat bubble */
.bubblewrap{background:#E6DFD3;border-radius:16px;padding:14px 12px}
textarea.msg{background:#E3F5D5;border:0;border-radius:4px 16px 16px 16px;box-shadow:0 1px 1px rgba(0,0,0,.12);min-height:44vh}

/* --- photo viewer */
dialog.viewer{border:0;padding:0;background:transparent;max-width:100vw;max-height:100vh;width:100vw;height:100vh}
dialog.viewer::backdrop{background:rgba(15,20,36,.92)}
dialog.viewer img{position:absolute;inset:0;margin:auto;max-width:96vw;max-height:88vh;border-radius:10px;display:block}
dialog.viewer button{position:absolute;top:14px;right:14px;width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:22px;cursor:pointer}
.thumbs a{box-shadow:0 4px 10px -6px rgba(28,37,65,.5)}

@media (min-width:700px){
  .shell,.shell.wide{max-width:520px}
  .hero{margin:0;border-radius:28px}
  .tabbar nav,.dock .inner{max-width:520px}
}

/* --- school photo gallery */
.gallery-card{padding-right:0}
.gallery-card .head{padding-right:16px}
.gallery{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 16px 6px 0;
  -webkit-overflow-scrolling:touch;scrollbar-width:none}
.gallery::-webkit-scrollbar{display:none}
.shot{position:relative;display:block;flex:none;height:190px;border-radius:14px;overflow:hidden;scroll-snap-align:start;
  background:var(--wash);box-shadow:0 6px 14px -8px rgba(28,37,65,.5)}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
.shot span{position:absolute;left:0;right:0;bottom:0;padding:18px 10px 7px;color:#fff;font-size:12.5px;font-weight:500;line-height:1.3;
  background:linear-gradient(transparent,rgba(15,20,36,.78))}
.photo-edit .shot{height:auto;width:100%;max-height:300px;margin-bottom:4px}
.switchrow{display:flex;gap:11px;align-items:flex-start;padding:12px 0 0;cursor:pointer}
.switchrow input{appearance:none;-webkit-appearance:none;flex:none;width:46px;height:28px;border-radius:999px;background:#C4CBCA;
  position:relative;cursor:pointer;transition:background-color .18s ease;margin:1px 0 0}
.switchrow input::after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .18s ease}
.switchrow input:checked{background:var(--moss)}
.switchrow input:checked::after{transform:translateX(18px)}
.switchrow span{font-size:13px;color:var(--ink-3);line-height:1.4}
.switchrow span b{display:block;font-size:15px;color:var(--ink);font-weight:600}
.head a.count{text-decoration:none;color:var(--ink)}
