/* ═══════════════════════════════════════════════════════
   티울영어 — app.css
   교재 / 로그인 / 회원 페이지 전용. style.css 의 색·폰트 변수를 그대로 씁니다.
═══════════════════════════════════════════════════════ */

.page-sub main { padding-top: 72px; min-height: 70vh; }
.page-sub main { word-break: keep-all; overflow-wrap: anywhere; }
.expr-list, .q-list { list-style: none; padding: 0; }
.container.narrow { max-width: 760px; }

/* ── 레벨/카테고리 태그 ── */
.lv-tag, .cat-tag, .free-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.6;
}
.lv-tag.lv-basic { background: var(--lv-basic-bg); border-color: var(--lv-basic-bd); color: var(--lv-basic-tx); }
.lv-tag.lv-intro { background: var(--lv-intro-bg); border-color: var(--lv-intro-bd); color: var(--lv-intro-tx); }
.lv-tag.lv-daily { background: var(--lv-daily-bg); border-color: var(--lv-daily-bd); color: var(--lv-daily-tx); }
.lv-tag.lv-exam  { background: var(--lv-exam-bg);  border-color: var(--lv-exam-bd);  color: var(--lv-exam-tx); }
.cat-tag  { background: var(--surface); color: var(--mid); border-color: var(--border); }
.free-tag { background: var(--green); color: var(--white); }

/* ── 학습 포인트 태그 (토픽 상세) ── */
.point-tags { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.point-tags a { font-size: 0.85rem; color: var(--mid); text-decoration: none; }
.point-tags a:hover { color: var(--dark); text-decoration: underline; }

/* ── 교재 목록 ── */
.mat-hero { padding-top: 4rem; }
.mat-filter { margin: 2rem 0 2.5rem; display: grid; gap: 0.75rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-size: 0.875rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--mid);
  transition: all var(--transition);
}
.chip.small { font-size: 0.8125rem; padding: 0.3rem 0.85rem; }
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.on { background: var(--green); border-color: var(--green); color: var(--white); }

.mat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.mat-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.mat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--green-pale); }
.mat-card-top { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mat-card-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.4; }
.mat-card-sum { font-size: 0.9rem; color: var(--light); line-height: 1.6; }
.mat-card-meta { margin-top: auto; display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--light); }
.mat-card-meta span + span::before { content: "·"; margin-right: 0.75rem; }
.mat-empty { color: var(--light); padding: 2rem 0; }

/* ── 교재 상세 ── */
.mat-detail { padding-top: 3rem; }
.back-link { font-size: 0.875rem; color: var(--light); }
.back-link:hover { color: var(--green); }
.draft-banner {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: #fff4d6;
  border: 1px solid #f0d58a;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #7a5a00;
}
.mat-head { margin: 1.5rem 0 2rem; }
.mat-title { font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 500; line-height: 1.3; margin: 0.75rem 0 0.5rem; }
.mat-summary { color: var(--mid); }

.mat-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 2.5rem;
  overflow: hidden;
}
.mat-steps a {
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--mid);
  transition: background var(--transition);
}
.mat-steps a + a { border-left: 1px solid var(--border); }
.mat-steps a:hover { background: var(--green-pale); color: var(--green-dark); }
.mat-steps span { display: block; font-family: var(--serif); font-size: 0.85rem; color: var(--green); }

.mat-block { margin-bottom: 3rem; scroll-margin-top: 90px; }
.mat-block-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.mat-block-head h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; display: flex; align-items: baseline; gap: 0.6rem; }
.step-no { font-size: 1rem; color: var(--green); }
.block-note { font-size: 0.9rem; color: var(--light); margin: -0.5rem 0 1rem; }

.ko-toggle {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  white-space: nowrap;
}
.ko-toggle[aria-pressed="true"] { background: var(--green); color: var(--white); }

.mat-audio { width: 100%; margin-bottom: 1.25rem; }

.script {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1.5rem;
  position: relative;
}
.script-line { display: flex; gap: 1rem; padding: 0.9rem 0; }
.script-line + .script-line { border-top: 1px dashed var(--border); }
.speaker {
  flex: none;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 500;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}
.script .en, .expr .en, .q-list .en { font-size: 1.05rem; line-height: 1.65; color: var(--dark); }
.ko { display: none; font-size: 0.9rem; color: var(--light); margin-top: 0.15rem; }
.show-ko .ko { display: block; }
.script.locked::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70%;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white) 85%);
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none;
}

.expr-list { display: grid; gap: 0.85rem; counter-reset: expr; }
.expr {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.expr-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-bottom: 0.35rem; }
.expr-top strong { font-size: 1.1rem; font-weight: 500; color: var(--green-dark); }
.expr-top span { font-size: 0.9rem; color: var(--mid); }
.expr .ko { display: block; }

.q-list { counter-reset: q; display: grid; gap: 0.85rem; }
.q-list > li {
  counter-increment: q;
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1rem 3.25rem;
}
.q-list > li::before {
  content: "Q" counter(q);
  position: absolute;
  left: 1.1rem; top: 1.05rem;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--green);
}
.hint { font-size: 0.875rem; color: var(--light); margin-top: 0.25rem; }

.paywall {
  margin: -1rem 0 3rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.paywall-title { font-size: 1.05rem; line-height: 1.7; color: var(--dark); }
.paywall-sub { font-size: 0.875rem; color: var(--light); margin: 0.5rem 0 1.25rem; }
.paywall-btns { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

.mat-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--mid);
}

/* ── 로그인 / 회원 ── */
.auth { padding-top: 4rem; }
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}
.auth-title { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; margin-bottom: 1.5rem; text-align: center; }
.auth-form { display: grid; gap: 1rem; }
.auth-form label { display: grid; gap: 0.35rem; font-size: 0.875rem; color: var(--mid); }
.auth-form input, .auth-form select {
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--dark);
}
.auth-form input:focus { outline: 2px solid var(--green-pale); border-color: var(--green); }
.auth-form .btn { margin-top: 0.5rem; justify-content: center; }
.auth-form .helptext, .auth-form ul { font-size: 0.75rem; color: var(--light); }
.form-error { font-size: 0.8125rem; color: #b3261e; }
.auth-alt { margin-top: 1.25rem; text-align: center; font-size: 0.875rem; color: var(--light); }
.auth-alt a { color: var(--green); }
.me-list { display: grid; grid-template-columns: 6rem 1fr; gap: 0.75rem 1rem; margin-bottom: 2rem; }
.me-list dt { color: var(--light); font-size: 0.875rem; }
.auth-actions { display: grid; gap: 0.6rem; }
.auth-actions .btn, .auth-actions form .btn { width: 100%; justify-content: center; }

@media (max-width: 640px) {
  .container.narrow { padding: 0 1rem; }
  .script { padding: 0.25rem 1rem; }
  .mat-steps a { font-size: 0.8125rem; }
  .mat-cta { justify-content: center; text-align: center; }
}

/* ══════════════════════════════════════════════
   NAV v2 — 교재 · 멤버십 · 학원 안내(드롭다운) · 블로그 · 내 학습
══════════════════════════════════════════════ */
.nav-links { gap: 1.9rem; }
.nav-links a.active { color: var(--green-dark); }
.nav-links a.active::after { width: 100%; }

.nav-drop { position: relative; }
.nav-drop-btn {
  font: inherit;
  font-size: 0.88rem;
  color: var(--dark);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-drop-btn::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition);
}
.nav-drop.open .nav-drop-btn::after { transform: translateY(1px) rotate(-135deg); }
.nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  padding: 0.5rem 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-sub::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-drop.open .nav-sub { display: block; }
@media (hover: hover) and (min-width: 961px) {
  .nav-drop:hover .nav-sub, .nav-drop:focus-within .nav-sub { display: block; }
}
.nav-sub a { display: block; padding: 0.5rem 1.1rem; white-space: nowrap; }
.nav-sub a::after { display: none; }
.nav-sub a:hover { background: var(--green-pale); color: var(--green-dark); }

