:root {
  --bg: #f4f8f5; --card: #ffffff; --ink: #1d3330; --muted: #4f625e; --line: #dbe5e0;
  --green: #1f6b5a; --green-2: #dcf2ea; --mint: #bfeee0; --lilac: #e4dcfa; --lilac-ink: #5b45a8; --ok: #2c7a4b; --ok-bg: #e2f2e5; --warm: #9a4f12; --warm-bg: #fcefdc;
  --read: #2f5d8a; --read-bg: #e8f0fa; --math: #b0561a; --math-bg: #fcecdc; --write: #8a3a6c; --write-bg: #f7e6f0; --ch: #5b45a8; --ch-bg: #ece6fa;
  --frac: #f2b84b; --area: #bfe0c3;
  --r: 18px; --tap: 48px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 18px;
}
html.big-text { font-size: 21px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; -webkit-text-size-adjust: 100%; }
a { color: var(--green); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #d08a2e; outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
.small { font-size: .82rem; color: var(--muted); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.9rem; letter-spacing: -.02em; }
h1:focus { outline: none; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.mt { margin-top: 1.2rem; }

/* Top bar and tabs */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px max(16px, env(safe-area-inset-left)); max-width: 1120px; margin: 0 auto; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); line-height: 1.1; font-size: .9rem; }
.brand b { font-size: 1.15rem; color: var(--green); }
.logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(29,51,48,.18); }
.garden-pill { margin-left: auto; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; text-decoration: none; color: var(--green); font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 4px; }
.grownup-link { text-decoration: none; color: var(--muted); font-size: .85rem; padding: 10px 12px; border-radius: 12px; min-height: 44px; display: flex; align-items: center; gap: 4px; }
.grownup-link.active { background: var(--green-2); color: var(--green); }
.tabs { display: flex; gap: 6px; max-width: 1120px; margin: 0 auto; padding: 0 16px 6px; }
.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; text-decoration: none; color: var(--muted); font-weight: 700; background: transparent; border: 2px solid transparent; }
.tabs a span { font-size: 1.3rem; }
.tabs a.active { background: var(--card); color: var(--green); border-color: var(--line); }
main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 48px; outline: none; }

