
:root{
--paper:#f6f0e7;--paper-deep:#eee4d7;--ink:#2f2a25;--muted:#7f7469;
--line:#d7c9b9;--accent:#8b6751;--accent-soft:#e8d8c9;
--card:rgba(255,255,255,.62);--success:#5f7a65;--warning:#9a7340;
--danger:#a45d55;--shadow:0 18px 45px rgba(70,50,35,.10);--radius:22px
}
*{box-sizing:border-box}html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;color:var(--ink);font-family:"DM Sans",sans-serif;background:radial-gradient(circle at top left,rgba(255,255,255,.85),transparent 34%),linear-gradient(145deg,var(--paper),#f9f6f1 55%,var(--paper-deep))}
button,select,textarea,input{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}[hidden]{display:none!important}
.shell{width:min(1480px,calc(100% - 32px));margin:0 auto;padding:28px 0 60px}
.topbar{display:flex;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.brand{min-width:240px}.brand h1{margin:0;font-size:clamp(20px,3vw,30px);letter-spacing:-.03em}.brand p{margin:2px 0 0;color:var(--muted);font-size:13px}
.topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;min-width:0}
.header-control{display:flex;align-items:center;gap:6px;min-width:0;padding:7px 9px;border:1px solid rgba(139,103,81,.2);border-radius:999px;background:rgba(255,255,255,.5);backdrop-filter:blur(12px)}
.header-control span{color:var(--muted);font-size:10px;white-space:nowrap}.header-control select{min-width:0;max-width:110px;border:0;outline:0;background:transparent;color:var(--ink);font:600 12px "DM Sans",sans-serif;text-overflow:ellipsis}
.header-timezone select{width:180px;max-width:180px}
.member-area{display:flex;align-items:center;gap:10px;width:100%;justify-content:flex-end}
.member-copy{display:grid;gap:1px;text-align:right;max-width:260px}.member-copy strong{font-size:12px}.member-copy span{font-size:10px;color:var(--muted)}
.member-button{border:0;border-radius:999px;background:var(--ink);color:#fff;padding:9px 13px;font-weight:700;font-size:11px}
.page-nav{display:flex;gap:8px;margin-bottom:16px;overflow:auto}.nav-link{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.5);color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}.nav-link.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.55fr);gap:18px;align-items:start}
.journal-card,.side-card,.card{background:var(--card);border:1px solid rgba(139,103,81,.16);backdrop-filter:blur(12px);box-shadow:var(--shadow)}
.journal-card{border-radius:30px;overflow:hidden}.journal-head{padding:24px 26px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.date-korean{font-family:"Nanum Myeongjo",serif;font-size:clamp(24px,4vw,38px);margin:0 0 4px}.date-en{color:var(--muted);font-size:14px}
.controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.select-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:4px 10px 4px 12px;background:rgba(255,255,255,.64);color:var(--muted);font-size:13px}
select{border:0;outline:0;background:transparent;color:var(--ink);font-weight:600}
.inspiration{padding:22px 26px 10px}.inspiration-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.soft-button{border:1px solid var(--line);background:rgba(255,255,255,.56);color:var(--ink);padding:12px 14px;border-radius:14px;transition:.2s}.soft-button:hover{transform:translateY(-1px);background:#fff;border-color:var(--accent)}
.generator-output{margin-top:12px;min-height:72px;border-radius:16px;background:var(--accent-soft);padding:15px 17px;display:none;align-items:center;justify-content:space-between;gap:12px}.generator-output.show{display:flex}
.generator-label{color:var(--accent);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}.generator-text{font-family:"Nanum Myeongjo",serif;font-size:20px;line-height:1.55}.close-generator{border:0;background:transparent;color:var(--muted);font-size:20px}
.paper{margin:16px 26px 0;min-height:58vh;border:1px solid rgba(139,103,81,.14);border-radius:18px;background:repeating-linear-gradient(to bottom,rgba(255,255,255,.88) 0,rgba(255,255,255,.88) 41px,rgba(139,103,81,.10) 42px);overflow:hidden}
.paper textarea{width:100%;min-height:58vh;resize:vertical;border:0;outline:0;padding:19px 22px;background:transparent;color:var(--ink);font-family:"Nanum Myeongjo",serif;font-size:20px;line-height:42px;caret-color:var(--accent)}
textarea::placeholder{color:#b1a497}.editor-footer{padding:14px 26px 24px;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.word-count{color:var(--muted);font-size:13px}.action-group,.actions,.toolbar,.filter-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.button{border:0;border-radius:14px;padding:12px 16px;font-weight:700}.button-secondary{background:var(--accent-soft);color:var(--accent)}.button-primary{background:var(--ink);color:#fff}.button-success{background:var(--success);color:#fff}.button-danger{background:#f0dddd;color:var(--danger)}
.side{display:grid;gap:16px}.side-card{border-radius:var(--radius);padding:18px}.side-card h2{margin:0 0 14px;font-size:16px}.streak-number{font-family:"Nanum Myeongjo",serif;font-size:38px;margin:0}.muted{color:var(--muted)}
.streak-heading-row,.side-card-head,.submission-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.month-progress{min-width:58px;height:58px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--accent) var(--progress,0%),rgba(139,103,81,.13) 0)}
.month-progress:after{content:"";position:absolute;inset:6px;border-radius:50%;background:#f8f3ec}.month-progress strong{position:relative;z-index:1;font-size:12px;text-align:center}.month-progress strong span{display:block;font-size:9px;color:var(--muted)}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-top:12px}.calendar-grid span{aspect-ratio:1;display:grid;place-items:center;border-radius:50%;font-size:11px;color:var(--muted)}.calendar-grid .day-label{aspect-ratio:auto;font-weight:700;color:var(--ink);padding-bottom:5px}.calendar-grid .calendar-day{border:1px solid rgba(139,103,81,.22);background:rgba(255,255,255,.32)}.calendar-grid .written{border-color:var(--ink);background:var(--ink);color:#fff}.calendar-grid .today{outline:2px solid var(--accent);outline-offset:2px;font-weight:700}.calendar-grid .future{opacity:.28;border-style:dashed}
.calendar-meta{display:flex;justify-content:space-between;gap:10px;margin-top:13px;font-size:11px;color:var(--muted)}
.package-box{padding:14px;background:rgba(255,255,255,.54);border:1px solid var(--line);border-radius:16px}.package-box strong{display:block;margin-bottom:4px}
.mission-percent{min-width:54px;padding:7px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-weight:700;text-align:center}.mission-progress-track{height:7px;margin:14px 0 16px;overflow:hidden;border-radius:999px;background:rgba(139,103,81,.11)}.mission-progress-fill{width:0;height:100%;border-radius:inherit;background:var(--accent);transition:width .3s}.mission-checklist{display:grid;gap:9px}.mission-check{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start;padding:10px 11px;border:1px solid rgba(139,103,81,.12);border-radius:13px;background:rgba(255,255,255,.42);cursor:pointer}.mission-check input{position:absolute;opacity:0}.mission-box{display:grid;place-items:center;width:20px;height:20px;border:1.5px solid rgba(139,103,81,.38);border-radius:7px;background:#fff}.mission-box:after{content:"✓";color:#fff;font-weight:700;opacity:0}.mission-check input:checked+.mission-box{background:var(--accent);border-color:var(--accent)}.mission-check input:checked+.mission-box:after{opacity:1}.mission-copy{display:grid;gap:2px}.mission-copy strong{font-size:13px}.mission-category{display:inline-flex;width:max-content;padding:3px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:9px;font-weight:700}.mission-note{color:var(--muted);font-size:11px;line-height:1.45}
.entries{display:grid;gap:8px;max-height:250px;overflow:auto}.entry-item{width:100%;border:1px solid var(--line);background:rgba(255,255,255,.45);text-align:left;padding:11px 12px;border-radius:13px}.entry-item:hover{background:#fff}.entry-item strong{display:block;font-size:13px}.entry-item span{font-size:11px;color:var(--muted)}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:var(--ink);color:#fff;padding:12px 16px;border-radius:999px;opacity:0;pointer-events:none;transition:.25s;z-index:100}.toast.show{opacity:1;transform:translate(-50%,0)}
.page-card{padding:24px;border-radius:24px}.eyebrow{margin:0 0 5px;color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.page-title{margin:0 0 8px;font-family:"Nanum Myeongjo",serif;font-size:29px}.intro{margin:0 0 22px;color:var(--muted);line-height:1.6}
.field{display:grid;gap:7px;margin-top:17px}.field label,.section-label{font-size:12px;font-weight:700;color:var(--muted)}.field textarea{width:100%;min-height:120px;resize:vertical;border:1px solid var(--line);outline:0;padding:13px 14px;background:rgba(255,255,255,.78);border-radius:14px}
.status-badge{display:inline-flex;padding:7px 10px;border-radius:999px;font-size:11px;font-weight:700}.status-pending{background:#efe3cf;color:#825f2e}.status-reviewing{background:#e5dceb;color:#6d527a}.status-completed{background:#dce8de;color:#45614b}
.rich-editor{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(255,255,255,.76)}.toolbar{padding:8px;border-bottom:1px solid var(--line);background:rgba(232,216,201,.42)}.tool-btn{min-width:34px;height:34px;padding:0 9px;border:1px solid rgba(139,103,81,.2);border-radius:9px;background:#fff;color:var(--ink);font-weight:700}.toolbar select,.toolbar input[type=color]{height:34px;border:1px solid rgba(139,103,81,.2);border-radius:9px;background:#fff}.editor-content{min-height:330px;padding:18px 20px;outline:0;font-family:"Nanum Myeongjo",serif;font-size:19px;line-height:1.85}.editor-content:empty:before{content:attr(data-placeholder);color:#b1a497}.read-only{background:rgba(255,255,255,.62)}
.form-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);gap:18px}.notice{padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.48);color:var(--muted);font-size:12px;line-height:1.55}.history-list{display:grid;gap:10px}.history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px}.history-title{font-weight:700;font-size:14px}.history-preview{color:var(--muted);font-size:12px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty{padding:30px;text-align:center;color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.stat-card{padding:16px;border-radius:20px}.stat-card strong{display:block;font-size:28px}.stat-card span{color:var(--muted);font-size:11px}.dashboard-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px}.queue{display:grid;gap:8px;max-height:72vh;overflow:auto}.queue-item{width:100%;text-align:left;padding:13px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.52)}.teacher-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px}.panel{padding:15px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.5)}
@media(max-width:1100px){.layout{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:900px){.layout,.form-layout,.dashboard-grid{grid-template-columns:1fr}.side{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-panels{grid-template-columns:1fr}}
@media(max-width:650px){.shell{width:100%;padding:8px 6px 108px}.topbar{gap:7px;padding:2px 2px 8px}.brand{flex:1;min-width:0}.brand h1{font-size:17px;white-space:nowrap}.topbar-actions{gap:5px}.header-control{gap:0;padding:6px 7px}.header-control span{display:none}#languageSelect{width:60px}.header-timezone select{width:118px;max-width:118px}.member-area{justify-content:space-between}.member-copy{text-align:left}.member-copy span{display:none}.layout{gap:10px}.journal-card{border-radius:18px}.journal-head{padding:16px 12px 12px;flex-direction:column}.inspiration{padding:10px 10px 3px}.inspiration-row{gap:5px}.soft-button{min-height:44px;padding:7px 4px;font-size:11px}.paper{margin:8px 8px 0;min-height:60vh;border-radius:13px}.paper textarea{min-height:60vh;padding:14px 12px 18px;font-size:17px;line-height:36px}.editor-footer{padding:10px 10px 14px}.action-group{position:fixed;z-index:40;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));padding:8px;border:1px solid rgba(139,103,81,.2);border-radius:18px;background:rgba(248,243,236,.94);box-shadow:0 12px 35px rgba(47,42,37,.18)}.action-group .button{flex:1;min-height:49px}.side{display:block}.side-card{margin-bottom:10px}.stats{grid-template-columns:1fr 1fr}}


/* Secondary pages: submission, history and teacher dashboard */
.header-actions{
display:flex;
align-items:center;
gap:8px;
margin-left:auto;
}
.control{
display:flex;
align-items:center;
gap:6px;
padding:7px 9px;
border:1px solid rgba(139,103,81,.2);
border-radius:999px;
background:rgba(255,255,255,.5);
}
.control label{
color:var(--muted);
font-size:10px;
}
.control select{
max-width:180px;
}

.form-layout{
align-items:start;
}
.form-layout > .page-card{
min-width:0;
}
.form-layout > aside{
position:sticky;
top:18px;
}

.steps{
display:grid;
gap:14px;
margin-top:20px;
}
.step{
display:grid;
grid-template-columns:34px minmax(0,1fr);
gap:12px;
align-items:start;
}
.step-num{
width:34px;
height:34px;
display:grid;
place-items:center;
border-radius:50%;
background:var(--accent-soft);
color:var(--accent);
font-size:12px;
font-weight:700;
}
.step strong{
display:block;
margin:1px 0 4px;
font-size:13px;
line-height:1.35;
}
.step span{
display:block;
color:var(--muted);
font-size:12px;
line-height:1.5;
}
.submission-head{
align-items:flex-start;
}
.submission-head strong{
display:block;
font-size:16px;
line-height:1.3;
}
.rich-editor .toolbar label{
display:inline-flex;
align-items:center;
gap:4px;
font-size:11px;
font-weight:700;
}
.rich-editor .toolbar input[type="color"]{
width:38px;
padding:4px;
}
.editor-note{
margin:8px 0 0;
color:var(--muted);
font-size:12px;
line-height:1.5;
}
.page-card .actions{
margin-top:20px;
}
.page-card .actions .button{
min-width:92px;
}
#emailNotice{
margin-top:20px!important;
}
#studentEditorMount .editor-content{
min-height:360px;
}
#teacherEditorMount .editor-content{
min-height:300px;
}

