/* Focus Crew / shared demo + family UI. Replace the existing inline <style> in each page.
   The host loads Pretendard Variable. JS still owns --fs, --tap and --p. */
:root {
  color-scheme: light;
  --fs: 1;
  --tap: 48px;
  --canvas: #EFE8E1;
  --bg: #FBF6F1;
  --paper: #FFFFFF;
  --quiet: #F1ECE7;
  --line: #EAE3DF;
  --edge: #817D88;
  --ink: #1D2140;
  --sub: #646777;
  --brand: #4047B8;
  --brand-hover: #363DA4;
  --brand-press: #30378E;
  --on-brand: #FFFFFF;
  --accent: #3A409F;
  --soft: #ECECFB;
  --hero: #FFE7DC;
  --hero-edge: #F8DFD4;
  --orbit: #FFD9CA;
  --focus: #3D43AB;
  --track: #EAE4E9;
  --ok: #087766;
  --on-ok: #FFFFFF;
  --okSoft: #E9F7F2;
  --ok-text: #24594F;
  --warn: #75451D;
  --warnSoft: #FAEDDE;
  --err-ink: #8C3540;
  --err-bg: #FAE9E8;
  --active: #A13F2B;
  --calm: #176345;
  --bonus: #5340A1;
  --star: #A06424;
  --toast: #252947;
  --on-toast: #FAF7FF;
  --shadow-card: 0 1px 2px #7253440b, 0 6px 18px #7253440a;
  --shadow-hero: 0 2px 4px #7253440a, 0 10px 26px #AA65481B;
  --shadow-toast: 0 8px 24px #72534430;
  --radius-card: 22px;
  --radius-control: 15px;
  --radius-step: 13px;
  --radius-hero: 26px;
  --gutter: clamp(16px, 5vw, 26px);
  --unit: 1;
  --hero-end: #FFF4EE;
  --next-bg: #FDE9E1;
  --next-ink: #803D30;
  --secondary: #EDE8E3;
  --focus-arc: #D66450;
  --break-arc: #168878;
  --break-track: #DDEFE9;
  --progress: #198577;
  --active-bg: #FDE9E1;
  --calm-bg: #DAF2EB;
  --bonus-bg: #EEE9FD;
  --celebrate-bg: #DBF3EA;
}

body.theme-playful {
  --canvas: #F3E9DF;
  --bg: #FFF7EE;
  --quiet: #F4EDE5;
  --hero: #FFE3D4;
  --hero-edge: #F5DACE;
  --orbit: #FFD2C0;
  --radius-card: 26px;
  --radius-control: 20px;
  --radius-step: 17px;
  --radius-hero: 30px;
  --unit: 1.5;
}

body.theme-dark {
  color-scheme: dark;
  --canvas: #14141C;
  --bg: #1C1D2A;
  --paper: #26283A;
  --quiet: #313246;
  --line: #414359;
  --edge: #A09EB1;
  --ink: #F4F2FF;
  --sub: #BCBCD0;
  --brand: #B3B8FF;
  --brand-hover: #C3C7FF;
  --brand-press: #A4AAF4;
  --on-brand: #202453;
  --accent: #C0C4FF;
  --soft: #35385F;
  --hero: #3C2C38;
  --hero-edge: #563C48;
  --orbit: #523846;
  --focus: #BFC6FF;
  --track: #474354;
  --ok: #71CFB7;
  --on-ok: #142C29;
  --okSoft: #253B38;
  --ok-text: #B2E5D6;
  --warn: #F2C997;
  --warnSoft: #433327;
  --err-ink: #FFC1C6;
  --err-bg: #492B35;
  --active: #FFB29C;
  --calm: #96E2CF;
  --bonus: #D5C5FF;
  --star: #F2C07D;
  --toast: #EDEBFF;
  --on-toast: #22233F;
  --shadow-card: 0 1px 2px #09070930, 0 6px 18px #09070924;
  --shadow-hero: 0 2px 4px #09070930, 0 10px 26px #09070932;
  --shadow-toast: 0 8px 24px #09070965;
  --hero-end: #302836;
  --next-bg: #492F37;
  --next-ink: #FFC1AD;
  --secondary: #35364A;
  --focus-arc: #F49681;
  --break-arc: #5FCBB0;
  --break-track: #354D4B;
  --progress: #5FCBB0;
  --active-bg: #493039;
  --calm-bg: #29443F;
  --bonus-bg: #403657;
  --celebrate-bg: #294940;
}

