:root {
  --ink: #050505;
  --muted: #58667a;
  --line: #050505;
  --soft-line: #d7dee8;
  --paper: #ffffff;
  --bg: #d9edff;
  --blue: #1767e8;
  --blue-soft: #cdf0ff;
  --green: #39c95f;
  --amber: #f6b83f;
  --red: #ee5d4f;
  --slate: #243044;
  --pop-yellow: #fff2a8;
  --pop-pink: #ffd8e7;
  --pop-green: #a5f06a;
  --pop-shadow: #050505;
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
  background: #f5dce8;
}

.container {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.home-shell {
  min-height: 100vh;
  padding: 22px;
  background: #f5dce8;
  color: #050505;
}

.home-container {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5dce8;
}

.auth-card {
  width: min(480px, 100%);
  border: 1px solid #050505;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 10px 10px 0 #050505;
  padding: 28px;
}

.auth-title {
  margin-top: 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.98;
}

.auth-error {
  border: 1px solid #050505;
  border-radius: 8px;
  background: #fff2a8;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.16);
  color: #050505;
  padding: 12px 14px;
  font-weight: 950;
  line-height: 1.45;
}

.member-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 6px 6px 0 #050505;
  padding: 12px 14px;
}

.member-bar div {
  display: grid;
  gap: 2px;
}

.member-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.member-bar strong {
  color: #050505;
  font-size: 15px;
  font-weight: 950;
}

.home-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 60vw, 720px);
  border: 1px solid #050505;
  border-radius: 8px;
  background: #d7ecff;
  box-shadow: 12px 12px 0 #050505;
  isolation: isolate;
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: transparent;
}

.home-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 1;
  transform: scale(1.02);
}

.home-icon-cloud {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.home-icon {
  position: absolute;
  display: block;
  object-fit: contain;
  filter: drop-shadow(10px 12px 0 rgba(5, 5, 5, 0.18));
}

.home-icon-star {
  left: 51%;
  top: 8%;
  width: clamp(100px, 11vw, 170px);
  transform: rotate(2deg);
  z-index: 5;
}

.home-icon-gift {
  right: 4%;
  top: 5%;
  width: clamp(150px, 18vw, 260px);
  transform: rotate(5deg);
  z-index: 6;
}

.home-icon-flashcards {
  right: 25%;
  top: 25%;
  width: clamp(210px, 24vw, 350px);
  transform: rotate(-7deg);
  z-index: 7;
}

.home-icon-calendar {
  right: -3%;
  top: 31%;
  width: clamp(170px, 20vw, 300px);
  transform: rotate(4deg);
  z-index: 6;
}

.home-icon-book {
  right: 34%;
  bottom: 3%;
  width: clamp(220px, 27vw, 400px);
  transform: rotate(1deg);
  z-index: 4;
}

.home-icon-pencil {
  right: 2%;
  bottom: 5%;
  width: clamp(210px, 25vw, 360px);
  transform: rotate(-5deg);
  z-index: 8;
}

.home-copy {
  position: absolute;
  left: clamp(20px, 4vw, 54px);
  bottom: clamp(22px, 4vw, 50px);
  z-index: 10;
  width: min(500px, calc(100% - 40px));
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #050505;
  border-radius: 999px;
  background: #fff6bc;
  box-shadow: 4px 4px 0 #050505;
  color: #050505;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.home-wordmark {
  position: absolute;
  left: clamp(-12px, 1vw, 24px);
  top: 46%;
  transform: translateY(-50%);
  z-index: 3;
  color: #030303;
  font-size: clamp(96px, 16vw, 230px);
  font-weight: 950;
  line-height: 0.76;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.home-wordmark span {
  display: block;
}

.home-heading {
  margin-top: 18px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 6px 6px 0 #050505;
  padding: 12px 16px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.06;
}

.home-subcopy {
  width: min(440px, 100%);
  margin-top: 12px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 5px 5px 0 #050505;
  padding: 12px 14px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.5;
}

.home-actions {
  margin-top: 16px;
}

.home-poster-chip {
  position: absolute;
  z-index: 10;
  display: grid;
  gap: 2px;
  min-width: 106px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffcf58;
  box-shadow: 6px 6px 0 #050505;
  padding: 12px;
  transform: rotate(-3deg);
}

.home-poster-chip span {
  font-size: 29px;
  font-weight: 950;
  line-height: 1;
}

.home-poster-chip strong {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.chip-a {
  right: clamp(18px, 4vw, 54px);
  top: clamp(18px, 5vw, 56px);
}

.chip-b {
  right: clamp(140px, 16vw, 230px);
  bottom: clamp(18px, 5vw, 56px);
  background: #a5f06a;
  transform: rotate(4deg);
}

.home-dashboard {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}

.home-settings {
  border-color: #080808;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 9px 9px 0 #080808;
}

.home-main {
  min-width: 0;
}

.home-range-card {
  border: 1px solid #080808;
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 9px 9px 0 #080808;
  padding: 24px;
}

.home-results-card {
  border: 1px solid #080808;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 9px 9px 0 #080808;
  padding: 20px;
}

.home-growth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #080808;
  border-radius: 8px;
  background: #fff2a8;
  box-shadow: 9px 9px 0 #080808;
  padding: 20px;
}

.home-growth-card h2 {
  margin-top: 4px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.96;
}

.growth-meter {
  min-width: 0;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #050505;
  border-radius: 999px;
  background: #ffffff;
  color: #58667a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.badge-chip.earned {
  background: #a5f06a;
  color: #050505;
  box-shadow: 3px 3px 0 #050505;
}

.quest-cta {
  min-width: 142px;
}

.result-list {
  display: grid;
  gap: 8px;
}

.result-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.14);
  padding: 10px 12px;
}

.result-row div {
  display: grid;
  gap: 3px;
}

.result-row strong {
  color: #050505;
  font-size: 14px;
  font-weight: 950;
}

.result-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.result-row b {
  color: var(--blue);
  font-size: 22px;
  font-weight: 950;
}

.home-range-card h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.96;
  letter-spacing: 0;
}

.home-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.home-kpi-strip div {
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: 4px 4px 0 #050505;
}

.home-kpi-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.home-kpi-strip strong {
  display: block;
  margin-top: 5px;
  color: #050505;
  font-size: 26px;
  font-weight: 950;
}

.home-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-card {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #ffe878;
  color: #050505;
  box-shadow: 9px 9px 0 #050505;
  padding: 22px;
  text-align: left;
  display: grid;
  align-content: space-between;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.route-card > span,
.route-card > strong,
.route-card > small {
  position: relative;
  z-index: 2;
}

.route-icon {
  position: absolute;
  right: -12px;
  top: -18px;
  z-index: 1;
  width: 128px;
  height: 128px;
  object-fit: contain;
  opacity: 0.88;
  transform: rotate(8deg);
  filter: saturate(1.08) drop-shadow(6px 7px 0 rgba(5, 5, 5, 0.16));
}

.route-card.primary {
  background: #62d4fb;
}

.route-card.quest {
  background: #a5f06a;
}

.route-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 11px 11px 0 #050505;
}

.route-card:active {
  transform: translate(2px, 2px);
  box-shadow: 5px 5px 0 #050505;
}

.route-card span {
  font-size: 13px;
  font-weight: 950;
  color: #064ad8;
}

.route-card strong {
  display: block;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 950;
  line-height: 1;
}

