/* docs의 참고 이미지: 파란 하늘, 초록 들판, 크림색 카드와 왕관. */
.storybook-theme {
  --ink: #54321f;
  --muted: #79634e;
  --green: #377c31;
  --green-dark: #2a6626;
  --paper: #fffbed;
  --gold: #efb632;
  color: var(--ink);
  background: #91d9f3 url('../images/theme/meadow.svg') center bottom / cover fixed no-repeat;
}
.storybook-theme :is(h1, h2, h3, strong, .button, label) { font-weight: 800; }
.storybook-theme :is(a, button, input, select, summary):focus-visible { outline: 3px solid #185eb5; outline-offset: 5px; }
.storybook-theme .button {
  border: 3px solid #fff8d9;
  border-radius: 24px;
  background: linear-gradient(#ffe679, #ffc235);
  box-shadow: 0 4px 0 #bc7d25, inset 0 0 0 2px #e9a93c, 0 8px 12px #7f67251c;
  color: #633a17;
  font-weight: 800;
  transition: transform .18s, filter .18s;
}
.storybook-theme .button:hover { background: linear-gradient(#ffec97, #ffcc4d); filter: brightness(1.03); transform: translateY(-2px); }
.storybook-theme .button:active { transform: translateY(3px); box-shadow: 0 1px 0 #bc7d25, inset 0 0 0 2px #e9a93c; }
.storybook-theme .button-outline {
  background: linear-gradient(#65c9ff, #2298eb);
  box-shadow: 0 4px 0 #2074b5, inset 0 0 0 2px #1287d6;
  color: #fff;
}
.storybook-theme .button-outline:hover { background: linear-gradient(#84d7ff, #339fef); }
.storybook-theme .button-muted { background: #e3efc4; box-shadow: 0 3px 0 #9cbf75; color: #38602b; }
.storybook-theme :is(input:not([type='hidden']):not([type='radio']):not([type='checkbox']), select) {
  border: 2px solid #e7cb91;
  border-radius: 16px;
  background-color: #fffef9;
  color: var(--ink);
}
.storybook-theme :is(input, select):focus { border-color: #379fdf; }
.storybook-theme .soft-badge {
  padding: 9px 15px;
  border: 2px solid #fffdf0;
  border-radius: 18px;
  background: #fff1af;
  color: #70491d;
  font-weight: 700;
  box-shadow: 0 3px 0 #dfb848;
}
.storybook-theme :is(.panel, .stat-card) {
  border: 4px solid #ffe38a;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 5px 0 #c7a34a66, inset 0 0 0 2px #fffef7;
}
.storybook-theme .eyebrow { color: #996321; font-weight: 800; }
.storybook-theme .field-note { color: #786349; }
.storybook-theme .avatar { background: #ffe16c; color: #75451d; border: 2px solid #fff7d8; box-shadow: 0 2px 0 #c7a04d; }
.storybook-theme .icon-button { border: 2px solid #fff7d9; background: #fff2bb; color: #805221; box-shadow: 0 3px 0 #d1b35e; }
.storybook-theme .icon-button:hover { background: #ffe583; }

/* 처음에는 로고와 로그인만 크게 보여 줍니다. */
.storybook-theme .welcome-page { padding: 28px 24px 60px; }
.welcome-entry { position: relative; z-index: 1; width: min(100%, 420px); }
.storybook-theme .welcome-logo { display: flex; flex-direction: column; gap: 0; margin: 0 0 24px; }
.storybook-theme .welcome-logo img { display: block; width: min(100%, 400px); height: auto; filter: drop-shadow(0 5px 0 #3f95af22); }
.storybook-theme .welcome-logo small {
  position: relative;
  margin-top: -3px;
  padding: 8px 30px;
  border: 3px solid #fffef1;
  border-radius: 30px;
  background: #fff0b4;
  color: #6c3d20;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 4px 0 #d2ad5d40;
}
.storybook-theme .welcome-card { width: 100%; padding: 30px 32px 24px; border: 5px solid #ffe18a; border-radius: 35px; background: #fffbed; box-shadow: 0 7px 0 #bb8b3f55, inset 0 0 0 3px #fffef6, 0 18px 32px #325f4830; }
.storybook-theme .welcome-form { margin: 0 0 20px; gap: 20px; }
.storybook-theme .welcome-form label { font-size: 15px; color: #6c4829; }
.storybook-theme .welcome-form input:not([type='hidden']) { min-height: 56px; background: #fffef9; font-size: 17px; box-shadow: inset 0 2px 3px #92764c0c; }
.storybook-theme .welcome-form input::placeholder { color: #8d7b69; font-size: 14px; }
.storybook-theme .welcome-form .button { min-height: 58px; font-size: 20px; }
.storybook-theme .welcome-switch { font-size: 14px; color: #856b4e; }
.storybook-theme .welcome-switch a { color: #236f9b; }
.storybook-theme .welcome-field-note { color: #856b4e; }
.storybook-theme .welcome-signup-title { margin: 0 0 24px; color: #7e4c27; font-size: 23px; }
.welcome-friend { position: absolute; bottom: 5%; right: max(4%, calc((100vw - 1120px) / 2)); width: clamp(130px, 19vw, 250px); height: auto; pointer-events: none; transform: rotate(8deg); }

/* 모든 기능의 상단에는 같은 로고와 돌아가기 버튼을 둡니다. */
.storybook-theme.game-body .topbar {
  position: relative;
  min-height: 110px;
  padding: 16px max(24px, calc((100vw - 1200px) / 2));
  border: 0;
  background: linear-gradient(#ffffff35, #ffffff00);
}
.storybook-theme.game-body .main-content { padding-top: 18px; padding-bottom: 70px; }
.storybook-theme .brand { display: flex; flex-direction: column; gap: 0; width: 180px; flex-shrink: 0; }
.storybook-theme .brand img { width: 100%; height: auto; }
.storybook-theme .brand small { display: block; margin: -1px 0 0; padding: 3px 13px 4px; background: #fff3bd; border: 2px solid #fffdf1; border-radius: 20px; color: #6d442b; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.game-header-logo { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 190px; height: auto; }
.storybook-theme .game-back { border: 3px solid #fffbea; border-radius: 28px; background: linear-gradient(#ffe378, #ffc139); color: #754719; box-shadow: 0 4px 0 #b7832d, inset 0 0 0 2px #e2ac40; }
.storybook-theme .game-back .icon { width: 25px; height: 25px; fill: #fff6d6; stroke-width: 2.5; }
.storybook-theme .game-back:hover { background: #ffdf77; }
.storybook-theme .game-player { padding: 10px 14px; background: #fffbeeeb; border: 2px solid #fff; border-radius: 22px; color: #456b2f; box-shadow: 0 3px 0 #639d8240; }
.storybook-theme .game-player > span { max-width: 180px; }
.storybook-theme .child-select-form { padding: 6px; border-radius: 30px; background: #fffbee; border: 2px solid #fff; box-shadow: 0 3px 0 #639d8240; }
.storybook-theme .child-select-form select { border: 0; background-color: transparent; font-weight: 700; }
.storybook-theme .page-heading, .storybook-theme .quest-intro { padding: 24px 28px; border: 4px solid #fffdf0; border-radius: 32px; background: #fff9df; box-shadow: 0 5px 0 #d5ba5b70; }
.storybook-theme .page-heading h1, .storybook-theme .quest-intro h1 { color: #634125; }
.storybook-theme .page-heading p:not(.eyebrow), .storybook-theme .quest-intro p:last-child { color: #816647; }

/* 둥근 메뉴는 실제 링크를 유지하고 색과 입체감을 입힙니다. */
.storybook-theme.menu-home-body .main-content { padding: 20px 28px 66px; }
.storybook-theme .home-menu { width: min(100%, 810px); gap: 34px 65px; }
.storybook-theme .home-menu-button {
  --menu-fill: #ffe783;
  --menu-edge: #ffc13e;
  --menu-shadow: #bd8529;
  --menu-ink: #734018;
  max-width: 220px;
  border: 7px solid #fff9de;
  background: radial-gradient(circle at 36% 25%, #ffffff80, transparent 62%), linear-gradient(var(--menu-fill), var(--menu-edge));
  box-shadow: 0 8px 0 var(--menu-shadow), inset 0 0 0 3px var(--menu-edge), inset 0 6px 0 #ffffff65, 0 14px 18px #426d3b26;
  font-size: 22px;
  font-weight: 900;
  color: var(--menu-ink);
  gap: 14px;
}
.storybook-theme .home-menu-button .icon { width: 66px; height: 66px; stroke-width: 2.1; fill: #ffffff55; filter: drop-shadow(0 3px 0 #ffffff5e); }
.storybook-theme .home-menu-button:hover, .storybook-theme .home-menu-button:focus-visible { transform: translateY(-6px) rotate(-2deg); box-shadow: 0 14px 0 var(--menu-shadow), inset 0 0 0 3px var(--menu-edge), inset 0 6px 0 #ffffff65, 0 20px 20px #426d3b26; }
.storybook-theme .home-menu-button:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--menu-shadow), inset 0 0 0 3px var(--menu-edge); }
.storybook-theme .home-menu-learn { --menu-fill: #ffbece; --menu-edge: #ff819b; --menu-shadow: #be5771; --menu-ink: #843247; }
.storybook-theme .home-menu-words { --menu-fill: #d4bcff; --menu-edge: #b38ce9; --menu-shadow: #7752ac; --menu-ink: #593585; }
.storybook-theme .home-menu-records { --menu-fill: #9ee5ff; --menu-edge: #53b8f0; --menu-shadow: #2c81b5; --menu-ink: #1b557c; }
.storybook-theme .home-menu-garden { --menu-fill: #c9ef8c; --menu-edge: #91c956; --menu-shadow: #5a8b33; --menu-ink: #3c6328; }
.storybook-theme .home-menu-children { --menu-fill: #ffdba3; --menu-edge: #ffb76a; --menu-shadow: #b5793c; --menu-ink: #7d4b23; }

/* 학습 카드는 그림책의 크림색 종이와 선명한 색 테두리를 사용합니다. */
.storybook-theme .quest-reward { border: 3px solid #fff; background: #ffe88c; color: #795122; box-shadow: 0 4px 0 #dfb348; }
.storybook-theme .quest-card { border: 5px solid #fff9df; border-radius: 36px; }
.storybook-theme .quest-card.peach { background: #ffdf9b; box-shadow: 0 8px 0 #bd8a38; }
.storybook-theme .quest-card.mint { background: #c4eaa0; box-shadow: 0 8px 0 #77a752; }
.storybook-theme .quest-card.lavender { background: #ddc7fb; box-shadow: 0 8px 0 #9a76bf; }
.storybook-theme .quest-card .activity-art { background: #fffbedb3; border: 3px solid #fff8de; border-radius: 28px; }
.storybook-theme .quest-card h2 { color: #6d4426; }
.storybook-theme .quest-card > p, .storybook-theme .quest-number { color: #765b3d; }
.storybook-theme .quest-stars { color: #b58222; }
.storybook-theme .quest-stars .icon { fill: #ffe368; }
.storybook-theme .quest-start { border: 2px solid #fff; border-radius: 22px; background: #fffbed; color: #684021; box-shadow: 0 4px 0 #936a3133; }
.storybook-theme .category-tag { border: 2px solid #fffaf0; font-weight: 800; }
.storybook-theme .category-tag.peach { background: #ffbc91; color: #793e1d; }
.storybook-theme .category-tag.mint { background: #b4dd86; color: #345725; }
.storybook-theme .category-tag.lavender { background: #c7acec; color: #573477; }
.storybook-theme .back-link { padding: 8px 15px; background: #fffbed; border: 2px solid #fff; border-radius: 25px; color: #78502b; }
.storybook-theme .lesson-setup { background: #fffbed; border-color: #ffe18b; box-shadow: 0 7px 0 #c6a24c88; }
.storybook-theme .lesson-setup > p:not(.eyebrow), .storybook-theme .mode-picker legend { color: #7b654c; }
.storybook-theme .mode-picker label > span { background: #fffef8; border: 3px solid #e6d8b8; color: #7a654e; }
.storybook-theme .mode-picker input:checked + span { background: #e2f5ff; border-color: #4baeea; color: #236e9c; box-shadow: 0 4px 0 #3b99d54d; }
.storybook-theme .mission-board { border: 3px solid #ffdf7a; background: #fffae8; box-shadow: 0 4px 0 #c9a84c50; }
.storybook-theme .mission-board-label { color: #785122; }
.storybook-theme .mission-trail li > span { border-color: #e7d8b8; background: #f2ead8; }
.storybook-theme .mission-trail li:not(:last-child)::after { border-color: #e5cc92; }
.storybook-theme .mission-trail .is-current > span { border-color: #42a9e6; background: #e2f6ff; color: #217bb4; box-shadow: 0 0 0 4px #b3e7ff; }
.storybook-theme .mission-trail .is-complete > span { border-color: #dfab31; background: #ffdd63; color: #aa7216; }
.storybook-theme .mission-trail .is-complete .icon { fill: #ffec98; }
.storybook-theme .lesson-progress { padding: 13px 20px; border: 2px solid #fff; border-radius: 20px; background: #fffbeda; }
.storybook-theme .lesson-progress > div { color: #725437; }
.storybook-theme .question-heading { padding: 18px 22px; background: #fff9df; border: 3px solid #fff; border-radius: 26px; gap: 16px; }
.storybook-theme .question-heading h1 { font-size: clamp(23px, 2.6vw, 31px); color: #603b25; }
.storybook-theme .scene-panel { background: #fffbed; border: 5px solid #ffe183; box-shadow: 0 5px 0 #bc984a66, inset 0 0 0 2px #fff; }
.storybook-theme .scene-panel > img { background: #fffdf4; border: 2px solid #f8e9b8; border-radius: 22px; }
.storybook-theme .scene-panel > img.is-photo { height: clamp(220px, 30vw, 360px); object-fit: contain; }
.storybook-theme .scene-panel > video { width: 100%; max-width: 440px; height: auto; aspect-ratio: 25 / 18; object-fit: contain; background: #fffdf4; border: 2px solid #f8e9b8; border-radius: 22px; }
.storybook-theme .scene-video-toggle { margin: 10px 0 4px; }
.storybook-theme .answer-option.has-photo { flex-direction: column; gap: 10px; }
.storybook-theme .answer-option > img.is-photo { width: 100%; height: 125px; object-fit: contain; border-radius: 10px; }
.storybook-theme #story-sentence { color: #6e4529; font-weight: 700; }
.storybook-theme .scene-panel > span { color: #8c7759; }
.storybook-theme .answer-panel { border: 4px solid #fff1b6; background: #fffbed; box-shadow: 0 5px 0 #bc984a66; }
.storybook-theme .answer-instruction { color: #7a5734; font-weight: 800; }
.storybook-theme .answer-option { border: 3px solid #ead9b5; border-radius: 22px; background: #fffef7; box-shadow: 0 4px 0 #d7bc83; color: #654128; }
.storybook-theme .answer-option:hover:not(:disabled) { border-color: #f3bb3c; background: #fff2be; transform: translateY(-2px); }
.storybook-theme .answer-option.correct { background: #d7efad; border-color: #81b946; box-shadow: 0 4px 0 #71a739; }
.storybook-theme .answer-option.try-again { background: #fff0d0; border-color: #dda94f; }
.storybook-theme .text-button { border: 2px solid #f4d76f; background: #fff0ab; color: #80551d; font-weight: 700; }
.storybook-theme #listen-model { background: #dff2ff; border-color: #9fd8f4; color: #2874a0; }
.storybook-theme .hint-box { background: #fff2b5; color: #78501c; border-radius: 14px; }
.storybook-theme .practice-details { background: #fffbed; border: 3px solid #fff2be; border-radius: 22px; }
.storybook-theme .learning-note { padding: 12px 16px; border-radius: 15px; background: #fffbedee; color: #776447; }
.storybook-theme .lesson-result { background: #fffbed; border: 5px solid #ffdf78; box-shadow: 0 7px 0 #c19a45; }
.storybook-theme .reward-leaves { background: #def0b4; color: #456a27; }
.storybook-theme .correct-popup:not(.wrong-popup) .correct-popup-card { border: 5px solid #ffe180; box-shadow: 0 9px 0 #d49e40, 0 20px 60px #3c6b4a44; }

/* 단어 수집, 기록과 나무도 같은 그림책 안에 담습니다. */
.storybook-theme .tabs { border: 0; }
.storybook-theme .tabs :is(a, button) { border: 3px solid #fff8dc; background: #fffbed; color: #765533; box-shadow: 0 3px 0 #c7aa60; font-weight: 700; }
.storybook-theme .tabs .active { background: #49aff0; color: #fff; box-shadow: 0 3px 0 #277fb6; }
.storybook-theme .word-card { background: #fffbed; border-color: #f3da92; }
.storybook-theme .word-card.is-collected { border-color: #9dcb5f; background: #fcffe9; }
.storybook-theme .word-card p { color: #796448; }
.storybook-theme .word-card .icon-button { background: #62bdf2; color: #fff; border-color: #fff; box-shadow: 0 3px 0 #398bc3; }
.storybook-theme .collection-stamp { background: #eee4cd; color: #7c6747; }
.storybook-theme .is-collected .collection-stamp { background: #d8eea9; color: #3f7027; }
.storybook-theme .stat-card { background: #fffbed; border-color: #fff3ba; }
.storybook-theme .stat-card:nth-child(1) { border-color: #a8d985; }
.storybook-theme .stat-card:nth-child(2) { border-color: #ffb2bd; }
.storybook-theme .stat-card:nth-child(3) { border-color: #9fd9f7; }
.storybook-theme .chart-panel { border-color: #70c9f4; }
.storybook-theme .compare-panel { border-color: #ffb0bd; }
.storybook-theme .bar-track { max-width: 68px; background: #ede7d8; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px #e3d3b1; overflow: visible; }
.storybook-theme .bar { width: 82%; max-width: none; border-radius: 9px 9px 6px 6px; background-image: repeating-linear-gradient(to top, transparent 0, transparent 27px, #fff9 27px, #fff9 30px); }
.storybook-theme .bar.peach { background-color: #fb7f94; }
.storybook-theme .bar.mint { background-color: #8cc85b; }
.storybook-theme .bar.lavender { background-color: #a88ae4; }
.storybook-theme .bar-column:nth-child(4n + 2) .bar { background-color: #ffd24c; }
.storybook-theme .bar-column:nth-child(4n + 4) .bar { background-color: #54b8f3; }
/* 기록의 작은 글씨도 크림색 바탕에서 충분히 진하게 읽힙니다. */
.storybook-theme :is(.stat-card > div > span, .compare-panel > p, .section-heading p, .chart-grid, .bar-column > span, .bar-column > small, .table-note) { color: #7b674e; }
.storybook-theme .stat-card > div > span { font-size: 13px; }
.storybook-theme .bar b { color: #704a2b; font-size: 12px; top: -24px; font-weight: 800; }
.storybook-theme .bar-column > span { font-size: 12px; }
.storybook-theme .bar-column > small { font-size: 10px; }
.storybook-theme .compare-panel > p { font-size: 13px; }
.storybook-theme th { background: #fff1c6; color: #805a31; font-size: 12px; }
.storybook-theme td { color: #715a41; font-size: 12px; border-color: #eee1be; }
.storybook-theme .growth-step { color: #7d6c50; }
.storybook-theme .growth-step.reached { color: #416f2d; }
.storybook-theme .garden-progress > span, .storybook-theme .garden-progress > div > span { color: #6b7047; }
.storybook-theme .compare-values { align-items: center; gap: 12px; }
.storybook-theme .compare-values > div { padding: 15px 12px; border: 2px solid #ffa5b6; border-radius: 20px; background: #ffe3e7; }
.storybook-theme .compare-values > div:last-child { border-color: #86d1f5; background: #dbf1ff; }
.storybook-theme .compare-values > div:first-child strong { color: #a3425b; }
.storybook-theme .compare-values small { color: #715641; font-size: 12px; }
.storybook-theme .compare-values > div:last-child strong { color: #227cad; }
.storybook-theme .compare-note { background: #fff0b6; color: #775328; }
.storybook-theme .garden-display { border: 5px solid #fff7c8; border-radius: 36px; background: #9cddf3 url('../images/theme/meadow.svg') center bottom / cover no-repeat; box-shadow: 0 6px 0 #789f46; }
.storybook-theme .garden-cloud { display: none; }
.storybook-theme .garden-title { position: relative; z-index: 1; display: table; margin-inline: auto; padding: 16px 25px; border: 3px solid #fffef1; border-radius: 28px; background: #fff8ddeb; }
.storybook-theme .garden-title h2 { color: #577428; }
.storybook-theme .garden-title p { color: #795e3d; }
.storybook-theme .garden-display > img { position: relative; z-index: 1; filter: drop-shadow(0 5px 0 #507e3422); }
.storybook-theme .garden-progress { position: relative; z-index: 1; border: 3px solid #fffdf1; background: #fffbedf5; color: #587535; }
.storybook-theme .growth-stages { gap: 10px; }
.storybook-theme .growth-stages::before { display: none; }
.storybook-theme .growth-step { padding: 14px 10px; border: 3px solid #fff5cb; border-radius: 24px; background: #fffbed; }
.storybook-theme .growth-step.reached { border-color: #a5d664; background: #f3ffd6; }
.storybook-theme .growth-step::before, .storybook-theme .growth-step::after { display: none; }
.storybook-theme .growth-step > span { color: #8a6a3e; background: #f0e4c8; border-color: #fff9e5; }
.storybook-theme .growth-step.reached > span { background: #bfe481; color: #466b22; }
.storybook-theme .child-card { background: #fffbed; }

@media (max-width: 900px) {
  .storybook-theme .home-menu { gap: 32px; }
  .welcome-friend { right: 0; width: 150px; bottom: 2%; }
  .game-header-logo { width: 150px; top: 20px; }
  .storybook-theme .game-player > span { max-width: 140px; }
}
@media (max-width: 720px) {
  .storybook-theme { background-position: 48% bottom; }
  .storybook-theme.game-body .topbar { min-height: 90px; padding: 12px 16px; gap: 8px; }
  .game-header-logo { display: none; }
  .storybook-theme .game-back { padding: 10px 12px; gap: 6px; font-size: 13px; }
  .storybook-theme .game-player { padding: 8px 10px; font-size: 11px; }
  .storybook-theme .game-player > span { max-width: 100px; }
  .storybook-theme.game-body .main-content { padding: 12px 16px 45px; }
  .storybook-theme .page-heading, .storybook-theme .quest-intro { padding: 20px; border-radius: 26px; }
  .storybook-theme .page-heading p:not(.eyebrow), .storybook-theme .quest-intro p:last-child { font-size: 14px; }
  .storybook-theme .quest-reward { padding: 12px; }
  .storybook-theme .brand { width: 130px; }
  .storybook-theme .brand small { font-size: 9px; padding: 2px 8px; }
  .storybook-theme .child-select-form { padding: 4px; gap: 3px; }
  .storybook-theme .child-select-form .avatar { width: 30px; height: 30px; font-size: 13px; }
  .storybook-theme .child-select-form select { font-size: 11px; max-width: 100px; padding-left: 2px; }
  .storybook-theme .account-actions { gap: 7px; }
  .storybook-theme .account-actions .icon-button { width: 36px; height: 36px; }
  .storybook-theme .question-heading { padding: 16px; }
  .storybook-theme .question-heading h1 { font-size: 24px; }
  .storybook-theme .answer-option { border-width: 2px; }
  .storybook-theme .garden-title { padding: 13px 15px; }
  .storybook-theme .garden-title p { font-size: 12px; }
  .storybook-theme .growth-stages { display: flex; flex-wrap: wrap; justify-content: center; }
  .storybook-theme .growth-step { flex: 0 1 calc(33.333% - 10px); min-width: 85px; padding: 12px 6px; }
  .storybook-theme .growth-step strong { font-size: 12px; }
}
@media (max-width: 600px) {
  .storybook-theme .welcome-page { padding: 28px 20px 85px; }
  .storybook-theme .welcome-logo { margin-bottom: 20px; }
  .storybook-theme .welcome-logo img { width: 310px; max-width: 100%; }
  .storybook-theme .welcome-logo small { padding: 6px 23px; font-size: 14px; }
  .storybook-theme .welcome-card { padding: 25px 22px 20px; border-radius: 30px; }
  .storybook-theme .welcome-form { gap: 18px; }
  .welcome-friend { display: none; }
  .storybook-theme .home-menu { max-width: 390px; gap: 27px 22px; }
  .storybook-theme .home-menu-button { border-width: 5px; font-size: 17px; gap: 11px; }
  .storybook-theme .home-menu-button .icon { width: 47px; height: 47px; }
}
@media (max-width: 380px) {
  .storybook-theme .brand { width: 112px; }
  .storybook-theme .child-select-form select { max-width: 76px; }
  .storybook-theme .child-select-form .avatar { display: none; }
  .storybook-theme .home-menu { gap: 25px 16px; }
  .storybook-theme .home-menu-button { font-size: 15px; }
  .storybook-theme .home-menu-button .icon { width: 40px; height: 40px; }
  .storybook-theme .game-player > span { max-width: 75px; }
  .storybook-theme .welcome-page { padding-inline: 16px; }
  .storybook-theme .welcome-card { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .storybook-theme .button, .storybook-theme .home-menu-button { transition: none; }
  .storybook-theme .home-menu-button:hover, .storybook-theme .home-menu-button:focus-visible { transform: none; }
}

/* 보호자·치료사 공간과 단계별 학습 도움 */
.storybook-theme .home-menu-therapist { --menu-fill: #ffc5d7; --menu-edge: #f794b5; --menu-shadow: #b75d82; --menu-ink: #813653; }
.storybook-theme .parent-word-editor, .storybook-theme .parent-word-library, .storybook-theme .therapy-notes { margin-top: 28px; }
.storybook-theme .parent-word-editor > p { margin-top: 12px; color: #765d44; }
.storybook-theme .parent-word-editor label { display: grid; gap: 8px; }
.storybook-theme input[type='file'] { width: 100%; min-width: 0; font-size: 13px; padding: 12px; }
.storybook-theme input::file-selector-button { padding: 8px; margin-right: 10px; border: 0; border-radius: 10px; background: #dff2ff; color: #236e9c; }
.parent-word-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.parent-word-card { display: grid; gap: 8px; padding: 18px; border: 2px solid #edda99; border-radius: 22px; background: #fffdf5; }
.parent-word-card img { width: 100%; height: 140px; object-fit: contain; }
.parent-word-card span, .parent-word-card p { font-size: 13px; color: #796344; overflow-wrap: anywhere; }
.therapy-editors { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; }
.storybook-theme textarea { width: 100%; padding: 14px; border: 2px solid #e7cb91; border-radius: 16px; background: #fffef9; color: #54321f; font: inherit; resize: vertical; }
.storybook-theme textarea:focus-visible { outline: 3px solid #185eb5; outline-offset: 3px; }
.therapy-notes article { padding: 18px 0; border-bottom: 1px solid #e7d6ad; }
.therapy-notes time { display: block; font-size: 12px; color: #816a4f; }
.therapy-notes article p { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.patient-search { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.patient-search input { flex: 1; min-width: 140px; }
.list-count, .saved-message { margin: 20px 0; padding: 12px 20px; border-radius: 18px; background: #fff9df; color: #785635; }
.pagination { display: flex; justify-content: center; gap: 16px; margin: 24px 0 8px; }
.difficulty-picker { display: flex; gap: 12px; border: 0; margin: 22px 0 12px; padding: 0; }
.difficulty-picker legend { width: 100%; margin-bottom: 14px; font-size: 15px; color: #745337; }
.difficulty-picker label { flex: 1; position: relative; }
.difficulty-picker input { position: absolute; opacity: 0; }
.difficulty-picker span { display: grid; gap: 4px; padding: 14px 8px; border: 3px solid #e6d8b8; border-radius: 20px; background: #fffdf5; color: #6d553d; }
.difficulty-picker input:checked + span { border-color: #efa929; background: #fff0a7; box-shadow: 0 3px 0 #c69939; }
.difficulty-picker input:focus-visible + span { outline: 3px solid #185eb5; outline-offset: 4px; }
.storybook-theme .sentence-hint-audio { min-height: 32px; padding: 5px 10px; background: #fffdf1; border: 1px solid #ba841c; border-radius: 10px; color: #795016; font-size: 12px; font-weight: 700; }
.picture-hint-note { padding: 11px 13px; margin-bottom: 16px; border: 2px solid #68b7e5; border-radius: 14px; background: #e1f3ff; color: #28658d; font-weight: 700; font-size: 14px; }
.uncollected-word { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; min-height: 285px; color: #8b795e; }
.uncollected-word > span { width: 70%; height: 155px; border: 3px dashed #e1d6bc; border-radius: 24px; background: #f7f0df; }
.storybook-theme .word-card:not(.is-collected) { background: #fffbee; border-style: dashed; }
.review-link { margin: 20px 0 26px; }
.review-card { display: flex; flex-direction: column; gap: 18px; }
.review-card .button { margin-top: auto; }
.storybook-theme .record-words { flex-wrap: wrap; max-width: 420px; }
@media (max-width: 720px) {
  .parent-word-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .parent-word-card { padding: 12px; }
  .parent-word-card img { height: 100px; }
  .therapy-editors { grid-template-columns: 1fr; }
  .patient-search label { width: 100%; }
  .difficulty-picker { gap: 8px; }
  .difficulty-picker span { font-size: 13px; padding-inline: 5px; }
}
@media (max-width: 380px) { .parent-word-list { grid-template-columns: 1fr; } }

.storybook-theme .mission-trail .is-last-visible::after { display: none; }
.storybook-theme.game-page-children .page-heading > .button { display: inline-flex; }

/* 가입한 계정 종류를 로그인과 회원가입 양쪽에서 분명하게 표시합니다. */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; padding: 5px; border: 2px solid #eddda8; border-radius: 22px; background: #f5edda; }
.auth-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 9px 6px; border: 2px solid transparent; border-radius: 16px; color: #796448; font-size: 14px; font-weight: 800; }
.auth-tab .icon { width: 19px; height: 19px; flex-shrink: 0; }
.auth-tab:hover { background: #fff8df; }
.auth-tab.is-active { border-color: #e9b842; background: #ffe79a; color: #70491f; box-shadow: 0 3px 0 #cbac5e; }
.therapist-auth-card .auth-tab.is-active { border-color: #ee95b0; background: #ffd7e4; color: #833750; box-shadow: 0 3px 0 #c7819c; }
.storybook-theme .welcome-auth-title { margin: 0 0 22px; font-size: 22px; text-align: center; color: #70491f; }
.storybook-theme .therapist-auth-card .welcome-auth-title { margin-bottom: 10px; color: #833750; }
.auth-role-note { margin-bottom: 24px; color: #7c6257; font-size: 12px; text-align: center; line-height: 1.7; }
.therapist-login-switch { margin-bottom: 20px; }
@media (max-width: 380px) {
  .auth-tabs { gap: 4px; padding: 4px; }
  .auth-tab { gap: 4px; padding-inline: 4px; font-size: 13px; }
  .auth-tab .icon { width: 16px; height: 16px; }
}


/* 말로 답한 내용과 실제 녹음을 함께 확인합니다. */
.storybook-theme .speech-answer-button { width: 100%; min-height: 58px; margin-top: 8px; }
.storybook-theme .speech-answer-button.recording { background: #ffe0d3; border-color: #df866a; color: #833c2c; }
.storybook-theme .speech-response { margin: 18px 0; padding: 18px; border: 2px solid #e5cc8f; border-radius: 18px; background: #fffdf4; }
.storybook-theme .speech-response-label { color: #755a3c; font-size: 13px; }
.storybook-theme #speech-transcript { margin: 10px 0; font-size: 20px; font-weight: 800; line-height: 1.6; overflow-wrap: anywhere; }
.storybook-theme #answer-recording { display: block; width: 100%; min-width: 0; margin-top: 14px; }
.storybook-theme #next-speech-question { width: 100%; margin: 8px 0; }
.storybook-theme #recognition-status { color: #69533a; line-height: 1.8; }
.storybook-theme #speech-answer .speech-consent { color: #796348; font-size: 12px; }

.storybook-theme .hint-box strong { display: block; font-size: 16px; margin-bottom: 8px; }
.storybook-theme .hint-box p { margin: 0; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }

.record-delete-panel { margin-top: 24px; }
.record-delete-panel p { line-height: 1.7; }
.record-delete-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.record-delete-actions .button-delete { background: #a63030; border-color: #a63030; color: #fff; box-shadow: 0 3px 0 #792222; }
.record-delete-actions .button-delete:hover { background: #862626; border-color: #862626; }

.child-profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