*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; }
body {
  margin: 0;
  min-block-size: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-size: calc(1rem * var(--fs));
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
#app {
  inline-size: 100%;
  max-inline-size: 520px;
  min-block-size: 100vh;
  min-block-size: 100dvh;
  margin-inline: auto;
  padding-block-end: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
}
.pad {
  padding: 22px var(--gutter) 32px;
  padding-inline-start: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-inline-end: max(var(--gutter), env(safe-area-inset-right, 0px));
}

h1, h2, h3 { color: var(--ink); font-weight: 770; }
h1 {
  margin: 0 0 10px;
  font-size: calc(1.75rem * var(--fs));
  line-height: 1.24;
  letter-spacing: -.038em;
  text-wrap: balance;
}
h2 {
  margin: 26px 0 9px;
  font-size: calc(1.1875rem * var(--fs));
  line-height: 1.35;
  letter-spacing: -.026em;
}
h3 {
  margin: 0 0 5px;
  font-size: calc(1.0625rem * var(--fs));
  line-height: 1.4;
  letter-spacing: -.018em;
}
h1 .pill, h2 .pill { vertical-align: .12em; }
.sub { margin: 0 0 14px; color: var(--sub); }
small, .fine, .tags {
  color: var(--sub);
  font-size: calc(.8125rem * var(--fs));
  line-height: 1.5;
}
.fine { margin: 15px 0 10px; }

.top {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(5px, 1.6vw, 9px);
  min-block-size: calc(var(--tap) + env(safe-area-inset-top, 0px));
  padding: 7px var(--gutter);
  padding-block-start: calc(7px + env(safe-area-inset-top, 0px));
  padding-inline-start: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-inline-end: max(var(--gutter), env(safe-area-inset-right, 0px));
  border-block-end: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: calc(.875rem * var(--fs));
  line-height: 1.25;
  white-space: nowrap;
}
.sp { flex: 1 1 0; min-inline-size: 0; }
.top > b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-weight: 810;
  letter-spacing: -.03em;
}
.top > b::before {
  content: "";
  inline-size: .82em;
  block-size: .98em;
  background: var(--brand);
  clip-path: polygon(10% 0, 89% 10%, 100% 28%, 77% 52%, 24% 46%, 21% 100%, 0 100%);
  transform: rotate(9deg);
}
.top .who {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 650;
  color: var(--sub);
}
.pill, .pts {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: calc(.75rem * var(--fs));
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}
.pill { color: var(--sub); background: var(--quiet); font-weight: 690; }
.pts { color: var(--accent); background: var(--soft); font-weight: 800; }
.top .pill, .top .pts { flex: none; }

.card, .bcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card { margin: 12px 0; padding: clamp(12px, 4vw, 20px); }
.card p, .bcard p { color: var(--sub); }
.card p { margin: 0; }
.card .fine { margin-block: 10px 8px; }
.card > .step:first-child { margin-block-start: 0; }
.card > .step:last-child, .card > .okbox:last-child { margin-block-end: 0; }
/* Peach next-up callout on focus/break screens; opt into hero only on home. */
.next {
  padding: 10px 13px;
  margin: 9px 0 12px;
  border-radius: var(--radius-step);
  background: var(--next-bg);
  color: var(--next-ink);
  font-weight: 690;
}
.next:empty { display: none; }
/* Older engines keep the standard card; current browsers get the task hero. */
.card:is(.hero, :has(> .next):has(> .primary)) {
  background:
    radial-gradient(ellipse 150px 62px at 0% 112%, var(--orbit) 55%, transparent 56%),
    radial-gradient(ellipse 120px 90px at 106% -18%, var(--orbit) 72%, transparent 73%),
    linear-gradient(135deg, var(--hero), var(--hero-end) 74%);
  border-color: var(--hero-edge);
  border-radius: var(--radius-hero);
  box-shadow: var(--shadow-hero);
  padding: clamp(14px, 4.6vw, 23px);
}
.card:is(.hero, :has(> .next):has(> .primary)) > h3 { color: var(--next-ink); }
.card:is(.hero, :has(> .next):has(> .primary)) > .next {
  margin-block: 5px 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: calc(1.25rem * var(--fs));
  font-weight: 770;
  line-height: 1.35;
  letter-spacing: -.026em;
}
.card > .row:empty { display: none; }