.route-card small {
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

.topbar {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 7px 7px 0 var(--pop-shadow);
  padding: 16px;
}

.topbar > div,
.topbar > .btn-row,
.topbar > button {
  position: relative;
  z-index: 2;
}

.topbar-icon {
  position: absolute;
  right: 194px;
  top: 10px;
  z-index: 1;
  width: 92px;
  height: 92px;
  object-fit: contain;
  opacity: 0.82;
  transform: rotate(-7deg);
  filter: drop-shadow(5px 6px 0 rgba(5, 5, 5, 0.14));
  pointer-events: none;
}

.topbar-icon.test-icon {
  right: 188px;
  top: 14px;
  width: 104px;
  height: 78px;
  transform: rotate(-9deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--pop-shadow);
  border-radius: 999px;
  background: var(--pop-yellow);
  box-shadow: 3px 3px 0 var(--pop-shadow);
  color: var(--pop-shadow);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.04em;
  margin: 0 0 9px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  font-weight: 950;
  line-height: 1.3;
}

h3 {
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  min-height: 40px;
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--pop-shadow);
  color: white;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.28);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn.secondary {
  background: white;
  color: var(--ink);
}

.btn.ghost {
  background: var(--pop-yellow);
  color: var(--ink);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.3);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.28);
}

.btn:disabled {
  transform: none;
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.16);
  opacity: 0.45;
  cursor: not-allowed;
}

.home-shell .btn {
  border-color: #050505;
  background: #050505;
  color: #ffffff;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.32);
  font-weight: 950;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.home-shell .btn.secondary {
  background: #ffffff;
  color: #050505;
}

.home-shell .btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.32);
}

.home-shell .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.32);
}

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 7px 7px 0 var(--pop-shadow);
}

.panel.pad {
  padding: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.label {
  color: #263142;
  font-size: 13px;
  font-weight: 950;
}

.input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  color: var(--ink);
  background: white;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.16);
  font-weight: 850;
}

textarea.input {
  height: auto;
  min-height: 112px;
  padding-top: 10px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus {
  border-color: var(--pop-shadow);
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.home-shell .input {
  border-color: #050505;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.18);
  font-weight: 850;
}

.home-shell .input:focus {
  border-color: #050505;
  box-shadow: 4px 4px 0 #050505;
}

.segmented {
  display: grid;
  gap: 8px;
}

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

.segmented.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.segmented.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .segmented.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmented.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.seg-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #263142;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.seg-btn.active {
  background: var(--blue-soft);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.seg-btn:hover,
.type-btn:hover,
.choice:hover,
.answer-nav:hover,
.study-row:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.22);
}

.seg-btn:active,
.type-btn:active,
.choice:active,
.answer-nav:active,
.study-row:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.18);
}

.home-shell .seg-btn,
.home-shell .type-btn {
  border-color: #050505;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.16);
}

.home-shell .seg-btn.active,
.home-shell .type-btn.active {
  border-color: #050505;
  background: #ccefff;
  color: #050505;
  box-shadow: 4px 4px 0 #050505;
}

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

.range-inputs label {
  display: grid;
  gap: 6px;
}

.range-inputs span {
  color: #526071;
  font-size: 12px;
  font-weight: 950;
}

.type-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #263142;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.16);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.type-btn.active {
  background: var(--blue-soft);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
  box-shadow: 5px 5px 0 var(--pop-shadow);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.kpi strong {
  display: block;
  margin-top: 7px;
  font-size: 27px;
  font-weight: 950;
}

.rank {
  color: #1767e8;
  font-weight: 950;
}

.word {
  font-weight: 950;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.quest-shell {
  background: #d7ecff;
}

.quest-topbar {
  background: #fff2a8;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(5, 5, 5, 0.16);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 6px;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--pop-shadow);
  background: #ffffff;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.prompt {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #fff7c7;
  box-shadow: 5px 5px 0 var(--pop-shadow);
  padding: 20px;
}

.prompt-main {
  font-size: 28px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.prompt-context {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.75;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.choice {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.choice.active {
  background: var(--pop-green);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--pop-shadow);
}

.choice.correct {
  background: var(--pop-green);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--pop-shadow);
}

.choice.wrong {
  background: #ffd8e7;
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--red);
}

.spelling-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.feedback-box {
  margin-top: 18px;
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.16);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.feedback-box.good {
  background: #e8ffd8;
}

.feedback-box.bad {
  background: #fff2a8;
}

.feedback-box > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-box strong {
  font-size: 18px;
  font-weight: 950;
}

.feedback-box span,
.feedback-box p {
  color: #263142;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
}

.feedback-box b {
  color: var(--ink);
  font-weight: 950;
}

.feedback-sentence {
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.14);
}

.combo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #050505;
  color: #ffffff;
  box-shadow: 6px 6px 0 rgba(5, 5, 5, 0.18);
  padding: 18px;
}

.combo-card span,
.combo-card small {
  display: block;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 950;
}

.combo-card strong {
  display: block;
  margin-top: 3px;
  font-size: 56px;
  line-height: 0.95;
  font-weight: 950;
}

.combo-card.pulse {
  animation: comboPulse 420ms ease;
}

.combo-card.combo5,
.combo-card.combo10 {
  background: #1767e8;
}

.xp-card {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
  padding: 14px;
}

.answer-nav.correct:not(.current) {
  background: var(--pop-green);
  color: var(--ink);
}

.answer-nav.wrong:not(.current) {
  background: #ffd8e7;
  color: var(--ink);
}

.confetti-burst {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
}

.confetti-burst span {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 12px;
  height: 22px;
  border: 1px solid #050505;
  background: #fff2a8;
  animation: confettiPop 680ms ease-out forwards;
}

.confetti-burst span:nth-child(2) {
  --x: -92px;
  background: #a5f06a;
  transform: translateX(-40px) rotate(18deg);
  animation-delay: 40ms;
}

.confetti-burst span:nth-child(3) {
  --x: 88px;
  background: #62d4fb;
  transform: translateX(46px) rotate(-16deg);
  animation-delay: 80ms;
}

.confetti-burst span:nth-child(4) {
  --x: -142px;
  background: #ffd8e7;
  transform: translateX(-86px) rotate(-9deg);
  animation-delay: 100ms;
}

.confetti-burst span:nth-child(5) {
  --x: 144px;
  background: #f6b83f;
  transform: translateX(92px) rotate(12deg);
  animation-delay: 130ms;
}

.confetti-burst span:nth-child(6) {
  --x: 42px;
  background: #ffffff;
  transform: translateX(10px) rotate(30deg);
  animation-delay: 160ms;
}

.quest-progress-card {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 6px 6px 0 rgba(5, 5, 5, 0.18);
  padding: 16px;
}

.quest-front {
  background: #fff2a8;
}

.quest-result {
  position: relative;
  overflow: hidden;
  width: min(760px, 100%);
  margin: 42px auto 0;
  text-align: center;
  background: #ffffff;
}

.quest-result > * {
  position: relative;
  z-index: 2;
}

.quest-result-icon {
  position: absolute;
  right: 28px;
  top: 20px;
  z-index: 1;
  width: 150px;
  height: 150px;
  object-fit: contain;
  opacity: 0.28;
  transform: rotate(8deg);
  pointer-events: none;
}

.quest-result h1 {
  margin-top: 12px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.96;
}

