#taskList{display:grid;gap:10px}
.study-task{display:flex;align-items:center;background:#fff;border:1px solid #dee6e3;border-radius:13px;padding:0 14px 0 0;min-height:76px;transition:border-color .15s,background-color .15s}
.study-task.is-current{background:#f4faf7;border-color:#89bdae}
.task-pick{display:flex;align-items:center;gap:13px;flex:1;min-width:0;padding:12px 12px 12px 14px;color:#263b36;text-align:left;background:none;border:0;cursor:pointer;font:inherit}
.task-icon{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;border-radius:12px}
.tone-apricot{background:#ffebcf;color:#a66b2b}
.tone-aqua{background:#e1eff6;color:#497f9c}
.tone-lilac{background:#eee7fa;color:#8c69ad}
.task-copy{display:grid;gap:3px;flex:1;min-width:0}
.task-copy strong{font-size:1.02rem;letter-spacing:.015em;line-height:1.45;font-weight:750;overflow-wrap:anywhere}
.task-copy small{font-size:.825rem;color:#61716b;line-height:1.65;overflow-wrap:anywhere}
.task-minutes{display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:.82rem;white-space:nowrap;color:#64746e}
.task-finish{flex:0 0 30px;width:30px;height:44px;display:grid;place-items:center;background:transparent;cursor:pointer;border:0;position:relative;color:#fff;padding:0}
.task-finish::before{content:"";width:21px;height:21px;border:1.5px solid #afc0b8;border-radius:100%;box-sizing:border-box}
.task-finish svg{position:absolute}
.task-finish:disabled,.task-pick:disabled{cursor:default}
.study-task.is-done .task-finish::before{background:#458a76;border-color:#458a76}
.study-task.is-done .task-copy strong{text-decoration:line-through;color:#687a71}
#focusSecondary{display:flex;align-items:center;justify-content:center;gap:9px;color:#658277}
#focusSecondary:empty{display:none}
#focusSecondary button{background:none;border:0;color:#426e60;font:inherit;font-size:.875rem;padding:8px 4px;cursor:pointer}
#studyToast{position:fixed;z-index:1000;max-width:min(90vw,450px);bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,10px);opacity:0;pointer-events:none;background:#274a3e;color:#fff;padding:12px 20px;border-radius:14px;box-shadow:0 4px 20px #152e3326;font-size:.95rem;transition:opacity .18s,transform .18s;text-align:center}
#studyToast.show{opacity:1;transform:translate(-50%,0)}
#mainModal{width:min(500px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:min(86dvh,820px);box-sizing:border-box;background:#fff;color:#243a32;padding:0;border:1px solid #d8e3dc;border-radius:24px;box-shadow:0 24px 95px #14332f40;overflow-y:auto;overscroll-behavior:contain;margin:auto}
#mainModal::backdrop{background:rgba(28,46,39,.43);backdrop-filter:blur(3px)}
.study-sheet{padding:25px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 20px;position:static;height:auto;padding:0;background:none;border:none}
.sheet-head h2{margin:0;font-size:1.45rem;letter-spacing:-.02em;line-height:1.4}
.sheet-close,.mini-btn{border:0;background:#f0f5f2;color:#456459;display:inline-grid;place-items:center;cursor:pointer;flex-shrink:0}
.sheet-close{width:40px;height:40px;border-radius:50%;margin:-4px}
.sheet-intro,.study-empty{margin:6px 0 18px;color:#526a60;font-size:1rem;line-height:1.75}
.study-empty{padding:18px 8px;margin:0}
.sheet-intro.centered{text-align:center}
.study-actions,.study-choices{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:18px}
.study-choices{margin:0}
.study-button{appearance:none;text-align:center;display:inline-flex;align-items:center;justify-content:center;min-height:45px;padding:10px 17px;border-radius:11px;background:#f1f7f4;color:#355e4f;border:1px solid #d3e1d9;font:inherit;line-height:1.4;font-weight:650;cursor:pointer}
.study-button.primary{color:#fff;background:#216c56;border-color:#216c56}
.study-button:hover,.profile-choice:hover,.mini-btn:hover{filter:brightness(.975)}
.study-button:focus-visible,.mini-btn:focus-visible,.sheet-close:focus-visible,.task-finish:focus-visible,.task-pick:focus-visible,.mood-choice:has(:focus-visible),.profile-choice:focus-visible{outline:3px solid #348d75;outline-offset:2px}
.study-actions .study-button{flex:1}
.study-form{display:grid;gap:17px}
.study-form label:not(.mood-choice),.study-form legend{font-size:.95rem;font-weight:650;color:#365448}
.study-form input:not([type=radio]),.study-form textarea,.study-form select{display:block;box-sizing:border-box;width:100%;margin:6px 0 0;border:1px solid #c9d9cf;color:#243d30;background:#fff;border-radius:10px;padding:10px 12px;font:inherit;font-weight:400;font-size:16px;min-height:44px}
.study-form input:focus,.study-form textarea:focus,.study-form select:focus{outline:2px solid #78ac95;outline-offset:1px}
.study-form label small{font-weight:400;color:#64766c}
.study-form textarea{resize:vertical}
.study-form fieldset{padding:0;margin:0;border:0}
.study-form legend{margin:0 0 8px}
.form-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-message{font-size:.9rem;color:#854e24}
.form-message:empty{display:none}
.plan-edit-row{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #e1eae4;padding:10px 0}
.plan-edit-row span:first-child,.profile-choice>span:nth-child(2),.sound-setting>span{display:grid;gap:3px}
.plan-edit-row small,.profile-choice small,.sound-setting small{font-size:.82rem;color:#677c70;line-height:1.5}
.plan-edit-row .board-title-edit{justify-self:start;padding:4px 0;text-align:left;font:inherit;font-weight:700;color:inherit;background:transparent;border:0;cursor:pointer}
.plan-edit-row>div{display:flex;gap:3px}
.mini-btn{height:38px;width:35px;border-radius:8px}
.mini-btn:disabled{opacity:.35;cursor:default}
.profile-choices{display:grid;gap:10px}
.profile-choice{display:flex;align-items:center;gap:12px;font:inherit;text-align:left;background:white;color:#264639;border:1px solid #d5e1d9;border-radius:14px;padding:12px;cursor:pointer}
.profile-choice.chosen{background:#eef8f2;border-color:#8dbba5}
.profile-choice>span:nth-child(2){flex:1}
.profile-orb,.camp-illustration{display:grid;place-items:center;background:#f8e8c7;color:#94642c;width:44px;height:44px;border-radius:13px}
.profile-choice:nth-child(2) .profile-orb{background:#f1e7ef;color:#9c7098}
.sound-setting{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:20px;border-top:1px solid #e2eae5;padding-top:16px}
.sound-setting input{width:22px;height:22px;accent-color:#397c65}
.study-check-note,.review-summary{display:flex;align-items:center;gap:13px;background:#eff7f3;border-radius:14px;padding:16px;color:#34634f;line-height:1.65}
.study-check-note svg{flex-shrink:0}
.study-award{display:grid;place-items:center;background:#fff2c8;color:#a56f16;border-radius:50%;width:78px;height:78px;margin:6px auto 13px;animation:star-appear .5s ease-out both}
.study-award svg{fill:#f5c94f}
@keyframes star-appear{0%{transform:scale(.82);opacity:.55}70%{transform:scale(1.05)}100%{transform:scale(1);opacity:1}}
.review-summary{justify-content:center;gap:22px;margin:4px 0 20px}
.option-wrap{display:flex;gap:7px;flex-wrap:wrap}
.mood-choice{position:relative;display:block}
.mood-choice input{position:absolute;opacity:0;pointer-events:none}
.mood-choice span{display:flex;align-items:center;min-height:39px;border:1px solid #d8e2da;border-radius:11px;padding:7px 13px;font-size:.9rem;color:#486052;cursor:pointer}
.mood-choice input:checked+span{border-color:#6b9f88;background:#edf7f1;color:#285940}
.camp-challenge{padding:18px;background:#f1f7ef;border:1px solid #d4e6d2;border-radius:17px}
.camp-illustration{float:right;background:#dfead5;color:#62864d}
.camp-challenge h3,.sheet-subtitle{font-size:1.12rem;margin:0 0 6px}
.camp-challenge p{font-size:.91rem;line-height:1.7;color:#4d6955;max-width:85%;margin:0}
.camp-pair{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}
.camp-lamp{display:grid;grid-template-columns:auto 1fr;column-gap:9px;align-items:center;border-radius:10px;padding:8px 10px;background:#fff9;color:#5d7361}
.camp-lamp svg{grid-row:span 2}
.camp-lamp small{font-size:.8rem}
.camp-lamp.lit{background:#fff1bc;color:#805b1e}
.sheet-subtitle{margin-top:22px}
.history-day{border-bottom:1px solid #e0e9e3;padding:12px 0}
.history-day h4{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:.98rem;margin:0}
.history-day h4 small{font-size:.8rem;font-weight:500;color:#687c6e}
.history-day p{font-size:.9rem;line-height:1.65;margin:5px 0;color:#455e4f;overflow-wrap:anywhere}
.review-excerpt{background:#f4f8f5;padding:6px 10px;border-radius:8px}
@media(max-width:600px){
  .study-task{padding-right:8px;min-height:72px}.task-pick{padding:11px 6px 11px 9px;gap:9px}.task-icon{width:35px;height:35px;flex-basis:35px;border-radius:10px}.task-icon svg{width:20px;height:20px}.task-minutes{gap:3px;font-size:.77rem}.task-minutes svg{display:none}.task-copy small{font-size:.77rem}.task-copy strong{font-size:.97rem}.task-finish{width:26px;flex-basis:26px}.study-sheet{padding:19px}.study-actions{align-items:stretch}.study-actions .study-button{padding:10px}.mini-btn{width:32px;min-height:38px}.study-form .form-pair{gap:8px}
}
@media(prefers-reduced-motion:reduce){.study-award,#studyToast,.study-task{animation:none;transition:none}}
.extra-options{border:1px solid #dce7e1;border-radius:12px;background:#f8fbf9}
.extra-options summary{cursor:pointer;color:#436755;font-size:.93rem;padding:13px;min-height:44px;box-sizing:border-box}
.extra-options>.study-form{padding:0 13px 14px}
.family-visible{margin:0;color:#5b6e63;font-size:.86rem;line-height:1.5}
.undo-task{display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:11px;background:#f1f7f3;margin-top:8px;padding:6px 8px 6px 12px;color:#435c4d;font-size:.88rem}
.undo-task span{overflow-wrap:anywhere}
.undo-task .study-button{font-size:.88rem;padding:8px 12px;flex:none;min-height:40px}
.profile-choice>span:nth-child(2),.camp-lamp b{min-width:0;overflow-wrap:anywhere}
.camp-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.camp-lamp{grid-template-columns:auto minmax(0,1fr)}

/* Full names stay readable in the picker; the compact header keeps a single line. */
.profile { min-width:0; max-width:min(42%, 15rem); }
.profile .avatar, .profile > svg, .profile-choice .profile-orb { flex-shrink:0; }
#profileName, #greeting { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hero-label { max-width:60%; }
.profile-choice > span:nth-child(2), .reward-shop .shop-row > span { min-width:0; overflow-wrap:anywhere; }
.reward-shop h3, .reward-shop p { overflow-wrap:anywhere; }

#changeMyAvatar, #selectReadVoice { margin:12px 8px 0 0; gap:7px; }

main[data-child-access="waiting"] > :not(#deviceGate),#deviceGate[hidden],.device-actions [hidden]{display:none!important}
header .profile:disabled,header #journeyNav:disabled{visibility:hidden}
.device-gate{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,.6fr);gap:clamp(16px,4vw,60px);align-items:center;padding:clamp(22px,4vw,48px);background:#e8f3ed;border:1px solid #d7e5da;border-radius:24px}
.device-gate>img{justify-self:center;width:100%;max-width:260px;height:auto}
.device-welcome h1{margin:0;color:#244c43;font-size:clamp(1.45rem,3.5vw,2.2rem);line-height:1.4}
.device-welcome p{margin:8px 0;color:#496459;line-height:1.65}
.device-welcome p:empty,.device-actions:empty,#familyCountNote:empty{display:none}
.device-welcome .profile-choices:not(:empty){margin-top:16px}
.device-welcome .profile-choice b,.device-self b,.camp-lamp b{overflow-wrap:anywhere}
.device-actions{display:flex;gap:8px;flex-wrap:wrap}
.device-actions .study-button{margin-top:12px}
.device-self{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.device-self>div{display:grid;gap:3px}
.device-self small{color:#5a7065}
#familyCountNote:not(:empty){display:block;margin-top:10px}
@media(max-width:540px){.device-gate{grid-template-columns:minmax(0,1fr)}.device-gate>img{display:none}}
@media(prefers-color-scheme:dark){.device-gate{background:#1c332f;border-color:#36524a}.device-welcome h1{color:#e1f4e9}.device-welcome p,.device-self small{color:#acd0bf}}

.settings-identity { align-items:center; gap:16px; }
.settings-avatar { position:relative; flex:0 0 auto; padding:0; border-radius:16px; }
.settings-avatar .profile-orb { width:60px; height:60px; border-radius:16px; font-size:30px; }
.avatar-edit-mark { position:absolute; right:-3px; bottom:-3px; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; color:#17634f; background:#ecf6ef; border:2px solid white; }
.settings-identity .settings-fields { gap:0; min-width:0; justify-items:start; }
.settings-name,.settings-grade { display:inline-flex; align-items:center; gap:7px; min-height:44px; color:inherit; font:inherit; padding:0 4px; text-align:left; }
.settings-name { max-width:100%; }
.settings-name b { font-size:1.12rem; }
.settings-name svg,.settings-grade svg { color:#54756b; flex-shrink:0; }
.settings-grade { position:relative; color:#4e665d; }
.settings-grade select { appearance:none; color:inherit; background:transparent; border:0; padding:0 24px 0 0; font:inherit; font-size:16px; cursor:pointer; min-height:44px; }
.settings-grade svg { pointer-events:none; position:absolute; right:8px; }
.settings-name-form { margin:2px 0 18px; }
.settings-name-form[hidden] { display:none; }
.settings-links { display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; margin-top:10px; }
@media(prefers-color-scheme:dark){ .settings-grade,.settings-name svg,.settings-grade svg { color:#b6d3c5; } }
