* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #243b37; --green: #276951; --line: #d8e3db; }
body { margin: 0; background: #f6f8f3; color: var(--ink); font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .6; cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #14769c; outline-offset: 4px; }
button { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px 18px; min-height: 48px; }
button:hover { border-color: #699b81; }
.app-header { max-width: 1200px; margin: auto; padding: 24px 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; font-size: 21px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 48px; background: #f2d46b; border-radius: 8px; font-size: 34px; color: #476347; }
.brand small { display: block; margin-top: 5px; font-size: 11px; font-weight: 400; color: #60756b; }
.header-actions { display: flex; gap: 8px; }
.quiet { font-size: 13px; background: transparent; }
#app { max-width: 1128px; margin: auto; padding: 36px 24px 24px; min-height: 78vh; }
.eyebrow { font-size: 12px; font-weight: 700; color: #506e5d; margin: 0 0 12px; }
.welcome { display: grid; grid-template-columns: 1fr 270px; align-items: center; min-height: 240px; gap: 20px; padding: 0 36px 28px; }
h1 { font-size: 38px; line-height: 1.4; margin: 0 0 16px; word-break: keep-all; }
h2 { font-size: 25px; margin: 0; }
h3 { font-size: 18px; margin: 0 0 16px; }
.welcome p:not(.eyebrow) { font-size: 18px; margin: 0; color: #566c62; line-height: 1.7; }
.mascot { width: 240px; height: 230px; object-fit: contain; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 24px 0; }
.stars { color: #765818; font-size: 14px; background: #faf0ce; padding: 10px 14px; border-radius: 8px; white-space: nowrap; }
.item-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.item { padding: 22px 10px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; background: #fff; border: 2px solid #dde6dd; min-height: 185px; font-size: 19px; font-weight: 700; transition: transform .15s; }
.item:nth-child(2) { background: #eaf4f8; }
.item:nth-child(3) { background: #fbefdf; }
.item:nth-child(4) { background: #faeae4; }
.item:nth-child(5) { background: #f0edf7; }
.item:hover { transform: translateY(-3px); }
.item img { width: 110px; height: 100px; object-fit: contain; }
.item.selected { border: 3px solid var(--green); }
.mission { margin-top: 32px; padding: 20px 0; display: flex; gap: 22px; border-top: 1px solid var(--line); align-items: center; }
.mission span { font-size: 12px; color: #526a5b; }
.mission strong { display: block; margin-top: 6px; font-size: 18px; }
.primary { background: var(--green); color: white; border-color: var(--green); font-weight: 700; min-height: 60px; padding: 16px 28px; font-size: 20px; }
.activity-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.activity-top span { font-size: 14px; color: #506e5d; }
.activity { text-align: center; }
.activity h1 { font-size: 30px; }
.stage { position: relative; display: flex; align-items: center; justify-content: center; height: 285px; overflow: hidden; background: #e5f0ec; border-bottom: 7px solid #bfd3bb; margin: 24px 0; border-radius: 8px; }
.stage::after { content: ""; position: absolute; bottom: 18px; left: 0; right: 0; border-bottom: 3px dashed #94b3a3; }
.stage img { height: 175px; width: 210px; object-fit: contain; z-index: 1; }
.stage .box { position: absolute; width: 220px; height: 180px; bottom: 30px; background: #c39662; border: 8px solid #aa7b4e; z-index: 2; display: grid; place-items: center; font-size: 24px; color: #fff; }
.stage.respond img { animation: play 1.6s ease-in-out; }
.stage.respond { background: #e1eee1; }
@keyframes play { 0% { transform: translateX(-60px) rotate(-5deg); } 50% { transform: translateX(80px) translateY(-20px) rotate(8deg); } 100% { transform: translateX(0); } }
.expression-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 20px 0; }
.expression-row button { min-width: 150px; font-size: 22px; min-height: 68px; }
.expression-row .stop { background: #f7e7dc; border-color: #e5bfa7; color: #7a4031; }
.feedback { min-height: 34px; font-size: 21px; font-weight: 700; color: #306c51; margin: 18px 0; }
.activity .item-grid { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.activity .item { min-height: 150px; }
.hinted { outline: 4px solid #d8ac35; outline-offset: 4px; }
.helper { margin-top: 36px; text-align: left; border-top: 1px solid var(--line); padding-top: 18px; }
.helper summary { cursor: pointer; font-size: 13px; padding: 12px 0; }
.helper-content { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 14px 0; }
.helper label { display: grid; gap: 6px; font-size: 13px; }
.helper p { width: 100%; margin: 5px 0; color: #586d63; font-size: 13px; line-height: 1.6; }
.finish { text-align: center; padding: 40px 0; }
.finish .mascot { height: 200px; }
.finish p { font-size: 20px; line-height: 1.7; }
.app-footer { display: flex; justify-content: space-between; max-width: 1128px; margin: 20px auto 0; padding: 24px; border-top: 1px solid var(--line); font-size: 12px; color: #64786d; }
dialog { width: min(920px, calc(100% - 24px)); max-height: 90svh; border: 1px solid var(--line); border-radius: 8px; padding: 28px; color: var(--ink); }
dialog::backdrop { background: #15282088; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.icon-button { font-size: 26px; width: 48px; padding: 0; }
.adult-note { font-size: 13px; line-height: 1.7; color: #53685d; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 8px; margin: 24px 0; }
.tabs button { border-radius: 0; border: 0; border-bottom: 3px solid transparent; font-size: 14px; }
.tabs button[aria-selected="true"] { border-color: var(--green); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid label { display: grid; gap: 8px; font-size: 14px; }
input:not([type="checkbox"]), select { width: 100%; min-height: 46px; border: 1px solid #b9ccbf; border-radius: 6px; background: white; color: var(--ink); padding: 8px 10px; }
fieldset { border: 1px solid var(--line); padding: 16px; margin: 24px 0; }
legend { font-size: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 18px; }
.checks label { display: flex; gap: 7px; align-items: center; font-size: 14px; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.form-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.form-actions .primary { font-size: 16px; min-height: 48px; }
.record { padding: 20px 0; border-bottom: 1px solid var(--line); }
.record p { line-height: 1.6; font-size: 13px; }
.record .form-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.record label { font-size: 12px; }
.stats-summary { display: flex; gap: 20px; flex-wrap: wrap; padding: 20px 0; }
.stats-summary strong { display: block; font-size: 30px; }
.stats-summary span { font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 95px 1fr 35px; gap: 12px; align-items: center; margin: 18px 0; font-size: 13px; }
.bar-track { height: 18px; background: #e6ede7; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: #46816b; }
.notice { padding: 14px 24px; background: #fff0ca; font-size: 14px; }
.empty { padding: 32px 0; line-height: 1.8; color: #607368; }
@media (max-width: 720px) {
 .app-header { padding: 16px; align-items: flex-start; }
 .brand { font-size: 17px; gap: 8px; }
 .brand small { font-size: 10px; max-width: 125px; line-height: 1.5; }
 .brand-mark { width: 34px; font-size: 26px; }
 .header-actions { flex-direction: column; gap: 4px; }
 .quiet { padding: 7px 10px; min-height: 36px; font-size: 11px; }
 #app { padding: 24px 18px; }
 .welcome { grid-template-columns: 1fr 105px; padding: 0 0 20px; min-height: 180px; gap: 6px; }
 .mascot { width: 110px; height: 150px; }
 h1 { font-size: 27px; }
 .welcome p:not(.eyebrow) { font-size: 15px; }
 .eyebrow { font-size: 10px; }
 h2 { font-size: 21px; }
 .section-title { align-items: flex-start; }
 .stars { font-size: 12px; padding: 8px; }
 .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
 .item { min-height: 145px; font-size: 18px; padding: 16px 8px; }
 .item img { width: 95px; height: 80px; }
 .mission { flex-wrap: wrap; }
 .mission .primary { width: 100%; }
 .activity h1 { font-size: 26px; }
 .stage { height: 240px; }
 .stage img { width: 160px; height: 150px; }
 .expression-row { gap: 10px; }
 .expression-row button { min-width: 130px; flex: 1; font-size: 20px; padding: 12px; }
 dialog { padding: 18px; }
 .form-grid, .record .form-grid { grid-template-columns: 1fr; gap: 14px; }
 .app-footer { font-size: 10px; gap: 15px; }
 .finish .mascot { width: 200px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.card-emoji { display: inline-grid; place-items: center; width: 110px; height: 100px; font-size: 64px; overflow-wrap: anywhere; }
.stage .card-emoji { width: 210px; height: 175px; font-size: 110px; z-index: 1; }
.stage.respond .card-emoji { animation: play 1.6s ease-in-out; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.emoji-picker button { font-size: 24px; padding: 8px 12px; }
.word-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8f3; overflow-wrap: anywhere; }
.word-preview img { width: 110px; height: 100px; object-fit: contain; }
.custom-heading { margin-top: 32px; }
.custom-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
#word-error { color: #923c2b; line-height: 1.6; }
.item > span:last-child, .feedback { overflow-wrap: anywhere; }
.tabs { flex-wrap: wrap; }

.landing { min-height: calc(100svh - 205px); display: flex; flex-direction: column; gap: 30px; padding: 0 12px 24px; }
.landing-intro { text-align: center; }
.landing-intro .eyebrow { font-size: 15px; margin-bottom: 8px; }
.landing-intro h1 { font-size: clamp(38px, 5vw, 62px); margin-bottom: 0; }
.landing-mascot { display: block; width: clamp(150px, 20vw, 230px); height: clamp(140px, 18vw, 210px); object-fit: contain; margin: 8px auto; }
.landing-greeting { font-size: clamp(21px, 2.5vw, 30px); line-height: 1.5; font-weight: 700; margin: 8px 0 0; }
.goal-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; flex: 1; }
.goal-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 265px; padding: 28px 20px; border-radius: 24px; border: 2px solid; box-shadow: 0 6px 0 #243b3710; }
.goal-request { background: #e4f2e8; border-color: #a0c6ad; }
.goal-select { background: #fff1cd; border-color: #d9bf7d; }
.goal-choice:hover { border-color: var(--green); transform: translateY(-2px); }
.goal-symbol { font-size: 48px; line-height: 1.1; }
.goal-choice strong { font-size: clamp(32px, 4vw, 46px); }
.goal-choice > span:not(.goal-symbol) { font-size: 18px; }
.goal-choice .goal-link { margin-top: 8px; font-weight: 700; }
@media (max-width: 600px) {
 .landing { padding: 0 0 16px; gap: 24px; }
 .goal-choices { grid-template-columns: 1fr; gap: 16px; }
 .goal-choice { min-height: 215px; gap: 8px; padding: 20px 16px; }
 .landing-intro .eyebrow { font-size: 12px; }
 .goal-symbol { font-size: 36px; }
}

.choice-activity .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 32px auto; max-width: 900px; }
.choice-activity .item { min-height: 300px; padding: 28px 16px; font-size: 28px; }
.choice-activity .item img, .choice-activity .card-emoji { width: 100%; height: 200px; object-fit: contain; }
.choice-activity .card-emoji { font-size: 110px; }
@media (max-width: 600px) {
 .choice-activity .item-grid { gap: 12px; }
 .choice-activity .item { min-height: 210px; font-size: 21px; padding: 18px 8px; }
 .choice-activity .item img, .choice-activity .card-emoji { height: 130px; }
 .choice-activity .card-emoji { font-size: 72px; }
}

.record-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 20px; }
.record-filter label { display: grid; gap: 8px; min-width: 150px; font-size: 14px; }
.record-filter p { font-weight: 700; }
.bar-row { grid-template-columns: minmax(115px, 155px) 1fr 35px; }

.assessment-state { padding: 14px; background: #eef5ef; border-radius: 8px; line-height: 1.6; }
.assessment-history, .daily-log { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.assessment-history summary, .daily-log summary { cursor: pointer; padding: 10px 0; font-weight: 700; }

.combined-assessment { margin-top: 32px; padding-top: 28px; border-top: 2px solid var(--line); }

.category-selection { text-align: center; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 32px; }
.category-card { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 235px; background: #edf5ee; border: 2px solid #b9d2bf; border-radius: 20px; padding: 24px; }
.category-card strong { font-size: 30px; overflow-wrap: anywhere; }
.category-card small { font-size: 16px; color: #53685d; }
.category-edit-list { display: grid; gap: 18px; }
@media (max-width: 600px) {
 .category-grid { gap: 12px; }
 .category-card { min-height: 200px; padding: 18px 10px; }
 .category-card strong { font-size: 23px; }
}
