:root {
  --sky: #E6F3F7;
  --paper: #FFFFFF;
  --ink: #23305E;
  --ink-soft: #5B6690;
  --line: #C9D0E6;
  --sun: #FFC23C;
  --tomato: #FF6655;
  --leaf: #2FAE6E;
  --grape: #7B6CF6;
  --kid: #FFC23C;
  --pop: 0 4px 0 var(--ink);
  --display: 'Jua', 'Apple SD Gothic Neo', sans-serif;
  --body: 'Gowun Dodum', 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--sky);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.01em; }

/* ---------- 상단 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(230, 243, 247, .94);
  backdrop-filter: blur(6px);
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; margin-right: 8px; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2.5px solid var(--ink); background: var(--paper);
  border-radius: 999px; padding: 6px 14px;
  font-family: var(--display); font-size: 16px; white-space: nowrap;
  box-shadow: 0 3px 0 var(--ink);
}
.chip small { font-family: var(--body); font-size: 13px; color: var(--ink-soft); }
.chip[aria-current="true"] { background: var(--chipc, var(--sun)); }
.chip[aria-current="true"] small { color: var(--ink); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.chip .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--chipc); }
.spacer { flex: 1; }
.iconbtn { padding: 6px 12px; }

main { padding: 8px 16px 40px; max-width: 1280px; margin: 0 auto; outline: none; }

/* ---------- 아이 화면 상단: 남은 시간 ---------- */
.hero {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 20px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 28px;
  padding: 16px 22px; box-shadow: var(--pop);
}
.who { display: flex; align-items: center; gap: 12px; }
.who .partner { width: 64px; height: 64px; }
.who h1 { font-size: 30px; line-height: 1.1; white-space: nowrap; }
.who p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.count { text-align: center; min-width: 170px; }
.count .num { font-family: var(--display); font-size: 54px; line-height: 1; color: var(--leaf); font-variant-numeric: tabular-nums; }
.count .lbl { font-size: 15px; color: var(--ink-soft); }
.hero.warn .count .num { color: var(--tomato); }
.hero.hurry .count .num { animation: beat 1s ease-in-out infinite; }
.hero.off .count .num, .hero.done .count .num { color: var(--grape); font-size: 40px; }
@keyframes beat { 50% { transform: scale(1.08); } }

