:root {
  --ink: #17211f;
  --muted: #66716e;
  --muted-2: #8c9693;
  --paper: #fbfaf7;
  --white: #ffffff;
  --line: #e8e8e2;
  --red: #ed5b52;
  --red-dark: #d94c44;
  --red-soft: #fff1ef;
  --green: #1f8a70;
  --green-soft: #e9f6f1;
  --yellow: #d99d33;
  --yellow-soft: #fff7df;
  --navy: #223c3a;
  --shadow: 0 16px 50px rgba(33, 48, 44, 0.11);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Avenir Next", "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.concept-ribbon {
  position: fixed;
  z-index: 100;
  top: 16px;
  left: -43px;
  width: 165px;
  padding: 6px 0;
  transform: rotate(-45deg);
  color: white;
  background: var(--navy);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
  font: 700 8px/1 Inter, "Avenir Next", system-ui, sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.app-shell { min-height: 100vh; }

.topbar {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 38px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; cursor: pointer; }
.brand-mark { width: 40px; height: 40px; position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--red); transform: rotate(-5deg); }
.brand-mark span { position: absolute; width: 19px; height: 4px; border-radius: 5px; background: white; transform: rotate(5deg); }
.brand-mark span:nth-child(1) { top: 11px; }
.brand-mark span:nth-child(2) { top: 18px; width: 15px; left: 10px; }
.brand-mark span:nth-child(3) { top: 25px; width: 10px; left: 10px; }
.brand-copy { display: grid; text-align: left; }
.brand-name { font: 800 14px/1.1 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.02em; }
.brand-product { margin-top: 3px; color: var(--muted); font-size: 11px; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.quiet-button, .review-button, .avatar-button { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: white; cursor: pointer; transition: .2s ease; }
.quiet-button:hover, .review-button:hover, .avatar-button:hover { border-color: #cfd2cc; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(33,48,44,.07); }
.quiet-button { padding: 0 14px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.play-dot { display: inline-grid; place-items: center; width: 21px; height: 21px; padding-left: 1px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 8px; }
.review-button { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; font-weight: 700; }
.review-icon { color: var(--red); font-size: 18px; }
.review-count { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 8px; color: white; background: var(--red); font-size: 10px; }
.avatar-button { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 5px; border-color: transparent; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #7a5442; background: #f4ddca; font-weight: 800; }
.avatar-name { font-size: 12px; font-weight: 700; }
.chevron { color: var(--muted-2); }

.workspace { display: grid; grid-template-columns: 218px minmax(540px, 1fr) 480px; min-height: calc(100vh - 72px); }

.course-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); overflow: auto; padding: 30px 17px 24px; background: #f5f4ef; border-right: 1px solid var(--line); }
.back-link { border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.back-link span { padding-right: 5px; }
.course-kicker { margin-top: 32px; color: var(--red); font: 800 9px/1 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.course-sidebar h1 { margin: 7px 0 14px; font: 800 26px/1.1 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.04em; }
.course-progress-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 700; }
.course-progress-track { flex: 1; height: 4px; background: #deded8; border-radius: 9px; overflow: hidden; }
.course-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.lesson-list { display: grid; gap: 5px; margin-top: 24px; }
.lesson-item { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 9px; width: 100%; min-height: 58px; padding: 8px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; cursor: pointer; }
.lesson-item:hover { background: rgba(255,255,255,.7); }
.lesson-item.active { background: white; box-shadow: 0 5px 18px rgba(42,48,45,.07); }
.lesson-status { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #d9d9d3; border-radius: 9px; color: var(--muted-2); font-size: 9px; font-weight: 800; }
.completed .lesson-status { border-color: transparent; color: var(--green); background: var(--green-soft); font-size: 11px; }
.active .lesson-status { color: white; background: var(--red); border-color: var(--red); }
.lesson-item span:last-child { font-size: 10px; line-height: 1.3; font-weight: 600; }
.lesson-item small { display: block; margin-bottom: 3px; color: var(--muted-2); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.lesson-item.active small { color: var(--red); }
.lesson-item.locked { opacity: .58; }
.weekly-card { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 12px; border-radius: 13px; background: #ebeae4; }
.streak-ring { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 4px solid #e5b957; color: #9f6d13; background: white; font-size: 11px; font-weight: 800; }
.weekly-card strong, .weekly-card span { display: block; }
.weekly-card strong { font-size: 10px; }
.weekly-card span { margin-top: 2px; color: var(--muted); font-size: 8px; }

.lesson-main { padding: 30px clamp(28px, 4vw, 64px) 80px; overflow: hidden; }
.breadcrumb { display: flex; gap: 9px; align-items: center; color: var(--muted-2); font-size: 10px; font-weight: 600; }
.breadcrumb b { color: #c6c9c4; }
.lesson-heading { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin: 28px 0 24px; }
.level-pill { display: inline-block; padding: 6px 9px; border-radius: 7px; color: var(--red-dark); background: var(--red-soft); font: 800 8px/1 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: .12em; }
.lesson-heading h2 { margin: 11px 0 8px; font: 800 clamp(27px, 2.3vw, 38px)/1.13 Inter, "Avenir Next", "Noto Sans", system-ui, sans-serif; letter-spacing: -.045em; }
.lesson-heading h2 span { font-family: "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.lesson-heading p { max-width: 590px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.lesson-complete-badge { flex: none; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #bde0d2; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 700; }
.lesson-complete-badge span { display: grid; place-items: center; width: 17px; height: 17px; color: white; background: var(--green); border-radius: 50%; }

.video-card { overflow: hidden; border: 1px solid #e2e3de; border-radius: 18px; background: #1e2a29; box-shadow: var(--shadow); }
.video-stage { position: relative; min-height: 330px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: radial-gradient(circle at 50% 30%, #fffdf5 0%, #f7efe0 57%, #e9dfce 100%); }
.video-stage::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(77,89,84,.1); border-radius: 11px; }
.board { align-self: center; width: min(64%, 620px); padding: 35px 24px; border-radius: 17px; background: rgba(255,255,255,.86); border: 1px solid white; box-shadow: 0 18px 60px rgba(100,78,48,.12); text-align: center; backdrop-filter: blur(10px); }
.board-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.korean-contrast { display: grid; grid-template-columns: 1fr 26px 1fr; gap: 6px; align-items: center; margin-top: 26px; }
.korean-contrast strong { display: block; white-space: nowrap; font: 700 clamp(15px, 1.5vw, 22px)/1.2 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.korean-contrast strong span { color: var(--red); }
.korean-contrast small { display: block; margin-top: 9px; color: var(--muted-2); font-size: 8px; }
.contrast-arrow { color: #b2b8b4; font-size: 16px; }
.teacher { position: absolute; bottom: 0; display: grid; place-items: center; color: var(--navy); }
.teacher-left { left: 2.5%; }
.teacher-right { right: 2.5%; }
.teacher-avatar { display: grid; place-items: center; width: clamp(90px, 8vw, 125px); height: clamp(120px, 11vw, 165px); padding-top: 28px; border-radius: 70px 70px 10px 10px; color: white; background: linear-gradient(#315b55 0 28%, #d49b72 28% 47%, #456f66 47%); font: 800 24px/1 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; box-shadow: 0 10px 30px rgba(30,52,49,.2); }
.teacher-avatar.second { background: linear-gradient(#4d3128 0 30%, #e0a981 30% 48%, #d36e62 48%); }
.teacher span { margin: 7px 0 10px; padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,.75); font-size: 8px; font-weight: 700; }
.video-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 50px; height: 50px; padding-left: 4px; transform: translate(-50%, -50%); border: 0; border-radius: 50%; color: white; background: rgba(237,91,82,.92); box-shadow: 0 9px 25px rgba(213,70,63,.32); cursor: pointer; transition: .2s; }
.video-play:hover { transform: translate(-50%, -50%) scale(1.08); }
.video-controls { height: 45px; display: flex; align-items: center; gap: 11px; padding: 0 16px; color: #d7dfdc; background: #1e2a29; font-size: 8px; }
.video-controls button { border: 0; color: white; background: transparent; font-size: 9px; cursor: pointer; }
.video-track { flex: 1; height: 3px; border-radius: 3px; background: #50605e; }
.video-track span { display: block; width: 81%; height: 100%; border-radius: inherit; background: var(--red); }
.lesson-summary { margin-top: 27px; }
.summary-title-row { display: flex; justify-content: space-between; align-items: center; }
.summary-title-row h3 { font: 800 17px/1 Inter, "Avenir Next", system-ui, sans-serif; }
.notes-link { border: 0; color: var(--red); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rule-card { display: flex; gap: 13px; min-height: 138px; padding: 18px; border-radius: 15px; border: 1px solid var(--line); background: white; }
.rule-card.green { border-top: 3px solid var(--green); }
.rule-card.peach { border-top: 3px solid var(--red); }
.rule-number { flex: none; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 800; }
.peach .rule-number { color: var(--red); background: var(--red-soft); }
.rule-card h4 { margin: 2px 0 7px; font: 700 14px/1.2 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.rule-card p { margin: 0 0 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.rule-card > div:last-child > span { display: inline-block; padding: 5px 7px; border-radius: 6px; color: #47524f; background: #f4f4f0; font: 600 9px/1 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }

.companion-panel { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid #dedfd9; background: white; box-shadow: -15px 0 50px rgba(31,49,44,.05); }
.companion-header { min-height: 75px; display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.companion-title { display: flex; gap: 10px; align-items: center; }
.companion-spark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: white; background: var(--red); font-size: 17px; box-shadow: 0 7px 20px rgba(237,91,82,.26); }
.companion-title h2 { margin: 0; font: 800 14px/1.2 Inter, "Avenir Next", system-ui, sans-serif; }
.companion-title h2 span { margin-left: 4px; padding: 3px 5px; border-radius: 5px; color: var(--red); background: var(--red-soft); font-size: 7px; letter-spacing: .08em; vertical-align: 2px; }
.companion-title p { margin: 4px 0 0; color: var(--muted-2); font-size: 9px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--muted); cursor: pointer; transition: .2s; }
.icon-button:hover { transform: rotate(-45deg); color: var(--red); }
.context-strip { display: grid; grid-template-columns: 25px 1fr 20px; align-items: center; gap: 7px; margin: 11px 18px 0; padding: 9px 10px; border: 1px solid #cfe9df; border-radius: 10px; background: #f2faf7; }
.context-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: var(--green); background: white; font-size: 10px; font-weight: 800; }
.context-strip b, .context-strip small { display: block; }
.context-strip b { color: #346b5d; font-size: 9px; }
.context-strip small { margin-top: 1px; color: #6d8880; font-size: 8px; }
.context-strip button { width: 18px; height: 18px; padding: 0; border: 1px solid #c1dbd2; border-radius: 50%; color: #5c8377; background: transparent; font: 700 8px/1 serif; cursor: pointer; }
.companion-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 18px 0; border-bottom: 1px solid var(--line); }
.tab { position: relative; height: 37px; border: 0; border-bottom: 2px solid transparent; color: var(--muted-2); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.tab.active { color: var(--red); border-bottom-color: var(--red); }
.tab-dot { position: absolute; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: transparent; }
.tab-dot.live { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.tab-content { display: none; flex: 1; min-height: 0; overflow-y: auto; }
.tab-content.active { display: flex; flex-direction: column; animation: content-in .22s ease both; }
@keyframes content-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.conversation { flex: 1; overflow-y: auto; padding: 19px 18px 130px; scroll-behavior: smooth; }
.ai-message, .user-message { display: flex; gap: 9px; margin-bottom: 17px; }
.tiny-spark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--red); background: var(--red-soft); font-size: 10px; }
.ai-message > div:last-child { min-width: 0; }
.ai-message p { margin: 2px 0 0; font-size: 11px; line-height: 1.6; }
.suggestion-list { display: grid; gap: 7px; margin-top: 14px; }
.suggestion-list button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; font-size: 9px; cursor: pointer; transition: .2s; }
.suggestion-list button:hover { border-color: #efb2ad; background: #fffafa; transform: translateX(2px); }
.suggestion-list button > span { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 9px; font-weight: 800; }
.user-message { justify-content: flex-end; }
.user-message > span { max-width: 82%; padding: 10px 12px; border-radius: 13px 13px 4px 13px; color: white; background: var(--navy); font-size: 10px; line-height: 1.45; }
.answer-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbf8; }
.answer-card h4 { margin: 0 0 8px; font: 800 11px/1.3 Inter, "Avenir Next", "Noto Sans", system-ui, sans-serif; }
.answer-card p { font-size: 10px; line-height: 1.6; }
.answer-card .contrast-box { display: grid; gap: 6px; margin: 10px 0; }
.contrast-line { display: flex; align-items: center; justify-content: space-between; padding: 8px 9px; border-radius: 8px; background: white; font: 600 10px/1.2 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.contrast-line b { font-size: 8px; font-family: Inter, system-ui, sans-serif; }
.contrast-line.good b { color: var(--green); }
.contrast-line.bad { background: #fff1ef; text-decoration-color: var(--red); }
.contrast-line.bad b { color: var(--red); }
.micro-rule { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0; }
.micro-rule div { padding: 9px; border-radius: 9px; background: white; }
.micro-rule span, .micro-rule small { display: block; }
.micro-rule span { font: 700 10px/1.2 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.micro-rule small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.source-chip { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 11px; padding: 8px; border: 1px solid #d6e8e1; border-radius: 8px; color: #3e7165; background: #f1f9f6; text-align: left; font-size: 8px; font-weight: 700; cursor: pointer; }
.source-chip span:first-child { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; color: white; background: var(--green); }
.source-chip span:last-child { margin-left: auto; }
.boundary-card { padding: 13px; border: 1px solid #eadab4; border-radius: 13px; background: #fffbef; }
.boundary-card .boundary-label { display: inline-flex; gap: 5px; padding: 4px 6px; border-radius: 5px; color: #986e20; background: #fff3cf; font-size: 7px; font-weight: 800; letter-spacing: .07em; }
.boundary-card p { font-size: 10px; }
.recommend-mini { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 9px; border-radius: 9px; background: white; }
.recommend-mini > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: white; background: var(--red); font-weight: 800; }
.recommend-mini div { flex: 1; }
.recommend-mini b, .recommend-mini small { display: block; }
.recommend-mini b { font-size: 9px; }
.recommend-mini small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.recommend-mini button { border: 0; color: var(--red); background: transparent; font-size: 13px; cursor: pointer; }
.typing { display: flex; gap: 4px; padding: 9px 11px; border-radius: 10px; background: #f4f4f0; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #9ba49f; animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.ask-composer { position: absolute; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr 36px; gap: 7px; padding: 13px 18px 15px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.ask-composer input { min-width: 0; height: 38px; padding: 0 12px; border: 1px solid #dfe1dc; border-radius: 11px; outline: none; font-size: 10px; }
.ask-composer input:focus { border-color: #eba29c; box-shadow: 0 0 0 3px var(--red-soft); }
.ask-composer > button { width: 36px; height: 36px; border: 0; border-radius: 10px; color: white; background: var(--red); font-size: 16px; cursor: pointer; }
.ask-composer small { grid-column: 1 / -1; color: var(--muted-2); text-align: center; font-size: 7px; }
.ask-composer small span { color: var(--red); }

.practice-intro, .writing-prompt { padding: 22px 20px 14px; }
.eyebrow { color: var(--red); font: 800 8px/1 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.practice-intro h3, .writing-prompt h3 { margin: 8px 0 5px; font: 800 18px/1.2 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.035em; }
.practice-intro p, .writing-prompt p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.mini-progress { height: 4px; margin-top: 13px; border-radius: 4px; overflow: hidden; background: #efefeb; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: var(--red); transition: width .5s ease; }
#practiceArea { padding: 0 20px 26px; }
.question-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfbf8; animation: content-in .28s ease; }
.question-card .question-count { color: var(--muted-2); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.question-card h4 { margin: 12px 0 5px; font: 700 15px/1.35 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.question-card > p { margin: 0 0 14px; color: var(--muted); font-size: 9px; }
.answer-options { display: grid; gap: 8px; }
.answer-options button { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px 11px; border: 1px solid #dfe1dc; border-radius: 10px; background: white; text-align: left; font: 600 11px/1.35 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; cursor: pointer; transition: .18s; }
.answer-options button:hover:not(:disabled) { border-color: #e89a94; background: #fffafa; }
.answer-options button > span { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid #d9dcd7; border-radius: 7px; color: var(--muted); font: 700 8px/1 Inter, system-ui, sans-serif; }
.answer-options button.correct { border-color: #9cd3be; background: var(--green-soft); color: #1c6c59; }
.answer-options button.correct > span { border-color: var(--green); color: white; background: var(--green); }
.answer-options button.incorrect { border-color: #efb2ad; background: var(--red-soft); color: #a3423b; }
.answer-options button.incorrect > span { border-color: var(--red); color: white; background: var(--red); }
.feedback-box { margin-top: 12px; padding: 10px; border-radius: 9px; color: #346b5d; background: var(--green-soft); font-size: 9px; line-height: 1.5; }
.feedback-box.support { color: #956b1e; background: var(--yellow-soft); }
.next-question { width: 100%; margin-top: 10px; padding: 10px; border: 0; border-radius: 10px; color: white; background: var(--navy); font-size: 9px; font-weight: 700; cursor: pointer; }
.practice-complete { padding: 22px 16px; border-radius: 14px; background: var(--green-soft); text-align: center; animation: content-in .35s ease; }
.complete-check { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 16px; color: white; background: var(--green); font-size: 20px; box-shadow: 0 8px 20px rgba(31,138,112,.25); }
.practice-complete h3 { margin: 0 0 6px; font: 800 17px/1.2 Inter, "Avenir Next", system-ui, sans-serif; }
.practice-complete p { margin: 0; color: #4f776d; font-size: 9px; line-height: 1.5; }
.mastery-jump { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 14px 0; font-size: 10px; font-weight: 800; }
.mastery-jump span { color: var(--muted-2); text-decoration: line-through; }
.mastery-jump b { color: var(--green); font-size: 20px; }
.practice-complete button { border: 0; border-bottom: 1px solid var(--green); color: var(--green); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }

.writing-box { position: relative; display: block; margin: 0 20px; }
.writing-box textarea { width: 100%; height: 100px; resize: vertical; padding: 14px 14px 28px; border: 1px solid #dfe1dc; border-radius: 13px; outline: none; background: #fbfbf8; font: 500 12px/1.7 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.writing-box textarea:focus { border-color: #e99c96; box-shadow: 0 0 0 3px var(--red-soft); }
.writing-box > span { position: absolute; right: 10px; bottom: 8px; color: var(--muted-2); font-size: 8px; }
.primary-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; margin: 12px 20px; padding: 0 15px; border: 0; border-radius: 11px; color: white; background: var(--red); font-size: 10px; font-weight: 700; cursor: pointer; box-shadow: 0 7px 18px rgba(237,91,82,.2); transition: .2s; }
.primary-action:hover { background: var(--red-dark); transform: translateY(-1px); }
.primary-action:disabled { opacity: .6; cursor: wait; transform: none; }
.writing-results { padding: 0 20px 25px; }
.checking-state { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 10px; background: #f5f5f1; color: var(--muted); font-size: 9px; }
.checking-spin { width: 17px; height: 17px; border: 2px solid #e5a29d; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feedback-summary { display: flex; align-items: center; gap: 9px; margin: 2px 0 10px; padding: 10px 11px; border-radius: 10px; color: #316b5c; background: var(--green-soft); font-size: 9px; font-weight: 600; }
.feedback-summary span { display: grid; place-items: center; flex: none; width: 21px; height: 21px; border-radius: 7px; color: white; background: var(--green); }
.sentence-feedback { margin-top: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.sentence-feedback.good { border-left: 3px solid var(--green); }
.sentence-feedback.attention { border-left: 3px solid var(--yellow); }
.sentence-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted-2); font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.sentence-label b { padding: 3px 5px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 7px; }
.attention .sentence-label b { color: #996a18; background: var(--yellow-soft); }
.sentence-korean { margin: 8px 0 6px; font: 600 12px/1.4 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.sentence-feedback > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.suggested-edit { margin-top: 10px; padding: 9px; border-radius: 8px; background: var(--yellow-soft); }
.suggested-edit small { display: block; color: #9b7124; font-size: 7px; font-weight: 800; }
.suggested-edit span { display: block; margin-top: 4px; font: 600 11px/1.3 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.suggested-edit mark { padding: 1px 2px; color: #8b5f14; background: #ffe4a1; border-radius: 3px; }
.accept-edit { width: 100%; margin-top: 9px; padding: 8px; border: 1px solid #e5c77d; border-radius: 8px; color: #8a621a; background: white; font-size: 8px; font-weight: 700; cursor: pointer; }
.accepted-row { display: flex; gap: 7px; align-items: center; margin-top: 9px; color: var(--green); font-size: 8px; font-weight: 700; }
.skill-detected { margin-top: 10px; padding: 11px; border-radius: 11px; color: #4c665f; background: #f2f7f5; animation: content-in .3s ease; }
.skill-detected .eyebrow { color: var(--green); }
.skill-detected h4 { margin: 6px 0 4px; font: 700 10px/1.3 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.skill-detected p { margin: 0; font-size: 8px; line-height: 1.5; }
.skill-detected button { margin-top: 9px; padding: 0; border: 0; color: var(--red); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 26px; display: flex; gap: 9px; align-items: center; padding: 11px 16px; transform: translate(-50%, 80px); opacity: 0; border-radius: 12px; color: white; background: #203431; box-shadow: var(--shadow); font-size: 10px; font-weight: 700; pointer-events: none; transition: .3s ease; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast > span:first-child { color: #75d2ba; }

.modal-backdrop { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; background: rgba(25,35,33,.52); backdrop-filter: blur(5px); transition: .23s; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { position: relative; width: min(550px, 100%); max-height: 90vh; overflow-y: auto; padding: 30px; border-radius: 22px; background: white; box-shadow: 0 25px 80px rgba(15,30,27,.28); transform: translateY(12px) scale(.98); transition: .23s; }
.open .modal { transform: none; }
.modal-close { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: white; font-size: 18px; cursor: pointer; }
.modal h2 { margin: 9px 0 4px; font: 800 23px/1.2 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.04em; }
.modal-subtitle { margin: 0; color: var(--muted); font-size: 11px; }
.source-modal blockquote { margin: 22px 0 16px; padding: 15px; border-left: 3px solid var(--red); color: #43504d; background: #faf9f5; font-size: 11px; line-height: 1.7; }
.source-example { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding: 9px 11px; border-radius: 9px; background: var(--green-soft); font: 600 11px/1.3 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.source-example b { color: var(--green); }
.source-example.wrong { color: #99514b; background: var(--red-soft); }
.source-example.wrong b { color: var(--red); }
.source-note { margin: 15px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.modal-done { width: 100%; margin: 18px 0 0; }

.review-modal { width: min(850px, 100%); }
.review-modal-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.review-modal-header p { max-width: 530px; margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.review-date { min-width: 120px; padding: 10px 12px; border-radius: 11px; color: #3f6b60; background: var(--green-soft); }
.review-date small, .review-date b, .review-date span { display: block; }
.review-date small { font-size: 7px; letter-spacing: .08em; }
.review-date b { margin-top: 3px; font-size: 12px; }
.review-date span { margin-top: 2px; font-size: 8px; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 22px; }
.skill-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fcfcfa; }
.skill-card.featured { border-color: #ebc0bc; background: #fffafa; }
.skill-card-top { display: flex; justify-content: space-between; align-items: center; }
.skill-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: var(--red); background: var(--red-soft); font: 700 11px/1 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.status-pill { padding: 4px 5px; border-radius: 5px; font-size: 6px; font-weight: 800; letter-spacing: .08em; }
.status-pill.developing { color: #b84a43; background: var(--red-soft); }
.status-pill.review { color: #946613; background: var(--yellow-soft); }
.status-pill.strong { color: #24765f; background: var(--green-soft); }
.skill-card h3 { margin: 12px 0 4px; font: 700 12px/1.25 Inter, "Avenir Next", "Noto Sans", system-ui, sans-serif; }
.skill-card p { min-height: 27px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.mastery-row { display: flex; justify-content: space-between; margin-top: 13px; font-size: 8px; }
.mastery-row b { color: var(--red); }
.mastery-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 5px; background: #eee9e7; }
.mastery-track span { display: block; height: 100%; border-radius: inherit; background: var(--red); transition: width .6s ease; }
.mastery-track.yellow span { background: var(--yellow); }
.mastery-track.green span { background: var(--green); }
.skill-card > small { display: block; margin-top: 8px; color: var(--muted-2); font-size: 7px; }
.recommendation-card { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 15px; margin-top: 15px; padding: 12px; border-radius: 14px; background: #f5f3ea; }
.recommendation-art { height: 65px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; border-radius: 10px; color: white; background: #294f49; font: 800 17px/1 "Noto Sans", "Apple SD Gothic Neo", system-ui, sans-serif; }
.recommendation-art span { color: #f8bc6e; }
.recommendation-art small { position: absolute; right: 5px; bottom: 5px; color: rgba(255,255,255,.65); font-size: 7px; }
.recommendation-card h3 { margin: 5px 0 3px; font: 800 13px/1.2 Inter, "Avenir Next", system-ui, sans-serif; }
.recommendation-card p { margin: 0; color: var(--muted); font-size: 8px; }
.recommendation-card > button { padding: 9px 10px; border: 0; border-radius: 9px; color: white; background: var(--navy); font-size: 8px; font-weight: 700; cursor: pointer; }
.future-handoff { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px dashed #cfd4cf; border-radius: 12px; }
.future-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: white; background: #6349a4; font-weight: 800; }
.future-handoff b, .future-handoff span { display: block; }
.future-handoff b { font-size: 9px; }
.future-handoff div span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.concept-pill { padding: 4px 6px; border-radius: 5px; color: #6d56a7; background: #eee9fa; font-size: 6px; font-weight: 800; letter-spacing: .08em; }

.guide-modal { width: min(610px, 100%); }
.guide-steps { display: grid; gap: 7px; margin-top: 20px; }
.guide-steps button { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; text-align: left; cursor: pointer; transition: .2s; }
.guide-steps button:hover { border-color: #eba7a2; background: #fffafa; transform: translateX(3px); }
.guide-steps button > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: white; background: var(--red); font-size: 9px; }
.guide-steps strong, .guide-steps small { display: block; }
.guide-steps strong { font-size: 10px; }
.guide-steps small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.guide-steps em { color: var(--muted-2); font-size: 8px; font-style: normal; }
.guide-tip { margin: 13px 0 0; color: var(--muted); font-size: 9px; }
.guide-tip span { margin-right: 5px; padding: 3px 5px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 7px; font-weight: 800; text-transform: uppercase; }

@media (max-width: 1250px) {
  .workspace { grid-template-columns: 180px minmax(480px, 1fr) 430px; }
  .lesson-main { padding-left: 28px; padding-right: 28px; }
  .course-sidebar { padding-left: 12px; padding-right: 12px; }
  .video-stage { min-height: 280px; }
}

@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(460px, 1fr) 430px; }
  .course-sidebar { display: none; }
}

@media (max-width: 820px) {
  .topbar { padding-left: 22px; }
  .quiet-button, .avatar-name, .chevron { display: none; }
  .workspace { display: block; }
  .lesson-main { padding-bottom: 35px; }
  .companion-panel { position: relative; top: auto; height: 760px; border-top: 1px solid var(--line); border-left: 0; }
  .video-stage { min-height: 300px; }
}

@media (max-width: 560px) {
  .brand-name { font-size: 11px; }
  .review-button { font-size: 0; }
  .review-button .review-icon, .review-button .review-count { font-size: 10px; }
  .lesson-main { padding: 22px 15px 30px; }
  .lesson-heading { display: block; }
  .lesson-complete-badge { width: max-content; margin-top: 12px; }
  .rule-grid { grid-template-columns: 1fr; }
  .video-stage { min-height: 245px; }
  .teacher { display: none; }
  .board { width: 92%; }
  .korean-contrast { grid-template-columns: 1fr; }
  .contrast-arrow { transform: rotate(90deg); }
  .review-grid { grid-template-columns: 1fr; }
  .recommendation-card { grid-template-columns: 60px 1fr; }
  .recommendation-card > button { grid-column: 1 / -1; }
  .review-modal-header { display: block; }
  .review-date { width: max-content; margin-top: 12px; }
}

/* Optional demo: From Content to Curriculum */
.view-hidden { display: none !important; }


.content-demo { min-height: 100vh; background: #f6f5f0; }
.content-topbar { position: sticky; }
.brand-product b { margin-left: 5px; padding: 3px 5px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 6px; letter-spacing: .09em; }
.content-top-actions { display: flex; align-items: center; gap: 10px; }
.autosave-status { display: flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--muted); font-size: 9px; }
.autosave-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.back-to-companion, .publish-button { height: 40px; padding: 0 14px; border-radius: 11px; font-size: 10px; font-weight: 800; cursor: pointer; transition: .2s; }
.back-to-companion { border: 1px solid var(--line); background: white; }
.back-to-companion span { margin-right: 6px; }
.publish-button { border: 0; color: white; background: var(--navy); box-shadow: 0 7px 18px rgba(34,60,58,.16); }
.back-to-companion:hover, .publish-button:hover { transform: translateY(-1px); }
.publish-button.approved { color: #176c59; background: var(--green-soft); box-shadow: none; }

.content-studio { width: min(1560px, 100%); margin: 0 auto; padding: 30px 28px 52px; }
.studio-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.studio-kicker { color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .17em; }
.studio-intro h1 { margin: 8px 0 7px; font-size: clamp(28px, 3vw, 43px); line-height: 1.05; letter-spacing: -.05em; }
.studio-intro h1 span { color: var(--green); }
.studio-intro p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.pipeline { display: flex; align-items: center; gap: 8px; flex: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.7); }
.pipeline > i { color: #b7bfbb; font-size: 10px; font-style: normal; }
.pipeline-step { display: grid; grid-template-columns: 25px auto; grid-template-rows: auto auto; column-gap: 8px; min-width: 83px; }
.pipeline-step > span { grid-row: 1 / 3; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: white; background: var(--green); font-size: 9px; font-weight: 900; }
.pipeline-step small, .pipeline-step b { display: block; }
.pipeline-step small { color: var(--muted-2); font-size: 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pipeline-step b { margin-top: 2px; font-size: 9px; }
.pipeline-step.active > span { background: var(--red); }
.pipeline-step.approved > span { background: var(--green); }

.studio-grid { display: grid; grid-template-columns: 270px minmax(560px, 1fr) 280px; gap: 15px; align-items: start; }
.source-workbench, .lesson-builder, .teacher-review { border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 9px 28px rgba(38,50,46,.055); }
.source-workbench, .teacher-review { padding: 17px; }
.lesson-builder { padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 15px; letter-spacing: -.025em; }
.verified-pill { padding: 5px 6px; border-radius: 6px; color: var(--green); background: var(--green-soft); font-size: 6px; font-weight: 900; letter-spacing: .08em; }

.source-video-card { margin-top: 15px; overflow: hidden; border: 1px solid #dfe1dc; border-radius: 14px; }
.source-video-art { position: relative; min-height: 174px; overflow: hidden; padding: 18px; color: white; background: linear-gradient(145deg, #173e38, #286a5d); }
.source-video-art::after { content: ""; position: absolute; right: -18px; bottom: -34px; width: 135px; height: 135px; border-radius: 50%; background: #f4b953; opacity: .9; }
.video-orbit { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; }
.orbit-one { width: 145px; height: 145px; top: -79px; right: -40px; }
.orbit-two { width: 92px; height: 92px; bottom: -45px; left: -37px; }
.source-series { position: relative; z-index: 2; display: block; font-size: 6px; font-weight: 900; letter-spacing: .15em; line-height: 1.4; }
.source-video-art strong { position: relative; z-index: 2; display: block; margin-top: 18px; font-size: 41px; line-height: 1; }
.source-video-art p { position: relative; z-index: 2; width: 130px; margin: 5px 0 0; color: rgba(255,255,255,.8); font-size: 8px; line-height: 1.4; }
.source-play { position: absolute; z-index: 3; right: 20px; bottom: 17px; display: grid; place-items: center; width: 39px; height: 39px; padding-left: 3px; border: 4px solid rgba(255,255,255,.35); border-radius: 50%; color: var(--navy); background: white; font-size: 10px; cursor: pointer; }
.source-play.playing { padding-left: 0; }
.video-duration { position: absolute; z-index: 3; right: 16px; top: 14px; padding: 4px 5px; border-radius: 4px; background: rgba(0,0,0,.28); font-size: 7px; }
.source-video-meta { padding: 11px 12px; }
.source-video-meta h3 { margin: 0; font-size: 10px; }
.source-video-meta p { margin: 4px 0 0; color: var(--muted); font-size: 7px; }

.transcript-card { margin-top: 13px; padding: 12px; border-radius: 13px; background: #f7f7f3; }
.transcript-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.transcript-title span { color: var(--muted-2); font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.transcript-title button { padding: 0; border: 0; color: var(--green); background: transparent; font-size: 7px; font-weight: 700; cursor: pointer; }
.transcript-line { display: grid; grid-template-columns: 35px 1fr; gap: 7px; width: 100%; padding: 8px 7px; border: 0; border-left: 2px solid transparent; border-radius: 0 7px 7px 0; background: transparent; text-align: left; cursor: pointer; }
.transcript-line time { padding-top: 2px; color: var(--muted-2); font-size: 7px; }
.transcript-line span { font-size: 8px; line-height: 1.55; }
.transcript-line:hover, .transcript-line.selected { border-left-color: var(--red); background: white; }
.transcript-line.selected time { color: var(--red); font-weight: 800; }
.source-guardrails { display: grid; gap: 7px; margin-top: 13px; }
.source-guardrails > div { display: grid; grid-template-columns: 21px 1fr; gap: 8px; align-items: center; padding: 8px; border: 1px solid #dce9e4; border-radius: 9px; }
.source-guardrails > div > span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 8px; font-weight: 900; }
.source-guardrails p { margin: 0; }
.source-guardrails b, .source-guardrails small { display: block; }
.source-guardrails b { font-size: 8px; }
.source-guardrails small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.builder-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 16px; }
.builder-heading h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.03em; }
.level-switcher { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: #f1f1ed; }
.level-switcher button { display: flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; transition: .2s; }
.level-switcher button span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #d4d6d1; border-radius: 5px; font-size: 7px; }
.level-switcher button.active { color: var(--ink); background: white; box-shadow: 0 2px 9px rgba(30,44,39,.08); }
.level-switcher button.active span { border-color: transparent; color: white; background: var(--green); }
.level-preview { display: none; animation: preview-in .32s ease both; }
.level-preview.active { display: block; }
@keyframes preview-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.preview-hero { position: relative; min-height: 190px; overflow: hidden; padding: 18px 20px; border-radius: 15px; color: white; background: #2a685e; }
.preview-hero::before, .preview-hero::after { content: ""; position: absolute; border-radius: 50%; }
.preview-hero::before { width: 210px; height: 210px; right: -75px; top: -90px; border: 1px solid rgba(255,255,255,.18); }
.preview-hero::after { width: 145px; height: 145px; right: -8px; bottom: -82px; background: #edb14c; }
.intermediate-hero { background: linear-gradient(135deg, #2a4a61, #3d7181); }
.intermediate-hero::after { background: #e99479; }
.advanced-hero { background: linear-gradient(135deg, #342b52, #574c78); }
.advanced-hero::after { background: #b294cd; }
.preview-level { position: relative; z-index: 2; display: inline-block; padding: 5px 7px; border-radius: 5px; background: rgba(255,255,255,.15); font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.preview-hero-copy { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 610px; margin-top: 17px; }
.preview-hero-copy small { color: rgba(255,255,255,.68); font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.preview-hero-copy h3 { margin: 4px 0 4px; font-size: 29px; letter-spacing: -.035em; }
.preview-hero-copy p { max-width: 430px; margin: 0; color: rgba(255,255,255,.8); font-size: 9px; line-height: 1.5; }
.korean-bubble { flex: none; display: grid; place-items: center; width: 84px; height: 84px; padding: 8px; border-radius: 27px 27px 27px 7px; color: var(--navy); background: white; text-align: center; font-size: 13px; font-weight: 800; line-height: 1.4; transform: rotate(3deg); box-shadow: 0 12px 25px rgba(0,0,0,.13); }
.moment-chip { position: absolute; z-index: 3; left: 20px; bottom: 14px; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; color: white; background: rgba(7,25,22,.2); font-size: 7px; cursor: pointer; }
.moment-chip span { font-size: 6px; }

.learning-block, .pattern-card, .recognition-card { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fdfdfb; }
.learning-block { margin-top: 11px; }
.block-title { display: flex; align-items: center; gap: 8px; }
.block-title > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 8px; font-weight: 900; }
.block-title small, .block-title h3 { display: block; }
.block-title small { color: var(--muted-2); font-size: 6px; font-weight: 900; letter-spacing: .09em; }
.block-title h3 { margin: 2px 0 0; font-size: 10px; }
.word-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.word-grid button { min-height: 54px; padding: 8px 4px; border: 1px solid #e7e6df; border-radius: 9px; background: white; cursor: pointer; transition: .18s; }
.word-grid button:hover { border-color: #afd3c6; transform: translateY(-2px); }
.word-grid b, .word-grid span { display: block; }
.word-grid b { color: var(--green); font-size: 11px; }
.word-grid span { margin-top: 4px; color: var(--muted); font-size: 6px; }
.learning-row { display: grid; grid-template-columns: .9fr 1.1fr; gap: 10px; margin-top: 10px; }
.pattern-korean { margin-top: 12px; padding: 10px; border-radius: 9px; color: #176c59; background: var(--green-soft); font-size: 13px; text-align: center; }
.pattern-korean b { color: var(--red); }
.pattern-card > p { margin: 10px 0 2px; font-size: 10px; font-weight: 700; }
.pattern-card > small { color: var(--muted); font-size: 7px; }
.recognition-card > p { margin: 11px 0 8px; font-size: 9px; font-weight: 700; }
.content-answer-options { display: grid; gap: 5px; }
.content-answer-options button { padding: 8px 9px; border: 1px solid #e5e6e1; border-radius: 8px; background: white; text-align: left; font-size: 7px; cursor: pointer; }
.content-answer-options button:hover { border-color: #abcfc4; }
.content-answer-options button.correct { border-color: #92c7b7; color: #176c59; background: var(--green-soft); font-weight: 800; }
.content-answer-options button.incorrect { border-color: #efaaa5; color: #a1423c; background: var(--red-soft); }
.content-answer-feedback { min-height: 12px; margin-top: 6px; color: var(--green); font-size: 7px; font-weight: 700; }

.intermediate-grid, .advanced-grid { grid-template-columns: 1fr 1fr; }
.expression-pair { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; padding: 9px; border-radius: 8px; background: #f3f6f6; }
.expression-pair b { font-size: 10px; }
.expression-pair span { color: var(--muted); font-size: 7px; }
.inline-source { margin-top: 10px; padding: 0; border: 0; color: var(--green); background: transparent; font-size: 7px; font-weight: 800; cursor: pointer; }
.writing-card textarea { width: 100%; height: 53px; resize: none; padding: 8px; border: 1px solid #dddeda; border-radius: 8px; outline: none; font-size: 9px; }
.writing-card textarea:focus { border-color: #88beaf; box-shadow: 0 0 0 3px var(--green-soft); }
.check-content-writing { width: 100%; margin-top: 6px; padding: 7px; border: 0; border-radius: 7px; color: white; background: var(--navy); font-size: 7px; font-weight: 800; cursor: pointer; }
.content-writing-feedback { min-height: 13px; margin-top: 6px; color: var(--green); font-size: 7px; line-height: 1.45; }
.advanced-grid blockquote { margin: 11px 0 8px; padding: 10px; border-left: 3px solid #806ca7; border-radius: 0 8px 8px 0; background: #f3f0f8; font-size: 9px; line-height: 1.55; }
.advanced-grid .pattern-card > p, .discussion-card > p { color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.55; }
.discussion-prompts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.discussion-prompts span { padding: 6px 8px; border-radius: 7px; color: #5f4f83; background: #f0edf6; font-size: 7px; font-weight: 700; }

.curriculum-link { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; margin-top: 11px; padding: 11px 13px; border: 1px solid #ead5a7; border-radius: 13px; background: #fffbef; }
.curriculum-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: white; background: #d89c32; font-size: 13px; font-weight: 800; }
.curriculum-link h3 { margin: 4px 0 2px; font-size: 10px; }
.curriculum-link p { margin: 0; color: var(--muted); font-size: 7px; }
.curriculum-link > button { padding: 8px 10px; border: 0; border-radius: 8px; color: white; background: var(--navy); font-size: 7px; font-weight: 800; cursor: pointer; }

.reviewer-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #176c59; background: var(--green-soft); font-size: 9px; font-weight: 900; }
.review-lead { margin: 14px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.review-checks { display: grid; gap: 7px; }
.review-checks button { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 8px; width: 100%; padding: 9px; border: 1px solid #e5e7e2; border-radius: 10px; background: white; text-align: left; cursor: pointer; }
.review-checks button > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #ccd1cd; border-radius: 7px; color: transparent; font-size: 8px; font-weight: 900; }
.review-checks button.checked > span { border-color: transparent; color: var(--green); background: var(--green-soft); }
.review-checks b, .review-checks small { display: block; }
.review-checks b { font-size: 8px; }
.review-checks small { margin-top: 2px; color: var(--muted); font-size: 6px; line-height: 1.35; }
.teacher-note { margin-top: 13px; }
.teacher-note label { display: block; margin-bottom: 6px; color: var(--muted-2); font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.teacher-note textarea { width: 100%; height: 76px; resize: none; padding: 9px; border: 1px solid #e1e2dd; border-radius: 9px; outline: none; color: var(--muted); background: #fafaf7; font-size: 7px; line-height: 1.5; }
.teacher-note textarea:focus { border-color: #99c5b8; background: white; }
.coverage-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 13px; padding: 9px 6px; border-radius: 10px; background: #f4f4f0; text-align: center; }
.coverage-card > div + div { border-left: 1px solid #dedfd9; }
.coverage-card b, .coverage-card span { display: block; }
.coverage-card b { font-size: 11px; }
.coverage-card span { margin-top: 2px; color: var(--muted); font-size: 5px; }
.approve-side-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 13px; padding: 10px; border: 0; border-radius: 9px; color: white; background: var(--green); font-size: 8px; font-weight: 800; cursor: pointer; transition: .2s; }
.approve-side-button:hover { background: #177860; transform: translateY(-1px); }
.approve-side-button.approved { color: #176c59; background: var(--green-soft); }
.approval-note { margin: 7px 0 0; color: var(--muted-2); font-size: 6px; text-align: center; }

.funnel-story { display: flex; align-items: center; justify-content: center; gap: clamp(9px, 1.4vw, 20px); margin-top: 16px; padding: 18px 22px; border-radius: 17px; color: white; background: var(--navy); box-shadow: 0 12px 30px rgba(34,60,58,.13); }
.funnel-story > div { display: grid; grid-template-columns: 30px auto; grid-template-rows: auto auto; column-gap: 9px; min-width: 110px; }
.funnel-story > i { color: rgba(255,255,255,.34); font-size: 12px; font-style: normal; }
.funnel-story b, .funnel-story small { display: block; }
.funnel-story b { font-size: 9px; }
.funnel-story small { margin-top: 3px; color: rgba(255,255,255,.57); font-size: 6px; }
.funnel-icon, .funnel-number { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--navy); background: white; font-size: 8px; font-weight: 900; }
.funnel-number { width: 48px; color: #f0ba5f; background: transparent; font-size: 13px; }
.funnel-story > div:first-child { grid-template-columns: 52px auto; min-width: 100px; }
.funnel-focus .funnel-icon { color: white; background: var(--red); }

.content-source-modal { width: min(650px, 100%); }
.modal-video-moment { display: grid; grid-template-columns: 50px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding: 17px; border-radius: 13px; color: white; background: linear-gradient(135deg, #1d4b43, #2d7165); }
.moment-play { display: grid; place-items: center; width: 48px; height: 48px; padding-left: 3px; border-radius: 50%; color: var(--navy); background: white; font-size: 11px; }
.modal-video-moment small { color: rgba(255,255,255,.6); font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.modal-video-moment p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.modal-video-moment p:last-child { color: rgba(255,255,255,.68); font-size: 8px; }
.source-mapping-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 9px; background: #f4f4f0; font-size: 7px; }
.source-mapping-row span { color: var(--muted); }
.source-mapping-row i { color: var(--green); font-style: normal; }

@media (max-width: 1280px) {
  .studio-grid { grid-template-columns: 260px minmax(540px, 1fr); }
  .teacher-review { grid-column: 1 / -1; }
  .teacher-review .review-checks { grid-template-columns: repeat(4, 1fr); }
  .teacher-review .teacher-note { display: inline-block; width: calc(55% - 7px); vertical-align: top; }
  .teacher-review .coverage-card { display: inline-grid; width: calc(45% - 7px); margin-left: 10px; vertical-align: top; }
  .teacher-review .approve-side-button { max-width: 280px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 940px) {
  .content-studio { padding-left: 18px; padding-right: 18px; }
  .studio-intro { align-items: flex-start; }
  .pipeline { display: none; }
  .studio-grid { grid-template-columns: 1fr; }
  .source-workbench { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .source-workbench > .panel-heading, .source-workbench > .source-guardrails { grid-column: 1 / -1; }
  .source-video-card, .transcript-card { margin-top: 0; }
  .source-guardrails { grid-template-columns: 1fr 1fr; }
  .teacher-review { grid-column: auto; }
  .teacher-review .review-checks { grid-template-columns: 1fr 1fr; }
  .funnel-story { flex-wrap: wrap; }
}

@media (max-width: 700px) {
  .autosave-status, .content-top-actions .publish-button { display: none; }
  .content-topbar { padding-left: 21px; padding-right: 15px; }
  .content-topbar .brand-name { font-size: 11px; }
  .back-to-companion { padding: 0 9px; font-size: 0; }
  .back-to-companion span { margin: 0; font-size: 13px; }
  .content-studio { padding: 22px 12px 35px; }
  .studio-intro { display: block; }
  .studio-intro h1 { font-size: 30px; }
  .source-workbench { display: block; }
  .source-video-card, .transcript-card { margin-top: 13px; }
  .source-guardrails { grid-template-columns: 1fr; }
  .builder-heading { display: block; }
  .level-switcher { margin-top: 13px; }
  .level-switcher button { flex: 1; justify-content: center; padding: 0 5px; }
  .preview-hero { min-height: 220px; }
  .korean-bubble { width: 70px; height: 70px; font-size: 11px; }
  .word-grid { grid-template-columns: repeat(2, 1fr); }
  .word-grid button:last-child { grid-column: 1 / -1; }
  .learning-row, .intermediate-grid, .advanced-grid { grid-template-columns: 1fr; }
  .curriculum-link { grid-template-columns: 42px 1fr; }
  .curriculum-link > button { grid-column: 1 / -1; }
  .teacher-review .review-checks { grid-template-columns: 1fr; }
  .teacher-review .teacher-note, .teacher-review .coverage-card { display: grid; width: 100%; margin-left: 0; }
  .funnel-story > i { transform: rotate(90deg); }
  .funnel-story { display: grid; justify-items: center; }
  .funnel-story > div { width: 180px; }
  .source-mapping-row { flex-wrap: wrap; }
}

/* Landing view */
.landing-view { min-height: 100vh; display: flex; flex-direction: column; }
.landing-topbar { height: 72px; display: flex; align-items: center; padding: 0 26px 0 38px; }
.landing-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 80px; text-align: center; }
.landing-main .eyebrow { margin-bottom: 14px; }
.landing-main h1 { max-width: 660px; margin: 0 0 14px; font: 800 38px/1.15 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.03em; }
.landing-main > p { max-width: 480px; margin: 0 0 44px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 280px)); gap: 20px; width: 100%; max-width: 940px; }
.landing-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: .2s ease;
}
.landing-card:hover { transform: translateY(-3px); border-color: #cfd2cc; box-shadow: var(--shadow); }
.landing-card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: white; background: var(--red); font-size: 17px; }
.landing-card h2 { margin: 4px 0 0; font: 800 17px/1.2 Inter, "Avenir Next", system-ui, sans-serif; letter-spacing: -.02em; }
.landing-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.landing-card-cta { margin-top: auto; padding-top: 10px; color: var(--red-dark); font-size: 11px; font-weight: 800; }
.landing-card-cta b { margin-left: 3px; }

@media (max-width: 820px) {
  .landing-grid { grid-template-columns: 1fr; max-width: 340px; }
  .landing-main h1 { font-size: 28px; }
}

/* Readable presentation type: tiny labels remain compact, but never drop below 11px. */
body { font-size: 15px; zoom: 1.2; }
body * { font-size: max(11px, 1em); }
