:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#faf8f5;--surface:#fff;--surface-2:#f1eee8;--border:#e2ddd3;--text:#1c1f1d;--text-2:#5a615d;--text-3:#6b736e;--primary:#0e7c66;--primary-strong:#0a6654;--primary-soft:#dff1ec;--on-primary:#fff;--accent:#b45309;--accent-soft:#fdf0d9;--danger:#b3261e;--danger-soft:#fbe9e7;--bubble-user:#0e7c66;--bubble-user-text:#fff;--bubble-tutor:#fff;--shadow:0 1px 2px #141e190f, 0 4px 16px #141e190f;--radius:16px;--radius-sm:10px;--tab-h:60px;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px);--app-h:100dvh;--font:-apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Yu Gothic UI", "Malgun Gothic", "Segoe UI", Roboto, sans-serif}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#141614;--surface:#1e211f;--surface-2:#272b28;--border:#353a36;--text:#ecefec;--text-2:#b4bbb6;--text-3:#9aa29c;--primary:#3fb89c;--primary-strong:#58c9ae;--primary-soft:#1d3a33;--on-primary:#06231c;--accent:#f0b35a;--accent-soft:#3a2e17;--danger:#f2877f;--danger-soft:#3d1f1c;--bubble-user:#1f6f5e;--bubble-user-text:#f3fbf8;--bubble-tutor:#1e211f;--shadow:0 1px 2px #0006}}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none;margin:0;font-size:16px;line-height:1.5}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}h1,h2,h3,p{margin:0}a{color:inherit;text-decoration:none}:focus-visible{outline:3px solid var(--primary);outline-offset:2px;border-radius:6px}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.app{height:var(--app-h);background:var(--bg);flex-direction:column;max-width:560px;margin:0 auto;display:flex;position:relative}.page{padding:calc(16px + var(--safe-t)) 16px 24px;-webkit-overflow-scrolling:touch;flex:1;overflow-y:auto}.page__title{letter-spacing:-.01em;font-size:24px;font-weight:700}.page__subtitle{color:var(--text-2);margin-top:4px}.stack{flex-direction:column;gap:12px;display:flex}.stack-lg{flex-direction:column;gap:20px;display:flex}.row{align-items:center;gap:12px;display:flex}.row--between{justify-content:space-between}.section-title{color:var(--text-2);margin:8px 4px 0;font-size:14px;font-weight:600}.muted{color:var(--text-2)}.small{font-size:14px}.tabbar{height:calc(var(--tab-h) + var(--safe-b));padding-bottom:var(--safe-b);background:var(--surface);border-top:1px solid var(--border);flex-shrink:0;grid-template-columns:repeat(5,1fr);display:grid}.tabbar__item{color:var(--text-3);flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:48px;font-size:12px;display:flex}.tabbar__item svg{width:24px;height:24px}.tabbar__item[aria-current=page]{color:var(--primary);font-weight:600}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.card--link{text-align:left;align-items:center;gap:12px;width:100%;min-height:64px;display:flex}.card--link:active{background:var(--surface-2)}.card--primary{background:var(--primary);color:var(--on-primary);border-color:#0000}.card--primary .muted{color:inherit;opacity:.85}.card--disabled{opacity:.6;box-shadow:none}.card__icon{background:var(--primary-soft);width:44px;height:44px;color:var(--primary);border-radius:12px;flex-shrink:0;place-items:center;display:grid}.card--primary .card__icon{color:inherit;background:#ffffff2e}.card__icon svg{width:24px;height:24px}.card__body{flex:1;min-width:0}.card__title{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.card__chevron{color:var(--text-3);flex-shrink:0}.badge{background:var(--surface-2);color:var(--text-2);white-space:nowrap;border-radius:999px;align-items:center;padding:2px 8px;font-size:12px;font-weight:600;display:inline-flex}.badge--primary{background:var(--primary-soft);color:var(--primary)}.badge--accent{background:var(--accent-soft);color:var(--accent)}.btn{background:var(--surface-2);min-height:48px;color:var(--text);border:1px solid #0000;border-radius:12px;justify-content:center;align-items:center;gap:8px;padding:0 20px;font-weight:600;display:inline-flex}.btn--primary{background:var(--primary);color:var(--on-primary)}.btn--primary:active{background:var(--primary-strong)}.btn--ghost{border-color:var(--border);background:0 0}.btn--danger{color:var(--danger);border-color:var(--border);background:0 0}.btn--block{width:100%}.btn:disabled{opacity:.55;cursor:not-allowed}.icon-btn{width:44px;height:44px;color:var(--text-2);background:0 0;border:none;border-radius:12px;flex-shrink:0;place-items:center;display:grid}.icon-btn:active{background:var(--surface-2)}.icon-btn svg{width:24px;height:24px}.field{flex-direction:column;gap:6px;display:flex}.field__label{font-size:14px;font-weight:600}.field__hint{color:var(--text-2);font-size:13px}.input{border:1px solid var(--border);background:var(--surface);border-radius:12px;width:100%;min-height:48px;padding:0 14px}.input:focus{outline:2px solid var(--primary);outline-offset:0;border-color:#0000}.form-error{background:var(--danger-soft);color:var(--danger);border-radius:12px;padding:12px 14px;font-size:14px}.notice{background:var(--accent-soft);color:var(--accent);border-radius:12px;padding:12px 14px;font-size:14px}.segmented{background:var(--surface-2);border-radius:12px;gap:4px;padding:4px;display:inline-flex}.segmented__item{min-height:40px;color:var(--text-2);background:0 0;border:none;border-radius:9px;padding:0 16px;font-weight:600}.segmented__item[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.meter{background:var(--surface-2);border-radius:999px;height:8px;overflow:hidden}.meter__fill{background:var(--primary);border-radius:999px;height:100%;transition:width .4s}.meter__fill--warn{background:var(--accent)}.meter__fill--blocked{background:var(--danger)}.empty{text-align:center;color:var(--text-2);padding:40px 16px}.empty__icon{background:var(--primary-soft);width:56px;height:56px;color:var(--primary);border-radius:16px;place-items:center;margin:0 auto 12px;display:grid}.spinner{border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;width:24px;height:24px;animation:.8s linear infinite spin}.center{text-align:center;place-items:center;gap:12px;height:100%;padding:24px;display:grid}@keyframes spin{to{transform:rotate(360deg)}}.auth{height:var(--app-h);flex-direction:column;justify-content:center;gap:24px;max-width:420px;margin:0 auto;padding:24px;display:flex}.auth__logo{border-radius:20px;width:72px;height:72px}.auth__title{letter-spacing:-.02em;font-size:28px;font-weight:700}.chat{height:var(--app-h);background:var(--bg);flex-direction:column;max-width:560px;margin:0 auto;display:flex}.chat__header{padding:calc(6px + var(--safe-t)) 8px 6px;background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;gap:4px;display:flex}.chat__title{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:17px;font-weight:600;overflow:hidden}.chat__scroll{-webkit-overflow-scrolling:touch;flex-direction:column;flex:1;gap:12px;padding:16px 12px 8px;display:flex;overflow-y:auto}.chat__footer{padding:6px 12px calc(10px + var(--safe-b));background:var(--bg);flex-direction:column;flex-shrink:0;gap:6px;display:flex}.bubble-row{flex-direction:column;max-width:88%;display:flex}.bubble-row--user{align-self:flex-end;align-items:flex-end}.bubble-row--tutor{align-self:flex-start;align-items:flex-start}.bubble{word-break:break-word;overflow-wrap:anywhere;border-radius:18px;padding:10px 14px}.bubble--user{background:var(--bubble-user);color:var(--bubble-user-text);white-space:pre-wrap;border-bottom-right-radius:6px}.bubble--tutor{background:var(--bubble-tutor);border:1px solid var(--border);border-bottom-left-radius:6px}.bubble--flagged{color:var(--text-2);border-style:dashed}.bubble__meta{color:var(--text-3);align-items:center;gap:6px;min-height:28px;margin-top:2px;font-size:12px;display:flex}.bubble__meta button{color:inherit;background:0 0;border:none;border-radius:8px;align-items:center;gap:4px;min-width:32px;min-height:32px;margin:-6px;padding:6px;display:inline-flex}.bubble__meta svg{width:16px;height:16px}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md p{margin:0 0 8px}.md ul,.md ol{margin:0 0 8px;padding-left:20px}.md li{margin:2px 0}.md strong{color:var(--primary-strong);font-weight:700}.md code{background:var(--surface-2);border-radius:6px;padding:1px 5px;font-size:.92em}.md blockquote{border-left:3px solid var(--border);color:var(--text-2);margin:0 0 8px;padding-left:12px}.md table{border-collapse:collapse;margin-bottom:8px;display:block;overflow-x:auto}.md th,.md td{border:1px solid var(--border);text-align:left;padding:4px 8px}.typing{gap:4px;padding:4px 0;display:inline-flex}.typing span{background:var(--text-3);border-radius:50%;width:7px;height:7px;animation:1.2s ease-in-out infinite blink}.typing span:nth-child(2){animation-delay:.15s}.typing span:nth-child(3){animation-delay:.3s}@keyframes blink{0%,80%,to{opacity:.25}40%{opacity:1}}.cache-chip{color:var(--text-2);align-items:center;gap:6px;padding:0 4px;font-size:12.5px;line-height:1.35;display:flex}.cache-chip__dot{background:var(--primary);border-radius:50%;flex-shrink:0;width:8px;height:8px}.cache-chip--expired{color:var(--accent)}.cache-chip--expired .cache-chip__dot{background:var(--accent)}.composer{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:24px;align-items:flex-end;gap:8px;padding:6px 6px 6px 16px;display:flex}.composer:focus-within{border-color:var(--primary)}.composer textarea{resize:none;background:0 0;border:none;outline:none;flex:1;min-height:44px;max-height:132px;padding:9px 0;line-height:1.45}.composer__send{background:var(--primary);width:44px;height:44px;color:var(--on-primary);border:none;border-radius:50%;flex-shrink:0;place-items:center;display:grid}.composer__send:disabled{background:var(--surface-2);color:var(--text-3)}.composer__send--stop{background:var(--text);color:var(--bg)}.composer__send svg{width:22px;height:22px}.chat-error{background:var(--danger-soft);color:var(--danger);border-radius:14px;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;font-size:14px;display:flex}.chat-error button{color:inherit;background:0 0;border:1px solid;border-radius:10px;flex-shrink:0;min-height:36px;padding:0 12px;font-weight:600}.scroll-bottom{border:1px solid var(--border);background:var(--surface);width:40px;height:40px;box-shadow:var(--shadow);color:var(--text-2);border-radius:50%;place-items:center;display:grid;position:absolute;bottom:96px;right:16px}.sheet-backdrop{z-index:20;background:#0006;justify-content:center;align-items:flex-end;animation:.2s fade;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-width:560px;padding:12px 20px calc(20px + var(--safe-b));border-radius:20px 20px 0 0;max-height:85vh;animation:.25s rise;overflow-y:auto}.sheet__handle{background:var(--border);border-radius:2px;width:40px;height:4px;margin:0 auto 12px}.sheet__title{margin-bottom:12px;font-size:18px;font-weight:700}.kv{grid-template-columns:1fr auto;gap:8px 16px;font-size:15px;display:grid}.kv dt{color:var(--text-2)}.kv dd{font-variant-numeric:tabular-nums;text-align:right;margin:0}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{opacity:0;transform:translateY(24px)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}.question{flex-direction:column;gap:14px;display:flex}.question__instruction{color:var(--text-2);font-size:15px}.question__passage{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);white-space:pre-wrap;margin:0;padding:12px 14px;line-height:1.7}.question__text{overflow-wrap:anywhere;font-size:19px;font-weight:600;line-height:1.6}ruby{ruby-position:over}rt{color:var(--text-2);font-size:.55em;font-weight:400}.choices{flex-direction:column;gap:8px;display:flex}.choice{background:var(--surface);border:1.5px solid var(--border);cursor:pointer;border-radius:14px;align-items:center;gap:12px;min-height:52px;padding:10px 14px;display:flex}.choice input{width:20px;height:20px;accent-color:var(--primary);flex-shrink:0;margin:0}.choice--selected,.choice--correct{border-color:var(--primary);background:var(--primary-soft)}.choice--wrong{border-color:var(--danger);background:var(--danger-soft)}.input--area{resize:vertical;min-height:96px;padding:12px 14px;line-height:1.5}.pieces{flex-wrap:wrap;align-items:center;gap:8px;min-height:52px;display:flex}.pieces--answer{background:var(--surface);border:1.5px dashed var(--border);border-radius:14px;padding:10px}.piece{border:1.5px solid var(--border);background:var(--surface);border-radius:12px;min-height:44px;padding:0 14px;font-weight:600}.pieces--answer .piece{border-color:var(--primary);background:var(--primary-soft)}.piece:disabled{opacity:1;cursor:default}.verdict{border-radius:14px;padding:12px 14px;font-weight:700}.verdict--correct{background:var(--primary-soft);color:var(--primary-strong)}.verdict--wrong{background:var(--danger-soft);color:var(--danger)}.explanation{flex-direction:column;gap:6px;line-height:1.6;display:flex}.week{grid-template-columns:repeat(7,1fr);gap:4px;margin:0;padding:0;list-style:none;display:grid}.week__day{color:var(--text-3);flex-direction:column;align-items:center;gap:4px;font-size:12px;display:flex}.week__dot{background:var(--surface-2);border:1.5px solid var(--border);border-radius:50%;width:22px;height:22px}.week__day--done{color:var(--primary);font-weight:600}.week__day--done .week__dot{background:var(--primary);border-color:var(--primary)}.learned-note{max-width:92%;color:var(--primary-strong);background:var(--primary-soft);text-align:center;overflow-wrap:anywhere;border-radius:999px;align-self:center;padding:6px 12px;font-size:13px}.calendar{grid-template-columns:repeat(7,1fr);gap:6px;margin:0;padding:0;list-style:none;display:grid}.calendar__day{aspect-ratio:1;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;max-height:34px}.calendar__day--done{background:var(--primary-soft);border-color:var(--primary)}.calendar__day--busy{background:var(--primary)}.passage{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;font-size:18px;line-height:2}.passage p{overflow-wrap:anywhere;margin:0 0 14px}.passage p:last-child{margin-bottom:0}.passage[lang=ja]{line-height:2.4}.word{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;border-radius:6px;margin:0;padding:2px 1px}.word:active,.word--active{background:var(--primary-soft);color:var(--primary-strong)}