.quest-score {
  width: min(380px, 100%);
  margin: 24px auto 0;
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #fff2a8;
  box-shadow: 7px 7px 0 var(--pop-shadow);
  padding: 18px;
}

.quest-score strong {
  display: block;
  font-size: clamp(58px, 10vw, 108px);
  line-height: 0.9;
  font-weight: 950;
}

.quest-score span {
  display: block;
  margin-top: 8px;
  color: #263142;
  font-size: 13px;
  font-weight: 950;
}

.quest-reward-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.quest-reward-grid div {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.14);
  padding: 12px;
}

.quest-reward-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.quest-reward-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 950;
}

.quest-result-actions {
  justify-content: center;
}

@keyframes comboPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.04) rotate(-1deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes confettiPop {
  0% {
    opacity: 0;
    translate: 0 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: var(--x, 0) 180px;
  }
}

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

.answer-nav {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 2px 2px 0 rgba(5, 5, 5, 0.06);
  opacity: 0.65;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, opacity 140ms ease;
}

.answer-nav.current {
  background: var(--pop-shadow);
  color: white;
  font-weight: 950;
  opacity: 1;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.24);
}

.answer-nav.done:not(.current) {
  background: var(--pop-green);
  color: var(--ink);
  font-weight: 950;
  opacity: 1;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.study-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.study-mini-stats span {
  border: 1px solid var(--pop-shadow);
  border-radius: 999px;
  background: #ffffff;
  color: #263142;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.study-word {
  margin-top: 4px;
  font-size: 42px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  font-weight: 950;
  letter-spacing: 0;
}

.study-meaning {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: var(--pop-yellow);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--pop-shadow);
  padding: 18px;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.5;
}

.flash-card {
  height: clamp(380px, 52vh, 520px);
  perspective: 1400px;
  cursor: pointer;
  outline: none;
}

.flash-card:focus-visible .flash-face {
  border-color: var(--pop-shadow);
  box-shadow: 0 0 0 3px rgba(5, 5, 5, 0.16);
}

.flash-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 360ms ease;
  transform-style: preserve-3d;
}

.flash-card.flipped .flash-card-inner {
  transform: rotateY(180deg);
}

.flash-face {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 8px 8px 0 var(--pop-shadow);
  backface-visibility: hidden;
  overflow: auto;
  padding: 28px;
}

.flash-front {
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: #d8f1ff;
}

.flash-front .study-word {
  font-size: clamp(46px, 8vw, 88px);
}

.flash-back {
  transform: rotateY(180deg);
  display: grid;
  align-content: start;
}

.flash-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.flash-meta span {
  border: 1px solid var(--pop-shadow);
  border-radius: 999px;
  background: #ffffff;
  color: #263142;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}

.study-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.study-status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.14);
  padding: 12px;
}

.study-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.study-status-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.35;
}

.sentence-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.14);
  padding: 18px;
}

.sentence-box p:first-child {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.8;
}

.context-word {
  display: inline;
  border: 2px solid #ff3b1f;
  border-radius: 3px;
  background: #fff2a8;
  color: var(--ink);
  padding: 0 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.study-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.study-actions .btn-row {
  justify-content: center;
}

.study-rate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.study-rate .btn {
  width: 100%;
}

.study-list {
  max-height: 520px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding-right: 4px;
}

.study-side-section {
  display: grid;
  gap: 16px;
}

.study-side-section + .study-side-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(5, 5, 5, 0.14);
}

.study-wide-btn {
  width: 100%;
}

.study-row {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  text-align: left;
  box-shadow: 3px 3px 0 rgba(5, 5, 5, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.study-row.active {
  background: var(--blue-soft);
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.clear-study-btn {
  width: 100%;
  margin-top: 14px;
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.report-shell {
  background: #f5dce8;
  min-height: 100vh;
  padding: 24px;
}

.report-paper {
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 10px 10px 0 var(--pop-shadow);
  padding: 28px;
}

.report-head {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(5, 5, 5, 0.16);
  padding-bottom: 20px;
}

.report-head > div {
  position: relative;
  z-index: 2;
}

.report-icon {
  position: absolute;
  right: 260px;
  top: 8px;
  z-index: 1;
  width: 104px;
  height: 104px;
  object-fit: contain;
  opacity: 0.76;
  transform: rotate(8deg);
  filter: drop-shadow(5px 6px 0 rgba(5, 5, 5, 0.14));
  pointer-events: none;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--pop-shadow);
  border-radius: 999px;
  background: var(--blue-soft);
  box-shadow: 3px 3px 0 var(--pop-shadow);
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 950;
}

.report-meta-grid {
  min-width: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 4px 4px 0 rgba(5, 5, 5, 0.14);
  padding: 10px 12px;
}

.meta-box span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 950;
}

.meta-box strong {
  margin-top: 3px;
  display: block;
}

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

.report-grid-main {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 20px;
}

.chart-box {
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
  padding: 12px;
}

.stat-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.stat-row {
  display: grid;
  grid-template-columns: 82px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 950;
}

.comment {
  border: 1px solid var(--pop-shadow);
  border-radius: 8px;
  background: var(--pop-yellow);
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
  padding: 16px;
  color: #263142;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 850;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 780px;
  font-size: 13px;
}

th {
  background: var(--blue-soft);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  font-weight: 950;
}

th,
td {
  border-bottom: 1px solid var(--soft-line);
  padding: 11px 12px;
  vertical-align: top;
}

td:first-child {
  font-weight: 950;
}

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

.review-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 5px 5px 0 rgba(5, 5, 5, 0.14);
  padding: 14px;
}

.review-word {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--pop-shadow);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 950;
}

.pill.good {
  background: var(--pop-green);
  color: var(--ink);
}

.pill.warn {
  background: var(--pop-yellow);
  color: var(--ink);
}

.quiz-header > .pill,
.study-row .pill {
  align-self: start;
}

