/* Shule by StadiPlus: friendly, big tap targets, Forest & Gold */
:root {
  --green: #0E5A43; --green-dark: #08402F; --green-tint: #E3F0EA; --gold: #F4B740; --gold-tint: #FFF4DC;
  --ink: #14201B; --muted: #5A6A62; --line: #E1E6E2; --bg: #F6F8F5; --card: #fff; --danger: #B42318;
  --radius: 18px; --head: "Outfit", system-ui, sans-serif; --body: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 24px; font-weight: 700; }
p { margin: 0; }
.sh-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .sh-wrap { padding: 0 16px; } }
.sh-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.sh-stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sh-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.sh-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.sh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.sh-mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(145deg, #17785A, var(--green)); color: #fff; font: 800 26px/1 var(--head); display: flex; align-items: center; justify-content: center; position: relative; }
.sh-mark b { color: var(--gold); font-size: 15px; position: absolute; top: 4px; right: 5px; }
.sh-word { font: 800 24px/1 var(--head); letter-spacing: -.02em; display: flex; flex-direction: column; }
.sh-word small { font: 600 11px/1.4 var(--body); color: var(--muted); letter-spacing: .02em; }
.sh-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sh-link { font-weight: 600; text-decoration: none; color: var(--ink); }
.sh-link:hover { color: var(--green); }
.sh-hello { color: var(--muted); font-size: 14px; }
.sh-nav form { margin: 0; }

.sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; font: 700 16px var(--body); text-decoration: none; cursor: pointer; background: var(--green); color: #fff; }
.sh-btn:hover { background: var(--green-dark); color: #fff; }
.sh-btn-gold { background: var(--gold); color: var(--ink); } .sh-btn-gold:hover { background: #E9A92E; color: var(--ink); }
.sh-btn-ghost { background: transparent; color: var(--green); border: 1.5px solid #C9D3CD; } .sh-btn-ghost:hover { background: var(--green-tint); color: var(--green); }
.sh-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.sh-btn-lg { min-height: 58px; padding: 0 30px; font-size: 18px; border-radius: 16px; }
.sh-btn-danger { background: transparent; color: var(--danger); border: 1.5px solid #F2C4BF; }
.sh-btn:disabled { opacity: .55; cursor: not-allowed; }
.sh-linkbtn { background: none; border: 0; color: var(--green); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

.sh-flash { margin-top: 16px; background: var(--green-tint); color: var(--green-dark); padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.sh-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.sh-page { padding: 32px 0 56px; }
.sh-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.sh-input { width: 100%; min-height: 50px; border: 1.5px solid #CCD5CF; border-radius: 12px; padding: 10px 14px; font: 500 16px var(--body); background: #fff; color: var(--ink); }
.sh-input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(14,90,67,.15); }
.sh-hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.sh-error { color: var(--danger); font-size: 14px; font-weight: 600; }
.sh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.sh-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.sh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sh-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .sh-grid2, .sh-grid3 { grid-template-columns: 1fr; } }

/* landing */
.sh-hero { background: radial-gradient(1200px 500px at 85% 10%, rgba(244,183,64,.18), transparent 60%), linear-gradient(160deg, #0A4C38, var(--green) 55%, #137053); color: #fff; overflow: hidden; }
.sh-hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding-top: 48px; }
.sh-hero h1 span { color: var(--gold); }
.sh-hero .lead { font-size: 19px; color: #D8EBE2; margin: 18px 0 26px; max-width: 560px; }
.sh-hero-img { align-self: end; display: flex; justify-content: center; }
.sh-hero-img img { width: min(440px, 100%); height: auto; display: block; filter: drop-shadow(0 20px 40px rgba(0,0,0,.25)); }
.sh-bubble { position: relative; background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 18px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.2); max-width: 330px; }
.sh-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-bottom: 40px; }
.sh-pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
@media (max-width: 820px) { .sh-hero-in { grid-template-columns: 1fr; padding-top: 32px; } .sh-hero-img img { width: 280px; } .sh-pills { padding-bottom: 8px; } }
.sh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.sh-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sh-step b { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); align-items: center; justify-content: center; font-family: var(--head); margin-bottom: 10px; }
@media (max-width: 820px) { .sh-steps { grid-template-columns: 1fr; } }

/* login */
.sh-auth { max-width: 520px; margin: 0 auto; }
.sh-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #EAF0EC; border-radius: 16px; padding: 5px; margin-bottom: 18px; }
.sh-tabs button { border: 0; background: transparent; min-height: 52px; border-radius: 12px; font: 700 16px var(--body); color: var(--muted); cursor: pointer; }
.sh-tabs button[aria-selected="true"] { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sh-pin { letter-spacing: .5em; font-size: 26px; text-align: center; font-family: var(--head); }

/* parent dashboard */
.sh-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.sh-kid { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sh-kid-top { display: flex; gap: 12px; align-items: center; }
.sh-face { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font: 800 22px var(--head); color: #fff; flex: none; }
.sh-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--green-tint); color: var(--green-dark); }
.sh-chip-gold { background: var(--gold-tint); color: #6B4400; }
.sh-chip-red { background: #FDECEA; color: var(--danger); }
.sh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.sh-stats div { background: var(--bg); border-radius: 12px; padding: 8px 4px; }
.sh-stats strong { display: block; font: 800 20px var(--head); }
.sh-stats span { font-size: 12px; color: var(--muted); }
.sh-add { border: 2px dashed #C6D2CB; background: transparent; align-items: center; justify-content: center; text-align: center; min-height: 220px; text-decoration: none; color: var(--green); font-weight: 700; }
.sh-add:hover { background: #fff; }
.sh-table { width: 100%; border-collapse: collapse; }
.sh-table td, .sh-table th { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; vertical-align: top; }
.sh-table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.sh-tablewrap { overflow-x: auto; }

/* transcript */
.sh-chatlog { display: flex; flex-direction: column; gap: 12px; }
.sh-msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; line-height: 1.5; }
.sh-msg.me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 6px; }
.sh-msg.tutor { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.sh-msg.flag { box-shadow: 0 0 0 2px #F5B4AD; }
.sh-msg time { display: block; font-size: 11.5px; opacity: .7; margin-top: 4px; }

/* learner home */
.is-learner { background: linear-gradient(180deg, #EAF4EE 0, var(--bg) 360px); }
.sh-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sh-subject { position: relative; border-radius: 22px; padding: 20px; color: #fff; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 24px rgba(20,32,27,.12); overflow: hidden; border: 0; text-align: left; cursor: pointer; font: inherit; }
.sh-subject .ic { font-size: 40px; line-height: 1; }
.sh-subject .nm { font: 800 21px/1.15 var(--head); }
.sh-subject::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.14); }
.sh-subject:hover { transform: translateY(-2px); }
.sh-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sh-mode { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 16px; text-align: left; cursor: pointer; font: inherit; }
.sh-mode[aria-pressed="true"] { border-color: var(--green); background: var(--green-tint); }
.sh-mode .ic { font-size: 28px; } .sh-mode strong { display: block; font: 700 18px var(--head); margin-top: 4px; }
@media (max-width: 640px) {
  .sh-modes { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sh-mode { padding: 10px 8px; text-align: center; border-radius: 14px; }
  .sh-mode .ic { font-size: 24px; } .sh-mode strong { font-size: 14px; } .sh-mode .small { display: none; }
  .sh-subjects { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sh-subject { min-height: 118px; padding: 14px; border-radius: 18px; } .sh-subject .ic { font-size: 30px; } .sh-subject .nm { font-size: 16px; }
}
.sh-time { height: 12px; border-radius: 8px; background: #DDE6E0; overflow: hidden; }
.sh-time span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #2E9C77); }

/* tutor */
.sh-tutor { display: grid; grid-template-columns: minmax(300px, 44%) minmax(0, 1fr); gap: 0; height: calc(100dvh - 69px); }
.sh-stage { position: relative; background: radial-gradient(600px 400px at 50% 30%, #FFFFFF, #E4EFE8 70%); overflow: hidden; }
.sh-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.sh-stage-top { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 2; }
.sh-subj-tag { background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.sh-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 600; }
.sh-bar-load { width: 180px; height: 8px; border-radius: 6px; background: #D5E2DA; overflow: hidden; } .sh-bar-load span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.sh-tap { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.sh-caption { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(20,32,27,.82); color: #fff; padding: 10px 14px; border-radius: 14px; font-size: 15px; max-height: 30%; overflow: auto; z-index: 2; }
.sh-chat { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.sh-chat .sh-chatlog { flex: 1; overflow-y: auto; padding: 18px 20px; }
.sh-compose { border-top: 1px solid var(--line); background: #fff; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: flex-end; }
.sh-compose textarea { flex: 1; resize: none; min-height: 52px; max-height: 140px; border: 1.5px solid #CCD5CF; border-radius: 16px; padding: 13px 16px; font: 500 16px var(--body); }
.sh-round { width: 52px; height: 52px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; font-size: 22px; }
.sh-mic { background: var(--gold-tint); color: #6B4400; } .sh-mic.on { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.sh-send { background: var(--green); color: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(180,35,24,.4); } 50% { box-shadow: 0 0 0 10px rgba(180,35,24,0); } }
.sh-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 10px; }
.sh-quick button { border: 1.5px solid #C9D3CD; background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 14px var(--body); cursor: pointer; color: var(--ink); }
.sh-replay { background: none; border: 0; color: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 0 0; }
.sh-typing span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #9AABA2; animation: bounce 1s infinite; }
.sh-typing span:nth-child(2) { animation-delay: .15s; } .sh-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@media (max-width: 860px) {
  .sh-tutor { grid-template-columns: minmax(0, 1fr); grid-template-rows: 38dvh minmax(0, 1fr); }
  .sh-caption { display: none; }
}
.sh-footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; margin-top: 40px; font-size: 14px; color: var(--muted); }
.sh-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* phones */
.sh-compose textarea { min-width: 0; }
.sh-subj-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 640px) {
  .sh-bar { min-height: 58px; flex-wrap: nowrap; }
  .sh-word { font-size: 21px; } .sh-word small { display: none; }
  .sh-mark { width: 36px; height: 36px; font-size: 23px; }
  .sh-nav { gap: 10px; flex-wrap: nowrap; }
  .sh-hello, .is-learner .sh-link, .sh-nav .sh-link-desktop { display: none; }
  .sh-nav .sh-btn-gold.sh-btn-sm { padding: 0 10px; font-size: 13px; }
  .sh-tutor { height: calc(100dvh - 59px); }
  .sh-stage-top { left: 10px; right: 10px; top: 10px; }
  .sh-stage-top .sh-btn-sm { min-height: 34px; padding: 0 10px; }
  .sh-back-text { display: none; }
  .sh-subj-tag { font-size: 13px; padding: 5px 10px; }
  .sh-tap { bottom: 12px; min-height: 46px; font-size: 15px; padding: 0 16px; white-space: nowrap; }
  .sh-chat .sh-chatlog { padding: 14px; }
  .sh-quick { padding: 0 14px 8px; flex-wrap: nowrap; overflow-x: auto; }
  .sh-quick button { white-space: nowrap; }
  .sh-compose { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .sh-round { width: 46px; height: 46px; font-size: 19px; }
  .sh-msg { max-width: 90%; }
}