/* Cards and layout */
.page-head { margin: 10px 0 18px; }
.kicker { margin: 0 0 4px; font-weight: 700; color: var(--green); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.sub { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(29,51,48,.04), 0 6px 20px rgba(29,51,48,.05); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.center-text { text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section { margin: 22px 0 12px; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 10px 18px; border-radius: 14px; border: 2px solid var(--green); background: var(--green); color: #fff; font-weight: 700; text-decoration: none; text-align: center; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: var(--card); color: var(--green); }
.btn.big { min-height: 58px; padding: 14px 24px; font-size: 1.05rem; }
.btn.mini { min-height: 44px; min-width: 44px; padding: 4px 10px; font-size: 1.2rem; }
.btn.warn { background: #a3341c; border-color: #a3341c; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--line); background: #fff; font-weight: 600; }
.chip[aria-expanded="true"] { border-color: var(--read); background: var(--read-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--green-2); color: var(--green); padding: 3px 9px; border-radius: 99px; }
.tag.info { background: var(--read-bg); color: var(--read); }
.tag.week { background: var(--frac); color: #4a3205; }

/* Today plan */
.plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--r); text-decoration: none; color: var(--ink); border: 2px solid transparent; min-height: 210px; }
.plan-card.read { background: var(--read-bg); } .plan-card.read .btn { background: var(--read); border-color: var(--read); } .plan-card.read .btn.ghost { background: #fff; color: var(--read); }
.plan-card.math { background: var(--math-bg); } .plan-card.math .btn { background: var(--math); border-color: var(--math); } .plan-card.math .btn.ghost { background: #fff; color: var(--math); }
.plan-card.write { background: var(--write-bg); } .plan-card.write .btn { background: var(--write); border-color: var(--write); } .plan-card.write .btn.ghost { background: #fff; color: var(--write); }
.plan-card.done { border-color: var(--ok); }
.plan-card strong { font-size: 1.2rem; }
.plan-card .btn { margin-top: auto; align-self: flex-start; }
.plan-emoji { font-size: 2.2rem; }
.plan-label { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.challenge-banner { display: flex; align-items: center; gap: 14px; background: var(--ch-bg); border-radius: var(--r); padding: 16px 20px; text-decoration: none; color: var(--ink); margin-bottom: 16px; }
.challenge-banner .btn { margin-left: auto; background: var(--ch); border-color: var(--ch); }
.big-emoji { font-size: 2.6rem; line-height: 1; }
.progress3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.progress3 p { margin: 4px 0; }
.meter { height: 14px; background: #e7eadf; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.meter.read span { background: var(--read); } .meter.math span { background: var(--math); } .meter.write span { background: var(--write); } .meter.challenge span { background: var(--ch); }
.week-dots { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week-dots li { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; }
.week-dots li.today { background: var(--green-2); }
.week-dots .dot { font-size: 1.6rem; min-height: 2.1rem; color: #b9c1b0; }
.weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin: 10px 0; }
.week { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--line); background: #fff; min-height: 84px; }
.week span:first-child { font-size: 1.4rem; }
.week.on { border-color: var(--green); background: var(--green-2); }

/* Story & topic cards */
.story-card, .topic-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); margin: 0; min-height: 180px; }
.story-card:hover, .topic-card:hover { border-color: var(--green); }
.topic-card.suggested { border: 2px solid var(--frac); }
.story-emoji { font-size: 2.2rem; }
.status { margin-top: auto; font-weight: 700; color: var(--green); font-size: .9rem; }

/* Reading */
.passage { font-size: 1.15rem; line-height: 1.85; max-width: 42em; }
.passage p { margin: 0 0 1em; padding: 2px 6px; border-radius: 8px; }
.passage p.speaking { background: #fff3c4; }
mark { background: #ffe58a; color: inherit; padding: 0 2px; border-radius: 4px; }
.words { margin-bottom: 10px; }
.word-box { background: var(--read-bg); padding: 10px 14px; border-radius: 12px; margin: 8px 0; }
.read-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
.passage-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px; }
.passage-panel summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--read); }
.passage-panel .passage { font-size: 1.02rem; }
.prompt { font-size: 1.15rem; font-weight: 600; }
.mini-read { margin: 6px 0 12px; padding: 12px 16px; background: var(--read-bg); border-radius: 12px; font-size: 1.08rem; }
.clue { background: #fff6d6; padding: 8px 12px; border-radius: 10px; }

/* Quiz */
.quiz { border-top: 6px solid var(--green); }
.quiz.read { border-top-color: var(--read); } .quiz.math { border-top-color: var(--math); } .quiz.write { border-top-color: var(--write); } .quiz.challenge { border-top-color: var(--ch); }
.q-top { display: grid; gap: 6px; margin-bottom: 10px; }
.question { font-size: 1.35rem; font-weight: 700; margin: 8px 0 14px; line-height: 1.45; white-space: pre-wrap; }
.question:focus { outline: none; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.answers.three { grid-template-columns: repeat(3, 1fr); }
.answers.long { grid-template-columns: 1fr; }
.answer { min-height: 64px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 1.15rem; font-weight: 700; text-align: left; }
.answers:not(.long) .answer { text-align: center; }
.answer:hover:not(:disabled) { border-color: var(--green); background: var(--green-2); }
.answer:disabled { cursor: default; color: var(--muted); }
.answer.right { border-color: var(--ok); background: var(--ok-bg); color: var(--ink); }
.answer.wrong { border-color: #d29a6b; background: var(--warm-bg); color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.feedback { border-radius: 14px; padding: 14px 18px; margin: 12px 0; }
.feedback p { margin: 6px 0 0; }
.feedback.good { background: var(--ok-bg); border-left: 6px solid var(--ok); }
.feedback.warm { background: var(--warm-bg); border-left: 6px solid #d29a6b; }
.hint { background: #fff7d1; border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.actions { justify-content: space-between; }
.actions .big { margin-left: auto; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; font-size: 1.25rem; }
.token { min-height: 52px; min-width: 44px; padding: 6px 12px; border: 2px dashed transparent; border-radius: 12px; background: #f1f2ea; font-weight: 700; }
.token.on { background: #dceccf; border-color: var(--green); border-style: solid; }
.token.right { background: var(--ok-bg); border: 2px solid var(--ok); }
.token.missed { border: 2px dashed var(--warm); background: #fff; }
.token.extra { background: var(--warm-bg); border: 2px solid #d29a6b; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.steps { display: grid; gap: 8px; }
.step { min-height: 52px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 600; width: 100%; }
.my-order { padding: 0; list-style: none; display: grid; gap: 8px; margin: 0; min-height: 60px; }
.my-order li.right .step { border-color: var(--ok); background: var(--ok-bg); }
.my-order li.missed .step { border-color: #d29a6b; background: var(--warm-bg); }
.step.placed { border-style: solid; background: #f1f6ea; }
.viz { width: 100%; max-width: 420px; height: auto; display: block; margin: 8px 0 12px; }
.array { display: grid; gap: 4px; max-width: 420px; font-size: 1.5rem; margin: 6px 0 12px; justify-items: center; }
.tools { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.tools summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--green); }
.tool { background: #f8f8f1; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; }
.lab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.stepper { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.stepper span { min-width: 5.5em; text-align: center; }
.fbar { display: flex; flex: 1 1 260px; max-width: 420px; height: 52px; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.piece { flex: 1; border: 0; border-right: 2px solid var(--ink); background: #fff; padding: 0; min-width: 0; }
.piece:last-child { border-right: 0; }
.piece.on { background: var(--frac); }
.flabel { font-size: 1.3rem; min-width: 3em; }

/* Writing */
.write-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.helpers ul { padding-left: 1.2em; margin: 0 0 12px; }
textarea, input, select { width: 100%; border: 2px solid #cdd5c5; border-radius: 12px; padding: 12px 14px; background: #fff; min-height: var(--tap); }
textarea { resize: vertical; line-height: 1.6; }
#draft { font-size: 1.15rem; min-height: 260px; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 10px 0; cursor: pointer; }
label.check input { width: 26px; height: 26px; min-height: 0; flex-shrink: 0; margin-top: 2px; accent-color: var(--green); }
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.note { background: #f3f1e6; padding: 10px 14px; border-radius: 12px; font-size: .9rem; }
.idea { background: var(--write-bg); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.piece-text { white-space: pre-wrap; font-size: 1.1rem; line-height: 1.7; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-wrap: anywhere; }
.logs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.logs li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; overflow-wrap: anywhere; }
.logs p { margin: 4px 0 0; }

/* Celebrate & garden */
.celebrate { text-align: center; padding: 30px 20px; }
.grow { display: inline-block; animation: grow .7s ease-out both; }
@keyframes grow { from { transform: scale(.3) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.explain-box { background: var(--math-bg); border-radius: 14px; padding: 12px 16px; text-align: left; max-width: 560px; margin: 12px auto; }
.garden { background: linear-gradient(#e6f2fb 0 34%, #eaf3dc 34%); }
.sky { display: flex; gap: 12px; font-size: 1.8rem; min-height: 2.6rem; flex-wrap: wrap; }
.visitor { display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.beds { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 14px auto; max-width: 560px; }
.bed { aspect-ratio: 1; background: #b98a5e; border-radius: 12px; display: grid; place-items: center; font-size: clamp(1.3rem, 4.5vw, 2rem); box-shadow: inset 0 -6px 0 #9c7149; }
.bed.today { outline: 3px solid var(--frac); }
.badges { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.badges li { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: #f1f2ea; color: var(--muted); }
.badges li span:first-child { font-size: 1.7rem; }
.badges li.got { background: #fff6d6; color: var(--ink); border: 2px solid var(--frac); }

/* Challenge */
.players { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.player { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px; background: var(--ch-bg); border-radius: 16px; }
.player.played { background: #f3effc; border: 2px solid var(--ch); }
.player .btn { background: var(--ch); border-color: var(--ch); }
.player label.check { text-align: left; }
.team { margin-top: 14px; font-size: 1.2rem; text-align: center; background: #fff6d6; padding: 12px; border-radius: 14px; }
.player-tag { font-weight: 800; color: var(--ch); margin: 0 0 8px; }

/* Grown-ups */
.hold { position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; min-width: 240px; }
.hold .fill { position: absolute; inset: 0; background: rgba(255,255,255,.35); transform: scaleX(0); transform-origin: left; }
.hold.holding .fill { transform: scaleX(1); transition: transform 2s linear; }
.hold span:last-child { position: relative; }
.note-card { background: #f3f1e6; }
.note-card ul { padding-left: 1.2em; margin: 0; }
.note-card li { margin: 6px 0; }
.warn { color: #a3341c; }
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.glance div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.glance b { font-size: 1.6rem; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td select { min-width: 170px; }
.wbox { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; margin: 8px 0; background: #fff; }
.wbox summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; flex-wrap: wrap; gap: 4px; }
.wbox .piece-text { margin-bottom: 10px; }
.danger { margin-top: 14px; }
.danger summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #a3341c; font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; max-width: min(92vw, 520px); z-index: 40; box-shadow: 0 8px 30px rgba(0,0,0,.2); }

/* Wide screens: passage beside the questions */
@media (min-width: 900px) {
  .read-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .passage-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
}
/* Tablet */
@media (max-width: 899px) {
  .plan { grid-template-columns: 1fr; }
  .plan-card { min-height: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
  .plan-card .plan-emoji { grid-row: span 4; align-self: center; }
  .weeks { grid-template-columns: repeat(4, 1fr); }
  .write-layout { grid-template-columns: 1fr; }
}
/* Phone */
@media (max-width: 640px) {
  :root { font-size: 17px; }
  html.big-text { font-size: 20px; }
  h1 { font-size: 1.55rem; }
  .topbar { padding: 10px 16px; }
  .garden-pill .small { display: none; }
  .grownup-link { font-size: 1.3rem; min-width: 44px; justify-content: center; }
  .grownup-link .gl-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255,253,248,.97); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 2px; }
  .tabs a { flex-direction: column; gap: 0; font-size: .72rem; min-height: 56px; }
  main { padding-bottom: 110px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; }
  .progress3 { grid-template-columns: 1fr; gap: 10px; }
  .answers, .answers.three { grid-template-columns: 1fr; }
  .answers:not(.long) .answer { text-align: left; }
  .order-grid { grid-template-columns: 1fr; }
  .players { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .challenge-banner { flex-wrap: wrap; }
  .challenge-banner .btn { margin-left: 0; width: 100%; }
  .question { font-size: 1.2rem; }
  .actions .big { width: 100%; }
}

/* Calm mode and reduced motion */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hold.holding .fill { transform: scaleX(.5); }
}
#feedback:focus { outline: none; }

/* ---------- Hayule's own touches ---------- */
body { background: radial-gradient(1200px 500px at 85% -10%, #e9e2fb 0, transparent 60%), radial-gradient(900px 500px at -10% 0%, #d8f3ea 0, transparent 55%), var(--bg); background-attachment: fixed; }
.hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; margin: 8px 0 20px; padding: 28px 32px; border-radius: 28px; background: linear-gradient(135deg, #d6f4ea 0%, #eef9f4 45%, #ece5fc 100%); overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.35); pointer-events: none; }
.hero h1 { font-size: 2.3rem; margin: 2px 0 6px; }
.hero-sub { margin: 0 0 14px; color: var(--muted); font-size: 1.02rem; }
.hero-goal { margin: 0 0 10px; font-size: 1.05rem; }
.hero-dots { display: flex; gap: 10px; }
.hero-dots span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255,255,255,.6); border: 2px dashed #a9cfc3; filter: grayscale(.6); opacity: .75; }
.hero-dots span.on { background: #fff; border: 2px solid var(--green); filter: none; opacity: 1; box-shadow: 0 2px 8px rgba(31,107,90,.18); }
.hero-photo { position: relative; z-index: 1; width: 210px; height: 230px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 120px 120px 32px 32px; border: 6px solid #fff; box-shadow: 0 12px 30px rgba(29,51,48,.18); }
.sticker { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.4rem; box-shadow: 0 4px 12px rgba(29,51,48,.16); animation: bob 4s ease-in-out infinite; }
.sticker.s1 { left: -18px; top: 26px; } .sticker.s2 { right: -16px; top: 92px; animation-delay: 1.2s; } .sticker.s3 { left: 6px; bottom: -12px; animation-delay: 2.4s; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
.cheer-pic { margin: 0 auto 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cheer-pic img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--mint), 0 10px 26px rgba(29,51,48,.16); }
.cheer-pic figcaption { background: var(--lilac); color: var(--lilac-ink); font-weight: 800; padding: 8px 16px; border-radius: 99px; position: relative; }
.cheer-pic figcaption::before { content: ""; position: absolute; top: -7px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--lilac); }
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.world { position: relative; padding: 0; border: 3px solid transparent; border-radius: 20px; overflow: hidden; background: var(--lilac); aspect-ratio: 4 / 5; text-align: left; box-shadow: 0 4px 14px rgba(29,51,48,.08); transition: transform .2s; }
.world:hover { transform: translateY(-3px); }
.world.on { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint), 0 8px 20px rgba(29,51,48,.15); }
.world img { width: 100%; height: 100%; object-fit: cover; display: block; }
.world-emoji { display: grid; place-items: center; height: 100%; font-size: 3.4rem; background: linear-gradient(160deg, #f3d9e8, #e4dcfa); }
.world-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; color: #fff; font-weight: 800; background: linear-gradient(transparent, rgba(16,30,28,.78)); line-height: 1.25; }
.world-cap .pick { display: inline-block; margin-top: 4px; font-size: .75rem; background: #fff; color: var(--green); padding: 2px 8px; border-radius: 99px; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(29,51,48,.15); }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.tabs a.active { box-shadow: 0 2px 10px rgba(29,51,48,.08); }
@media (max-width: 899px) { .worlds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding: 22px 20px 20px; text-align: left; }
  .hero-photo { position: absolute; right: 16px; top: 18px; width: 96px; height: 106px; }
  .hero-photo img { border-width: 4px; border-radius: 60px 60px 18px 18px; }
  .sticker { width: 32px; height: 32px; font-size: 1rem; }
  .sticker.s1 { left: -14px; top: 10px; } .sticker.s2 { right: -10px; top: 50px; } .sticker.s3 { display: none; }
  .hero h1 { font-size: 1.6rem; padding-right: 108px; }
  .hero .kicker, .hero-sub { padding-right: 108px; }
  .cheer-pic img { width: 120px; height: 120px; }
}

.story-card.has-photo { padding-top: 0; overflow: hidden; }
.story-thumb { width: calc(100% + 40px); margin: 0 -20px 6px; height: 120px; object-fit: cover; object-position: 50% 45%; }
.story-photo { margin: 6px 0 16px; }
.story-photo img { width: 100%; max-height: 300px; object-fit: cover; object-position: 50% 45%; border-radius: 18px; display: block; }
.story-photo figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; text-align: center; }
.story-photo img { height: auto; aspect-ratio: 900 / 768; }
@media (min-width: 641px) { .story-photo img { height: 300px; aspect-ratio: auto; } }