.study-row .pill {
  justify-self: end;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .app-shell,
  .report-shell,
  .home-shell {
    padding: 14px;
  }

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

  .home-growth-card {
    grid-template-columns: 1fr;
  }

  .home-stage {
    min-height: 600px;
    box-shadow: 8px 8px 0 #050505;
  }

  .home-hero-art {
    object-position: 62% center;
    transform: scale(1.08);
  }

  .home-icon-gift {
    right: -12px;
    top: 14px;
    width: 190px;
  }

  .home-icon-flashcards {
    right: 16px;
    top: 176px;
    width: 250px;
  }

  .home-icon-calendar {
    display: none;
  }

  .home-icon-book {
    right: 114px;
    bottom: 18px;
    width: 250px;
  }

  .home-icon-pencil {
    right: -24px;
    bottom: 34px;
    width: 245px;
  }

  .home-icon-star {
    left: 22px;
    top: 18px;
    width: 140px;
  }

  .home-wordmark {
    top: 39%;
    font-size: clamp(88px, 21vw, 170px);
  }

  .home-copy {
    left: 20px;
    bottom: 22px;
  }

  .chip-b {
    right: 24px;
    bottom: 190px;
  }

  .topbar,
  .member-bar,
  .report-head,
  .quiz-header {
    align-items: stretch;
    flex-direction: column;
  }

  .layout,
  .quiz-layout,
  .study-layout,
  .report-grid-main {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .report-grid-4,
  .review-grid,
  .study-status-grid,
  .quest-reward-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-meta-grid {
    min-width: 0;
  }

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

  .topbar-icon {
    right: 14px;
    top: 14px;
    width: 72px;
    height: 72px;
    opacity: 0.16;
  }

  .topbar-icon.test-icon {
    right: 14px;
    top: 18px;
    width: 82px;
    height: 62px;
    opacity: 0.16;
  }

  .report-icon {
    right: 10px;
    top: 10px;
    width: 76px;
    height: 76px;
    opacity: 0.14;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 23px;
  }

  .home-wordmark {
    left: -6px;
    top: 30%;
    font-size: clamp(64px, 20vw, 84px);
  }

  .home-stage {
    min-height: 630px;
    box-shadow: 6px 6px 0 #050505;
  }

  .home-hero-art {
    object-position: 65% center;
    transform: scale(1.22);
  }

  .home-icon-gift {
    right: -28px;
    top: 8px;
    width: 142px;
  }

  .home-icon-flashcards {
    right: -28px;
    top: 168px;
    width: 198px;
    transform: rotate(-5deg);
  }

  .home-icon-calendar {
    right: -76px;
    top: 306px;
    width: 205px;
  }

  .home-icon-book {
    display: none;
  }

  .home-icon-pencil {
    right: -34px;
    bottom: 28px;
    width: 198px;
  }

  .home-icon-star {
    left: 18px;
    top: 18px;
    width: 96px;
  }

  .home-heading {
    padding: 10px 12px;
    font-size: 23px;
  }

  .home-subcopy {
    font-size: 13px;
  }

  .home-actions .btn,
  .home-route-grid .route-card {
    width: 100%;
  }

  .home-kpi-strip,
  .home-route-grid,
  .quest-reward-grid {
    grid-template-columns: 1fr;
  }

  .spelling-box {
    grid-template-columns: 1fr;
  }

  .feedback-box > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .combo-card strong {
    font-size: 44px;
  }

  .home-range-card,
  .home-settings,
  .route-card {
    box-shadow: 5px 5px 0 #050505;
  }

  .route-icon {
    right: -10px;
    top: -14px;
    width: 96px;
    height: 96px;
    opacity: 0.48;
  }

  .home-poster-chip {
    min-width: 82px;
    padding: 9px;
    box-shadow: 4px 4px 0 #050505;
  }

  .home-poster-chip span {
    font-size: 22px;
  }

  .chip-a {
    right: 12px;
    top: 12px;
  }

  .chip-b {
    display: none;
  }

  .segmented.cols-4,
  .segmented.cols-3,
  .segmented.cols-2,
  .range-inputs,
  .kpi-grid,
  .report-grid-4,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .prompt-main {
    font-size: 22px;
  }

  .study-word {
    font-size: 32px;
  }

  .flash-card {
    height: 430px;
  }

  .flash-face {
    padding: 20px;
  }

  .flash-front .study-word {
    font-size: 44px;
  }

  .study-status-grid,
  .study-actions,
  .study-row {
    grid-template-columns: 1fr;
  }

  .study-actions .btn-row {
    justify-content: stretch;
  }

  .study-actions .btn {
    width: 100%;
  }

  .study-row .pill {
    justify-self: start;
  }

  .report-paper {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-card-inner,
  .combo-card.pulse,
  .confetti-burst span {
    transition: none;
    animation: none;
  }
}

@media print {
  body {
    background: white;
  }

  .no-print {
    display: none !important;
  }

  .report-shell {
    padding: 0;
    background: white;
  }

  .report-paper {
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 0;
  }

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

/* 문장 해석 피드백 교정 항목 */
.sentence-corrections {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.sentence-corrections li {
  font-weight: 700;
  color: var(--ink);
}

/* 시작 화면 모드 선택 (단어 / 해석) */
.quick-start-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.quick-start-strip button {
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.quick-start-strip button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pop-shadow);
}

.mode-picker {
  display: grid;
  gap: 24px;
  padding: 8px 0;
}

.mode-picker-head {
  text-align: center;
}

.mode-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .mode-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .mode-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.mode-side-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.mode-card-wide {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 18px 22px;
  gap: 18px;
}
.mode-card-wide > img { width: 56px; height: 56px; flex-shrink: 0; }
.mode-card-wide > div { display: flex; flex-direction: column; gap: 4px; }
.mode-card-wide h2 { margin: 0; }
.mode-card-wide p { margin: 0; font-size: 13px; }
.mode-placement-btn-v2 {
  border: 2px dashed #1d4ed8;
  background: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 14px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .mode-side-actions { grid-template-columns: 1fr; }
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 36px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--pop-shadow);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.mode-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--pop-shadow);
}

.mode-card:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--pop-shadow);
}

.mode-card img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.mode-card h2 {
  font-size: 30px;
  font-weight: 950;
  margin: 4px 0 0;
}

.mode-card p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
  margin: 0;
  font-size: 14px;
}

.mode-card-vocab {
  background: var(--blue-soft);
}

.mode-card-sentence {
  background: var(--pop-yellow);
}

.mode-card-listen {
  background: #d6f5e7;
}

.mode-card-grammar {
  background: #ffd9e3;
}

/* ===== 문법 자료실 ===== */
.grammar-notice {
  background: #fff7d6;
  border: 1px solid #050505;
}

.grammar-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.gx-card .gx-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.gx-card .gx-head .btn {
  flex-shrink: 0;
}

.gx-body {
  font-size: 16px;
  line-height: 1.75;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.gx-hint {
  color: #555;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
}

.gx-blank {
  display: inline-block;
  min-width: 72px;
  color: #1d4ed8;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.gx-choice {
  display: inline-block;
  padding: 0 6px;
  background: #eaf2ff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1d4ed8;
}

.gx-answer {
  background: #d6f5e7;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 900;
  color: #047857;
}

.gx-wrong {
  color: #999;
  text-decoration: line-through;
}

.gx-explanations {
  background: #fff8ec;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
}

.gx-explanations p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
}

.gx-expl-list {
  margin: 8px 0 0;
  padding-left: 22px;
}

.gx-expl-list li {
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 6px;
}

/* ===== 문법 퀴즈 모드 ===== */
.gx-quiz-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: center;
}

.gx-quiz-meter > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gx-quiz-meter strong {
  font-size: 20px;
  font-weight: 950;
}

@media (max-width: 720px) {
  .gx-quiz-meter { grid-template-columns: repeat(2, 1fr); }
}

.gx-quiz-card {
  border-left: 6px solid #1d4ed8;
}

.gx-quiz-header {
  display: flex;
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px dashed #d1d5db;
  padding-bottom: 14px;
}

.gx-quiz-num {
  font-size: 28px;
  font-weight: 950;
  color: #1d4ed8;
  flex-shrink: 0;
}

.gx-quiz-korean {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 700;
  margin: 0;
}

.gx-quiz-verb {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  background: #fff3cd;
  border: 1px solid #050505;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #050505;
}