@media(max-width:900px){
.form-layout > aside{
position:static;
}
}

@media(max-width:650px){
.topbar-actions{
width:100%;
justify-content:flex-start;
margin-left:0;
}
.header-timezone{
flex:1;
}
.header-timezone select{
width:100%;
max-width:none;
}
.page-nav{
padding:0 2px;
}
.form-layout{
gap:10px;
}
.page-card{
padding:16px 13px;
border-radius:18px;
}
.page-title{
font-size:24px;
}
.rich-editor .toolbar{
overflow-x:auto;
flex-wrap:nowrap;
}
.rich-editor .toolbar > *{
flex:0 0 auto;
}
#studentEditorMount .editor-content{
min-height:300px;
}
}

/* =========================================================
  LANGSNACK TEACHER DASHBOARD V2
  ========================================================= */
.teacher-os-body{background:#f4f0ea;color:#2c2926;min-height:100vh}
.teacher-os-shell{width:min(1720px,calc(100% - 32px));margin:auto;padding:24px 0 56px}
.teacher-os-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}
.teacher-kicker,.widget-kicker{margin:0 0 4px;color:#8b6751;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.teacher-os-header h1{margin:0;font-size:clamp(24px,3vw,36px);letter-spacing:-.04em}.teacher-subtitle{margin:6px 0 0;color:#81776e;font-size:13px}
.teacher-header-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.private-pill{padding:9px 12px;border-radius:999px;background:#e1ece4;color:#46604c;font-size:11px;font-weight:800}
.teacher-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.teacher-stat-card{position:relative;overflow:hidden;min-height:132px;padding:18px;border:1px solid rgba(90,70,54,.12);border-radius:22px;background:rgba(255,255,255,.76);box-shadow:0 12px 30px rgba(56,43,32,.06)}.teacher-stat-card:after{content:"";position:absolute;width:100px;height:100px;right:-30px;bottom:-40px;border-radius:50%;background:currentColor;opacity:.06}.teacher-stat-card>div{display:flex;align-items:baseline;gap:8px;margin-top:13px}.teacher-stat-card strong{font-size:34px;line-height:1}.teacher-stat-card div span{font-size:12px;font-weight:700}.teacher-stat-card small{display:block;margin-top:12px;color:#81776e}.stat-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#f2ebe3}.teacher-stat-card.waiting{color:#8b6533}.teacher-stat-card.reviewing{color:#75547b}.teacher-stat-card.completed{color:#4d6a54}.teacher-stat-card.total{color:#4f6473}
.teacher-widget-row{display:grid;grid-template-columns:1.4fr .8fr .8fr;gap:12px;margin-bottom:12px}.teacher-widget,.teacher-queue-card,.teacher-workspace-card{border:1px solid rgba(90,70,54,.12);background:rgba(255,255,255,.76);box-shadow:0 12px 30px rgba(56,43,32,.06);border-radius:22px}.teacher-widget{padding:17px}.widget-head,.queue-card-head,.workspace-topbar,.compare-head,.feedback-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.widget-head h2,.queue-card-head h2{margin:0;font-size:16px}.widget-value{font-size:25px;font-weight:800}.weekly-chart{height:102px;display:grid;grid-template-columns:repeat(7,1fr);gap:9px;align-items:end;margin-top:14px}.chart-day{height:100%;display:grid;grid-template-rows:1fr auto;gap:6px;text-align:center}.bar-wrap{height:100%;display:flex;align-items:flex-end;justify-content:center;background:#f3eee8;border-radius:10px;padding:5px}.bar{position:relative;display:block;width:100%;min-height:8px;border-radius:7px;background:#8b6751}.bar em{position:absolute;top:-19px;left:50%;transform:translateX(-50%);font-style:normal;font-size:9px;font-weight:700}.chart-day small{color:#81776e;font-size:10px}.queue-health{display:flex;align-items:center;gap:15px;margin-top:12px}.health-ring{--health:100%;width:72px;height:72px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(#5f7a65 var(--health),#ece5dc 0)}.health-ring:after{content:"";position:absolute;inset:7px;border-radius:50%;background:#faf8f5}.health-ring strong{position:relative;z-index:1;font-size:14px}.queue-health p{margin:4px 0 0;color:#81776e;font-size:11px;line-height:1.45}.active-students{display:grid;gap:8px;margin-top:10px}.active-student{display:grid;grid-template-columns:22px 32px 1fr;gap:8px;align-items:center}.active-student .rank{font-size:10px;color:#81776e}.avatar{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#e8d8c9;color:#795a46;font-weight:800;flex:0 0 auto}.avatar.large{width:44px;height:44px;border-radius:14px}.active-student strong{display:block;font-size:12px}.active-student small{color:#81776e;font-size:10px}.widget-empty{color:#81776e;font-size:12px;padding:12px 0}
.teacher-main-grid{display:grid;grid-template-columns:340px minmax(0,1fr);gap:12px;align-items:start}.teacher-queue-card{padding:16px;position:sticky;top:12px;height:calc(100vh - 24px);min-height:680px;display:flex;flex-direction:column}.icon-button{border:0;width:34px;height:34px;border-radius:10px;background:#f1ebe4}.teacher-filter-row{display:grid;grid-template-columns:1fr 105px;gap:8px;margin-top:14px}.search-box{display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid #ddd1c4;background:#fff;border-radius:12px}.search-box input{width:100%;border:0;outline:0;background:transparent;font-size:11px}.teacher-filter-row select{padding:10px;border:1px solid #ddd1c4;border-radius:12px;background:#fff;font-size:11px}.queue-tabs{display:flex;gap:5px;margin:10px 0;overflow:auto}.queue-tabs button{border:0;border-radius:999px;padding:7px 9px;background:#f2ede7;color:#766c64;font-size:10px;font-weight:700;white-space:nowrap}.queue-tabs button.active{background:#2f2a25;color:#fff}.teacher-queue{display:grid;gap:8px;overflow:auto;padding-right:2px}.teacher-queue-item{width:100%;border:1px solid #e1d7cc;background:#fffaf5;border-radius:15px;padding:12px;text-align:left;transition:.18s}.teacher-queue-item:hover,.teacher-queue-item.active{border-color:#8b6751;transform:translateY(-1px);box-shadow:0 8px 18px rgba(70,50,35,.08)}.teacher-queue-item.active{background:#f5ebe2}.queue-item-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.queue-person{display:flex;gap:8px;min-width:0}.queue-person strong{display:block;font-size:12px}.queue-person small{display:block;margin-top:2px;color:#81776e;font-size:9px}.teacher-queue-item p{margin:9px 0 0;color:#665e57;font-family:"Nanum Myeongjo",serif;font-size:12px;line-height:1.5}.queue-empty{padding:28px 12px;text-align:center;color:#81776e;font-size:12px}
.teacher-workspace-card{min-height:680px;overflow:hidden}.teacher-empty-state{min-height:680px;display:grid;place-items:center;align-content:center;text-align:center;padding:40px;color:#81776e}.teacher-empty-state h2{margin:12px 0 5px;color:#2f2a25}.teacher-empty-state p{max-width:320px;margin:0;line-height:1.55}.empty-illustration{width:62px;height:62px;border-radius:20px;display:grid;place-items:center;background:#eee3d8;color:#8b6751;font-size:25px}.workspace-topbar{padding:17px 20px;border-bottom:1px solid #e2d8ce;background:#fbf8f4}.workspace-student{display:flex;gap:11px;align-items:center}.workspace-student h2{margin:0;font-size:19px}.workspace-student span{color:#81776e;font-size:11px}.workspace-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:0}.correction-area{padding:16px}.compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.compare-panel,.feedback-card,.mini-widget{border:1px solid #e1d6ca;border-radius:17px;background:#fff}.compare-panel{overflow:hidden}.compare-head{padding:12px 14px;border-bottom:1px solid #e7ddd4;background:#f8f4ef}.compare-head h3,.feedback-card h3{margin:0;font-size:14px}.compare-head>span{color:#81776e;font-size:10px}.student-paper{min-height:410px;max-height:62vh;overflow:auto;padding:17px;font-family:"Nanum Myeongjo",serif;font-size:16px;line-height:1.85;background:repeating-linear-gradient(to bottom,#fff 0,#fff 37px,#eee7df 38px)}.correction-panel .rich-editor{border:0;border-radius:0}.correction-panel .editor-content{min-height:410px;max-height:62vh;overflow:auto;font-size:16px;line-height:1.85}.feedback-card{margin-top:12px;padding:14px}.snippet-chips{display:flex;flex-wrap:wrap;gap:6px;margin:11px 0}.snippet-chips button{border:1px solid #dccdbf;background:#f8f2ec;border-radius:999px;padding:7px 10px;color:#69584b;font-size:10px;font-weight:700}.feedback-card textarea{width:100%;min-height:110px;border:1px solid #dfd4c9;border-radius:13px;padding:12px;outline:0;background:#fffdfb}.workspace-sidebar{padding:16px 16px 16px 0;display:grid;gap:10px;align-content:start}.mini-widget{padding:14px}.detail-list{display:grid;gap:10px;margin-top:10px}.detail-list>div{display:flex;justify-content:space-between;gap:8px}.detail-list span{color:#81776e;font-size:10px}.detail-list strong{font-size:10px;text-align:right}.truncate{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.student-note-box{margin-top:9px;padding:11px;border-radius:12px;background:#f7f1ea;color:#665c54;font-size:11px;line-height:1.55}.teacher-actions{display:grid;gap:8px;margin-top:10px}.action-full{width:100%}.text-danger{border:0;background:transparent;color:#a45d55;font-size:10px;font-weight:700;padding:8px}.action-widget{position:sticky;top:14px}
@media(max-width:1250px){.teacher-widget-row{grid-template-columns:1fr 1fr}.activity-widget{grid-column:1/-1}.workspace-layout{grid-template-columns:1fr}.workspace-sidebar{padding:0 16px 16px;grid-template-columns:repeat(3,1fr)}.action-widget{position:static}}
@media(max-width:980px){.teacher-stat-grid{grid-template-columns:1fr 1fr}.teacher-main-grid{grid-template-columns:1fr}.teacher-queue-card{position:static;height:auto;min-height:0}.teacher-queue{max-height:420px}.compare-grid{grid-template-columns:1fr}.workspace-sidebar{grid-template-columns:1fr 1fr}.action-widget{grid-column:1/-1}}
@media(max-width:680px){.teacher-os-shell{width:100%;padding:10px 8px 30px}.teacher-os-header{display:block}.teacher-header-tools{justify-content:flex-start;margin-top:12px}.teacher-stat-grid,.teacher-widget-row{grid-template-columns:1fr 1fr}.teacher-widget-row .teacher-widget{grid-column:1/-1}.teacher-main-grid{gap:8px}.teacher-queue-card,.teacher-workspace-card{border-radius:17px}.teacher-filter-row{grid-template-columns:1fr}.workspace-topbar{padding:14px}.correction-area{padding:10px}.workspace-sidebar{padding:0 10px 10px;grid-template-columns:1fr}.teacher-stat-card{min-height:118px}.private-pill{display:none}}

/* =========================================================
  LANGSNACK NOTEBOOK HOME V2.1
  ========================================================= */
.notebook-home{background:#f8f5ec;color:#2f2a25;min-height:100vh}
.notebook-header{height:72px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 28px;background:#183f35;color:#fff;position:sticky;top:0;z-index:50;box-shadow:0 8px 24px rgba(20,48,41,.12)}
.notebook-logo{font-size:18px;font-weight:800;letter-spacing:.08em;color:#fff}
.notebook-header-tools{display:flex;align-items:center;gap:10px;min-width:0}
.compact-control{display:flex;align-items:center;gap:7px;color:rgba(255,255,255,.72);font-size:11px;white-space:nowrap}
.compact-control select{max-width:220px;color:#fff;background:transparent;border:0;outline:0;font-size:12px;font-weight:700}
.compact-control option{color:#2f2a25;background:#fff}
.compact-timezone select{width:235px}
.avatar-button{width:38px;height:38px;border:1px solid rgba(255,255,255,.3);border-radius:12px;background:rgba(255,255,255,.12);color:#fff;font-weight:800}
.notebook-app{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 72px)}
.notebook-sidebar{padding:24px 14px;border-right:1px solid #e5ddd2;background:#f2ede4;display:flex;flex-direction:column;justify-content:space-between;gap:24px;position:sticky;top:72px;height:calc(100vh - 72px)}
.sidebar-nav{display:grid;gap:6px}
.sidebar-link{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:12px;color:#776f67;font-size:13px;font-weight:700}
.sidebar-link:hover{background:#ebe3d8;color:#183f35}.sidebar-link.active{background:#183f35;color:#fff}
.nav-icon{width:20px;text-align:center;font-size:15px}
.sidebar-help{display:grid;gap:2px;padding:14px;border-radius:14px;background:#e6ded2;color:#6d645b;font-size:11px}
.sidebar-help strong{font-size:12px;color:#2f2a25}
.notebook-main{min-width:0;padding:34px clamp(20px,3.4vw,54px) 36px}
.welcome-row{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:22px}
.welcome-row h1{margin:0;font-size:clamp(30px,4vw,46px);line-height:1.05;letter-spacing:-.045em}.welcome-row p{margin:9px 0 0;color:#7f766e;font-size:15px}
.streak-card{display:flex;align-items:center;gap:10px;min-width:190px;padding:14px 15px;border:1px solid #e0d6ca;border-radius:17px;background:#fffaf5;color:#2f2a25;box-shadow:0 8px 24px rgba(60,45,34,.05)}
.streak-flame{color:#b2723c}.streak-value{font-size:25px;font-weight:800}.streak-copy{display:grid;text-align:left}.streak-copy strong{font-size:12px}.streak-copy small{font-size:10px;color:#8b8178}.card-arrow{margin-left:auto;color:#9b9187;font-size:18px}
.quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.quick-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:17px;border:1px solid #e0d6ca;border-radius:18px;background:#fffaf5;box-shadow:0 8px 24px rgba(60,45,34,.04)}
.quick-card:hover{border-color:#b9a897;transform:translateY(-1px)}.quick-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#e6eee9;color:#183f35;font-size:18px}.quick-card strong{display:block;font-size:14px}.quick-card small{display:block;margin-top:3px;color:#847a72;font-size:11px;line-height:1.35}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(275px,.55fr);gap:16px;align-items:start}
.dashboard-card{border:1px solid #e0d6ca;border-radius:20px;background:#fffaf5;box-shadow:0 10px 28px rgba(60,45,34,.05)}
.writing-card{padding:22px;grid-row:span 1}.dashboard-stack{display:grid;gap:12px}.card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.card-heading h2{margin:0;font-size:18px;letter-spacing:-.02em}.section-kicker{margin:0 0 4px;color:#8b6751;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.text-button{border:0;background:transparent;color:#6b7c71;font-size:11px;font-weight:800;padding:4px}
.category-tabs{display:flex;gap:7px;margin:18px 0 12px;flex-wrap:wrap}.category-tab{border:1px solid #d8cbbd;border-radius:999px;padding:8px 13px;background:#fff;color:#786f66;font-size:11px;font-weight:800}.category-tab.active{background:#183f35;color:#fff;border-color:#183f35}
.writing-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.level-control,.recommend-button{display:flex;align-items:center;gap:7px;min-height:38px;border:1px solid #ded2c5;border-radius:11px;background:#fff;padding:8px 10px;color:#615951;font-size:11px}.level-control span{color:#8b8178}.recommend-button:hover{border-color:#9f8b79}.recommend-button span:first-child{color:#8b6751;font-weight:800}
.recommendation-panel{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;padding:13px 14px;border-radius:13px;background:#eee5d9}.recommendation-type{display:block;margin-bottom:4px;color:#8b6751;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.recommendation-panel p{margin:0;font-family:"Nanum Myeongjo",serif;font-size:17px;line-height:1.5}.recommendation-actions{display:flex;gap:6px}.recommendation-actions button{border:0;border-radius:9px;background:#fff;padding:7px 9px;color:#6d6259;font-size:10px}
.editor-toolbar{display:flex;align-items:center;gap:5px;padding:8px;border:1px solid #e2d7cc;border-bottom:0;border-radius:14px 14px 0 0;background:#f3ede5}.editor-toolbar button{min-width:30px;height:30px;border:1px solid #ded2c6;border-radius:8px;background:#fff;color:#433d38}.toolbar-divider{width:1px;height:20px;background:#d9cdc1;margin:0 3px}
.notebook-paper{margin:0;min-height:420px;border-radius:0 0 14px 14px}.notebook-paper textarea{min-height:420px;font-size:18px;line-height:39px}
.notebook-editor-footer{padding:13px 0 0}.ghost-button{background:#eee5da;color:#675d55}.green-button{background:#183f35;color:#fff}
.achievements-card,.progress-card,.calendar-card{padding:16px}.badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.badge-item{display:grid;gap:3px;padding:10px;border:1px solid #e6dcd1;border-radius:13px;background:#f9f5ef;opacity:.68}.badge-item.earned{opacity:1;background:#edf3ef;border-color:#cbd9d0}.badge-medal{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#e8ded2;color:#8b6751;font-weight:800}.badge-item strong{font-size:11px}.badge-item small{color:#8b8178;font-size:9px;line-height:1.35}
.progress-card .card-heading{align-items:center}.level-line{margin-top:12px}.level-line strong{display:block;margin-bottom:7px;font-size:12px}.progress-track{height:7px;border-radius:999px;background:#e9e0d6;overflow:hidden}.progress-fill{height:100%;background:#6f8777;border-radius:inherit}#xpLabel{font-size:10px;color:#8a8077}
.calendar-widget .card-heading{align-items:center}.calendar-widget .card-heading h2{font-size:15px}.calendar-widget #calendarMonthLabel{font-size:10px;color:#8b8178}.calendar-widget .calendar-grid{gap:4px;margin-top:10px}.calendar-widget .calendar-grid span{font-size:9px}.calendar-widget .calendar-grid .calendar-day{min-width:0}.calendar-legend{display:flex;gap:12px;margin-top:10px;color:#8b8178;font-size:9px}.calendar-legend>span{display:flex;align-items:center;gap:5px}.legend-dot{width:7px;height:7px;border-radius:50%;display:inline-block}.legend-dot.submitted{background:#183f35}.legend-dot.today{border:1.5px solid #8b6751}
.recent-card{grid-column:1/-1;padding:17px}.recent-list{display:grid;gap:7px;margin-top:11px}.recent-item{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto auto;align-items:center;gap:10px;text-align:left;padding:11px;border:1px solid #e5dbd0;border-radius:13px;background:#fff}.recent-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#e9efe9;color:#183f35}.recent-copy strong{display:block;font-size:12px}.recent-copy small,.recent-status{color:#8b8178;font-size:10px}
.daily-card{grid-column:1/-1;padding:17px}.daily-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.daily-grid article{display:grid;gap:7px;align-content:start;min-height:150px;padding:14px;border:1px solid #e3d8cc;border-radius:14px;background:#f8f3ec}.daily-grid article>span{color:#8b6751;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.daily-grid strong{font-size:13px;line-height:1.45}.daily-placeholder{color:#9b9187;font-weight:600}.daily-grid button{margin-top:auto;border:0;border-radius:10px;padding:8px;background:#183f35;color:#fff;font-size:10px;font-weight:800}.daily-grid button:disabled{background:#d9d0c6;color:#8d837b;cursor:not-allowed}
.tip-card{grid-column:1/-1;padding:17px;background:#ece6dc}.tip-card p{margin:8px 0 0;color:#6f665e;font-size:12px}.notebook-footer{display:flex;justify-content:space-between;gap:16px;padding:24px 2px 0;color:#8c8279;font-size:10px}.notebook-footer span:last-child{display:flex;gap:14px}

@media(max-width:1100px){.notebook-app{grid-template-columns:190px minmax(0,1fr)}.quick-actions{grid-template-columns:1fr}.dashboard-grid{grid-template-columns:minmax(0,1fr) 260px}}
@media(max-width:820px){.notebook-header{padding:0 14px}.compact-control>span{display:none}.compact-timezone select{width:160px}.notebook-app{grid-template-columns:1fr}.notebook-sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid #e5ddd2;padding:8px 12px}.sidebar-nav{display:flex;overflow:auto}.sidebar-link{white-space:nowrap}.sidebar-help{display:none}.notebook-main{padding:24px 14px}.dashboard-grid{grid-template-columns:1fr}.dashboard-stack{grid-template-columns:1fr 1fr}.calendar-card{grid-column:1/-1}.welcome-row{align-items:flex-start}.streak-card{min-width:170px}.daily-grid{grid-template-columns:1fr}.recent-card,.daily-card,.tip-card{grid-column:auto}}
@media(max-width:580px){.notebook-header{height:auto;min-height:64px;padding:10px 12px;align-items:flex-start}.notebook-header-tools{gap:6px;flex-wrap:wrap;justify-content:flex-end}.compact-timezone{order:3;width:100%;justify-content:flex-end}.compact-timezone select{width:190px}.notebook-app{min-height:calc(100vh - 64px)}.notebook-logo{font-size:15px}.avatar-button{width:34px;height:34px}.notebook-main{padding:18px 10px 28px}.welcome-row{display:grid;gap:12px}.welcome-row h1{font-size:31px}.streak-card{width:100%}.writing-card{padding:14px}.dashboard-stack{grid-template-columns:1fr}.quick-card{padding:13px}.badge-grid{grid-template-columns:1fr 1fr}.notebook-paper{min-height:360px}.notebook-paper textarea{min-height:360px;padding:14px 12px;font-size:17px}.notebook-editor-footer{align-items:flex-start}.notebook-editor-footer .action-group{position:static;border:0;background:transparent;box-shadow:none;padding:0;width:100%}.notebook-editor-footer .action-group .button{min-height:42px}.recent-item{grid-template-columns:32px minmax(0,1fr) auto}.recent-status{display:none}.notebook-footer{display:grid}.notebook-footer span:last-child{flex-wrap:wrap}}


/* Langsnack Notebook V3.1: shared application pages */
.nb-shell{min-height:100vh;background:#f7f2eb;color:#2f2a25;font-family:"DM Sans","Noto Sans KR",sans-serif}
.nb-header{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:minmax(230px,1fr) auto minmax(230px,1fr);align-items:center;gap:24px;padding:16px clamp(20px,4vw,54px);border-bottom:1px solid #e2d8cc;background:rgba(250,247,242,.94);backdrop-filter:blur(14px)}
.nb-brand{display:flex;align-items:center;gap:11px}.nb-logo{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#183f35;color:#fff;font-weight:800}.nb-brand>span:last-child{display:grid}.nb-brand strong{font-size:15px;letter-spacing:-.02em}.nb-brand span span{color:#8a8077;font-size:10px}
.nb-nav{display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #e0d6ca;border-radius:999px;background:#fffaf5}.nb-nav a{padding:9px 15px;border-radius:999px;color:#756c64;font-size:12px;font-weight:800}.nb-nav a:hover,.nb-nav a.active{background:#183f35;color:#fff}
.nb-actions{display:flex;justify-content:flex-end;gap:8px}.nb-actions select{max-width:190px;height:38px;border:1px solid #ded2c5;border-radius:11px;background:#fff;padding:0 10px;font:inherit;font-size:11px}
.nb-main{width:min(1160px,calc(100% - 40px));margin:0 auto;padding:42px 0 64px}.nb-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px}.nb-kicker{display:block;margin-bottom:7px;color:#8b6751;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.nb-page-head h1{margin:0;font-size:clamp(34px,5vw,54px);line-height:1;letter-spacing:-.05em}.nb-page-head p{max-width:620px;margin:12px 0 0;color:#7c736b;line-height:1.55}.nb-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.nb-filter input,.nb-filter select{height:42px;border:1px solid #ded2c5;border-radius:12px;background:#fffaf5;padding:0 12px;font:inherit;font-size:12px}.nb-card{border:1px solid #e0d6ca;border-radius:22px;background:#fffaf5;box-shadow:0 12px 34px rgba(60,45,34,.055)}.nb-card-pad{padding:18px}.nb-work-list{display:grid;gap:10px}.nb-work-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;padding:15px;border:1px solid #e7ddd2;border-radius:16px;background:#fff;color:#2f2a25;transition:.18s ease}.nb-work-card:hover{border-color:#af9f90;transform:translateY(-1px);box-shadow:0 8px 22px rgba(60,45,34,.06)}.nb-work-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#e8efe9;font-size:19px}.nb-work-card strong{font-size:14px}.nb-work-card p{margin:5px 0 0;color:#756d65;font-size:12px;line-height:1.45}.nb-work-card time{color:#948a81;font-size:10px}.nb-empty{padding:52px 20px;text-align:center;color:#7c736b}.nb-empty h2{margin:0 0 7px;color:#2f2a25}.button-primary{display:inline-grid;place-items:center;min-height:42px;padding:0 17px;border-radius:13px;background:#2f2a25;color:#fff;font-size:12px;font-weight:800}.status-badge{display:inline-flex;padding:7px 10px;border-radius:999px;font-size:10px;font-weight:800}.status-pending{background:#f2e7ce;color:#80602d}.status-reviewing{background:#e7ddf0;color:#6b4c7b}.status-completed{background:#dfece4;color:#315d45}
@media(max-width:780px){.nb-header{grid-template-columns:1fr auto}.nb-nav{grid-column:1/-1;grid-row:2;justify-content:center}.nb-actions .header-timezone{display:none}.nb-main{width:min(100% - 24px,1160px);padding-top:26px}.nb-page-head{align-items:flex-start;flex-direction:column}.nb-filter{justify-content:flex-start;width:100%}.nb-filter input{flex:1;min-width:180px}.nb-work-card{grid-template-columns:38px minmax(0,1fr)}.nb-work-card>span:last-child{grid-column:2;text-align:left!important}.nb-brand span span{display:none}}

/* Dashboard refinements */
.surprise-button{position:relative;overflow:hidden;display:flex;align-items:center;gap:8px;min-height:38px;border:1px solid #d3a45f;border-radius:12px;background:linear-gradient(135deg,#fff3cc,#f5d59b);padding:8px 13px;color:#704d20;font-size:11px;font-weight:900;box-shadow:0 5px 14px rgba(173,116,42,.13)}.surprise-button:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(173,116,42,.18)}.surprise-button .dice{font-size:15px;animation:twinkle 1.7s infinite}.surprise-button.is-shuffling .dice{animation:spin .5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes twinkle{50%{transform:scale(1.22);opacity:.72}}
.recommendation-panel{align-items:flex-start}.recommendation-panel>div:first-child{flex:1}.recommendation-panel #generatorText{display:flex;gap:8px;flex-wrap:wrap}.surprise-result{display:grid;gap:3px;flex:1 1 145px;padding:10px;border-radius:11px;background:#fff}.surprise-result.full{flex-basis:100%}.surprise-result small{color:#9a7651;font-size:8px;font-weight:900;letter-spacing:.1em}.surprise-result b{font-size:12px;line-height:1.4}.shuffle-copy{color:#8b6751;font-weight:800}
.editor-toolbar{padding:8px;gap:4px;overflow-x:auto;white-space:nowrap}.editor-toolbar button{min-width:31px;height:31px;padding:0 8px;border-radius:8px;font-size:10px}.notebook-paper textarea{min-height:390px;padding:28px 30px;font-family:"Noto Sans KR","DM Sans",sans-serif;font-size:16px;line-height:2;background-image:linear-gradient(transparent 31px,rgba(133,111,90,.12) 32px);background-size:100% 32px;background-attachment:local}.next-badge-preview{display:grid;grid-template-columns:46px minmax(0,1fr);gap:11px;align-items:center}.next-badge-copy{display:grid}.next-badge-copy small{color:#8b6751;font-size:8px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.next-badge-copy strong{margin-top:2px;font-size:14px}.next-badge-copy span{margin-top:2px;color:#81776e;font-size:9px}.badge-progress{grid-column:1/-1;display:flex;align-items:center;gap:8px}.badge-progress-bar{height:7px;flex:1;overflow:hidden;border-radius:999px;background:#ede4d9}.badge-progress-bar i{display:block;height:100%;border-radius:inherit;background:#3f7563}.badge-progress b{font-size:9px;color:#756c64}.calendar-widget{max-width:270px;justify-self:end;width:100%;padding:15px}.calendar-widget .card-heading h2{font-size:13px}.calendar-widget .calendar-grid{gap:4px}.calendar-widget .calendar-day,.calendar-widget .day-label{width:22px;height:22px;font-size:8px}.calendar-widget .calendar-legend{font-size:8px}.achievements-card{padding:16px}.progress-card{padding:16px}
@media(max-width:980px){.calendar-widget{max-width:none;justify-self:stretch}}

/* V3.2 submission form and My Work polish */
.nb-form-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;align-items:start}
.nb-submit-card{padding:24px}
.nb-side-stack{display:grid;gap:14px;position:sticky;top:92px}
.nb-two{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(190px,.7fr);gap:16px}
.nb-field{display:grid;gap:7px;margin-bottom:18px}
.nb-field>label{font-size:12px;font-weight:800;color:#51483f}
.nb-input,.nb-textarea{width:100%;border:1px solid #ddd1c4;border-radius:12px;background:#fff;padding:11px 13px;color:#2f2a25;font:inherit;outline:none;transition:border-color .15s,box-shadow .15s}
.nb-input{min-height:44px}
.nb-textarea{min-height:88px;resize:vertical;line-height:1.55}
.nb-input:focus,.nb-textarea:focus{border-color:#789789;box-shadow:0 0 0 3px rgba(63,117,99,.12)}
.nb-dropzone{display:grid;place-items:center;text-align:center;gap:5px;min-height:118px;padding:18px;border:1.5px dashed #cdbdac;border-radius:15px;background:#faf6f0;cursor:pointer;transition:.15s}
.nb-dropzone:hover,.nb-dropzone.drag{border-color:#3f7563;background:#f0f6f2}
.nb-dropzone strong{font-size:13px}.nb-dropzone span{font-size:11px;color:#81776e}
.nb-file-list{display:grid;gap:7px;margin-top:8px}.nb-file{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;background:#f5eee6;font-size:11px}.nb-file button{border:0;background:transparent;color:#8c5f4b;font-weight:800;cursor:pointer}
.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.steps{display:grid;gap:14px}.step{display:grid;grid-template-columns:32px 1fr;gap:10px;align-items:start}.step-num{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#eadac8;color:#8b6751;font-size:11px;font-weight:900}.step strong{display:block;font-size:12px}.step span{display:block;margin-top:3px;color:#81776e;font-size:10px;line-height:1.4}
.rich-editor{overflow:hidden;border:1px solid #ddd1c4;border-radius:15px;background:#fff}.rich-editor .editor-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:9px;border-bottom:1px solid #e3d8cc;background:#f6f0e9}.rich-editor [contenteditable="true"]{min-height:430px;padding:26px 28px;font-family:"Nanum Myeongjo",serif;font-size:17px;line-height:1.95;outline:none;background-image:linear-gradient(transparent 31px,rgba(133,111,90,.09) 32px);background-size:100% 32px}
.nb-work-list{gap:12px}.nb-work-card-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:14px 15px;border:1px solid #e7ddd2;border-radius:16px;background:#fff;transition:.18s ease}.nb-work-card-wrap:hover{border-color:#b9aa9a;box-shadow:0 8px 22px rgba(60,45,34,.06)}.nb-work-card-main{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:14px;color:#2f2a25}.nb-work-actions{display:flex;gap:7px}.nb-work-actions .button{min-height:36px;padding:0 12px;font-size:10px}.button-secondary{display:inline-grid;place-items:center;min-height:42px;padding:0 17px;border:1px solid #dfd2c5;border-radius:13px;background:#f0e4d6;color:#765b47;font-size:12px;font-weight:800}.button-ghost{display:inline-grid;place-items:center;min-height:36px;padding:0 12px;border:1px solid #ddd1c4;border-radius:11px;background:#fff;color:#4a423b;font-size:10px;font-weight:800}
.my-work-summary{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px;margin-bottom:16px}.mini-achievement{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;padding:15px}.mini-achievement .badge-medal{width:42px;height:42px;font-size:18px}.mini-achievement-copy{display:grid;gap:2px}.mini-achievement-copy small{color:#8b6751;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.mini-achievement-copy strong{font-size:14px}.mini-achievement .badge-progress{margin-top:8px}
@media(max-width:900px){.nb-form-grid{grid-template-columns:1fr}.nb-side-stack{position:static}.nb-two{grid-template-columns:1fr}.my-work-summary{grid-template-columns:1fr}.rich-editor [contenteditable="true"]{min-height:360px;padding:20px}}
@media(max-width:650px){.nb-submit-card{padding:16px}.nb-work-card-wrap{grid-template-columns:1fr}.nb-work-card-main{grid-template-columns:38px minmax(0,1fr)}.nb-work-card-main>span:last-child{grid-column:2;text-align:left!important}.nb-work-actions{padding-left:52px}.rich-editor [contenteditable="true"]{min-height:320px;padding:16px;font-size:16px}}


/* Notebook V3.3: submission date, confirmation and achievement badges */
.nb-submission-meta{grid-template-columns:minmax(220px,.7fr) minmax(220px,.7fr);justify-content:start}
#journalDateField[hidden]{display:none!important}
.submission-modal,.achievement-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px}
.submission-modal[hidden],.achievement-modal[hidden]{display:none!important}
.submission-modal-backdrop,.achievement-modal-backdrop{position:absolute;inset:0;background:rgba(18,39,31,.46);backdrop-filter:blur(5px)}
.submission-modal-card,.achievement-modal-card{position:relative;width:min(520px,100%);border:1px solid rgba(14,59,45,.14);border-radius:26px;background:#fffdf8;box-shadow:0 30px 90px rgba(14,59,45,.24);padding:30px;text-align:center;animation:modal-pop .24s ease-out}
.submission-modal-mark{width:58px;height:58px;margin:0 auto 16px;display:grid;place-items:center;border-radius:50%;background:#dfeee6;color:#0e3b2d;font-size:26px;font-weight:900}
.submission-modal-card h2{margin:6px 0 10px;font-size:27px;letter-spacing:-.035em}.submission-modal-card p{margin:0 auto 22px;max-width:410px;color:#71675f;line-height:1.7}.submission-modal-card .button{min-width:150px}
body.modal-open{overflow:hidden}
.achievement-modal-card{width:min(860px,100%);max-height:min(760px,90vh);overflow:auto;text-align:left}
.achievement-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}.achievement-modal-head h2{margin:3px 0 0;font-size:27px}.modal-close{width:38px;height:38px;border:0;border-radius:12px;background:#f1ebe3;font-size:22px}
.all-badges-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.all-badge{display:grid;grid-template-columns:42px 1fr;gap:11px;padding:14px;border:1px solid #e6ddd2;border-radius:16px;background:#f9f5ef;opacity:.62}.all-badge.earned{opacity:1;border-color:#bcd4c7;background:#eef6f1}.all-badge-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:#e8ded2;color:#8b6751;font-weight:900}.all-badge.earned .all-badge-icon{background:#d7ebdf;color:#0e5a42}.all-badge strong{font-size:13px}.all-badge p{margin:3px 0 9px;color:#81776e;font-size:10px;line-height:1.45}.all-badge small{display:block;margin-top:5px;color:#81776e;font-size:9px;text-align:right}
.journal-date{display:block;margin-bottom:4px;color:#8b6751;font-size:9px;font-weight:800}
@keyframes modal-pop{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@media(max-width:650px){.nb-submission-meta,.all-badges-grid{grid-template-columns:1fr}.submission-modal-card,.achievement-modal-card{padding:22px;border-radius:20px}.submission-modal-card h2{font-size:23px}}


/* V3.4 date, achievement and submission editor fixes */
.main-journal-date{
display:flex;align-items:center;gap:8px;min-height:39px;padding:7px 10px;
border:1px solid #ddd1c4;border-radius:11px;background:#fff;color:#81776e;
font-size:10px;font-weight:700;
}
.main-journal-date input{border:0;outline:0;background:transparent;color:#2f2a25;font:600 11px "DM Sans",sans-serif}
.achievements-card{display:block!important;visibility:visible!important;min-height:150px}
.achievements-card .badge-grid{display:block}
.nb-writing-field{display:block!important;width:100%;min-width:0}
.nb-writing-editor-mount{display:block!important;width:100%;min-height:430px}
.nb-writing-editor-mount .rich-editor{display:block!important;width:100%;min-height:430px;border:1px solid #d9cbbb;border-radius:16px;background:#fff;overflow:hidden}
.nb-writing-editor-mount .toolbar{display:flex!important;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid #ded2c5;background:#f5eee6}
.nb-writing-editor-mount .editor-content{display:block!important;min-height:370px;width:100%;padding:24px;outline:0;background:#fff;font-family:"Noto Sans KR","Nanum Myeongjo",sans-serif;font-size:17px;line-height:1.9}
.nb-writing-editor-mount .editor-content:empty:before{content:attr(data-placeholder);color:#aaa095}
@media(max-width:650px){
.main-journal-date{width:100%;justify-content:space-between}
.nb-writing-editor-mount,.nb-writing-editor-mount .rich-editor{min-height:350px}
.nb-writing-editor-mount .editor-content{min-height:300px;padding:17px;font-size:16px}
}


/* V4 stable Korean date picker */
.korean-date-picker{display:grid;grid-template-columns:1.25fr .95fr .95fr;gap:6px;align-items:center;margin-top:5px}
.korean-date-picker select{width:100%;min-width:0;padding:10px 16px;border:1px solid #d9cec1;border-radius:10px;background:#fff;color:#2f2a25;font-family:"Noto Sans KR","DM Sans",sans-serif;font-size:11px;font-weight:700}
.korean-date-preview{grid-column:1/-1;color:#214f3d;font-family:"Noto Sans KR","DM Sans",sans-serif;font-size:11px;font-weight:800}
.main-journal-date{min-width:250px}
.main-journal-date>input[type=hidden]{display:none}
.journal-date{display:block;margin-bottom:4px;color:#315d4c;font-weight:800}
@media(max-width:650px){.korean-date-picker{grid-template-columns:1fr 1fr 1fr}.main-journal-date{min-width:100%;width:100%}}


/* =========================================================
  V4.1 REVIEW PAGE + DISCUSSION THREAD
  ========================================================= */
.review-page-head{align-items:center}
.review-progress-card{margin-bottom:16px}
.review-progress-head h2{margin:2px 0 0;font-size:18px}
.review-progress-line{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:18px}
.review-step{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;padding-right:18px;min-width:0}
.review-step:not(:last-child):after{content:"";position:absolute;top:16px;left:34px;right:0;height:2px;background:#e4dad0;z-index:0}
.review-step.done:not(:last-child):after{background:#6f9a80}
.review-step-dot{position:relative;z-index:1;width:34px;height:34px;display:grid;place-items:center;border:2px solid #d8cdc1;border-radius:50%;background:#fffaf5;color:#fff;font-size:13px;font-weight:900}
.review-step.done .review-step-dot{border-color:#5d8c72;background:#5d8c72}
.review-step.current .review-step-dot{box-shadow:0 0 0 5px rgba(93,140,114,.14)}
.review-step strong{display:block;font-size:12px}
.review-step small{display:block;margin-top:3px;color:#8a8077;font-size:9px;line-height:1.35}
.review-compare-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.review-pane{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.review-pane-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:19px 20px;border-bottom:1px solid #e6ddd3;background:#fcf9f5}
.review-pane-head h2{margin:2px 0 0;font-size:20px}
.review-word-count{flex:0 0 auto;color:#8a8077;font-size:10px}
.review-writing{flex:1;min-width:0;min-height:250px;padding:22px 20px;font-family:"Nanum Myeongjo","Noto Sans KR",serif;font-size:17px;line-height:1.95;overflow-wrap:anywhere;word-break:keep-all;background:repeating-linear-gradient(to bottom,#fff 0,#fff 37px,#eee7df 38px)}
.review-correction-pane .review-writing{background:repeating-linear-gradient(to bottom,#fbfdfb 0,#fbfdfb 37px,#e4ede7 38px)}
.nb-bookmark{flex:0 0 auto;border:1px solid #ded2c5;border-radius:999px;padding:8px 11px;background:#fff;color:#55493f;font-size:10px;font-weight:800}
.nb-bookmark.saved{border-color:#9fc0aa;background:#e9f3ec;color:#315c43}
.teacher-note-card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;margin:0 18px 18px;padding:14px;border:1px solid #d9e6dc;border-radius:15px;background:#f0f7f2}
.teacher-note-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#183f35;color:#fff;font-weight:900}
.teacher-note-card strong{display:block;font-size:12px}.teacher-note-card span{display:block;margin-top:2px;color:#758178;font-size:9px}.teacher-note-card p{margin:8px 0 0;line-height:1.65;font-size:12px}
.review-attachments{margin-top:16px}
.discussion-card{margin-top:16px}
.discussion-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:16px;border-bottom:1px solid #e6ddd3}
.discussion-head h2{margin:3px 0 5px;font-size:24px}.discussion-head p{max-width:690px;margin:0;color:#7d736b;font-size:12px;line-height:1.6}
.discussion-live-pill{flex:0 0 auto;padding:8px 11px;border-radius:999px;background:#f5e9cc;color:#765b25;font-size:10px;font-weight:800}
.chat-thread{display:grid;gap:14px;max-height:520px;overflow:auto;padding:22px 2px}
.chat-message{display:flex;align-items:flex-end;gap:9px;max-width:78%}
.chat-message.chat-student{margin-left:auto;flex-direction:row-reverse}
.chat-avatar{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;border-radius:50%;background:#183f35;color:#fff;font-size:10px;font-weight:900}
.chat-student .chat-avatar{background:#ead28f;color:#4f3f13}
.chat-column{display:grid;gap:4px;min-width:0}
.chat-meta{display:flex;align-items:center;gap:7px}.chat-student .chat-meta{justify-content:flex-end}
.chat-meta strong{font-size:10px}.chat-meta span{padding:2px 6px;border-radius:999px;background:#eee7df;color:#81766c;font-size:8px;font-weight:800}
.chat-bubble{padding:11px 13px;border-radius:16px 16px 16px 5px;background:#eef4f0;color:#2f2a25;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.chat-student .chat-bubble{border-radius:16px 16px 5px 16px;background:#f6e8ae}
.chat-time{color:#9a9087;font-size:8px}.chat-student .chat-time{text-align:right}
.thread-empty{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:center;padding:16px;border:1px dashed #d9cec3;border-radius:15px;background:#faf7f3}
.thread-empty-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:#ece5de;font-size:19px}
.thread-empty strong{display:block;font-size:12px}.thread-empty p{margin:4px 0 0;color:#82776e;font-size:11px;line-height:1.55}
.chat-compose{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;padding-top:16px;border-top:1px solid #e6ddd3}
.chat-compose-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#ead28f;color:#4f3f13;font-size:9px;font-weight:900}
.chat-compose-box{overflow:hidden;border:1px solid #ddd1c4;border-radius:16px;background:#fff}
.chat-compose-box textarea{width:100%;min-height:82px;padding:13px 14px;border:0;outline:0;resize:vertical;background:transparent;font:inherit;font-size:12px;line-height:1.6}
.chat-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-top:1px solid #ece3da;background:#faf7f3}
.chat-compose-actions small{color:#8b8178;font-size:9px}
.chat-compose-actions .button{min-height:36px;padding:0 13px;font-size:10px}
@media(max-width:900px){.review-progress-line{grid-template-columns:1fr 1fr;gap:14px}.review-step:not(:last-child):after{display:none}.review-compare-grid{grid-template-columns:1fr}.review-writing{min-height:210px}.chat-message{max-width:90%}}
@media(max-width:650px){.review-page-head{align-items:flex-start}.review-progress-line{grid-template-columns:1fr}.discussion-head{display:block}.discussion-live-pill{display:inline-flex;margin-top:12px}.chat-message{max-width:94%}.chat-compose{grid-template-columns:1fr}.chat-compose-avatar{display:none}.chat-compose-actions{align-items:flex-end;flex-direction:column}.chat-compose-actions .button{width:100%}}


/* =========================================================
  V4.2 SAVED EXPLANATIONS
  ========================================================= */
.saved-page{
display:grid;
gap:18px;
}
.saved-hero{
display:flex;
align-items:flex-end;
justify-content:space-between;
gap:28px;
padding:10px 0 8px;
}
.saved-hero h1{
margin:8px 0 10px;
font-size:clamp(38px,6vw,68px);
line-height:.98;
letter-spacing:-.055em;
}
.saved-hero p{
max-width:680px;
margin:0;
color:#7d736a;
font-size:16px;
line-height:1.6;
}
.saved-summary{
min-width:130px;
display:grid;
justify-items:end;
padding-bottom:5px;
}
.saved-summary strong{
font-size:36px;
line-height:1;
color:#164b3b;
}
.saved-summary span{
margin-top:5px;
color:#887a6d;
font-size:11px;
font-weight:700;
text-transform:uppercase;
letter-spacing:.08em;
}
.saved-toolbar{
display:flex;
justify-content:flex-end;
padding:4px 0;
}
.saved-search{
width:min(360px,100%);
display:flex;
align-items:center;
gap:10px;
padding:0 14px;
border:1px solid #decfbe;
border-radius:16px;
background:rgba(255,255,255,.72);
box-shadow:0 8px 24px rgba(64,44,30,.04);
}
.saved-search span{
color:#8f7e70;
font-size:20px;
}
.saved-search input{
width:100%;
height:48px;
border:0;
outline:0;
background:transparent;
color:#302a26;
font-size:13px;
}
.nb-saved-grid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:14px;
}
.saved-note-card{
min-width:0;
display:grid;
grid-template-rows:auto 1fr auto;
overflow:hidden;
border:1px solid #dfd1c2;
border-radius:22px;
background:rgba(255,255,255,.72);
box-shadow:0 16px 40px rgba(69,49,35,.07);
}
.saved-note-top{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
padding:14px 16px;
border-bottom:1px solid #eee4da;
background:#fbf7f2;
}
.saved-note-source{
display:inline-flex;
align-items:center;
gap:7px;
color:#8b6751;
font-size:10px;
font-weight:900;
letter-spacing:.07em;
text-transform:uppercase;
}
.saved-note-source i{
width:22px;
height:22px;
display:grid;
place-items:center;
border-radius:50%;
background:#e4f0e7;
color:#356046;
font-style:normal;
}
.saved-remove{
width:34px;
height:34px;
display:grid;
place-items:center;
border:1px solid #e2d4c5;
border-radius:11px;
background:#fff;
color:#ca9129;
font-size:16px;
}
.saved-remove:hover{
border-color:#cfa95f;
background:#fffaf0;
}
.saved-note-body{
padding:20px 20px 22px;
}
.saved-note-body h2{
margin:0 0 14px;
font-size:18px;
letter-spacing:-.025em;
}
.saved-note-body blockquote{
margin:0;
padding:0;
border:0;
color:#3f3934;
font-family:"Nanum Myeongjo",serif;
font-size:17px;
line-height:1.85;
white-space:pre-wrap;
}
.saved-note-footer{
display:flex;
align-items:flex-end;
justify-content:space-between;
gap:15px;
padding:14px 16px;
border-top:1px solid #eee4da;
background:#fffdf9;
}
.saved-note-footer>div{
display:grid;
gap:2px;
}
.saved-note-footer>div span{
color:#9a8b7e;
font-size:9px;
font-weight:800;
text-transform:uppercase;
letter-spacing:.08em;
}
.saved-note-footer>div strong{
color:#6d6259;
font-size:11px;
font-weight:600;
}
.saved-open-link{
display:inline-flex;
align-items:center;
gap:8px;
color:#174f3e;
font-size:11px;
font-weight:900;
}
.saved-open-link span{
transition:transform .18s ease;
}
.saved-open-link:hover span{
transform:translateX(3px);
}
.saved-empty{
grid-column:1/-1;
min-height:360px;
display:grid;
place-items:center;
align-content:center;
gap:10px;
padding:34px;
border:1px dashed #d8c7b7;
border-radius:22px;
background:rgba(255,255,255,.48);
text-align:center;
}
.saved-empty-icon{
width:54px;
height:54px;
display:grid;
place-items:center;
border-radius:17px;
background:#f1e9df;
color:#9a7446;
font-size:27px;
}
.saved-empty h2{margin:4px 0 0}
.saved-empty p{
max-width:380px;
margin:0 0 8px;
color:#80746a;
}

/* =========================================================
  V4.2 TEACHER DASHBOARD POLISH
  ========================================================= */
.teacher-os-body{
background:
radial-gradient(circle at top left,rgba(255,255,255,.82),transparent 32%),
#f4f0ea;
}
.teacher-os-shell{
width:min(1760px,calc(100% - 36px));
padding-top:28px;
}
.teacher-os-header{
align-items:center;
padding:2px 3px 8px;
}
.teacher-os-header h1{
font-size:clamp(28px,3.5vw,42px);
}
.private-pill{
display:inline-flex;
align-items:center;
gap:7px;
}
.private-pill i{
width:7px;
height:7px;
border-radius:50%;
background:#4f7c5d;
box-shadow:0 0 0 4px rgba(79,124,93,.12);
}
.teacher-stat-grid{
gap:14px;
margin-bottom:14px;
}
.teacher-stat-card{
min-height:138px;
padding:19px;
border-radius:24px;
}
.teacher-stat-card>div{
margin-top:17px;
}
.teacher-widget-row{
gap:14px;
margin-bottom:14px;
}
.teacher-widget,
.teacher-queue-card,
.teacher-workspace-card{
border-color:rgba(91,66,48,.11);
border-radius:24px;
box-shadow:0 15px 36px rgba(56,43,32,.065);
}
.teacher-widget{
padding:19px;
}
.teacher-main-grid{
grid-template-columns:350px minmax(0,1fr);
gap:14px;
}
.teacher-queue-card{
height:calc(100vh - 28px);
padding:18px;
}
.teacher-filter-row{
margin-top:16px;
}
.teacher-queue-item{
border-radius:16px;
padding:13px;
background:#fffdf9;
}
.teacher-queue-item.active{
border-color:#174f3e;
background:#edf5f0;
box-shadow:0 9px 20px rgba(23,79,62,.09);
}
.teacher-workspace-card{
background:rgba(255,255,255,.8);
}
.workspace-topbar{
padding:18px 21px;
background:#fcfaf7;
}
.workspace-layout{
grid-template-columns:minmax(0,1fr) 270px;
}
.correction-area{
padding:18px;
}
.compare-grid{
gap:14px;
}
.compare-panel,
.feedback-card,
.mini-widget{
border-radius:18px;
}
.compare-head{
min-height:68px;
align-items:center;
padding:13px 15px;
}
.student-paper,
.correction-panel .editor-content{
min-height:440px;
max-height:66vh;
}
.feedback-card{
margin-top:14px;
padding:16px;
}
.feedback-card textarea{
min-height:125px;
line-height:1.65;
}
.workspace-sidebar{
padding:18px 18px 18px 0;
gap:12px;
}
.mini-widget{
padding:15px;
background:#fffdf9;
}
.action-widget{
top:18px;
}
.teacher-actions .button{
min-height:44px;
}
.teacher-empty-state{
min-height:720px;
}
.empty-illustration{
width:70px;
height:70px;
border-radius:22px;
background:#e7f0ea;
color:#174f3e;
}

@media(max-width:980px){
.nb-saved-grid{grid-template-columns:1fr}
.saved-hero{align-items:flex-start}
.saved-summary{justify-items:start}
}
@media(max-width:680px){
.saved-hero{
display:grid;
gap:14px;
}
.saved-hero h1{
font-size:42px;
}
.saved-summary{
display:flex;
align-items:baseline;
gap:8px;
}
.saved-toolbar{
justify-content:stretch;
}
.saved-search{
width:100%;
}
.saved-note-footer{
align-items:flex-start;
flex-direction:column;
}
.teacher-os-shell{
width:100%;
padding:12px 8px 34px;
}
}


/* =========================================================
  V5 TEACHER OS + WIX GUEST ACCOUNT
  ========================================================= */
.avatar-button{
min-width:48px;
width:auto;
height:34px;
padding:0 12px;
border-radius:999px;
font-size:10px;
line-height:1;
letter-spacing:0;
}
.avatar-button.is-member{
width:34px;
min-width:34px;
padding:0;
font-size:10px;
}
.notebook-guest-notice{
min-height:46px;
display:flex;
align-items:center;
justify-content:center;
gap:22px;
padding:8px 20px;
border-bottom:1px solid #e4d8c9;
background:#fff8e8;
color:#55483e;
}
.notebook-guest-notice[hidden]{display:none!important}
.guest-notice-copy{
display:flex;
align-items:center;
gap:10px;
}
.guest-notice-dot{
width:8px;
height:8px;
border-radius:50%;
background:#c18b38;
box-shadow:0 0 0 5px rgba(193,139,56,.12);
}
.guest-notice-copy>div{
display:grid;
gap:1px;
}
.guest-notice-copy strong{
font-size:11px;
}
.guest-notice-copy span{
color:#817266;
font-size:10px;
}
.guest-notice-login{
border:1px solid #d8c09a;
border-radius:999px;
padding:7px 11px;
background:#fffdf8;
color:#174f3e;
font-size:10px;
font-weight:800;
}

.teacher-os-app{
min-height:100vh;
display:grid;
grid-template-columns:220px minmax(0,1fr);
}
.teacher-os-sidebar{
position:sticky;
top:0;
height:100vh;
display:flex;
flex-direction:column;
padding:25px 14px 18px;
border-right:1px solid #e0d6cc;
background:#fffdf9;
}
.teacher-os-brand{
display:grid;
gap:4px;
padding:0 10px 22px;
}
.teacher-os-brand strong{
color:#174f3e;
font-size:18px;
letter-spacing:.08em;
}
.teacher-os-brand span{
color:#8d8075;
font-size:10px;
font-weight:800;
text-transform:uppercase;
letter-spacing:.13em;
}
.teacher-os-nav{
display:grid;
gap:6px;
}
.teacher-os-nav-item{
width:100%;
display:flex;
align-items:center;
gap:11px;
padding:11px 12px;
border:0;
border-radius:13px;
background:transparent;
color:#5f574f;
text-align:left;
}
.teacher-os-nav-item span{
width:24px;
text-align:center;
font-size:15px;
}
.teacher-os-nav-item b{
font-size:12px;
}
.teacher-os-nav-item:hover{
background:#f4efe9;
}
.teacher-os-nav-item.active{
background:#174f3e;
color:#fff;
}
.teacher-nav-divider{
height:1px;
margin:10px 8px;
background:#e7ddd3;
}
.teacher-os-version{
display:flex;
align-items:center;
justify-content:space-between;
margin-top:auto;
padding:12px 10px;
border-radius:12px;
background:#f4efe8;
color:#7d7065;
font-size:10px;
}
.teacher-os-version strong{color:#174f3e}
.teacher-os-content{
min-width:0;
padding:28px 22px 50px;
}
.teacher-view{display:none}
.teacher-view.active{display:block}
.teacher-section-head{
display:flex;
align-items:flex-end;
justify-content:space-between;
gap:20px;
margin-bottom:16px;
}
.teacher-section-head h2{
margin:3px 0 5px;
font-size:28px;
letter-spacing:-.04em;
}
.teacher-section-head p{
margin:0;
color:#81766d;
font-size:12px;
}
.teacher-wide-search{width:min(320px,100%)}
.teacher-student-grid{
display:grid;
grid-template-columns:repeat(3,minmax(0,1fr));
gap:13px;
}
.teacher-student-card{
min-width:0;
padding:17px;
border:1px solid #e2d7cc;
border-radius:20px;
background:#fffdf9;
box-shadow:0 12px 30px rgba(56,43,32,.05);
}
.teacher-student-head{
display:flex;
align-items:center;
gap:11px;
}
.teacher-student-head h3{
margin:0 0 3px;
font-size:15px;
}
.teacher-student-head span{
color:#81766d;
font-size:10px;
}
.teacher-student-metrics{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:7px;
margin:15px 0;
}
.teacher-student-metrics>div{
display:grid;
gap:2px;
padding:9px;
border-radius:12px;
background:#f5f1ec;
}
.teacher-student-metrics strong{font-size:18px}
.teacher-student-metrics span{color:#81766d;font-size:8px}
.teacher-student-latest{
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
margin-bottom:13px;
color:#81766d;
font-size:9px;
}
.teacher-student-latest strong{
color:#3b3530;
text-align:right;
}
.teacher-analytics-grid{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
gap:13px;
}
.teacher-analytics-card{
display:grid;
gap:7px;
padding:18px;
border:1px solid #e2d7cc;
border-radius:20px;
background:#fffdf9;
}
.teacher-analytics-card span{
color:#81766d;
font-size:10px;
font-weight:800;
}
.teacher-analytics-card strong{
font-size:30px;
}
.teacher-analytics-card small{
color:#978b80;
}
.teacher-analytics-panels{
display:grid;
grid-template-columns:1.2fr .8fr;
gap:13px;
margin-top:13px;
}
.analytics-chart{height:190px}
.attention-list{
display:grid;
gap:8px;
margin-top:12px;
}
.attention-list button{
display:grid;
grid-template-columns:34px 1fr auto;
gap:9px;
align-items:center;
padding:10px;
border:1px solid #e4d9cf;
border-radius:13px;
background:#fff;
text-align:left;
}
.attention-list button>span:nth-child(2){
display:grid;
gap:2px;
}
.attention-list small{
color:#81766d;
font-size:9px;
}
.attention-list b{
color:#9a6e35;
font-size:9px;
}
.teacher-settings-grid{
display:grid;
grid-template-columns:repeat(2,minmax(0,1fr));
gap:13px;
}
.teacher-settings-card{
padding:18px;
border:1px solid #e2d7cc;
border-radius:20px;
background:#fffdf9;
}
.teacher-settings-card h3{
margin:3px 0 14px;
font-size:17px;
}
.teacher-setting-row{
display:flex;
align-items:center;
justify-content:space-between;
gap:15px;
padding:10px 0;
border-top:1px solid #eee5dc;
}
.teacher-setting-row span{
color:#81766d;
font-size:10px;
}
.teacher-setting-row strong{
font-size:10px;
text-align:right;
}
.teacher-toggle-row{
display:flex;
justify-content:space-between;
gap:15px;
padding:11px 0;
border-top:1px solid #eee5dc;
}
.teacher-toggle-row span{
display:grid;
gap:3px;
}
.teacher-toggle-row strong{font-size:11px}
.teacher-toggle-row small{color:#81766d;font-size:9px}
.teacher-data-actions{
display:flex;
flex-wrap:wrap;
gap:8px;
}
.teacher-danger-card{
border-color:#e4c8c4;
background:#fff8f6;
}
.teacher-danger-card>p:not(.widget-kicker){
color:#8f6661;
font-size:11px;
line-height:1.5;
}
.teacher-empty-panel{
grid-column:1/-1;
min-height:260px;
display:grid;
place-items:center;
border:1px dashed #d8c9bb;
border-radius:20px;
color:#81766d;
}
.teacher-reset-modal[hidden]{display:none!important}
.teacher-reset-modal{
position:fixed;
inset:0;
z-index:300;
display:grid;
place-items:center;
padding:18px;
}
.teacher-reset-backdrop{
position:absolute;
inset:0;
background:rgba(31,26,22,.52);
backdrop-filter:blur(4px);
}
.teacher-reset-card{
position:relative;
width:min(460px,100%);
padding:24px;
border-radius:22px;
background:#fffdf9;
box-shadow:0 26px 70px rgba(44,35,29,.24);
}
.teacher-reset-card h2{margin:5px 0 8px}
.teacher-reset-card p{color:#81766d;line-height:1.55}
.teacher-reset-card input{
width:100%;
height:44px;
padding:0 12px;
border:1px solid #d8c9bb;
border-radius:12px;
outline:0;
}
.teacher-reset-actions{
display:flex;
justify-content:flex-end;
gap:8px;
margin-top:14px;
}

@media(max-width:1200px){
.teacher-student-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.teacher-analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
.teacher-os-app{grid-template-columns:1fr}
.teacher-os-sidebar{
position:static;
height:auto;
padding:10px;
border-right:0;
border-bottom:1px solid #e0d6cc;
}
.teacher-os-brand{display:none}
.teacher-os-nav{
display:flex;
overflow:auto;
}
.teacher-os-nav-item{
width:auto;
flex:0 0 auto;
}
.teacher-nav-divider,.teacher-os-version{display:none}
.teacher-os-content{padding:18px 10px 40px}
.teacher-analytics-panels{grid-template-columns:1fr}
}
@media(max-width:650px){
.notebook-guest-notice{
align-items:flex-start;
justify-content:space-between;
gap:10px;
padding:9px 11px;
}
.guest-notice-copy{align-items:flex-start}
.guest-notice-login{
flex:0 0 auto;
padding:7px 9px;
}
.teacher-student-grid,
.teacher-analytics-grid,
.teacher-settings-grid{
grid-template-columns:1fr;
}
.teacher-section-head{
align-items:flex-start;
flex-direction:column;
}
.teacher-wide-search{width:100%}
}


/* =========================================================
  V5 STABLE — GUEST LOGIN REMINDER
  ========================================================= */
.guest-save-notice{
min-height:46px;
display:flex;
align-items:center;
justify-content:center;
gap:22px;
padding:8px 20px;
border-bottom:1px solid #efcbc7;
background:#fff1f0;
color:#653f3c;
}
.guest-save-notice[hidden]{display:none!important}
.guest-save-copy{
display:flex;
align-items:center;
gap:10px;
}
.guest-save-icon{
width:22px;
height:22px;
display:grid;
place-items:center;
border-radius:50%;
background:#f5d4d1;
color:#9d4e48;
font-size:12px;
font-weight:900;
}
.guest-save-copy>div{
display:grid;
gap:1px;
}
.guest-save-copy strong{
font-size:11px;
}
.guest-save-copy span{
color:#8c625e;
font-size:10px;
}
.guest-save-login{
border:1px solid #dda9a4;
border-radius:999px;
padding:7px 12px;
background:#fffafa;
color:#8c403b;
font-size:10px;
font-weight:800;
}
.avatar-button{
min-width:48px;
width:auto;
height:34px;
padding:0 11px;
border-radius:999px;
font-size:10px;
}
.avatar-button.is-member{
width:34px;
min-width:34px;
padding:0;
}
@media(max-width:650px){
.guest-save-notice{
justify-content:space-between;
gap:10px;
padding:9px 11px;
}
.guest-save-copy{
align-items:flex-start;
}
.guest-save-login{
flex:0 0 auto;
padding:7px 9px;
}
}


/* FINAL MASTER OVERRIDES */
.notebook-guest-notice{display:none!important}
.guest-save-notice{
min-height:46px;display:flex;align-items:center;justify-content:center;
gap:22px;padding:8px 20px;border-bottom:1px solid #efcbc7;
background:#fff1f0;color:#653f3c
}
.guest-save-notice[hidden]{display:none!important}
.guest-save-copy{display:flex;align-items:center;gap:10px}
.guest-save-icon{
width:22px;height:22px;display:grid;place-items:center;border-radius:50%;
background:#f5d4d1;color:#9d4e48;font-size:12px;font-weight:900
}
.guest-save-copy>div{display:grid;gap:1px}
.guest-save-copy strong{font-size:11px}
.guest-save-copy span{color:#8c625e;font-size:10px}
.guest-save-login{
border:1px solid #dda9a4;border-radius:999px;padding:7px 12px;
background:#fffafa;color:#8c403b;font-size:10px;font-weight:800
}
.avatar-button{min-width:48px;width:auto;height:34px;padding:0 11px;border-radius:999px;font-size:10px}
.avatar-button.is-member{width:34px;min-width:34px;padding:0}
@media(max-width:650px){
.guest-save-notice{justify-content:space-between;gap:10px;padding:9px 11px}
.guest-save-copy{align-items:flex-start}
.guest-save-login{flex:0 0 auto;padding:7px 9px}
}

/* =========================================================
  MOBILE IMPROVEMENTS
  Add new mobile changes only below this line
  ========================================================= */

@media (max-width: 650px) {

html,
body {
width: 100%;
overflow-x: hidden;
}

body {
padding-bottom: env(safe-area-inset-bottom);
}

/* Header */
.notebook-header {
position: sticky;
top: 0;
min-height: 58px;
padding: 9px 12px;
align-items: center;
}

.notebook-logo {
font-size: 14px;
}

.notebook-header-tools {
flex-wrap: nowrap;
gap: 5px;
}

.compact-control {
min-width: 0;
}

.compact-control select {
max-width: 90px;
font-size: 11px;
}

.compact-timezone {
display: none;
}

.avatar-button {
width: 34px;
min-width: 34px;
height: 34px;
padding: 0;
}

/* Guest reminder */
.guest-save-notice {
align-items: flex-start;
gap: 9px;
padding: 10px 12px;
}

.guest-save-copy {
min-width: 0;
flex: 1;
}

.guest-save-copy span {
display: block;
line-height: 1.4;
}

.guest-save-login {
flex: 0 0 auto;
white-space: nowrap;
padding: 7px 9px;
}

/* Sidebar becomes horizontally scrollable */
.notebook-sidebar {
padding: 7px 10px;
overflow: hidden;
}

.sidebar-nav {
display: flex;
gap: 5px;
overflow-x: auto;
padding-bottom: 2px;
scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
display: none;
}

.sidebar-link {
flex: 0 0 auto;
padding: 9px 11px;
font-size: 11px;
}

/* Main content */
.notebook-main {
padding: 16px 10px 30px;
}

.welcome-row {
gap: 10px;
}

.welcome-row h1 {
font-size: 28px;
}

.welcome-row p {
font-size: 13px;
line-height: 1.5;
}

/* Quick links */
.quick-actions {
grid-template-columns: 1fr;
gap: 8px;
}

.quick-card {
padding: 12px;
border-radius: 15px;
}

/* Writing card */
.writing-card {
padding: 13px;
border-radius: 17px;
}

.category-tabs {
flex-wrap: nowrap;
overflow-x: auto;
padding-bottom: 3px;
scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
display: none;
}

.category-tab {
flex: 0 0 auto;
min-height: 40px;
}

.writing-controls {
display: grid;
grid-template-columns: 1fr 1fr;
}

.level-control,
.recommend-button,
.surprise-button {
width: 100%;
justify-content: center;
min-height: 44px;
}

.surprise-button {
grid-column: 1 / -1;
}

/* Toolbar */
.editor-toolbar,
.rich-editor .toolbar {
flex-wrap: nowrap;
overflow-x: auto;
padding: 7px;
scrollbar-width: none;
}

.editor-toolbar::-webkit-scrollbar,
.rich-editor .toolbar::-webkit-scrollbar {
display: none;
}

.editor-toolbar button,
.tool-btn {
flex: 0 0 auto;
min-width: 38px;
height: 38px;
}

/* Writing area */
.notebook-paper,
.notebook-paper textarea {
min-height: 58vh;
}

.notebook-paper textarea {
padding: 17px 14px;
font-size: 16px;
line-height: 32px;
}

.nb-writing-editor-mount,
.nb-writing-editor-mount .rich-editor {
min-height: 55vh;
}

.nb-writing-editor-mount .editor-content,
.rich-editor [contenteditable="true"] {
min-height: 48vh;
padding: 17px 14px;
font-size: 16px;
line-height: 1.8;
}

/* Save and feedback buttons */
.notebook-editor-footer {
display: grid;
gap: 9px;
}

.notebook-editor-footer .action-group {
display: grid;
grid-template-columns: 1fr 1fr;
width: 100%;
}

.notebook-editor-footer .button {
width: 100%;
min-height: 46px;
}

/* Dashboard cards */
.dashboard-grid,
.dashboard-stack,
.daily-grid,
.badge-grid {
grid-template-columns: 1fr;
}

.dashboard-card,
.achievements-card,
.progress-card,
.calendar-card {
border-radius: 16px;
}

.calendar-widget {
max-width: none;
}

/* Other pages */
.nb-header {
grid-template-columns: 1fr auto;
gap: 10px;
padding: 11px 12px;
}

.nb-nav {
grid-column: 1 / -1;
justify-content: flex-start;
overflow-x: auto;
border-radius: 14px;
}

.nb-nav a {
flex: 0 0 auto;
padding: 8px 11px;
font-size: 10px;
}

.nb-main {
width: calc(100% - 18px);
padding: 22px 0 38px;
}

.nb-page-head h1,
.saved-hero h1 {
font-size: 34px;
}

.nb-form-grid,
.nb-two,
.my-work-summary,
.review-compare-grid,
.nb-saved-grid {
grid-template-columns: 1fr;
}

.nb-submit-card,
.nb-card-pad {
padding: 14px;
}

/* My Work */
.nb-work-card-wrap {
grid-template-columns: 1fr;
}

.nb-work-actions {
width: 100%;
padding-left: 0;
}

.nb-work-actions .button {
flex: 1;
min-height: 42px;
}

/* Review page */
.review-pane-head {
padding: 14px;
}

.review-writing {
min-height: 180px;
padding: 16px 14px;
font-size: 16px;
}

/* Thread */
.discussion-card {
padding: 14px;
}

.chat-thread {
padding: 16px 0;
}

.chat-message {
max-width: 92%;
}

.chat-bubble {
font-size: 13px;
line-height: 1.6;
}

.chat-compose-box textarea {
min-height: 94px;
font-size: 16px;
}

.chat-compose-actions .button {
min-height: 44px;
}

/* Saved explanations */
.saved-note-card {
border-radius: 17px;
}

.saved-note-body {
padding: 16px;
}

.saved-note-body blockquote {
font-size: 16px;
}

/* General mobile touch targets */
button,
.button,
.nav-link,
.sidebar-link {
touch-action: manipulation;
}

input,
textarea,
select,
[contenteditable="true"] {
font-size: 16px;
}
}

/* =========================================================
  STUDENT WRITING FONT OPTIONS
  Only affects writing, correction and discussion messages
  ========================================================= */

:root {
--student-writing-font:
"Noto Sans KR",
"DM Sans",
sans-serif;
}

/* Default */
html[data-writing-font="default"] {
--student-writing-font:
"Noto Sans KR",
"DM Sans",
sans-serif;
}

/* Modern Sans */
html[data-writing-font="notoSans"] {
--student-writing-font:
"Noto Sans KR",
sans-serif;
}

/* Clean Gothic */
html[data-writing-font="nanumGothic"] {
--student-writing-font:
"Nanum Gothic",
"Noto Sans KR",
sans-serif;
}

/* Classic Myeongjo */
html[data-writing-font="nanumMyeongjo"] {
--student-writing-font:
"Nanum Myeongjo",
"Noto Serif KR",
serif;
}

/* Soft Rounded */
html[data-writing-font="gowunDodum"] {
--student-writing-font:
"Gowun Dodum",
"Noto Sans KR",
sans-serif;
}

/* Elegant Serif */
html[data-writing-font="gowunBatang"] {
--student-writing-font:
"Gowun Batang",
"Nanum Myeongjo",
serif;
}

/* Main writing page */
.notebook-paper textarea,
.nb-writing-editor-mount .editor-content,
.rich-editor [contenteditable="true"] {
font-family: var(--student-writing-font);
}

/* Reviewed-submission page */
.review-writing {
font-family: var(--student-writing-font);
}

/* Discussion thread */
.chat-bubble,
.chat-compose-box textarea {
font-family: var(--student-writing-font);
}

/* Font selector */
.writing-font-control {
display: flex;
align-items: center;
gap: 7px;
min-height: 38px;
padding: 7px 10px;
border: 1px solid #ded2c5;
border-radius: 11px;
background: #fff;
color: #81776e;
font-size: 10px;
}

.writing-font-control select {
min-width: 120px;
border: 0;
outline: 0;
background: transparent;
color: #2f2a25;
font-size: 11px;
font-weight: 700;
}

@media (max-width: 650px) {
.writing-font-control {
width: 100%;
justify-content: space-between;
}

.writing-font-control select {
flex: 1;
min-width: 0;
}
}

/* =========================================================
  REVIEW PAGE — SAVE AS PDF
  ========================================================= */

@media print {
@page {
size: A4;
margin: 16mm;
}

html,
body {
background: #fff !important;
color: #000 !important;
}

body {
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}

/* Hide website controls */
.nb-header,
.nb-nav,
.nb-actions,
.print-hide,
.review-progress-card,
.discussion-card,
.review-attachments,
.toast {
display: none !important;
}

.nb-shell,
.nb-main {
width: 100% !important;
max-width: none !important;
min-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
background: #fff !important;
}

.review-page-head {
display: block !important;
margin-bottom: 18px !important;
}

.review-page-head h1 {
font-size: 24px !important;
}

/* Original and correction print vertically */
.review-compare-grid {
display: block !important;
}

.review-pane {
display: block !important;
margin-bottom: 18px !important;
border: 1px solid #bbb !important;
box-shadow: none !important;
break-inside: avoid;
}

.review-pane-head {
padding: 12px 14px !important;
background: #f4f4f4 !important;
}

.review-writing {
min-height: 0 !important;
padding: 15px !important;
background: #fff !important;
color: #000 !important;
font-size: 12pt !important;
line-height: 1.7 !important;
overflow: visible !important;
}

.teacher-note-card {
margin: 12px !important;
border: 1px solid #bbb !important;
background: #fff !important;
break-inside: avoid;
}

.nb-bookmark {
display: none !important;
}
.review-page-head h1{
    font-size:40px !important;
line-height:1.05 !important;
}
}
/* =========================================================
   TEACHER DASHBOARD - MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .teacher-os-app {
    display: block;
  }

  .teacher-os-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid #e6ddd4;
  }

  .teacher-os-brand {
    margin-bottom: 10px;
  }

  .teacher-os-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .teacher-os-nav-item {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 9px 12px;
  }

  .teacher-nav-divider,
  .teacher-os-version {
    display: none;
  }

  .teacher-os-content {
    width: 100%;
    padding: 16px;
  }

  .teacher-os-header {
    display: block;
  }

  .teacher-header-tools {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .teacher-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .teacher-widget-row {
    grid-template-columns: 1fr;
  }

  .teacher-main-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .teacher-queue-card {
    max-height: none;
  }

  .teacher-workspace-card {
    min-width: 0;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    width: 100%;
  }

  .teacher-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .queue-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .teacher-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-analytics-panels {
    grid-template-columns: 1fr;
  }

  .teacher-student-grid {
    grid-template-columns: 1fr;
  }

  .teacher-settings-grid {
    grid-template-columns: 1fr;
  }

  #teacherReplyInput {
    min-height: 90px !important;
    font-size: 16px !important;
  }

  #teacherNote {
    font-size: 16px;
    min-height: 120px;
  }

  .editor-content {
    min-height: 220px;
    font-size: 16px;
  }

  .toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .teacher-actions .button,
  .action-full {
    width: 100%;
  }
}

@media (max-width: 560px) {

  .teacher-os-content {
    padding: 12px;
  }

  .teacher-stat-grid {
    grid-template-columns: 1fr;
  }

  .teacher-analytics-grid {
    grid-template-columns: 1fr;
  }

  .workspace-topbar {
    align-items: flex-start;
    gap: 10px;
  }

  .workspace-student {
    min-width: 0;
  }

  .workspace-student h2 {
    font-size: 18px;
  }

  .compare-panel,
  .feedback-card,
  .mini-widget {
    border-radius: 14px;
  }

  .compare-head {
    align-items: flex-start;
    gap: 8px;
  }

  .student-paper,
  .editor-content {
    line-height: 1.7;
  }

  .snippet-chips {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .snippet-chips button {
    flex: 0 0 auto;
  }
}

/* =========================================================
   STUDENT NOTEBOOK - MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .notebook-app {
    display: block;
  }

  .notebook-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #e6ddd4;
  }

  .sidebar-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-link {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 9px 11px;
  }

  .sidebar-help {
    margin-top: 10px;
  }

  .notebook-main {
    width: 100%;
    padding: 16px;
  }

  .notebook-header {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .notebook-header-tools {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .compact-control {
    flex: 1 1 140px;
  }

  .welcome-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .streak-card {
    width: 100%;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .writing-card,
  .recent-card,
  .tip-card,
  .achievements-card,
  .progress-card,
  .calendar-card {
    min-width: 0;
  }

  .writing-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .level-control,
  .main-journal-date,
  .writing-font-control {
    width: 100%;
  }

  .level-control select,
  .main-journal-date input,
  .writing-font-control select {
    width: 100%;
  }

  .recommend-button,
  .surprise-button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .recommendation-panel {
    display: block;
  }

  .recommendation-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .editor-toolbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-bottom: 5px;
  }

  .editor-toolbar button {
    flex: 0 0 auto;
    min-width: 38px;
    min-height: 38px;
  }

  .notebook-paper textarea,
  #journalText {
    min-height: 320px;
    font-size: 16px;
    line-height: 1.8;
  }

  .notebook-editor-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .action-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .action-group .button {
    width: 100%;
    min-height: 44px;
  }

  .dashboard-stack {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-widget {
    overflow: hidden;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {

  .notebook-main {
    padding: 12px;
  }

  .notebook-header-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .avatar-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .writing-controls {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .category-tab {
    flex: 0 0 auto;
  }

  .paper {
    padding: 12px;
  }

  .notebook-paper textarea,
  #journalText {
    min-height: 360px;
  }

  .action-group {
    grid-template-columns: 1fr;
  }

  .recommendation-actions button {
    flex: 1 1 auto;
  }

  .guest-save-notice {
    margin: 0;
    border-radius: 0;
  }

  .guest-save-copy {
    align-items: flex-start;
  }

  .notebook-footer {
    display: block;
  }

  .notebook-footer > span:last-child {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* =========================================================
   STUDENT REVIEW PAGE - MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .review-page-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .review-page-head > div:last-child {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .review-page-head .button,
  .review-page-head .writing-font-control {
    flex: 1 1 160px;
  }

  .review-progress-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .review-compare-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-pane {
    min-width: 0;
  }

  .review-pane-head {
    align-items: flex-start;
    gap: 10px;
  }

  .review-writing {
    font-size: 16px;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }

  .teacher-note-card {
    align-items: flex-start;
  }

  .discussion-card {
    padding: 14px;
  }

  .discussion-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .discussion-live-pill {
    width: fit-content;
  }

  .chat-thread {
    max-height: 420px;
  }

  .chat-message {
    max-width: 100%;
  }

  .chat-column {
    min-width: 0;
  }

  .chat-bubble {
    overflow-wrap: anywhere;
  }

  .chat-compose {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-compose-avatar {
    display: none;
  }

  .chat-compose-box {
    width: 100%;
  }

  #messageInput {
    width: 100%;
    min-height: 100px;
    font-size: 16px;
    box-sizing: border-box;
  }

  .chat-compose-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #sendMessage {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 560px) {

  .review-progress-line {
    grid-template-columns: 1fr;
  }

  .review-page-head > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .review-page-head .button,
  .review-page-head .writing-font-control {
    width: 100%;
  }

  .review-pane-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nb-bookmark {
    width: 100%;
  }

  .teacher-note-card {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .chat-thread {
    max-height: 360px;
  }
}

/* =========================================================
   MY WORK / HISTORY - MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .nb-page-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nb-work-card-wrap {
    width: 100%;
  }

  .nb-work-card-main {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    width: 100%;
  }

  .nb-work-card-main > span:last-child {
    grid-column: 2;
    text-align: left !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .nb-work-card-main > span:last-child time {
    margin-top: 0 !important;
  }

  .nb-work-icon {
    flex: 0 0 auto;
  }

  .nb-work-card-main strong {
    overflow-wrap: anywhere;
  }

  .nb-work-card-main p {
    margin-top: 5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .nb-work-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .nb-work-actions a {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #searchInput,
  #statusInput {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  #miniAchievement {
    width: 100%;
  }
}

@media (max-width: 560px) {

  .nb-work-card-main {
    grid-template-columns: 1fr;
  }

  .nb-work-icon {
    display: none;
  }

  .nb-work-card-main > span:last-child {
    grid-column: 1;
  }

  .nb-work-actions {
    grid-template-columns: 1fr;
  }

  .nb-work-card-main p {
    font-size: 14px;
  }

  .status-badge {
    width: fit-content;
  }

  #miniAchievement {
    align-items: flex-start;
  }

  .mini-achievement-copy {
    min-width: 0;
  }
}
/* =========================================================
   WRITING HELP REMINDER
   ========================================================= */

.writing-help-card {
  background: #fffdf8;
  border: 1px solid #e7ded3;

  /* Give the wording more breathing room */
  padding: 20px;
  min-width: 0;
}

.writing-help-card .card-heading {
  margin-bottom: 7px;
}

.writing-help-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.writing-help-intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #756d64;
}

.writing-help-list {
  display: grid;
  gap: 9px;
}

/* Each suggestion */
.writing-help-list span {
  display: block;
  width: 100%;
  box-sizing: border-box;

  padding: 11px 12px;
  border-radius: 10px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;

  white-space: normal;
  overflow-wrap: break-word;
}

/* 1 — Words / phrases */
.writing-help-list span:nth-child(1) {
  background: #f3e8dc;
  color: #735946;
}

/* 2 — Grammar */
.writing-help-list span:nth-child(2) {
  background: #e8f0e8;
  color: #4f6853;
}

/* 3 — Help */
.writing-help-list span:nth-child(3) {
  background: #e9edf5;
  color: #52617a;
}


/* MOBILE */

@media (max-width: 900px) {

  .writing-help-card {
    order: -1;
    padding: 17px;
  }

  .writing-help-list span {
    padding: 11px 12px;
    font-size: 13px;
  }
}
/* =========================================================
   DESKTOP RECOMMENDED NOTICE
   ========================================================= */

.desktop-recommended-notice {
  display: none;
}

@media (max-width: 900px) {
  .desktop-recommended-notice {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    margin: 0 0 14px;
    padding: 11px 13px;

    background: #fff8d8;
    border: 1px solid #eadc9b;
    border-radius: 12px;
  }

  .desktop-recommended-notice strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: #50493e;
  }

  .desktop-recommended-notice span {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: #6c6457;
  }

  .desktop-notice-close {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 19px;
    line-height: 1;
    color: #756d61;
    cursor: pointer;
  }
}
/* =========================================================
   NOTEBOOK GUIDE PAGE
   ========================================================= */

.guide-page {
  background: #f7f3ee;
  color: #2f2a26;
  min-height: 100vh;
}

.guide-main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.guide-hero {
  padding: 44px;
  background: #fffdf9;
  border: 1px solid #e7ded3;
  border-radius: 22px;
  margin-bottom: 24px;
}

.guide-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
}

.guide-hero p {
  max-width: 680px;
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.7;
  color: #6c645c;
}

.guide-section {
  padding: 32px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid #e7ded3;
  border-radius: 18px;
}

.guide-section-heading {
  margin-bottom: 18px;
}

.guide-section-heading h2 {
  margin: 5px 0 0;
  font-size: 24px;
  line-height: 1.3;
}

.guide-description {
  margin: 0 0 18px;
  color: #6f675f;
  line-height: 1.7;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-step {
  display: flex;
  gap: 10px;
  padding: 16px;
  background: #faf7f2;
  border-radius: 14px;
}

.guide-step-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #5f7a68;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.guide-step strong,
.guide-tool-card strong,
.guide-after-grid strong,
.guide-habit-message strong {
  display: block;
  margin-bottom: 5px;
}

.guide-step p,
.guide-tool-card p,
.guide-after-grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6f675f;
}

.guide-tool-grid,
.guide-after-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guide-tool-card,
.guide-after-grid article {
  padding: 17px;
  border: 1px solid #e9e1d8;
  border-radius: 14px;
  background: #fffdf9;
}

.guide-tool-card > span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  margin-bottom: 10px;
  padding: 0 8px;
  border-radius: 9px;
  background: #f2ece5;
  font-weight: 700;
}

.guide-note {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f3efe9;
  border-radius: 12px;
  font-size: 13px;
}

.guide-help-examples {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.guide-help-example {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.guide-help-example.words {
  background: #f3e8dc;
  color: #735946;
}

.guide-help-example.grammar {
  background: #e8f0e8;
  color: #4f6853;
}

.guide-help-example.help {
  background: #e9edf5;
  color: #52617a;
}

.guide-example-writing {
  padding: 18px;
  background: #fcfaf6;
  border: 1px dashed #dacfc3;
  border-radius: 14px;
}

.guide-example-writing small {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #958b82;
}

.guide-example-writing p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.guide-student-note {
  padding: 10px 12px;
  background: #fff3c9;
  border-radius: 10px;
  font-size: 13px;
}

.guide-habit-section {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: center;
}

.guide-habit-section h2 {
  margin: 5px 0 10px;
}

.guide-habit-section p {
  margin: 0;
  line-height: 1.7;
  color: #6f675f;
}

.guide-habit-message {
  padding: 18px;
  background: #eaf1eb;
  border-radius: 14px;
}

.guide-habit-message span {
  display: block;
  margin-top: 4px;
  color: #5f6f62;
  font-size: 13px;
}

.guide-final {
  text-align: center;
  padding: 44px 24px;
  margin-top: 20px;
  background: #2f3d34;
  color: #fff;
  border-radius: 20px;
}

.guide-final h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.guide-final p {
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.65;
  color: rgba(255,255,255,.78);
}

.guide-final .green-button {
  background: #fff;
  color: #2f3d34;
}

.guide-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 28px;
}


/* MOBILE */

@media (max-width: 800px) {

  .guide-main {
    padding-top: 24px;
  }

  .guide-hero,
  .guide-section {
    padding: 22px;
  }

  .guide-steps {
    grid-template-columns: 1fr 1fr;
  }

  .guide-habit-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {

  .guide-main {
    width: min(100% - 20px, 980px);
  }

  .guide-hero,
  .guide-section {
    padding: 18px;
    border-radius: 16px;
  }

  .guide-steps,
  .guide-tool-grid,
  .guide-after-grid {
    grid-template-columns: 1fr;
  }

  .guide-hero h1 {
    font-size: 30px;
  }

  .guide-section-heading h2 {
    font-size: 21px;
  }

  .guide-final {
    padding: 32px 18px;
  }
}
/* =========================================================
   DASHBOARD TWO-COLUMN LAYOUT
   ========================================================= */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(275px, .55fr);
  gap: 16px;
  align-items: start;
}

.dashboard-left {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.dashboard-left .recent-card,
.dashboard-left .tip-card {
  grid-column: auto;
}

.dashboard-stack {
  align-self: start;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-left {
    grid-template-columns: 1fr;
  }
}