/* 탭이 늘어나서 햄버거 메뉴를 태블릿 폭부터 사용 */
@media (max-width: 960px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background: var(--bg);
    box-shadow: 0 12px 24px rgba(44,44,42,0.08);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-drop-btn {
    display: flex;
    width: 100%;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }
  .nav-drop-btn { justify-content: space-between; }
  .nav-links a::after { display: none; }
  .nav-sub { position: static; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0; min-width: 0; }
  .nav-sub::before { display: none; }
  .nav-sub a { padding-left: 1rem; color: var(--mid); font-size: 0.9rem; }
  .nav-cta { border: none !important; padding: 0.85rem 0 !important; color: var(--green) !important; }
  .nav-toggle { display: flex; }
}

/* ── 알림 메시지 ── */
.flash-wrap { padding-top: 1.5rem; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.9rem; background: var(--green-pale); color: var(--green-dark); }
.flash + .flash { margin-top: 0.5rem; }
.flash-error { background: #fdecea; color: #8a1c14; }

/* ══════════════════════════════════════════════
   멤버십
══════════════════════════════════════════════ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.plan-card.featured { border: 1.5px solid var(--green); }
.plan-badge { position: absolute; top: -0.75rem; left: 1.5rem; background: var(--green); color: var(--white); font-size: 0.75rem; padding: 0.15rem 0.75rem; border-radius: 999px; }
.plan-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.plan-desc { font-size: 0.9rem; color: var(--light); }
.plan-price { font-size: 1.9rem; font-weight: 500; color: var(--dark); line-height: 1.2; }
.plan-price small { font-size: 0.875rem; font-weight: 400; color: var(--light); }
.plan-usd { font-size: 0.85rem; color: var(--light); }
.plan-features { display: grid; gap: 0.5rem; font-size: 0.9rem; color: var(--mid); }
.plan-features li { padding-left: 1.4rem; position: relative; }
.plan-features li::before { content: ""; position: absolute; left: 0.2rem; top: 0.45rem; width: 0.55rem; height: 0.3rem; border-left: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); transform: rotate(-45deg); }
.plan-card .btn { margin-top: auto; justify-content: center; }
.plan-empty { margin-top: 2.5rem; padding: 2.5rem 1.5rem; text-align: center; background: var(--white); border: 1px dashed var(--border); border-radius: var(--radius); }
.plan-empty p { color: var(--mid); margin-bottom: 1.25rem; }

.perk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 3.5rem; }
.perk { padding: 1.25rem; border-top: 2px solid var(--green); }
.perk strong { display: block; font-weight: 500; margin-bottom: 0.3rem; }
.perk p { font-size: 0.875rem; color: var(--light); line-height: 1.6; }

.faq { margin-top: 3.5rem; max-width: 760px; }
.faq h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; margin-bottom: 1rem; }
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0.6rem; color: var(--mid); font-size: 0.925rem; }

/* ══════════════════════════════════════════════
   내 학습
══════════════════════════════════════════════ */
.me { padding-top: 3rem; }
.me-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.me-head h1 { font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.me-head .chips { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.panel h2 { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; color: var(--green); margin-bottom: 0.9rem; }
.panel.wide { grid-column: 1 / -1; }
.panel .big { font-size: 1.15rem; font-weight: 500; }
.panel .sub { font-size: 0.875rem; color: var(--light); margin-top: 0.2rem; }
.panel .muted { color: var(--light); font-size: 0.9rem; }
.panel .btn { margin-top: 1rem; }
.enr-list { display: grid; gap: 0.75rem; }
.enr-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; padding-bottom: 0.75rem; border-bottom: 1px dashed var(--border); }
.enr-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.enr-list .when { color: var(--light); white-space: nowrap; }
.link-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.5rem; align-items: end; margin-top: 0.75rem; }
.link-form label { display: grid; gap: 0.25rem; font-size: 0.8125rem; color: var(--mid); }
.link-form input { font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.link-form .btn { margin: 0; padding: 0.65rem 1.25rem; }
.status-pill { display: inline-block; font-size: 0.75rem; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--surface); color: var(--mid); border: 1px solid var(--border); }
.status-pill.on { background: var(--green-pale); color: var(--green-dark); border-color: #adb97a; }

/* ══════════════════════════════════════════════
   운영 대시보드
══════════════════════════════════════════════ */
.dash { padding-top: 3rem; }
.dash .container { max-width: 1100px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.dash-head h1 { font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.dash-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.dash-actions .btn { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.tile { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.25rem 1.1rem; }
.tile .label { font-size: 0.8125rem; color: var(--light); }
.tile .value { font-size: 2rem; font-weight: 500; line-height: 1.2; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: 0.9rem; font-weight: 400; color: var(--light); margin-left: 0.15rem; }
.tile .note { font-size: 0.8rem; color: var(--light); margin-top: 0.35rem; }
.tile .note b { font-weight: 500; color: var(--mid); }
.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.25rem; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.dash-table th { text-align: left; font-weight: 500; color: var(--light); font-size: 0.8rem; padding: 0 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.dash-table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table a { color: var(--green-dark); }
.dday { display: inline-block; min-width: 3.2rem; text-align: center; font-size: 0.75rem; padding: 0.1rem 0.4rem; border-radius: 4px; background: var(--surface); color: var(--mid); }
.dday.soon { background: #fff4d6; color: #7a5a00; }
.rate-cell { display: flex; align-items: center; gap: 0.6rem; justify-content: flex-end; }
.rate-bar { width: 90px; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; }
.rate-bar span { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.rate-bar.pending span { background: #adb97a; }
.pending-tag { font-size: 0.7rem; color: var(--light); }
.dash-foot { font-size: 0.8rem; color: var(--light); margin-top: 0.75rem; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .link-form { grid-template-columns: 1fr; }
  .tile .value { font-size: 1.6rem; }
  .dash-table .hide-sm { display: none; }
}
a.tile { transition: border-color var(--transition), box-shadow var(--transition); }
a.tile:hover { border-color: #adb97a; box-shadow: var(--shadow); }
.panel { overflow-x: auto; }
.dash-table th, .dash-table td { white-space: nowrap; }
.dash-table td.wrap { white-space: normal; word-break: keep-all; }
@media (max-width: 640px) {
  .panel { padding: 1.1rem; }
  .dash-table th, .dash-table td { padding-left: 0.35rem; padding-right: 0.35rem; }
  .rate-bar { width: 52px; }
  .tile { padding: 1rem; }
}

/* ── 카카오톡 상담 플로팅 버튼 (카카오 브랜드 노랑 + 검정) ── */
.kakao-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem 0.7rem 0.95rem;
  border-radius: 999px;
  background: #FEE500;
  color: #191919;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition), box-shadow var(--transition);
}
.kakao-float:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.kakao-float:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
@media (max-width: 640px) {
  .kakao-float { right: 14px; bottom: 14px; padding: 0.65rem 0.95rem 0.65rem 0.8rem; }
}
@media print { .kakao-float { display: none; } }

/* ══════════════════════════════════════════════
   토픽 목록 (링글형)
══════════════════════════════════════════════ */
.container.wide { max-width: 1100px; }
.topics { padding: 3rem 0 5rem; }
.topics-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.topics-title { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1.2; }
.topics-sub { color: var(--light); font-size: 0.925rem; margin-top: 0.35rem; }
.topic-search {
  display: flex; align-items: center; gap: 0.5rem;
  width: min(340px, 100%);
  padding: 0.6rem 0.9rem;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px; color: var(--light);
}
.topic-search:focus-within { border-color: var(--green); }
.topic-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.9rem; color: var(--dark); }

.topic-tabs { display: flex; gap: 1.75rem; margin-top: 1.75rem; border-bottom: 1px solid var(--border); }
.topic-tabs a { padding: 0.6rem 0.15rem; font-size: 1.05rem; font-weight: 500; color: var(--light); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.topic-tabs a.on { color: var(--dark); border-color: var(--dark); }
.topic-tabs a:hover { color: var(--dark); }

.topics-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; margin-top: 1.75rem; align-items: start; }

/* 필터 */
.filters { position: sticky; top: 92px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem 1.1rem; }
.filters-toggle { display: none; }
.fgroup { border-bottom: 1px solid var(--border); padding: 0.9rem 0; }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 0.95rem; padding: 0.2rem 0 0.4rem; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--mid); border-bottom: 1.5px solid var(--mid); transform: rotate(45deg); margin-right: 4px; transition: transform var(--transition); }
.fgroup[open] summary::after { transform: rotate(-135deg); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0; font-size: 0.9rem; color: var(--mid); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 18px; height: 18px; border: 1.5px solid #cfcbc2; border-radius: 4px; background: var(--white); display: grid; place-items: center; transition: all var(--transition); }
.check input:checked + .box { background: var(--green); border-color: var(--green); }
.check input:checked + .box::after { content: ""; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible + .box { outline: 2px solid var(--green); outline-offset: 2px; }
.check:hover .box { border-color: var(--green); }
.check b { font-weight: 500; color: var(--dark); }
.check svg { color: var(--dark); }
.check small { color: var(--light); font-size: 0.75rem; margin-left: auto; }
.fgroup-solo { padding: 0.75rem 0; }
.filters-reset { display: block; text-align: center; font-size: 0.8125rem; color: var(--light); padding: 0.75rem 0 0.6rem; border-top: 1px solid var(--border); }
.filters-reset:hover { color: var(--green); }

/* 상단 바 */
.topics-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.topics-count { color: var(--light); font-size: 0.95rem; }
.topics-count b { color: var(--mid); font-weight: 500; }
.sort { display: flex; gap: 0.9rem; font-size: 0.9rem; }
.sort a { color: var(--light); }
.sort a.on { color: var(--dark); font-weight: 500; }

/* 카드 그리드 */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.tcard {
  position: relative;
  aspect-ratio: 3 / 4.3;
  border-radius: 10px;
  overflow: hidden;
  background: #2f3326;
  isolation: isolate;
  transition: transform var(--transition), box-shadow var(--transition);
}
.tcard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30, 30, 25, 0.18); }
.tcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.5s ease; }
.tcard:hover .tcard-img { transform: scale(1.04); }
.tcard-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%); }
.tcard.no-cover .tcard-shade { background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%); }
/* 사진이 없을 때: 레벨 색 배경 + 큰 따옴표 */
.lvbg-basic { background: linear-gradient(150deg, #6d7f35, #3f4d17); }
.lvbg-intro { background: linear-gradient(150deg, #3d7aa3, #1b4060); }
.lvbg-daily { background: linear-gradient(150deg, #a3773d, #5e3f16); }
.lvbg-exam  { background: linear-gradient(150deg, #7d4fa3, #3f1d5c); }
.tcard-mark { position: absolute; top: 18%; left: 0.75rem; z-index: -1; font-family: var(--serif); font-size: 6.5rem; line-height: 1; color: rgba(255,255,255,0.13); }

.tcard-link { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 0.9rem 0.85rem; color: #fff; }
.tcard-link:focus-visible { outline: 3px solid var(--green-pale); outline-offset: -3px; border-radius: 10px; }
.tcard-title { font-size: 0.98rem; font-weight: 500; line-height: 1.45; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.tcard-meta { margin-top: 0.35rem; font-size: 0.75rem; color: rgba(255,255,255,0.78); display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: center; }
.tcard-done { padding: 0 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.2); color: #fff; }

.tcard-badges { position: absolute; top: 0.6rem; left: 0.6rem; display: flex; gap: 0.3rem; z-index: 1; pointer-events: none; }
.badge { font-size: 0.7rem; font-weight: 500; padding: 0.12rem 0.45rem; border-radius: 4px; line-height: 1.5; }
.badge-new { background: #d9483b; color: #fff; }
.badge-free { background: var(--white); color: var(--green-dark); }

.tcard-save { position: absolute; top: 0.45rem; right: 0.45rem; z-index: 2; }
.save-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.25); display: grid; place-items: center; cursor: pointer; transition: background var(--transition); }
.save-btn svg { fill: none; stroke: #fff; stroke-width: 2; }
.save-btn:hover { background: rgba(0,0,0,0.45); }
.save-btn.on svg { fill: #fff; }
.save-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.topics-empty { padding: 4rem 1rem; text-align: center; color: var(--light); background: var(--white); border: 1px dashed var(--border); border-radius: 10px; }
.topics-empty .btn { margin-top: 1rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1.25rem; margin-top: 2rem; font-size: 0.9rem; color: var(--light); }
.pager a { color: var(--green-dark); }

@media (max-width: 900px) {
  .topics-layout { grid-template-columns: 1fr; gap: 1rem; }
  .filters { position: static; padding: 0; background: transparent; border: 0; }
  .filters-toggle {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font: inherit; font-size: 0.9rem; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--white); cursor: pointer;
  }
  .filters-toggle .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
  .filters-body { display: none; margin-top: 0.75rem; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem 1.1rem; }
  .filters.open .filters-body { display: block; }
}
@media (max-width: 640px) {
  .topics { padding-top: 2rem; }
  .topics-title { font-size: 1.8rem; }
  .topic-search { width: 100%; }
  .tgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tcard-title { font-size: 0.92rem; }
}

/* ── 토픽 상세: 커버, 찜/학습 완료, 관련 토픽 ── */
.mat-cover { margin-bottom: 1.5rem; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 7; background: var(--surface); }
.mat-cover img { width: 100%; height: 100%; object-fit: cover; }
.mat-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.1rem; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font: inherit; font-size: 0.85rem; padding: 0.45rem 1rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--mid); cursor: pointer;
  transition: all var(--transition);
}
.pill-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.pill-btn:hover { border-color: var(--green); color: var(--green-dark); }
.pill-btn.on { background: var(--green-pale); border-color: #adb97a; color: var(--green-dark); }
.pill-btn.on svg { fill: currentColor; }
.related { margin: 1rem 0 2.5rem; }
.related h2 { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; margin-bottom: 1rem; }
.related-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── 수강생 확인 (가입 질문, 승인 화면) ── */
.radio-q { border: 0; padding: 0; margin: 0.25rem 0 0; display: grid; gap: 0.4rem; }
.radio-q legend { font-size: 0.875rem; color: var(--mid); margin-bottom: 0.4rem; }
.radio-row { display: flex; gap: 0.5rem; }
.radio-opt { flex: 1; display: flex !important; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.65rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer; font-size: 0.95rem !important; color: var(--dark) !important; }
.radio-opt input { accent-color: var(--green); width: auto; margin: 0; }
.radio-opt:has(input:checked) { border-color: var(--green); background: var(--green-pale); }
.nav-count { display: inline-grid; place-items: center; min-width: 1.1rem; height: 1.1rem; padding: 0 0.3rem; margin-left: 0.15rem; border-radius: 999px; background: #d9483b; color: #fff; font-size: 0.7rem; line-height: 1; vertical-align: 1px; }
.claim-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1.25rem; background: #fff4d6; border: 1px solid #f0d58a; border-radius: var(--radius); }
.claim-banner b { font-weight: 500; margin-right: 0.6rem; }
.claim-banner span { color: var(--mid); font-size: 0.9rem; }
.claim-banner .btn { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.claim-who { margin-top: 1rem; }
.claim-search { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.claim-search input { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.claim-search .btn { padding: 0.6rem 1.1rem; }
.cand-list { display: grid; gap: 0.6rem; }
.cand-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.cand-list b { font-weight: 500; }
.cand-list .small { font-size: 0.8125rem; margin-top: 0.2rem; }
.cand-list .btn { padding: 0.5rem 1rem; font-size: 0.85rem; white-space: nowrap; }
.match { display: inline-block; margin-left: 0.4rem; font-size: 0.75rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--green-pale); color: var(--green-dark); }
.claim-other { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.claim-other .btn { font-size: 0.85rem; padding: 0.6rem 1.1rem; }
.notice-panel { background: #fffaf0; border-color: #f0d58a; }
@media (max-width: 640px) { .cand-list li { flex-direction: column; align-items: stretch; } }

/* ── 회원가입 확인 표시, 이메일 인증 ── */
.auth-form .helptext.ok { color: var(--green-dark); }
.auth-form .helptext.bad { color: #b3261e; }
.auth-form input[aria-invalid="true"] { border-color: #d9483b; }
.auth-msg { text-align: center; color: var(--mid); margin-bottom: 1.5rem; line-height: 1.8; }
.verify-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1.25rem; background: #fff4d6; border: 1px solid #f0d58a; border-radius: var(--radius); }
.verify-banner b { display: block; font-weight: 500; }
.verify-banner span { font-size: 0.875rem; color: var(--mid); }
.verify-banner .btn { padding: 0.5rem 1rem; font-size: 0.85rem; white-space: nowrap; }

/* ── 관리 하위 탭, 학습 현황, 학습 기록 ── */
.manage-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; overflow-x: auto; }
.manage-tabs a { padding: 0.55rem 0.1rem; font-size: 0.95rem; color: var(--light); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.manage-tabs a.on { color: var(--dark); border-color: var(--dark); font-weight: 500; }
.manage-tabs a:hover { color: var(--dark); }
.learn-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; }
.learn-filter input[type=search], .learn-filter select { font: inherit; font-size: 0.9rem; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--dark); }
.learn-filter input[type=search] { flex: 1; min-width: 180px; }
.learn-filter .btn { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.check.inline { padding: 0 0.25rem; }
.small-code { font-size: 0.75rem; margin-left: 0.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; }
.panel-head h2 { margin: 0; }
.panel-head a { font-size: 0.85rem; color: var(--green-dark); }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }

.lv-progress { display: grid; gap: 0.7rem; margin: 0.5rem 0 0.25rem; }
.lv-progress li { display: grid; grid-template-columns: 6.5rem 1fr 3.8rem; align-items: center; gap: 0.75rem; font-size: 0.875rem; }
.lv-name { color: var(--mid); }
.lv-bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.lv-bar span { display: block; height: 100%; background: var(--green); border-radius: 4px; min-width: 0; }
.lv-num { text-align: right; color: var(--light); font-variant-numeric: tabular-nums; }

.learn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.learn-stats div { padding: 0.9rem; border-radius: var(--radius); background: var(--bg); text-align: center; }
.learn-stats b { display: block; font-size: 1.6rem; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.learn-stats span { font-size: 0.8rem; color: var(--light); }
.learn-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.learn-cols h3 { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.75rem; }
.learn-cols .enr-list a { color: var(--dark); }
.learn-cols .enr-list a:hover { color: var(--green-dark); }
.more-link { display: inline-block; margin-top: 0.75rem; font-size: 0.85rem; color: var(--green-dark); }
@media (max-width: 640px) {
  .learn-cols { grid-template-columns: 1fr; }
  .tiles-3 { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .tiles-3 .tile { padding: 0.75rem; }
  .lv-progress li { grid-template-columns: 5.5rem 1fr 3.2rem; }
}

/* ── 답변 쓰기·교정 ── */
.sub-status { font-size: 0.8rem; padding: 0.2rem 0.75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--white); color: var(--mid); white-space: nowrap; }
.sub-status.st-submitted { background: #fff4d6; border-color: #f0d58a; color: #7a5a00; }
.sub-status.st-corrected { background: var(--green-pale); border-color: #adb97a; color: var(--green-dark); }
.answer-list > li { padding-bottom: 1.1rem; }
.answer-list label.en { display: block; cursor: text; }
.answer-list textarea, .corr-form textarea {
  display: block; width: 100%; margin-top: 0.6rem; padding: 0.75rem 0.85rem;
  font: inherit; font-size: 1rem; line-height: 1.6; color: var(--dark);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); resize: vertical;
}
.answer-list textarea:focus, .corr-form textarea:focus { outline: 2px solid var(--green-pale); border-color: var(--green); background: var(--white); }
.word-count { display: block; text-align: right; font-size: 0.75rem; color: var(--light); margin-top: 0.25rem; min-height: 1em; }
.ans-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.ans-note { font-size: 0.875rem; color: var(--light); }
.ans-note a { color: var(--green-dark); }
.ans-label { display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; color: var(--green); margin: 0.9rem 0 0.3rem; }
.ans-label small { font-weight: 400; color: var(--light); letter-spacing: 0; margin-left: 0.35rem; }
.my-answer { padding: 0.7rem 0.85rem; background: var(--bg); border-radius: var(--radius); line-height: 1.65; white-space: pre-wrap; }
.my-answer.rewrite { background: var(--green-pale); }
.diff { padding: 0.7rem 0.85rem; background: var(--bg); border-radius: var(--radius); line-height: 1.8; font-size: 1.02rem; white-space: pre-wrap; }
.diff del { color: #b3261e; text-decoration: line-through; text-decoration-thickness: 1.5px; background: #fdecea; border-radius: 3px; }
.diff ins { color: var(--green-dark); text-decoration: none; background: var(--green-pale); border-radius: 3px; font-weight: 500; }
.corrected { padding: 0.7rem 0.85rem; border-left: 3px solid var(--green); background: var(--white); line-height: 1.65; font-size: 1.02rem; }
.good-tag { margin-top: 0.6rem; font-size: 0.875rem; color: var(--green-dark); }
.ans-comment { margin-top: 0.6rem; padding: 0.6rem 0.85rem; font-size: 0.9rem; color: var(--mid); background: #fffaf0; border: 1px solid #f3e3b5; border-radius: var(--radius); }
.feedback-box { margin-bottom: 1rem; padding: 1rem 1.15rem; background: var(--green-pale); border-radius: var(--radius); }
.feedback-box b { display: block; font-weight: 500; color: var(--green-dark); margin-bottom: 0.25rem; }
.feedback-box p { color: var(--dark); line-height: 1.7; }
.corr-item { margin-bottom: 1rem; }
.corr-q { font-size: 1.02rem; font-weight: 500; }
a.status-pill:hover { border-color: var(--green); color: var(--green-dark); }
.sub-list .when { display: inline-flex; gap: 0.4rem; align-items: center; }
.sub-list a { color: var(--dark); }
.sub-list a:hover { color: var(--green-dark); }
.new-dot { font-size: 0.72rem; font-weight: 500; color: #fff; background: #d9483b; padding: 0.1rem 0.45rem; border-radius: 999px; }

/* ══════════════════════════════════════════════
   모바일 다듬기
══════════════════════════════════════════════ */
/* 글을 쓰는 동안에는 상담 버튼이 입력칸을 가리지 않게 */
body:has(textarea:focus, input:focus, select:focus) .kakao-float { opacity: 0; pointer-events: none; }
.kakao-float { transition: opacity 0.2s ease, transform var(--transition), box-shadow var(--transition); }

@media (max-width: 640px) {
  /* 헤더 로고와 본문 왼쪽 끝을 맞춤 */
  .container, .container.narrow, .nav-inner { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* 상담 버튼: 아이콘만 있는 동그라미로 작게 */
  .kakao-float { width: 52px; height: 52px; padding: 0; justify-content: center; right: 12px; bottom: 12px; }
  .kakao-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kakao-float svg { width: 24px; height: 24px; }
  main { padding-bottom: 3rem; }

  /* 말하기 질문: Q 번호를 위로 올려 입력칸을 넓게 */
  .q-list > li { padding: 1rem; }
  .q-list > li::before { position: static; display: block; margin-bottom: 0.25rem; }
  .answer-list textarea { font-size: 16px; } /* iOS 확대 방지 */
  .ans-actions .btn { flex: 1; justify-content: center; }
  .feedback-box, .diff, .corrected, .my-answer { padding: 0.65rem 0.75rem; }

  /* 표: 글자가 세로로 쪼개지지 않게 */
  .dash-table td:not(.wrap) a { white-space: nowrap; }
}

/* ══════════════════════════════════════════════
   토픽 상세: 오늘의 질문 · 탭 · 듣기 · 영상
══════════════════════════════════════════════ */
.hook {
  margin: 0 0 1.75rem;
  padding: 1.25rem 1.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f4e6, #e6ecd3);
  border: 1px solid #d6dfba;
}
.hook-label { display: inline-block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; color: var(--green-dark); margin-bottom: 0.35rem; }
.hook p { font-family: var(--serif); font-size: clamp(1.2rem, 3vw, 1.45rem); font-weight: 500; line-height: 1.5; color: var(--dark); word-break: keep-all; }

.lesson-tabs-wrap {
  position: sticky; top: 72px; z-index: 20; scroll-margin-top: 72px;
  margin: 0 0 0.5rem; padding: 0.6rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.lesson-tabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.lesson-tabs::-webkit-scrollbar { display: none; }
.lesson-tabs [role="tab"] {
  font: inherit; font-size: 0.95rem; white-space: nowrap;
  padding: 0.5rem 1.1rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--light); cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lesson-tabs [role="tab"]:hover { color: var(--dark); }
.lesson-tabs [role="tab"][aria-selected="true"] { background: var(--dark); color: var(--white); }
.lesson-tabs [role="tab"]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lesson-tools { display: flex; justify-content: flex-end; margin-bottom: 1rem; }

/* 자바스크립트가 켜져 있을 때만 선택한 탭만 보이기 (꺼져 있으면 전부 보임) */
.js-tabs .tab-panel { display: none; }
.js-tabs .tab-panel.active { display: block; animation: tabIn 0.2s ease; }
@keyframes tabIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tab-panel { margin-bottom: 2.5rem; scroll-margin-top: 140px; }
.tab-panel .paywall { margin-top: 1rem; }
.questions-block .mat-block-head h2 { font-size: 1.25rem; }

/* 오디오 도구 */
.audio-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 1rem; }
.audio-bar .play-all { padding: 0.55rem 1.15rem; font-size: 0.9rem; }
.audio-bar .play-all.playing { background: var(--dark); border-color: var(--dark); }
.speed { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--white); }
.speed button { font: inherit; font-size: 0.8rem; padding: 0.4rem 0.75rem; border: 0; background: transparent; color: var(--mid); cursor: pointer; }
.speed button.on { background: var(--green-pale); color: var(--green-dark); font-weight: 500; }
.shadow-toggle { font-size: 0.875rem; padding: 0; }
.full-audio { margin: -0.25rem 0 1rem; font-size: 0.85rem; color: var(--light); }
.full-audio summary { cursor: pointer; }
.full-audio audio { width: 100%; margin-top: 0.5rem; }

.play-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--white); color: var(--green-dark);
  cursor: pointer; transition: all var(--transition);
}
.play-btn:hover { border-color: var(--green); background: var(--green-pale); }
.play-btn.playing { background: var(--green); border-color: var(--green); color: var(--white); }
.play-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
[data-line].is-playing { background: #f3f6ea; border-radius: 8px; }

/* 읽기 */
.reading { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem 1.25rem; position: relative; }
.reading-p { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 0.25rem; transition: background var(--transition); }
.reading-p + .reading-p { border-top: 1px dashed var(--border); }
.reading-p .en { font-size: 1.05rem; line-height: 1.85; }
.reading.locked::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to bottom, rgba(255,255,255,0), var(--white) 85%); pointer-events: none; }

/* 대화: 재생 버튼은 오른쪽 */
.script-line { align-items: flex-start; transition: background var(--transition); }
.script-text { flex: 1; min-width: 0; }

/* 표현 예문 듣기 */
.expr-ex { display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between; }

/* 영상 */
.video-box { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; }
.video-box iframe, .video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { margin-top: 0.75rem; color: var(--mid); font-size: 0.925rem; }

@media (max-width: 640px) {
  .lesson-tabs [role="tab"] { flex: 1; padding: 0.55rem 0.4rem; font-size: 0.92rem; }
  .lesson-tools .ko-toggle { font-size: 0.78rem; padding: 0.3rem 0.8rem; }
  .reading { padding: 0.25rem 0.9rem; }
  .reading-p { gap: 0.6rem; }
  .play-btn { width: 32px; height: 32px; }
  .audio-bar { gap: 0.5rem 0.75rem; }
  .hook { padding: 1rem 1.1rem; }
}

/* ── AI 첨삭 기다리기 · 말하기 녹음 ── */
.ai-wait { display: flex; gap: 0.85rem; align-items: center; margin-bottom: 1rem; padding: 1rem 1.15rem; background: var(--green-pale); border-radius: var(--radius); }
.ai-wait p { line-height: 1.6; color: var(--dark); }
.ai-wait b { font-weight: 500; }
.spinner { flex: none; width: 22px; height: 22px; border: 2.5px solid rgba(97,117,48,0.25); border-top-color: var(--green); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.corrected-row { display: flex; gap: 0.6rem; align-items: flex-start; }
.corrected-row .corrected { flex: 1; }

.level-guess { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.75rem; margin-bottom: 1rem; padding: 0.9rem 1.15rem; border: 1px solid var(--border); background: var(--white); border-radius: var(--radius); }
.level-guess .lg-label { font-size: 0.85rem; color: var(--light); }
.level-guess b { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--green-dark); line-height: 1; }
.level-guess small { flex-basis: 100%; font-size: 0.8rem; color: var(--light); }

.rec-support { margin-bottom: 1rem; padding: 0.7rem 0.9rem; border-radius: var(--radius); background: #fbf3e4; color: #6a4a1e; font-size: 0.9rem; line-height: 1.6; }
.rec-q { display: flex; gap: 0.6rem; align-items: flex-start; justify-content: space-between; }
.rec-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.85rem; margin: 0.75rem 0 0.4rem; }
.rec-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1.15rem; border: 1.5px solid #c0473b; border-radius: 999px; background: var(--white); color: #a8382d; font: inherit; font-weight: 500; cursor: pointer; transition: background var(--transition), color var(--transition); }
.rec-btn:hover { background: #fbecea; }
.rec-btn:focus-visible { outline: 2px solid #c0473b; outline-offset: 2px; }
.rec-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #c0473b; }
.rec-btn.on { background: #c0473b; color: var(--white); }
.rec-btn.on .rec-dot { background: var(--white); border-radius: 2px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.rec-time { font-size: 0.875rem; color: var(--light); font-variant-numeric: tabular-nums; }
.rec-time.err { color: #a8382d; }
.rec-audio { height: 36px; max-width: 100%; }
.speaking-block .rec-audio:not(.rec-bar .rec-audio) { display: block; margin: 0.6rem 0; }
@media (max-width: 640px) {
  .rec-bar { gap: 0.5rem; }
  .rec-audio { width: 100%; }
}

/* ── 학습 프로필 (내 학습 · 학습 현황) ── */
.profile h3 { font-size: 0.95rem; font-weight: 500; margin: 1.25rem 0 0.6rem; }
.profile h3:first-child { margin-top: 0; }
.profile-scores li { grid-template-columns: 7.5rem 1fr 3.8rem; }
.profile-note { font-size: 0.8rem; color: var(--light); margin-top: 0.4rem; }
.weak-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.weak { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 0.9rem; }
.weak-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.6rem; }
.weak-status { font-size: 0.75rem; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--surface); color: var(--mid); }
.weak.st-repeating .weak-status { background: #fdecea; color: #b3261e; }
.weak.st-improving .weak-status, .weak.st-mastered .weak-status { background: var(--green-pale); color: var(--green-dark); }
.weak.st-mastered { opacity: 0.75; }
.weak-count { font-size: 0.8rem; color: var(--light); margin-left: auto; }
.weak-ex { margin-top: 0.5rem; font-size: 0.95rem; padding: 0.45rem 0.7rem; }
.weak-why { font-size: 0.85rem; color: var(--mid); margin-top: 0.35rem; }
.next-task { background: var(--green-pale); border-radius: var(--radius); padding: 0.8rem 0.9rem; margin-bottom: 0.5rem; }
.next-task p { color: var(--green-dark); font-weight: 500; }
.next-task .sub { font-weight: 400; font-size: 0.85rem; margin-top: 0.2rem; }
@media (max-width: 600px) {
  .profile-scores li { grid-template-columns: 6rem 1fr 3.2rem; }
  .weak-count { margin-left: 0; width: 100%; }
}

/* ── 내 학습: 왼쪽 메뉴 + 탭 (모바일은 위쪽 탭 줄) ── */
.me .container.me-wrap { max-width: 1000px; }
.me-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.75rem; align-items: start; }
.me-nav { position: sticky; top: 92px; display: grid; gap: 0.15rem; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem; }
.me-nav a { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.65rem 0.85rem; border-radius: var(--radius); font-size: 0.92rem; color: var(--mid); text-decoration: none; }
.me-nav a:hover { background: var(--surface); color: var(--dark); }
.me-nav a.on { background: var(--green-pale); color: var(--green-dark); font-weight: 500; }
.me-main { min-width: 0; }
@media (max-width: 760px) {
  .me-layout { grid-template-columns: 1fr; gap: 1rem; }
  .me-nav { position: static; grid-template-columns: repeat(4, 1fr); gap: 0.2rem; padding: 0.3rem; }
  .me-nav a { justify-content: center; text-align: center; gap: 0.25rem; padding: 0.55rem 0.2rem; font-size: 0.8rem; line-height: 1.3; word-break: keep-all; }
}


/* 마이페이지 > 내 정보 수정 */
.settings-form { max-width: 26rem; }
.settings-form input[disabled] { background: var(--bg, #f5f5f2); color: var(--light); }
.settings-note { margin-top: 0.9rem; font-size: 0.8125rem; }
.danger-panel { border-color: #f0c9c4; }
.danger-panel h2 { color: #b3261e; }
.withdraw-list { margin: 0 0 1rem 1.1rem; font-size: 0.875rem; color: var(--mid); display: grid; gap: 0.35rem; }
.danger-panel summary { cursor: pointer; font-size: 0.875rem; color: #b3261e; margin-bottom: 0.9rem; }
.auth-form .check-row { display: flex; gap: 0.5rem; align-items: flex-start; color: var(--mid); }
.auth-form .check-row input { width: auto; margin-top: 0.2rem; }
.btn-danger { background: #b3261e; color: #fff; border: 1px solid #b3261e; }
.btn-danger:hover { background: #8f1e18; }

/* ── 시리즈(교재·코스) ── */
.check .box.round { border-radius: 50%; }
.check input:checked + .box.round::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.series-tag { text-decoration: none; }
.series-tag:hover { border-color: var(--green); color: var(--green-dark); }
.series-intro { margin: 0 0 1rem; font-size: 0.9rem; color: var(--mid); }
.series-intro b { color: var(--dark); font-weight: 500; margin-right: 0.35rem; }
.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 2.5rem 0 0; }
.series-nav a { display: block; padding: 0.9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); text-decoration: none; color: var(--dark); }
.series-nav a:hover { border-color: var(--green); }
.series-nav small { display: block; font-size: 0.75rem; color: var(--green); margin-bottom: 0.2rem; }
.series-nav b { font-weight: 500; font-size: 0.95rem; }
.series-next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .series-nav { grid-template-columns: 1fr; } .series-next { grid-column: 1; } }

/* ── 연습 문제 ── */
.practice-kind { font-size: 0.95rem; font-weight: 500; color: var(--green-dark); margin: 1.5rem 0 0.6rem; }
.practice-list { list-style: none; padding: 0; display: grid; gap: 0.75rem; counter-reset: pr; }
.practice { counter-increment: pr; position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1.1rem 0.9rem 2.9rem; }
.practice::before { content: counter(pr); position: absolute; left: 1.1rem; top: 0.95rem; font-family: var(--serif); font-weight: 600; color: var(--green); }
.practice.ok { border-color: var(--green); }
.practice.wrong { border-color: #d9b46a; }
.practice-label { font-size: 0.8rem; color: var(--light); margin-bottom: 0.4rem; }
.practice-prompt { font-size: 1.02rem; line-height: 1.6; color: var(--dark); margin-bottom: 0.5rem; }
.ko-prompt { color: var(--dark); }
.practice-dlg p { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; }
.practice-dlg .speaker { width: 1.7rem; height: 1.7rem; }
.practice-row { flex-wrap: nowrap; }
.practice-input { width: 100%; padding: 0.55rem 0.7rem; font: inherit; font-size: 1rem; border: 1px solid var(--border); border-radius: 6px; background: #fcfbf8; }
.practice-input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.practice-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; margin-top: 0.55rem; }
.link-btn { background: none; border: 0; padding: 0.25rem 0; font: inherit; font-size: 0.85rem; color: var(--green); text-decoration: underline; cursor: pointer; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.875rem; }
.practice-hint[hidden] { display: none; }
.practice-hint { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.practice-hint span { font-size: 0.85rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--green-pale); color: var(--green-dark); }
.practice-result { margin-top: 0.6rem; }
.practice-verdict { font-size: 0.875rem; color: var(--mid); margin-bottom: 0.4rem; }
.practice.ok .practice-verdict { color: var(--green-dark); }
.practice-answers { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.practice-answers li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0.7rem; border-left: 3px solid var(--green); background: #fcfbf8; }

/* ── 답변 틀 · 모범 답변 ── */
.q-template { margin: 0.5rem 0 0.4rem; padding: 0.5rem 0.75rem; background: #f6f4ee; border-radius: 6px; }
.q-template .ans-label { margin-top: 0; }
.q-list .q-template .en { font-size: 0.95rem; color: var(--mid); }
.model-answer { margin-top: 0.75rem; }
.model-answer summary { cursor: pointer; font-size: 0.875rem; color: var(--green); font-weight: 500; }
.model-answer .corrected-row { margin-top: 0.5rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--green); background: #fcfbf8; }
.model-answer .corrected-row .en { flex: 1; }
.model-locked { margin-top: 0.6rem; font-size: 0.85rem; color: var(--light); }

/* ── 토픽 과제 ── */
.hw-form { max-width: 40rem; }
.hw-form select, .hw-form input[type=date], .hw-form input[type=text] { width: 100%; }
.hw-row { display: grid; grid-template-columns: 10rem 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .hw-row { grid-template-columns: 1fr; } }
.dday.done { background: var(--green-pale); color: var(--green-dark); }
.hw-list { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.hw-item { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.hw-item.is-done { opacity: 0.65; }
.hw-item a { color: var(--dark); text-decoration: none; font-weight: 500; }
.hw-item a:hover { color: var(--green-dark); }
.hw-meta { font-size: 0.8rem; color: var(--light); margin-top: 0.15rem; }
.hw-note { font-size: 0.875rem; color: var(--mid); margin-top: 0.3rem; }
.hw-banner { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-left: 3px solid var(--green); background: var(--green-pale); border-radius: 6px; font-size: 0.9rem; color: var(--green-dark); }
.hw-banner b { font-weight: 500; }

/* ── 검색하면서 여러 개 고르기 (static/js/multiselect.js) ── */
.ms { position: relative; margin-top: 0.3rem; }
.ms-field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--white); cursor: text; }
.ms-field:focus-within { border-color: var(--green); outline: 2px solid var(--green-pale); }
.ms-chips { display: contents; }
.ms-chip { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.2rem 0.3rem 0.2rem 0.65rem; border-radius: 999px; background: var(--green-pale); color: var(--green-dark); font-size: 0.85rem; line-height: 1.3; }
.ms-chip button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; width: 1.4rem; height: 1.4rem; border-radius: 50%; cursor: pointer; }
.ms-chip button:hover { background: rgba(0,0,0,0.08); }
.ms .ms-input, .ms .ms-input:focus { flex: 1; min-width: 8rem; width: auto; margin: 0; border: 0 !important; outline: 0 !important; padding: 0.3rem 0.2rem !important; background: transparent !important; font: inherit; box-shadow: none !important; }
.ms-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 16rem; overflow-y: auto; margin: 0; padding: 0.3rem 0; list-style: none; background: var(--white); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,0.12)); }
.ms-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0.8rem; font-size: 0.9rem; color: var(--dark); cursor: pointer; }
.ms-list li small { color: var(--light); font-size: 0.78rem; white-space: nowrap; }
.ms-list li:hover, .ms-list li.on { background: var(--green-pale); }
.ms-list li.ms-empty { color: var(--light); cursor: default; }
.ms-list li.ms-empty:hover { background: none; }

/* ── 개인정보처리방침 · 가입 동의 ── */
.policy { line-height: 1.75; color: var(--mid); padding-bottom: 3rem; }
.policy .policy-meta { color: var(--light); font-size: 0.875rem; margin: -0.5rem 0 1.5rem; }
.policy h2 { font-size: 1.1rem; color: var(--dark); margin: 2rem 0 0.6rem; }
.policy ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.policy li { margin: 0.25rem 0; }
.policy p { margin: 0.6rem 0; }
.policy a { color: var(--green); }
.policy-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0.6rem 0; }
.policy-table th, .policy-table td { border: 1px solid #e5e1d8; padding: 0.55rem 0.65rem; text-align: left; vertical-align: top; }
.policy-table th { background: #f7f5f0; color: var(--dark); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .policy-table, .policy-table tbody, .policy-table tr, .policy-table td { display: block; width: 100%; }
  .policy-table thead { display: none; }
  .policy-table tr { border: 1px solid #e5e1d8; border-radius: 8px; margin-bottom: 0.6rem; padding: 0.3rem 0; }
  .policy-table td { border: 0; padding: 0.25rem 0.75rem; }
  .policy-table td:first-child { font-weight: 600; color: var(--dark); }
}
.agree-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.agree-row a { font-size: 0.8rem; color: var(--green); }
.agree-row .form-error { flex-basis: 100%; }
.footer-copy a { color: inherit; text-decoration: underline; }
.auth-form .agree-row .check { display: flex; gap: 0.55rem; padding: 0.25rem 0; }

/* ── 온라인 학습 소개 (/online) ── */
.on-hero { padding-top: 5rem; padding-bottom: 3rem; }
.on-headline { font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 500; line-height: 1.25; color: var(--dark); margin: 0.5rem 0 1.25rem; }
.on-headline em { font-style: italic; color: var(--green); }
.on-sub { max-width: 560px; color: var(--mid); line-height: 1.8; }
.on-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }
.on-stat { margin-top: 1.25rem; font-size: 0.85rem; color: var(--light); }
.on-stat b { color: var(--dark); font-weight: 600; }
.on-steps-section, .on-for { background: var(--white); }
.on-steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.5rem; }
.on-steps li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 0; border-top: 1px solid var(--border); }
.on-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 0.85rem; font-weight: 600; }
.on-steps strong { display: block; font-weight: 600; color: var(--dark); margin-bottom: 0.2rem; }
.on-steps p { font-size: 0.9rem; color: var(--light); line-height: 1.6; }
.on-grid { margin-top: 1.75rem; }
.on-more { margin-top: 1.5rem; text-align: center; }
.on-for .perk-row { margin-top: 2rem; }
.on-offline { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.on-offline-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.on-offline-inner strong { display: block; color: var(--dark); margin-bottom: 0.25rem; }
.on-offline-inner p { font-size: 0.9rem; color: var(--light); }
.tgrid.on-grid { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .tgrid.on-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .tgrid.on-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── 메인: 학원 / 온라인 두 입구 ── */
.home-hero { padding-top: 5rem; padding-bottom: 4.5rem; min-height: 80vh; }
.home-resume { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 1.5rem; padding: 0.9rem 1.1rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--border); color: var(--mid); font-size: 0.9rem; text-decoration: none; }
.home-resume b { color: var(--dark); font-weight: 600; margin-right: 0.25rem; }
.home-resume-go { color: var(--green); font-weight: 600; }
.home-doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.home-door { display: flex; flex-direction: column; gap: 0.6rem; padding: 2rem 1.75rem; border-radius: 12px; text-decoration: none; color: var(--mid); background: var(--white); border: 1px solid var(--border); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.home-door:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(26, 26, 24, 0.08); border-color: var(--green); }
.door-online { background: #2f3a1a; border-color: #2f3a1a; color: #d9dccd; }
.door-online:hover { border-color: #2f3a1a; }
.door-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.door-online .door-label { color: #b9c98a; }
.door-title { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; color: var(--dark); }
.door-online .door-title { color: #fff; }
.home-door p { line-height: 1.7; }
.home-door ul { list-style: none; padding: 0; margin: 0.25rem 0 0.5rem; font-size: 0.875rem; }
.home-door li { padding: 0.3rem 0; border-top: 1px solid var(--border); }
.door-online li { border-color: rgba(255, 255, 255, 0.14); }
.door-go { margin-top: auto; font-weight: 600; color: var(--green); }
.door-online .door-go { color: #fff; }
@media (max-width: 720px) {
  .home-hero { padding-top: 3.5rem; min-height: 0; }
  .home-doors { grid-template-columns: 1fr; }
  .home-door { padding: 1.5rem 1.25rem; }
  .door-title { font-size: 1.6rem; }
}

/* AI 첨삭 '오픈 예정' 표시 (.env 에 ANTHROPIC_API_KEY 를 넣으면 사라짐) */
.soon-badge { display: inline-block; margin-left: 0.3rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: #f3ead2; color: #8a6a12; font-size: 0.7rem; font-weight: 600; vertical-align: middle; letter-spacing: 0; }
.btn[disabled] { opacity: 0.75; cursor: not-allowed; white-space: nowrap; word-break: keep-all; }