/* ===== 캐릭터 패널 ===== */
.character-panel { background: linear-gradient(135deg, #fff7d6 0%, #fef3c7 100%); border: 1px solid #050505; }
.character-head { display: flex; gap: 18px; align-items: center; }
.character-emoji { font-size: 56px; line-height: 1; padding: 12px 16px; border-radius: 16px; border: 1px solid #050505; box-shadow: 4px 4px 0 var(--pop-shadow); }
.character-info { flex: 1; min-width: 0; }
.character-title { margin: 4px 0 4px; font-size: 22px; font-weight: 950; }
.character-tier-bar { height: 8px; background: #fff; border: 1px solid #050505; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.character-tier-fill { height: 100%; background: linear-gradient(90deg, #1d4ed8 0%, #f59e0b 100%); transition: width 300ms ease; }
.character-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.character-stat { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 8px; }
.char-stat-label { font-size: 13px; font-weight: 800; }
.char-stat-bar { height: 10px; background: #fff; border: 1px solid #050505; border-radius: 999px; overflow: hidden; }
.char-stat-fill { height: 100%; background: #1d4ed8; transition: width 300ms ease; }
.char-stat-val { font-size: 12px; font-weight: 800; color: var(--muted); text-align: right; }
.char-emoji-mini { display: inline-block; transform: translateY(-1px); margin-right: 2px; }
@media (max-width: 720px) {
  .character-stats { grid-template-columns: 1fr; }
  .character-stat { grid-template-columns: 80px 1fr 70px; }
}

/* ===== 데일리 미션 ===== */
.daily-mission .section-title { display: flex; justify-content: space-between; align-items: center; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mission-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.mission-item.done { background: #d6f5e7; border-color: #047857; }
.mission-label { margin: 0 0 6px; font-size: 13px; font-weight: 800; }
.mission-bar { height: 8px; background: #fff; border: 1px solid #d1d5db; border-radius: 999px; overflow: hidden; }
.mission-fill { height: 100%; background: linear-gradient(90deg, #1d4ed8 0%, #047857 100%); transition: width 250ms ease; }
@media (max-width: 540px) { .mission-grid { grid-template-columns: 1fr; } }

/* ===== 활동 캘린더 ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; }
.cal-cell { aspect-ratio: 1; border-radius: 3px; background: #f3f4f6; border: 1px solid #e5e7eb; }
.cal-cell.active { background: #1d4ed8; border-color: #1d4ed8; }
.cal-cell.today { outline: 2px solid #f59e0b; outline-offset: 1px; }

/* ===== 리더보드 ===== */
.leaderboard-list { display: grid; gap: 6px; }
.leader-row { display: grid; grid-template-columns: 80px 1fr 120px 100px; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; }
.leader-row.me { background: #fef3c7; border-color: #f59e0b; box-shadow: 3px 3px 0 var(--pop-shadow); }
.leader-row-pending { opacity: 0.85; border-style: dashed; }

.xp-mini-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: #fef9c3;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.xp-mini-head strong { font-size: 16px; }

.type-progress-details summary {
  list-style: none;
  outline: none;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.type-progress-details summary::-webkit-details-marker { display: none; }
.type-progress-details summary::before { content: "▸ "; font-size: 11px; }
.type-progress-details[open] summary::before { content: "▾ "; }
.leader-rank { font-size: 18px; font-weight: 950; text-align: center; }
.leader-xp { font-weight: 800; color: #1d4ed8; }
@media (max-width: 540px) {
  .leader-row { grid-template-columns: 50px 1fr 80px; }
  .leader-streak { display: none; }
}

.mode-card-leader { background: #ffe4ec; }

.field-help {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.field-required {
  color: #dc2626;
  font-weight: 900;
  margin-left: 2px;
}

/* ===== 개인정보 페이지 ===== */
.profile-msg {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.profile-msg.success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}
.profile-msg.error {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}
.profile-info-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.profile-info-grid .kpi-label {
  font-size: 12px;
  color: var(--muted);
}
.profile-info-grid strong {
  font-size: 15px;
  color: var(--ink);
}
.profile-form {
  display: grid;
  gap: 12px;
  max-width: 480px;
}
.auth-cloud {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.profile-details {
  max-width: 480px;
}
.profile-details summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
.class-list,
.admin-class-list {
  display: grid;
  gap: 12px;
}
.class-card,
.admin-class-card,
.admin-class-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px;
}
.assignment-list {
  display: grid;
  gap: 8px;
}
.assignment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 13px;
}
.assignment-row > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 900;
}
.admin-assignment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-class-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-class-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.admin-row-muted {
  opacity: 0.74;
}
.profile-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.profile-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-align: left;
}
.profile-kpi .kpi-label {
  font-size: 12px;
  color: var(--muted);
}
.profile-kpi .kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.profile-stat-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.section-mini-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.profile-recent-table th, .profile-recent-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.profile-recent-table th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 680px) {
  .profile-info-grid { grid-template-columns: 1fr; }
  .profile-kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-assignment-grid { grid-template-columns: 1fr; }
}

/* ===== 관리자 대시보드 ===== */
.admin-table {
  display: grid;
  gap: 4px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr 1.2fr 0.8fr 1fr 1.6fr;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-size: 13px;
}

.admin-row-head {
  background: #1d4ed8;
  color: #fff;
  font-weight: 800;
  border-color: #1d4ed8;
}

.admin-row-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-mini {
  padding: 4px 10px;
  font-size: 12px;
}

.admin-danger {
  color: #b91c1c;
  border-color: #b91c1c;
}

.admin-notes {
  padding-left: 18px;
  margin: 8px 0 0;
}

.admin-notes li {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .admin-row {
    grid-template-columns: 1fr 1fr;
    font-size: 12px;
  }
  .admin-row-head { display: none; }
  .admin-row > div::before { content: attr(data-label); display: block; font-weight: 700; color: var(--muted); font-size: 11px; }
}

.member-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.member-bar-vocab {
  font-size: 13px;
  padding: 6px 14px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.member-bar-vocab:hover { background: #fde68a; }

/* ===== 해석 모드 — 클릭 단어 + 힌트 + 내 단어장 ===== */
.sent-clickable {
  line-height: 1.85;
}

.sent-word {
  display: inline;
  padding: 0 1px;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dotted rgba(29, 78, 216, 0.4);
  transition: background 100ms, border-color 100ms, color 100ms;
  border-radius: 3px;
}

.sent-word:hover {
  background: #eaf2ff;
  border-bottom: 1px dashed #1d4ed8;
  color: #1d4ed8;
}

.sent-word:active {
  background: #bfdbfe;
}

.word-hint {
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #fffbeb;
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.word-hint.loading { background: #f3f4f6; }
.word-hint.err { background: #fef2f2; }

.word-hint-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.word-hint-head strong {
  font-size: 22px;
  font-weight: 900;
}

.word-hint-pos {
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

.hint-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  padding: 0 6px;
}

.hint-close:hover { color: #050505; }

.word-hint-meaning {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
}

.user-vocab-list {
  display: grid;
  gap: 10px;
}

.user-vocab-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--pop-shadow);
}

.uvr-main { flex: 1; }

.uvr-head { margin: 0; font-size: 16px; }
.uvr-mean { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: #1f2937; }
.uvr-sent { margin: 6px 0 0; font-style: italic; font-size: 13px; }

.uvr-remove {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
}

@media (max-width: 540px) {
  .user-vocab-row { flex-direction: column; }
  .uvr-remove { width: 100%; }
}

.gx-concept-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.gx-concept-toggle {
  font-size: 13px;
  padding: 4px 12px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.gx-concept-toggle:hover { background: #fde68a; }

.gx-concept-block {
  width: 100%;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 18px;
}

.gx-concept-title {
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 6px;
  color: #92400e;
}

.gx-concept-summary {
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 10px;
  color: #1f2937;
}

.gx-concept-rules {
  margin: 6px 0 10px;
  padding-left: 22px;
}

.gx-concept-rules li {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 4px;
  color: #1f2937;
}

.gx-concept-examples {
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
}

.gx-concept-examples p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #1f2937;
}

.gx-quiz-variants {
  display: grid;
  gap: 14px;
}

.gx-quiz-variant {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.gx-variant-arrow {
  font-size: 20px;
  color: #7c3aed;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1.8;
}

.gx-variant-sentence {
  flex: 1;
  font-size: 17px;
  line-height: 2;
  padding: 8px 4px;
  border-bottom: 2px dotted #d1d5db;
}

@media (max-width: 540px) {
  .gx-quiz-header { flex-direction: column; gap: 6px; }
  .gx-quiz-korean { font-size: 16px; }
  .gx-variant-sentence { font-size: 15px; line-height: 1.9; }
}

.gx-quiz-card.gx-card-correct {
  border-left-color: var(--green);
  background: #f3fdf6;
}

.gx-quiz-card.gx-card-wrong {
  border-left-color: #dc2626;
  background: #fff5f5;
}

.gx-quiz-sentence {
  font-size: 20px;
  line-height: 2.1;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
}

.gx-quiz-input {
  display: inline-block;
  border: none;
  border-bottom: 2px solid #1d4ed8;
  background: #eaf2ff;
  font: inherit;
  font-weight: 800;
  color: #1d4ed8;
  padding: 2px 8px;
  min-width: 100px;
  border-radius: 4px 4px 0 0;
}

.gx-quiz-input:focus {
  outline: none;
  background: #fff;
  border-bottom-color: #050505;
}

.gx-choices {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  vertical-align: middle;
}

.gx-choice-btn {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #1d4ed8;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
}

.gx-choice-btn:hover {
  background: #eaf2ff;
}

.gx-choice-btn.active {
  background: #1d4ed8;
  color: #fff;
}

.gx-choices-fb {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  vertical-align: middle;
}

.gx-fb.ok {
  background: #d6f5e7;
  color: #047857;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 900;
}

.gx-fb.no {
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.gx-fb.no s {
  color: #b91c1c;
  opacity: 0.65;
}

.gx-fb.no b {
  color: #047857;
  background: #d6f5e7;
  padding: 0 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.gx-fb.dim {
  color: #9ca3af;
  padding: 1px 6px;
}

.gx-quiz-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 18px;
}

.gx-quiz-summary.ok { background: #d6f5e7; color: #047857; }
.gx-quiz-summary.no { background: #fee2e2; color: #b91c1c; }

.gx-quiz-summary-icon {
  font-size: 24px;
  line-height: 1;
}

.gx-quiz-fb-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
}

.gx-quiz-fb-row.ok { background: #f3fdf6; border-color: #86efac; }
.gx-quiz-fb-row.no { background: #fff5f5; border-color: #fca5a5; }

.gx-quiz-fb-icon {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 900;
}

.gx-quiz-fb-row.ok .gx-quiz-fb-icon { color: #047857; }
.gx-quiz-fb-row.no .gx-quiz-fb-icon { color: #b91c1c; }

.gx-quiz-fb-text p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.55;
}

/* ===== 문법 영작 — v2 (시험 몰입형) ===== */
.gx-prog-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid #050505;
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--pop-shadow);
  padding: 12px 16px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.gx-prog-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gx-prog-cefr {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 900;
  color: #92400e;
  letter-spacing: 0.02em;
}
.gx-prog-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.gx-prog-center {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gx-prog-gauge {
  flex: 1;
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.gx-prog-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #7c3aed);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.gx-prog-counter {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.gx-prog-right {
  display: flex;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  align-items: center;
}
.gx-prog-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.gx-prog-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gx-prog-stat-val { font-size: 15px; font-weight: 900; }
.gx-prog-stat-val.ok { color: var(--green); }

.gx-card-v2 {
  background: #fff;
  border: 1px solid #050505;
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--pop-shadow);
  padding: 28px 32px;
  margin-top: 20px;
}
.gx-card-v2.gx-card-correct { border-left: 6px solid var(--green); background: linear-gradient(180deg, #f3fdf6 0%, #fff 60%); }
.gx-card-v2.gx-card-partial { border-left: 6px solid #f59e0b; background: linear-gradient(180deg, #fffbeb 0%, #fff 60%); }
.gx-card-v2.gx-card-wrong { border-left: 6px solid #dc2626; background: linear-gradient(180deg, #fff5f5 0%, #fff 60%); }

.gx-kor-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.gx-kor-num {
  font-size: 32px;
  font-weight: 900;
  color: #1d4ed8;
  line-height: 1.1;
  flex-shrink: 0;
}
.gx-kor-stem {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink);
  flex: 1;
  margin: 0;
}
.gx-verb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #f3f4f6;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  align-self: center;
}
.gx-verb-chip::before { content: "힌트"; font-size: 10px; font-weight: 600; color: var(--muted); margin-right: 2px; }

.gx-eng-card {
  margin-top: 22px;
  padding: 24px 28px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.gx-eng-line {
  font-size: 22px;
  line-height: 2.1;
  color: var(--ink);
  font-weight: 500;
}
.gx-eng-line + .gx-eng-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.gx-variant-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.gx-blank-wrap {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
}
.gx-blank-input {
  display: inline-block;
  width: 60px;
  min-width: 60px;
  max-width: 100%;
  border: none;
  border-bottom: 2px solid #1d4ed8;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: #1d4ed8;
  padding: 2px 6px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, width 0.12s ease-out;
}
.gx-blank-input:focus {
  outline: none;
  background: #eef2ff;
  border-bottom: 3px solid #050505;
}
.gx-blank-input:hover { background: #f5f7ff; }
.gx-blank-input[readonly] { cursor: default; }

.gx-result-banner {
  margin: -8px 0 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: gxResultPop 0.25s ease-out;
}
.gx-result-banner.ok { background: #d6f5e7; color: #047857; }
.gx-result-banner.partial { background: #fef3c7; color: #92400e; }
.gx-result-banner.no { background: #fee2e2; color: #b91c1c; }
.gx-result-icon {
  font-size: 24px;
  line-height: 1;
}
@keyframes gxResultPop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.gx-explain-v2 {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fffbea;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.gx-action-row {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.gx-action-row .gx-action-spacer { flex: 1; }
.gx-action-row .btn { min-width: 120px; }

.gx-kbd-hint {
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
.gx-kbd-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: inherit;
  font-size: 10px;
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .gx-prog-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  .gx-prog-right { justify-content: space-between; }
  .gx-card-v2 { padding: 18px 16px; }
  .gx-kor-num { font-size: 24px; }
  .gx-kor-stem { font-size: 20px; line-height: 1.4; }
  .gx-verb-chip { font-size: 13px; padding: 4px 10px; }
  .gx-eng-card { padding: 16px 14px; }
  .gx-eng-line { font-size: 17px; line-height: 2; }
  .gx-action-row { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .gx-action-row .gx-action-spacer { display: none; }
  .gx-action-row .btn { width: 100%; min-width: 0; }
  .gx-kbd-hint { display: none; }
}

/* 단일-문제 카드 (한 문장 = 한 문제) */
.grammar-list {
  display: grid;
  gap: 12px;
}

.gx-problem {
  border-left: 4px solid #1d4ed8;
}

.gx-problem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gx-problem-head .eyebrow {
  margin: 0;
}

.gx-sentence {
  font-size: 17px;
  line-height: 1.85;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
}

.gx-toggle {
  padding: 6px 14px;
  font-size: 13px;
}

.gx-source {
  font-size: 12px;
}

.gx-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.gx-pager-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 540px) {
  .gx-problem-head { flex-direction: column; align-items: flex-start; }
  .gx-toggle { width: 100%; }
  .gx-sentence { font-size: 15px; }
}

/* ===== 듣기 자료실 (외부 링크아웃) ===== */
.listen-notice {
  background: #fff7d6;
  border: 1px solid #050505;
}

.listen-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.listen-list {
  display: grid;
  gap: 10px;
}

.listen-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--pop-shadow);
}

.listen-meta {
  display: grid;
  gap: 4px;
}

.listen-meta strong {
  font-size: 16px;
  font-weight: 900;
}

.listen-meta small {
  font-size: 12px;
}

.listen-actions .btn {
  white-space: nowrap;
}

@media (max-width: 540px) {
  .listen-row {
    grid-template-columns: 1fr;
  }
  .listen-actions {
    justify-self: stretch;
  }
  .listen-actions .btn {
    width: 100%;
  }
}

/* ===== 레벨 배치고사 ===== */
.placement-intro .placement-points {
  margin: 16px 0 4px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #1c1c1c;
}

.placement-intro .placement-points li {
  font-size: 14px;
  line-height: 1.5;
}

.placement-layout {
  max-width: 720px;
  margin: 20px auto 0;
}

.placement-rec {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 18px;
}

.placement-rec strong {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.placement-rec-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pop-yellow);
  border: 1px solid #050505;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cefr-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e0eaff;
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cefr-inline {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 4px;
  background: #1d4ed8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* 품사 칩 — 단어 시험 prompt + feedback 에서 공용 */
.pos-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ecfeff;
  border: 1px solid #06b6d4;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.pos-chip.inferred {
  background: #f5f3ff;
  border-color: #a78bfa;
  border-style: dashed;
  color: #6d28d9;
}

.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f0f9ff;
  color: #0369a1;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 6px;
  transition: transform 0.15s, background 0.15s;
}
.tts-btn:hover { background: #e0f2fe; transform: scale(1.1); }
.tts-btn:active { transform: scale(0.95); }
.tts-btn:focus { outline: 2px solid #0ea5e9; outline-offset: 1px; }
.flash-front .tts-btn, .quest-front .tts-btn { width: 40px; height: 40px; font-size: 18px; }

.mock-exam-timerbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid #050505;
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--pop-shadow);
  padding: 14px 18px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.mock-exam-timer-info { display: flex; flex-direction: column; gap: 2px; }
.mock-timer {
  font-size: 28px;
  font-weight: 950;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}
.mock-timer.warn { color: #dc2626; animation: gxPulse 1s ease-in-out infinite; }
.mock-exam-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.mock-exam-stats span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.mock-exam-stats span.active {
  background: #1d4ed8;
  color: #fff;
}
.mode-card-mock { background: #fef3c7; }

.mock-review-list {
  display: grid;
  gap: 10px;
}

.mock-review-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(118px, 0.45fr) minmax(118px, 0.45fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mock-review-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 950;
}

.mock-review-answer {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  min-width: 0;
}

.mock-review-answer span {
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
}

.mock-review-answer b {
  overflow-wrap: anywhere;
}

.mock-review-answer.bad {
  background: #fff1f2;
}

.mock-review-answer.good {
  background: #ecfdf5;
}

.admin-detail-card {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

@media (max-width: 720px) {
  .mock-exam-timerbar { grid-template-columns: 1fr; gap: 10px; }
  .mock-timer { font-size: 22px; }
  .mock-review-item { grid-template-columns: 1fr; }
  .mock-review-kind { justify-content: flex-start; padding: 8px 10px; }
}

@media (max-width: 540px) {
  .quick-start-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mode-card {
    min-height: 148px;
    padding: 18px 10px;
    gap: 8px;
  }

  .mode-card img {
    width: 58px;
    height: 58px;
  }

  .mode-card h2 {
    font-size: 20px;
    line-height: 1.12;
  }

  .mode-card p {
    font-size: 12px;
    line-height: 1.35;
  }

  .mode-card-wide {
    min-height: auto;
    padding: 14px 16px;
  }
}

.sent-tip-card {
  padding: 12px 14px;
  background: #fef9c3;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sent-tip-card p { margin: 0; font-size: 13px; line-height: 1.6; }

.grammar-celebrate {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #422006;
  border: 1px solid #050505;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 12px;
  animation: gxPulse 1.2s ease-in-out infinite;
}
.grammar-celebrate.good {
  background: linear-gradient(90deg, #86efac, #22c55e);
  color: #064e3b;
}
@keyframes gxPulse {
  0%, 100% { transform: scale(1); box-shadow: 4px 4px 0 var(--pop-shadow); }
  50% { transform: scale(1.05); box-shadow: 6px 6px 0 var(--pop-shadow); }
}

.prompt-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.forms-hint {
  font-size: 12px;
  line-height: 1.7;
}
.forms-hint code {
  display: inline-block;
  padding: 1px 6px;
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-weight: 700;
  color: #1d4ed8;
}

.placement-result-hero {
  text-align: left;
}

.mode-placement-btn {
  margin: 18px auto 0;
  display: block;
  width: fit-content;
}

.lock-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin: 6px 0 10px;
  border: 1px solid #050505;
  border-radius: 8px;
  background: #fff7d6;
  font-size: 13px;
}

.lock-banner .btn {
  padding: 4px 10px;
  font-size: 12px;
  margin-left: auto;
}

.seg-btn.locked,
.seg-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ====== 다크 모드 ====== */
html[data-theme="dark"] {
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --line: #1e293b;
  --soft-line: #334155;
  --paper: #1e293b;
  --bg: #0b1220;
  --blue: #60a5fa;
  --blue-soft: #1e3a8a;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --slate: #cbd5e1;
  --pop-yellow: #78350f;
  --pop-pink: #831843;
  --pop-green: #14532d;
  --pop-shadow: #0f172a;
}
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .home-shell,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .auth-shell {
  background: var(--bg) !important;
  color: var(--ink);
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .character-panel,
html[data-theme="dark"] .character-stat,
html[data-theme="dark"] .daily-mission,
html[data-theme="dark"] .activity-cal,
html[data-theme="dark"] .review-queue,
html[data-theme="dark"] .input,
html[data-theme="dark"] select.input,
html[data-theme="dark"] .mode-card,
html[data-theme="dark"] .flash-card,
html[data-theme="dark"] .quiz-choices button,
html[data-theme="dark"] .choices .choice,
html[data-theme="dark"] .gx-card-v2,
html[data-theme="dark"] .mission-item,
html[data-theme="dark"] .kpi {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--soft-line);
}
html[data-theme="dark"] .subtle { color: var(--muted); }
html[data-theme="dark"] .cal-cell { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .cal-cell.active { background: var(--green); }
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--soft-line);
}
html[data-theme="dark"] .btn { color: #fff; }
html[data-theme="dark"] .member-bar { background: var(--paper); }
html[data-theme="dark"] .pill { background: var(--blue-soft); color: var(--ink); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .home-shell .quick-start-strip button {
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] .settings-drawer { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .settings-pill { background: var(--paper); color: var(--ink); border-color: var(--soft-line); }
html[data-theme="dark"] .settings-pill.on { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 멤버바 / 캐릭터 패널 / 모드 카드 다크 텍스트 보완 */
html[data-theme="dark"] .member-bar,
html[data-theme="dark"] .member-bar strong,
html[data-theme="dark"] .member-bar span,
html[data-theme="dark"] .character-info,
html[data-theme="dark"] .character-info h2,
html[data-theme="dark"] .character-info p,
html[data-theme="dark"] .character-stat,
html[data-theme="dark"] .char-stat-label,
html[data-theme="dark"] .char-stat-val,
html[data-theme="dark"] .home-eyebrow,
html[data-theme="dark"] .home-heading,
html[data-theme="dark"] .home-subcopy,
html[data-theme="dark"] .topbar h1,
html[data-theme="dark"] .topbar .eyebrow,
html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] .mission-label,
html[data-theme="dark"] .kpi span,
html[data-theme="dark"] .kpi strong,
html[data-theme="dark"] .quick-start-strip button,
html[data-theme="dark"] .mode-card,
html[data-theme="dark"] .mode-card h2,
html[data-theme="dark"] .mode-card p,
html[data-theme="dark"] .review-queue,
html[data-theme="dark"] .review-queue h2,
html[data-theme="dark"] .daily-mission h2,
html[data-theme="dark"] .activity-cal h2,
html[data-theme="dark"] .mistake-row,
html[data-theme="dark"] .mistake-word,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-title,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .gx-prog-bar,
html[data-theme="dark"] .gx-kor-stem,
html[data-theme="dark"] .gx-eng-card {
  color: var(--ink);
}
html[data-theme="dark"] .char-stat-bar,
html[data-theme="dark"] .mission-bar,
html[data-theme="dark"] .character-tier-bar,
html[data-theme="dark"] .progress-bar { background: #334155; }
html[data-theme="dark"] .input,
html[data-theme="dark"] textarea.input {
  background: #0f172a;
  color: var(--ink);
  border-color: var(--soft-line);
}
html[data-theme="dark"] .input::placeholder { color: var(--muted); }
html[data-theme="dark"] .pill.good { background: rgba(52,211,153,0.18); color: var(--green); }
html[data-theme="dark"] .pill.warn { background: rgba(251,191,36,0.18); color: var(--amber); }
html[data-theme="dark"] .app-dialog {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 8px 8px 0 #0f172a;
  color: var(--ink);
}
html[data-theme="dark"] .app-dialog-body { color: var(--muted); }
html[data-theme="dark"] .app-dialog .btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--soft-line);
}

/* 멤버바 / 퀵스타트 다크 강제 — 하드코딩된 #050505/#fff 색 덮어쓰기 */
html[data-theme="dark"] .member-bar {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 4px 4px 0 #0f172a !important;
}
html[data-theme="dark"] .member-bar strong { color: #f1f5f9 !important; }
html[data-theme="dark"] .member-bar span { color: #94a3b8 !important; }
html[data-theme="dark"] .quick-start-strip button {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
  box-shadow: 3px 3px 0 #0f172a;
}
html[data-theme="dark"] .character-panel {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 4px 4px 0 #0f172a !important;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel.pad {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 4px 4px 0 #0f172a !important;
}
html[data-theme="dark"] .kpi {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 4px 4px 0 #0f172a !important;
  color: #f1f5f9;
}
html[data-theme="dark"] .kpi strong { color: #f1f5f9; }
html[data-theme="dark"] .mode-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9;
}
html[data-theme="dark"] .auth-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9;
}
html[data-theme="dark"] .topbar {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9;
}
html[data-theme="dark"] .mission-item {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9;
}
html[data-theme="dark"] .character-emoji {
  filter: brightness(0.95);
}

/* ====== 글자 크기 스케일 ====== */
html[data-font-scale="sm"] { font-size: 14px; }
html[data-font-scale="md"] { font-size: 16px; }
html[data-font-scale="lg"] { font-size: 18px; }
html[data-font-scale="xl"] { font-size: 20px; }

/* ====== 설정 드로어 ====== */
.settings-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 5, 5, 0.45);
  z-index: 9000;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.settings-drawer {
  position: fixed; top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  color: var(--ink);
  z-index: 9001;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  display: flex; flex-direction: column;
  animation: slideInRight 0.22s ease;
  border-left: 1px solid var(--soft-line);
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.settings-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--soft-line);
}
.settings-head h2 { margin: 0; font-size: 18px; }
.settings-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 22px; }
.settings-group {}
.settings-label {
  font-size: 13px; font-weight: 800;
  margin: 0 0 8px 0; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.settings-row { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-pill {
  padding: 8px 14px;
  border: 2px solid var(--soft-line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.settings-pill.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.settings-hint { margin-top: 8px; font-size: 13px; }
.settings-shortcuts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.settings-shortcuts kbd {
  display: inline-block; padding: 2px 8px;
  border: 1px solid var(--soft-line); border-bottom-width: 2px;
  border-radius: 6px; background: #f8fafc; font-family: monospace;
  font-size: 13px; margin: 0 2px;
}
html[data-theme="dark"] .settings-shortcuts kbd { background: #0f172a; }
@media (max-width: 640px) {
  .settings-drawer { width: 100vw; }
}

/* ====== 토스트 ====== */
.app-toast {
  position: fixed; top: 20px; left: 50%;
  transform: translate(-50%, -16px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 9500;
  transition: opacity 0.2s ease, transform 0.25s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.celebrate {
  background: linear-gradient(135deg, #fde68a 0%, #fb923c 100%);
  color: #422006;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 12px 36px rgba(251, 146, 60, 0.45);
}

/* ====== 앱 내부 확인 패널 ====== */
.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
}

.app-dialog {
  width: min(460px, 100%);
  padding: 22px;
  border: 2px solid #050505;
  border-radius: 12px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--pop-shadow);
  color: var(--ink);
}

.app-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.app-dialog-body {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.65;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
  border-color: #050505;
}

.app-dialog.danger {
  border-color: #7f1d1d;
}

@media (max-width: 540px) {
  .app-dialog {
    padding: 18px;
  }

  .app-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ====== 복습 큐 / 오답노트 ====== */
.review-queue {
  border-left: 6px solid var(--blue);
}
.review-queue-empty { border-left-color: var(--green); }
.review-queue-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.streak-freeze {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.mb-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
}
html[data-theme="dark"] .mb-badge { background: #7f1d1d; color: #fecaca; }

.mistake-list { display: flex; flex-direction: column; gap: 10px; }
.mistake-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: #fff;
  gap: 16px;
}
html[data-theme="dark"] .mistake-row { background: var(--paper); }
.mistake-main { flex: 1; min-width: 0; }
.mistake-word { margin: 0; font-size: 16px; }
.mistake-mean { margin: 4px 0 0 0; font-size: 14px; }
.mistake-stats {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
  font-size: 13px;
}

@media (max-width: 640px) {
  .review-queue-actions { width: 100%; }
  .review-queue-actions .btn { flex: 1; min-width: 0; }
  .mistake-stats { flex-direction: row; }
}