/* 집 → 학교 길 */
.road { position: relative; height: 92px; }
.road .track {
  position: absolute; left: 44px; right: 44px; top: 50px; height: 22px;
  background: #DDE3F2; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden;
}
.road .fill { height: 100%; background: repeating-linear-gradient(-45deg, var(--kid) 0 12px, color-mix(in srgb, var(--kid) 75%, #fff) 12px 24px); border-right: 2.5px solid var(--ink); transition: width .8s ease; }
.road .end { position: absolute; top: 34px; width: 44px; height: 50px; }
.road .end.home { left: 0; }
.road .end.school { right: 0; }
.road .walker { position: absolute; top: 0; width: 56px; height: 56px; margin-left: -28px; transition: left .8s ease; }
.road .walker svg { width: 100%; height: 100%; animation: hop 1.4s ease-in-out infinite; }
.road .walker.still svg { animation: none; }
@keyframes hop { 50% { transform: translateY(-5px); } }
.road .times { position: absolute; left: 44px; right: 44px; bottom: -6px; display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }

/* ---------- 준비물 ---------- */
.supplies {
  margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: #FFF6D6; border: 2.5px dashed var(--ink); border-radius: 18px; padding: 10px 16px;
}
.supplies h2 { font-size: 18px; }
.supplies .items { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.tag { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 2px 10px; font-size: 15px; }
.supplies .none { color: var(--ink-soft); }
.tag.pic { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px 2px; border-radius: 12px; font-size: 13px; line-height: 1.2; }
.tag.pic img, .tag.pic svg { height: 34px; width: auto; max-width: 64px; object-fit: contain; display: block; }
.supplies .next { font-size: 13px; color: var(--ink-soft); }

/* ---------- 루틴 카드 ---------- */
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 20px 4px 10px; }
.sec-h h2 { font-size: 22px; }
.sec-h span { color: var(--ink-soft); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card {
  position: relative; display: block; width: 100%; text-align: center; padding: 0;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; overflow: hidden;
  box-shadow: var(--pop); transition: transform .12s, box-shadow .12s;
}
.card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.card .art { position: relative; overflow: hidden; aspect-ratio: 1 / 1; border-bottom: 3px solid var(--ink); background: #F4EBDD; }
.card .art svg { display: block; width: 100%; height: 100%; }
.card .art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .art img.fg { object-fit: contain; }
.card .art img.bg { object-fit: cover; filter: blur(14px) saturate(1.1); transform: scale(1.15); opacity: .8; }
.card .name { font-family: var(--display); font-size: 21px; padding: 8px 8px 0; }
.card .state { font-size: 13px; color: var(--ink-soft); padding-bottom: 10px; }
.card .no {
  position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--ink); font-family: var(--display); font-size: 17px; line-height: 27px;
}
.card.done .art > * { filter: saturate(.35) brightness(1.08); }
.card.done .state { color: var(--leaf); font-weight: 700; }
.card .stamp {
  position: absolute; top: 28%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  font-family: var(--display); font-size: 34px; color: var(--leaf); background: var(--paper);
  border: 4px solid var(--leaf); border-radius: 16px; padding: 2px 16px; display: none; white-space: nowrap;
}
.card.done .stamp { display: block; animation: stamp .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-12deg) scale(2); opacity: 0; } }

.empty {
  text-align: center; background: var(--paper); border: 3px dashed var(--ink); border-radius: 24px; padding: 40px 20px; margin-top: 16px;
}
.empty h2 { font-size: 26px; margin-bottom: 6px; }
.empty p { color: var(--ink-soft); margin: 0 0 16px; }
.empty .partner { width: 110px; height: 110px; margin: 0 auto 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 9px 18px; background: var(--paper);
  font-family: var(--display); font-size: 17px; box-shadow: 0 3px 0 var(--ink);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--sun); }
.btn.danger { background: #FFE0DC; }
.btn.small { padding: 4px 10px; font-size: 14px; border-radius: 10px; }

/* ---------- 모두 보기 ---------- */
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 8px; }
.kidbox {
  text-align: left; background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; padding: 16px 18px;
  box-shadow: var(--pop); display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center;
  border-left: 14px solid var(--chipc);
}
.kidbox .partner { width: 72px; height: 72px; }
.kidbox h2 { font-size: 26px; }
.kidbox p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.kidbox .mini { height: 12px; background: #DDE3F2; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.kidbox .mini i { display: block; height: 100%; background: var(--chipc); }
.kidbox .left { font-family: var(--display); font-size: 30px; color: var(--leaf); text-align: right; line-height: 1.1; }
.kidbox .left small { display: block; font-family: var(--body); font-size: 13px; color: var(--ink-soft); }
.kidbox.warn .left { color: var(--tomato); }

/* ---------- 모두 보기(두 아이 한 화면) ---------- */
.duo { display: flex; flex-direction: column; gap: 12px; }
.hero.common { grid-template-columns: auto 1fr; padding: 10px 22px; }
.hero.common .road { height: 96px; }
.road .walkers { position: absolute; top: 0; height: 56px; display: flex; transform: translateX(-50%); transition: left .8s ease; }
.road .walkers span { width: 50px; height: 50px; margin: 0 -6px; display: block; }
.road .walkers svg { width: 100%; height: 100%; animation: hop 1.4s ease-in-out infinite; }
.road .walkers span:nth-child(2) svg { animation-delay: .7s; }
.road .walkers.still svg { animation: none; }
.road .flag { position: absolute; top: 76px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--ink); white-space: nowrap; z-index: 1; }
.road .flag i { width: 4px; height: 10px; border-radius: 2px; margin-top: -22px; margin-bottom: 10px; border: 1.5px solid var(--ink); }
.road .flag span { background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 0 6px; margin-top: -8px; }
.duocols { display: grid; grid-template-columns: repeat(var(--kids, 2), minmax(0, 1fr)); gap: 12px; }
.duorow { background: var(--paper); border: 3px solid var(--ink); border-left: 12px solid var(--chipc); border-radius: 22px; padding: 10px 12px 12px; box-shadow: var(--pop); }
.kidhead { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.kidhead .who { background: none; border: 0; padding: 0; text-align: left; flex: none; }
.kidhead .partner { width: 46px; height: 46px; display: block; }
.kidhead .partner svg { width: 100%; height: 100%; }
.kidhead b { display: block; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.kidhead small { display: block; font-size: 13px; color: var(--ink-soft); }
.kidhead .supplies { margin: 0; flex: 1; padding: 4px 10px; gap: 6px 10px; }
.kidhead .supplies h2 { font-size: 15px; }
.kidhead .tag.pic img, .kidhead .tag.pic svg { height: 26px; }
.kidhead .tag.pic { font-size: 11px; padding: 2px 6px 1px; }
.duorow .cards { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; }
.duorow .card { border-radius: 16px; }
.duorow .card .name { font-size: 18px; padding-top: 4px; }
.duorow .card .state { font-size: 12px; padding-bottom: 6px; }
.duorow .card .no { width: 30px; height: 30px; font-size: 16px; line-height: 25px; }

/* ---------- 공부 ---------- */
.study { display: grid; gap: 12px; max-width: 760px; }
.studyitem {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 14px 18px; box-shadow: var(--pop);
  font-family: var(--display); font-size: 22px;
}
.studyitem .box { width: 36px; height: 36px; border: 3px solid var(--ink); border-radius: 10px; flex: none; display: grid; place-items: center; }
.studyitem.done { background: #E3F6EA; }
.studyitem.done .box { background: var(--leaf); }
.studyitem.done .box::after { content: ''; width: 14px; height: 8px; border: solid #fff; border-width: 0 0 4px 4px; transform: rotate(-45deg) translate(1px, -2px); }
.studyitem.done span { text-decoration: line-through; text-decoration-thickness: 3px; color: var(--ink-soft); }

/* ---------- 도감 ---------- */
.dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.mon { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 8px 8px; text-align: center; }
.mon { position: relative; }
.mon .mon-img { width: 100%; height: auto; max-width: 120px; aspect-ratio: 1; margin: 16px auto 2px; }
.mon .mno { position: absolute; top: 6px; left: 10px; font-family: var(--display); font-size: 14px; }
.mon .mtype { position: absolute; top: 6px; right: 8px; font-size: 11px; background: #EEF1FA; border: 1.5px solid var(--ink); border-radius: 8px; padding: 0 6px; }
.mon-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 22%; }
.mon-img.sil { filter: grayscale(1) blur(5px); opacity: .35; }
.mon.locked::after { content: '?'; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font-family: var(--display); font-size: 44px; color: var(--ink-soft); }
.road .walker .mon-img, .road .walkers .mon-img { border-radius: 50%; border: 2.5px solid var(--ink); animation: hop 1.4s ease-in-out infinite; }
.road .walkers span:nth-child(2) .mon-img { animation-delay: .7s; }
.road .walker.still .mon-img, .road .walkers.still .mon-img { animation: none; }
.partner .mon-img, .partners .mon-img { border-radius: 50%; }
.sheet .reveal .mon-img { border-radius: 24px; border: 3px solid var(--ink); }
.mon .nm { font-family: var(--display); font-size: 17px; }
.mon .cnt { font-size: 12px; color: var(--ink-soft); }
.mon.locked { border-style: dashed; border-color: var(--line); background: transparent; }
.mon.locked .nm { color: var(--line); }
.dexhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 4px; }
.dexhead .bar { flex: 1; min-width: 160px; height: 16px; background: #DDE3F2; border: 2.5px solid var(--ink); border-radius: 99px; overflow: hidden; }
.dexhead .bar i { display: block; height: 100%; background: var(--grape); }

.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }

/* ---------- 설정 ---------- */
.panel { background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; padding: 18px 20px; margin-top: 14px; }
.panel h2 { font-size: 22px; margin-bottom: 4px; }
.panel > p.help { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }
.kidrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--line); }
.kidrow:first-of-type { border-top: 0; }
.kidrow .partner { width: 48px; height: 48px; flex: none; }
.kidrow .info { flex: 1; }
.kidrow b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.kidrow p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field > span { font-family: var(--display); font-size: 17px; }
.field input[type=text], .field input[type=time], .field select, .field textarea {
  border: 2.5px solid var(--ink); border-radius: 12px; padding: 9px 12px; background: #fff; font-size: 17px; min-height: 46px;
}
.field textarea { min-height: 70px; resize: vertical; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 140px; }
.swatches, .days { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.day { min-width: 44px; height: 40px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font-family: var(--display); font-size: 17px; }
.day[aria-pressed="true"] { background: var(--sun); }
.partners { display: flex; gap: 8px; flex-wrap: wrap; }
.partners button { width: 70px; height: 70px; border: 2.5px solid var(--line); border-radius: 16px; background: #fff; padding: 4px; }
.partners button[aria-pressed="true"] { border-color: var(--ink); background: #FFF1C2; box-shadow: 0 3px 0 var(--ink); }
.partners svg { width: 100%; height: 100%; }

.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.libitem { position: relative; border: 2.5px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; padding: 0; text-align: center; }
.libitem .lart { aspect-ratio: 1 / 1; overflow: hidden; }
.libitem svg, .libitem img { display: block; width: 100%; height: 100%; object-fit: cover; }
.libitem img.bg, .orderrow .thumb img.bg { display: none; }
.libitem .nm { font-family: var(--display); font-size: 15px; padding: 4px; }
.libitem[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.libitem .ord { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); border: 2.5px solid var(--ink); font-family: var(--display); line-height: 23px; display: none; }
.libitem[aria-pressed="true"] .ord { display: block; }

.order { display: grid; gap: 8px; }
.orderrow { display: flex; align-items: center; gap: 10px; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 8px; background: #fff; }
.orderrow .thumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; flex: none; border: 2px solid var(--ink); }
.orderrow .thumb svg, .orderrow .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orderrow .nm { flex: 1; font-family: var(--display); font-size: 17px; }
.orderrow .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.weekgrid { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: start; }
.weekgrid > b { font-family: var(--display); font-weight: 400; font-size: 18px; padding-top: 10px; text-align: center; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--line); }
.toggle:first-of-type { border-top: 0; }
.toggle b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.toggle p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.switch { width: 62px; height: 36px; border-radius: 99px; border: 2.5px solid var(--ink); background: #DDE3F2; position: relative; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--leaf); }
.switch[aria-checked="true"]::after { left: 28px; }
.formbar { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--sky) 30%); }

/* 쉬운 시간 고르기 */
.timepick { display: flex; align-items: stretch; gap: 8px; }
.tp-val { flex: 1; min-height: 56px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; font-family: var(--display); font-size: 26px; box-shadow: 0 3px 0 var(--ink); }
.tp-step { min-width: 64px; border: 2.5px solid var(--ink); border-radius: 14px; background: #EEF1FA; font-family: var(--display); font-size: 16px; }
.tp-val:active, .tp-step:active { transform: translateY(2px); }
.tpsheet { width: min(560px, 100%); }
.tpsheet h3 { font-size: 18px; text-align: left; margin: 14px 0 8px; }
.tp-now { font-family: var(--display); font-size: 40px; color: var(--leaf); }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.tp-grid button { height: 52px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; font-family: var(--display); font-size: 20px; line-height: 1; }
.tp-grid button small { display: block; font-family: var(--body); font-size: 11px; color: var(--ink-soft); }
.tp-grid button[aria-pressed="true"] { background: var(--sun); box-shadow: 0 3px 0 var(--ink); }

/* ---------- 모달 / 알림 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(35, 48, 94, .55); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.sheet { background: var(--paper); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); padding: 26px; width: min(440px, 100%); text-align: center; }
.sheet h2 { font-size: 30px; }
.sheet p { color: var(--ink-soft); margin: 6px 0 16px; }
.sheet .reveal { width: 180px; height: 180px; margin: 6px auto; animation: pop .7s cubic-bezier(.3, 1.6, .5, 1); }
.sheet .reveal svg { width: 100%; height: 100%; }
.sheet .monname { font-family: var(--display); font-size: 26px; color: var(--grape); }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(30px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 14px; transition: .25s; pointer-events: none; z-index: 60; font-size: 15px; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 16px; border: 2px solid var(--ink); border-radius: 3px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- 태블릿 가로 화면: 한 화면에 모두 보이게 ---------- */
@media (orientation: landscape) and (min-width: 900px) {
  main:has(.kidscreen) { padding-bottom: 14px; }
  .kidscreen { height: calc(100vh - var(--topH, 64px) - 22px); height: calc(100dvh - var(--topH, 64px) - 22px); min-height: 520px; display: flex; flex-direction: column; }
  .kidscreen .hero { flex: none; grid-template-columns: auto auto 1fr; padding: 12px 22px; }
  .kidscreen .count .num { font-size: clamp(48px, 6.4vh, 72px); }
  .kidscreen .who .partner { width: 72px; height: 72px; }
  .kidscreen .who h1 { font-size: 34px; }
  .kidscreen .supplies { flex: none; margin-top: 12px; padding: 8px 16px; }
  .kidscreen .sec-h { flex: none; margin: 12px 4px 8px; }
  .kidscreen .cards {
    flex: 1; min-height: 0;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
    gap: 14px; padding-bottom: 4px;
  }
  .kidscreen .card { display: flex; flex-direction: column; min-height: 0; align-self: start; max-height: 100%; }
  .kidscreen .card .art { flex: 0 1 auto; min-height: 0; aspect-ratio: 1 / 1; }
  .kidscreen .card .name { flex: none; font-size: clamp(18px, 3vh, 28px); padding-top: 6px; }
  .kidscreen .card .state { flex: none; font-size: 14px; padding-bottom: 8px; }
  .kidscreen .card .no { width: 38px; height: 38px; font-size: 20px; line-height: 33px; }
  .kidscreen .card .stamp { font-size: clamp(30px, 5vh, 48px); top: 40%; }
  .kidscreen .empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 0; }
  .overview { grid-template-columns: repeat(2, 1fr); }
  main:has(.duo) { padding-bottom: 10px; }
  .duo { height: calc(100vh - var(--topH, 64px) - 18px); height: calc(100dvh - var(--topH, 64px) - 18px); min-height: 560px; }
  .duo .hero.common { flex: none; }
  .duo .duocols { flex: 1; min-height: 0; }
  .duo .duorow { min-height: 0; display: flex; flex-direction: column; }
  .duorow .kidhead { flex: none; }
  .duorow .cards { flex: 1; min-height: 0; grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); }
  .duorow .card { display: flex; flex-direction: column; min-height: 0; align-self: start; max-height: 100%; }
  .duorow .card .art { flex: 0 1 auto; min-height: 0; aspect-ratio: 1 / 1; }
  .duorow .card .name, .duorow .card .state { flex: none; }
  .duorow .card .stamp { font-size: 28px; top: 40%; }
  .study { grid-template-columns: repeat(2, 1fr); max-width: none; }
  .dex { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr auto; gap: 10px 14px; padding: 14px; }
  .hero .road { grid-column: 1 / -1; }
  .count .num { font-size: 36px; }
  .who h1 { font-size: 24px; }
  .who .partner { width: 48px; height: 48px; }
  .count { min-width: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .name { font-size: 18px; }
  .kidbox { grid-template-columns: 56px 1fr auto; }
  .kidbox .partner { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