button, input, select { font: inherit; }
button {
  -webkit-tap-highlight-color: transparent;
  min-height: var(--tap);
  max-inline-size: 100%;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--quiet);
  color: var(--ink);
  font-weight: 660;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}
button:active:not(:disabled) { transform: scale(calc(1 - .015 * var(--unit))); }
button:disabled { cursor: not-allowed; border-style: dashed; }
:is(button:focus-visible, input:focus-visible, select:focus-visible, label.step:has(:focus-visible)) {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.primary {
  inline-size: 100%;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: 999px;
  font-size: calc(1.0625rem * var(--fs));
  font-weight: 780;
  box-shadow: inset 0 -2px 0 #0002;
}
.primary:active:not(:disabled) { background: var(--brand-press); }
.ghost {
  color: var(--ink);
  background: var(--secondary);
  border-radius: 999px;
}
.link {
  background: transparent;
  padding: 7px 5px;
  color: var(--accent);
  font-weight: 710;
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: .07em;
}
.top .link { flex: none; padding-inline: 2px; font-size: calc(.8125rem * var(--fs)); }
.row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.row > button { flex: 1 1 0; min-inline-size: min(100%, 5.25rem); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.col > button { inline-size: 100%; text-align: start; }
.chip {
  border-color: var(--edge);
  border-radius: 999px;
  padding-inline: 11px;
  background: var(--paper);
  font-size: calc(.9375rem * var(--fs));
}
.chip.on {
  background: var(--soft);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 780;
}
/* The demo's weekday chips hard-code smaller tap/font styles inline.
   Keep the age-band targets; wrap rather than squeeze seven controls onto one line. */
.row > .chip:is([data-a="simDow"], [data-a="day"]) {
  flex: 1 0 var(--tap);
  min-width: var(--tap);
  min-height: var(--tap) !important;
  font-size: calc(.875rem * var(--fs)) !important;
}

.step {
  display: flex;
  align-items: center;
  gap: 11px;
  inline-size: 100%;
  min-height: var(--tap);
  margin-block: 6px;
  padding: 8px 10px;
  background: var(--quiet);
  color: var(--ink);
  border-radius: var(--radius-step);
  text-align: start;
  font-weight: 670;
  line-height: 1.4;
}
.step > span:last-child { min-inline-size: 0; }
.card > button.step:not(.done) { background: var(--paper); border-color: var(--line); }
.step.done { background: var(--okSoft); color: var(--ink); }
.step .box {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: calc(21px + 8px * (var(--fs) - 1));
  aspect-ratio: 1;
  border: 1.5px solid var(--edge);
  border-radius: 50%;
  background: var(--paper);
}
.step.done .box { border-color: var(--ok); background: var(--ok); color: var(--on-ok); }
.ring::after {
  content: "";
  inline-size: .54em;
  block-size: .31em;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translateY(-11%) rotate(-45deg);
}
.step.done .box { animation: check-pop 220ms ease-out both; }
.step.done .box::after {
  content: "";
  inline-size: 74%;
  aspect-ratio: 1;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4 4L19 6' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.step small { display: block; margin-block-start: 1px; font-weight: 510; }
.step.done small { color: var(--ok-text); }
.step .g { flex: none; font-size: calc(.75rem * var(--fs)) !important; }
label.step { cursor: pointer; }
input[type="checkbox"] {
  accent-color: var(--accent);
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
}

.timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 21px auto;
  color: var(--ink);
}
.disk {
  --ring-size: clamp(174px, 69vw, 294px);
  --arc: var(--focus-arc);
  --arc-track: var(--track);
  --stroke: clamp(7px, 2.05vw, 10px);
  --angle: calc(clamp(0, var(--p, 0), 1) * 1turn);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  inline-size: var(--ring-size);
  max-inline-size: 100%;
  aspect-ratio: 1;
  padding: var(--stroke);
  border-radius: 50%;
  background: conic-gradient(var(--arc) var(--angle), var(--arc-track) 0);
}
/* A break has #seqPos in both templates; the circle dimensions stay identical. */
.pad:has(#seqPos) .disk { --arc: var(--break-arc); --arc-track: var(--break-track); }
/* Round both visible segment ends, keeping the --p=0 ring empty. */
.disk::before, .disk::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 50% calc(var(--stroke) / 2), var(--arc) 0 calc(var(--stroke) / 2 - .4px), transparent calc(var(--stroke) / 2));
  border-radius: inherit;
  opacity: clamp(0, calc(var(--p, 0) * 150), 1);
}
.disk::after { transform: rotate(var(--angle)); }
.disk .in {
  display: grid;
  place-items: center;
  inline-size: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ink);
  background: var(--bg);
}
.disk .in, .big {
  font-size: min(calc(3.5rem * var(--fs)), 18vw);
  font-weight: 770;
  line-height: 1;
  letter-spacing: -.057em;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}
.big { margin: 6px 0 2px; }
.bar {
  inline-size: 100%;
  block-size: 12px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.timer .bar { max-inline-size: 20rem; }
.bar.thin { block-size: 8px; margin: 9px 0 11px; }
.bar.thin > i { background: var(--progress); }
.timer .bar > i { background: var(--focus-arc); }
.pad:has(#seqPos) .timer .bar > i { background: var(--break-arc); }
.bar > i {
  display: block;
  inline-size: calc(clamp(0, var(--p, 0), 1) * 100%);
  block-size: 100%;
  border-radius: inherit;
  background: var(--brand);
}
#cardLeft { font-size: calc(.875rem * var(--fs)); font-variant-numeric: tabular-nums; }

.bcard {
  position: relative;
  display: block;
  inline-size: 100%;
  margin: 10px 0;
  padding: 14px max(30px, 8%) 14px clamp(13px, 4vw, 19px);
  text-align: start;
  font-weight: 520;
  line-height: 1.5;
}
.bcard::after {
  position: absolute;
  inset-inline-end: 15px;
  inset-block-start: 50%;
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border: solid var(--edge);
  border-width: 2px 2px 0 0;
  transform: translateY(-50%) rotate(45deg);
}
.bcard h3 { margin: 7px 0 3px; }
.bcard p { margin: 0; }
.g {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: calc(.75rem * var(--fs));
  line-height: 1.3;
  font-weight: 780;
  color: var(--accent);
  background: var(--soft);
  white-space: nowrap;
}
/* The plan sequence contains an inline white <span> color; override it here. */
.g.active { background: var(--active-bg); color: var(--active) !important; }
.g.calm { background: var(--calm-bg); color: var(--calm) !important; }
.g.bonus { background: var(--bonus-bg); color: var(--bonus) !important; }
.tags { margin-block-start: 9px; font-variant-numeric: tabular-nums; }
.notice, .okbox, .err {
  padding: 10px 13px;
  margin: 10px 0;
  border-inline-start: 2px solid currentColor;
  border-radius: 4px var(--radius-step) var(--radius-step) 4px;
  font-weight: 660;
}
.notice { background: var(--warnSoft); color: var(--warn); }
.okbox { background: var(--okSoft); color: var(--ok-text); }
.err { background: var(--err-bg); color: var(--err-ink); }

.celebrate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 23px 12px 18px;
  text-align: center;
}
.celebrate h1, .celebrate .sub { margin: 0; }
.celebrate .sub { max-inline-size: 32ch; }
.ring {
  display: grid;
  place-items: center;
  inline-size: clamp(66px, calc(76px * var(--fs)), 96px);
  aspect-ratio: 1;
  margin: 0 0 8px;
  border-radius: 50%;
  border: 0;
  background: var(--celebrate-bg);
  color: var(--ok);
  animation: check-pop 220ms ease-out both;
}
.ring::after { inline-size: 28px; block-size: 16px; border-width: 0 0 4px 4px; }
@keyframes check-pop {
  0% { transform: scale(.94); }
  65% { transform: scale(calc(1 + .04 * var(--unit))); }
  100% { transform: scale(1); }
}
.stars { display: flex; gap: 5px; margin: 0; }
.stars > i {
  inline-size: calc(15px * var(--fs));
  aspect-ratio: 1;
  background: var(--star);
  clip-path: polygon(50% 0, 63% 34%, 100% 38%, 72% 63%, 80% 100%, 50% 81%, 20% 100%, 28% 63%, 0 38%, 37% 34%);
}
.push {
  margin: 9px 0;
  padding: 12px 14px;
  border: 1px solid var(--hero-edge);
  border-radius: var(--radius-card);
  background: var(--soft);
  color: var(--ink);
}
.push b { display: block; font-size: calc(.9375rem * var(--fs)); }
.push span { color: var(--sub); font-size: calc(.875rem * var(--fs)); }
.push small { display: block; margin-block-end: 2px; color: var(--accent); }
#toast {
  position: fixed;
  z-index: 20;
  inset-inline-start: 50%;
  inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
  inline-size: max-content;
  max-inline-size: min(28rem, calc(100% - 2 * var(--gutter) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  transform: translate(-50%, 4px);
  padding: 10px 15px;
  border-radius: var(--radius-control);
  background: var(--toast);
  color: var(--on-toast);
  box-shadow: var(--shadow-toast);
  font-size: calc(.875rem * var(--fs));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}
#toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.prow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 0;
  padding: 8px 0;
  border-block-end: 1px solid var(--line);
}
.prow:last-child { border-block-end: 0; }
.prow span { font-weight: 700; }
.prow small { font-variant-numeric: tabular-nums; }
.linkbox {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px dashed var(--edge);
  border-radius: var(--radius-step);
  background: var(--quiet);
  color: var(--sub);
  font-size: calc(.8125rem * var(--fs));
  overflow-wrap: anywhere;
  user-select: all;
}
.consent { margin-block: 11px; }
.consent .step { align-items: flex-start; padding: 11px; }
.consent input { margin-block-start: 2px; }
.consent small { margin-block-start: 3px; }
input[type="text"], input[type="email"], input[type="date"], select {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  min-height: var(--tap);
  padding: 9px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font-size: calc(1rem * var(--fs));
}
input::placeholder { color: var(--sub); opacity: 1; }

@media (hover: hover) {
  .primary:hover:not(:active):not(:disabled) { background: var(--brand-hover); }
  :is(.ghost, .chip:not(.on), button.step:not(.done)):hover { background: var(--soft); }
  .card > button.step:not(.done):hover { background: var(--quiet); }
  .bcard:hover { border-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  button, #toast { transition: none; }
  button:active:not(:disabled) { transform: none; }
  .step.done .box, .ring { animation: none; }
  #toast { transform: translateX(-50%); }
}
@media (forced-colors: active) {
  .disk { forced-color-adjust: none; background: conic-gradient(Highlight var(--angle), GrayText 0); }
  .disk::before, .disk::after { display: none; }
  .disk .in { background: Canvas; color: CanvasText; }
  .bar { forced-color-adjust: none; background: GrayText; }
  .bar > i, .bar.thin > i, .timer .bar > i, .pad:has(#seqPos) .timer .bar > i { background: Highlight; }
  .step.done .box::after { forced-color-adjust: none; background: CanvasText; }
  .g, .pill, .pts, .ring { border: 1px solid currentColor; }
  #toast { border: 1px solid CanvasText; }
  .stars > i { forced-color-adjust: none; background: CanvasText; }
}

/* ---------------------------------------------------------------------
   Extras (Aside): concept-board elements on top of GPT's ui.css
   --------------------------------------------------------------------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 8px; }
.hello h1 { margin: 0; }
.mini {
  flex: none; display: grid; place-items: center;
  inline-size: calc(72px * var(--fs)); aspect-ratio: 1; padding: 6px; border-radius: 50%;
  background: conic-gradient(var(--brand) calc(clamp(0, var(--p, 0), 1) * 1turn), var(--track) 0);
}
.mini > span {
  display: grid; place-items: center; align-content: center; gap: 1px;
  inline-size: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); line-height: 1.1;
}
.mini b { font-size: calc(1rem * var(--fs)); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini small { font-size: calc(.625rem * var(--fs)); }
.card.hero { position: relative; overflow: hidden; }
.card.hero > h3 { padding-inline-end: 54px; }
.card.hero .hero-ic { position: absolute; inset-inline-end: 16px; inset-block-start: 14px; inline-size: 42px; block-size: 42px; color: var(--next-ink); opacity: .6; }
.card.hero .hero-ic svg { inline-size: 100%; block-size: 100%; }
.card.hero .next .nmin { margin-inline-start: 6px; font-size: .78em; font-weight: 650; color: var(--sub); letter-spacing: -.01em; }
.disk .in { gap: 6px; align-content: center; }
.disk .in .tlabel { font-size: calc(.875rem * var(--fs)); font-weight: 600; letter-spacing: -.01em; color: var(--sub); }
.bcard.has-ic { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
.bcard.has-ic > :not(.ic) { grid-column: 2; }
.bcard .ic { grid-column: 1; grid-row: 1 / span 4; display: grid; place-items: center; inline-size: calc(50px * var(--fs)); aspect-ratio: 1; border-radius: 50%; }
.bcard .ic svg { inline-size: 54%; block-size: 54%; }
.bcard.has-ic .g { justify-self: start; }
.ic.active, .av.c1 { background: var(--active-bg); color: var(--active); }
.ic.calm, .av.c0 { background: var(--calm-bg); color: var(--calm); }
.ic.bonus, .av.c2 { background: var(--bonus-bg); color: var(--bonus); }
.kidhead { display: flex; align-items: center; gap: 12px; }
.kidhead > div { min-inline-size: 0; }
.kidhead h3 { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kidhead p { margin: 2px 0 0; font-size: calc(.875rem * var(--fs)); }
.av { flex: none; display: grid; place-items: center; inline-size: calc(46px * var(--fs)); aspect-ratio: 1; border-radius: 50%; }
.av svg { inline-size: 50%; block-size: 50%; }
.bar.thin.c0 > i { background: var(--break-arc); }
.bar.thin.c1 > i { background: var(--focus-arc); }
.bar.thin.c2 > i { background: #8C7BE6; }
label.lbl { display: block; margin: 0 0 6px; font-weight: 650; font-size: calc(.875rem * var(--fs)); color: var(--sub); }
/* 요일 버튼 7개는 한 줄로 (높이는 터치 크기 유지). 다음 배포 때 반영 */
.row > .chip:is([data-a="simDow"], [data-a="day"]) { flex: 1 1 0; min-width: 0; padding-inline: 0; }

/* ---------------------------------------------------------------------
   선생님 응원 메신저
   --------------------------------------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 8px; }
.msg { max-inline-size: 84%; padding: 10px 13px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-card); line-height: 1.5; overflow-wrap: anywhere; }
.msg .who { display: block; margin-block-end: 2px; font-size: calc(.75rem * var(--fs)); font-weight: 700; color: var(--sub); }
.msg .at { display: block; margin-block-start: 4px; font-size: calc(.6875rem * var(--fs)); color: var(--sub); font-variant-numeric: tabular-nums; }
.msg.them { align-self: flex-start; border-start-start-radius: 6px; }
.msg.me { align-self: flex-end; border-color: transparent; border-start-end-radius: 6px; background: var(--brand); color: var(--on-brand); }
.msg.me .who, .msg.me .at { color: color-mix(in srgb, var(--on-brand) 80%, transparent); }
.msg.cheer { border-color: var(--hero-edge); background: var(--hero); color: var(--next-ink); font-weight: 720; }
.msg.cheer .who, .msg.cheer .at { color: var(--next-ink); opacity: .8; }
.msg.hidden { border-style: dashed; background: transparent; box-shadow: none; color: var(--sub); font-style: italic; }
.msg.flag { outline: 2px solid var(--warn); outline-offset: 2px; }
.msg .flagnote { display: block; margin-block-start: 4px; font-size: calc(.75rem * var(--fs)); font-style: normal; font-weight: 720; color: var(--warn); }
.msg .msg-report { min-height: auto; padding: 2px 0 0; background: none; color: inherit; opacity: .75; font-size: calc(.6875rem * var(--fs)); font-weight: 650; text-decoration: underline; }
.composer { position: sticky; inset-block-end: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.composer input[type="text"] { flex: 1 1 auto; }
.composer > button { flex: none; min-inline-size: 72px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 780; }
.composer > button:disabled { background: var(--quiet); color: var(--sub); }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { flex: none; white-space: nowrap; }
.safety { margin: 6px 0 10px; padding: 8px 11px; border-radius: var(--radius-step); background: var(--quiet); color: var(--sub); font-size: calc(.75rem * var(--fs)); line-height: 1.5; }
.helpline { margin: 10px 0; padding: 14px 16px; border-radius: var(--radius-card); background: var(--warnSoft); color: var(--warn); }
.helpline b { display: block; margin-block-end: 4px; font-size: calc(1rem * var(--fs)); }
.helpline a { color: inherit; font-weight: 800; }
.unread { display: inline-grid; place-items: center; min-inline-size: 20px; block-size: 20px; padding: 0 6px; border-radius: 999px; background: var(--focus-arc); color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.teacher { display: flex; align-items: center; gap: 12px; inline-size: 100%; text-align: start; }
.teacher > div { flex: 1 1 auto; min-inline-size: 0; }
.teacher p { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------------
   보호자 커뮤니티
   --------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; margin: 4px 0 14px; padding: 4px; border-radius: 999px; background: var(--quiet); }
.tabs > button { flex: 1 1 0; min-height: calc(var(--tap) - 8px); padding-inline: 6px; border-radius: 999px; background: transparent; color: var(--sub); font-weight: 720; }
.tabs > button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-card); }
.post { display: block; inline-size: 100%; margin: 10px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); text-align: start; font-weight: 520; }
.post h3 { margin: 7px 0 4px; }
.post p { margin: 0; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-block-start: 8px; color: var(--sub); font-size: calc(.75rem * var(--fs)); font-variant-numeric: tabular-nums; }
.topic { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: calc(.75rem * var(--fs)); font-weight: 780; line-height: 1.3; }
.topic.story { background: var(--calm-bg); color: var(--calm); }
.topic.question { background: var(--soft); color: var(--accent); }
.topic.tip { background: var(--bonus-bg); color: var(--bonus); }
.topic.cheer { background: var(--active-bg); color: var(--active); }
.reacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.article { white-space: pre-wrap; line-height: 1.7; }
.comment { padding: 10px 0; border-block-end: 1px solid var(--line); }
.comment:last-child { border-block-end: 0; }
.comment b { font-size: calc(.8125rem * var(--fs)); }
.comment p { margin: 2px 0 0; color: var(--ink); }
textarea { display: block; inline-size: 100%; min-block-size: 150px; padding: 12px; border: 1px solid var(--edge); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); font: inherit; font-size: calc(1rem * var(--fs)); resize: vertical; }
.field { margin: 0 0 12px; }
.field > label { display: block; margin: 0 0 6px; color: var(--sub); font-size: calc(.875rem * var(--fs)); font-weight: 650; }

/* ---------------------------------------------------------------------
   응원 메시지 안전 (따로 동의 · 담당 확인 · 신고 사유 · 운영 검토)
   --------------------------------------------------------------------- */
.state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--quiet); color: var(--sub); font-size: calc(.75rem * var(--fs)); font-weight: 780; line-height: 1.4; white-space: nowrap; }
.state::before { content: ''; inline-size: 7px; block-size: 7px; border-radius: 50%; background: currentColor; }
.state.on { background: var(--okSoft); color: var(--ok-text); }
.state.wait { background: var(--soft); color: var(--accent); }
.state.review { background: var(--warnSoft); color: var(--warn); }
.rules { margin: 10px 0 4px; padding: 0; list-style: none; counter-reset: rule; }
.rules li { position: relative; padding: 8px 0 8px 32px; border-block-end: 1px solid var(--line); line-height: 1.55; counter-increment: rule; }
.rules li:last-child { border-block-end: 0; }
.rules li::before { content: counter(rule); position: absolute; inset-inline-start: 0; inset-block-start: 9px; display: grid; place-items: center; inline-size: 22px; block-size: 22px; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.people { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-step); background: var(--paper); }
.person > div { flex: 1 1 auto; min-inline-size: 0; }
.person b { display: block; }
.person small { color: var(--sub); }
.person > button { flex: none; inline-size: auto; min-block-size: 40px; padding: 0 14px; font-size: calc(.9375rem * var(--fs)); }
.hist { margin: 8px 0 0; padding: 0; list-style: none; color: var(--sub); font-size: calc(.8125rem * var(--fs)); }
.hist li { display: flex; gap: 10px; padding: 7px 0; border-block-end: 1px dashed var(--line); line-height: 1.45; }
.hist li:last-child { border-block-end: 0; }
.hist time { flex: none; min-inline-size: 84px; font-variant-numeric: tabular-nums; }
details.more { margin: 10px 0; }
details.more > summary { cursor: pointer; min-block-size: 40px; display: flex; align-items: center; color: var(--accent); font-weight: 720; }
.sheet-bg { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: #1D214066; }
.sheet { inline-size: min(560px, 100%); max-block-size: 88vh; overflow: auto; padding: 20px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-hero) var(--radius-hero) 0 0; background: var(--bg); box-shadow: var(--shadow-toast); }
.sheet > h2 { margin-block-start: 0; }
.reasons { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; }
.reasons label { display: flex; align-items: center; gap: 10px; min-block-size: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); font-weight: 650; cursor: pointer; }
.reasons input { flex: none; inline-size: 20px; block-size: 20px; accent-color: var(--brand); }
.reasons label:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.locked { margin: 12px 0; padding: 16px; border: 1px dashed var(--edge); border-radius: var(--radius-card); color: var(--sub); line-height: 1.55; }
.locked b { display: block; margin-block-end: 4px; color: var(--ink); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.btnrow > button { flex: 1 1 auto; inline-size: auto; }
button.danger { color: var(--err-ink); }
.with-gap > * + * { margin-block-start: 8px; }
.msg.me.hidden { border-color: var(--edge); }
.msg.me.hidden .who, .msg.me.hidden .at { color: var(--sub); }

/* ---------------------------------------------------------------------
   작게 시작하기 · 함께하기 (비슷한 서비스 "오늘 한 걸음"에서 가져온 패턴)
   --------------------------------------------------------------------- */
.eyebrow { display: block; margin: 0 0 4px; color: var(--accent); font-size: calc(.75rem * var(--fs)); font-weight: 800; letter-spacing: .03em; }
.card.hero .eyebrow { color: var(--next-ink); }
.card.hero select { margin-block-end: 2px; }
.first { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 12px; padding: 12px; border: 1px solid var(--hero-edge); border-radius: var(--radius-step); background: var(--paper); }
.first .no { flex: none; display: grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--next-bg); color: var(--next-ink); font-size: 13px; font-weight: 800; }
.first b { display: block; line-height: 1.45; }
.first small { color: var(--sub); }
.cheerline { border-color: transparent; background: var(--bonus-bg); }
.cheerline .eyebrow { color: var(--bonus); }
.cheerline p { margin: 2px 0 0; color: var(--ink); font-size: calc(1.0625rem * var(--fs)); font-weight: 760; line-height: 1.5; }
.weekdots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 10px 0 6px; padding: 0; list-style: none; }
.weekdots li { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--sub); font-size: calc(.75rem * var(--fs)); }
.weekdots i { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--quiet); color: var(--sub); font-style: normal; font-weight: 800; }
.weekdots li.on i { background: var(--okSoft); color: var(--ok-text); }
.weekdots li.today span { color: var(--ink); font-weight: 800; }
.weekdots li.today i { outline: 2px solid var(--brand); outline-offset: 1px; }
.weekchips { flex-wrap: nowrap; margin-block-end: 10px; }
.weekchips > .chip { flex: 1 1 0; min-width: 0; padding-inline: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.weekchips > .chip small { font-size: 11px; opacity: .8; }
.prow .no { margin-inline-end: 6px; color: var(--sub); font-variant-numeric: tabular-nums; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-block-end: 10px; }
.choices > button { display: flex; justify-content: space-between; align-items: center; gap: 10px; inline-size: 100%; min-block-size: var(--tap); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); color: var(--ink); text-align: start; font-weight: 680; }
.choices > button::after { content: '→'; flex: none; color: var(--sub); }
.choices > button.on { border-color: var(--brand); background: var(--soft); }
.guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; counter-reset: guide; }
.guide li { counter-increment: guide; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-step); background: var(--paper); font-size: calc(.8125rem * var(--fs)); line-height: 1.4; }
.guide li::before { content: counter(guide); display: grid; place-items: center; inline-size: 22px; block-size: 22px; margin-block-end: 6px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 800; }
.guide li b { display: block; }
.guide li small { display: block; margin-block-start: 2px; color: var(--sub); }
.msg .tag { display: inline-block; margin: 0 0 4px; padding: 1px 8px; border-radius: 999px; background: var(--next-bg); color: var(--next-ink); font-size: 11px; font-style: normal; font-weight: 800; }
.msg.me .tag { background: color-mix(in srgb, var(--on-brand) 20%, transparent); color: var(--on-brand); }
