/* source style1  */
/* UNI_HSR 폰트 파일은 배포본에 포함하지 않으며, 설치된 경우 이름으로만 사용합니다. */

:root {
  --bg: #f6f3ee;
  --panel: #ffffff;
  --ink: #1e1b18;
  --muted: #6f675f;
  --line: #ded4c8;
  --accent: #2f5f7f;
  --chip: #f0e4d4;
  --shadow: 0 18px 50px rgba(52, 42, 31, 0.14);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff7e8 0, var(--bg) 42%, #efe7dc 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
button, input, select { font: inherit; }
.app { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--line); background: rgba(255,250,243,.94); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 6px 4px 10px; }
.brand h1 { font-size: 19px; margin: 0; letter-spacing: -0.03em; }
.controls { display: flex; flex-direction: column; gap: 8px; }
.search, select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.search { padding: 11px 12px; }
select { padding: 9px 8px; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 8px; cursor: pointer; color: var(--ink); }
.btn:hover { border-color: #b9aa99; background: #fffdf9; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.stats { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; padding: 0 3px; }
.list { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.66); min-height: 0; }
.item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid #eee5dc; cursor: pointer; }
.item:hover { background: #fff8ee; }
.item.active { background: #efe1cf; }
.item-char, .big-char, .rb-value, .slot-value { font-family: "UNI_HSR", "UNI_HSR", "Noto Serif CJK KR", "Source Han Serif K", "Batang", "SimSun", serif; }
.item-char { font-size: 29px; line-height: 1; text-align: center; }
.item-title { min-width: 0; }
.item-huneum { font-weight: 750; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-rad { color: var(--accent); border: 1px solid #cbd9e2; background: #edf6fa; border-radius: 999px; padding: 2px 6px; font-size: 11px; }
.main { padding: 28px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.72); border-radius: 999px; padding: 7px 10px; font-size: 12px; color: var(--muted); }
.card {
  width: min(1120px, 100%); min-height: 610px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-columns: minmax(360px, 41%) minmax(0, 59%);
}
.form-side {
  background: linear-gradient(180deg, #fff8ed 0, #f3eadf 100%); border-right: 1px solid var(--line); padding: 24px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; min-width: 0;
}
.big-char { font-size: clamp(122px, 12.2vw, 190px); line-height: .94; font-weight: 500; color: #080705; text-align: center; }
.radical-box { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #c7dbe5; background: #eef8fc; color: var(--accent); border-radius: 999px; padding: 6px 13px; }
.rb-label { font-size: 11px; color: #5d7482; font-weight: 800; letter-spacing: .08em; }
.rb-value { font-size: 25px; line-height: 1; }
.equipment-board { width: 248px; max-width: 82%; border: 1px solid #d6c8b8; background: rgba(255,255,255,.68); border-radius: 18px; padding: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.equip-title { text-align: center; color: var(--muted); font-size: 9.5px; letter-spacing: .11em; margin-bottom: 5px; }
.equip-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.equip-table td { width: 33.333%; height: 46px; padding: 0; }
.equip-slot { height: 46px; border: 1px dashed #d0c2b2; background: #fbf7f1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9a8f84; overflow: hidden; }
.slot-label { font-size: 8.5px; line-height: 1; white-space: nowrap; color: #8f8377; }
.slot-value { font-size: 19px; line-height: 1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equip-slot.filled { border-style: solid; border-color: #c9b79f; background: #fffaf1; color: #3d342b; }
.equip-slot.center { border-style: solid; border-color: #b7d0bc; background: #eef8f1; color: #166a4f; }
.equip-slot.center .slot-value { font-size: 25px; color: #166a4f; }
.equip-slot.empty .slot-value { font-size: 13px; color: #c0b5aa; }
.meaning-side { padding: 34px 38px; display: flex; flex-direction: column; gap: 17px; min-width: 0; }
.headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.huneum { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.1; font-weight: 850; letter-spacing: -0.05em; }
.meta-pills { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.pill { background: var(--chip); border: 1px solid #dfd0be; border-radius: 999px; padding: 6px 10px; font-size: 12px; color: #574c42; }
.pill.rad { background: #edf6fa; color: var(--accent); border-color: #cbd9e2; }
.section { border: 1px solid var(--line); background: #fffdf9; border-radius: 18px; padding: 15px 16px; }
.section-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .08em; font-weight: 800; }
.structure { display: flex; flex-direction: column; gap: 10px; }
.structure-main { font-family: "UNI_HSR", "Noto Serif CJK KR", "Source Han Serif K", "Batang", "SimSun", serif; font-size: 23px; line-height: 1.45; color: #1f3f55; word-break: keep-all; }
.structure-line { font-size: 18px; line-height: 1.55; word-break: keep-all; color: #3a332d; }
.examples { display: flex; flex-direction: column; gap: 8px; }
.example { display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 1.4; }
.example::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #9d8a75; flex: 0 0 auto; }
.meaning-hidden .meaning-side { filter: blur(11px); user-select: none; }
.empty { max-width: 760px; margin: 80px auto; border: 1px dashed var(--line); border-radius: 24px; background: rgba(255,255,255,.72); padding: 42px; text-align: center; color: var(--muted); }
@media print { body { background: white; } .sidebar, .topbar { display:none!important; } .app { display:block; } .main { padding:0; } .card { box-shadow:none; border-radius:0; width:100%; min-height:100vh; border:0; } }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .list { max-height: 280px; }
  .main { padding: 16px; }
  .topbar { flex-wrap: wrap; }
  .card { grid-template-columns: 1fr; min-height: auto; }
  .form-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .meaning-side { padding: 24px 22px; }
}

/* v15 compact: equipment table is a small 3x3 mini-map under the character */

/* v16 fixed ratio: equipment board is a true small square 3x3 mini-map */
.big-char {
  font-size: clamp(150px, 16vw, 230px) !important;
}

.form-side {
  gap: 8px !important;
  justify-content: center !important;
}

.radical-box {
  padding: 5px 12px !important;
}

.rb-value {
  font-size: 24px !important;
}

.equipment-board {
  width: auto !important;
  max-width: none !important;
  display: inline-block !important;
  padding: 6px !important;
  border-radius: 14px !important;
  flex: 0 0 auto !important;
}

.equip-title {
  display: none !important;
}

.equip-table {
  width: auto !important;
  table-layout: fixed !important;
  margin: 0 auto !important;
  border-collapse: separate !important;
  border-spacing: 3px !important;
}

.equip-table td {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  padding: 0 !important;
}

.equip-slot {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 8px !important;
  gap: 1px !important;
}

.slot-label {
  font-size: 7.5px !important;
  line-height: 1 !important;
}

.slot-value {
  font-size: 15px !important;
  line-height: 1 !important;
}

.equip-slot.center .slot-value {
  font-size: 20px !important;
}

.equip-slot.empty .slot-value {
  font-size: 11px !important;
}

@media (max-width: 980px) {
  .big-char {
    font-size: clamp(130px, 34vw, 190px) !important;
  }
}


/* v17 hard-fixed table: no percentage sizing, no previous equipment CSS dependency */
.form-side { justify-content: center !important; gap: 10px !important; overflow: hidden !important; }
.big-char { font-size: clamp(140px, 14.5vw, 215px) !important; line-height: .9 !important; flex: 0 0 auto !important; }
.radical-box { flex: 0 0 auto !important; }
.card { min-height: 610px !important; }



/* v18 locked typography: keep equipment and reading areas from reflowing */
:root {
  --hanja-font: "UNI_HSR", "Hanyang HaeSeo", "HYhaeseo", "HYhaeseoM", "HY해서", "한양해서", "Noto Serif CJK KR", "Source Han Serif K", "Batang", "SimSun", serif;
}
.item-char, .big-char, .rb-value, .slot-value, .structure-main {
  font-family: var(--hanja-font) !important;
}
.card {
  min-height: 610px !important;
}
.form-side {
  min-height: 610px !important;
}
.headline {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
}
.huneum {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  min-height: 46px !important;
  font-size: clamp(26px, 3.35vw, 44px) !important;
  line-height: 1.05 !important;
}
.meta-pills {
  max-width: 270px !important;
  flex: 0 0 auto !important;
}
.pill {
  white-space: nowrap !important;
}
@media (max-width: 980px) {
  .headline {
    grid-template-columns: 1fr !important;
  }
  .meta-pills {
    max-width: 100% !important;
    justify-content: flex-start !important;
  }
  .huneum {
    font-size: clamp(24px, 7.4vw, 38px) !important;
  }
}


/* v19 override: force all Hanja glyph display areas to use UNI_HSR first. */
.item-char,
.big-char,
.rb-value,
.slot-value,
.structure-main,
.equip-slot .slot-value {
  font-family: "UNI_HSR", "Hanyang HaeSeo", "HYhaeseo", "HYhaeseoM", "HY해서", "한양해서", "Noto Serif CJK KR", "Source Han Serif K", "Batang", "SimSun", serif !important;
}


/* v21: examples Hanja font + structure flow styling */
.example {
  align-items: flex-start !important;
  gap: 9px !important;
}
.example .hanja-inline {
  font-family: var(--hanja-font) !important;
  font-size: 1.08em;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.structure-flow {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.structure-row,
.structure-result {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  min-height: 28px;
}
.structure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7b6753;
  margin-top: 11px;
  justify-self: center;
  opacity: .9;
}
.structure-arrow {
  color: #1f5f45;
  font-weight: 900;
  font-size: 21px;
  line-height: 1.2;
  justify-self: center;
}
.structure-main,
.structure-line,
.structure-meaning {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.structure-main .hanja-inline {
  font-family: var(--hanja-font) !important;
}
.structure-meaning {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f4ec;
  border: 1px solid #bdd7c5;
  color: #174a36;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
}


/* v22: current-card lineage view. Not a full mindmap; only parent/current/direct children. */
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.lineage-panel { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.lineage-group { border: 1px solid #e4d8ca; background: rgba(255,255,255,.56); border-radius: 14px; padding: 10px; }
.lineage-group-title { font-size: 10px; font-weight: 900; color: #76685b; letter-spacing: .12em; margin-bottom: 7px; }
.lineage-node { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 1px solid #e3d6c7; background: #fffaf3; border-radius: 12px; padding: 8px; margin: 6px 0; cursor: pointer; }
.lineage-node:hover { border-color: #b9aa99; background: #fff4e6; }
.lineage-node.current { border-color: #9fbda8; background: #eaf7ef; box-shadow: inset 0 0 0 1px rgba(54,119,81,.12); }
.lineage-node .node-char { font-family: var(--hanja-font); font-size: 25px; line-height: 1; text-align: center; color: #16100b; }
.lineage-node .node-title { min-width: 0; }
.lineage-node .node-huneum { font-size: 12px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineage-node .node-meta { font-size: 10px; color: #786d62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineage-node .node-depth { font-size: 10px; color: #2f5f7f; border: 1px solid #cbd9e2; background: #edf6fa; border-radius: 999px; padding: 2px 5px; white-space: nowrap; }
.lineage-empty { color: #8a7f74; font-size: 12px; padding: 8px 2px; }
.lineage-path { display: flex; flex-direction: column; gap: 4px; }
.lineage-connector { font-size: 13px; color: #9b8e81; text-align: center; line-height: 1; }
.kinship-box { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 8px 12px; align-items: center; }
.kin-label { color: #76685b; font-size: 11px; font-weight: 900; letter-spacing: .09em; }
.kin-chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.kin-chip { border: 1px solid #dfd0be; background: #f7eddf; color: #35291f; border-radius: 999px; padding: 5px 8px; font-size: 12px; cursor: pointer; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kin-chip.current { background: #e8f7ee; border-color: #a7c9b4; font-weight: 900; }
.kin-chip:hover { border-color: #a98d69; background: #fff4e2; }
.kin-arrow { color: #a39587; font-size: 14px; }


/* v23: batch print mode */
.print-tool {
  border: 1px solid #e2d6c8;
  background: rgba(255,255,255,.56);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.print-tool-title {
  font-size: 12px;
  font-weight: 900;
  color: #463b31;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.print-tool-title span {
  font-size: 10px;
  font-weight: 700;
  color: #807469;
}
.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}
.print-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: #74685d;
  font-weight: 800;
}
.print-grid input,
.print-grid select {
  width: 100%;
  padding: 7px 6px;
  border-radius: 9px;
  border: 1px solid #d8cbbd;
  background: #fff;
  color: #1e1b18;
  font-size: 12px;
}
.print-actions {
  grid-template-columns: repeat(3, 1fr);
}
.print-status {
  color: #766b60;
  font-size: 10.5px;
  line-height: 1.35;
  min-height: 15px;
}
.print-area {
  display: none;
}
body.print-preview {
  background: #e9e0d5;
}
body.print-preview .app {
  display: none !important;
}
body.print-preview .print-area {
  display: block;
  padding: 18px;
}
.print-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 210mm;
  margin: 0 auto 12px;
  padding: 10px 12px;
  border: 1px solid #d8cbbd;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(40,32,22,.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.print-preview-title {
  font-size: 13px;
  font-weight: 900;
  color: #322820;
}
.print-preview-buttons {
  display: flex;
  gap: 8px;
}
.print-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 12mm;
  padding: 8mm;
  background: white;
  box-shadow: 0 10px 34px rgba(40,32,22,.18);
  display: grid;
  gap: 5mm;
  break-after: page;
  page-break-after: always;
}
.print-page.per-2 {
  grid-template-rows: 1fr 1fr;
}
.print-page.per-1 {
  grid-template-rows: 1fr;
}
.print-card {
  border: 1px solid #d8cbbd;
  border-radius: 13px;
  background: #fffdf9;
  overflow: hidden;
  display: grid;
  grid-template-columns: 36mm minmax(0, 1fr);
  min-height: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.print-card.empty-card {
  visibility: hidden;
}
.p-left {
  background: linear-gradient(180deg, #fff8ed 0, #f3eadf 100%);
  border-right: 1px solid #e0d4c7;
  padding: 3.8mm 3mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2mm;
  min-width: 0;
}
.p-no {
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  color: #7b6f63;
  font-size: 8.5pt;
  line-height: 1;
  white-space: nowrap;
}
.p-char {
  font-family: var(--hanja-font);
  font-size: 44pt;
  line-height: .9;
  color: #090807;
  text-align: center;
}
.p-rad {
  border: 1px solid #c7dbe5;
  background: #eef8fc;
  color: #2f5f7f;
  border-radius: 999px;
  padding: 2mm 3mm;
  font-size: 8.5pt;
  line-height: 1;
  white-space: nowrap;
}
.p-rad span {
  font-family: var(--hanja-font);
  font-size: 14pt;
  vertical-align: -1px;
}
.p-equip {
  width: 28mm;
  height: 28mm;
  border: 1px solid #d6c8b8;
  background: rgba(255,255,255,.76);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-equip table {
  width: 25mm;
  height: 25mm;
  border-collapse: separate;
  border-spacing: .8mm;
  table-layout: fixed;
}
.p-equip td {
  width: 7.4mm;
  height: 7.4mm;
  border: 1px solid #6f6257;
  border-radius: 4px;
  text-align: center;
  vertical-align: middle;
  background: #75695d;
  color: #51483f;
  overflow: hidden;
  padding: 0;
}
.p-equip td.filled {
  background: #e9d5b5;
  color: #22150b;
  border-color: #8d6b3e;
}
.p-equip td.center {
  background: #cfeadb;
  color: #073d2c;
  border-color: #2f7c5d;
}
.p-equip .p-slot-label {
  display: block;
  font-size: 5.2pt;
  line-height: 1;
  color: #9a8f83;
  white-space: nowrap;
}
.p-equip td.filled .p-slot-label {
  color: #4d3928;
}
.p-equip td.center .p-slot-label {
  color: #285b45;
}
.p-equip .p-slot-value {
  display: block;
  font-family: var(--hanja-font);
  font-size: 9.5pt;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: 7mm;
  margin: 0 auto;
}
.p-equip td.center .p-slot-value {
  font-size: 11pt;
  font-weight: 900;
}
.p-right {
  padding: 4mm 4.5mm;
  display: flex;
  flex-direction: column;
  gap: 2.3mm;
  min-width: 0;
  overflow: hidden;
}
.p-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 3mm;
  align-items: start;
  border-bottom: 1px solid #e3d8cc;
  padding-bottom: 2mm;
}
.p-huneum {
  font-size: 17pt;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2mm;
  justify-content: flex-end;
  max-width: 42mm;
}
.p-pill {
  border: 1px solid #dfd0be;
  background: #f0e4d4;
  border-radius: 999px;
  padding: 1.1mm 1.8mm;
  font-size: 7.5pt;
  line-height: 1;
  color: #574c42;
  white-space: nowrap;
}
.p-pill.rad {
  background: #edf6fa;
  color: #2f5f7f;
  border-color: #cbd9e2;
}
.p-lineage {
  border: 1px solid #e3d7c9;
  background: #fffaf2;
  border-radius: 8px;
  padding: 1.8mm 2.2mm;
  font-size: 8.7pt;
  color: #52473d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-lineage .hanja-inline,
.p-ex .hanja-inline,
.p-struct .hanja-inline {
  font-family: var(--hanja-font);
  font-weight: 650;
}
.p-section-title {
  font-size: 8pt;
  color: #76685b;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 1mm;
}
.p-struct,
.p-examples {
  border: 1px solid #e5dace;
  background: white;
  border-radius: 9px;
  padding: 2mm 2.4mm;
}
.p-struct {
  display: flex;
  flex-direction: column;
  gap: 1mm;
}
.p-struct-row,
.p-struct-result {
  display: grid;
  grid-template-columns: 4mm minmax(0,1fr);
  gap: 1.5mm;
  align-items: start;
}
.p-dot {
  width: 1.6mm;
  height: 1.6mm;
  border-radius: 50%;
  background: #7b6753;
  margin-top: 2mm;
  justify-self: center;
}
.p-arrow {
  color: #1f5f45;
  font-weight: 900;
  font-size: 11pt;
  line-height: 1;
  justify-self: center;
}
.p-main {
  font-family: var(--hanja-font);
  color: #1f3f55;
  font-size: 11pt;
  line-height: 1.28;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.p-line {
  font-size: 9.8pt;
  line-height: 1.32;
  color: #332b25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.p-meaning {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #bdd7c5;
  background: #e8f4ec;
  color: #174a36;
  border-radius: 999px;
  padding: .7mm 2.2mm;
  font-size: 9.5pt;
  line-height: 1.15;
  font-weight: 850;
}
.p-examples {
  display: flex;
  flex-direction: column;
  gap: 1mm;
  overflow: hidden;
}
.p-ex {
  font-size: 9.5pt;
  line-height: 1.28;
  color: #2f2822;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-ex::before {
  content: "• ";
  color: #8d7b68;
}
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }
  html,
  body {
    background: white !important;
  }
  .app,
  .sidebar,
  .topbar,
  .print-preview-toolbar {
    display: none !important;
  }
  .print-area {
    display: block !important;
    padding: 0 !important;
    background: white !important;
  }
  .print-page {
    width: auto !important;
    height: calc(297mm - 16mm) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }
  .print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  .print-card {
    box-shadow: none !important;
  }
}


/* v24: 4 cards per A4 page compact print mode */
.print-page.per-4 {
  grid-template-rows: repeat(4, 1fr);
  gap: 3mm;
}

.print-page.per-4 .print-card {
  grid-template-columns: 27mm minmax(0, 1fr);
  border-radius: 9px;
}

.print-page.per-4 .p-left {
  padding: 2.2mm 2mm;
  gap: 1.2mm;
}

.print-page.per-4 .p-no {
  font-size: 7pt;
}

.print-page.per-4 .p-char {
  font-size: 30pt;
}

.print-page.per-4 .p-rad {
  padding: 1.2mm 2mm;
  font-size: 7pt;
}

.print-page.per-4 .p-rad span {
  font-size: 10.5pt;
}

.print-page.per-4 .p-equip {
  width: 21mm;
  height: 21mm;
  border-radius: 6px;
}

.print-page.per-4 .p-equip table {
  width: 18.5mm;
  height: 18.5mm;
  border-spacing: .55mm;
}

.print-page.per-4 .p-equip td {
  width: 5.5mm;
  height: 5.5mm;
  border-radius: 3px;
}

.print-page.per-4 .p-equip .p-slot-label {
  font-size: 4.2pt;
}

.print-page.per-4 .p-equip .p-slot-value {
  font-size: 7pt !important;
  max-width: 5.2mm;
}

.print-page.per-4 .p-equip td.center .p-slot-value {
  font-size: 8.5pt !important;
}

.print-page.per-4 .p-right {
  padding: 2.4mm 3mm;
  gap: 1.2mm;
}

.print-page.per-4 .p-head {
  padding-bottom: 1.2mm;
  gap: 2mm;
}

.print-page.per-4 .p-huneum {
  font-size: 13pt;
  line-height: 1.05;
}

.print-page.per-4 .p-pills {
  max-width: 36mm;
  gap: .8mm;
}

.print-page.per-4 .p-pill {
  font-size: 6.2pt;
  padding: .7mm 1.2mm;
}

.print-page.per-4 .p-lineage {
  font-size: 7pt;
  padding: 1mm 1.4mm;
  border-radius: 6px;
}

.print-page.per-4 .p-struct,
.print-page.per-4 .p-examples {
  padding: 1.2mm 1.6mm;
  border-radius: 6px;
}

.print-page.per-4 .p-section-title {
  font-size: 6.7pt;
  margin-bottom: .5mm;
}

.print-page.per-4 .p-struct {
  gap: .5mm;
}

.print-page.per-4 .p-struct-row,
.print-page.per-4 .p-struct-result {
  grid-template-columns: 3mm minmax(0,1fr);
  gap: .9mm;
}

.print-page.per-4 .p-dot {
  width: 1.1mm;
  height: 1.1mm;
  margin-top: 1.45mm;
}

.print-page.per-4 .p-arrow {
  font-size: 8.5pt;
}

.print-page.per-4 .p-main {
  font-size: 8.6pt;
  line-height: 1.18;
}

.print-page.per-4 .p-line {
  font-size: 8pt;
  line-height: 1.2;
}

.print-page.per-4 .p-meaning {
  font-size: 7.8pt;
  padding: .4mm 1.5mm;
}

.print-page.per-4 .p-examples {
  gap: .4mm;
}

.print-page.per-4 .p-ex {
  font-size: 7.7pt;
  line-height: 1.18;
}

/* In 4-up mode, keep only the first two examples to avoid overflow. */
.print-page.per-4 .p-ex:nth-of-type(n+4) {
  display: none;
}


/* v25: print title line shows Hanja next to huneum */
.p-huneum {
  display: flex;
  align-items: baseline;
  gap: 2.2mm;
}
.p-title-char {
  font-family: var(--hanja-font);
  font-size: 1.08em;
  line-height: 1;
  color: #0c0907;
  flex: 0 0 auto;
}
.p-left-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1mm;
  max-width: 100%;
}
.p-left-tags span {
  border: 1px solid #dfd0be;
  background: #f0e4d4;
  color: #574c42;
  border-radius: 999px;
  padding: .85mm 1.5mm;
  font-size: 7pt;
  line-height: 1;
  white-space: nowrap;
}

/* v25: 8 cards per A4 page, 2 columns x 4 rows. Lineage hidden for density. */
.print-page.per-8 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 2.4mm;
}

.print-page.per-8 .print-card {
  grid-template-columns: 21mm minmax(0, 1fr);
  border-radius: 7px;
}

.print-page.per-8 .p-left {
  padding: 1.5mm 1.1mm;
  gap: .75mm;
}

.print-page.per-8 .p-no {
  font-size: 5.7pt;
}

.print-page.per-8 .p-char {
  font-size: 23pt;
}

.print-page.per-8 .p-rad {
  padding: .75mm 1.1mm;
  font-size: 5.8pt;
}

.print-page.per-8 .p-rad span {
  font-size: 8.4pt;
}

.print-page.per-8 .p-left-tags {
  gap: .5mm;
}

.print-page.per-8 .p-left-tags span {
  font-size: 5pt;
  padding: .45mm .85mm;
  max-width: 18mm;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-page.per-8 .p-equip {
  width: 16mm;
  height: 16mm;
  border-radius: 4.5px;
}

.print-page.per-8 .p-equip table {
  width: 14mm;
  height: 14mm;
  border-spacing: .35mm;
}

.print-page.per-8 .p-equip td {
  width: 4.15mm;
  height: 4.15mm;
  border-radius: 2.3px;
}

.print-page.per-8 .p-equip .p-slot-label {
  display: none;
}

.print-page.per-8 .p-equip .p-slot-value {
  font-size: 5.8pt !important;
  max-width: 4mm;
}

.print-page.per-8 .p-equip td.center .p-slot-value {
  font-size: 7.2pt !important;
}

.print-page.per-8 .p-right {
  padding: 1.6mm 2mm;
  gap: .85mm;
}

.print-page.per-8 .p-head {
  grid-template-columns: 1fr;
  padding-bottom: .7mm;
  gap: 0;
}

.print-page.per-8 .p-huneum {
  font-size: 10pt;
  line-height: 1;
  gap: 1.1mm;
  white-space: nowrap;
}

.print-page.per-8 .p-title-char {
  font-size: 12pt;
}

.print-page.per-8 .p-pills,
.print-page.per-8 .p-lineage {
  display: none !important;
}

.print-page.per-8 .p-struct,
.print-page.per-8 .p-examples {
  padding: .9mm 1.1mm;
  border-radius: 5px;
}

.print-page.per-8 .p-section-title {
  font-size: 5.8pt;
  margin-bottom: .35mm;
}

.print-page.per-8 .p-struct {
  gap: .25mm;
}

.print-page.per-8 .p-struct-row,
.print-page.per-8 .p-struct-result {
  grid-template-columns: 2.2mm minmax(0,1fr);
  gap: .5mm;
}

.print-page.per-8 .p-dot {
  width: .8mm;
  height: .8mm;
  margin-top: 1.05mm;
}

.print-page.per-8 .p-arrow {
  font-size: 6.8pt;
}

.print-page.per-8 .p-main {
  font-size: 6.9pt;
  line-height: 1.12;
}

.print-page.per-8 .p-line {
  font-size: 6.45pt;
  line-height: 1.12;
}

.print-page.per-8 .p-meaning {
  font-size: 6.3pt;
  padding: .25mm .9mm;
}

.print-page.per-8 .p-examples {
  gap: .25mm;
}

.print-page.per-8 .p-ex {
  font-size: 6.35pt;
  line-height: 1.12;
}

/* In 8-up mode, show up to two examples only. */
.print-page.per-8 .p-ex:nth-of-type(n+4) {
  display: none;
}


/* v26: print card mode correction
   - Do NOT duplicate Hanja in the right title.
   - Align the left big Hanja with the right huneum/title line.
   - 10 cards per A4 page = 2 columns x 5 rows. */
.print-page.per-10 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, 1fr);
  gap: 1.8mm;
}

.print-page.per-10 .print-card {
  grid-template-columns: 20mm minmax(0, 1fr);
  border-radius: 6px;
  min-height: 0;
}

.print-page.per-10 .p-left {
  padding: 1.05mm .9mm;
  gap: .45mm;
  justify-content: flex-start;
  align-items: center;
}

.print-page.per-10 .p-no {
  font-size: 5.2pt;
  line-height: 1;
  margin-bottom: .2mm;
}

.print-page.per-10 .p-char {
  font-size: 22pt;
  line-height: .86;
  margin-top: 0;
  margin-bottom: .35mm;
}

.print-page.per-10 .p-rad {
  padding: .45mm .9mm;
  font-size: 5.2pt;
  line-height: 1;
}

.print-page.per-10 .p-rad span {
  font-size: 7.6pt;
}

.print-page.per-10 .p-left-tags {
  gap: .4mm;
  max-height: 7mm;
  overflow: hidden;
}

.print-page.per-10 .p-left-tags span {
  font-size: 4.7pt;
  padding: .35mm .65mm;
  max-width: 18mm;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-page.per-10 .p-equip {
  width: 15mm;
  height: 15mm;
  border-radius: 4px;
  margin-top: .25mm;
}

.print-page.per-10 .p-equip table {
  width: 13.1mm;
  height: 13.1mm;
  border-spacing: .3mm;
}

.print-page.per-10 .p-equip td {
  width: 3.9mm;
  height: 3.9mm;
  border-radius: 2px;
}

.print-page.per-10 .p-equip .p-slot-label {
  display: none;
}

.print-page.per-10 .p-equip .p-slot-value {
  font-size: 5.45pt !important;
  max-width: 3.8mm;
}

.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 6.8pt !important;
}

.print-page.per-10 .p-right {
  padding: 1.15mm 1.55mm;
  gap: .55mm;
  overflow: hidden;
}

.print-page.per-10 .p-head {
  grid-template-columns: 1fr;
  border-bottom: 1px solid #e3d8cc;
  padding-bottom: .45mm;
}

.print-page.per-10 .p-huneum {
  display: block;
  font-size: 9.2pt;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-page.per-10 .p-title-char,
.print-page.per-10 .p-pills,
.print-page.per-10 .p-lineage {
  display: none !important;
}

.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding: .65mm .85mm;
  border-radius: 4.5px;
}

.print-page.per-10 .p-section-title {
  font-size: 5.2pt;
  margin-bottom: .18mm;
  line-height: 1;
}

.print-page.per-10 .p-struct {
  gap: .12mm;
}

.print-page.per-10 .p-struct-row,
.print-page.per-10 .p-struct-result {
  grid-template-columns: 1.8mm minmax(0,1fr);
  gap: .35mm;
}

.print-page.per-10 .p-dot {
  width: .65mm;
  height: .65mm;
  margin-top: .85mm;
}

.print-page.per-10 .p-arrow {
  font-size: 6.2pt;
  line-height: 1;
}

.print-page.per-10 .p-main {
  font-size: 6.2pt;
  line-height: 1.05;
}

.print-page.per-10 .p-line {
  font-size: 5.85pt;
  line-height: 1.05;
}

.print-page.per-10 .p-meaning {
  font-size: 5.8pt;
  padding: .18mm .7mm;
  line-height: 1.05;
}

.print-page.per-10 .p-examples {
  gap: .1mm;
}

.print-page.per-10 .p-ex {
  font-size: 5.75pt;
  line-height: 1.05;
}

/* In 10-up mode, show up to two examples only. */
.print-page.per-10 .p-ex:nth-of-type(n+4) {
  display: none;
}

/* For 8-up too, remove duplicated right-title Hanja created in v25. */
.print-page.per-8 .p-title-char {
  display: none !important;
}

.print-page.per-8 .p-huneum {
  display: block;
}

/* In compact print modes, pull the big Hanja upward so it aligns visually with the huneum title line. */
.print-page.per-8 .p-left,
.print-page.per-10 .p-left {
  justify-content: flex-start;
}


/* v27: lineage chunk printing */
.print-grid-v27 {
  grid-template-columns: repeat(4, 1fr);
}

/* 10-up reading order: left column 1~5, right column 6~10 */
.print-page.per-10 {
  grid-auto-flow: column;
  position: relative;
  column-gap: 2.2mm;
  row-gap: 1.8mm;
}

/* central divider for 10-up cards */
.print-page.per-10::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: .35mm solid #e3d6c9;
  transform: translateX(-50%);
  pointer-events: none;
}

/* depth/color hierarchy: seed = stronger border, independent = softer same family color */
.print-card {
  position: relative;
}

.print-card.p-depth-1 { border-color: #d44848; }
.print-card.p-depth-2 { border-color: #2f74c0; }
.print-card.p-depth-3 { border-color: #2f9362; }
.print-card.p-depth-4 { border-color: #db8a2e; }
.print-card.p-depth-5 { border-color: #8053bd; }

.print-card.p-seed {
  border-width: 2px;
  box-shadow: inset 0 0 0 .35mm rgba(255,255,255,.8);
}

.print-card.p-independent {
  border-width: 1.1px;
}

.print-card.p-depth-1.p-independent { border-color: #e08585; }
.print-card.p-depth-2.p-independent { border-color: #84aad5; }
.print-card.p-depth-3.p-independent { border-color: #82bea1; }
.print-card.p-depth-4.p-independent { border-color: #e6b176; }
.print-card.p-depth-5.p-independent { border-color: #b49ad5; }

.p-group-label {
  position: absolute;
  top: .75mm;
  right: 1.15mm;
  z-index: 2;
  max-width: 32mm;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #d2c2ad;
  background: rgba(255,248,238,.95);
  color: #6b5845;
  border-radius: 999px;
  padding: .35mm 1.15mm;
  font-size: 5.6pt;
  line-height: 1;
  font-weight: 800;
}

.print-page.per-10 .p-group-label {
  font-size: 4.8pt;
  max-width: 24mm;
  padding: .25mm .9mm;
}

/* When lineage chunking intentionally leaves blank slots, keep blanks invisible but occupying layout. */
.lineage-print-page .empty-card {
  visibility: hidden;
}


/* v28: family map page + 12 cards per page */
.print-grid-v28 {
  grid-template-columns: repeat(5, 1fr);
}

/* 12-up reading order: left column 1~6, right column 7~12 */
.print-page.per-12 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(6, 1fr);
  grid-auto-flow: column;
  position: relative;
  column-gap: 2mm;
  row-gap: 1.45mm;
}

.print-page.per-12::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: .3mm solid #e3d6c9;
  transform: translateX(-50%);
  pointer-events: none;
}

.print-page.per-12 .print-card {
  grid-template-columns: 18mm minmax(0, 1fr);
  border-radius: 5.5px;
  min-height: 0;
}

.print-page.per-12 .p-left {
  padding: .82mm .72mm;
  gap: .32mm;
  justify-content: flex-start;
  align-items: center;
}

.print-page.per-12 .p-no {
  font-size: 4.8pt;
  line-height: 1;
  margin-bottom: .12mm;
}

.print-page.per-12 .p-char {
  font-size: 20pt;
  line-height: .84;
  margin-bottom: .2mm;
}

.print-page.per-12 .p-rad {
  padding: .35mm .75mm;
  font-size: 4.8pt;
  line-height: 1;
}

.print-page.per-12 .p-rad span {
  font-size: 7.1pt;
}

.print-page.per-12 .p-left-tags {
  gap: .3mm;
  max-height: 6mm;
  overflow: hidden;
}

.print-page.per-12 .p-left-tags span {
  font-size: 4.25pt;
  padding: .28mm .55mm;
  max-width: 16mm;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-page.per-12 .p-equip {
  width: 13.5mm;
  height: 13.5mm;
  border-radius: 3.8px;
  margin-top: .16mm;
}

.print-page.per-12 .p-equip table {
  width: 11.8mm;
  height: 11.8mm;
  border-spacing: .25mm;
}

.print-page.per-12 .p-equip td {
  width: 3.5mm;
  height: 3.5mm;
  border-radius: 1.8px;
}

.print-page.per-12 .p-equip .p-slot-label {
  display: none;
}

.print-page.per-12 .p-equip .p-slot-value {
  font-size: 5.05pt !important;
  max-width: 3.4mm;
}

.print-page.per-12 .p-equip td.center .p-slot-value {
  font-size: 6.25pt !important;
}

.print-page.per-12 .p-right {
  padding: .92mm 1.28mm;
  gap: .42mm;
  overflow: hidden;
}

.print-page.per-12 .p-head {
  grid-template-columns: 1fr;
  border-bottom: 1px solid #e3d8cc;
  padding-bottom: .35mm;
}

.print-page.per-12 .p-huneum {
  display: block;
  font-size: 8.4pt;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-page.per-12 .p-title-char,
.print-page.per-12 .p-pills,
.print-page.per-12 .p-lineage {
  display: none !important;
}

.print-page.per-12 .p-struct,
.print-page.per-12 .p-examples {
  padding: .52mm .72mm;
  border-radius: 4px;
}

.print-page.per-12 .p-section-title {
  font-size: 4.8pt;
  margin-bottom: .12mm;
  line-height: 1;
}

.print-page.per-12 .p-struct {
  gap: .08mm;
}

.print-page.per-12 .p-struct-row,
.print-page.per-12 .p-struct-result {
  grid-template-columns: 1.55mm minmax(0,1fr);
  gap: .28mm;
}

.print-page.per-12 .p-dot {
  width: .55mm;
  height: .55mm;
  margin-top: .75mm;
}

.print-page.per-12 .p-arrow {
  font-size: 5.7pt;
  line-height: 1;
}

.print-page.per-12 .p-main {
  font-size: 5.75pt;
  line-height: 1.04;
}

.print-page.per-12 .p-line {
  font-size: 5.38pt;
  line-height: 1.04;
}

.print-page.per-12 .p-meaning {
  font-size: 5.35pt;
  padding: .14mm .62mm;
  line-height: 1.05;
}

.print-page.per-12 .p-examples {
  gap: .06mm;
}

.print-page.per-12 .p-ex {
  font-size: 5.28pt;
  line-height: 1.04;
}

/* In 12-up mode, show up to two examples only. */
.print-page.per-12 .p-ex:nth-of-type(n+4) {
  display: none;
}

/* Map page */
.print-map-page {
  display: block !important;
  position: relative;
  padding: 9mm !important;
  overflow: hidden;
}

.print-map-page::before {
  display: none !important;
}

.map-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10mm;
  border-bottom: 1.2px solid #d8cbbd;
  padding-bottom: 4mm;
  margin-bottom: 3mm;
}

.map-kicker {
  color: #806d59;
  font-size: 9pt;
  font-weight: 900;
  letter-spacing: .08em;
}

.map-page-head h1 {
  margin: 1mm 0 0;
  font-family: var(--hanja-font);
  font-size: 25pt;
  line-height: 1;
  color: #1a120c;
}

.map-summary {
  color: #66594e;
  font-size: 8.2pt;
  white-space: nowrap;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 2mm;
  color: #594e45;
  font-size: 7.4pt;
  margin-bottom: 2.5mm;
}

.legend-box {
  display: inline-block;
  width: 4mm;
  height: 2.8mm;
  border-radius: 2px;
  border: 1.5px solid #999;
  background: white;
  vertical-align: middle;
}

.legend-box.depth-1 { border-color: #d44848; }
.legend-box.depth-2 { border-color: #2f74c0; }
.legend-box.depth-3 { border-color: #2f9362; }
.legend-box.depth-4 { border-color: #db8a2e; }
.legend-box.depth-5 { border-color: #8053bd; }

.legend-note {
  margin-left: auto;
  color: #806d59;
  font-weight: 700;
}

.map-picked {
  border: 1px solid #e1d5c8;
  background: #fffaf2;
  border-radius: 8px;
  padding: 2mm;
  margin-bottom: 3mm;
  display: flex;
  flex-wrap: wrap;
  gap: 1mm;
  align-items: center;
}

.map-pick,
.map-more {
  font-family: var(--hanja-font);
  border: 1px solid #d5c8b8;
  background: white;
  border-radius: 999px;
  padding: .55mm 1.25mm;
  font-size: 10pt;
  line-height: 1;
}

.map-more {
  font-family: system-ui, sans-serif;
  color: #6b5845;
  font-weight: 800;
}

.map-forest {
  column-count: 2;
  column-gap: 8mm;
  column-rule: 1px solid #eadfd4;
  font-size: 8.2pt;
}

.map-root-block {
  break-inside: avoid;
  margin: 0 0 3mm;
}

.map-root-block > .map-node {
  margin-top: 0;
}

.map-node,
.map-node ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-node ul {
  margin-left: 4.2mm;
  padding-left: 2.6mm;
  border-left: 1px solid #d6c8bb;
}

.map-node-line {
  display: flex;
  align-items: center;
  gap: 1.1mm;
  margin: .75mm 0;
  padding: .55mm 1mm;
  border-radius: 7px;
  border: 1px solid #d9cab9;
  background: white;
  break-inside: avoid;
}

.map-node.p-seed > .map-node-line {
  border-width: 1.7px;
  font-weight: 900;
}

.map-node.p-depth-1 > .map-node-line { border-color: #d44848; }
.map-node.p-depth-2 > .map-node-line { border-color: #2f74c0; }
.map-node.p-depth-3 > .map-node-line { border-color: #2f9362; }
.map-node.p-depth-4 > .map-node-line { border-color: #db8a2e; }
.map-node.p-depth-5 > .map-node-line { border-color: #8053bd; }

.map-node.p-independent.p-depth-1 > .map-node-line { border-color: #e08585; }
.map-node.p-independent.p-depth-2 > .map-node-line { border-color: #84aad5; }
.map-node.p-independent.p-depth-3 > .map-node-line { border-color: #82bea1; }
.map-node.p-independent.p-depth-4 > .map-node-line { border-color: #e6b176; }
.map-node.p-independent.p-depth-5 > .map-node-line { border-color: #b49ad5; }

.map-node.context-only > .map-node-line {
  opacity: .55;
  background: #f8f3ed;
  border-style: dashed;
}

.map-char {
  font-family: var(--hanja-font);
  font-size: 13pt;
  line-height: .95;
  min-width: 5mm;
  text-align: center;
  color: #0d0906;
}

.map-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-class {
  color: #77695d;
  font-size: 6.3pt;
  white-space: nowrap;
  border: 1px solid #e2d6ca;
  background: #fbf5ee;
  border-radius: 999px;
  padding: .35mm .9mm;
}

.map-empty {
  color: #77695d;
  font-size: 10pt;
}

@media print {
  .print-map-page {
    width: auto !important;
    height: calc(297mm - 16mm) !important;
    min-height: 0 !important;
    padding: 8mm !important;
  }
}


/* v29: root-family printing and clearer seed/background hierarchy */
.print-grid-v29 {
  grid-template-columns: repeat(3, 1fr);
}
.print-grid-v29 label:first-child,
.print-grid-v29 label:nth-child(2) {
  grid-column: span 1;
}
.print-grid-v29 input[type="text"] {
  width: 100%;
  padding: 7px 6px;
  border-radius: 9px;
  border: 1px solid #d8cbbd;
  background: #fff;
  color: #1e1b18;
  font-size: 12px;
  font-family: var(--hanja-font);
}

/* Seed cards use a visible background color. Independent cards keep white background with only colored border. */
.print-card.p-seed.p-depth-1 .p-left,
.print-card.p-seed.p-depth-1 .p-right { background: #fff0f0 !important; }
.print-card.p-seed.p-depth-2 .p-left,
.print-card.p-seed.p-depth-2 .p-right { background: #eef6ff !important; }
.print-card.p-seed.p-depth-3 .p-left,
.print-card.p-seed.p-depth-3 .p-right { background: #eefaf3 !important; }
.print-card.p-seed.p-depth-4 .p-left,
.print-card.p-seed.p-depth-4 .p-right { background: #fff4e7 !important; }
.print-card.p-seed.p-depth-5 .p-left,
.print-card.p-seed.p-depth-5 .p-right { background: #f5efff !important; }

.print-card.p-seed .p-struct,
.print-card.p-seed .p-examples {
  background: rgba(255,255,255,.72) !important;
}

.print-card.p-seed.p-depth-1 { border-color: #c92929 !important; }
.print-card.p-seed.p-depth-2 { border-color: #146ac2 !important; }
.print-card.p-seed.p-depth-3 { border-color: #16834f !important; }
.print-card.p-seed.p-depth-4 { border-color: #cc7414 !important; }
.print-card.p-seed.p-depth-5 { border-color: #7044b3 !important; }

.print-card.p-independent {
  background: #fffdf9 !important;
}

/* Map page simplified: no picked chips, no bulky top summary. */
.simple-map-page {
  padding: 7mm !important;
}

.simple-map-head {
  margin-bottom: 2.6mm !important;
  padding-bottom: 2.8mm !important;
  align-items: flex-start !important;
}

.simple-map-head h1 {
  font-size: 21pt !important;
  margin-top: .8mm !important;
}

.simple-map-forest {
  column-count: 2;
  column-gap: 7mm;
  column-rule: 1px solid #eadfd4;
  font-size: 7.6pt;
  max-height: 252mm;
  overflow: hidden;
}

.map-node-line {
  padding: .45mm .8mm !important;
  margin: .55mm 0 !important;
  gap: .9mm !important;
}

.map-node ul {
  margin-left: 3.5mm !important;
  padding-left: 2.1mm !important;
}

.map-char {
  font-size: 12pt !important;
  min-width: 4.6mm !important;
}

.map-class {
  font-size: 5.7pt !important;
  padding: .28mm .7mm !important;
}

/* Seed nodes on the map are filled, not just outlined. */
.map-node.p-seed.p-depth-1 > .map-node-line { background: #fff0f0 !important; border-color: #c92929 !important; }
.map-node.p-seed.p-depth-2 > .map-node-line { background: #eef6ff !important; border-color: #146ac2 !important; }
.map-node.p-seed.p-depth-3 > .map-node-line { background: #eefaf3 !important; border-color: #16834f !important; }
.map-node.p-seed.p-depth-4 > .map-node-line { background: #fff4e7 !important; border-color: #cc7414 !important; }
.map-node.p-seed.p-depth-5 > .map-node-line { background: #f5efff !important; border-color: #7044b3 !important; }

.map-node.p-independent > .map-node-line {
  background: #fff !important;
}

.map-footer-legend {
  position: absolute;
  left: 7mm;
  right: 7mm;
  bottom: 5.5mm;
  border-top: 1px solid #e4d8cc;
  padding-top: 1.4mm;
  display: flex;
  align-items: center;
  gap: 2.2mm;
  color: #6d5f53;
  font-size: 6.8pt;
  background: rgba(255,255,255,.9);
}
.seed-sample,
.ind-sample {
  display: inline-block;
  width: 5mm;
  height: 3mm;
  border-radius: 3px;
  border: 1.4px solid #146ac2;
}
.seed-sample {
  background: #eef6ff;
}
.ind-sample {
  background: white;
  border-color: #84aad5;
}

/* Column-aware blank slots remain invisible but keep column starts clean. */
.column-aware-page .empty-card {
  visibility: hidden;
}


/* v32: 10-up fixed, more compact cards, neutral base color, title tags moved right */
.print-grid-v29 {
  grid-template-columns: repeat(3, 1fr);
}

/* Remove beige dominance from normal cards. */
.print-card {
  background: #ffffff !important;
}

.print-card .p-left,
.print-card .p-right {
  background: #ffffff !important;
}

.print-card.p-independent .p-left,
.print-card.p-independent .p-right,
.print-card.p-other .p-left,
.print-card.p-other .p-right {
  background: #ffffff !important;
}

/* Seeds only get background fill. Use paler colors than v29. */
.print-card.p-seed.p-depth-1 .p-left,
.print-card.p-seed.p-depth-1 .p-right { background: #fff5f5 !important; }
.print-card.p-seed.p-depth-2 .p-left,
.print-card.p-seed.p-depth-2 .p-right { background: #f3f8ff !important; }
.print-card.p-seed.p-depth-3 .p-left,
.print-card.p-seed.p-depth-3 .p-right { background: #f3fbf6 !important; }
.print-card.p-seed.p-depth-4 .p-left,
.print-card.p-seed.p-depth-4 .p-right { background: #fff8ef !important; }
.print-card.p-seed.p-depth-5 .p-left,
.print-card.p-seed.p-depth-5 .p-right { background: #f8f4ff !important; }

/* 10-up layout only: left 1~5 / right 6~10 */
.print-page.per-10 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, 1fr);
  grid-auto-flow: column;
  column-gap: 2mm;
  row-gap: 1.35mm;
}

.print-page.per-10 .print-card {
  grid-template-columns: 17.6mm minmax(0, 1fr);
  border-radius: 5.5px;
}

.print-page.per-10 .p-left {
  padding: .75mm .68mm;
  gap: .28mm;
  justify-content: flex-start;
}

.print-page.per-10 .p-no {
  font-size: 4.8pt;
}

.print-page.per-10 .p-char {
  font-size: 20.5pt;
  line-height: .84;
  margin: 0;
}

.print-page.per-10 .p-rad {
  padding: .35mm .72mm;
  font-size: 4.8pt;
}

.print-page.per-10 .p-rad span {
  font-size: 7.1pt;
}

.print-page.per-10 .p-equip {
  width: 13.3mm;
  height: 13.3mm;
  margin-top: .1mm;
}

.print-page.per-10 .p-equip table {
  width: 11.65mm;
  height: 11.65mm;
  border-spacing: .25mm;
}

.print-page.per-10 .p-equip td {
  width: 3.45mm;
  height: 3.45mm;
}

.print-page.per-10 .p-equip .p-slot-label {
  display: none;
}

.print-page.per-10 .p-equip .p-slot-value {
  font-size: 5.05pt !important;
  max-width: 3.35mm;
}

.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 6.4pt !important;
}

/* Right side made compact; no artificial big vertical whitespace. */
.print-page.per-10 .p-right {
  padding: .78mm 1.16mm;
  gap: .35mm;
  justify-content: flex-start;
  overflow: hidden;
}

.print-page.per-10 .p-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1mm;
  border-bottom: 1px solid #e3d8cc;
  padding-bottom: .28mm;
}

.print-page.per-10 .p-huneum {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 8.9pt;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-title-tags {
  display: flex;
  align-items: center;
  gap: .45mm;
  flex: 0 0 auto;
  max-width: 36mm;
  overflow: hidden;
}

.p-title-tags span {
  border: 1px solid #e2d6ca;
  background: #ffffff;
  color: #65584d;
  border-radius: 999px;
  padding: .28mm .68mm;
  font-size: 4.85pt;
  line-height: 1;
  white-space: nowrap;
}

.print-page.per-10 .p-lineage,
.print-page.per-10 .p-pills,
.print-page.per-10 .p-left-tags {
  display: none !important;
}

.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding: .48mm .66mm;
  border-radius: 4px;
  background: rgba(255,255,255,.84) !important;
}

.print-page.per-10 .p-section-title {
  font-size: 4.75pt;
  margin-bottom: .08mm;
  line-height: 1;
}

.print-page.per-10 .p-struct {
  gap: .05mm;
}

.print-page.per-10 .p-struct-row,
.print-page.per-10 .p-struct-result {
  grid-template-columns: 1.45mm minmax(0,1fr);
  gap: .22mm;
}

.print-page.per-10 .p-dot {
  width: .5mm;
  height: .5mm;
  margin-top: .68mm;
}

.print-page.per-10 .p-arrow {
  font-size: 5.5pt;
}

.print-page.per-10 .p-main {
  font-size: 5.72pt;
  line-height: 1.03;
}

.print-page.per-10 .p-line {
  font-size: 5.38pt;
  line-height: 1.03;
}

.print-page.per-10 .p-meaning {
  font-size: 5.3pt;
  padding: .12mm .55mm;
}

.print-page.per-10 .p-ex {
  font-size: 5.28pt;
  line-height: 1.03;
}

/* Map page also neutralized a bit */
.map-node.p-seed.p-depth-1 > .map-node-line { background: #fff5f5 !important; }
.map-node.p-seed.p-depth-2 > .map-node-line { background: #f3f8ff !important; }
.map-node.p-seed.p-depth-3 > .map-node-line { background: #f3fbf6 !important; }
.map-node.p-seed.p-depth-4 > .map-node-line { background: #fff8ef !important; }
.map-node.p-seed.p-depth-5 > .map-node-line { background: #f8f4ff !important; }

/* Old 12-up option removed; keep styles inert if old preview remains cached. */
.print-page.per-12 {
  display: none;
}


/* v34: fixed-size memo card print.
   Keep all card boxes visually stable. Use leftover lower area as review/memo space. */
.print-page.per-10 {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: repeat(5, 1fr) !important;
  grid-auto-flow: column !important;
  column-gap: 2mm !important;
  row-gap: 1.25mm !important;
  align-content: stretch !important;
}

.print-page.per-10 .print-card {
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  grid-template-columns: 17.5mm minmax(0, 1fr) !important;
  border-radius: 5.5px !important;
}

/* neutral base so seed colors are meaningful */
.print-card,
.print-card .p-left,
.print-card .p-right {
  background: #ffffff !important;
}

/* softer seed fill only */
.print-card.p-seed.p-depth-1 .p-left,
.print-card.p-seed.p-depth-1 .p-right { background: #fff6f6 !important; }
.print-card.p-seed.p-depth-2 .p-left,
.print-card.p-seed.p-depth-2 .p-right { background: #f4f9ff !important; }
.print-card.p-seed.p-depth-3 .p-left,
.print-card.p-seed.p-depth-3 .p-right { background: #f4fbf7 !important; }
.print-card.p-seed.p-depth-4 .p-left,
.print-card.p-seed.p-depth-4 .p-right { background: #fff8f0 !important; }
.print-card.p-seed.p-depth-5 .p-left,
.print-card.p-seed.p-depth-5 .p-right { background: #f9f5ff !important; }

.print-page.per-10 .p-left {
  padding: .7mm .62mm !important;
  gap: .24mm !important;
  justify-content: flex-start !important;
}

.print-page.per-10 .p-no {
  font-size: 4.65pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-char {
  font-size: 20pt !important;
  line-height: .84 !important;
  margin: 0 !important;
}

.print-page.per-10 .p-rad {
  padding: .3mm .66mm !important;
  font-size: 4.6pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-rad span {
  font-size: 6.85pt !important;
}

.print-page.per-10 .p-equip {
  width: 13mm !important;
  height: 13mm !important;
  margin-top: .08mm !important;
}

.print-page.per-10 .p-equip table {
  width: 11.35mm !important;
  height: 11.35mm !important;
  border-spacing: .23mm !important;
}

.print-page.per-10 .p-equip td {
  width: 3.38mm !important;
  height: 3.38mm !important;
  border-radius: 1.7px !important;
}

.print-page.per-10 .p-equip .p-slot-label {
  display: none !important;
}

.print-page.per-10 .p-equip .p-slot-value {
  font-size: 4.85pt !important;
  max-width: 3.25mm !important;
}

.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 6.1pt !important;
}

.print-page.per-10 .p-right {
  padding: .68mm .96mm !important;
  gap: .24mm !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .8mm !important;
  border-bottom: 1px solid #e3d8cc !important;
  padding-bottom: .22mm !important;
}

.print-page.per-10 .p-huneum {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 8.65pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-title-tags {
  display: flex !important;
  align-items: center !important;
  gap: .32mm !important;
  flex: 0 0 auto !important;
  max-width: 32mm !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-title-tags span {
  border: 1px solid #e2d6ca !important;
  background: rgba(255,255,255,.82) !important;
  color: #65584d !important;
  border-radius: 999px !important;
  padding: .2mm .5mm !important;
  font-size: 4.35pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.print-page.per-10 .p-lineage,
.print-page.per-10 .p-pills,
.print-page.per-10 .p-left-tags {
  display: none !important;
}

.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  border-width: .7px !important;
  padding: .38mm .55mm !important;
  border-radius: 3.6px !important;
  background: rgba(255,255,255,.78) !important;
}

.print-page.per-10 .empty-examples {
  display: none !important;
}

.print-page.per-10 .p-section-title {
  font-size: 4.55pt !important;
  margin-bottom: .04mm !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-struct {
  gap: .02mm !important;
}

.print-page.per-10 .p-struct-row,
.print-page.per-10 .p-struct-result {
  grid-template-columns: 1.32mm minmax(0,1fr) !important;
  gap: .18mm !important;
}

.print-page.per-10 .p-dot {
  width: .44mm !important;
  height: .44mm !important;
  margin-top: .6mm !important;
}

.print-page.per-10 .p-arrow {
  font-size: 5.25pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-main {
  font-size: 5.45pt !important;
  line-height: 1.02 !important;
}

.print-page.per-10 .p-line {
  font-size: 5.12pt !important;
  line-height: 1.02 !important;
}

.print-page.per-10 .p-meaning {
  font-size: 5.05pt !important;
  padding: .1mm .48mm !important;
  line-height: 1.05 !important;
}

.print-page.per-10 .p-ex {
  font-size: 5.02pt !important;
  line-height: 1.02 !important;
}

/* Fixed bottom review/memo area: consistent position across cards */
.print-page.per-10 .p-review {
  margin-top: auto !important;
  border-top: 1px dashed #dccfc2 !important;
  padding-top: .35mm !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: .25mm !important;
  color: #7b6d61 !important;
  font-size: 4.8pt !important;
  line-height: 1 !important;
  min-height: 7.4mm !important;
}

.print-page.per-10 .p-checks {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .75mm !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.print-page.per-10 .p-memo {
  min-height: 3.1mm !important;
  border-bottom: .7px solid #e4d8cc !important;
  color: #9a8d80 !important;
}

/* The bottom space is now inside each card as a consistent review block, so no page memo label. */
.print-page.per-10::after {
  display: none !important;
}


/* v35: UI polish for readability + study records */

/* Screen equipment: empty slots should be dark, filled slots should light up clearly. */
.equip-slot.empty {
  background: #2f2b27 !important;
  border-color: #1d1a17 !important;
  color: #675d54 !important;
}
.equip-slot.empty .slot-label {
  color: #776d64 !important;
}
.equip-slot.empty .slot-value {
  color: #5b524a !important;
}
.equip-slot.filled {
  background: #fff8e8 !important;
  border-color: #b88742 !important;
  color: #22170c !important;
}
.equip-slot.center {
  background: #e2f5e9 !important;
  border-color: #16734f !important;
}

/* Screen card hierarchy indicator */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: #cfc3b7;
}
.card.p-depth-1::before { background: #c92929; }
.card.p-depth-2::before { background: #146ac2; }
.card.p-depth-3::before { background: #16834f; }
.card.p-depth-4::before { background: #cc7414; }
.card.p-depth-5::before { background: #7044b3; }
.card.p-seed {
  box-shadow: 0 0 0 2px rgba(20,106,194,.08), 0 26px 70px rgba(62,48,32,.12);
}
.card.p-seed.p-depth-1 .meaning-side { background: linear-gradient(180deg, #fffafa, #fffdf9); }
.card.p-seed.p-depth-2 .meaning-side { background: linear-gradient(180deg, #f7fbff, #fffdf9); }
.card.p-seed.p-depth-3 .meaning-side { background: linear-gradient(180deg, #f7fff9, #fffdf9); }
.card.p-seed.p-depth-4 .meaning-side { background: linear-gradient(180deg, #fffaf4, #fffdf9); }
.card.p-seed.p-depth-5 .meaning-side { background: linear-gradient(180deg, #fbf8ff, #fffdf9); }

.meta-pills .class-pill {
  font-weight: 900;
  border-width: 1.5px;
}
.card.p-depth-1 .class-pill { border-color:#c92929; color:#9a1f1f; background:#fff1f1; }
.card.p-depth-2 .class-pill { border-color:#146ac2; color:#0c559c; background:#eef7ff; }
.card.p-depth-3 .class-pill { border-color:#16834f; color:#0b6a3e; background:#eefaf3; }
.card.p-depth-4 .class-pill { border-color:#cc7414; color:#a1570d; background:#fff5e9; }
.card.p-depth-5 .class-pill { border-color:#7044b3; color:#5b329a; background:#f7f0ff; }
.card.p-independent .class-pill {
  background: #fff !important;
  border-style: dashed;
}

/* Screen sections: make structure / examples visually separate. */
.meaning-side {
  gap: 13px !important;
}
.section {
  border: 1px solid #dfd3c7;
  background: #fffdf9;
  border-radius: 14px;
  padding: 13px 15px;
}
.structure-section {
  border-left: 5px solid #9f8062;
}
.examples-section {
  border-left: 5px solid #5f879d;
}
.section + .section,
.section + .study-panel {
  margin-top: 3px;
}
.section-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: #f1e7dc;
  color: #55473d;
  font-size: 11px;
  letter-spacing: .04em;
}
.examples {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.example {
  padding: 7px 9px;
  border-radius: 10px;
  background: #fbf6ef;
  border: 1px solid #eadfd3;
}
.example.empty-example {
  color: #9b8d7f;
  background: #f7f2ec;
}

/* Study panel */
.study-panel {
  border: 1px solid #d8cbbd;
  background: #fffaf2;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.study-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.study-head .section-title {
  margin-bottom: 0;
}
.study-save-state {
  color: #807266;
  font-size: 11px;
  white-space: nowrap;
}
.study-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.study-buttons button,
.study-tools button {
  border: 1px solid #d5c7b8;
  background: white;
  color: #453b33;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.study-buttons button.active {
  border-color: #3f79bd;
  background: #eef7ff;
  color: #0c559c;
}
.study-buttons button.danger.active {
  border-color: #c55f44;
  background: #fff1ec;
  color: #9c3219;
}
.study-buttons button.done.active {
  border-color: #16834f;
  background: #eefaf3;
  color: #0b6a3e;
}
.study-memo {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid #d8cbbd;
  background: white;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #27211c;
}
.study-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #87796c;
  font-size: 11px;
}
.study-tools button {
  padding: 5px 9px;
  font-size: 11px;
}

/* Print equipment: empty cells dark, filled cells light, center green. */
.print-page.per-10 .p-equip td {
  background: #2f2b27 !important;
  border-color: #1d1a17 !important;
  color: #5f554d !important;
}
.print-page.per-10 .p-equip td .p-slot-value {
  color: #5f554d !important;
}
.print-page.per-10 .p-equip td.filled {
  background: #fff2d1 !important;
  border-color: #b88742 !important;
  color: #22170c !important;
}
.print-page.per-10 .p-equip td.filled .p-slot-value {
  color: #22170c !important;
}
.print-page.per-10 .p-equip td.center {
  background: #dff4e8 !important;
  border-color: #16734f !important;
  color: #073d2c !important;
}
.print-page.per-10 .p-equip td.center .p-slot-value {
  color: #073d2c !important;
}

/* Print: visible hierarchy strip and stronger class pill. */
.print-page.per-10 .print-card {
  position: relative;
  overflow: hidden;
}
.print-page.per-10 .print-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.2mm;
  z-index: 3;
  background: #cfc3b7;
}
.print-page.per-10 .print-card.p-depth-1::before { background:#c92929; }
.print-page.per-10 .print-card.p-depth-2::before { background:#146ac2; }
.print-page.per-10 .print-card.p-depth-3::before { background:#16834f; }
.print-page.per-10 .print-card.p-depth-4::before { background:#cc7414; }
.print-page.per-10 .print-card.p-depth-5::before { background:#7044b3; }

.print-page.per-10 .p-title-tags span:first-child {
  font-weight: 900 !important;
  border-width: 1.1px !important;
}
.print-page.per-10 .p-depth-1 .p-title-tags span:first-child { border-color:#c92929 !important; color:#9a1f1f !important; background:#fff1f1 !important; }
.print-page.per-10 .p-depth-2 .p-title-tags span:first-child { border-color:#146ac2 !important; color:#0c559c !important; background:#eef7ff !important; }
.print-page.per-10 .p-depth-3 .p-title-tags span:first-child { border-color:#16834f !important; color:#0b6a3e !important; background:#eefaf3 !important; }
.print-page.per-10 .p-depth-4 .p-title-tags span:first-child { border-color:#cc7414 !important; color:#a1570d !important; background:#fff5e9 !important; }
.print-page.per-10 .p-depth-5 .p-title-tags span:first-child { border-color:#7044b3 !important; color:#5b329a !important; background:#f7f0ff !important; }
.print-page.per-10 .p-independent .p-title-tags span:first-child {
  background:#fff !important;
  border-style:dashed !important;
}

/* Print: separate structure and examples more clearly. */
.print-page.per-10 .p-right {
  gap: .38mm !important;
}
.print-page.per-10 .p-struct {
  border-left: .75mm solid #9f8062 !important;
  margin-bottom: .18mm !important;
}
.print-page.per-10 .p-examples {
  border-left: .75mm solid #5f879d !important;
  margin-top: .12mm !important;
}
.print-page.per-10 .p-section-title {
  display: inline-block !important;
  width: fit-content !important;
  padding: .18mm .7mm !important;
  border-radius: 999px !important;
  background: #f1e7dc !important;
  color: #55473d !important;
  margin-bottom: .2mm !important;
}
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  background: rgba(255,255,255,.9) !important;
}
.print-page.per-10 .p-review {
  border-top: 1px dashed #cdbfaf !important;
}


/* v36: print readability fixes */

/* Ensure printed colors are actually preserved in browser print preview. */
.print-page,
.print-card,
.p-equip,
.p-equip td,
.p-left,
.p-right,
.p-struct,
.p-examples,
.p-review,
.p-title-tags span {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Replace overlay color strip with border-left so it no longer covers 1/50. */
.print-page.per-10 .print-card::before {
  display: none !important;
}
.print-page.per-10 .print-card {
  border-left-width: 1.25mm !important;
  border-left-style: solid !important;
}
.print-page.per-10 .print-card.p-depth-1 { border-left-color: #c92929 !important; }
.print-page.per-10 .print-card.p-depth-2 { border-left-color: #146ac2 !important; }
.print-page.per-10 .print-card.p-depth-3 { border-left-color: #16834f !important; }
.print-page.per-10 .print-card.p-depth-4 { border-left-color: #cc7414 !important; }
.print-page.per-10 .print-card.p-depth-5 { border-left-color: #7044b3 !important; }
.print-page.per-10 .p-left {
  padding-left: .95mm !important;
}
.print-page.per-10 .p-no {
  color: #15110e !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

/* Print equipment: explicit empty class. Empty slots are dark; filled slots are bright. */
.print-page.per-10 .p-equip td.empty,
.print-area .p-equip td.empty {
  background: #24201d !important;
  border: 1px solid #0f0d0b !important;
  color: #7d7269 !important;
  box-shadow: inset 0 0 0 .35mm #24201d !important;
}
.print-page.per-10 .p-equip td.empty .p-slot-value,
.print-area .p-equip td.empty .p-slot-value {
  color: #877c72 !important;
}
.print-page.per-10 .p-equip td.filled,
.print-area .p-equip td.filled {
  background: #fff0c4 !important;
  border-color: #8c6028 !important;
  color: #1d1308 !important;
  box-shadow: none !important;
}
.print-page.per-10 .p-equip td.center,
.print-area .p-equip td.center {
  background: #d9f3e4 !important;
  border-color: #0f6b48 !important;
  color: #063423 !important;
}
.print-page.per-10 .p-equip td.filled .p-slot-value,
.print-area .p-equip td.filled .p-slot-value {
  color: #1d1308 !important;
}
.print-page.per-10 .p-equip td.center .p-slot-value,
.print-area .p-equip td.center .p-slot-value {
  color: #063423 !important;
}

/* Print structure as real bullet list with more air between items. */
.print-page.per-10 .p-struct {
  padding: .7mm .9mm .62mm 1.1mm !important;
}
.print-page.per-10 .p-struct-list {
  list-style: disc !important;
  margin: .25mm 0 .35mm 3.2mm !important;
  padding: 0 !important;
  display: block !important;
}
.print-page.per-10 .p-struct-list li {
  display: list-item !important;
  margin: 0 0 .45mm 0 !important;
  padding: 0 !important;
  font-size: 5.35pt !important;
  line-height: 1.16 !important;
  color: #221b15 !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}
.print-page.per-10 .p-struct-list li.main {
  font-family: var(--hanja-font) !important;
  color: #173f56 !important;
  font-size: 5.55pt !important;
}
.print-page.per-10 .p-struct-result-line {
  display: flex !important;
  align-items: center !important;
  gap: .55mm !important;
  margin-top: .25mm !important;
  padding-left: .35mm !important;
}
.print-page.per-10 .p-struct-result-line .p-arrow {
  font-size: 6.1pt !important;
  color: #176345 !important;
  font-weight: 900 !important;
}
.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 5.55pt !important;
  padding: .18mm .75mm !important;
}

/* Hide old grid-row structure remnants if any remain in print cards. */
.print-page.per-10 .p-struct-row {
  display: none !important;
}

/* Examples also get clearer spacing. */
.print-page.per-10 .p-examples {
  padding: .58mm .85mm !important;
}
.print-page.per-10 .p-ex {
  margin-bottom: .35mm !important;
  line-height: 1.13 !important;
}

/* Slightly separate section blocks so they do not visually fuse. */
.print-page.per-10 .p-right {
  gap: .52mm !important;
}
.print-page.per-10 .p-section-title {
  margin-bottom: .38mm !important;
}


/* v37: smarter print card ratio + stable custom bullets */

/* Wider left column, larger Hanja, less wasted right-side width. */
.print-page.per-10 .print-card {
  grid-template-columns: 26mm minmax(0, 1fr) !important;
  border-radius: 6px !important;
}

.print-page.per-10 .p-left {
  padding: .9mm .9mm .8mm 1.05mm !important;
  gap: .35mm !important;
  justify-content: flex-start !important;
}

.print-page.per-10 .p-no {
  font-size: 5.2pt !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #111 !important;
}

.print-page.per-10 .p-char {
  font-size: 31pt !important;
  line-height: .82 !important;
  margin: .1mm 0 .25mm !important;
  max-width: 23mm !important;
  overflow: visible !important;
}

.print-page.per-10 .p-rad {
  padding: .42mm .95mm !important;
  font-size: 5.25pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-rad span {
  font-size: 8pt !important;
}

.print-page.per-10 .p-equip {
  width: 17.6mm !important;
  height: 17.6mm !important;
  margin-top: .15mm !important;
  border-radius: 5px !important;
}

.print-page.per-10 .p-equip table {
  width: 15.6mm !important;
  height: 15.6mm !important;
  border-spacing: .32mm !important;
}

.print-page.per-10 .p-equip td {
  width: 4.65mm !important;
  height: 4.65mm !important;
  border-radius: 2.2px !important;
}

.print-page.per-10 .p-equip .p-slot-value {
  font-size: 6.25pt !important;
  max-width: 4.4mm !important;
}

.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 7.9pt !important;
}

/* Right side: shorter line length, cleaner top line. */
.print-page.per-10 .p-right {
  padding: .82mm 1.15mm !important;
  gap: .55mm !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-head {
  padding-bottom: .35mm !important;
  gap: 1mm !important;
}

.print-page.per-10 .p-huneum {
  font-size: 9.6pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-title-tags {
  max-width: 34mm !important;
}

.print-page.per-10 .p-title-tags span {
  font-size: 4.9pt !important;
  padding: .24mm .6mm !important;
}

/* Structure / examples blocks separated, but not huge. */
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding: .72mm .95mm !important;
  border-radius: 4.5px !important;
  background: rgba(255,255,255,.92) !important;
}

.print-page.per-10 .p-struct {
  border-left: .8mm solid #9f8062 !important;
}

.print-page.per-10 .p-examples {
  border-left: .8mm solid #5f879d !important;
}

.print-page.per-10 .p-section-title {
  font-size: 5.15pt !important;
  padding: .2mm .75mm !important;
  margin-bottom: .45mm !important;
}

/* Custom bullet rows: fixed bullet size, fixed text size. No browser marker weirdness. */
.print-page.per-10 .p-struct-list {
  display: none !important;
}

.print-page.per-10 .p-struct-bullets {
  display: flex !important;
  flex-direction: column !important;
  gap: .42mm !important;
  margin: .12mm 0 .35mm !important;
}

.print-page.per-10 .p-bullet-line {
  display: grid !important;
  grid-template-columns: 2.4mm minmax(0, 1fr) !important;
  align-items: start !important;
  column-gap: .55mm !important;
  font-size: 6.05pt !important;
  line-height: 1.18 !important;
  color: #211913 !important;
}

.print-page.per-10 .p-bullet {
  font-family: Arial, sans-serif !important;
  font-size: 6.05pt !important;
  line-height: 1.18 !important;
  color: #1f1b17 !important;
  text-align: center !important;
  transform: none !important;
}

.print-page.per-10 .p-bullet-text {
  font-size: 6.05pt !important;
  line-height: 1.18 !important;
  font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

.print-page.per-10 .p-bullet-line.main .p-bullet-text {
  color: #173f56 !important;
  font-weight: 700 !important;
}

.print-page.per-10 .p-bullet-text .hanja-inline {
  font-family: var(--hanja-font) !important;
  font-size: 1.08em !important;
  font-weight: 700 !important;
}

.print-page.per-10 .p-struct-result-line {
  display: flex !important;
  align-items: center !important;
  gap: .65mm !important;
  margin-top: .38mm !important;
  padding-left: .1mm !important;
}

.print-page.per-10 .p-struct-result-line .p-arrow {
  font-size: 6.5pt !important;
  line-height: 1 !important;
  color: #176345 !important;
  font-weight: 900 !important;
}

.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 6.15pt !important;
  line-height: 1.05 !important;
  padding: .2mm .85mm !important;
}

/* Examples line height unified. */
.print-page.per-10 .p-ex {
  font-size: 5.7pt !important;
  line-height: 1.16 !important;
  margin-bottom: .35mm !important;
}

/* Review block reduced a bit since left form is larger. */
.print-page.per-10 .p-review {
  min-height: 6.4mm !important;
  padding-top: .32mm !important;
  font-size: 4.85pt !important;
}

.print-page.per-10 .p-checks {
  gap: .65mm !important;
}

.print-page.per-10 .p-memo {
  min-height: 2.6mm !important;
}

/* The card border color should remain readable after widening left area. */
.print-page.per-10 .print-card {
  border-width: 1px !important;
  border-left-width: 1.3mm !important;
}

/* Print backgrounds exact. */
.print-page.per-10 .p-left,
.print-page.per-10 .p-right,
.print-page.per-10 .p-equip td,
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples,
.print-page.per-10 .p-review {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}


/* v38: stable Hanja box + hard left-aligned structure bullets */

/* Big Hanja sits inside a fixed box so its visual position does not drift card to card. */
.print-page.per-10 .p-char-box {
  width: 22.5mm !important;
  height: 21mm !important;
  border: 1px solid #d7cabb !important;
  background: rgba(255,255,255,.72) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: .15mm auto .35mm !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-family: var(--hanja-font) !important;
  font-size: 33pt !important;
  line-height: .9 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 21mm !important;
  text-align: center !important;
  transform: translateY(-.2mm) !important;
}

/* Since Hanja is boxed, left column can be visually stable. */
.print-page.per-10 .p-left {
  align-items: center !important;
  justify-content: flex-start !important;
}

.print-page.per-10 .p-no {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0 .2mm !important;
}

/* Structure section must be left aligned. Reset any inherited centering/odd list rules. */
.print-page.per-10 .p-struct {
  text-align: left !important;
  display: block !important;
  padding: .72mm 1mm .72mm 1mm !important;
}

.print-page.per-10 .p-struct * {
  text-align: left !important;
}

.print-page.per-10 .p-struct-bullets {
  width: 100% !important;
  margin: .2mm 0 .35mm 0 !important;
  padding: 0 !important;
  display: block !important;
  text-align: left !important;
}

.print-page.per-10 .p-bullet-line {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 2.2mm minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: start !important;
  column-gap: .55mm !important;
  margin: 0 0 .5mm 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: 6pt !important;
  line-height: 1.18 !important;
}

.print-page.per-10 .p-bullet {
  display: block !important;
  width: 2.2mm !important;
  text-align: center !important;
  font-family: Arial, sans-serif !important;
  font-size: 6pt !important;
  line-height: 1.18 !important;
  color: #1f1b17 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.print-page.per-10 .p-bullet-text {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  justify-self: stretch !important;
  font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif !important;
  font-size: 6pt !important;
  line-height: 1.18 !important;
  color: #211913 !important;
  margin: 0 !important;
  padding: 0 !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

.print-page.per-10 .p-bullet-line.main .p-bullet-text {
  color: #173f56 !important;
  font-weight: 700 !important;
}

.print-page.per-10 .p-bullet-text .hanja-inline {
  font-family: var(--hanja-font) !important;
  font-size: 1.04em !important;
  font-weight: 700 !important;
}

/* Result line also left aligned, not centered. */
.print-page.per-10 .p-struct-result-line {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: .65mm !important;
  margin-top: .35mm !important;
  padding-left: 0 !important;
}

.print-page.per-10 .p-struct-result-line .p-arrow {
  flex: 0 0 auto !important;
  text-align: left !important;
}

.print-page.per-10 .p-struct-result-line .p-meaning {
  flex: 0 0 auto !important;
  text-align: left !important;
}

/* Remove old list remnants and old p-char direct rules that could fight the box. */
.print-page.per-10 .p-struct-list,
.print-page.per-10 .p-struct-row {
  display: none !important;
}

/* Let the boxed character and equipment align as one stable vertical stack. */
.print-page.per-10 .p-rad {
  margin: .1mm auto .25mm !important;
}

.print-page.per-10 .p-equip {
  margin-left: auto !important;
  margin-right: auto !important;
}


/* v39: force structure content to the very top and make class pills instantly identifiable */

/* The structure box should not vertically center its contents.
   It is a top-aligned mini panel: title -> bullet rows -> result. */
.print-page.per-10 .p-struct {
  display: grid !important;
  grid-template-rows: auto auto auto 1fr !important;
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  text-align: left !important;
  padding: .78mm 1mm .68mm 1mm !important;
  min-height: 0 !important;
}

.print-page.per-10 .p-struct .p-section-title {
  display: inline-block !important;
  justify-self: start !important;
  align-self: start !important;
  margin: 0 0 .55mm 0 !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-struct-bullets {
  display: block !important;
  align-self: start !important;
  justify-self: stretch !important;
  margin: 0 0 .35mm 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.print-page.per-10 .p-bullet-line {
  display: grid !important;
  grid-template-columns: 2.25mm minmax(0, 1fr) !important;
  align-items: start !important;
  justify-items: start !important;
  margin: 0 0 .45mm 0 !important;
  padding: 0 !important;
  width: 100% !important;
  font-size: 6pt !important;
  line-height: 1.15 !important;
}

.print-page.per-10 .p-bullet {
  font-size: 6pt !important;
  line-height: 1.15 !important;
  width: 2.25mm !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.print-page.per-10 .p-bullet-text {
  font-size: 6pt !important;
  line-height: 1.15 !important;
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
}

.print-page.per-10 .p-struct-result-line {
  align-self: start !important;
  justify-self: start !important;
  margin: .1mm 0 0 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* Remove any inherited old bullet/list layout that can create ghost spacing. */
.print-page.per-10 .p-struct-list,
.print-page.per-10 .p-struct-row,
.print-page.per-10 .p-struct-result {
  display: none !important;
}

/* Make the right panel content start at top as a whole. */
.print-page.per-10 .p-right {
  justify-content: flex-start !important;
  align-content: start !important;
}

/* Classification pill: not just outline, use readable background by depth.
   Seed and independent both get a filled depth color, independent remains dashed so it is still distinguishable. */
.print-page.per-10 .p-title-tags span:first-child {
  font-weight: 950 !important;
  color: #111 !important;
  border-width: 1.25px !important;
  border-style: solid !important;
}

.print-page.per-10 .p-depth-1 .p-title-tags span:first-child {
  background: #ffe3e3 !important;
  border-color: #c92929 !important;
  color: #8f1c1c !important;
}
.print-page.per-10 .p-depth-2 .p-title-tags span:first-child {
  background: #dcecff !important;
  border-color: #146ac2 !important;
  color: #064e9b !important;
}
.print-page.per-10 .p-depth-3 .p-title-tags span:first-child {
  background: #dcf4e6 !important;
  border-color: #16834f !important;
  color: #075d36 !important;
}
.print-page.per-10 .p-depth-4 .p-title-tags span:first-child {
  background: #ffe9cc !important;
  border-color: #cc7414 !important;
  color: #934e0b !important;
}
.print-page.per-10 .p-depth-5 .p-title-tags span:first-child {
  background: #eadfff !important;
  border-color: #7044b3 !important;
  color: #4f2b8a !important;
}

/* Independent: same background hue, dashed border, small diagonal hatch feel */
.print-page.per-10 .p-independent .p-title-tags span:first-child {
  border-style: dashed !important;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.22) 0,
    rgba(255,255,255,.22) 1.2px,
    transparent 1.2px,
    transparent 3.6px
  ) !important;
}

/* Also tint the Hanja box very subtly by depth, so category is seen before reading the pill. */
.print-page.per-10 .p-depth-1 .p-char-box { background: #fff4f4 !important; border-color: #efb5b5 !important; }
.print-page.per-10 .p-depth-2 .p-char-box { background: #f3f8ff !important; border-color: #aecff2 !important; }
.print-page.per-10 .p-depth-3 .p-char-box { background: #f3fbf6 !important; border-color: #afe0c4 !important; }
.print-page.per-10 .p-depth-4 .p-char-box { background: #fff7ed !important; border-color: #efc38a !important; }
.print-page.per-10 .p-depth-5 .p-char-box { background: #f8f3ff !important; border-color: #c7b4ed !important; }

/* Seed remains stronger than independent through card fill + solid pill border. */
.print-page.per-10 .p-seed .p-title-tags span:first-child {
  border-style: solid !important;
  box-shadow: inset 0 0 0 .35mm rgba(255,255,255,.35) !important;
}

/* Fix huge accidental top blank in structure on some engines. */
.print-page.per-10 .p-struct > * {
  flex: none !important;
}


/* v40: practical paper-print cards */

/* Print accurately where color remains useful. */
.print-page,
.print-card,
.print-card *,
.p-equip,
.p-equip *,
.p-title-tags span,
.p-char-box {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Zero-gap layout for one-cut trimming. */
.print-page.per-10 {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: repeat(5, 1fr) !important;
  grid-auto-flow: column !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  gap: 0 !important;
  align-content: stretch !important;
}
.print-page.per-10::before,
.print-page.per-10::after {
  display: none !important;
}

.print-page.per-10 .print-card {
  border-radius: 0 !important;
  border-width: .35mm !important;
  border-style: solid !important;
  margin: 0 !important;
  box-shadow: none !important;
  height: 100% !important;
  min-height: 0 !important;
  align-self: stretch !important;
  grid-template-columns: 25mm minmax(0, 1fr) !important;
  overflow: hidden !important;
  border-left-width: 1.25mm !important;
}

.print-page.per-10 .print-card.p-depth-1 { border-left-color:#c92929 !important; }
.print-page.per-10 .print-card.p-depth-2 { border-left-color:#146ac2 !important; }
.print-page.per-10 .print-card.p-depth-3 { border-left-color:#16834f !important; }
.print-page.per-10 .print-card.p-depth-4 { border-left-color:#cc7414 !important; }
.print-page.per-10 .print-card.p-depth-5 { border-left-color:#7044b3 !important; }

/* Left column */
.print-page.per-10 .p-left {
  padding: .9mm .9mm .8mm 1.1mm !important;
  gap: .32mm !important;
  justify-content: flex-start !important;
  align-items: center !important;
  background: #fff !important;
}
.print-page.per-10 .p-no {
  width: 100% !important;
  padding: 0 .25mm !important;
  color: #111 !important;
  font-size: 6.3pt !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
}

.print-page.per-10 .p-char-box {
  width: 21.5mm !important;
  height: 19mm !important;
  border: 1px solid #d2c5b8 !important;
  border-radius: 5px !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: .15mm auto .3mm !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.print-page.per-10 .p-char-box .p-char {
  font-family: var(--hanja-font) !important;
  font-size: 31pt !important;
  line-height: .9 !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: 20.5mm !important;
  text-align: center !important;
  transform: translateY(-.1mm) !important;
}

/* Depth tint behind Hanja box */
.print-page.per-10 .p-depth-1 .p-char-box { background:#fff2f2 !important; border-color:#e99a9a !important; }
.print-page.per-10 .p-depth-2 .p-char-box { background:#edf6ff !important; border-color:#9dc8f0 !important; }
.print-page.per-10 .p-depth-3 .p-char-box { background:#eefaf3 !important; border-color:#9bd9b7 !important; }
.print-page.per-10 .p-depth-4 .p-char-box { background:#fff3e2 !important; border-color:#e7b66d !important; }
.print-page.per-10 .p-depth-5 .p-char-box { background:#f4edff !important; border-color:#bba1e9 !important; }

.print-page.per-10 .p-rad {
  padding: .45mm .9mm !important;
  font-size: 6.2pt !important;
  line-height: 1 !important;
  background: #fff !important;
}
.print-page.per-10 .p-rad span {
  font-size: 8.5pt !important;
}

/* Equipment grid: toner-friendly empty slots */
.print-page.per-10 .p-equip {
  width: 17mm !important;
  height: 17mm !important;
  margin: .2mm auto 0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  border: 1px solid #cfc2b5 !important;
}
.print-page.per-10 .p-equip table {
  width: 15.1mm !important;
  height: 15.1mm !important;
  border-spacing: .28mm !important;
}
.print-page.per-10 .p-equip td {
  width: 4.5mm !important;
  height: 4.5mm !important;
  border-radius: 2px !important;
  padding: 0 !important;
}
.print-page.per-10 .p-equip td.empty,
.print-area .p-equip td.empty {
  background: #fff !important;
  border: 1px dashed #b9b9b9 !important;
  color: #999 !important;
  box-shadow: none !important;
}
.print-page.per-10 .p-equip td.empty .p-slot-value,
.print-area .p-equip td.empty .p-slot-value {
  color: #9a9a9a !important;
  font-family: Arial, sans-serif !important;
  font-size: 5.7pt !important;
  line-height: 1 !important;
}
.print-page.per-10 .p-equip td.filled,
.print-area .p-equip td.filled {
  background: #fff6dc !important;
  border: 1px solid #8c6028 !important;
  color: #1d1308 !important;
}
.print-page.per-10 .p-equip td.center,
.print-area .p-equip td.center {
  background: #e0f5e9 !important;
  border: 1.2px solid #0f6b48 !important;
  color: #063423 !important;
}
.print-page.per-10 .p-equip .p-slot-label {
  display: none !important;
}
.print-page.per-10 .p-equip .p-slot-value {
  font-size: 6.3pt !important;
  max-width: 4.3mm !important;
  color: inherit !important;
}
.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 8pt !important;
}

/* Right column: title line is shifted lower than the 1/50/# row */
.print-page.per-10 .p-right {
  padding: 2.0mm 1.35mm .9mm 1.25mm !important;
  gap: .6mm !important;
  justify-content: flex-start !important;
  align-content: start !important;
  overflow: hidden !important;
  background: #fff !important;
}
.print-page.per-10 .p-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1mm !important;
  border-bottom: 1px solid #d8cbbd !important;
  padding-bottom: .35mm !important;
  margin: 0 !important;
}
.print-page.per-10 .p-huneum {
  font-size: 11pt !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.print-page.per-10 .p-title-tags {
  display: flex !important;
  gap: .45mm !important;
  flex: 0 0 auto !important;
  max-width: 38mm !important;
  overflow: hidden !important;
}
.print-page.per-10 .p-title-tags span {
  font-size: 7pt !important;
  line-height: 1 !important;
  padding: .32mm .75mm !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}
.print-page.per-10 .p-title-tags span:first-child {
  font-weight: 950 !important;
  border-width: 1.2px !important;
}

/* Filled classification pill */
.print-page.per-10 .p-depth-1 .p-title-tags span:first-child { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-title-tags span:first-child { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-title-tags span:first-child { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-title-tags span:first-child { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-title-tags span:first-child { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-title-tags span:first-child { border-style:dashed !important; }

/* Larger print text: 7pt+ */
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding: .8mm 1mm !important;
  border-radius: 3.5px !important;
  background: #fff !important;
  border-width: 1px !important;
}
.print-page.per-10 .p-struct {
  display: grid !important;
  grid-template-rows: auto auto auto 1fr !important;
  align-content: start !important;
  align-items: start !important;
  border-left: .8mm solid #9f8062 !important;
  min-height: 0 !important;
}
.print-page.per-10 .p-examples {
  border-left: .8mm solid #5f879d !important;
}
.print-page.per-10 .p-section-title {
  font-size: 7pt !important;
  line-height: 1 !important;
  padding: .25mm .85mm !important;
  margin: 0 0 .55mm 0 !important;
  border-radius: 999px !important;
  background: #f1e7dc !important;
  color: #55473d !important;
  display: inline-block !important;
  width: fit-content !important;
}
.print-page.per-10 .p-struct-bullets {
  display: block !important;
  width: 100% !important;
  margin: 0 0 .35mm 0 !important;
  padding: 0 !important;
}
.print-page.per-10 .p-bullet-line {
  display: grid !important;
  grid-template-columns: 2.6mm minmax(0, 1fr) !important;
  column-gap: .55mm !important;
  align-items: start !important;
  margin: 0 0 .45mm 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.print-page.per-10 .p-bullet {
  font-family: Arial, sans-serif !important;
  font-size: 7.2pt !important;
  line-height: 1.16 !important;
  width: 2.6mm !important;
  text-align: center !important;
  color: #1f1b17 !important;
}
.print-page.per-10 .p-bullet-text {
  font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif !important;
  font-size: 7.2pt !important;
  line-height: 1.16 !important;
  color: #211913 !important;
  text-align: left !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}
.print-page.per-10 .p-bullet-line.main .p-bullet-text {
  color: #173f56 !important;
  font-weight: 800 !important;
}
.print-page.per-10 .p-bullet-text .hanja-inline,
.print-page.per-10 .p-ex .hanja-inline {
  font-family: var(--hanja-font) !important;
  font-weight: 700 !important;
}
.print-page.per-10 .p-struct-result-line {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: .65mm !important;
  margin: .15mm 0 0 0 !important;
  padding: 0 !important;
}
.print-page.per-10 .p-struct-result-line .p-arrow {
  font-size: 7.2pt !important;
  line-height: 1 !important;
  color: #176345 !important;
  font-weight: 900 !important;
}
.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 7.2pt !important;
  line-height: 1.05 !important;
  padding: .2mm .85mm !important;
}

/* Hide old structure remnants */
.print-page.per-10 .p-struct-list,
.print-page.per-10 .p-struct-row,
.print-page.per-10 .p-struct-result {
  display: none !important;
}
.print-page.per-10 .p-ex {
  font-size: 7pt !important;
  line-height: 1.16 !important;
  margin-bottom: .35mm !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

/* Review block readable */
.print-page.per-10 .p-review {
  margin-top: auto !important;
  min-height: 7.5mm !important;
  padding-top: .45mm !important;
  border-top: 1px dashed #cdbfaf !important;
  font-size: 7pt !important;
  line-height: 1 !important;
  color: #6d5f53 !important;
}
.print-page.per-10 .p-checks {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .9mm !important;
  align-items: center !important;
  white-space: nowrap !important;
}
.print-page.per-10 .p-memo {
  margin-top: .45mm !important;
  min-height: 2.8mm !important;
  border-bottom: .7px solid #d8cbbd !important;
  color: #827467 !important;
}

.print-page.per-10 .p-struct * {
  text-align: left !important;
}
.print-page.per-10 .p-lineage,
.print-page.per-10 .p-pills,
.print-page.per-10 .p-left-tags {
  display: none !important;
}


/* v41: quiz-aligned print layout */

/* Right header: only huneum remains, consistently right-aligned. */
.print-page.per-10 .p-head {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  border-bottom: 1px solid #d8cbbd !important;
  padding-bottom: .45mm !important;
  margin: 0 !important;
  min-height: 4.4mm !important;
}
.print-page.per-10 .p-huneum {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  font-size: 11.4pt !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.print-page.per-10 .p-title-tags {
  display: none !important;
}

/* Classification / liushu tags moved under the Hanja box. */
.print-page.per-10 .p-left-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .45mm !important;
  width: 100% !important;
  max-width: 23mm !important;
  margin: 0 auto .15mm !important;
  overflow: hidden !important;
}
.print-page.per-10 .p-left-tags span {
  display: inline-block !important;
  border-radius: 999px !important;
  padding: .27mm .65mm !important;
  font-size: 5.8pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-weight: 850 !important;
  max-width: 22mm !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.print-page.per-10 .p-left-tags .p-liushu-tag {
  border: 1px solid #d8cbbd !important;
  background: #fff !important;
  color: #5d5147 !important;
}
.print-page.per-10 .p-left-tags .p-class-tag {
  border-width: 1.15px !important;
  border-style: solid !important;
}
.print-page.per-10 .p-depth-1 .p-left-tags .p-class-tag { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-left-tags .p-class-tag { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-left-tags .p-class-tag { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-left-tags .p-class-tag { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-left-tags .p-class-tag { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-left-tags .p-class-tag { border-style:dashed !important; }

/* Left stack adjusted for moved tags. */
.print-page.per-10 .p-left {
  gap: .28mm !important;
}
.print-page.per-10 .p-char-box {
  height: 18.2mm !important;
  margin: .12mm auto .25mm !important;
}
.print-page.per-10 .p-char-box .p-char {
  font-size: 30pt !important;
}
.print-page.per-10 .p-rad {
  margin: .05mm auto .15mm !important;
  font-size: 5.9pt !important;
  padding: .35mm .85mm !important;
}

/* More readable lower/check text and more air between sections. */
.print-page.per-10 .p-right {
  gap: .85mm !important;
  padding-top: 2.1mm !important;
}
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding-top: .95mm !important;
  padding-bottom: .9mm !important;
}
.print-page.per-10 .p-struct-bullets {
  margin-bottom: .45mm !important;
}
.print-page.per-10 .p-bullet-line {
  margin-bottom: .58mm !important;
}
.print-page.per-10 .p-bullet,
.print-page.per-10 .p-bullet-text,
.print-page.per-10 .p-struct-result-line .p-arrow,
.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 7.45pt !important;
}
.print-page.per-10 .p-ex {
  font-size: 7.35pt !important;
  line-height: 1.2 !important;
}
.print-page.per-10 .p-review {
  font-size: 7.6pt !important;
  min-height: 8.4mm !important;
  padding-top: .6mm !important;
}
.print-page.per-10 .p-checks {
  gap: 1.1mm !important;
}
.print-page.per-10 .p-memo {
  margin-top: .55mm !important;
  min-height: 3.2mm !important;
}


/* v42: left stack order and fixed huneum slots */

/* Left column order:
   number -> big Hanja -> equipment -> radical/classification/liushu */
.print-page.per-10 .p-left {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: .32mm !important;
}

.print-page.per-10 .p-char-box {
  order: 1 !important;
  width: 21.5mm !important;
  height: 17.8mm !important;
  margin: .12mm auto .12mm !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 29.5pt !important;
}

.print-page.per-10 .p-equip {
  order: 2 !important;
  width: 16.6mm !important;
  height: 16.6mm !important;
  margin: .05mm auto .15mm !important;
}

.print-page.per-10 .p-equip table {
  width: 14.8mm !important;
  height: 14.8mm !important;
}

.print-page.per-10 .p-left-meta {
  order: 3 !important;
  width: 100% !important;
  max-width: 23mm !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: .3mm !important;
  margin: .05mm auto 0 !important;
}

.print-page.per-10 .p-rad {
  margin: 0 auto !important;
  padding: .32mm .78mm !important;
  font-size: 5.75pt !important;
  line-height: 1 !important;
  max-width: 22mm !important;
}

.print-page.per-10 .p-rad span {
  font-size: 8pt !important;
}

.print-page.per-10 .p-left-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35mm !important;
  width: 100% !important;
  max-width: 23mm !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-left-tags span {
  display: inline-block !important;
  border-radius: 999px !important;
  padding: .24mm .55mm !important;
  font-size: 5.55pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-weight: 850 !important;
  max-width: 22mm !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-left-tags .p-liushu-tag {
  border: 1px solid #d8cbbd !important;
  background: #fff !important;
  color: #5d5147 !important;
}

.print-page.per-10 .p-left-tags .p-class-tag {
  border-width: 1.15px !important;
  border-style: solid !important;
}

.print-page.per-10 .p-depth-1 .p-left-tags .p-class-tag { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-left-tags .p-class-tag { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-left-tags .p-class-tag { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-left-tags .p-class-tag { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-left-tags .p-class-tag { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-left-tags .p-class-tag { border-style:dashed !important; }

/* Right header: fixed meaning/sound slots.
   Meaning is right-aligned in its own area; sound is fixed-width at far right. */
.print-page.per-10 .p-head {
  display: block !important;
  border-bottom: 1px solid #d8cbbd !important;
  padding-bottom: .45mm !important;
  min-height: 4.6mm !important;
}

.print-page.per-10 .p-huneum {
  display: none !important;
}

.print-page.per-10 .p-huneum-fixed {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 12mm !important;
  column-gap: 1.1mm !important;
  align-items: baseline !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-huneum-meaning {
  display: block !important;
  text-align: right !important;
  font-size: 11.4pt !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  color: #120f0c !important;
}

.print-page.per-10 .p-huneum-sound {
  display: block !important;
  text-align: right !important;
  font-size: 11.4pt !important;
  white-space: nowrap !important;
  color: #120f0c !important;
}

/* No classification tags in right header. */
.print-page.per-10 .p-title-tags {
  display: none !important;
}

/* Slightly preserve lower readability after moving left meta. */
.print-page.per-10 .p-right {
  padding-top: 2.1mm !important;
  gap: .85mm !important;
}


/* v43: equipment enlarged, meta chips grouped, fixed huneum baseline, family rails */

/* Huneum baseline: give it air so it does not collide with the underline. */
.print-page.per-10 .p-head {
  min-height: 5.4mm !important;
  padding-bottom: .9mm !important;
  display: block !important;
  border-bottom: 1px solid #d8cbbd !important;
}
.print-page.per-10 .p-huneum-fixed {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 12mm !important;
  column-gap: 1.1mm !important;
  align-items: center !important;
  padding-top: .25mm !important;
}
.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  font-size: 11.3pt !important;
  line-height: 1.15 !important;
}

/* Left stack: Hanja -> equipment -> all meta chips together. */
.print-page.per-10 .p-left {
  gap: .28mm !important;
}

.print-page.per-10 .p-char-box {
  width: 21.5mm !important;
  height: 17.2mm !important;
  margin: .08mm auto .1mm !important;
}
.print-page.per-10 .p-char-box .p-char {
  font-size: 29pt !important;
}

/* Equipment width approaches the Hanja box width for a more stable block. */
.print-page.per-10 .p-equip {
  width: 20.8mm !important;
  height: 20.8mm !important;
  margin: .05mm auto .15mm !important;
  border-radius: 4.5px !important;
}
.print-page.per-10 .p-equip table {
  width: 18.6mm !important;
  height: 18.6mm !important;
  border-spacing: .34mm !important;
}
.print-page.per-10 .p-equip td {
  width: 5.55mm !important;
  height: 5.55mm !important;
  border-radius: 2.3px !important;
}
.print-page.per-10 .p-equip .p-slot-value {
  font-size: 7pt !important;
  max-width: 5.25mm !important;
}
.print-page.per-10 .p-equip td.center .p-slot-value {
  font-size: 8.8pt !important;
}

/* Radical is no longer a separate awkward middle badge.
   All meta is one bottom chip group. */
.print-page.per-10 .p-rad,
.print-page.per-10 .p-left-tags,
.print-page.per-10 .p-left-meta {
  display: none !important;
}
.print-page.per-10 .p-meta-chips {
  width: 100% !important;
  max-width: 23.5mm !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: .32mm !important;
  margin: .05mm auto 0 !important;
  overflow: hidden !important;
}
.print-page.per-10 .p-meta-chips span {
  display: inline-block !important;
  border-radius: 999px !important;
  padding: .22mm .5mm !important;
  font-size: 5.35pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  font-weight: 850 !important;
  max-width: 23mm !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.print-page.per-10 .p-rad-chip {
  border: 1px solid #bfd8e4 !important;
  background: #f4fbff !important;
  color: #2f5f7f !important;
}
.print-page.per-10 .p-rad-chip b {
  font-family: var(--hanja-font) !important;
  font-size: 1.12em !important;
}
.print-page.per-10 .p-liushu-tag {
  border: 1px solid #d8cbbd !important;
  background: #fff !important;
  color: #5d5147 !important;
}
.print-page.per-10 .p-class-tag {
  border-width: 1.15px !important;
  border-style: solid !important;
}
.print-page.per-10 .p-depth-1 .p-class-tag { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-class-tag { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-class-tag { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-class-tag { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-class-tag { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-class-tag { border-style:dashed !important; }

/* Family rails: from 2차+ seed to its descendants.
   They appear on the outer right edge of each card. */
.print-page.per-10 .print-card.family-start,
.print-page.per-10 .print-card.family-member {
  position: relative !important;
}
.print-page.per-10 .print-card.family-start::after,
.print-page.per-10 .print-card.family-member::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: .9mm !important;
  z-index: 5 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.print-page.per-10 .print-card.fam-depth-2::after { background:#146ac2 !important; }
.print-page.per-10 .print-card.fam-depth-3::after { background:#16834f !important; }
.print-page.per-10 .print-card.fam-depth-4::after { background:#cc7414 !important; }
.print-page.per-10 .print-card.fam-depth-5::after { background:#7044b3 !important; }

.print-page.per-10 .p-family-label {
  position: absolute !important;
  right: 1.35mm !important;
  top: 1.2mm !important;
  z-index: 6 !important;
  border-radius: 999px !important;
  padding: .22mm .7mm !important;
  font-size: 5.5pt !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  background: #fff !important;
  border: 1px solid currentColor !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}
.print-page.per-10 .fam-depth-2 .p-family-label { color:#146ac2 !important; }
.print-page.per-10 .fam-depth-3 .p-family-label { color:#16834f !important; }
.print-page.per-10 .fam-depth-4 .p-family-label { color:#cc7414 !important; }
.print-page.per-10 .fam-depth-5 .p-family-label { color:#7044b3 !important; }

/* Slightly reduce right padding to compensate the family rail. */
.print-page.per-10 .p-right {
  padding-right: 1.75mm !important;
}


/* v44: boxed huneum slots + 3-cell meta grid */

/* Right top answer zone: fixed boxes for meaning and sound. */
.print-page.per-10 .p-head {
  display: block !important;
  min-height: 6.2mm !important;
  border-bottom: none !important;
  padding: 0 !important;
  margin: 0 0 .45mm 0 !important;
}

.print-page.per-10 .p-huneum-fixed {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 13.5mm !important;
  column-gap: .8mm !important;
  align-items: stretch !important;
  height: 5.7mm !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  box-sizing: border-box !important;
  height: 5.7mm !important;
  border: 1px solid #d8cbbd !important;
  background: #fffdf9 !important;
  color: #120f0c !important;
  font-size: 11pt !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-huneum-meaning {
  padding: 0 1.2mm 0 .8mm !important;
  text-align: right !important;
  border-radius: 4px 0 0 4px !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-huneum-sound {
  padding: 0 .9mm !important;
  text-align: right !important;
  border-radius: 0 4px 4px 0 !important;
  font-family: system-ui, -apple-system, "Malgun Gothic", sans-serif !important;
}

/* Left stack order and 3-cell meta grid. */
.print-page.per-10 .p-left {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: .26mm !important;
}

/* Hanja and equipment remain visually paired. */
.print-page.per-10 .p-char-box {
  width: 21.5mm !important;
  height: 16.7mm !important;
  margin: .08mm auto .08mm !important;
}
.print-page.per-10 .p-char-box .p-char {
  font-size: 28.5pt !important;
}

.print-page.per-10 .p-equip {
  width: 20.8mm !important;
  height: 20.8mm !important;
  margin: .03mm auto .16mm !important;
}

/* Hide older meta styles. */
.print-page.per-10 .p-rad,
.print-page.per-10 .p-left-tags,
.print-page.per-10 .p-left-meta,
.print-page.per-10 .p-meta-chips {
  display: none !important;
}

/* 3 fixed cells: radical / class / liushu */
.print-page.per-10 .p-meta-grid {
  width: 23.5mm !important;
  display: grid !important;
  grid-template-columns: 6.2mm 1fr 1fr !important;
  gap: .35mm !important;
  margin: .05mm auto 0 !important;
  box-sizing: border-box !important;
}

.print-page.per-10 .p-meta-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  height: 3.35mm !important;
  padding: 0 .35mm !important;
  border-radius: 4px !important;
  border: 1px solid #d8cbbd !important;
  background: #fff !important;
  color: #5d5147 !important;
  font-size: 5.3pt !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-meta-cell b {
  font-family: var(--hanja-font) !important;
  font-size: 7pt !important;
  font-weight: 700 !important;
}

.print-page.per-10 .p-rad-cell {
  border-color: #bfd8e4 !important;
  background: #f4fbff !important;
  color: #2f5f7f !important;
}

.print-page.per-10 .p-class-cell {
  border-width: 1.1px !important;
  border-style: solid !important;
}

.print-page.per-10 .p-depth-1 .p-class-cell { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-class-cell { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-class-cell { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-class-cell { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-class-cell { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-class-cell { border-style:dashed !important; }

/* Right content starts after the boxed answer area. */
.print-page.per-10 .p-right {
  padding-top: 1.55mm !important;
  gap: .65mm !important;
}

/* Keep family label away from the answer boxes. */
.print-page.per-10 .p-family-label {
  top: .65mm !important;
  right: 1.35mm !important;
  transform: translateY(-100%) !important;
}

/* If label would be too aggressive, keep it small. */
.print-page.per-10 .p-family-label {
  font-size: 5pt !important;
  padding: .18mm .55mm !important;
}


/* v45: answer strip, meta bottom, larger examples */

/* Keep the top of right side visually empty to mirror the number row.
   This creates a calm quiz buffer before the answer boxes. */
.print-page.per-10 .p-right {
  padding-top: .75mm !important;
  gap: .68mm !important;
}

.print-page.per-10 .p-top-strip {
  height: 3.4mm !important;
  border-bottom: .45px solid #eadfd4 !important;
  margin: 0 0 .35mm 0 !important;
  box-sizing: border-box !important;
}

/* Answer boxes are compact and sit at the right, not stretched across the whole card. */
.print-page.per-10 .p-head {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 4.8mm !important;
  padding: 0 !important;
  margin: 0 0 .35mm 0 !important;
  border-bottom: none !important;
}

.print-page.per-10 .p-huneum-fixed {
  width: 54mm !important;
  height: 4.8mm !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 12mm !important;
  column-gap: .65mm !important;
  align-items: stretch !important;
  margin-left: auto !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  height: 4.8mm !important;
  box-sizing: border-box !important;
  border: 1px solid #d6c8bb !important;
  background: #fffdf9 !important;
  color: #120f0c !important;
  font-size: 10.7pt !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-huneum-meaning {
  padding: 0 1mm 0 .8mm !important;
  border-radius: 4px 0 0 4px !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-huneum-sound {
  padding: 0 .75mm !important;
  border-radius: 0 4px 4px 0 !important;
  text-align: right !important;
}

/* Left side: meta goes to bottom because it is low-priority. */
.print-page.per-10 .p-left {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: .28mm !important;
}

.print-page.per-10 .p-char-box {
  width: 21.5mm !important;
  height: 17.2mm !important;
  margin: .08mm auto .06mm !important;
}

.print-page.per-10 .p-equip {
  width: 20.8mm !important;
  height: 20.8mm !important;
  margin: .02mm auto .05mm !important;
}

/* Hide older floating meta. */
.print-page.per-10 .p-rad,
.print-page.per-10 .p-left-tags,
.print-page.per-10 .p-left-meta,
.print-page.per-10 .p-meta-chips {
  display: none !important;
}

.print-page.per-10 .p-meta-grid {
  width: 23.5mm !important;
  display: grid !important;
  grid-template-columns: 5.8mm 1fr 1fr !important;
  gap: .25mm !important;
  margin-top: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  padding-top: .25mm !important;
}

.print-page.per-10 .p-meta-cell {
  height: 3.05mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  padding: 0 .25mm !important;
  border-radius: 3px !important;
  border: 1px solid #d8cbbd !important;
  background: #fff !important;
  color: #5d5147 !important;
  font-size: 5.05pt !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-meta-cell b {
  font-family: var(--hanja-font) !important;
  font-size: 6.6pt !important;
  font-weight: 700 !important;
}

.print-page.per-10 .p-rad-cell {
  border-color: #bfd8e4 !important;
  background: #f6fbff !important;
  color: #2f5f7f !important;
}

.print-page.per-10 .p-class-cell {
  border-width: 1.05px !important;
  border-style: solid !important;
}

.print-page.per-10 .p-depth-1 .p-class-cell { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-class-cell { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-class-cell { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-class-cell { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-class-cell { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-class-cell { border-style:dashed !important; }

/* More space and larger example/word text. */
.print-page.per-10 .p-struct,
.print-page.per-10 .p-examples {
  padding-top: .92mm !important;
  padding-bottom: .92mm !important;
}

.print-page.per-10 .p-section-title {
  font-size: 7.15pt !important;
}

.print-page.per-10 .p-bullet,
.print-page.per-10 .p-bullet-text,
.print-page.per-10 .p-struct-result-line .p-arrow,
.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 7.5pt !important;
  line-height: 1.18 !important;
}

.print-page.per-10 .p-ex {
  font-size: 7.75pt !important;
  line-height: 1.24 !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  font-size: 1.38em !important;
  font-weight: 800 !important;
  font-family: var(--hanja-font) !important;
}

/* Review area a little more readable. */
.print-page.per-10 .p-review {
  font-size: 7.85pt !important;
  min-height: 8.6mm !important;
  padding-top: .65mm !important;
}

.print-page.per-10 .p-checks {
  gap: 1.2mm !important;
}

.print-page.per-10 .p-memo {
  margin-top: .58mm !important;
  min-height: 3.3mm !important;
}

/* Family label should not invade the answer box. */
.print-page.per-10 .p-family-label {
  top: .55mm !important;
  right: 1.25mm !important;
  font-size: 4.8pt !important;
  padding: .15mm .5mm !important;
}


/* v52: answer-slot-only adjustment
   Only the meaning/sound answer area is adjusted. Card structure is otherwise v51/v45 stable. */

/* Right top buffer: preserve quiz pause, but make it lighter and consistent. */
.print-page.per-10 .p-top-strip {
  height: 2.8mm !important;
  border-bottom: .35px solid #eee4da !important;
  margin: 0 0 .3mm 0 !important;
}

/* Answer row: compact, fixed-position, right aligned. */
.print-page.per-10 .p-head {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 5.2mm !important;
  height: 5.2mm !important;
  padding: 0 !important;
  margin: 0 0 .45mm 0 !important;
  border-bottom: none !important;
}

/* Meaning and sound live in two fixed virtual/soft slots.
   The sound column is fixed so [고], [창], [단] line up card-to-card. */
.print-page.per-10 .p-huneum-fixed {
  width: 52mm !important;
  height: 5.1mm !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 12mm !important;
  column-gap: .7mm !important;
  align-items: stretch !important;
  margin-left: auto !important;
  box-sizing: border-box !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  height: 5.1mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  box-sizing: border-box !important;
  border: 1px solid #d8cbbd !important;
  background: #fffdf9 !important;
  color: #120f0c !important;
  font-size: 10.9pt !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-page.per-10 .p-huneum-meaning {
  padding: 0 1.05mm 0 .8mm !important;
  text-align: right !important;
  border-radius: 4px 0 0 4px !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-huneum-sound {
  padding: 0 .85mm !important;
  text-align: right !important;
  border-radius: 0 4px 4px 0 !important;
  justify-content: center !important;
}

/* Keep answer row from touching structure area. */
.print-page.per-10 .p-right {
  gap: .72mm !important;
}


/* v53: left-anchor-only adjustment + preview workflow base.
   Keep v52 answer slots and overall stable skeleton. Only tighten the left anchor stack. */
.print-page.per-10 .print-card {
  grid-template-columns: 26.5mm minmax(0, 1fr) !important;
}

.print-page.per-10 .p-left {
  padding: .72mm .75mm .55mm 1mm !important;
  gap: .22mm !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

.print-page.per-10 .p-char-box {
  width: 21.6mm !important;
  height: 17.6mm !important;
  margin: .04mm auto .05mm !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 30.5pt !important;
  line-height: .88 !important;
}

.print-page.per-10 .p-equip {
  width: 20.6mm !important;
  height: 20.6mm !important;
  margin: .04mm auto .08mm !important;
}

.print-page.per-10 .p-equip table {
  width: 18.4mm !important;
  height: 18.4mm !important;
  border-spacing: .32mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.48mm !important;
  height: 5.48mm !important;
}

.print-page.per-10 .p-meta-grid {
  margin-top: auto !important;
  width: 23.7mm !important;
  grid-template-columns: 5.8mm 1fr 1fr !important;
  gap: .25mm !important;
}

.print-page.per-10 .p-meta-cell {
  height: 3.05mm !important;
  font-size: 5.05pt !important;
}


/* v54: virtual answer slots. No heavy answer boxes.
   Stable v53 skeleton stays intact. */

/* Slightly reduce top blank line so answer/story group feels closer. */
.print-page.per-10 .p-top-strip {
  height: 2.2mm !important;
  border-bottom: .35px solid #efe6dd !important;
  margin-bottom: .15mm !important;
}

/* Answer block is a virtual two-column grid. */
.print-page.per-10 .p-head {
  min-height: 8.7mm !important;
  height: 8.7mm !important;
  align-items: start !important;
  margin: 0 0 .25mm 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
}

.print-page.per-10 .p-huneum-fixed {
  width: 52mm !important;
  height: 8.4mm !important;
  margin-left: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 11.5mm !important;
  grid-template-rows: 4.25mm 3.55mm !important;
  column-gap: .85mm !important;
  row-gap: .25mm !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound,
.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  line-height: 1 !important;
  color: #120f0c !important;
}

/* Meaning side: right aligned, like a fixed invisible answer slot. */
.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-meaning2 {
  justify-content: flex-end !important;
  text-align: right !important;
  padding-right: 1.05mm !important;
  text-overflow: ellipsis !important;
  border-bottom: .35px solid #eee5dc !important;
}

/* Sound side: fixed width, centered. */
.print-page.per-10 .p-huneum-sound,
.print-page.per-10 .p-huneum-sound2 {
  justify-content: center !important;
  text-align: center !important;
  border-left: .35px solid #e7ddd3 !important;
  border-bottom: .35px solid #eee5dc !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  font-size: 11.2pt !important;
  font-weight: 950 !important;
}

.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  font-size: 9.3pt !important;
  font-weight: 800 !important;
  color: #5a5048 !important;
}

/* If there is no second row, keep the second row invisible but reserve alignment space. */
.print-page.per-10 .p-huneum-fixed:not(.has-second-row) .p-huneum-meaning2,
.print-page.per-10 .p-huneum-fixed:not(.has-second-row) .p-huneum-sound2 {
  opacity: 0 !important;
}

/* Structure gets a tiny bit more room after answer boxes became lighter. */
.print-page.per-10 .p-struct {
  flex: 1 1 auto !important;
  min-height: 22mm !important;
}


/* v55: story/word balance adjustment.
   Stable v54 skeleton and answer slots stay intact. */

/* Structure area gets priority, like the PPT reference's large explanation area. */
.print-page.per-10 .p-struct {
  flex: 1 1 auto !important;
  min-height: 23.5mm !important;
  padding: .95mm 1.05mm !important;
}

/* Make the structure title lighter and less boxy. */
.print-page.per-10 .p-struct .p-section-title {
  margin-bottom: .55mm !important;
  font-size: 7.05pt !important;
  background: #f6eee6 !important;
}

/* The explanation text should feel like main content, not tiny metadata. */
.print-page.per-10 .p-bullet,
.print-page.per-10 .p-bullet-text,
.print-page.per-10 .p-struct-result-line .p-arrow,
.print-page.per-10 .p-struct-result-line .p-meaning {
  font-size: 7.55pt !important;
  line-height: 1.2 !important;
}

/* Word/example section becomes a compact bottom context strip. */
.print-page.per-10 .p-examples {
  flex: 0 0 auto !important;
  min-height: 5.9mm !important;
  padding: .52mm .95mm !important;
  display: flex !important;
  align-items: center !important;
  gap: .8mm !important;
  border-left-color: #5f879d !important;
  background: #fff !important;
}

.print-page.per-10 .p-examples .p-section-title {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: .22mm .75mm !important;
  border-radius: 999px !important;
  background: #eef7fb !important;
  color: #3b657d !important;
  font-size: 7pt !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

/* In print, label should read simply as 단어. */
.print-page.per-10 .p-examples .p-section-title {
  font-size: 0 !important;
}
.print-page.per-10 .p-examples .p-section-title::after {
  content: "단어" !important;
  font-size: 7pt !important;
}

.print-page.per-10 .p-ex {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font-size: 7.9pt !important;
  line-height: 1.08 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  font-family: var(--hanja-font) !important;
  font-size: 1.38em !important;
  font-weight: 800 !important;
}

/* Empty word area should not create a huge blank block. */
.print-page.per-10 .empty-examples {
  display: none !important;
}

/* Review/memo stays, but becomes a thin footer rather than a big block. */
.print-page.per-10 .p-review {
  flex: 0 0 6.2mm !important;
  min-height: 6.2mm !important;
  margin-top: 0 !important;
  padding: .42mm 0 0 0 !important;
  font-size: 6.95pt !important;
  line-height: 1.18 !important;
  color: #6d5f53 !important;
  border-top: 1px dashed #d2c5b8 !important;
}

.print-page.per-10 .p-checks {
  display: flex !important;
  justify-content: space-between !important;
  gap: .7mm !important;
  white-space: nowrap !important;
}

.print-page.per-10 .p-memo {
  margin-top: .35mm !important;
  font-size: 6.8pt !important;
}


/* v56: split meta closer to PPT reference.
   Top = #number + depth/class.
   Bottom = radical + liushu only. */

/* Top left mini row now carries the class. */
.print-page.per-10 .p-no-topmeta {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 7mm minmax(0, 1fr) !important;
  gap: .55mm !important;
  align-items: center !important;
  font-size: 6.35pt !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.print-page.per-10 .p-no-topmeta .p-global,
.print-page.per-10 .p-no-topmeta .p-topclass {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  height: 3.25mm !important;
  border: 1px solid #d8cbbd !important;
  border-radius: 3px !important;
  background: #fff !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-weight: 900 !important;
}

.print-page.per-10 .p-no-topmeta .p-global {
  color: #111 !important;
}

.print-page.per-10 .p-no-topmeta .p-topclass {
  color: #4f453c !important;
}

/* Class color now appears at the top, not bottom. */
.print-page.per-10 .p-depth-1 .p-no-topmeta .p-topclass { background:#ffe3e3 !important; border-color:#c92929 !important; color:#8f1c1c !important; }
.print-page.per-10 .p-depth-2 .p-no-topmeta .p-topclass { background:#dcecff !important; border-color:#146ac2 !important; color:#064e9b !important; }
.print-page.per-10 .p-depth-3 .p-no-topmeta .p-topclass { background:#dcf4e6 !important; border-color:#16834f !important; color:#075d36 !important; }
.print-page.per-10 .p-depth-4 .p-no-topmeta .p-topclass { background:#ffe9cc !important; border-color:#cc7414 !important; color:#934e0b !important; }
.print-page.per-10 .p-depth-5 .p-no-topmeta .p-topclass { background:#eadfff !important; border-color:#7044b3 !important; color:#4f2b8a !important; }
.print-page.per-10 .p-independent .p-no-topmeta .p-topclass { border-style:dashed !important; }

/* Bottom meta now has only radical + liushu. */
.print-page.per-10 .p-meta-bottom2 {
  width: 23.7mm !important;
  grid-template-columns: 7.2mm minmax(0, 1fr) !important;
  gap: .35mm !important;
}

.print-page.per-10 .p-meta-bottom2 .p-meta-cell {
  height: 3.15mm !important;
  font-size: 5.25pt !important;
}

.print-page.per-10 .p-meta-bottom2 .p-rad-cell b {
  font-size: 6.9pt !important;
}

.print-page.per-10 .p-meta-bottom2 .p-liushu-cell {
  font-size: 5.4pt !important;
}

/* Because the top row is slightly taller, keep the anchor stack balanced. */
.print-page.per-10 .p-left {
  gap: .24mm !important;
}

.print-page.per-10 .p-char-box {
  height: 17.3mm !important;
}

.print-page.per-10 .p-equip {
  height: 20.35mm !important;
}


/* v57: right-top parent strip.
   Use the previously blank strip as a low-priority parent lineage cue. */

/* Parent strip replaces blank line, but remains visually quiet. */
.print-page.per-10 .p-parent-strip {
  height: 2.65mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 .3mm 0 0 !important;
  border-bottom: .35px solid #efe6dd !important;
  margin-bottom: .05mm !important;
  color: #7a6c61 !important;
  font-size: 5.9pt !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background: transparent !important;
}

/* Keep the answer block close to the parent strip. */
.print-page.per-10 .p-head {
  margin-top: 0 !important;
}


/* v58: parent strip is an address chain only: 日 - 旦 */
.print-page.per-10 .p-parent-strip {
  font-family: var(--hanja-font), "Noto Serif CJK KR", serif !important;
  font-size: 6.4pt !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  color: #5f554d !important;
}

.print-page.per-10 .p-parent-strip::before {
  content: "" !important;
}


/* v59: clean bottom. Remove review/memo, word only, meta half-half aligned to character width. */

/* Kill any review footer that might survive from older HTML/CSS. */
.print-page.per-10 .p-review,
.print-page.per-10 .p-checks,
.print-page.per-10 .p-memo {
  display: none !important;
}

/* With review gone, structure can occupy the remaining lower space. */
.print-page.per-10 .p-struct {
  flex: 1 1 auto !important;
  min-height: 27.5mm !important;
}

/* Word strip stays as final context, no reading/translation parentheses because JS strips them. */
.print-page.per-10 .p-examples {
  flex: 0 0 6.4mm !important;
  min-height: 6.4mm !important;
  margin-top: auto !important;
}

.print-page.per-10 .p-ex {
  font-size: 8.2pt !important;
  font-weight: 800 !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  font-size: 1.42em !important;
}

/* Bottom left radical/liushu: exactly half-half and same horizontal width as Hanja box. */
.print-page.per-10 .p-meta-bottom2,
.print-page.per-10 .p-meta-grid {
  width: 21.6mm !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .35mm !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.print-page.per-10 .p-meta-bottom2 .p-meta-cell,
.print-page.per-10 .p-meta-grid .p-meta-cell {
  height: 3.2mm !important;
  font-size: 5.55pt !important;
}

.print-page.per-10 .p-meta-bottom2 .p-rad-cell b,
.print-page.per-10 .p-meta-grid .p-rad-cell b {
  font-size: 7pt !important;
}

/* Keep left stack optically aligned after the meta width shrink. */
.print-page.per-10 .p-char-box {
  width: 21.6mm !important;
}

.print-page.per-10 .p-equip {
  width: 21.6mm !important;
}


/* v60: relaxed vertical spacing only.
   Keep v59 structure, but open up cramped vertical gaps. */

/* Left column: add breathing room between number/class -> Hanja -> equipment -> radical/liushu. */
.print-page.per-10 .p-left {
  gap: .55mm !important;
  padding-top: .78mm !important;
  padding-bottom: .62mm !important;
}

.print-page.per-10 .p-no-topmeta {
  margin-bottom: .42mm !important;
}

.print-page.per-10 .p-char-box {
  height: 16.85mm !important;
  margin-top: .12mm !important;
  margin-bottom: .5mm !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 30.2pt !important;
}

.print-page.per-10 .p-equip {
  height: 19.85mm !important;
  margin-top: .25mm !important;
  margin-bottom: .62mm !important;
}

.print-page.per-10 .p-equip table {
  width: 18.05mm !important;
  height: 18.05mm !important;
}

.print-page.per-10 .p-meta-grid,
.print-page.per-10 .p-meta-bottom2 {
  margin-top: .35mm !important;
}

/* Right column: move meaning/sound slightly down from the parent address line. */
.print-page.per-10 .p-parent-strip,
.print-page.per-10 .p-top-strip {
  height: 3.05mm !important;
  margin-bottom: .55mm !important;
}

.print-page.per-10 .p-head {
  margin-top: .35mm !important;
  margin-bottom: .65mm !important;
}

/* Slightly compress story just enough to pay for the new air above. */
.print-page.per-10 .p-struct {
  min-height: 26.1mm !important;
}

/* Word strip remains clean but not glued to story. */
.print-page.per-10 .p-examples {
  margin-top: .55mm !important;
}


/* v61: true row-aligned layout.
   Row 2: Hanja area and meaning/sound area share identical top/bottom.
   Row 3: Equipment/character area and structured story area share identical top/bottom. */

.print-page.per-10 .print-card {
  display: grid !important;
  grid-template-columns: 26.8mm minmax(0, 1fr) !important;
  grid-template-rows: 4.3mm 16.9mm minmax(0, 1fr) 6.45mm !important;
  gap: .65mm .9mm !important;
  padding: .75mm 1.1mm .7mm 1mm !important;
  box-sizing: border-box !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

/* Let children of old left/right wrappers become grid items. */
.print-page.per-10 .p-left,
.print-page.per-10 .p-right {
  display: contents !important;
}

/* Row 1 */
.print-page.per-10 .p-no-topmeta {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  align-self: stretch !important;
  width: 100% !important;
}

.print-page.per-10 .p-parent-strip,
.print-page.per-10 .p-top-strip {
  grid-column: 2 !important;
  grid-row: 1 !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 .4mm 0 0 !important;
}

/* Row 2: Hanja and huneum same top/bottom. */
.print-page.per-10 .p-char-box {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 30.5pt !important;
  line-height: .88 !important;
}

.print-page.per-10 .p-head {
  grid-column: 2 !important;
  grid-row: 2 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  border: none !important;
}

/* The virtual answer slots fill the same row height as the Hanja box. */
.print-page.per-10 .p-huneum-fixed {
  width: 52mm !important;
  height: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 11.5mm !important;
  grid-template-rows: 1fr 1fr !important;
  column-gap: .85mm !important;
  row-gap: .45mm !important;
  align-items: stretch !important;
  margin-left: auto !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound,
.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  border-bottom: .35px solid #eee5dc !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  font-size: 11.4pt !important;
}

.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  font-size: 9.45pt !important;
}

/* Row 3: equipment/character and story same top/bottom. */
.print-page.per-10 .p-equip {
  grid-column: 1 !important;
  grid-row: 3 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.print-page.per-10 .p-equip table {
  width: 19.2mm !important;
  height: 19.2mm !important;
  border-spacing: .34mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.72mm !important;
  height: 5.72mm !important;
}

.print-page.per-10 .p-struct {
  grid-column: 2 !important;
  grid-row: 3 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
  overflow: hidden !important;
  padding: .95mm 1.05mm !important;
}

/* Row 4 */
.print-page.per-10 .p-meta-grid,
.print-page.per-10 .p-meta-bottom2 {
  grid-column: 1 !important;
  grid-row: 4 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

.print-page.per-10 .p-meta-grid .p-meta-cell,
.print-page.per-10 .p-meta-bottom2 .p-meta-cell {
  height: 100% !important;
}

.print-page.per-10 .p-examples {
  grid-column: 2 !important;
  grid-row: 4 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: none !important;
  margin: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
}

/* Old hidden/removed parts should not occupy grid. */
.print-page.per-10 .p-review,
.print-page.per-10 .p-lineage {
  display: none !important;
}

/* Keep family labels above grid without consuming row space. */
.print-page.per-10 .p-family-label,
.print-page.per-10 .p-group-label {
  position: absolute !important;
}


/* v62: huneum pairing fix + family visualization disabled. */
.print-page.per-10 .p-family-label,
.print-page.per-10 .p-family-rail,
.print-page.per-10 .family-rail,
.print-page.per-10 .family-start::before,
.print-page.per-10 .family-start::after,
.print-page.per-10 .family-member::before,
.print-page.per-10 .family-member::after {
  display: none !important;
  content: none !important;
}

/* Keep second row visible whenever either meaning or sound has multiple entries. */
.print-page.per-10 .p-huneum-fixed.has-second-row .p-huneum-meaning2,
.print-page.per-10 .p-huneum-fixed.has-second-row .p-huneum-sound2 {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Actual output label is 단어; avoid legacy pseudo-label override. */
.print-page.per-10 .p-examples .p-section-title {
  font-size: 7pt !important;
}
.print-page.per-10 .p-examples .p-section-title::after {
  content: none !important;
}


/* v63: 10-up print bottom-safe correction.
   Keep row alignment and two-line huneum, but reserve real bottom space
   so the word strip cannot touch or cross the printable page edge. */

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 8mm 10mm 8mm !important;
  }

  /* 297 - 8 top - 10 bottom = 279mm printable height. */
  .print-page {
    height: 279mm !important;
    max-height: 279mm !important;
    min-height: 279mm !important;
    overflow: hidden !important;
  }

  .print-page.per-10 {
    height: 279mm !important;
    max-height: 279mm !important;
    min-height: 279mm !important;
    padding-bottom: 1.2mm !important;
    box-sizing: border-box !important;
  }
}

/* Slightly more conservative row budget within every 10-up card. */
.print-page.per-10 .print-card {
  grid-template-rows:
    4.05mm
    16.15mm
    minmax(0, 1fr)
    5.65mm !important;
  row-gap: .52mm !important;
  column-gap: .85mm !important;
  padding: .58mm 1mm .62mm .92mm !important;
  min-height: 0 !important;
  max-height: 100% !important;
  box-sizing: border-box !important;
}

/* Keep Hanja and huneum perfectly row-aligned at the reduced height. */
.print-page.per-10 .p-char-box,
.print-page.per-10 .p-head {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 29.5pt !important;
}

/* Two huneum rows still remain, but use the smaller shared row safely. */
.print-page.per-10 .p-huneum-fixed {
  height: 100% !important;
  grid-template-rows: 1fr 1fr !important;
  row-gap: .28mm !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  font-size: 10.9pt !important;
}

.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  font-size: 8.85pt !important;
}

/* Story/equipment row must be allowed to shrink instead of pushing row 4 off-page. */
.print-page.per-10 .p-equip,
.print-page.per-10 .p-struct {
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-equip table {
  width: 18.5mm !important;
  height: 18.5mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.5mm !important;
  height: 5.5mm !important;
}

/* Final row is a strict border-box; no legacy min-height may enlarge it. */
.print-page.per-10 .p-meta-grid,
.print-page.per-10 .p-meta-bottom2,
.print-page.per-10 .p-examples {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-examples {
  padding: .38mm .82mm !important;
  gap: .65mm !important;
}

.print-page.per-10 .p-examples .p-section-title {
  padding: .18mm .62mm !important;
  font-size: 6.6pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-ex {
  font-size: 7.45pt !important;
  line-height: 1 !important;
  min-width: 0 !important;
  max-height: 100% !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  font-size: 1.34em !important;
}

/* Ensure bottom borders and content never bleed outside a card. */
.print-page.per-10 .print-card:last-child,
.print-page.per-10 .p-examples,
.print-page.per-10 .p-meta-grid {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}


/* v64: real-browser print fix.
   Do not fill the whole printable page height.
   Ten-up pages use five fixed 51mm rows, leaving generous bottom clearance. */

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm !important;
  }

  html,
  body,
  .print-area {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .print-page,
  .print-page.per-10 {
    width: 194mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .print-page.per-10 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(5, 51mm) !important;
    grid-auto-rows: 51mm !important;
    gap: 0 !important;
    align-content: start !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .print-page.per-10:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .print-page.per-10 .print-card {
    height: 51mm !important;
    min-height: 51mm !important;
    max-height: 51mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    overflow: hidden !important;
  }
}

/* Exact internal budget for a 51mm card.
   The word row is protected instead of being the first area compressed. */
.print-page.per-10 .print-card {
  grid-template-rows:
    4mm
    15.7mm
    22.65mm
    6.15mm !important;
  row-gap: .35mm !important;
  column-gap: .8mm !important;
  padding: .45mm .85mm .45mm .85mm !important;
  box-sizing: border-box !important;
}

/* Shared Hanja/huneum row. */
.print-page.per-10 .p-char-box,
.print-page.per-10 .p-head {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-char-box .p-char {
  font-size: 28.8pt !important;
  line-height: .86 !important;
}

.print-page.per-10 .p-huneum-fixed {
  height: 100% !important;
  min-height: 0 !important;
  grid-template-rows: 1fr 1fr !important;
  row-gap: .22mm !important;
}

.print-page.per-10 .p-huneum-meaning,
.print-page.per-10 .p-huneum-sound {
  font-size: 10.55pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-huneum-meaning2,
.print-page.per-10 .p-huneum-sound2 {
  font-size: 8.55pt !important;
  line-height: 1 !important;
}

/* Shared equipment/story row. */
.print-page.per-10 .p-equip,
.print-page.per-10 .p-struct {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-equip table {
  width: 18.1mm !important;
  height: 18.1mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.38mm !important;
  height: 5.38mm !important;
}

/* Protected final row: radical/liushu and word always occupy the full 6.15mm. */
.print-page.per-10 .p-meta-grid,
.print-page.per-10 .p-meta-bottom2,
.print-page.per-10 .p-examples {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-examples {
  display: flex !important;
  align-items: center !important;
  gap: .65mm !important;
  padding-left: .78mm !important;
  padding-right: .78mm !important;
}

.print-page.per-10 .p-examples .p-section-title {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: .17mm .58mm !important;
  font-size: 6.45pt !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-ex {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 7.35pt !important;
  line-height: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  font-size: 1.3em !important;
  line-height: .95 !important;
}


/* v65: fix the ACTUAL clipped word row shown in browser print preview.
   Root cause: legacy column layout + p-ex bullet, not merely page height. */

@media print {
  .print-page.per-10 {
    grid-template-rows: repeat(5, 54mm) !important;
    grid-auto-rows: 54mm !important;
    align-content: start !important;
  }

  .print-page.per-10 .print-card {
    height: 54mm !important;
    min-height: 54mm !important;
    max-height: 54mm !important;
  }
}

/* Exact 54mm card budget including border, padding, and gaps. */
.print-page.per-10 .print-card {
  grid-template-rows:
    4mm
    16mm
    24.6mm
    6.6mm !important;
  row-gap: .4mm !important;
  column-gap: .8mm !important;
  padding: .45mm .85mm !important;
  box-sizing: border-box !important;
}

/* Word row: force a genuine single horizontal line.
   This overrides all earlier inherited flex-direction/stacking rules. */
.print-page.per-10 .p-examples {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: .7mm !important;

  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;

  margin: 0 !important;
  padding: .35mm .78mm !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Compact left label. */
.print-page.per-10 .p-examples .p-section-title {
  position: static !important;
  float: none !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;

  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: .18mm .58mm !important;

  font-size: 6.25pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Remove the old bullet that caused a second visual line. */
.print-page.per-10 .p-ex::before,
.print-page.per-10 .p-ex::after {
  content: none !important;
  display: none !important;
}

/* Word itself: one line, left aligned, smaller Hanja. */
.print-page.per-10 .p-ex {
  position: static !important;
  display: block !important;
  flex: 1 1 auto !important;

  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;

  font-size: 7.05pt !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: left !important;
  text-indent: 0 !important;

  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-ex .hanja-inline {
  display: inline !important;
  vertical-align: baseline !important;
  font-size: 1.15em !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep the paired bottom-left row equal to the word row. */
.print-page.per-10 .p-meta-grid,
.print-page.per-10 .p-meta-bottom2 {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Reinvest added card height mainly into the equipment/story row. */
.print-page.per-10 .p-equip table {
  width: 19mm !important;
  height: 19mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.65mm !important;
  height: 5.65mm !important;
}


/* v66 FINAL PRINT GEOMETRY
   A4 margin 5mm -> usable area 200 x 287mm.
   Cards: 5 rows x 56.6mm = 283mm, leaving only 4mm safety.
   Map: one fixed 287mm page, border-box, never spills to a second page. */

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm !important;
  }

  html,
  body,
  body .print-area {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body .print-area > .print-page {
    width: 200mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  /* Map must be exactly one physical page. */
  body .print-area > .print-map-page.simple-map-page {
    position: relative !important;
    display: block !important;
    width: 200mm !important;
    height: 287mm !important;
    min-height: 287mm !important;
    max-height: 287mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
    break-after: page !important;
    page-break-after: always !important;
  }

  /* 10 cards use nearly all remaining vertical space. */
  body .print-area > .print-page.per-10 {
    display: grid !important;
    width: 200mm !important;
    height: 283mm !important;
    min-height: 283mm !important;
    max-height: 283mm !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(5, 56.6mm) !important;
    grid-auto-rows: 56.6mm !important;
    gap: 0 !important;
    padding: 0 !important;
    align-content: start !important;
    overflow: hidden !important;
    break-after: page !important;
    page-break-after: always !important;
  }

  body .print-area > .print-page.per-10:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  body .print-area > .print-page.per-10 > .print-card {
    height: 56.6mm !important;
    min-height: 56.6mm !important;
    max-height: 56.6mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

/* Preview uses the same geometry as print. */
body.print-preview .print-page.per-10 {
  width: 200mm !important;
  grid-template-rows: repeat(5, 56.6mm) !important;
  grid-auto-rows: 56.6mm !important;
}

body.print-preview .print-page.per-10 .print-card {
  height: 56.6mm !important;
  min-height: 56.6mm !important;
  max-height: 56.6mm !important;
}

/* 56.6mm card internal budget.
   4 + 16.5 + 26.65 + 7 + 3 gaps(.45) + padding(.55x2) = 56.6 */
.print-page.per-10 .print-card {
  grid-template-rows:
    4mm
    16.5mm
    26.65mm
    7mm !important;
  row-gap: .45mm !important;
  column-gap: .85mm !important;
  padding: .55mm .9mm !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Word row: one horizontal line with reading restored. */
.print-page.per-10 .p-examples {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: .65mm !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: .35mm .78mm !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.print-page.per-10 .p-examples .p-section-title {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: .17mm .55mm !important;
  font-size: 6.15pt !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.print-page.per-10 .p-ex {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  gap: .45mm !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  text-align: left !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-ex::before,
.print-page.per-10 .p-ex::after {
  content: none !important;
  display: none !important;
}

.print-page.per-10 .p-word-hanja {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  font-family: var(--hanja-font) !important;
  font-size: 8.1pt !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.print-page.per-10 .p-word-hanja .hanja-inline {
  font-size: 1em !important;
  line-height: 1 !important;
}

.print-page.per-10 .p-word-reading {
  flex: 0 0 auto !important;
  font-size: 5.75pt !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #6f6258 !important;
  white-space: nowrap !important;
}

/* Reinvest expanded card height into the paired equipment/story row. */
.print-page.per-10 .p-equip,
.print-page.per-10 .p-struct {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.print-page.per-10 .p-equip table {
  width: 19.4mm !important;
  height: 19.4mm !important;
}

.print-page.per-10 .p-equip td {
  width: 5.78mm !important;
  height: 5.78mm !important;
}

/* MAP: absolute internal regions so header/footer cannot add to page height. */
.print-map-page.simple-map-page .map-page-head.simple-map-head {
  position: absolute !important;
  top: 3mm !important;
  left: 4mm !important;
  right: 4mm !important;
  height: 11mm !important;
  margin: 0 !important;
  padding: 0 0 1.2mm !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.print-map-page.simple-map-page .map-kicker {
  font-size: 6.6pt !important;
  line-height: 1 !important;
}

.print-map-page.simple-map-page .simple-map-head h1 {
  margin: .6mm 0 0 !important;
  font-size: 16.5pt !important;
  line-height: 1 !important;
}

.print-map-page.simple-map-page .map-forest.simple-map-forest {
  position: absolute !important;
  top: 16mm !important;
  bottom: 10mm !important;
  left: 4mm !important;
  right: 4mm !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  column-fill: auto !important;
  column-rule: .5px solid #eadfd4 !important;
  box-sizing: border-box !important;
}

.print-map-page.map-density-normal .simple-map-forest {
  column-count: 3 !important;
  column-gap: 4mm !important;
}

.print-map-page.map-density-dense .simple-map-forest {
  column-count: 4 !important;
  column-gap: 3mm !important;
}

.print-map-page.map-density-ultra .simple-map-forest {
  column-count: 5 !important;
  column-gap: 2.4mm !important;
}

.print-map-page.simple-map-page .map-root-block,
.print-map-page.simple-map-page .map-node,
.print-map-page.simple-map-page .map-node ul {
  break-inside: auto !important;
  page-break-inside: auto !important;
}

.print-map-page.simple-map-page .map-root-block {
  margin: 0 0 .7mm !important;
}

.print-map-page.simple-map-page .map-node ul {
  margin-left: 2.3mm !important;
  padding-left: 1.35mm !important;
}

.print-map-page.simple-map-page .map-node-line {
  min-height: 3.35mm !important;
  margin: .22mm 0 !important;
  padding: .2mm .45mm !important;
  gap: .5mm !important;
  border-radius: 3px !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  overflow: hidden !important;
}

.print-map-page.simple-map-page .map-char {
  min-width: 3.8mm !important;
  font-size: 9.4pt !important;
  line-height: .95 !important;
}

.print-map-page.simple-map-page .map-name {
  min-width: 0 !important;
  font-size: 5.65pt !important;
  line-height: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.print-map-page.simple-map-page .map-class {
  flex: 0 0 auto !important;
  font-size: 4.6pt !important;
  line-height: 1 !important;
  padding: .17mm .38mm !important;
  white-space: nowrap !important;
}

.print-map-page.map-density-dense .map-node-line {
  min-height: 3.05mm !important;
  margin: .16mm 0 !important;
  padding: .14mm .35mm !important;
}

.print-map-page.map-density-dense .map-char {
  min-width: 3.4mm !important;
  font-size: 8.6pt !important;
}

.print-map-page.map-density-dense .map-name {
  font-size: 5.15pt !important;
}

.print-map-page.map-density-dense .map-class {
  font-size: 4.2pt !important;
}

.print-map-page.map-density-ultra .map-node-line {
  min-height: 2.75mm !important;
  margin: .11mm 0 !important;
  padding: .1mm .28mm !important;
}

.print-map-page.map-density-ultra .map-char {
  min-width: 3.1mm !important;
  font-size: 7.9pt !important;
}

.print-map-page.map-density-ultra .map-name {
  font-size: 4.7pt !important;
}

.print-map-page.map-density-ultra .map-class {
  font-size: 3.9pt !important;
  padding: .12mm .25mm !important;
}

.print-map-page.simple-map-page .map-footer-legend {
  position: absolute !important;
  left: 4mm !important;
  right: 4mm !important;
  bottom: 2.6mm !important;
  height: 5.5mm !important;
  margin: 0 !important;
  padding: .8mm 0 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  gap: 1.2mm !important;
  font-size: 5.2pt !important;
  white-space: nowrap !important;
}



/* v67: top-level home, dictionary/favorites SPA, search-on-demand, inline edits, iPad mini 5 landscape */
#app { display: none !important; }
:root {
  --v67-nav: #171a1f;
  --v67-nav-2: #242933;
  --v67-paper: #fffefb;
  --v67-soft: #f3eee7;
  --v67-blue: #2f6488;
  --v67-green: #176846;
  --v67-gold: #ad762e;
  --v67-red: #a23b3b;
}
body {
  min-width: 320px;
  overflow: hidden;
  background: #e9e4dc !important;
}
.modern-app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  color: var(--ink);
}
.modern-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: linear-gradient(90deg, var(--v67-nav), var(--v67-nav-2));
  color: #fff;
  box-shadow: 0 3px 18px rgba(0,0,0,.18);
  z-index: 70;
}
.modern-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.modern-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px;
  font-family: var(--hanja-font);
  font-size: 22px;
  background: rgba(255,255,255,.08);
}
.modern-nav { display: flex; justify-content: center; gap: 5px; }
.modern-nav button,
.modern-icon-btn {
  border: 0;
  color: #dfe5ec;
  background: transparent;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}
.modern-nav button.active { color: #fff; background: rgba(255,255,255,.14); }
.modern-icon-btn:hover,
.modern-nav button:hover { background: rgba(255,255,255,.1); }
.modern-top-actions { display: flex; align-items: center; gap: 4px; }
.modern-main {
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}
.modern-view { height: 100%; min-height: 0; }

/* Home */
.home-view {
  height: 100%;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}
.home-panel { width: min(920px, 100%); }
.home-kicker { color: #6b6259; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.home-title { margin: 8px 0 6px; font-size: clamp(32px, 5vw, 58px); letter-spacing: -.06em; }
.home-sub { margin: 0 0 24px; color: #71685f; font-size: 15px; }
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-tile {
  border: 1px solid #d5c9bc;
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  padding: 25px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(60,48,35,.10);
  transition: transform .16s ease, box-shadow .16s ease;
  text-align: left;
}
.home-tile:hover { transform: translateY(-3px); box-shadow: 0 20px 45px rgba(60,48,35,.15); }
.home-tile-icon { font-family: var(--hanja-font); font-size: 67px; line-height: 1; }
.home-tile h2 { margin: 14px 0 5px; font-size: 25px; }
.home-tile p { margin: 0; color: #746b62; line-height: 1.55; }
.home-tile-foot { margin-top: 18px; font-size: 12px; font-weight: 900; color: var(--v67-blue); }
.home-stats { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 8px; }
.home-stat { border: 1px solid #d8ccbf; background: rgba(255,255,255,.7); border-radius: 999px; padding: 7px 11px; font-size: 12px; color: #665d54; }

/* Dictionary */
.dictionary-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 12px;
}
.search-panel {
  min-height: 0;
  border: 1px solid #d4c8bb;
  border-radius: 18px;
  background: rgba(255,253,249,.94);
  display: grid;
  grid-template-rows: auto auto minmax(0,1fr) auto;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(51,40,29,.08);
}
.search-head { padding: 13px 13px 10px; border-bottom: 1px solid #e1d7cc; }
.search-headline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.search-headline strong { font-size: 16px; }
.search-headline span { color: #80766c; font-size: 11px; }
.search-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
.search-type {
  border: 1px solid #d8ccbf;
  background: #fff;
  border-radius: 9px;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 850;
  color: #645a50;
  cursor: pointer;
}
.search-type.active { border-color: #497a9b; background: #eaf4fa; color: #1f587b; }
.search-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.modern-search {
  width: 100%;
  border: 1px solid #cfc2b4;
  border-radius: 11px;
  padding: 10px 11px;
  background: #fff;
  outline: none;
}
.modern-search:focus { border-color: #497a9b; box-shadow: 0 0 0 3px rgba(73,122,155,.12); }
.search-go { border: 0; border-radius: 11px; padding: 0 13px; background: #20242b; color: #fff; font-weight: 900; cursor: pointer; }
.search-tip { padding: 8px 13px; color: #867b70; font-size: 11px; border-bottom: 1px solid #eee6dd; }
.modern-results { min-height: 0; overflow: auto; }
.result-empty { padding: 28px 16px; text-align: center; color: #8a7f73; font-size: 13px; line-height: 1.6; }
.result-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #eee6de;
  width: 100%;
  padding: 9px 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.result-row:hover { background: #fff8ef; }
.result-row.active { background: #e9f2f7; box-shadow: inset 4px 0 #3b7398; }
.result-char { font-family: var(--hanja-font); font-size: 27px; text-align: center; }
.result-huneum { font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-meta { margin-top: 2px; color: #82776c; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-star { color: #d0912c; font-size: 14px; }
.results-more { padding: 9px; border-top: 1px solid #e7ddd3; }
.results-more button { width: 100%; border: 1px solid #d0c4b7; background: #fff; border-radius: 10px; padding: 8px; cursor: pointer; font-weight: 800; color: #5c5147; }
.search-footer { padding: 8px 11px; border-top: 1px solid #e3d9cf; display: flex; justify-content: space-between; color: #7b7167; font-size: 11px; }

.card-stage { min-width: 0; min-height: 0; overflow: hidden; }
.card-placeholder {
  height: 100%;
  border: 1px dashed #cbbfb2;
  border-radius: 20px;
  background: rgba(255,255,255,.58);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
  color: #7d7268;
}
.card-placeholder .placeholder-char { font-family: var(--hanja-font); font-size: 94px; color: #b8aa9b; line-height: 1; }
.card-placeholder h2 { margin: 12px 0 5px; color: #51473f; }

.modern-card {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0,1fr);
  border: 1px solid #cfc2b5;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 36px rgba(48,38,28,.12);
}
.modern-card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  border-bottom: 1px solid #dfd5cb;
  background: #fffefb;
}
.modern-card-id { color: #74695f; font-size: 11px; font-weight: 800; }
.modern-card-actions { display: flex; align-items: center; gap: 5px; }
.card-action {
  border: 1px solid #d5c9bd;
  background: #fff;
  border-radius: 9px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  color: #51473f;
}
.card-action.primary { background: #20242b; color: #fff; border-color: #20242b; }
.card-action.favorite.active { color: #9a651b; background: #fff5dc; border-color: #e3b65f; }
.card-action.danger { color: #8d3838; }
.modern-card-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(225px, 33%) minmax(0, 67%);
}
.modern-form-side {
  min-height: 0;
  overflow: auto;
  background: #f7f2eb;
  border-right: 1px solid #ddd2c6;
  padding: 16px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
}
.modern-big-char-box {
  width: min(190px, 88%);
  aspect-ratio: 1.18 / 1;
  min-height: 134px;
  display: grid;
  place-items: center;
  border: 1px solid #d4c7b9;
  border-radius: 15px;
  background: rgba(255,255,255,.84);
}
.modern-big-char { font-family: var(--hanja-font); font-size: clamp(105px, 13vw, 156px); line-height: .9; }
.modern-left-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.modern-left-tag { border: 1px solid #d8ccbf; background: #fff; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 800; color: #5f554c; }
.modern-form-side .screen-equip-wrap { transform: scale(.82); transform-origin: top center; margin-bottom: -28px; }
.modern-detail-side {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 17px 18px 22px;
  background: var(--v67-paper);
}
.modern-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid #dfd5cb; padding-bottom: 12px; margin-bottom: 11px; }
.modern-huneum { font-size: clamp(27px, 4vw, 43px); line-height: 1.08; font-weight: 950; letter-spacing: -.05em; }
.modern-meta { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px; max-width: 48%; }
.modern-card .section { padding: 11px 13px; margin-top: 9px; border-radius: 11px; }
.modern-card .section-title { font-size: 10px; margin-bottom: 6px; }
.modern-card .structure-main { font-size: 19px; }
.modern-card .structure-line { font-size: 15px; }
.modern-card .structure-meaning { font-size: 16px; }
.modern-card .example { padding: 6px 8px; font-size: 14px; }
.modern-card .study-panel { margin-top: 9px; padding: 10px 12px; border-radius: 11px; }
.modern-card .study-memo { min-height: 42px; }
.modern-card .kinship-box { grid-template-columns: 46px minmax(0,1fr); }
.modern-card .kin-chip { font-size: 11px; padding: 4px 7px; }
.card-nav-strip { display: flex; justify-content: space-between; gap: 7px; width: 100%; margin-top: auto; }
.card-nav-strip button { flex: 1; border: 1px solid #d4c8bb; background: #fff; border-radius: 9px; padding: 7px; font-size: 11px; font-weight: 800; cursor: pointer; }

/* Inline editor */
.inline-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-field { display: flex; flex-direction: column; gap: 4px; }
.edit-field.full { grid-column: 1 / -1; }
.edit-field label { font-size: 11px; color: #6f645a; font-weight: 900; }
.edit-field input,
.edit-field textarea {
  width: 100%;
  border: 1px solid #cec1b3;
  border-radius: 9px;
  padding: 8px 9px;
  background: #fff;
  color: #241f1b;
  line-height: 1.45;
}
.edit-field textarea { resize: vertical; min-height: 62px; }
.edit-note { grid-column: 1 / -1; color: #81766b; font-size: 11px; }

/* Favorites wordbook */
.favorites-view { height: 100%; overflow: auto; padding: 6px 5px 22px; }
.page-heading { max-width: 1120px; margin: 0 auto 12px; display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.page-heading p { margin: 4px 0 0; color: #766c62; font-size: 13px; }
.favorite-grid { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.wordbook-card {
  border: 1px solid #d2c6b9;
  background: rgba(255,255,255,.91);
  border-radius: 15px;
  padding: 13px;
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) auto;
  gap: 12px;
  align-items: start;
  box-shadow: 0 8px 22px rgba(58,46,34,.07);
}
.wordbook-char { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid #d9cdbf; background: #f8f3ec; border-radius: 12px; font-family: var(--hanja-font); font-size: 48px; }
.wordbook-title { font-size: 17px; font-weight: 950; }
.wordbook-words { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.word-chip { border: 1px solid #ded2c5; background: #fffaf2; border-radius: 999px; padding: 4px 7px; font-size: 11px; }
.wordbook-actions { display: flex; flex-direction: column; gap: 5px; }
.wordbook-actions button { border: 1px solid #d5c9bd; background: #fff; border-radius: 8px; padding: 6px 8px; font-size: 11px; cursor: pointer; }
.favorite-empty { max-width: 700px; margin: 80px auto; border: 1px dashed #cdbfb1; background: rgba(255,255,255,.7); border-radius: 18px; padding: 35px; text-align: center; color: #7c7166; }

/* Drawers / settings */
.modern-overlays { position: relative; z-index: 100; }
.modern-backdrop { position: fixed; inset: 0; background: rgba(18,17,16,.38); display: none; z-index: 100; }
.modern-backdrop.open { display: block; }
.modern-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(410px, 92vw);
  background: #fbf8f3;
  border-left: 1px solid #cfc2b5;
  box-shadow: -18px 0 45px rgba(0,0,0,.18);
  transform: translateX(105%);
  transition: transform .18s ease;
  z-index: 110;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
}
.modern-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid #ded3c8; background: #fff; }
.drawer-head strong { font-size: 17px; }
.drawer-close { border: 1px solid #d4c8bc; background: #fff; border-radius: 9px; padding: 6px 9px; cursor: pointer; }
.drawer-body { min-height: 0; overflow: auto; padding: 14px; }
.setting-group { border: 1px solid #dbd0c4; background: #fff; border-radius: 13px; padding: 12px; margin-bottom: 10px; }
.setting-group h3 { margin: 0 0 9px; font-size: 13px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid #f0e9e1; }
.setting-row:first-of-type { border-top: 0; }
.setting-row span { font-size: 12px; color: #62584f; }
.setting-row input { width: 20px; height: 20px; }
.drawer-action { width: 100%; border: 1px solid #d2c6ba; background: #fff; border-radius: 10px; padding: 9px; cursor: pointer; font-weight: 850; margin-top: 6px; }
.drawer-action.primary { background: #20242b; color: #fff; border-color: #20242b; }
#printDrawerBody .print-tool { display: flex !important; background: #fff; padding: 12px; }
#printDrawerBody .print-grid { grid-template-columns: 1fr 1fr; }
#printDrawerBody .print-actions { grid-template-columns: 1fr 1fr 1fr; }
.print-one-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 150;
  background: #20242b;
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.print-preview #modernApp,
body.print-preview .modern-overlays,
body.print-preview .toast { display: none !important; }

/* iPad mini 5 landscape: CSS viewport is typically 1024 x 768 */
@media (min-width: 960px) and (max-width: 1100px) and (orientation: landscape) {
  .modern-app { grid-template-rows: 54px minmax(0,1fr); }
  .modern-main { padding: 9px; }
  .dictionary-layout { grid-template-columns: 264px minmax(0,1fr); gap: 9px; }
  .modern-card { border-radius: 15px; }
  .modern-card-toolbar { height: 44px; padding: 5px 8px 5px 12px; }
  .modern-card-body { grid-template-columns: 220px minmax(0,1fr); }
  .modern-form-side { padding: 11px 9px; gap: 6px; }
  .modern-big-char-box { width: 174px; min-height: 124px; }
  .modern-big-char { font-size: 116px; }
  .modern-form-side .screen-equip-wrap { transform: scale(.73); margin-bottom: -43px; }
  .modern-detail-side { padding: 12px 13px 18px; }
  .modern-title-row { padding-bottom: 8px; margin-bottom: 7px; }
  .modern-card .section { padding: 8px 10px; margin-top: 7px; }
  .modern-card .structure-main { font-size: 17px; }
  .modern-card .structure-line { font-size: 14px; }
  .modern-card .structure-meaning { font-size: 14px; }
  .modern-card .example { font-size: 13px; padding: 5px 7px; }
  .modern-card .study-panel { padding: 8px 10px; margin-top: 7px; }
  .study-buttons button, .study-tools button { padding: 5px 8px; font-size: 10px; }
  .modern-huneum { font-size: 31px; }
  .search-head { padding: 10px 10px 8px; }
  .result-row { padding: 7px 9px; }
}
@media (max-width: 800px) {
  body { overflow: auto; }
  .modern-app { min-height: 100vh; grid-template-rows: auto auto; }
  .modern-topbar { grid-template-columns: 1fr auto; padding: 9px 11px; }
  .modern-nav { grid-column: 1 / -1; grid-row: 2; order: 3; }
  .modern-main { overflow: visible; }
  .dictionary-layout { grid-template-columns: 1fr; height: auto; }
  .search-panel { max-height: 390px; }
  .card-stage { min-height: 690px; }
  .modern-card-body { grid-template-columns: 1fr; }
  .modern-form-side { border-right: 0; border-bottom: 1px solid #ddd2c6; }
  .home-tiles, .favorite-grid { grid-template-columns: 1fr; }
}


/* source style2 id="v68-kcci-exam-style" */
/* v69: KCCI standard/variant, exam metadata, and 1급 frequent list */
.exam-section { border-left: 5px solid #785b96; background: #fdfbff; }
.exam-info-grid { display: flex; flex-direction: column; gap: 8px; }
.exam-info-row { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px; align-items: center; font-size: 13px; line-height: 1.35; }
.exam-info-label { color: #756779; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.exam-standard-char, .variant-char { font-family: var(--hanja-font); }
.exam-standard-char { font-size: 22px; font-weight: 800; color: #2e203a; }
.variant-list, .exam-chip-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.variant-char { display: inline-flex; min-width: 30px; min-height: 28px; align-items: center; justify-content: center; padding: 3px 8px; border: 1px solid #d5c5de; background: #fff; border-radius: 999px; font-size: 18px; }
.variant-list.correction .variant-char { border-color: #e3b38e; background: #fff6ed; color: #8f4d18; }
.exam-type { display: inline-flex; width: fit-content; border: 1px solid #bba6cb; background: #f4edfa; color: #5f3b77; border-radius: 999px; padding: 4px 9px; font-weight: 850; }
.exam-chip { display: inline-flex; border: 1px solid #d8cbbd; background: #fff; color: #65594f; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 850; }
.exam-chip.on { border-color: #6c8d75; background: #edf8f0; color: #27603a; }
.exam-note { margin-top: 2px; border: 1px dashed #d8c8e0; background: #fff; border-radius: 10px; padding: 8px 10px; color: #65566b; font-size: 11px; line-height: 1.45; }
.edit-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.edit-check { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d8cbbd; background: #fff; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 800; color: #54483e; }
.edit-check input { width: auto; margin: 0; }
@media (max-width: 820px) {
  .exam-info-row { grid-template-columns: 70px minmax(0,1fr); }
}


/* source style3 id="v69-grade1-wordbook-style" */
/* v69: 1급 빈출 단어장. Only the visible batch is rendered to keep iPad mini responsive. */
.wordbook-tabs { display:flex; gap:8px; align-items:center; margin:0 0 12px; position:sticky; top:0; z-index:5; padding:6px 0 8px; background:linear-gradient(180deg,#f6f3ee 78%,rgba(246,243,238,0)); }
.wordbook-tab { border:1px solid #d6c9bc; background:#fff; color:#574b40; border-radius:999px; padding:9px 14px; font-weight:900; cursor:pointer; }
.wordbook-tab.active { background:#2b2520; color:#fff; border-color:#2b2520; }
.wordbook-tab small { opacity:.74; margin-left:4px; }
.wordbook-summary { display:flex; flex-wrap:wrap; gap:6px; margin:-2px 0 12px; color:#74685e; font-size:11px; }
.source-chip { display:inline-flex; align-items:center; border:1px solid #d8cbbd; background:#fff; border-radius:999px; padding:3px 7px; font-size:10px; font-weight:850; color:#65594f; }
.source-chip.txt { border-color:#a8c3d2; background:#eef8fc; color:#285f7c; }
.source-chip.csv { border-color:#b8c9aa; background:#f1f8ed; color:#446332; }
.source-chip.starred { border-color:#e1bd73; background:#fff8df; color:#8b6517; }
.wordbook-frequent-note { margin-top:6px; color:#786c62; font-size:11px; line-height:1.35; }
.wordbook-load { display:flex; justify-content:center; padding:16px 0 6px; }
.wordbook-load button { border:1px solid #cfc1b2; background:#fff; border-radius:999px; padding:10px 18px; font-weight:900; cursor:pointer; }
.wordbook-card.frequent { border-left:5px solid #8a6b35; }
.wordbook-actions button.active { background:#fff5d8; border-color:#d7b55a; color:#79570d; }
.frequent-pill { background:#fff1bd !important; border-color:#d9b75a !important; color:#73510a !important; font-weight:950; }
@media (min-width: 860px) {
  .favorite-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wordbook-card { min-height:116px; }
}
@media (max-width: 820px) {
  .wordbook-tabs { top:0; }
  .wordbook-tab { padding:8px 11px; font-size:12px; }
}


/* source style4 id="v70-full-wordbook-test-style" */
/* v70: wordbook reuses the full dictionary card; test sits in the primary navigation. */
html, body { height:100%; }
.modern-app { height:100dvh !important; min-height:100dvh !important; overflow:hidden !important; }
.modern-main { height:100%; min-height:0; overflow:hidden; }
.home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.home-tile.test-tile { border-color:#b9cfe5; background:linear-gradient(145deg,#f4f9ff,#ffffff); }
.home-tile.test-tile .home-tile-foot { color:#135b9f; }
.wordbook-layout { grid-template-columns: 286px minmax(0,1fr); height:100%; min-height:0; }
.wordbook-panel { min-height:0; height:100%; grid-template-rows:auto auto auto minmax(0,1fr) auto; }
.wordbook-layout .card-stage { height:100%; min-height:0; }
.wordbook-panel .wordbook-tabs { position:static; padding:0 0 9px; margin:0; background:none; }
.wordbook-panel .modern-results { min-height:0; }
.wordbook-panel .result-row { grid-template-columns:44px minmax(0,1fr) 20px; }
.wordbook-panel .result-source { font-size:9px; color:#887b6d; white-space:nowrap; }
.wordbook-panel .search-footer { padding-top:7px; }
.wordbook-panel-head { padding:14px 14px 9px; border-bottom:1px solid #e3d8cc; }
.wordbook-panel-head strong { display:block; font-size:17px; }
.wordbook-panel-head span { display:block; color:#7a6f64; font-size:11px; margin-top:3px; line-height:1.35; }
.wordbook-empty-card { min-height:520px; display:grid; place-items:center; border:1px dashed #d7cabc; border-radius:20px; background:rgba(255,255,255,.72); text-align:center; color:#776b61; padding:30px; }

.test-view { height:100%; min-height:0; overflow:auto; padding:16px 20px; display:grid; place-items:center; }
.test-shell { width:min(920px,100%); }
.test-hero { display:flex; justify-content:space-between; align-items:flex-end; gap:18px; margin-bottom:14px; }
.test-hero h1 { margin:0; font-size:clamp(27px,4vw,42px); letter-spacing:-.05em; }
.test-hero p { margin:6px 0 0; color:#756a60; font-size:13px; }
.test-setup, .test-card, .test-result { border:1px solid #d9cdbf; background:#fff; border-radius:24px; box-shadow:0 20px 55px rgba(56,43,30,.12); }
.test-setup { padding:24px; }
.test-mode-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px; }
.test-mode-button { border:1px solid #d8cbbd; background:#fffaf3; border-radius:17px; padding:18px; text-align:left; cursor:pointer; }
.test-mode-button.active { border-color:#2f6fa6; background:#edf6ff; box-shadow:inset 0 0 0 1px #2f6fa6; }
.test-mode-char { font-family:var(--hanja-font); font-size:38px; line-height:1; float:right; margin-left:10px; }
.test-mode-button strong { display:block; font-size:17px; margin-bottom:5px; }
.test-mode-button span { display:block; color:#756a60; font-size:12px; line-height:1.45; }
.test-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.test-field label { display:block; font-size:11px; font-weight:900; color:#6f6358; margin:0 0 5px 2px; }
.test-field select { width:100%; border:1px solid #d6c9bc; border-radius:12px; padding:11px 12px; background:#fff; }
.test-start { width:100%; margin-top:16px; border:0; border-radius:13px; background:#211d19; color:#fff; padding:13px 16px; font-weight:950; cursor:pointer; }
.test-warning { margin-top:10px; color:#a04a2c; font-size:12px; }

.test-card { overflow:hidden; }
.test-progress-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 18px; border-bottom:1px solid #e4d9ce; font-size:12px; color:#6f645a; }
.test-score-chips { display:flex; gap:6px; }
.test-score-chip { border:1px solid #ddd1c5; border-radius:999px; padding:4px 8px; background:#fffaf4; }
.test-score-chip.correct { color:#0b6a3e; border-color:#add3bd; background:#eefaf3; }
.test-score-chip.wrong { color:#9b351d; border-color:#e0b6aa; background:#fff2ee; }
.test-progress-track { height:5px; background:#eee5dc; }
.test-progress-bar { height:100%; background:#2f6fa6; transition:width .2s ease; }
.test-question-body { padding:22px; text-align:center; }
.test-instruction { color:#72675d; font-weight:850; font-size:13px; }
.test-hanja-box { width:190px; height:190px; margin:15px auto 18px; display:grid; place-items:center; border:1px solid #d4c7b9; border-radius:24px; background:linear-gradient(145deg,#fffaf1,#f4ece1); }
.test-hanja { font-family:var(--hanja-font); font-size:128px; line-height:1; }
.test-answer-row { width:min(520px,100%); margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr) 108px; gap:8px; }
.test-answer { min-width:0; border:1px solid #cfc1b3; border-radius:12px; padding:13px 14px; font-size:17px; text-align:center; }
.test-submit { border:0; border-radius:12px; background:#28231f; color:#fff; font-weight:950; cursor:pointer; }
.test-feedback { width:min(620px,100%); margin:14px auto 0; border-radius:14px; padding:12px 14px; text-align:left; line-height:1.5; }
.test-feedback.correct { border:1px solid #a9d2b9; background:#eefaf3; color:#155d3c; }
.test-feedback.wrong { border:1px solid #e1b6aa; background:#fff2ee; color:#8b321d; }
.test-feedback strong { display:block; margin-bottom:3px; }
.test-next-row { display:flex; justify-content:center; gap:8px; margin-top:12px; }
.test-next-row button { border:1px solid #d2c5b8; border-radius:999px; background:#fff; padding:9px 16px; font-weight:900; cursor:pointer; }
.test-next-row button.primary { background:#211d19; color:#fff; border-color:#211d19; }

/* v84: quiz card navigation stays at the outer left/right edges while the answer card scrolls. */
.test-card-stage {
  width: 100%;
  box-sizing: border-box;
  padding-inline: 54px;
}
.test-edge-nav {
  position: fixed;
  top: 50%;
  z-index: 80;
  width: 46px;
  height: 74px;
  transform: translateY(-50%);
  border: 1px solid #cdbfae;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  color: #4d4035;
  box-shadow: 0 8px 26px rgba(48,37,27,.16);
  display: grid;
  place-items: center;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.test-edge-nav:hover,
.test-edge-nav:active {
  background: #fff8ef;
  border-color: #a98e72;
}
.test-edge-nav:disabled {
  opacity: .22;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}
.test-edge-prev { left: max(7px, calc(50vw - 520px)); }
.test-edge-next { right: max(7px, calc(50vw - 520px)); }
@media (max-width: 820px) {
  .test-card-stage { padding-inline: 46px; }
  .test-edge-nav { width: 40px; height: 66px; border-radius: 14px; font-size: 37px; }
  .test-edge-prev { left: 4px; }
  .test-edge-next { right: 4px; }
}
.test-hint { margin-top:9px; color:#8b8076; font-size:11px; }
.test-result { padding:30px; text-align:center; }
.test-result-mark { font-family:var(--hanja-font); font-size:74px; }
.test-result h2 { margin:4px 0 6px; font-size:28px; }
.test-result p { color:#786d63; }
.test-result-stats { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:18px 0; }
.test-result-stats span { border:1px solid #d9ccbf; border-radius:999px; padding:8px 13px; background:#fffaf4; font-weight:850; }
.test-result-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.test-result-actions button { border:1px solid #d2c5b8; border-radius:11px; background:#fff; padding:10px 15px; font-weight:900; cursor:pointer; }
.test-result-actions button.primary { background:#211d19; color:#fff; border-color:#211d19; }

@media (max-width:1100px) {
  .home-tiles { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:11px; }
  .home-tile { padding:18px !important; }
  .home-tile-icon { font-size:52px !important; }
  .home-tile h2 { font-size:21px !important; }
  .wordbook-layout { grid-template-columns:250px minmax(0,1fr); }
}
@media (max-width:820px) {
  .home-tiles { grid-template-columns:1fr !important; }
  .wordbook-layout { grid-template-columns:1fr; }
  .wordbook-panel .modern-results { max-height:230px; }
  .test-view { padding:12px; align-items:start; }
  .test-mode-grid, .test-options { grid-template-columns:1fr; }
  .test-hanja-box { width:154px; height:154px; }
  .test-hanja { font-size:104px; }
}


/* source style5 id="v71-wordbook-mcq-style" */
/* v71: wordbook is only a collection filter over the same dictionary card. */
.wordbook-panel-head { padding-bottom:12px; }
.wordbook-panel .wordbook-tabs { flex-wrap:wrap; }
.wordbook-panel .result-row { grid-template-columns:44px minmax(0,1fr) 20px; }

/* 4-choice test */
.test-choice-grid { width:min(680px,100%); margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.test-choice { min-height:58px; display:grid; grid-template-columns:30px minmax(0,1fr); align-items:center; gap:9px; border:1px solid #d4c7ba; background:#fff; border-radius:14px; padding:10px 13px; text-align:left; cursor:pointer; color:#332b25; }
.test-choice:hover:not(:disabled) { border-color:#7fa9ce; background:#f4f9ff; transform:translateY(-1px); }
.test-choice > span { width:27px; height:27px; display:grid; place-items:center; border-radius:50%; background:#f1e9df; font-weight:950; font-size:12px; }
.test-choice > strong { font-size:16px; line-height:1.3; word-break:keep-all; }
.test-choice.correct { border-color:#4d9b6e; background:#eaf8ef; color:#155d3c; box-shadow:inset 0 0 0 1px #4d9b6e; }
.test-choice.correct > span { background:#2e8a59; color:#fff; }
.test-choice.wrong { border-color:#c66a54; background:#fff0ec; color:#8b321d; }
.test-choice.wrong > span { background:#b94e35; color:#fff; }
.test-choice.dim { opacity:.52; }
.test-choice:disabled { cursor:default; }
.test-answer-summary { width:min(760px,100%); margin:14px auto 10px; display:grid; grid-template-columns:1fr 1fr; gap:9px; text-align:left; }
.test-answer-summary > div { border:1px solid #d8ccbf; background:#fffaf4; border-radius:12px; padding:10px 12px; }
.test-answer-summary span { display:block; color:#7c7065; font-size:10px; font-weight:900; margin-bottom:3px; }
.test-answer-summary strong { display:block; color:#2c251f; font-size:17px; }
.test-explanation-card { width:100%; height:auto !important; min-height:560px; margin:10px auto 0; text-align:left; overflow:hidden; box-shadow:0 10px 28px rgba(48,38,28,.1); }
.test-explanation-card .modern-card-body { min-height:510px; }
.test-feedback { width:min(760px,100%); }
@media (max-width:820px) {
  .test-choice-grid, .test-answer-summary { grid-template-columns:1fr; }
  .test-explanation-card { min-height:0; }
  .test-explanation-card .modern-card-body { min-height:0; }
}


/* source style6 id="v73-sense-row-style" */
:root{--v73-purple:#7044b3;--v73-line:#d9cdbf;--v73-paper:#fffdf9;}
.card-stage{overflow:auto;padding:0 2px 8px;}
.modern-card{height:auto;min-height:0;display:block;border:0;background:transparent;box-shadow:none;overflow:visible;}
.modern-card-toolbar{min-height:44px;border:1px solid var(--v73-line);border-bottom:0;border-radius:14px 14px 0 0;background:#fff;padding:6px 9px 6px 12px;position:sticky;top:0;z-index:4;}
.screen-study-card{position:relative;border:2px solid #bca1de;border-left:8px solid var(--v73-purple);background:#fff;border-radius:0 0 4px 4px;padding:7px 8px 8px;box-shadow:0 10px 26px rgba(65,44,90,.09);}
.screen-study-card.depth-1{border-left-color:#c92929}.screen-study-card.depth-2{border-left-color:#146ac2}.screen-study-card.depth-3{border-left-color:#16834f}.screen-study-card.depth-4{border-left-color:#cc7414}.screen-study-card.depth-5{border-left-color:#7044b3}
.screen-card-topline{height:31px;display:grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:7px;border-bottom:3px solid #eee7df;margin-bottom:5px;}
.screen-number{font-weight:950;font-size:15px;border:1px solid #d9cdbf;border-radius:6px;background:#fff;padding:2px 6px;}
.screen-class{min-width:154px;text-align:center;font-weight:950;color:#51308b;border:2px dashed #8454c9;background:#f3ecff;border-radius:7px;padding:3px 10px;}
.screen-lineage{text-align:right;color:#5d5148;font-size:13px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.screen-card-grid{display:grid;grid-template-columns:220px minmax(0,1fr);grid-template-rows:132px 218px 55px;gap:5px 7px;min-height:0;}
.screen-char-box{display:grid;place-items:center;border:2px solid #c6a5f0;background:#f7f1ff;border-radius:12px;overflow:hidden;}
.screen-char{font-family:var(--hanja-font);font-size:96px;line-height:.9;color:#070506;transform:translateY(-1px);}
.screen-huneum-box{display:grid;grid-template-columns:minmax(0,1fr) 92px;grid-template-rows:1fr 1fr;border-bottom:2px solid #e1d7cc;overflow:hidden;}
.screen-huneum-cell{display:flex;align-items:center;justify-content:flex-end;padding:5px 15px;font-weight:950;font-size:24px;border-left:1px solid #dfd5ca;}
.screen-huneum-cell.reading{font-family:var(--hanja-font);font-size:27px;justify-content:center;}
.screen-huneum-cell.secondary{font-size:18px;color:#5e5146;border-top:1px solid #dfd5ca;}
.screen-equip-box{border:2px solid #d7cabb;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:5px;}
.screen-equip-box .equipment-board{transform:scale(1.2);transform-origin:center;}
.screen-detail-box{border:2px solid #ddd1c5;border-left:6px solid #9a7651;border-radius:9px;background:#fff;overflow:auto;padding:8px 10px;min-width:0;}
.screen-detail-box .section{border:0!important;border-radius:0!important;padding:0!important;margin:0!important;background:transparent!important;}
.screen-detail-box .section-title{font-size:16px!important;padding:2px 7px!important;margin:0 0 7px!important;background:#f4eadf!important;color:#5f4635!important;}
.screen-detail-box .structure-main{font-size:20px!important;line-height:1.35!important;}
.screen-detail-box .structure-line{font-size:17px!important;line-height:1.45!important;}
.screen-detail-box .structure-meaning{font-size:18px!important;}
.screen-bottom-tags{display:grid;grid-template-columns:1fr 1fr;gap:5px;}
.screen-bottom-tag{display:flex;align-items:center;justify-content:center;border:2px solid #d8ccbf;border-radius:7px;background:#fff;font-weight:900;color:#5a4e44;min-width:0;text-align:center;padding:5px;}
.screen-bottom-tag.radical{color:#155d7d;border-color:#b8d8e7;background:#f1faff;font-family:var(--hanja-font);font-size:20px;}
.screen-example-box{border:2px solid #ddd1c5;border-left:6px solid #5f879d;border-radius:7px;background:#fff;display:flex;align-items:center;gap:8px;overflow:auto;padding:5px 10px;white-space:nowrap;}
.screen-example-label{font-weight:950;color:#285d7a;flex:0 0 auto;}
.screen-example-items{display:flex;gap:12px;align-items:center;min-width:0;}
.screen-example-item{font-size:16px;white-space:nowrap;}
.screen-extra-panels{margin-top:7px;display:flex;flex-direction:column;gap:7px;}
.screen-extra-panels .study-panel,.screen-extra-panels .lineage-panel{margin:0;}
.screen-edit-wrap{grid-column:2;grid-row:1 / span 3;border:2px solid #ddd1c5;border-left:6px solid #9a7651;border-radius:9px;padding:10px;overflow:auto;background:#fff;}
.wordbook-sort-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;margin:0 10px 10px;padding:8px;border:1px solid #ddd1c5;border-radius:10px;background:#fffaf4;}
.wordbook-sort-row label{font-size:11px;font-weight:950;color:#66594f;}
.wordbook-sort-row select{width:100%;border:1px solid #d2c5b8;border-radius:8px;padding:7px;background:#fff;font-size:12px;}
.test-explanation-card{width:100%;min-height:0!important;margin-top:10px;}
.test-explanation-card .modern-card-toolbar{position:static;}
@media (max-width:1100px){
 .dictionary-layout{grid-template-columns:250px minmax(0,1fr)}
 .screen-card-grid{grid-template-columns:205px minmax(0,1fr);grid-template-rows:122px 204px 52px}
 .screen-char{font-size:86px}.screen-huneum-cell{font-size:21px}.screen-detail-box .structure-main{font-size:18px!important}.screen-detail-box .structure-line{font-size:15px!important}
}
@media (max-width:820px){
 .screen-card-grid{grid-template-columns:1fr;grid-template-rows:auto}.screen-char-box{min-height:150px}.screen-huneum-box{min-height:120px}.screen-equip-box{min-height:220px}.screen-edit-wrap{grid-column:1;grid-row:auto}.screen-bottom-tags{min-height:52px}.screen-example-box{min-height:58px}
 .screen-class{min-width:0}.screen-lineage{display:none}
}


/* source style7 id="v73-sense-row-patch" */
.screen-huneum-box{grid-template-rows:repeat(var(--sense-count,1),minmax(0,1fr))!important;}
.screen-huneum-cell.sense-next{font-size:18px;color:#5e5146;border-top:1px solid #dfd5ca;}
.screen-huneum-cell.reading.sense-next{font-size:23px;}
.screen-huneum-box.one-sense .screen-huneum-cell{font-size:27px;}
.screen-huneum-box.one-sense .screen-huneum-cell.reading{font-size:30px;}
@media(max-width:1180px){.screen-huneum-cell{font-size:21px}.screen-huneum-cell.reading{font-size:24px}}


/* source style8 id="v74-compact-ui-style" */
/* v74: compact, content-first interface */
.modern-topbar{min-height:48px;padding:5px 12px}.modern-brand{font-size:15px}.modern-brand-mark{font-size:23px}.modern-nav button,.modern-icon-btn{padding:7px 10px}
.compact-home{max-width:820px}.compact-home .home-title{text-align:center;margin-bottom:18px}.compact-home .home-tiles{gap:12px}.compact-home .home-tile{min-height:170px;padding:18px;display:grid;place-items:center;text-align:center}.compact-home .home-tile p,.compact-home .home-kicker,.compact-home .home-sub,.compact-home .home-stats{display:none!important}.compact-home .home-tile-icon{font-size:58px}.compact-home .home-tile h2{margin:8px 0 5px}.compact-home .home-tile-foot{margin:0}
.dictionary-layout{grid-template-columns:232px minmax(0,1fr)!important;gap:10px!important;padding:10px!important}.search-panel{border-radius:14px}.search-head{padding:11px}.search-headline span,.search-tip,.search-footer{display:none!important}.search-types{gap:4px}.search-type{padding:5px 7px;font-size:10px}.search-line{margin-top:7px}.modern-search{padding:8px 9px}.search-go{padding:8px 10px}.modern-results{padding:5px}.result-row{grid-template-columns:38px minmax(0,1fr) 18px!important;min-height:46px;padding:6px!important;gap:6px!important}.result-char{font-size:27px}.result-huneum{display:block!important;font-size:12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.result-meta{display:none!important}.results-more{padding:5px}.results-more button{padding:6px 10px}
.card-stage{padding:0!important}.modern-card-toolbar{min-height:38px!important;padding:4px 6px!important;justify-content:flex-end!important}.compact-card-toolbar .modern-card-actions{margin-left:auto}.card-action{padding:6px 9px!important;font-size:11px!important}.screen-study-card{border-radius:0 0 5px 5px;padding:6px!important}.screen-card-topline{display:none!important}.screen-card-grid{grid-template-columns:190px minmax(0,1fr)!important;grid-template-rows:112px 190px 48px!important;gap:5px 6px!important}.screen-char-box{border-radius:9px}.screen-char{font-size:82px!important}.screen-huneum-box{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:repeat(var(--sense-count,1),minmax(0,1fr))!important;border:1px solid #ddd1c5!important;border-radius:8px!important;overflow:hidden!important}.screen-sense-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:5px 14px;border-bottom:1px solid #e2d8ce;min-width:0}.screen-sense-row:last-child{border-bottom:0}.screen-sense-meaning{font-size:21px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.screen-sense-reading{font-family:var(--hanja-font);font-size:22px;font-weight:950;white-space:nowrap;min-width:58px;text-align:center}.screen-huneum-cell{display:none!important}.screen-equip-box{padding:3px}.screen-equip-box .equipment-board{transform:scale(1.06)!important}.screen-detail-box{padding:6px 8px!important}.screen-detail-box .section-title{font-size:13px!important;margin-bottom:5px!important}.screen-detail-box .structure-main{font-size:17px!important}.screen-detail-box .structure-line{font-size:14px!important;line-height:1.35!important}.screen-detail-box .structure-meaning{font-size:15px!important}.screen-bottom-tag{padding:3px!important;font-size:12px!important}.screen-bottom-tag.radical{font-size:18px!important}.screen-example-box{padding:4px 8px!important}.screen-example-label{font-size:12px}.screen-example-item{font-size:13px!important}.screen-extra-panels{margin-top:5px!important}
.wordbook-panel{grid-template-rows:auto minmax(0,1fr) auto!important}.wordbook-panel-head,.wordbook-sort-row{display:none!important}.wordbook-compact-controls{padding:7px;display:grid;gap:6px;border-bottom:1px solid #e1d6ca}.wordbook-compact-controls .wordbook-tabs{display:grid!important;grid-template-columns:1fr 1fr 44px;gap:4px;padding:0!important;margin:0!important}.wordbook-tab{padding:6px 4px!important;font-size:11px!important}.wordbook-compact-controls select{width:100%;padding:6px 8px;border:1px solid #d2c5b8;border-radius:8px;background:#fff;font-size:11px}
.test-view{padding:8px 12px!important;place-items:start center!important}.test-shell{width:min(900px,100%)!important}.compact-test-hero{margin:0 0 7px!important;align-items:center!important}.compact-test-hero h1{font-size:24px!important}.test-setup{padding:14px!important}.compact-test-setup .test-mode-grid{margin-bottom:10px!important}.compact-test-setup .test-mode-button{padding:12px 14px!important;min-height:64px}.compact-test-setup .test-mode-button span:not(.test-mode-char){display:none!important}.compact-test-setup .test-mode-char{font-size:32px}.compact-test-setup .test-options{gap:8px}.compact-test-setup .test-start{margin-top:10px;padding:10px}
.test-card{border-radius:16px!important}.test-progress-head{padding:7px 12px!important}.test-question-body{padding:10px!important}.test-question-layout{display:grid;grid-template-columns:235px minmax(0,1fr);gap:12px;align-items:stretch}.test-hanja-side{position:relative;display:grid;place-items:center;min-width:0}.test-hanja-box{width:100%!important;height:224px!important;margin:0!important;border-radius:16px!important}.test-hanja{font-size:142px!important}.test-choice-grid{width:100%!important;margin:0!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:repeat(4,1fr);gap:7px!important}.test-choice{min-height:50px!important;border-radius:10px!important;padding:8px 11px!important}.test-choice>strong{font-size:17px!important}.test-choice>span{width:25px!important;height:25px!important}.test-answer-mark{position:absolute;right:8px;bottom:8px;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-size:34px;font-weight:950;background:#fff;box-shadow:0 4px 18px rgba(0,0,0,.13)}.test-answer-mark.correct{color:#16834f;border:3px solid #52a776}.test-answer-mark.wrong{color:#b54c35;border:3px solid #cf745f}.test-feedback,.test-answer-summary,.test-hint,.test-instruction{display:none!important}.test-explanation-card{margin-top:9px!important}.test-explanation-card .screen-study-card{border-radius:5px}.test-next-row{margin-top:8px!important;justify-content:flex-end!important}.test-next-row button{padding:7px 13px!important}.test-result{padding:18px!important}.test-result-mark{font-size:55px!important}
.standard-rabbit{font-family:"AppleMyungjo","Batang","Noto Serif CJK KR","Source Han Serif K",serif!important;font-variant-east-asian:traditional!important}.standard-rabbit-card .screen-char::after{content:""}
@media(max-width:1100px){.dictionary-layout{grid-template-columns:218px minmax(0,1fr)!important}.screen-card-grid{grid-template-columns:178px minmax(0,1fr)!important;grid-template-rows:108px 182px 46px!important}.screen-char{font-size:78px!important}.screen-sense-meaning{font-size:18px}.screen-sense-reading{font-size:20px}.test-question-layout{grid-template-columns:220px minmax(0,1fr)}.test-hanja-box{height:210px!important}.test-hanja{font-size:132px!important}}
@media(max-width:820px){.dictionary-layout{grid-template-columns:1fr!important;overflow:auto!important}.search-panel{max-height:250px}.screen-card-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important}.screen-char-box{min-height:135px}.screen-huneum-box{min-height:70px}.screen-sense-row{min-height:48px}.test-question-layout{grid-template-columns:150px minmax(0,1fr)}.test-hanja-box{height:190px!important}.test-hanja{font-size:105px!important}.test-choice>strong{font-size:14px!important}}


/* source style9 id="v75-ipadmini5-portrait-style" */
/* v75: iPad mini 5 portrait-first layout, collapsible contents panel, direct favorite and swipe navigation. */
body{overflow:hidden!important;background:#e9e4dc!important;}
.modern-app{grid-template-rows:52px minmax(0,1fr)!important;max-width:768px;margin:0 auto;background:#e9e4dc;}
.modern-topbar{min-height:52px!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:5px!important;padding:4px 7px!important;}
.modern-brand{font-size:13px!important;gap:6px!important;}
.modern-brand-mark{width:32px!important;height:32px!important;font-size:21px!important;}
.modern-nav{justify-content:flex-start!important;gap:2px!important;overflow-x:auto!important;scrollbar-width:none;}
.modern-nav::-webkit-scrollbar{display:none;}
.modern-nav button,.modern-icon-btn{padding:7px 8px!important;font-size:11px!important;white-space:nowrap!important;}
.modern-top-actions{gap:1px!important;}
.modern-main{padding:6px!important;max-width:768px!important;width:100%!important;margin:0 auto!important;overflow:hidden!important;}

/* Home: compact vertical menu that fits a portrait screen. */
.home-view{padding:10px!important;place-items:start center!important;}
.compact-home{max-width:700px!important;width:100%!important;}
.compact-home .home-title{font-size:28px!important;margin:8px 0 14px!important;}
.compact-home .home-tiles{grid-template-columns:1fr!important;gap:9px!important;}
.compact-home .home-tile{min-height:112px!important;padding:12px 18px!important;display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:auto auto!important;place-items:center start!important;text-align:left!important;border-radius:16px!important;}
.compact-home .home-tile-icon{grid-row:1 / span 2;font-size:48px!important;justify-self:center!important;}
.compact-home .home-tile h2{font-size:20px!important;margin:0!important;}
.compact-home .home-tile-foot{font-size:11px!important;margin:3px 0 0!important;}

/* Dictionary and wordbook: full-width card with an off-canvas contents panel. */
.dictionary-layout,.wordbook-layout{position:relative!important;display:block!important;height:100%!important;max-width:756px!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;}
.card-stage{height:100%!important;min-height:0!important;padding:0!important;overflow:auto!important;overscroll-behavior:contain;}
.toc-panel.search-panel{position:absolute!important;z-index:42!important;left:0!important;top:0!important;bottom:0!important;width:min(292px,84vw)!important;max-height:none!important;height:100%!important;transform:translateX(calc(-100% - 10px));transition:transform .2s ease!important;border-radius:12px!important;box-shadow:0 16px 40px rgba(30,24,18,.25)!important;}
.dictionary-layout.toc-open .toc-panel{transform:translateX(0)!important;}
.toc-dim{display:none;position:absolute;z-index:38;inset:0;border:0;background:rgba(25,22,19,.28);backdrop-filter:blur(1px);}
.dictionary-layout.toc-open .toc-dim{display:block;}
.toc-close{border:0;background:#ede6de;color:#4f463e;border-radius:999px;width:30px;height:30px;font-size:22px;line-height:1;cursor:pointer;}
.search-headline{margin-bottom:8px!important;}
.search-headline strong{font-size:15px!important;}
.toc-action{margin-right:auto!important;background:#f4eee7!important;}
.toc-action.active{background:#25282e!important;color:#fff!important;border-color:#25282e!important;}

/* Portrait study card. */
.modern-card{height:auto!important;max-height:100%!important;max-width:744px!important;margin:0 auto!important;grid-template-rows:42px auto!important;border-radius:12px!important;}
.modern-card-toolbar{min-height:42px!important;padding:4px 6px!important;justify-content:space-between!important;}
.modern-card-actions{gap:4px!important;}
.card-action{min-height:34px!important;padding:6px 10px!important;font-size:11px!important;}
.screen-study-card{height:auto!important;min-height:0!important;max-height:calc(100dvh - 112px)!important;overflow:auto!important;padding:6px!important;border-radius:0 0 5px 5px!important;overscroll-behavior:contain;}
.screen-card-grid{grid-template-columns:206px minmax(0,1fr)!important;grid-template-rows:164px 300px 54px!important;gap:6px!important;min-height:0!important;}
.screen-char-column{display:grid;grid-template-rows:38px minmax(0,1fr);gap:5px;min-width:0;min-height:0;}
.screen-favorite{width:100%;border:1px solid #d5c8b9;background:#fff;border-radius:9px;min-height:38px;font-weight:950;color:#5c5147;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;}
.screen-favorite.active{background:#fff4cf;border-color:#d8ae4c;color:#8c6110;}
.screen-favorite span{font-size:11px;}
.screen-char-box{position:relative!important;min-height:0!important;border-radius:10px!important;touch-action:pan-y;}
.screen-char{font-size:91px!important;pointer-events:none;}
.char-nav-zone{position:absolute;z-index:3;top:0;bottom:0;width:50%;border:0;background:transparent;color:rgba(73,54,94,.34);font-size:34px;font-weight:900;cursor:pointer;padding:0 8px;}
.char-nav-zone:active{background:rgba(108,76,148,.10);color:#684a8e;}
.char-prev{left:0;text-align:left;}
.char-next{right:0;text-align:right;}
.screen-huneum-box{min-height:0!important;}
.screen-sense-row{padding:6px 13px!important;gap:12px!important;}
.screen-sense-meaning{font-size:20px!important;}
.screen-sense-reading{font-size:21px!important;min-width:54px!important;}
.screen-equip-box{min-height:0!important;padding:4px!important;}
.screen-equip-box .equipment-board{transform:scale(1.13)!important;}
.screen-detail-box{min-height:0!important;padding:8px 10px!important;}
.screen-detail-box .section-title{font-size:14px!important;}
.screen-detail-box .structure-main{font-size:18px!important;line-height:1.3!important;}
.screen-detail-box .structure-line{font-size:15px!important;line-height:1.38!important;}
.screen-detail-box .structure-meaning{font-size:16px!important;}
.screen-bottom-tags{min-height:0!important;}
.screen-bottom-tag{font-size:12px!important;padding:4px!important;}
.screen-bottom-tag.radical{font-size:19px!important;}
.screen-example-box{min-height:0!important;padding:5px 9px!important;}
.screen-example-label{font-size:12px!important;}
.screen-example-item{font-size:13px!important;}
.screen-extra-panels{margin-top:6px!important;}
.screen-edit-wrap{grid-column:2!important;grid-row:1 / span 3!important;}

/* Wordbook contents controls. */
.wordbook-compact-controls{padding:7px!important;}
.wordbook-compact-controls .wordbook-tabs{grid-template-columns:1fr 1fr 44px!important;}
.wordbook-panel .modern-results{max-height:none!important;}

/* JSON export controls are intentionally removed. */
.study-tools,#exportLocalData{display:none!important;}

@media(max-width:800px){
  body{overflow:hidden!important;}
  .modern-app{min-height:100dvh!important;grid-template-rows:52px minmax(0,1fr)!important;}
  .modern-topbar{grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:1fr!important;}
  .modern-nav{grid-column:auto!important;grid-row:auto!important;order:initial!important;min-width:0!important;}
  .modern-brand>span:last-child{display:none;}
  .modern-top-actions #modernRandom{display:none;}
}
@media(max-width:700px){
  .screen-card-grid{grid-template-columns:184px minmax(0,1fr)!important;grid-template-rows:154px 286px 52px!important;}
  .screen-char{font-size:82px!important;}
  .screen-sense-meaning{font-size:18px!important;}
  .screen-sense-reading{font-size:19px!important;}
}
@media(max-width:560px){
  .modern-topbar{grid-template-columns:auto minmax(0,1fr)!important;}
  .modern-top-actions{display:none!important;}
  .screen-card-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important;}
  .screen-char-column{min-height:190px;}
  .screen-equip-box{min-height:220px!important;}
  .screen-edit-wrap{grid-column:1!important;grid-row:auto!important;}
}


/* source style10 id="v76-ipadmini5-portrait-density-fix" */
/* v76: compact portrait normalization for iPad mini 5 (768 x 1024 CSS px). */
.modern-main{max-width:732px!important;padding:6px 8px!important;}
.dictionary-layout,.wordbook-layout{max-width:716px!important;}
.modern-card{max-width:708px!important;}
.screen-study-card{max-height:calc(100dvh - 104px)!important;padding:5px!important;}

/* Keep the principal card dense: top, middle and bottom rows align exactly. */
.screen-card-grid{
  grid-template-columns:174px minmax(0,1fr)!important;
  grid-template-rows:142px 188px 44px!important;
  gap:5px 6px!important;
  align-items:stretch!important;
}
.screen-char-column{display:block!important;min-height:0!important;}
.screen-char-box{height:100%!important;min-height:0!important;border-radius:9px!important;}
.screen-char{font-size:96px!important;line-height:.88!important;}
.screen-favorite{display:none!important;}
.screen-favorite-star{
  position:absolute;z-index:8;top:7px;right:8px;
  width:34px;height:34px;border:0;border-radius:50%;
  background:rgba(255,255,255,.82);color:#8d8175;
  font-size:25px;line-height:1;display:grid;place-items:center;
  cursor:pointer;box-shadow:0 2px 8px rgba(40,28,20,.10);
}
.screen-favorite-star.active{color:#d39408;background:#fff8d8;}
.screen-favorite-star:active{transform:scale(.94);}

/* Meaning and reading stay visually together instead of sitting at opposite edges. */
.screen-huneum-box{height:100%!important;min-height:0!important;align-content:stretch!important;}
.screen-sense-row{
  grid-template-columns:max-content max-content!important;
  justify-content:center!important;
  align-content:center!important;
  gap:20px!important;
  padding:5px 10px!important;
  min-height:0!important;
}
.screen-sense-meaning{font-size:25px!important;text-align:left!important;max-width:330px!important;}
.screen-sense-reading{font-size:28px!important;min-width:0!important;text-align:left!important;}

/* Equipment and structure use the same compact fixed height. */
.screen-equip-box,.screen-detail-box{height:188px!important;min-height:0!important;}
.screen-equip-box{padding:2px!important;}
.screen-equip-box .equipment-board{transform:scale(.96)!important;}
.screen-detail-box{padding:7px 9px!important;overflow:auto!important;}
.screen-detail-box .section-title{font-size:12px!important;padding:2px 7px!important;margin-bottom:4px!important;}
.screen-detail-box .structure-main{font-size:17px!important;line-height:1.25!important;}
.screen-detail-box .structure-line{font-size:14px!important;line-height:1.31!important;}
.screen-detail-box .structure-meaning{font-size:15px!important;line-height:1.2!important;padding:3px 8px!important;}
.screen-detail-box .structure-flow{gap:5px!important;}
.screen-detail-box .structure-row,.screen-detail-box .structure-result{min-height:22px!important;grid-template-columns:15px minmax(0,1fr)!important;column-gap:5px!important;}
.screen-detail-box .structure-dot{margin-top:8px!important;width:6px!important;height:6px!important;}

.screen-bottom-tags,.screen-example-box{height:44px!important;min-height:0!important;}
.screen-bottom-tag{font-size:12px!important;padding:2px 4px!important;}
.screen-bottom-tag.radical{font-size:18px!important;}
.screen-example-box{padding:3px 8px!important;gap:6px!important;}
.screen-example-label{font-size:11px!important;}
.screen-example-item{font-size:13px!important;}

/* One-line study bar. */
.screen-extra-panels{margin-top:5px!important;gap:5px!important;}
.study-panel.study-bar{
  min-height:38px!important;margin:0!important;padding:4px 6px!important;
  border-radius:8px!important;display:grid!important;
  grid-template-columns:auto auto minmax(80px,1fr)!important;
  align-items:center!important;gap:5px!important;background:#fffaf2!important;
}
.study-bar-label{font-size:10px;font-weight:950;color:#75695e;padding:0 3px;white-space:nowrap;}
.study-bar-buttons{display:flex!important;flex-wrap:nowrap!important;gap:3px!important;}
.study-bar-buttons button{
  padding:4px 7px!important;min-height:27px!important;border-radius:999px!important;
  font-size:10px!important;white-space:nowrap!important;
}
.study-memo.study-memo-line{
  width:100%!important;min-width:0!important;height:28px!important;min-height:28px!important;
  resize:none!important;border-radius:7px!important;padding:4px 7px!important;
  font-size:11px!important;line-height:1.2!important;
}
.study-panel.study-bar .study-head{display:none!important;}

/* Toolbar and surrounding whitespace. */
.modern-card-toolbar{min-height:38px!important;padding:3px 5px!important;}
.card-action{min-height:31px!important;padding:5px 9px!important;}
.screen-edit-wrap{grid-column:2!important;grid-row:1 / span 3!important;}

@media(max-width:700px){
  .modern-main{max-width:100%!important;padding:5px!important;}
  .dictionary-layout,.wordbook-layout,.modern-card{max-width:100%!important;}
  .screen-card-grid{grid-template-columns:166px minmax(0,1fr)!important;grid-template-rows:138px 182px 42px!important;}
  .screen-equip-box,.screen-detail-box{height:182px!important;}
  .screen-bottom-tags,.screen-example-box{height:42px!important;}
  .screen-char{font-size:91px!important;}
  .screen-sense-meaning{font-size:23px!important;max-width:290px!important;}
  .screen-sense-reading{font-size:26px!important;}
}
@media(max-width:560px){
  .screen-card-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important;}
  .screen-char-box{height:142px!important;}
  .screen-equip-box,.screen-detail-box{height:auto!important;min-height:170px!important;}
  .screen-bottom-tags,.screen-example-box{height:auto!important;min-height:42px!important;}
  .study-panel.study-bar{grid-template-columns:auto minmax(0,1fr)!important;}
  .study-memo.study-memo-line{grid-column:1 / -1!important;}
}


/* source style11 id="v77-fixed-huneum-compact-structure" */
/* v77: preserve the original fixed meaning/reading slots; enlarge type only. */
.screen-huneum-box{
  height:100%!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:repeat(var(--sense-count,1),minmax(0,1fr))!important;
  align-content:stretch!important;
}
.screen-sense-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 88px!important;
  justify-content:stretch!important;
  align-items:center!important;
  gap:0!important;
  padding:0!important;
  min-height:0!important;
}
.screen-sense-meaning{
  width:100%!important;
  max-width:none!important;
  padding:5px 17px 5px 8px!important;
  font-size:27px!important;
  line-height:1.06!important;
  text-align:right!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.screen-sense-reading{
  width:88px!important;
  min-width:88px!important;
  height:100%!important;
  padding:5px 6px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-left:1px solid #dfd5ca!important;
  font-size:30px!important;
  line-height:1!important;
  text-align:center!important;
  white-space:nowrap!important;
}
/* Slightly reduce the equipment/character board without changing the card grid. */
.screen-equip-box{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;}
.screen-equip-box .equipment-board{
  transform:scale(.88)!important;
  transform-origin:center center!important;
  margin:auto!important;
}
/* Start directly with the decomposition content; remove the decorative structure banner. */
.screen-detail-box .section-title{display:none!important;}
.screen-detail-box .section{padding-top:8px!important;}
.screen-detail-box .structure-flow{margin-top:0!important;}
@media(max-width:700px){
  .screen-sense-row{grid-template-columns:minmax(0,1fr) 80px!important;}
  .screen-sense-meaning{font-size:25px!important;padding-right:14px!important;}
  .screen-sense-reading{width:80px!important;min-width:80px!important;font-size:28px!important;}
  .screen-equip-box .equipment-board{transform:scale(.84)!important;}
}


/* source style12 id="v78-ipadmini-readable-pencil-style" */
/* v78: iPad mini portrait readability, stable two-slot senses, one-word-per-line, Apple Pencil practice pad. */
:root{
  --study-serif:"AppleMyungjo","Hiragino Mincho ProN","Hiragino Mincho Pro","Noto Serif CJK KR","Noto Serif KR","Source Han Serif K","Batang","Songti SC",serif;
  --hanja-font:"UNI_HSR","AppleMyungjo","Hiragino Mincho ProN","Hiragino Mincho Pro","Noto Serif CJK KR","Source Han Serif K","Batang","Songti SC",serif;
}

/* If the same-folder UNI_HSR font is unavailable on iPadOS, fall back to iOS serif fonts instead of Gothic. */
.screen-char,
.screen-sense-reading,
.screen-detail-box .structure-main,
.screen-detail-box .hanja-inline,
.screen-example-item .hanja-inline,
.screen-bottom-tag.radical,
.result-char,
.modern-big-char{
  font-family:var(--hanja-font)!important;
}
.screen-sense-meaning,
.screen-detail-box .structure-line,
.screen-detail-box .structure-meaning,
.screen-example-item{
  font-family:var(--study-serif)!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Always reserve at least two meaning/reading rows. A one-sense card stays in the upper row. */
.screen-huneum-box{
  grid-template-rows:repeat(var(--sense-count,2),minmax(0,1fr))!important;
}
.screen-sense-row.empty .screen-sense-meaning,
.screen-sense-row.empty .screen-sense-reading{
  visibility:hidden!important;
}

/* One vocabulary item per line. */
.screen-example-box{
  align-items:flex-start!important;
  overflow:auto!important;
}
.screen-example-items{
  display:grid!important;
  grid-template-columns:1fr!important;
  align-content:start!important;
  align-items:start!important;
  gap:5px!important;
  min-width:0!important;
  width:100%!important;
}
.screen-example-item{
  display:grid!important;
  grid-template-columns:13px minmax(0,1fr)!important;
  gap:4px!important;
  align-items:start!important;
  width:100%!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:keep-all!important;
}
.screen-example-bullet{
  font-family:system-ui,-apple-system,"Apple SD Gothic Neo",sans-serif!important;
  color:#6d8798;
  font-weight:950;
  text-align:center;
}

/* Apple Pencil writing area. Touch input never draws; it remains available for scrolling/swiping. */
.screen-practice-pad{
  margin-top:7px;
  border:2px solid #d6c9bc;
  border-radius:11px;
  overflow:hidden;
  background:#fffefb;
}
.practice-pad-head{
  min-height:37px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 8px 5px 11px;
  border-bottom:1px solid #ded3c8;
  background:#faf5ee;
}
.practice-pad-title{
  font-weight:950;
  color:#4f4339;
  white-space:nowrap;
}
.practice-pad-tip{
  flex:1;
  min-width:0;
  color:#7a6d61;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.practice-pad-clear{
  flex:0 0 auto;
  border:1px solid #d2c5b8;
  background:#fff;
  color:#5b5047;
  border-radius:999px;
  padding:5px 10px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.practice-pad-canvas-wrap{
  position:relative;
  height:188px;
  overflow:hidden;
  background-color:#fff;
  background-image:
    linear-gradient(to right, transparent calc(50% - .5px), rgba(176,158,140,.32) calc(50% - .5px), rgba(176,158,140,.32) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom, transparent calc(50% - .5px), rgba(176,158,140,.32) calc(50% - .5px), rgba(176,158,140,.32) calc(50% + .5px), transparent calc(50% + .5px)),
    repeating-linear-gradient(to right, transparent 0, transparent calc(25% - .5px), rgba(198,185,172,.22) calc(25% - .5px), rgba(198,185,172,.22) calc(25% + .5px), transparent calc(25% + .5px), transparent 25%),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(50% - .5px), rgba(198,185,172,.18) calc(50% - .5px), rgba(198,185,172,.18) calc(50% + .5px), transparent calc(50% + .5px), transparent 50%);
}
.practice-pad-canvas{
  position:absolute;
  inset:0;
  z-index:2;
  display:block;
  width:100%;
  height:100%;
  cursor:crosshair;
  touch-action:pan-y pinch-zoom;
}
.practice-pad-watermark{
  position:absolute;
  inset:0;
  z-index:1;
  display:grid;
  place-items:center;
  pointer-events:none;
  color:rgba(117,100,84,.18);
  font-family:var(--study-serif);
  font-size:15px;
  letter-spacing:.06em;
}

@media (max-width:800px) and (orientation:portrait){
  /* Give the explanation and vocabulary enough physical size on a 768px-wide iPad mini. */
  .screen-card-grid{
    grid-template-columns:174px minmax(0,1fr)!important;
    grid-template-rows:142px 238px 96px!important;
    gap:6px!important;
  }
  .screen-equip-box,.screen-detail-box{
    height:238px!important;
  }
  .screen-detail-box{
    padding:11px 13px!important;
  }
  .screen-detail-box .section{
    padding-top:3px!important;
  }
  .screen-detail-box .structure-flow{
    gap:9px!important;
  }
  .screen-detail-box .structure-row,
  .screen-detail-box .structure-result{
    grid-template-columns:18px minmax(0,1fr)!important;
    column-gap:7px!important;
    min-height:28px!important;
  }
  .screen-detail-box .structure-dot{
    width:7px!important;
    height:7px!important;
    margin-top:10px!important;
  }
  .screen-detail-box .structure-arrow{
    font-size:23px!important;
  }
  .screen-detail-box .structure-main{
    font-size:22px!important;
    line-height:1.35!important;
  }
  .screen-detail-box .structure-line{
    font-size:19px!important;
    line-height:1.48!important;
  }
  .screen-detail-box .structure-meaning{
    font-size:20px!important;
    line-height:1.25!important;
    padding:5px 11px!important;
  }
  .screen-bottom-tags,.screen-example-box{
    height:96px!important;
  }
  .screen-bottom-tags{
    align-content:stretch!important;
  }
  .screen-example-box{
    grid-template-columns:45px minmax(0,1fr)!important;
    gap:8px!important;
    padding:8px 11px!important;
  }
  .screen-example-label{
    font-size:14px!important;
    line-height:1.35!important;
    padding-top:2px!important;
  }
  .screen-example-item{
    font-size:18px!important;
    line-height:1.38!important;
  }
  .screen-sense-meaning{
    font-size:28px!important;
  }
  .screen-sense-reading{
    font-size:31px!important;
  }
  .practice-pad-canvas-wrap{
    height:190px;
  }
}

@media (max-width:700px) and (orientation:portrait){
  .screen-card-grid{
    grid-template-columns:166px minmax(0,1fr)!important;
    grid-template-rows:138px 228px 92px!important;
  }
  .screen-equip-box,.screen-detail-box{height:228px!important;}
  .screen-bottom-tags,.screen-example-box{height:92px!important;}
  .screen-detail-box .structure-main{font-size:21px!important;}
  .screen-detail-box .structure-line{font-size:18px!important;}
  .screen-detail-box .structure-meaning{font-size:19px!important;}
  .screen-example-item{font-size:17px!important;}
}

@media (max-width:560px){
  .screen-card-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important;}
  .screen-equip-box,.screen-detail-box,.screen-bottom-tags,.screen-example-box{height:auto!important;}
  .screen-detail-box{min-height:210px!important;}
  .screen-example-box{min-height:100px!important;}
  .practice-pad-canvas-wrap{height:165px;}
  .practice-pad-tip{display:none;}
}


/* source style13 id="v80-ipadmini-compact-penmode-style" */
/* v80: preserve the compact card proportions; enlarge only the readable text. */
:root{
  --hanja-font:"UNI_HSR","Hiragino Mincho ProN","Hiragino Mincho Pro","YuMincho","Songti SC","STSong","Kaiti SC","AppleMyungjo",ui-serif,serif;
  --study-serif:"Hiragino Mincho ProN","YuMincho","Songti SC","STSong","AppleMyungjo",ui-serif,serif;
}

/* Radical and liushu are small metadata immediately below the equipment table. */
.screen-equip-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  overflow:hidden!important;
}
.screen-equip-table-wrap{
  min-height:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:-5px 0 -3px!important;
}
.screen-equip-stack .equipment-board{
  transform:scale(.80)!important;
  transform-origin:center center!important;
  margin:0!important;
}
.screen-mini-meta{
  width:calc(100% - 8px)!important;
  min-height:20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  overflow:hidden!important;
}
.screen-mini-meta span{
  min-width:0!important;
  max-width:50%!important;
  padding:2px 6px!important;
  border:1px solid #d7cabc!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#665a50!important;
  font-size:10px!important;
  line-height:1.1!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.screen-mini-meta .mini-meta-radical{
  font-family:var(--hanja-font)!important;
  font-size:13px!important;
  color:#17617d!important;
  background:#eef9fd!important;
  border-color:#b9dbe8!important;
}
.editing-equip-stack{grid-row:2 / span 2!important;}
.screen-bottom-tags{display:none!important;}

/* Vocabulary spans the full card width and begins at the left edge. */
.screen-example-box{
  grid-column:1 / -1!important;
  grid-row:3!important;
  display:grid!important;
  grid-template-columns:43px minmax(0,1fr)!important;
  align-items:start!important;
  justify-items:stretch!important;
  gap:4px!important;
  padding:2px 8px!important;
  overflow:hidden!important;
  white-space:normal!important;
}
.screen-example-label{
  align-self:start!important;
  padding-top:2px!important;
  text-align:left!important;
  font-size:13px!important;
  line-height:1.12!important;
}
.screen-example-items{
  width:100%!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.screen-example-item{
  grid-template-columns:10px minmax(0,1fr)!important;
  gap:2px!important;
  min-height:19px!important;
  font-family:var(--study-serif)!important;
  font-size:17px!important;
  line-height:1.12!important;
  text-align:left!important;
}
.screen-example-bullet{font-size:13px!important;line-height:1.35!important;}
.screen-example-item .hanja-inline{font-family:var(--hanja-font)!important;}

/* Study bar stays above the writing pad. */
.screen-extra-panels{order:1!important;}
.screen-practice-pad{order:2!important;}

/* The lower unused iPad-mini area becomes a large handwriting canvas. */
.screen-practice-pad{
  height:clamp(285px, calc(100dvh - 610px), 410px)!important;
  min-height:285px!important;
  margin-top:5px!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  border-radius:9px!important;
}
.practice-pad-head{
  min-height:39px!important;
  padding:4px 7px 4px 10px!important;
  gap:6px!important;
}
.practice-pad-title{font-size:13px!important;}
.practice-pad-mode-state{
  flex:1!important;
  min-width:0!important;
  color:#76695e!important;
  font-size:10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.practice-pad-actions{
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  flex:0 0 auto!important;
}
.practice-pad-actions button{
  min-height:29px!important;
  border:1px solid #d2c5b8!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#50463e!important;
  padding:4px 8px!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
}
.practice-pad-actions .practice-pad-mode.active{
  color:#075d36!important;
  border-color:#16834f!important;
  background:#e7f7ed!important;
}
.practice-pad-nav{
  display:flex!important;
  gap:3px!important;
  margin-left:2px!important;
  padding-left:5px!important;
  border-left:1px solid #ddd1c5!important;
}
.practice-pad-nav button{
  min-width:39px!important;
  color:#174d6b!important;
  border-color:#b9d5e4!important;
  background:#f1faff!important;
}
.practice-pad-canvas-wrap{
  height:auto!important;
  min-height:0!important;
}
.practice-pad-canvas{touch-action:pan-y!important;}
html.apple-pencil-mode,
body.apple-pencil-mode{
  overscroll-behavior:none!important;
}
body.apple-pencil-mode .modern-card,
body.apple-pencil-mode .screen-study-card{
  touch-action:none!important;
  overscroll-behavior:none!important;
}
body.apple-pencil-mode .screen-study-card{overflow:hidden!important;}
body.apple-pencil-mode .practice-pad-canvas{touch-action:none!important;}
body.apple-pencil-mode .practice-pad-canvas-wrap{cursor:crosshair!important;}
body:not(.apple-pencil-mode) .practice-pad-canvas{cursor:default!important;}
body:not(.apple-pencil-mode) .practice-pad-watermark{color:rgba(117,100,84,.28)!important;}

@media (max-width:800px) and (orientation:portrait){
  /* Restore v76 card proportions. Only typography changes. */
  .screen-card-grid{
    grid-template-columns:174px minmax(0,1fr)!important;
    grid-template-rows:142px 188px 44px!important;
    gap:5px 6px!important;
  }
  .screen-equip-box,.screen-detail-box{height:188px!important;}
  .screen-detail-box{
    padding:7px 9px!important;
    overflow:auto!important;
  }
  .screen-detail-box .section{padding-top:4px!important;}
  .screen-detail-box .structure-flow{gap:5px!important;margin-top:0!important;}
  .screen-detail-box .structure-row,
  .screen-detail-box .structure-result{
    grid-template-columns:15px minmax(0,1fr)!important;
    column-gap:5px!important;
    min-height:22px!important;
  }
  .screen-detail-box .structure-dot{
    width:6px!important;height:6px!important;margin-top:8px!important;
  }
  .screen-detail-box .structure-arrow{font-size:21px!important;}
  .screen-detail-box .structure-main{
    font-size:21px!important;
    line-height:1.25!important;
  }
  .screen-detail-box .structure-line{
    font-size:18px!important;
    line-height:1.32!important;
  }
  .screen-detail-box .structure-meaning{
    font-size:19px!important;
    line-height:1.18!important;
    padding:3px 8px!important;
  }
  .screen-example-box{height:44px!important;min-height:0!important;}
  .screen-sense-meaning{font-size:28px!important;}
  .screen-sense-reading{font-size:31px!important;}
}

@media (max-width:700px) and (orientation:portrait){
  .screen-card-grid{
    grid-template-columns:166px minmax(0,1fr)!important;
    grid-template-rows:138px 182px 44px!important;
  }
  .screen-equip-box,.screen-detail-box{height:182px!important;}
  .screen-example-box{height:44px!important;}
  .screen-detail-box .structure-main{font-size:20px!important;}
  .screen-detail-box .structure-line{font-size:17px!important;}
  .screen-detail-box .structure-meaning{font-size:18px!important;}
  .screen-example-item{font-size:16px!important;}
  .screen-practice-pad{height:clamp(260px, calc(100dvh - 590px), 390px)!important;min-height:260px!important;}
}

@media (max-width:560px){
  .screen-card-grid{grid-template-columns:1fr!important;grid-template-rows:auto!important;}
  .screen-example-box{grid-column:1!important;grid-row:auto!important;height:auto!important;min-height:48px!important;}
  .screen-practice-pad{height:260px!important;min-height:260px!important;}
  .practice-pad-mode-state{display:none!important;}
  .practice-pad-actions button{padding:4px 6px!important;font-size:9px!important;}
}


/* source style14 id="v81-ipadmini-three-stage-study-sync-style" */
/* v81: three equal explanation rows, two visible word rows, toolbar study controls, larger scrollable Pencil pad. */

/* Let the card stage own vertical scrolling so the enlarged writing pad is reachable. */
.card-stage{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:84px!important;
  scroll-padding-bottom:84px!important;
  -webkit-overflow-scrolling:touch;
}
.modern-card{max-height:none!important;height:auto!important;}
.screen-study-card{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:contain!important;
}
body.apple-pencil-mode .screen-study-card{overflow:visible!important;}

/* Search + study checks + sort live in one compact toolbar. */
.compact-card-toolbar{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  min-height:39px!important;
  padding:3px 5px!important;
  overflow:hidden!important;
}
.compact-card-toolbar .toc-action{margin-right:0!important;flex:0 0 auto!important;}
.toolbar-study{
  display:flex!important;
  align-items:center!important;
  gap:2px!important;
  flex:0 1 auto!important;
  min-width:0!important;
  overflow-x:auto!important;
  scrollbar-width:none!important;
}
.toolbar-study::-webkit-scrollbar{display:none!important;}
.toolbar-study button{
  min-height:29px!important;
  padding:4px 6px!important;
  border:1px solid #d3c6b8!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#554a41!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}
.toolbar-study button.active{background:#eef7ff!important;border-color:#72a2d4!important;color:#0c559c!important;}
.toolbar-study button.danger.active{background:#fff0eb!important;border-color:#c55f44!important;color:#96331c!important;}
.toolbar-study button.done.active{background:#edf9f1!important;border-color:#3b9b69!important;color:#08613a!important;}
.toolbar-wordbook-sort{
  flex:0 0 92px!important;
  width:92px!important;
  min-height:29px!important;
  padding:3px 5px!important;
  border:1px solid #cfc2b5!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#4f443b!important;
  font-size:10px!important;
  font-weight:850!important;
}
.compact-card-toolbar .modern-card-actions{margin-left:auto!important;flex:0 0 auto!important;}

/* Fixed 3-stage panel: 파자 / 한글 풀이 / 의미 도출. */
.screen-detail-box{
  padding:0!important;
  overflow:hidden!important;
}
.screen-detail-box .section,
.screen-detail-box .structure-flow{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}
.screen-detail-box .structure-three-stage{
  display:grid!important;
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
  gap:0!important;
  align-content:stretch!important;
}
.screen-detail-box .structure-stage{
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:6px!important;
  min-height:0!important;
  padding:4px 14px!important;
  border-bottom:1px solid #eadfd4!important;
  overflow:hidden!important;
}
.screen-detail-box .structure-stage:last-child{border-bottom:0!important;}
.screen-detail-box .structure-stage-mark,
.screen-detail-box .structure-arrow{
  display:block!important;
  width:28px!important;
  color:#846f5b!important;
  font-family:system-ui,-apple-system,"Apple SD Gothic Neo",sans-serif!important;
  font-size:25px!important;
  line-height:1!important;
  font-weight:950!important;
  text-align:center!important;
}
.screen-detail-box .structure-arrow{color:#146846!important;font-size:30px!important;}
.screen-detail-box .structure-main,
.screen-detail-box .structure-line,
.screen-detail-box .structure-meaning{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  overflow:hidden!important;
  text-align:left!important;
  word-break:keep-all!important;
  overflow-wrap:anywhere!important;
}
.screen-detail-box .structure-main{
  font-size:27px!important;
  line-height:1.12!important;
  color:#153d56!important;
  font-weight:800!important;
}
.screen-detail-box .structure-line{
  font-size:23px!important;
  line-height:1.15!important;
  color:#332c26!important;
  font-weight:650!important;
}
.screen-detail-box .structure-meaning{
  width:fit-content!important;
  max-width:100%!important;
  font-size:25px!important;
  line-height:1.08!important;
  padding:5px 11px!important;
  border-radius:999px!important;
  font-weight:950!important;
}

/* Word strip keeps one item per row and shows two rows without scrolling. */
.screen-card-grid{
  grid-template-rows:142px 188px 62px!important;
}
.screen-example-box{
  height:62px!important;
  min-height:62px!important;
  grid-template-columns:47px minmax(0,1fr)!important;
  padding:4px 10px!important;
  gap:6px!important;
  align-items:start!important;
}
.screen-example-label{font-size:14px!important;line-height:1.2!important;padding-top:3px!important;}
.screen-example-items{
  height:54px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  gap:1px!important;
  scroll-snap-type:y proximity;
}
.screen-example-item{
  min-height:25px!important;
  font-size:18px!important;
  line-height:1.28!important;
  scroll-snap-align:start;
}
.screen-example-bullet{font-size:14px!important;line-height:1.5!important;}

/* Lower study bar is gone; optional lineage remains compact. */
.screen-extra-panels{margin-top:4px!important;}

/* Button-only Pencil toolbar and substantially larger writing area. */
.screen-practice-pad{
  height:520px!important;
  min-height:520px!important;
  margin-top:5px!important;
  grid-template-rows:30px minmax(0,1fr)!important;
}
.practice-pad-head{
  min-height:30px!important;
  height:30px!important;
  padding:2px 5px!important;
  justify-content:flex-end!important;
  background:#faf6f0!important;
}
.practice-pad-title,.practice-pad-mode-state,.practice-pad-tip{display:none!important;}
.practice-pad-actions{
  width:100%!important;
  margin:0!important;
  justify-content:flex-end!important;
  gap:3px!important;
}
.practice-pad-actions button{
  min-height:24px!important;
  height:24px!important;
  padding:3px 7px!important;
  border-radius:6px!important;
  font-size:9.5px!important;
}
.practice-pad-nav{margin-left:2px!important;padding-left:4px!important;}
.practice-pad-nav button{min-width:36px!important;}
.practice-pad-canvas-wrap{height:auto!important;min-height:0!important;}
.practice-pad-watermark{display:none!important;}

/* Wordbook tabs: study-priority is the default collection. */
.wordbook-compact-controls .wordbook-tabs{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.wordbook-sort-select{
  width:100%!important;
  min-height:31px!important;
  margin-top:2px!important;
  padding:5px 7px!important;
  border:1px solid #d2c5b8!important;
  border-radius:8px!important;
  background:#fff!important;
  font-size:11px!important;
  font-weight:850!important;
}
.result-star{min-width:30px!important;text-align:center!important;letter-spacing:1px!important;}

@media (max-width:700px) and (orientation:portrait){
  .screen-card-grid{grid-template-rows:138px 182px 60px!important;}
  .screen-example-box{height:60px!important;min-height:60px!important;}
  .screen-detail-box .structure-main{font-size:25px!important;}
  .screen-detail-box .structure-line{font-size:21px!important;}
  .screen-detail-box .structure-meaning{font-size:23px!important;}
  .screen-practice-pad{height:470px!important;min-height:470px!important;}
  .toolbar-study button{font-size:9px!important;padding:4px 5px!important;}
  .toolbar-wordbook-sort{flex-basis:84px!important;width:84px!important;font-size:9px!important;}
}

@media (max-width:560px){
  .compact-card-toolbar{overflow-x:auto!important;}
  .toolbar-study{overflow:visible!important;}
  .screen-card-grid{grid-template-rows:auto!important;}
  .screen-detail-box{height:210px!important;min-height:210px!important;}
  .screen-example-box{height:62px!important;min-height:62px!important;}
  .screen-practice-pad{height:430px!important;min-height:430px!important;}
}


/* source style15 id="v83-component-reading-autofit" */
/* v83: component readings + true single-line auto-fit, without enlarging the panel. */
.screen-detail-box .structure-stage-decomp{grid-template-columns:28px minmax(0,1fr)!important;}
.decomp-components{
  min-width:0!important;
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:.26em!important;
  white-space:nowrap!important;
  overflow:visible!important;
  color:#173f56!important;
  font-size:25px;
  line-height:1.05!important;
  font-weight:800!important;
}
.decomp-token{display:inline-flex!important;align-items:baseline!important;gap:.11em!important;white-space:nowrap!important;min-width:0!important;}
.decomp-glyph{font-family:var(--hanja-font)!important;font-size:1.12em!important;font-weight:900!important;color:#123d58!important;}
.decomp-colon{font-family:system-ui,-apple-system,"Apple SD Gothic Neo",sans-serif!important;font-size:.82em!important;color:#8b7763!important;font-weight:900!important;}
.decomp-gloss{font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif!important;font-size:.82em!important;color:#342d27!important;font-weight:750!important;}
.decomp-reading{font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif!important;font-size:.72em!important;color:#21674f!important;font-weight:950!important;letter-spacing:-.02em!important;}
.decomp-reading.inferred{color:#8a6540!important;text-decoration:underline dotted rgba(138,101,64,.55);text-underline-offset:2px;}
.decomp-reading.missing{color:#9a9188!important;font-weight:800!important;}
.decomp-plus{
  flex:0 0 auto!important;
  display:inline-grid!important;
  place-items:center!important;
  width:1.25em!important;
  height:1.25em!important;
  border:1px solid #c8b8a7!important;
  border-radius:999px!important;
  background:#f5eee5!important;
  color:#80674f!important;
  font-family:system-ui,-apple-system,sans-serif!important;
  font-size:.68em!important;
  line-height:1!important;
  font-weight:950!important;
}
.decomp-empty{font-size:.82em!important;color:#887a6d!important;}
.screen-detail-box .structure-stage-explain .structure-line{
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  font-size:23px;
  letter-spacing:-.01em;
}
.screen-detail-box [data-fit-line]{transform-origin:left center!important;}
/* Keep the original 3-stage panel size. Only give the word list enough room for two one-line entries. */
.screen-card-grid{grid-template-rows:142px 188px 68px!important;}
.screen-example-box{height:68px!important;min-height:68px!important;align-items:start!important;}
.screen-example-items{height:60px!important;min-height:60px!important;overflow-y:auto!important;overflow-x:hidden!important;gap:2px!important;}
.screen-example-item{height:28px!important;min-height:28px!important;font-size:18px!important;line-height:1.24!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.screen-example-items::-webkit-scrollbar{width:3px;}
.screen-example-items::-webkit-scrollbar-thumb{background:#c8b9aa;border-radius:999px;}
@media (max-width:700px) and (orientation:portrait){
  .screen-card-grid{grid-template-rows:138px 182px 66px!important;}
  .screen-example-box{height:66px!important;min-height:66px!important;}
  .screen-example-items{height:58px!important;min-height:58px!important;}
  .screen-example-item{height:27px!important;min-height:27px!important;font-size:17.5px!important;}
}


/* source style16 id="integrated-cbt-scoped-style" */
/* 📱 기본 설정 및 레이아웃 (시험지 영역 바탕체 적용) */
        #integratedCbtApp,
#integratedCbtApp{ width: 100%; height: 100%; min-height: 0; }
        #integratedCbtApp{ font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background-color: #f4f6f9; margin: 0; padding: 0; height: var(--app-height, 100dvh); min-height: 0; display: flex; flex-direction: column; overflow: hidden; touch-action: manipulation; }
        
        /* 앱 UI 껍데기는 가독성을 위해 고딕 유지 */
        #integratedCbtApp .header{ background-color: #1a365d; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 10; font-family: "Malgun Gothic", sans-serif; }
        #integratedCbtApp .header-title{ font-size: 18px; font-weight: bold; margin: 0; }
        #integratedCbtApp .header-controls{ display: flex; align-items: center; gap: 12px; }
        #integratedCbtApp .timer{ font-size: 18px; font-weight: bold; color: #ffeb3b; letter-spacing: 1px; transition: color 0.3s; }
        #integratedCbtApp .timer.warning{ color: #fc8181; animation: blink 1s infinite alternate; }
        
        @keyframes blink { 0% { opacity: 1; } 100% { opacity: 0.7; } }
        
        /* 실시간 진행률 바 */
        #integratedCbtApp .progress-container{ width: 100%; background-color: #e2e8f0; height: 4px; display: none; flex-shrink: 0; }
        #integratedCbtApp .progress-bar{ height: 100%; background-color: #38a169; width: 0%; transition: width 0.3s ease; }

        /* 공통 버튼 */
        #integratedCbtApp .btn{ background-color: #2b6cb0; color: white; border: none; padding: 14px 20px; font-size: 16px; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.2s; text-align: center; display: block; width: 100%; box-sizing: border-box; margin-bottom: 10px; font-family: "Malgun Gothic", sans-serif; }
        #integratedCbtApp .btn:active{ transform: scale(0.98); }
        #integratedCbtApp .btn:hover{ background-color: #2c5282; }
        #integratedCbtApp .btn-wrong{ background-color: #e53e3e; }
        #integratedCbtApp .btn-wrong:hover{ background-color: #c53030; }
        #integratedCbtApp .btn-outline{ background-color: white; border: 2px solid #cbd5e0; color: #4a5568; }
        #integratedCbtApp .btn-outline:hover{ background-color: #edf2f7; }
        
        /* 헤더 컨트롤 버튼 */
        #integratedCbtApp .btn-exit{ background: transparent; color: white; border: 1px solid rgba(255,255,255,0.5); padding: 6px 12px; border-radius: 6px; font-size: 14px; cursor: pointer; transition: 0.2s; font-family: "Malgun Gothic", sans-serif; }
        #integratedCbtApp .btn-exit:hover{ background: rgba(255,255,255,0.2); }
        #integratedCbtApp .btn-submit{ background-color: #ed8936; color: white; padding: 6px 15px; border-radius: 6px; font-size: 15px; font-weight: bold; border: none; cursor: pointer; transition: 0.2s; font-family: "Malgun Gothic", sans-serif; } 
        #integratedCbtApp .btn-submit:hover{ background-color: #dd6b20; }
        #integratedCbtApp .btn-sync{ background:#2f855a; color:white; border:1px solid rgba(255,255,255,0.35); padding:6px 12px; border-radius:6px; font-size:14px; font-weight:bold; cursor:pointer; transition:0.2s; font-family:"Malgun Gothic", sans-serif; white-space:nowrap; }
        #integratedCbtApp .btn-sync:hover{ background:#276749; }
        #integratedCbtApp .btn-sync:disabled{ opacity:0.65; cursor:wait; }
        #integratedCbtApp .sync-status{ max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:#c6f6d5; }
        #integratedCbtApp .sync-status.error{ color:#fed7d7; }
        #integratedCbtApp .sync-status.pending{ color:#feebc8; }

        /* 문제 수정 모달 */
        #integratedCbtApp .edit-modal-backdrop{ display:none; position:fixed; inset:0; z-index:1000; background:rgba(15,23,42,0.58); align-items:center; justify-content:center; padding:18px; box-sizing:border-box; }
        #integratedCbtApp .edit-modal-backdrop.open{ display:flex; }
        #integratedCbtApp .edit-modal{ width:min(720px, 100%); max-height:92vh; overflow:auto; background:white; border-radius:12px; padding:22px; box-shadow:0 18px 55px rgba(0,0,0,0.28); font-family:"Malgun Gothic", sans-serif; overscroll-behavior:contain; }
        #integratedCbtApp .edit-modal h3{ margin:0 0 16px; color:#1a365d; }
        #integratedCbtApp .edit-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
        #integratedCbtApp .edit-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; text-align:left; }
        #integratedCbtApp .edit-field.full{ grid-column:1 / -1; }
        #integratedCbtApp .edit-field label{ font-size:13px; font-weight:bold; color:#4a5568; }
        #integratedCbtApp .edit-field input,
#integratedCbtApp .edit-field textarea,
#integratedCbtApp .edit-field select{ width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #cbd5e0; border-radius:7px; font-size:15px; font-family:inherit; margin:0; }
        #integratedCbtApp .edit-field textarea{ min-height:84px; resize:vertical; line-height:1.5; }
        #integratedCbtApp .edit-modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:8px; }
        #integratedCbtApp .edit-modal-actions .btn{ width:auto; margin:0; padding:11px 18px; }
        @media (max-width: 680px) { #integratedCbtApp .sync-status{ display:none; } #integratedCbtApp .header{ padding:12px 10px; } #integratedCbtApp .header-controls{ gap:6px; } #integratedCbtApp .edit-grid{ grid-template-columns:1fr; } #integratedCbtApp .edit-field.full{ grid-column:auto; } }

        /* 시작 설정 화면: iPad에서도 내부 스크롤이 확실히 동작하도록 flex 높이 구조 사용 */
        #integratedCbtApp #setup-screen{
            /* iPad Safari flex 스크롤 보정: 화면 형식은 유지하고 높이 계산만 고정 */
            flex: 1 1 0%;
            height: 0;
            min-height: 0;
            width: 100%;
            max-width: none;
            margin: 0;
            padding: clamp(16px, 3vw, 32px);
            padding-bottom: calc(clamp(24px, 4vw, 40px) + env(safe-area-inset-bottom));
            box-sizing: border-box;
            background: #eef2f7;
            overflow-y: scroll;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-y: contain;
            touch-action: pan-y;
            text-align: left;
            font-family: "Malgun Gothic", sans-serif;
        }
        #integratedCbtApp .setup-shell{ width: min(100%, 820px); margin: 0 auto; }
        #integratedCbtApp .setup-hero{
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 18px;
            margin-bottom: 18px;
            padding: 4px 2px;
        }
        #integratedCbtApp .setup-eyebrow{ margin: 0 0 6px; color: #2b6cb0; font-size: var(--fs-12); font-weight: 800; letter-spacing: 0.12em; }
        #integratedCbtApp .setup-hero h2{ margin: 0; color: #172b4d; font-size: var(--fs-28); line-height: 1.25; letter-spacing: -0.02em; }
        #integratedCbtApp .setup-description{ margin: 8px 0 0; color: #64748b; font-size: var(--fs-15); line-height: 1.55; }

        #integratedCbtApp .file-upload,
#integratedCbtApp .setup-card,
#integratedCbtApp .advanced-settings{
            background: #ffffff;
            border: 1px solid #dbe3ec;
            border-radius: 16px;
            box-shadow: 0 7px 24px rgba(30, 64, 175, 0.055);
        }
        #integratedCbtApp .file-upload{ padding: clamp(22px, 4vw, 34px); text-align: center; display: none; }
        #integratedCbtApp .file-upload h3{ margin: 0 0 8px; color: #1e293b; font-size: var(--fs-20); }
        #integratedCbtApp .file-upload p{ margin: 0 0 18px; color: #64748b; font-size: var(--fs-15); line-height: 1.55; }
        #integratedCbtApp .file-input{
            width: 100%;
            max-width: 480px;
            padding: 12px;
            box-sizing: border-box;
            border: 1px dashed #94a3b8;
            border-radius: 10px;
            background: #f8fafc;
            color: #334155;
            font-size: var(--fs-15);
            font-family: inherit;
        }
        #integratedCbtApp .data-status{
            flex: 0 0 auto;
            padding: 9px 13px;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            border-radius: 999px;
            color: #166534;
            font-size: var(--fs-14);
            font-weight: 700;
            white-space: nowrap;
        }

        #integratedCbtApp #menuSection{ display: none; }
        #integratedCbtApp .setup-card{ padding: clamp(18px, 3vw, 26px); margin-bottom: 14px; }
        #integratedCbtApp .setup-section-head{ display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
        #integratedCbtApp .setup-step{
            flex: 0 0 30px;
            width: 30px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 9px;
            background: #e8f1ff;
            color: #1d4ed8;
            font-size: var(--fs-14);
            font-weight: 800;
        }
        #integratedCbtApp .setup-section-head h3{ margin: 1px 0 3px; color: #1e293b; font-size: var(--fs-19); line-height: 1.35; }
        #integratedCbtApp .setup-section-head p{ margin: 0; color: #64748b; font-size: var(--fs-14); line-height: 1.45; }
        #integratedCbtApp .setup-fields{ display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 2fr); gap: 12px; margin-bottom: 14px; }
        #integratedCbtApp .setup-field{ min-width: 0; }
        #integratedCbtApp .setup-field label{ display: block; margin: 0 0 7px; color: #475569; font-size: var(--fs-13); font-weight: 750; }
        #integratedCbtApp .setup-field select{ margin: 0; }
        #integratedCbtApp .setup-actions{ display: grid; grid-template-columns: 1.45fr 1fr; gap: 10px; }
        #integratedCbtApp .setup-actions .btn{ margin: 0; min-height: 50px; }
        #integratedCbtApp .btn-secondary{ background: #475569; }
        #integratedCbtApp .btn-secondary:hover{ background: #334155; }

        #integratedCbtApp .exam-mode-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
        #integratedCbtApp .mode-button{
            min-height: 82px;
            margin: 0;
            padding: 13px 12px;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            color: #334155;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 5px;
            text-align: left;
            box-shadow: none;
        }
        #integratedCbtApp .mode-button:hover{ background: #f8fafc; border-color: #94a3b8; }
        #integratedCbtApp .mode-button strong{ color: #1e293b; font-size: var(--fs-15); line-height: 1.35; }
        #integratedCbtApp .mode-button span{ color: #64748b; font-size: var(--fs-12); font-weight: 500; line-height: 1.35; }
        #integratedCbtApp .mode-button.recommended{ border-color: #93c5fd; background: #eff6ff; }
        #integratedCbtApp .mode-button.recommended strong{ color: #1d4ed8; }

        #integratedCbtApp .advanced-settings{ margin-top: 14px; overflow: hidden; }
        #integratedCbtApp .advanced-settings > summary{
            list-style: none;
            cursor: pointer;
            padding: 15px 18px;
            color: #475569;
            font-size: var(--fs-14);
            font-weight: 750;
            user-select: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        #integratedCbtApp .advanced-settings > summary::-webkit-details-marker{ display: none; }
        #integratedCbtApp .advanced-settings > summary::after{ content: "＋"; color: #64748b; font-size: var(--fs-18); font-weight: 400; }
        #integratedCbtApp .advanced-settings[open] > summary::after{ content: "－"; }
        #integratedCbtApp .advanced-content{ padding: 0 18px 18px; border-top: 1px solid #edf2f7; }
        #integratedCbtApp .compact-option{
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 14px 0;
            border-bottom: 1px solid #edf2f7;
        }
        #integratedCbtApp .compact-option:last-of-type{ border-bottom: none; }
        #integratedCbtApp .compact-option-copy{ min-width: 0; }
        #integratedCbtApp .compact-option-title{ display: block; color: #334155; font-size: var(--fs-14); font-weight: 750; }
        #integratedCbtApp .compact-option-help{ display: block; margin-top: 3px; color: #94a3b8; font-size: var(--fs-12); line-height: 1.35; }
        #integratedCbtApp .compact-option select{ flex: 0 0 min(250px, 45%); margin: 0; }
        #integratedCbtApp .compact-option input[type="checkbox"]{ width: 22px; height: 22px; flex: 0 0 auto; }
        #integratedCbtApp .reset-data-btn{ margin: 12px 0 0; padding: 10px 14px; font-size: var(--fs-13); }

        #integratedCbtApp .flex-row{ display: flex; gap: 10px; margin-bottom: 10px; }
        #integratedCbtApp .flex-row > *{ flex: 1; }
        #integratedCbtApp select{
            width: 100%;
            padding: 12px;
            font-size: var(--fs-15);
            border-radius: 9px;
            border: 1px solid #cbd5e0;
            background: white;
            outline: none;
            box-sizing: border-box;
            margin-bottom: 10px;
            font-family: "Malgun Gothic", sans-serif;
        }
        #integratedCbtApp select:focus{ border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,0.16); }

        @media (max-width: 760px) {
            #integratedCbtApp #setup-screen{ padding: 14px 12px calc(28px + env(safe-area-inset-bottom)); }
            #integratedCbtApp .setup-hero{ align-items: flex-start; flex-direction: column; gap: 10px; }
            #integratedCbtApp .data-status{ white-space: normal; }
            #integratedCbtApp .setup-fields{ grid-template-columns: 1fr; }
            #integratedCbtApp .setup-actions{ grid-template-columns: 1fr; }
            #integratedCbtApp .exam-mode-grid{ grid-template-columns: 1fr; }
            #integratedCbtApp .mode-button{ min-height: 68px; }
            #integratedCbtApp .compact-option{ align-items: flex-start; flex-direction: column; gap: 9px; }
            #integratedCbtApp .compact-option select{ width: 100%; flex-basis: auto; }
        }

        /* CBT 문제 풀이 화면 */
        #integratedCbtApp #cbt-screen{ display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; max-width: 1100px; margin: 0 auto; width: 100%; padding: 15px; box-sizing: border-box; overflow: hidden; }
        #integratedCbtApp .question-area{ flex: 1 1 auto; min-height: 0; background: white; padding: 20px 25px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; }
        #integratedCbtApp .question-content{ flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 10px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-gutter: stable; overflow-anchor: none; }
        #integratedCbtApp .question-content::-webkit-scrollbar{ width: 8px; }
        #integratedCbtApp .question-content::-webkit-scrollbar-thumb{ background: #cbd5e0; border-radius: 4px; }
        
        /* 영역 헤더 */
        #integratedCbtApp .domain-header{ display:flex; flex-direction:column; justify-content:center; align-items:stretch; gap:3px; color:white; background:#2b6cb0; padding:9px 14px 10px; margin-bottom:15px; border-radius:6px; position:sticky; top:0; z-index:12; font-family:"Malgun Gothic",sans-serif; box-shadow:0 5px 13px rgba(26,54,93,.16); }
        #integratedCbtApp .domain-header-path{ width:100%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:clamp(12px,1.05vw,15px); line-height:1.25; font-weight:800; letter-spacing:-.15px; }
        #integratedCbtApp .domain-header-instruction{ width:100%; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:clamp(11px,.98vw,14px); line-height:1.3; font-weight:600; color:#edf7ff; letter-spacing:-.12px; }
        #integratedCbtApp .btn-edit-top{ background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.5); color: white; padding: 5px 10px; border-radius: 4px; font-size: 14px; cursor: pointer; transition: 0.2s; }
        #integratedCbtApp .btn-edit-top:hover{ background: rgba(255,255,255,0.4); }
        
        /* 공통 지문 */
        #integratedCbtApp .instruction-box{ background-color: #ebf8ff; border: 1px solid #90cdf4; color: #2c5282; padding: 12px 15px; border-radius: 8px; font-weight: normal; margin-bottom: 25px; font-size: 17px; line-height: 1.5; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
        #integratedCbtApp .stimulus-box{ border: 1px solid #e2e8f0; background: #f8fafc; padding: 18px; margin-bottom: 25px; font-size: 16px; line-height: 1.6; border-radius: 8px; letter-spacing: 0.5px; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
        
        /* 🔥 엄격한 표준 서식 */
        #integratedCbtApp .question-row{ padding-bottom: 20px; border-bottom: 1px dashed #cbd5e0; margin-bottom: 20px; overflow-anchor: none; }
        #integratedCbtApp .question-row:last-child{ border-bottom: none; }
        
        /* [표준 1] 가로 고정 정렬 모드 (문제 영역 너비 280px 완벽 고정) */
        #integratedCbtApp .question-row.row-mode{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
        #integratedCbtApp .question-row.row-mode .q-main-text{ 
            width: 280px; /* 고정 너비 */
            min-width: 280px; 
            flex-shrink: 0; 
            display: flex; 
            align-items: center; 
            justify-content: flex-start;
            margin: 0; 
            padding-right: 15px;
            box-sizing: border-box;
        }
        #integratedCbtApp .question-row.row-mode .choices-area{ flex: 1; }
        
        /* [표준 2] 세로 분리 모드 */
        #integratedCbtApp .question-row.col-mode{ display: block; }
        #integratedCbtApp .question-row.col-mode .q-main-text{ display: flex; align-items: center; margin-bottom: 15px; gap: 10px; } 
        
        /* 🚀 문제 텍스트 폰트 (이전의 좋았던 사이즈 복구) */
        #integratedCbtApp .q-text-wrapper{ display: flex; align-items: baseline; flex: 1; gap: 8px; }
        #integratedCbtApp .q-num{ font-weight: normal; font-size: 20px; color: #2b6cb0; width: 35px; flex-shrink: 0; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
        #integratedCbtApp .q-text-large{ font-size: 26px; font-weight: normal; color: #1a202c; letter-spacing: 1px; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; } /* 한자용 */
        #integratedCbtApp .q-text-normal{ font-size: 18px; font-weight: normal; color: #1a202c; line-height: 1.4; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; } /* 한글 뜻풀이용 */
        
        /* 🚀 컨트롤 버튼 영역 (?, !) -> 문제 바로 옆에 배치 */
        #integratedCbtApp .q-controls{ display: flex; gap: 6px; align-items: center; margin-left: auto; }
        #integratedCbtApp .action-btn{ background: white; border: 1px solid #cbd5e0; color: #a0aec0; border-radius: 6px; padding: 4px 10px; font-size: 13px; font-family: "Malgun Gothic", sans-serif; cursor: pointer; transition: 0.2s; font-weight: bold; }
        #integratedCbtApp .action-btn:hover{ background: #edf2f7; color: #718096; border-color: #a0aec0; }
        #integratedCbtApp .action-btn.active-dk{ background-color: #e2e8f0; color: #718096; border-color: #a0aec0; }
        #integratedCbtApp .action-btn.active-ex{ background-color: #ecc94b; color: white; border-color: #d69e2e; border-style: solid; box-shadow: 0 2px 5px rgba(214,158,46,0.3); }
        #integratedCbtApp .action-btn.wrong-ans{ background-color: #e2e8f0; color: #718096; border-color: #cbd5e0; }

        /* 보기 영역 정렬 방식 */
        #integratedCbtApp .choices-area.inline-mode{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
        #integratedCbtApp .choices-area.stacked-mode{ display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
        #integratedCbtApp .question-row.col-mode .choices-area{ padding-left: 43px; }
        
        /* 🔥 보기 버튼 디자인 (이전의 좋았던 사이즈) */
        #integratedCbtApp .choice-item{ 
            cursor: pointer; 
            padding: 8px 16px; 
            border-radius: 8px; 
            background-color: #f0f4f8; 
            color: #2d3748; 
            transition: all 0.1s ease; 
            border: 1px solid #e2e8f0; 
            display: flex; 
            align-items: center; 
            justify-content: flex-start; 
            user-select: none; 
            font-weight: normal; 
        }
        #integratedCbtApp .choice-item:active{ transform: scale(0.95); }
        
        /* 원문자 디자인 */
        #integratedCbtApp .choice-num{ font-size: 13px; color: #a0aec0; margin-right: 10px; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
        
        /* 🚀 보기 텍스트 사이즈 */
        #integratedCbtApp .choice-text-large{ font-size: 26px; letter-spacing: 1px; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; } 
        #integratedCbtApp .choice-text-normal{ font-size: 17px; line-height: 1.4; font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; } 
        
        /* 상태별 색상 (정답/오답) */
        #integratedCbtApp .choice-item.selected{ background-color: #e2e8f0; border-color: #a0aec0; }
        #integratedCbtApp .choice-item.correct-ans{ background-color: #3182ce !important; color: white !important; border-color: #3182ce !important; box-shadow: 0 4px 10px rgba(49, 130, 206, 0.3); }
        #integratedCbtApp .choice-item.correct-ans .choice-num,
#integratedCbtApp .choice-item.correct-ans .choice-text-large,
#integratedCbtApp .choice-item.correct-ans .choice-text-normal{ color: white !important; }
        #integratedCbtApp .choice-item.wrong-ans{ background-color: #fc8181 !important; color: white !important; border-color: #fc8181 !important; text-decoration: line-through; }
        #integratedCbtApp .choice-item.wrong-ans .choice-num{ color: rgba(255,255,255,0.7) !important; text-decoration: none; display: inline-block; }
        
        /* 하단 네비게이션 */
        #integratedCbtApp .type-nav{ display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 2px solid #e2e8f0; margin-top: 10px; flex-shrink: 0; font-family: "Malgun Gothic", sans-serif; }
        #integratedCbtApp .type-nav .btn{ width: auto; padding: 12px 24px; margin-bottom: 0; }
        
        /* 결과 화면 */
        #integratedCbtApp #result-screen{ display: none; max-width: 600px; margin: 40px auto; background: white; padding: 40px; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); font-family: "Malgun Gothic", sans-serif; }
        #integratedCbtApp .score{ font-size: 60px; font-weight: bold; color: #3182ce; margin: 15px 0 5px 0; }
        #integratedCbtApp .score-sub{ font-size: 18px; color: #718096; margin-bottom: 25px; font-weight: bold; }
        #integratedCbtApp .result-msg{ font-size: 16px; color: #4a5568; margin-bottom: 30px; background: #edf2f7; padding: 20px; border-radius: 8px; line-height: 1.6; text-align: left; }


        /* 가독성/시험지 글꼴 전환 */
        #integratedCbtApp.font-exam .instruction-box,
#integratedCbtApp.font-exam .stimulus-box,
#integratedCbtApp.font-exam .q-num,
#integratedCbtApp.font-exam .q-text-large,
#integratedCbtApp.font-exam .q-text-normal,
#integratedCbtApp.font-exam .choice-num,
#integratedCbtApp.font-exam .choice-text-large,
#integratedCbtApp.font-exam .choice-text-normal,
#integratedCbtApp.font-exam .explanation-box{
            font-family: "Batang", "바탕", "BatangChe", "바탕체", serif;
        }
        #integratedCbtApp .font-option-box{ background:#f0f7ff; border-color:#bee3f8; color:#2c5282; }
        #integratedCbtApp .font-option-box select{ margin:8px 0 0; }

        /* 채점 후 학습형 해설 */
        #integratedCbtApp .explanation-box{
            box-sizing: border-box;
            margin: 12px 0 0 43px;
            padding: 12px 15px;
            border-left: 4px solid #4299e1;
            border-radius: 7px;
            background: #ebf8ff;
            color: #1a365d;
            font-size: 17px;
            line-height: 1.75;
            letter-spacing: 0.05px;
            word-break: keep-all;
            overflow-wrap: anywhere;
            white-space: normal;
        }
        #integratedCbtApp .question-row.row-mode .explanation-box{
            order: 3;
            flex: 0 0 calc(100% - 43px);
            width: calc(100% - 43px);
        }
        #integratedCbtApp .question-row.col-mode .explanation-box{
            width: calc(100% - 43px);
        }
        #integratedCbtApp .explanation-label{
            display:block;
            margin:0 0 4px 0;
            color:#2b6cb0;
            font-family:"Malgun Gothic", sans-serif;
            font-weight:700;
            font-size:14px;
        }
        #integratedCbtApp .btn-review{ background:#4a5568; }
        #integratedCbtApp .btn-review:hover{ background:#2d3748; }
        @media (max-width: 768px) { 
            #integratedCbtApp .question-row.row-mode{ display: block; } 
            #integratedCbtApp .question-row.row-mode .q-main-text{ width: 100%; margin-bottom: 15px; } 
            #integratedCbtApp .choice-text-large{ font-size: 24px; } 
            #integratedCbtApp .q-text-large{ font-size: 24px; }
            #integratedCbtApp .explanation-box,
#integratedCbtApp .question-row.row-mode .explanation-box,
#integratedCbtApp .question-row.col-mode .explanation-box{ margin-left:0; width:100%; flex-basis:100%; }
        }


        /* 전체 글자 크기 조절용 변수: JS에서 100~130%로 갱신 */
        #integratedCbtApp{
            --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px;
            --fs-15: 15px; --fs-16: 16px; --fs-17: 17px; --fs-18: 18px;
            --fs-19: 19px; --fs-20: 20px; --fs-22: 22px; --fs-24: 24px;
            --fs-26: 26px; --fs-28: 28px; --fs-30: 30px; --fs-60: 60px;
        }

        #integratedCbtApp .header{
            gap: 12px;
            flex-wrap: wrap;
            padding-top: calc(12px + env(safe-area-inset-top));
            padding-left: max(14px, env(safe-area-inset-left));
            padding-right: max(14px, env(safe-area-inset-right));
        }
        #integratedCbtApp .header-brand{ min-width: max-content; }
        #integratedCbtApp .header-title{ font-size: var(--fs-18); }
        #integratedCbtApp .header-controls{ min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
        #integratedCbtApp .timer{ font-size: var(--fs-18); }
        #integratedCbtApp .btn,
#integratedCbtApp .btn-submit{ font-size: var(--fs-16); }
        #integratedCbtApp .btn-exit,
#integratedCbtApp .btn-sync{ font-size: var(--fs-14); }
        #integratedCbtApp .sync-status{ font-size: var(--fs-12); }

        #integratedCbtApp .font-scale-control{
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 32px;
            padding: 3px 8px;
            border: 1px solid rgba(255,255,255,0.32);
            border-radius: 8px;
            background: rgba(255,255,255,0.08);
            color: #ffffff;
            font-family: "Malgun Gothic", sans-serif;
            white-space: nowrap;
        }
        #integratedCbtApp .font-scale-label{ font-size: var(--fs-12); font-weight: 700; }
        #integratedCbtApp .font-scale-control input[type="range"]{
            width: 86px;
            height: 26px;
            margin: 0;
            accent-color: #facc15;
            touch-action: pan-x;
        }
        #integratedCbtApp .font-scale-control output{ min-width: 37px; text-align: right; font-size: var(--fs-12); font-weight: 800; color: #fef08a; }

        #integratedCbtApp .domain-header{ font-size: var(--fs-18); }
        #integratedCbtApp .btn-edit-top{ font-size: var(--fs-14); }
        #integratedCbtApp .instruction-box{ font-size: var(--fs-17); }
        #integratedCbtApp .stimulus-box{ font-size: var(--fs-16); }
        #integratedCbtApp .q-num{ font-size: var(--fs-20); }
        #integratedCbtApp .q-text-large{ font-size: var(--fs-26); }
        #integratedCbtApp .q-text-normal{ font-size: var(--fs-18); }
        #integratedCbtApp .action-btn{ font-size: var(--fs-13); }
        #integratedCbtApp .choice-num{ font-size: var(--fs-13); }
        #integratedCbtApp .choice-text-large{ font-size: var(--fs-26); }
        #integratedCbtApp .choice-text-normal{ font-size: var(--fs-17); }
        #integratedCbtApp .explanation-box{ font-size: var(--fs-17); }
        #integratedCbtApp .explanation-label{ font-size: var(--fs-14); }
        #integratedCbtApp .score{ font-size: var(--fs-60); }
        #integratedCbtApp .score-sub{ font-size: var(--fs-18); }
        #integratedCbtApp .result-msg{ font-size: var(--fs-16); }
        #integratedCbtApp .edit-modal h3{ font-size: var(--fs-20); }
        #integratedCbtApp .edit-field label{ font-size: var(--fs-13); }
        #integratedCbtApp .edit-field input,
#integratedCbtApp .edit-field textarea,
#integratedCbtApp .edit-field select{ font-size: var(--fs-15); }

        @media (max-width: 900px) {
            #integratedCbtApp .header{ align-items: center; }
            #integratedCbtApp .header-controls{ width: 100%; justify-content: space-between; gap: 8px; }
            #integratedCbtApp .sync-status{ display: none; }
        }
        @media (max-width: 768px) {
            #integratedCbtApp .q-text-large,
#integratedCbtApp .choice-text-large{ font-size: var(--fs-24); }
            #integratedCbtApp #cbt-screen{ padding: 10px; }
            #integratedCbtApp .question-area{ padding: 15px; }
        }
        @media (max-width: 520px) {
            #integratedCbtApp .header{ padding-left: 10px; padding-right: 10px; }
            #integratedCbtApp .header-title{ width: 100%; }
            #integratedCbtApp .font-scale-control{ order: 1; flex: 1 1 170px; justify-content: center; }
            #integratedCbtApp .font-scale-control input[type="range"]{ flex: 1 1 auto; max-width: 130px; }
            #integratedCbtApp .btn-sync{ order: 2; }
            #integratedCbtApp .timer,
#integratedCbtApp .btn-exit,
#integratedCbtApp .btn-submit{ order: 3; }
        }

    

        /* v3 학습 해설·보기 배열 고정: 확대율과 문장 길이에 관계없이 같은 구조 유지 */
        #integratedCbtApp .question-row,
#integratedCbtApp .question-row.row-mode,
#integratedCbtApp .question-row.col-mode,
#integratedCbtApp .question-row.uniform-mode{
            display: block !important;
        }
        #integratedCbtApp .question-row .q-main-text,
#integratedCbtApp .question-row.row-mode .q-main-text,
#integratedCbtApp .question-row.col-mode .q-main-text{
            width: 100% !important;
            min-width: 0 !important;
            display: flex !important;
            align-items: flex-start !important;
            justify-content: space-between !important;
            gap: 14px !important;
            margin: 0 0 14px 0 !important;
            padding: 0 !important;
            box-sizing: border-box;
        }
        #integratedCbtApp .q-text-wrapper{
            display: grid !important;
            grid-template-columns: max-content minmax(0, 1fr) !important;
            align-items: baseline !important;
            column-gap: 0.82em !important;
            row-gap: 0 !important;
            flex: 1 1 auto !important;
            min-width: 0 !important;
        }
        #integratedCbtApp .q-num{
            width: auto !important;
            min-width: 3.6ch !important;
            padding-right: 0.1em !important;
            flex: none !important;
            white-space: nowrap !important;
            text-align: right !important;
            line-height: 1.4 !important;
        }
        #integratedCbtApp .q-text-large,
#integratedCbtApp .q-text-normal{
            min-width: 0;
            overflow-wrap: anywhere;
            word-break: keep-all;
        }
        #integratedCbtApp .q-controls{
            flex: 0 0 auto !important;
            margin-left: 0 !important;
            padding-top: 1px;
        }

        /* 모든 보기는 길이와 무관하게 한 줄에 하나씩 세로로 배치 */
        #integratedCbtApp .choices-area,
#integratedCbtApp .choices-area.inline-mode,
#integratedCbtApp .choices-area.stacked-mode,
#integratedCbtApp .choices-area.uniform-choices,
#integratedCbtApp .question-row.row-mode .choices-area,
#integratedCbtApp .question-row.col-mode .choices-area{
            display: flex !important;
            flex-direction: column !important;
            flex-wrap: nowrap !important;
            align-items: stretch !important;
            gap: 10px !important;
            width: 100% !important;
            padding-left: calc(3.6ch + 0.82em) !important;
            box-sizing: border-box;
        }
        #integratedCbtApp .choice-item{
            width: 100% !important;
            min-width: 0 !important;
            box-sizing: border-box !important;
            padding: 11px 16px !important;
            line-height: 1.45 !important;
        }
        #integratedCbtApp .choice-item:active{ transform: scale(0.995); }
        #integratedCbtApp .choice-num{ flex: 0 0 auto; }
        #integratedCbtApp .choice-text-large,
#integratedCbtApp .choice-text-normal{
            min-width: 0;
            overflow-wrap: anywhere;
            word-break: keep-all;
        }


        /* 126~135번 유형: 원래 밑줄 대상이 사라져도 목표 단어가 즉시 보이도록 표시 */
        #integratedCbtApp .target-word-mark{
            display: inline;
            font-weight: 800;
            color: #173f72;
            text-decoration-line: underline;
            text-decoration-thickness: 0.11em;
            text-underline-offset: 0.16em;
            text-decoration-color: #3182ce;
            background: linear-gradient(transparent 68%, rgba(144, 205, 244, 0.35) 68%);
            border-radius: 3px;
            padding: 0 0.04em;
            white-space: nowrap;
        }
        #integratedCbtApp .target-word-bracket{
            color: #2b6cb0;
            font-weight: 800;
            text-decoration: none;
        }

        /* 파란 해설창: 별도 '해설' 표제 없이 내용부터 바로 표시 */
        #integratedCbtApp .explanation-box,
#integratedCbtApp .question-row.row-mode .explanation-box,
#integratedCbtApp .question-row.col-mode .explanation-box{
            display: block;
            width: auto !important;
            max-width: none !important;
            margin: 14px 0 0 calc(3.6ch + 0.82em) !important;
            padding: 15px 17px !important;
            box-sizing: border-box !important;
        }
        #integratedCbtApp .explanation-label{ display: none !important; }
        #integratedCbtApp .explanation-text{ display: flex; flex-direction: column; gap: 13px; }
        #integratedCbtApp .explanation-term-block{
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        #integratedCbtApp .explanation-term-block + .explanation-term-block{
            border-top: 1px solid rgba(66, 153, 225, 0.26);
            padding-top: 13px;
        }
        #integratedCbtApp .explanation-head{
            font-weight: 700;
            font-size: 1.06em;
            line-height: 1.6;
            color: #153e75;
            overflow-wrap: anywhere;
            word-break: keep-all;
        }
        #integratedCbtApp .explanation-word{
            font-size: 1.18em;
            letter-spacing: 0.04em;
        }
        #integratedCbtApp .explanation-reading{ color: #2c5282; font-weight: 600; }
        #integratedCbtApp .explanation-definition{ color: #1a365d; font-weight: 500; }
        #integratedCbtApp .hanja-breakdown{
            display: flex;
            flex-direction: column;
            gap: 5px;
            padding-left: 2px;
        }
        #integratedCbtApp .hanja-breakdown-row{
            display: grid;
            grid-template-columns: 1.6em max-content minmax(0, 1fr);
            align-items: baseline;
            column-gap: 0.4em;
            line-height: 1.55;
        }
        #integratedCbtApp .hanja-index{ color: #2b6cb0; font-weight: 700; }
        #integratedCbtApp .hanja-glyph{ font-size: 1.12em; color: #1a202c; font-weight: 700; }
        #integratedCbtApp .hanja-gloss{ color: #2d3748; }
        #integratedCbtApp .explanation-extra{
            border-top: 1px dashed rgba(66, 153, 225, 0.32);
            padding-top: 10px;
            color: #2d4f6c;
            line-height: 1.7;
        }
        #integratedCbtApp .explanation-correction{
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 0.42em;
            padding: 2px 0 10px;
            border-bottom: 1px dashed rgba(66, 153, 225, 0.34);
            font-weight: 700;
            line-height: 1.6;
        }
        #integratedCbtApp .correction-caption{ color: #4a5568; font-size: 0.88em; font-weight: 600; }
        #integratedCbtApp .correction-wrong{ color: #c53030; text-decoration: line-through; text-decoration-thickness: 0.08em; }
        #integratedCbtApp .correction-arrow{ color: #2b6cb0; }
        #integratedCbtApp .correction-right{ color: #153e75; font-size: 1.08em; }
        #integratedCbtApp.font-exam .explanation-word,
#integratedCbtApp.font-exam .hanja-glyph{
            font-family: "Batang", "바탕", "BatangChe", "바탕체", serif;
        }

        @media (max-width: 768px) {
            #integratedCbtApp .question-row .q-main-text,
#integratedCbtApp .question-row.row-mode .q-main-text,
#integratedCbtApp .question-row.col-mode .q-main-text{
                gap: 8px !important;
            }
            #integratedCbtApp .q-text-wrapper{
                column-gap: 0.75em !important;
            }
            #integratedCbtApp .q-num{ min-width: 3.45ch !important; }
            #integratedCbtApp .choices-area,
#integratedCbtApp .choices-area.inline-mode,
#integratedCbtApp .choices-area.stacked-mode,
#integratedCbtApp .choices-area.uniform-choices,
#integratedCbtApp .question-row.row-mode .choices-area,
#integratedCbtApp .question-row.col-mode .choices-area{
                padding-left: 0 !important;
            }
            #integratedCbtApp .explanation-box,
#integratedCbtApp .question-row.row-mode .explanation-box,
#integratedCbtApp .question-row.col-mode .explanation-box{
                margin-left: 0 !important;
                width: 100% !important;
            }
            #integratedCbtApp .choice-item{ padding: 12px 14px !important; }
        }



        /* v6 원래 문제 배치 복원: 짧은 문제는 왼쪽, 짧은 선지는 오른쪽 한 줄 */
        #integratedCbtApp .question-row.row-mode{
            display: flex !important;
            flex-wrap: wrap !important;
            align-items: center !important;
            gap: 10px !important;
        }
        #integratedCbtApp .question-row.row-mode .q-main-text{
            width: 280px !important;
            min-width: 280px !important;
            flex: 0 0 280px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 10px !important;
            margin: 0 !important;
            padding-right: 14px !important;
            box-sizing: border-box !important;
        }
        #integratedCbtApp .question-row.row-mode .q-text-wrapper{
            flex: 1 1 auto !important;
            min-width: 0 !important;
        }
        #integratedCbtApp .question-row.row-mode .choices-area{
            flex: 1 1 0 !important;
            min-width: 0 !important;
            padding-left: 0 !important;
        }

        #integratedCbtApp .question-row.col-mode{
            display: block !important;
        }
        #integratedCbtApp .question-row.col-mode .q-main-text{
            width: 100% !important;
            min-width: 0 !important;
            display: flex !important;
            align-items: flex-start !important;
            justify-content: space-between !important;
            gap: 12px !important;
            margin: 0 0 15px 0 !important;
            padding: 0 !important;
        }
        #integratedCbtApp .question-row.col-mode .choices-area{
            width: 100% !important;
            padding-left: calc(3.6ch + 0.82em) !important;
            box-sizing: border-box !important;
        }

        /* 짧은 선지: ①~⑤를 반드시 같은 줄에 유지 */
        #integratedCbtApp .choices-area.inline-mode,
#integratedCbtApp .question-row.row-mode .choices-area.inline-mode,
#integratedCbtApp .question-row.col-mode .choices-area.inline-mode{
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            gap: 8px !important;
            overflow-x: auto !important;
            overflow-y: hidden !important;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
        }
        #integratedCbtApp .choices-area.inline-mode .choice-item{
            width: auto !important;
            min-width: max-content !important;
            flex: 0 0 auto !important;
            padding: 8px 13px !important;
            line-height: 1.35 !important;
            white-space: nowrap !important;
        }

        /* 긴 선지: 한 줄에 하나씩 세로 배치 */
        #integratedCbtApp .choices-area.stacked-mode,
#integratedCbtApp .question-row.row-mode .choices-area.stacked-mode,
#integratedCbtApp .question-row.col-mode .choices-area.stacked-mode{
            display: flex !important;
            flex-direction: column !important;
            flex-wrap: nowrap !important;
            align-items: stretch !important;
            gap: 8px !important;
        }
        #integratedCbtApp .choices-area.stacked-mode .choice-item{
            width: 100% !important;
            min-width: 0 !important;
            box-sizing: border-box !important;
            padding: 10px 15px !important;
            white-space: normal !important;
        }

        /* 해설은 문제 전체 아래에 배치하되 기존 파란창 형식을 유지 */
        #integratedCbtApp .question-row.row-mode .explanation-box{
            order: 3 !important;
            flex: 0 0 calc(100% - 43px) !important;
            width: calc(100% - 43px) !important;
            margin: 14px 0 0 43px !important;
        }
        #integratedCbtApp .question-row.col-mode .explanation-box{
            width: calc(100% - 43px) !important;
            margin: 14px 0 0 43px !important;
        }

        /* iPad mini 폭에서는 좌우형을 유지하고, 아주 좁은 휴대폰에서만 세로 전환 */
        @media (max-width: 600px) {
            #integratedCbtApp .question-row.row-mode{
                display: block !important;
            }
            #integratedCbtApp .question-row.row-mode .q-main-text{
                width: 100% !important;
                min-width: 0 !important;
                flex-basis: auto !important;
                margin-bottom: 12px !important;
                padding-right: 0 !important;
            }
            #integratedCbtApp .question-row.row-mode .choices-area{
                width: 100% !important;
            }
            #integratedCbtApp .question-row.row-mode .explanation-box,
#integratedCbtApp .question-row.col-mode .explanation-box{
                width: 100% !important;
                margin-left: 0 !important;
                flex-basis: 100% !important;
            }
            #integratedCbtApp .question-row.col-mode .choices-area{
                padding-left: 0 !important;
            }
        }

    

/* 한자 학습실 ↔ CBT 통합 레이어 */
.cbt-study-summary { display:inline-flex; align-items:center; min-height:24px; padding:3px 7px; border:1px solid #c7d8e8; border-radius:999px; background:#eef6fb; color:#28546f; font-size:10.5px; font-weight:850; white-space:nowrap; }
.cbt-related-action { border-color:#9bc7b2 !important; background:#edf8f1 !important; color:#176344 !important; }
.cbt-home-tile { border-color:#9bc7b2 !important; }
body.integrated-cbt-open { overflow:hidden !important; }
#integratedCbtApp { display:none !important; position:fixed !important; inset:0 !important; z-index:5000 !important; width:100% !important; height:var(--app-height, 100dvh) !important; min-height:0 !important; background:#f4f6f9 !important; }
#integratedCbtApp.open { display:flex !important; }
#integratedCbtApp .header-brand { display:flex; align-items:center; gap:10px; }
#integratedCbtApp .btn-back-wordbook { border:1px solid rgba(255,255,255,.55); background:rgba(255,255,255,.12); color:#fff; border-radius:8px; padding:7px 10px; cursor:pointer; font-weight:800; white-space:nowrap; }
#integratedCbtApp .btn-back-wordbook:hover { background:rgba(255,255,255,.22); }
#integratedCbtApp .cbt-char-save-btn { color:#256d4f; border-color:#9bc7b2; background:#edf8f1; }
#integratedCbtApp .cbt-hanja-open { appearance:none; border:0; background:transparent; padding:0; margin:0; cursor:pointer; font-family:inherit; }
#integratedCbtApp .cbt-hanja-open:hover { color:#0f766e; transform:translateY(-1px); }
#integratedCbtApp .cbt-inline-hanja { appearance:none; border:0; border-bottom:1px dotted #4f86b1; background:transparent; color:inherit; padding:0 .02em; margin:0; font:inherit; cursor:pointer; }
#integratedCbtApp .cbt-integration-toast { position:fixed; left:50%; bottom:28px; transform:translate(-50%, 18px); z-index:5300; min-width:220px; max-width:min(520px, 86vw); padding:11px 15px; border-radius:999px; background:rgba(20,35,48,.94); color:white; font-size:14px; font-weight:800; text-align:center; opacity:0; pointer-events:none; transition:.18s ease; box-shadow:0 12px 30px rgba(0,0,0,.24); }
#integratedCbtApp .cbt-integration-toast.show { opacity:1; transform:translate(-50%, 0); }
#integratedCbtApp .cbt-overlay { display:none; position:fixed; inset:0; z-index:5200; background:rgba(15,23,42,.58); padding:18px; align-items:center; justify-content:center; }
#integratedCbtApp .cbt-overlay.open { display:flex; }
#integratedCbtApp .cbt-side-sheet, #integratedCbtApp .cbt-picker-dialog { width:min(720px, 100%); max-height:90dvh; overflow:auto; border-radius:18px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.28); }
#integratedCbtApp .cbt-sheet-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 18px; border-bottom:1px solid #e2e8f0; position:sticky; top:0; z-index:2; background:rgba(255,255,255,.97); }
#integratedCbtApp .cbt-sheet-head strong { color:#173f72; font-size:17px; }
#integratedCbtApp .cbt-sheet-close { border:0; border-radius:9px; padding:8px 11px; background:#edf2f7; cursor:pointer; font-weight:800; color:#475569; }
#integratedCbtApp .cbt-card-detail { padding:20px; }
#integratedCbtApp .cbt-card-hero { display:grid; grid-template-columns:120px minmax(0,1fr); gap:18px; align-items:center; padding-bottom:18px; border-bottom:1px solid #e2e8f0; }
#integratedCbtApp .cbt-card-char { font-family:var(--hanja-font, 'Batang', serif); font-size:88px; line-height:1; text-align:center; color:#111827; }
#integratedCbtApp .cbt-card-title { font-size:28px; font-weight:900; color:#1e293b; }
#integratedCbtApp .cbt-card-meta { margin-top:8px; color:#64748b; line-height:1.6; }
#integratedCbtApp .cbt-detail-section { margin-top:14px; padding:14px 15px; border:1px solid #dce5ee; border-radius:13px; background:#f8fafc; }
#integratedCbtApp .cbt-detail-section h4 { margin:0 0 8px; color:#475569; font-size:12px; letter-spacing:.08em; }
#integratedCbtApp .cbt-structure-lines { display:flex; flex-direction:column; gap:7px; color:#26394b; line-height:1.55; }
#integratedCbtApp .cbt-example-line { padding:5px 0; color:#334155; }
#integratedCbtApp .cbt-card-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
#integratedCbtApp .cbt-card-actions button { border:1px solid #cbd5e1; border-radius:10px; background:#fff; padding:10px 12px; cursor:pointer; font-weight:850; color:#334155; }
#integratedCbtApp .cbt-card-actions button.primary { background:#2563eb; border-color:#2563eb; color:#fff; }
#integratedCbtApp .cbt-card-actions button.warn { background:#fff7ed; border-color:#fdba74; color:#9a3412; }
#integratedCbtApp .cbt-picker-body { padding:18px; }
#integratedCbtApp .cbt-picker-copy { color:#64748b; line-height:1.55; margin-bottom:14px; }
#integratedCbtApp .cbt-picker-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(68px,1fr)); gap:9px; }
#integratedCbtApp .cbt-picker-char { min-height:68px; border:1px solid #cbd5e1; border-radius:12px; background:#fff; cursor:pointer; font-family:var(--hanja-font, 'Batang', serif); font-size:30px; color:#1e293b; }
#integratedCbtApp .cbt-picker-char.selected { background:#e8f5ee; border-color:#65a985; box-shadow:inset 0 0 0 1px #65a985; }
#integratedCbtApp .cbt-picker-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
#integratedCbtApp .cbt-picker-actions button { border:1px solid #cbd5e1; border-radius:10px; background:#fff; padding:10px 15px; cursor:pointer; font-weight:850; }
#integratedCbtApp .cbt-picker-actions .primary { background:#166534; color:#fff; border-color:#166534; }
#integratedCbtApp .explanation-plain { display:flex; flex-direction:column; gap:7px; width:100%; }
#integratedCbtApp .explanation-plain-line { display:block; width:100%; min-width:0; line-height:1.7; text-align:left; }
#integratedCbtApp .cbt-inline-hanja,
#integratedCbtApp .hanja-glyph.cbt-hanja-open { display:inline-block !important; width:auto !important; min-width:0 !important; max-width:none !important; height:auto !important; min-height:0 !important; line-height:inherit !important; vertical-align:baseline !important; text-align:inherit !important; white-space:nowrap; }
#integratedCbtApp .cbt-hanja-token { display:inline; color:inherit; font:inherit; border-bottom:1px dotted rgba(49,130,206,.6); cursor:context-menu; border-radius:2px; }
#integratedCbtApp .cbt-hanja-token:hover { background:rgba(144,205,244,.22); color:#0f5c86; }
#integratedCbtApp .cbt-hanja-token.unavailable { border-bottom-color:#cbd5e1; }
#integratedCbtApp .cbt-picker-char { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:8px 5px; }
#integratedCbtApp .cbt-picker-glyph { font-family:var(--hanja-font, 'Batang', serif); font-size:30px; line-height:1; }
#integratedCbtApp .cbt-picker-link { font-family:'Malgun Gothic',sans-serif; font-size:10px; line-height:1.25; color:#64748b; font-weight:700; }
#integratedCbtApp .cbt-context-menu { display:none; position:fixed; z-index:5400; width:250px; padding:8px; border:1px solid #cbd5e1; border-radius:14px; background:rgba(255,255,255,.985); box-shadow:0 18px 48px rgba(15,23,42,.25); font-family:'Malgun Gothic',sans-serif; }
#integratedCbtApp .cbt-context-menu.open { display:block; }
#integratedCbtApp .cbt-context-head { display:flex; align-items:center; gap:10px; padding:7px 8px 10px; border-bottom:1px solid #e2e8f0; margin-bottom:5px; }
#integratedCbtApp .cbt-context-glyph { flex:0 0 auto; min-width:40px; font-family:var(--hanja-font, 'Batang', serif); font-size:34px; line-height:1; text-align:center; }
#integratedCbtApp .cbt-context-copy { min-width:0; }
#integratedCbtApp .cbt-context-title { font-size:14px; font-weight:900; color:#1e293b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#integratedCbtApp .cbt-context-sub { margin-top:2px; font-size:11px; color:#64748b; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#integratedCbtApp .cbt-context-menu button { display:block; width:100%; border:0; border-radius:9px; background:transparent; padding:9px 10px; text-align:left; cursor:pointer; color:#334155; font-size:13px; font-weight:750; }
#integratedCbtApp .cbt-context-menu button:hover { background:#edf6ff; color:#174b73; }
#integratedCbtApp .cbt-context-menu button:disabled { opacity:.45; cursor:not-allowed; }
#integratedCbtApp .cbt-alias-note { display:inline-flex; margin-top:5px; padding:3px 7px; border-radius:999px; background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; font-size:11px; font-weight:800; }
@media (max-width:680px) {
  #integratedCbtApp .header-brand { width:100%; }
  #integratedCbtApp .header-title { font-size:15px; }
  #integratedCbtApp .btn-back-wordbook { padding:6px 8px; font-size:12px; }
  #integratedCbtApp .cbt-card-hero { grid-template-columns:86px minmax(0,1fr); }
  #integratedCbtApp .cbt-card-char { font-size:66px; }
  #integratedCbtApp .cbt-card-title { font-size:23px; }
}


/* source style17 id="v3-integration-fixes" */
.screen-example-label { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .screen-example-edit { border:1px solid #cbd5e1; background:#fff; color:#475569; border-radius:7px; padding:3px 8px; font-size:11px; font-weight:800; cursor:pointer; }
  .screen-example-edit:hover { background:#f1f5f9; }

  #integratedCbtApp #cbt-screen { position:relative; }
  #integratedCbtApp .cbt-explanation-dock {
    display:none; position:fixed; z-index:930; right:18px; top:92px; bottom:18px;
    width:min(430px, calc(100vw - 36px)); border:1px solid #93c5fd; border-radius:16px;
    background:#f8fcff; box-shadow:0 18px 55px rgba(15,23,42,.24); overflow:hidden;
    font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif;
  }
  #integratedCbtApp .cbt-explanation-dock.open { display:flex; flex-direction:column; }
  #integratedCbtApp .cbt-explanation-dock.collapsed { bottom:auto; }
  #integratedCbtApp .cbt-explanation-dock.collapsed .cbt-explanation-dock-body { display:none; }
  #integratedCbtApp .cbt-explanation-dock-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 13px; background:#dbeafe; border-bottom:1px solid #bfdbfe; color:#1e3a8a; flex:0 0 auto; }
  #integratedCbtApp .cbt-explanation-dock-actions { display:flex; gap:6px; }
  #integratedCbtApp .cbt-explanation-dock-actions button { border:1px solid #93c5fd; border-radius:7px; background:#fff; color:#1e3a8a; padding:5px 9px; cursor:pointer; font-size:12px; font-weight:800; }
  #integratedCbtApp .cbt-explanation-dock-body { overflow:auto; padding:14px; min-height:0; overscroll-behavior:contain; }
  #integratedCbtApp .cbt-explanation-dock-body .explanation-text { display:flex; flex-direction:column; gap:13px; }
  #integratedCbtApp .cbt-explanation-dock-body .explanation-box { display:block!important; margin:0!important; width:100%!important; padding:0!important; border:0!important; background:transparent!important; }
  #integratedCbtApp .cbt-explanation-open-btn { color:#1d4ed8; border-color:#93c5fd; background:#eff6ff; }
  #integratedCbtApp .cbt-control-divider { width:1px; height:23px; background:#dbe3ec; margin:0 2px; }
  #integratedCbtApp .cbt-inline-edit-trigger { color:#475569; min-width:44px; }

  #integratedCbtApp .cbt-inline-question-editor { margin:14px 0 0; border:1px solid #cbd5e1; border-radius:12px; background:#f8fafc; padding:14px; font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif; }
  #integratedCbtApp .cbt-inline-editor-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; color:#1e3a8a; font-weight:900; }
  #integratedCbtApp .cbt-inline-question-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  #integratedCbtApp .cbt-inline-question-field { display:flex; flex-direction:column; gap:5px; min-width:0; }
  #integratedCbtApp .cbt-inline-question-field.full { grid-column:1 / -1; }
  #integratedCbtApp .cbt-inline-question-field label { font-size:12px; font-weight:800; color:#475569; }
  #integratedCbtApp .cbt-inline-question-field input,
  #integratedCbtApp .cbt-inline-question-field textarea,
  #integratedCbtApp .cbt-inline-question-field select { width:100%; box-sizing:border-box; border:1px solid #cbd5e1; border-radius:8px; padding:9px 10px; background:#fff; font:inherit; }
  #integratedCbtApp .cbt-inline-question-field textarea { min-height:78px; resize:vertical; line-height:1.5; }
  #integratedCbtApp .cbt-inline-question-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
  #integratedCbtApp .cbt-inline-question-actions button { border:1px solid #cbd5e1; border-radius:8px; background:#fff; padding:8px 13px; cursor:pointer; font-weight:800; }
  #integratedCbtApp .cbt-inline-question-actions .primary { color:#fff; border-color:#2563eb; background:#2563eb; }

  #integratedCbtApp .cbt-drawer-edit-form { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
  #integratedCbtApp .cbt-drawer-edit-form .full { grid-column:1 / -1; }
  #integratedCbtApp .cbt-drawer-edit-form label { display:flex; flex-direction:column; gap:5px; font-size:12px; color:#475569; font-weight:800; }
  #integratedCbtApp .cbt-drawer-edit-form input,
  #integratedCbtApp .cbt-drawer-edit-form textarea { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid #cbd5e1; border-radius:8px; font:inherit; }
  #integratedCbtApp .cbt-drawer-edit-form textarea { min-height:100px; resize:vertical; line-height:1.5; }
  #integratedCbtApp .cbt-drawer-edit-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:8px; }
  #integratedCbtApp .cbt-drawer-edit-actions button { border:1px solid #cbd5e1; border-radius:8px; background:#fff; padding:8px 12px; font-weight:800; cursor:pointer; }
  #integratedCbtApp .cbt-drawer-edit-actions .primary { color:#fff; background:#2563eb; border-color:#2563eb; }
  #integratedCbtApp .cbt-card-actions .edit-card { border-color:#93c5fd; color:#1d4ed8; background:#eff6ff; }

  @media (max-width: 850px) {
    #integratedCbtApp .cbt-explanation-dock { left:10px; right:10px; top:auto; bottom:10px; width:auto; max-height:44vh; }
  }
  @media (max-width: 620px) {
    #integratedCbtApp .cbt-inline-question-grid,
    #integratedCbtApp .cbt-drawer-edit-form { grid-template-columns:1fr; }
    #integratedCbtApp .cbt-inline-question-field.full,
    #integratedCbtApp .cbt-drawer-edit-form .full { grid-column:auto; }
    #integratedCbtApp .q-controls { flex-wrap:wrap; justify-content:flex-end; }
  }


/* source style18 id="hanjaCompatibilityCss" */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { min-height:100vh; min-height:var(--app-height,100dvh); -webkit-tap-highlight-color:transparent; }
.modern-topbar, .cbt-explanation-dock, .modern-drawer { -webkit-backdrop-filter:blur(12px); }
button, input, select, textarea { -webkit-appearance:none; appearance:none; }
input[type="checkbox"], input[type="radio"], input[type="range"] { -webkit-appearance:auto; appearance:auto; }
.choice-item[role="button"]:focus-visible, .action-btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid rgba(49,130,206,.48); outline-offset:2px; }
#compatDiagnosticsStatus { margin-top:10px; font-size:12px; line-height:1.5; color:#64748b; word-break:keep-all; }
.compat-diagnostic-button { width:100%; border:1px solid #cbd5e1; border-radius:10px; padding:10px 12px; background:#fff; color:#334155; font-weight:750; cursor:pointer; }
.compat-storage-warning { color:#b45309 !important; }
@supports not (height:100dvh) { body { min-height:var(--app-height,100vh); } }
@media (max-width:980px), (pointer:coarse) {
  input, select, textarea { font-size:16px !important; }
  .modern-drawer, .cbt-explanation-dock, .cbt-hanja-drawer { max-height:var(--app-height,100vh); }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}


/* source style19 id="v5-explanation-layout-fix" */
/* v5: 오른쪽 해설창이 문제 영역을 덮지 않도록 실제 공간을 예약한다. */
@media (min-width: 1200px) {
  #integratedCbtApp.cbt-dock-open #cbt-screen {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-right: 466px !important;
    box-sizing: border-box !important;
  }
  #integratedCbtApp.cbt-dock-open .question-area {
    width: 100% !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* 1199px 이하에서는 오른쪽 오버레이를 쓰지 않고 하단 시트로 전환한다. */
@media (max-width: 1199px) {
  #integratedCbtApp .cbt-explanation-dock {
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(44vh, 430px) !important;
  }
}

/* 채점 뒤 버튼이 늘어나도 문제 글자를 침범하지 않도록 제어 영역 폭을 항상 확보한다. */
#integratedCbtApp .q-controls {
  flex: 0 0 258px !important;
  min-width: 258px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}
#integratedCbtApp .question-row.row-mode .q-main-text {
  width: 390px !important;
  min-width: 390px !important;
  flex: 0 0 390px !important;
  overflow: visible !important;
}
#integratedCbtApp .question-row.row-mode .q-text-wrapper {
  min-width: 112px !important;
}
#integratedCbtApp .q-text-wrapper,
#integratedCbtApp .q-text-large,
#integratedCbtApp .q-text-normal {
  position: relative;
  z-index: 1;
}
#integratedCbtApp .q-controls {
  position: relative;
  z-index: 2;
}

/* 매우 좁은 폭에서는 문제와 버튼을 위아래 두 줄로 두어 겹침을 원천 차단한다. */
@media (max-width: 760px) {
  #integratedCbtApp .question-row.row-mode {
    display: block !important;
  }
  #integratedCbtApp .question-row.row-mode .q-main-text,
  #integratedCbtApp .question-row.col-mode .q-main-text {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding-right: 0 !important;
  }
  #integratedCbtApp .q-controls {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
  #integratedCbtApp .question-row.row-mode .choices-area,
  #integratedCbtApp .question-row.col-mode .choices-area {
    width: 100% !important;
    padding-left: 0 !important;
  }
}


/* source style20 id="v6-dock-wordbook-and-tail-actions" */
/* v6: 기본 학습 버튼만 문제 옆에 두고, 해설/수정은 마지막 선지 뒤로 이동한다. */
#integratedCbtApp .q-controls {
  flex:0 0 112px !important;
  min-width:112px !important;
  gap:6px !important;
}
#integratedCbtApp .question-row.row-mode .q-main-text {
  width:280px !important;
  min-width:280px !important;
  flex:0 0 280px !important;
}
#integratedCbtApp .question-row.row-mode .q-text-wrapper { min-width:0 !important; }
#integratedCbtApp .cbt-row-tail-actions {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex:0 0 auto;
  margin-left:2px;
  min-height:38px;
}
#integratedCbtApp .choices-area.inline-mode .cbt-row-tail-actions { align-self:center; }
#integratedCbtApp .choices-area.stacked-mode .cbt-row-tail-actions {
  align-self:flex-end;
  margin-top:2px;
}
#integratedCbtApp .cbt-row-tail-actions .action-btn { min-height:34px; padding:5px 11px; }

/* 해설 패널 머리글은 문항 번호만 작게 보여 공간을 절약한다. */
#integratedCbtApp .cbt-explanation-dock-head { padding:7px 10px !important; min-height:38px; }
#integratedCbtApp .cbt-explanation-dock-titleline { display:flex; align-items:baseline; gap:7px; min-width:0; }
#integratedCbtApp .cbt-explanation-dock-titleline strong { font-size:14px; line-height:1; white-space:nowrap; }
#integratedCbtApp .cbt-explanation-dock-titleline span { font-size:11px; color:#52709a; font-weight:800; white-space:nowrap; }
#integratedCbtApp .cbt-explanation-dock.persistent [data-cbt-dock-close] { display:none; }
#integratedCbtApp .cbt-explanation-dock-body { padding:11px !important; }
#integratedCbtApp .cbt-dock-placeholder {
  border:1px dashed #bfdbfe; border-radius:11px; background:#f0f7ff; color:#496782;
  padding:10px 11px; font-size:12px; line-height:1.5; margin-bottom:10px;
}
#integratedCbtApp .cbt-dock-explanation-section { padding:11px 12px; border:1px solid #cfe3f7; border-radius:12px; background:#f8fcff; }
#integratedCbtApp .cbt-dock-section-label { margin:0 0 8px; color:#47637c; font-size:10px; font-weight:950; letter-spacing:.08em; }

/* 해설과 함께 자동으로 표시되는 단어장 카드. */
#integratedCbtApp .cbt-dock-wordbook { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
#integratedCbtApp .cbt-dock-wordbook-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#36536c; }
#integratedCbtApp .cbt-dock-wordbook-head strong { font-size:12px; }
#integratedCbtApp .cbt-dock-wordbook-head span { font-size:10px; color:#7890a5; }
#integratedCbtApp .cbt-dock-card {
  border:1px solid #d7e3ec; border-radius:13px; background:#fff; padding:10px;
  display:grid; grid-template-columns:58px minmax(0,1fr); gap:10px; align-items:start;
}
#integratedCbtApp .cbt-dock-card-glyph {
  width:58px; min-height:58px; display:grid; place-items:center; border:1px solid #d9cdbf;
  border-radius:10px; background:#faf6ef; font-family:var(--hanja-font,'Batang',serif); font-size:42px; line-height:1;
}
#integratedCbtApp .cbt-dock-card-copy { min-width:0; }
#integratedCbtApp .cbt-dock-card-title { font-size:16px; font-weight:950; color:#203548; }
#integratedCbtApp .cbt-dock-card-alias { margin-left:5px; font-size:10px; color:#9a5b19; }
#integratedCbtApp .cbt-dock-card-structure { margin-top:5px; color:#526779; font-size:11px; line-height:1.45; word-break:keep-all; }
#integratedCbtApp .cbt-dock-card-examples { margin-top:5px; color:#334155; font-size:11px; line-height:1.4; }
#integratedCbtApp .cbt-dock-card-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:5px; margin-top:1px; }
#integratedCbtApp .cbt-dock-card-actions button {
  border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#334155;
  padding:6px 8px; font-size:10px; font-weight:850; cursor:pointer;
}
#integratedCbtApp .cbt-dock-card-actions button.primary { border-color:#93c5fd; background:#eff6ff; color:#1d4ed8; }
#integratedCbtApp .cbt-dock-card-actions button.edit { border-color:#a7c9b4; background:#eef8f1; color:#176344; }
#integratedCbtApp .cbt-dock-more { display:flex; flex-wrap:wrap; gap:5px; }
#integratedCbtApp .cbt-dock-more button { border:1px solid #d5dee7; border-radius:999px; background:#fff; padding:5px 8px; cursor:pointer; }
#integratedCbtApp .cbt-dock-more .glyph { font-family:var(--hanja-font,'Batang',serif); font-size:18px; }

@media (max-width:760px) {
  #integratedCbtApp .q-controls { width:auto !important; min-width:0 !important; flex-basis:auto !important; }
  #integratedCbtApp .cbt-row-tail-actions { width:100%; justify-content:flex-end; margin:4px 0 0; }
  #integratedCbtApp .choices-area.inline-mode .cbt-row-tail-actions { width:auto; }
}


/* source style21 id="cbtLexiconStyles" */
/* v7: CBT validated vocabulary / idiom pool linked to each dictionary headword. */
.cbt-lexicon-panel {
  margin: 14px 18px 4px;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 17px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.cbt-lexicon-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #1e3a5f;
}
.cbt-lexicon-panel-title strong { font-size: 15px; }
.cbt-lexicon-panel-title span { color: #718096; font-size: 11px; }
.cbt-lexicon-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.cbt-lexicon-section {
  min-width: 0;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.cbt-lexicon-section.idioms { border-color: #e6ddc9; background: #fffdf8; }
.cbt-lexicon-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e6edf4;
  background: #edf6ff;
  color: #244c73;
  font-size: 13px;
  font-weight: 850;
}
.cbt-lexicon-section.idioms .cbt-lexicon-head { background: #f8f0df; color: #684f2a; border-bottom-color: #eadfc9; }
.cbt-lexicon-count { min-width: 25px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.86); text-align: center; font-size: 11px; }
.cbt-lexicon-list { max-height: 300px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.cbt-lexicon-item { padding: 10px 12px; border-bottom: 1px solid #edf1f5; }
.cbt-lexicon-item:last-child { border-bottom: 0; }
.cbt-lexicon-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.cbt-lexicon-term { font-family: var(--hanja-font); color: #152638; font-size: 20px; font-weight: 750; letter-spacing: .02em; }
.cbt-lexicon-reading { color: #2f5f7f; font-size: 13px; font-weight: 750; }
.cbt-lexicon-source-form { color: #8a7868; font-size: 10px; }
.cbt-lexicon-meaning { margin-top: 4px; color: #374151; font-size: 12px; line-height: 1.48; word-break: keep-all; overflow-wrap: anywhere; }
.cbt-lexicon-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; color: #8793a2; font-size: 10px; }
.cbt-lexicon-badge { padding: 2px 6px; border: 1px solid #d8e2eb; border-radius: 999px; background: #f8fafc; color: #617080; }
.cbt-lexicon-review { color: #9a6a1f; border-color: #ead19c; background: #fff9e9; }
.cbt-lexicon-empty { padding: 18px 12px; color: #9aa5b1; font-size: 12px; text-align: center; }
@media (max-width: 900px) {
  .cbt-lexicon-panel { margin: 12px 10px 3px; padding: 11px; }
  .cbt-lexicon-grid { grid-template-columns: 1fr; }
  .cbt-lexicon-list { max-height: 240px; }
}
@media print { .cbt-lexicon-panel { display: none !important; } }


/* source style22 id="v9-integrated-vocabulary-style" */
/* v9: merge the CBT vocabulary pool into the original word area. */
:root{
  --wordbook-readable-font:"Noto Sans KR","Noto Sans CJK KR","Apple SD Gothic Neo","Malgun Gothic","Segoe UI",Arial,sans-serif;
}
.modern-card,
.screen-study-card,
.wordbook-layout,
.wordbook-compact-controls,
.screen-detail-box .structure-line,
.screen-detail-box .structure-meaning,
.screen-sense-meaning,
.screen-example-box,
.screen-practice-pad{
  font-family:var(--wordbook-readable-font)!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
.screen-char,
.screen-sense-reading,
.screen-vocab-term,
.screen-vocab-term .hanja-inline,
.screen-example-item .hanja-inline,
.result-char{
  font-family:var(--hanja-font)!important;
}
/* The old separate CBT vocabulary block is no longer part of the card. */
.cbt-lexicon-panel{display:none!important;}
/* Expand the original vocabulary strip into a proper vertical reference area. */
.screen-card-grid{
  grid-template-rows:142px 188px minmax(176px,auto)!important;
}
.screen-example-box{
  grid-column:1 / -1!important;
  grid-row:3!important;
  height:190px!important;
  min-height:176px!important;
  max-height:270px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  align-items:stretch!important;
  gap:7px!important;
  padding:9px 11px 7px!important;
  border:2px solid #cbd9df!important;
  border-left:6px solid #4f7f98!important;
  border-radius:10px!important;
  background:#fff!important;
  overflow:hidden!important;
  white-space:normal!important;
}
.screen-word-head{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:6px;
  border-bottom:1px solid #e3e9ed;
}
.screen-example-label{
  padding:0!important;
  color:#254e66!important;
  font-family:var(--wordbook-readable-font)!important;
  font-size:14px!important;
  line-height:1.25!important;
  font-weight:900!important;
  letter-spacing:-.02em;
}
.screen-word-count{
  flex:0 0 auto;
  padding:2px 8px;
  border:1px solid #d7e1e7;
  border-radius:999px;
  background:#f5f9fb;
  color:#667985;
  font-size:10px;
  font-weight:800;
}
.screen-example-items{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:0!important;
  padding:0 2px 0 0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-gutter:stable;
  scroll-snap-type:none!important;
}
.screen-example-item{
  width:100%!important;
  height:auto!important;
  min-height:35px!important;
  display:grid!important;
  grid-template-columns:13px minmax(0,1fr)!important;
  align-items:start!important;
  gap:5px!important;
  padding:7px 3px!important;
  border-bottom:1px solid #edf1f3;
  color:#28343d!important;
  font-family:var(--wordbook-readable-font)!important;
  font-size:15px!important;
  line-height:1.55!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:keep-all!important;
  overflow-wrap:anywhere!important;
  scroll-snap-align:none!important;
}
.screen-example-item:last-child{border-bottom:0;}
.screen-example-bullet{
  padding-top:1px;
  color:#7390a0!important;
  font-family:var(--wordbook-readable-font)!important;
  font-size:13px!important;
  line-height:1.55!important;
  font-weight:950!important;
  text-align:center;
}
.screen-vocab-line{min-width:0;}
.screen-vocab-term{
  color:#142d3e;
  font-size:1.12em;
  font-weight:850;
  letter-spacing:.015em;
}
.screen-vocab-reading{
  color:#245c78;
  font-family:var(--wordbook-readable-font)!important;
  font-size:.94em;
  font-weight:850;
}
.screen-vocab-colon{color:#70808a;font-weight:750;}
.screen-vocab-meaning{color:#303c44;font-weight:600;}
.screen-vocab-meaning.missing{color:#929da4;font-weight:600;}
.screen-vocab-badges{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  margin-left:7px;
  vertical-align:1px;
}
.screen-vocab-badge{
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:1px 6px;
  border:1px solid #d7e1e7;
  border-radius:999px;
  background:#f7fafc;
  color:#70808b;
  font-family:var(--wordbook-readable-font)!important;
  font-size:9px;
  line-height:1.2;
  font-weight:800;
  white-space:nowrap;
}
.screen-vocab-badge.idiom{border-color:#e2d4b7;background:#fff9eb;color:#80602b;}
.screen-vocab-badge.review{border-color:#ead39e;background:#fff9e8;color:#93671d;}
.screen-vocab-source-form{
  display:block;
  margin-top:2px;
  color:#8a7b70;
  font-family:var(--wordbook-readable-font)!important;
  font-size:10px;
}
.screen-word-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  min-height:27px;
  padding-top:5px;
  border-top:1px solid #e3e9ed;
}
.screen-example-edit{
  min-height:26px;
  padding:4px 10px!important;
  border:1px solid #b9cad4!important;
  border-radius:7px!important;
  background:#f8fbfd!important;
  color:#385c70!important;
  font-family:var(--wordbook-readable-font)!important;
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:850!important;
  cursor:pointer;
}
.screen-example-edit:hover{background:#edf5f8!important;}
/* Drawer and explanation dock use the same compact term[reading] : meaning form. */
.cbt-example-line{
  padding:6px 0;
  border-bottom:1px solid #edf1f3;
  color:#303c44;
  font-family:var(--wordbook-readable-font)!important;
  font-size:13px;
  line-height:1.55;
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.cbt-example-line:last-child{border-bottom:0;}
.cbt-dock-card-examples{
  max-height:92px;
  overflow:auto;
  font-family:var(--wordbook-readable-font)!important;
  line-height:1.48!important;
}
@media(max-width:700px){
  .screen-card-grid{grid-template-rows:138px 182px minmax(160px,auto)!important;}
  .screen-example-box{height:174px!important;min-height:160px!important;max-height:230px!important;}
  .screen-example-item{min-height:34px!important;font-size:14px!important;padding:6px 2px!important;}
}


/* source style23 id="v10-core-card-layout-style" */
/* v10: every core Hanja is a full vertical card; structure is fixed to paja -> scene -> meaning. */
#integratedCbtApp .cbt-dock-wordbook{margin-top:10px!important;padding-top:8px!important;}
#integratedCbtApp .cbt-dock-wordbook-head{position:sticky;top:-1px;z-index:2;padding:6px 0 7px;background:#f7fbff;}
#integratedCbtApp .cbt-dock-wordbook-head strong{font-size:13px!important;letter-spacing:-.02em;}
#integratedCbtApp .cbt-dock-wordbook-head span{font-size:10px!important;color:#71849a!important;}
#integratedCbtApp .cbt-dock-card-list{display:flex;flex-direction:column;gap:9px;}
#integratedCbtApp .cbt-dock-card{
  display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;gap:9px!important;
  padding:10px!important;border:1px solid #cfdeeb!important;border-radius:13px!important;background:#fff!important;
  box-shadow:0 2px 7px rgba(31,78,121,.045)!important;
}
#integratedCbtApp .cbt-dock-card-glyph{
  width:64px!important;height:64px!important;display:flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid #e2d2bd!important;border-radius:11px!important;background:#fffaf3!important;
  font-family:var(--hanja-font)!important;font-size:44px!important;line-height:1!important;color:#171412!important;
}
#integratedCbtApp .cbt-dock-card-copy{min-width:0!important;}
#integratedCbtApp .cbt-dock-card-title{font-size:16px!important;line-height:1.25!important;font-weight:950!important;color:#1e3348!important;}
#integratedCbtApp .cbt-dock-card-alias{display:inline-flex!important;margin-left:6px!important;padding:1px 5px!important;border:1px solid #f0d7a4!important;border-radius:999px!important;background:#fff8e8!important;color:#8b641d!important;font-size:9px!important;vertical-align:2px!important;}
#integratedCbtApp .cbt-structure-three{display:flex;flex-direction:column;gap:4px;margin-top:7px;}
#integratedCbtApp .cbt-structure-row{display:grid;grid-template-columns:38px minmax(0,1fr);gap:6px;align-items:start;font-family:var(--wordbook-readable-font)!important;font-size:11.5px;line-height:1.45;word-break:keep-all;overflow-wrap:anywhere;}
#integratedCbtApp .cbt-structure-label{padding:2px 4px;border-radius:5px;background:#edf5fa;color:#315d76;font-size:9.5px;font-weight:950;text-align:center;white-space:nowrap;}
#integratedCbtApp .cbt-structure-row.scene .cbt-structure-label{background:#f7f0e6;color:#72573d;}
#integratedCbtApp .cbt-structure-row.meaning .cbt-structure-label{background:#eaf6ed;color:#276143;}
#integratedCbtApp .cbt-structure-value{color:#34495a;font-weight:650;}
#integratedCbtApp .cbt-structure-row.paja .cbt-structure-value{font-family:var(--hanja-font),var(--wordbook-readable-font)!important;color:#243f52;font-weight:750;}
#integratedCbtApp .cbt-structure-row.meaning .cbt-structure-value{color:#1f6545;font-weight:900;}
#integratedCbtApp .cbt-dock-card-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;margin-top:0!important;}
#integratedCbtApp .cbt-dock-card-actions button{min-width:0!important;padding:6px 4px!important;font-size:10px!important;white-space:nowrap!important;}
#integratedCbtApp .cbt-dock-more{display:none!important;}
#integratedCbtApp .cbt-detail-section .cbt-structure-three{margin-top:0;}
#integratedCbtApp .cbt-detail-section .cbt-structure-row{grid-template-columns:44px minmax(0,1fr);font-size:13px;line-height:1.55;}
#integratedCbtApp .cbt-review-card-note{margin-top:5px;padding:5px 7px;border:1px solid #f2d7a4;border-radius:7px;background:#fff9ea;color:#8a651e;font-size:10px;line-height:1.4;}
@media(max-width:1199px){
  #integratedCbtApp .cbt-dock-card{grid-template-columns:56px minmax(0,1fr)!important;}
  #integratedCbtApp .cbt-dock-card-glyph{width:56px!important;height:56px!important;font-size:39px!important;}
}
@media(max-width:520px){
  #integratedCbtApp .cbt-dock-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #integratedCbtApp .cbt-structure-row{grid-template-columns:35px minmax(0,1fr);}
}


/* source style24 id="v11-vocabulary-meaning-style" */
.screen-vocab-meaning{color:#27343c!important;font-weight:650!important;}
.screen-example-item{grid-template-columns:13px minmax(0,1fr)!important;}
.screen-vocab-line{display:block;min-width:0;}


/* source style25 id="v12-semantic-ui-fixes" */
#integratedCbtApp .cbt-explanation-always-control{
  display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid rgba(255,255,255,.4);border-radius:8px;
  background:rgba(255,255,255,.12);color:#fff;font-size:12px;font-weight:850;white-space:nowrap;cursor:pointer;
}
#integratedCbtApp .cbt-explanation-always-control input{width:17px;height:17px;margin:0;accent-color:#facc15;}
#integratedCbtApp .cbt-hard-exclude-btn{border-color:#fca5a5!important;color:#b91c1c!important;background:#fff1f2!important;font-weight:950!important;}
#integratedCbtApp .cbt-hard-exclude-btn:hover{background:#ffe4e6!important;border-color:#ef4444!important;}
#integratedCbtApp .question-row.row-mode .q-controls{flex:0 0 154px!important;min-width:154px!important;}
#integratedCbtApp .question-row.col-mode .q-controls{flex:0 0 auto!important;min-width:270px!important;max-width:46%;}
#integratedCbtApp .question-row.idiom-layout{display:block!important;}
#integratedCbtApp .question-row.idiom-layout .q-main-text{width:100%!important;min-width:0!important;flex-basis:auto!important;margin:0 0 14px!important;padding:0!important;align-items:center!important;}
#integratedCbtApp .question-row.idiom-layout .q-text-large{white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;letter-spacing:.12em;}
#integratedCbtApp .question-row.idiom-layout .choices-area{width:100%!important;padding-left:calc(3.6ch + .82em)!important;box-sizing:border-box!important;}
#integratedCbtApp .question-row.col-mode .q-controls{margin-left:auto!important;align-self:flex-start;flex-wrap:nowrap;}
#integratedCbtApp .cbt-unanswered-focus{outline:3px solid #f59e0b!important;outline-offset:4px;background:#fffbeb!important;border-radius:10px;animation:cbtUnansweredPulse .75s ease-in-out 2;}
@keyframes cbtUnansweredPulse{50%{box-shadow:0 0 0 8px rgba(245,158,11,.16)}}
#integratedCbtApp .cbt-card-detail.editing{padding:10px 13px 16px!important;}
#integratedCbtApp .cbt-card-detail.editing .cbt-card-hero{grid-template-columns:58px minmax(0,1fr)!important;gap:10px!important;padding:4px 0 9px!important;margin:0!important;}
#integratedCbtApp .cbt-card-detail.editing .cbt-card-char{font-size:48px!important;line-height:.95!important;}
#integratedCbtApp .cbt-card-detail.editing .cbt-card-title{font-size:18px!important;}
#integratedCbtApp .cbt-card-detail.editing .cbt-card-meta{font-size:11px!important;line-height:1.35!important;}
#integratedCbtApp .cbt-drawer-edit-form{gap:7px!important;margin-top:6px!important;}
#integratedCbtApp .cbt-drawer-edit-form label{gap:3px!important;}
#integratedCbtApp .cbt-drawer-edit-form input,#integratedCbtApp .cbt-drawer-edit-form textarea{padding:7px 9px!important;}
#integratedCbtApp .cbt-drawer-edit-form textarea{min-height:68px!important;}
#integratedCbtApp .cbt-drawer-edit-sticky{grid-column:1/-1;position:sticky;top:0;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 8px;margin:-2px -2px 2px;background:rgba(255,255,255,.97);border:1px solid #dbeafe;border-radius:9px;box-shadow:0 5px 16px rgba(15,23,42,.08);}
#integratedCbtApp .cbt-drawer-edit-sticky strong{font-size:13px;color:#1e3a8a;}
#integratedCbtApp .cbt-drawer-edit-sticky .cbt-drawer-edit-actions{grid-column:auto!important;}
@media(max-width:760px){
 #integratedCbtApp .question-row.row-mode .q-controls,#integratedCbtApp .question-row.col-mode .q-controls{width:100%!important;min-width:0!important;max-width:none!important;flex-basis:auto!important;}
 #integratedCbtApp .question-row.idiom-layout .choices-area{padding-left:0!important;}
 #integratedCbtApp .cbt-explanation-always-control span{font-size:11px;}
 #integratedCbtApp .cbt-card-detail.editing .cbt-card-hero{grid-template-columns:48px minmax(0,1fr)!important;}
 #integratedCbtApp .cbt-card-detail.editing .cbt-card-char{font-size:40px!important;}
}


/* source style26 id="v13-sticky-wrong-note-style" */
#integratedCbtApp .cbt-clear-wrong-btn{
  border:1px solid #f59e0b!important;
  background:#fffbeb!important;
  color:#92400e!important;
  font-weight:850!important;
  white-space:nowrap;
}
#integratedCbtApp .cbt-clear-wrong-btn:hover{
  background:#fef3c7!important;
  border-color:#d97706!important;
}
#integratedCbtApp .cbt-row-tail-actions .cbt-clear-wrong-btn{
  margin-right:auto;
}
@media (max-width:760px){
  #integratedCbtApp .cbt-row-tail-actions .cbt-clear-wrong-btn{
    width:auto!important;
    min-height:40px;
  }
}


/* source style27  */
/* v14: CBT를 유지한 채 여는 한자 단어장 팝업 */
#integratedCbtApp .cbt-side-sheet.cbt-wordbook-popup {
  width:min(760px, 100%);
  max-height:min(90dvh, 920px);
  overscroll-behavior:contain;
}
#integratedCbtApp .cbt-wordbook-popup .cbt-card-detail { padding:14px 16px 18px; }
#integratedCbtApp .cbt-wordbook-popup .cbt-card-hero {
  grid-template-columns:82px minmax(0,1fr);
  gap:14px;
  padding-bottom:12px;
}
#integratedCbtApp .cbt-wordbook-popup .cbt-card-char { font-size:66px; }
#integratedCbtApp .cbt-wordbook-popup .cbt-card-title { font-size:23px; }
#integratedCbtApp .cbt-wordbook-popup .cbt-card-meta { margin-top:5px; line-height:1.4; }
@media (max-width:760px) {
  #integratedCbtApp .cbt-overlay { padding:0; align-items:stretch; }
  #integratedCbtApp .cbt-side-sheet.cbt-wordbook-popup {
    width:100%; max-height:100dvh; height:100dvh; border-radius:0;
  }
}


/* source style28 id="v15-consistent-question-layout" */
/* v15: 모든 CBT 유형을 같은 시각 리듬으로 고정한다.
   1행 문제(줄바꿈 금지) → 2행 학습 도구 → 3행 선지 → 4행 해설/수정. */
#integratedCbtApp .question-row,
#integratedCbtApp .question-row.row-mode,
#integratedCbtApp .question-row.col-mode,
#integratedCbtApp .question-row.uniform-mode,
#integratedCbtApp .question-row.idiom-layout {
  display:block !important;
  width:100% !important;
}
#integratedCbtApp .question-row .q-main-text,
#integratedCbtApp .question-row.row-mode .q-main-text,
#integratedCbtApp .question-row.col-mode .q-main-text,
#integratedCbtApp .question-row.uniform-mode .q-main-text,
#integratedCbtApp .question-row.idiom-layout .q-main-text {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-items:start !important;
  gap:7px !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 0 10px !important;
  padding:0 !important;
  overflow:visible !important;
  box-sizing:border-box !important;
}
#integratedCbtApp .q-text-wrapper,
#integratedCbtApp .question-row.row-mode .q-text-wrapper,
#integratedCbtApp .question-row.col-mode .q-text-wrapper,
#integratedCbtApp .question-row.uniform-mode .q-text-wrapper {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:baseline !important;
  gap:.72em !important;
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  white-space:nowrap !important;
  padding:1px 2px 4px !important;
  scrollbar-width:thin;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
#integratedCbtApp .q-num {
  flex:0 0 auto !important;
  width:auto !important;
  min-width:3.25ch !important;
  text-align:right !important;
  white-space:nowrap !important;
}
#integratedCbtApp .q-text-large,
#integratedCbtApp .q-text-normal,
#integratedCbtApp .question-row.idiom-layout .q-text-large,
#integratedCbtApp .question-row.idiom-layout .q-text-normal {
  display:inline-block !important;
  flex:0 0 auto !important;
  width:max-content !important;
  max-width:none !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
  letter-spacing:normal;
}
#integratedCbtApp .question-row.idiom-layout .q-text-large { letter-spacing:.08em !important; }

/* ? ! X 字는 문제 옆을 밀지 않고 항상 독립된 도구행에 둔다. */
#integratedCbtApp .q-controls,
#integratedCbtApp .question-row.row-mode .q-controls,
#integratedCbtApp .question-row.col-mode .q-controls,
#integratedCbtApp .question-row.uniform-mode .q-controls {
  display:flex !important;
  flex:0 0 auto !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  margin:0 0 0 calc(3.25ch + .72em) !important;
  padding:0 !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none;
}
#integratedCbtApp .q-controls::-webkit-scrollbar { display:none; }
#integratedCbtApp .q-controls .action-btn { flex:0 0 auto !important; }

/* 선지는 반드시 문제와 도구행 아래에 놓는다. 짧은 선지는 가로, 긴 선지는 세로. */
#integratedCbtApp .choices-area,
#integratedCbtApp .question-row.row-mode .choices-area,
#integratedCbtApp .question-row.col-mode .choices-area,
#integratedCbtApp .question-row.uniform-mode .choices-area,
#integratedCbtApp .question-row.idiom-layout .choices-area {
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding-left:calc(3.25ch + .72em) !important;
  box-sizing:border-box !important;
}
#integratedCbtApp .choices-area.inline-mode,
#integratedCbtApp .question-row.uniform-mode .choices-area.inline-mode {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px !important;
  overflow:visible !important;
}
#integratedCbtApp .choices-area.inline-mode .choice-item {
  width:auto !important;
  min-width:max-content !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
}
#integratedCbtApp .choices-area.stacked-mode,
#integratedCbtApp .question-row.uniform-mode .choices-area.stacked-mode {
  display:flex !important;
  flex-direction:column !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  gap:8px !important;
}
#integratedCbtApp .choices-area.stacked-mode .choice-item {
  width:100% !important;
  min-width:0 !important;
}
#integratedCbtApp .cbt-row-tail-actions,
#integratedCbtApp .choices-area.inline-mode .cbt-row-tail-actions,
#integratedCbtApp .choices-area.stacked-mode .cbt-row-tail-actions {
  display:flex !important;
  flex:0 0 100% !important;
  width:100% !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:6px !important;
  margin:2px 0 0 !important;
  align-self:stretch !important;
}
#integratedCbtApp .cbt-row-tail-actions .cbt-clear-wrong-btn { margin-right:auto !important; }

/* 큰 글자에서도 행 구조가 바뀌지 않는다. */
@media (max-width:760px) {
  #integratedCbtApp .q-text-wrapper { gap:.55em !important; }
  #integratedCbtApp .q-num { min-width:2.9ch !important; }
  #integratedCbtApp .q-controls { margin-left:calc(2.9ch + .55em) !important; }
  #integratedCbtApp .choices-area,
  #integratedCbtApp .question-row.row-mode .choices-area,
  #integratedCbtApp .question-row.col-mode .choices-area,
  #integratedCbtApp .question-row.uniform-mode .choices-area,
  #integratedCbtApp .question-row.idiom-layout .choices-area { padding-left:0 !important; }
  #integratedCbtApp .choices-area.inline-mode {
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    padding-bottom:4px !important;
    scrollbar-width:thin;
  }
}


/* source style29 id="v16-reading-passage-layout" */
/* v16: 제3영역 마지막 독해는 '완전한 지문 + 소속 문항 묶음'으로 표시한다.
   일반 문제의 한 줄 규칙은 지문 본문에 적용하지 않는다. */
#integratedCbtApp .reading-passage-block {
  margin: 0 0 28px;
  border: 1px solid #b9d5f5;
  border-radius: 12px;
  background: #fff;
  overflow: visible;
  box-shadow: 0 3px 12px rgba(43,108,176,.08);
}
#integratedCbtApp .reading-passage-head {
  padding: 10px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #245a91;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
  font-weight: 800;
}
#integratedCbtApp .reading-passage-count {
  color: #718096;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#integratedCbtApp .stimulus-box.reading-stimulus {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  margin: 8px 14px 12px !important;
  padding: 18px 20px !important;
  border: 1px solid #d8e5f3 !important;
  border-radius: 9px !important;
  background: #f8fbff !important;
  color: #1f2937 !important;
  font-size: 17px !important;
  line-height: 1.85 !important;
  letter-spacing: 0 !important;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif !important;
}
#integratedCbtApp .stimulus-box.reading-stimulus p {
  margin: 0 0 1em;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}
#integratedCbtApp .stimulus-box.reading-stimulus p:last-child { margin-bottom: 0; }
#integratedCbtApp .reading-passage-questions {
  padding: 4px 16px 2px;
}
#integratedCbtApp .reading-passage-questions .question-row:last-child {
  margin-bottom: 4px;
  border-bottom: 0;
}
@media (max-width: 760px) {
  #integratedCbtApp .reading-passage-block { border-radius: 9px; margin-bottom: 20px; }
  #integratedCbtApp .reading-passage-head { padding: 9px 11px 0; }
  #integratedCbtApp .stimulus-box.reading-stimulus {
    margin: 7px 9px 10px !important;
    padding: 14px 14px !important;
    font-size: 16px !important;
    line-height: 1.78 !important;
  }
  #integratedCbtApp .reading-passage-questions { padding: 2px 10px; }
}


/* source style30 id="v17-adaptive-layout-and-score" */
/* v17: 짧은 단일 한자형만 한 줄, 나머지는 문제 위/선지 아래. 모든 조작 버튼은 선지 뒤에 모은다. */
#integratedCbtApp .question-row.v17-compact-inline{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  gap:14px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:14px 8px 16px!important;
  -webkit-overflow-scrolling:touch;
}
#integratedCbtApp .question-row.v17-compact-inline .q-main-text{
  display:flex!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  margin:0!important;
  padding:0!important;
}
#integratedCbtApp .question-row.v17-compact-inline .q-text-wrapper{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  width:auto!important;
  min-width:max-content!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
#integratedCbtApp .question-row.v17-compact-inline .choices-area{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
}
#integratedCbtApp .question-row.v17-stacked-question{
  display:block!important;
  padding:15px 8px 18px!important;
}
#integratedCbtApp .question-row.v17-stacked-question .q-main-text{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  margin:0 0 12px!important;
  padding:0!important;
}
#integratedCbtApp .question-row.v17-stacked-question .q-text-wrapper{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:flex-start!important;
  width:100%!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:2px 2px 6px!important;
  -webkit-overflow-scrolling:touch;
}
#integratedCbtApp .question-row.v17-stacked-question .choices-area{
  width:100%!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
}
#integratedCbtApp .question-row.v17-stacked-question .choices-area.inline-mode{
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  gap:8px!important;
  overflow:visible!important;
}
#integratedCbtApp .question-row.v17-stacked-question .choices-area.stacked-mode{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:8px!important;
}
#integratedCbtApp .question-row .q-controls{display:none!important;}
#integratedCbtApp .cbt-row-tail-actions{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  gap:7px!important;
  margin-left:auto!important;
  padding-left:8px!important;
  min-width:max-content!important;
}
#integratedCbtApp .question-row.uniform-mode.v17-compact-inline .choices-area.inline-mode{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  padding-left:0!important;
  overflow:visible!important;
}
#integratedCbtApp .question-row.v17-compact-inline .choices-area.inline-mode .cbt-row-tail-actions,
#integratedCbtApp .question-row.v17-compact-inline .cbt-row-tail-actions{
  flex:0 0 auto!important;
  width:auto!important;
  align-self:center!important;
  margin:0 0 0 auto!important;
  padding-left:8px!important;
}
#integratedCbtApp .question-row.v17-stacked-question .cbt-row-tail-actions{
  flex:0 0 100%!important;
  width:100%!important;
  justify-content:flex-end!important;
  margin:4px 0 0!important;
  padding:0!important;
}
#integratedCbtApp .question-row.v17-stacked-question .choices-area.stacked-mode .cbt-row-tail-actions{
  align-self:stretch!important;
}
#integratedCbtApp .question-row .q-num,
#integratedCbtApp .question-row .q-text-large,
#integratedCbtApp .question-row .q-text-normal{white-space:nowrap!important;}
#integratedCbtApp .cbt-score-breakdown{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:16px 0 12px;
  text-align:left;
}
#integratedCbtApp .cbt-score-domain{
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  padding:12px 13px;
}
#integratedCbtApp .cbt-score-domain strong{display:block;color:#1e3a8a;font-size:15px;margin-bottom:5px;}
#integratedCbtApp .cbt-score-domain span{display:block;color:#475569;font-size:13px;line-height:1.45;}
@media(max-width:760px){
  #integratedCbtApp .cbt-score-breakdown{grid-template-columns:1fr;}
  #integratedCbtApp .question-row.v17-compact-inline{gap:10px!important;}
}


/* source style31 id="v18-audit-style" */
.screen-vocab-badge.audit-review{background:#fff3cd;color:#7a5200;border:1px solid #f1d58a}


/* v22 structural performance: persistent route roots + true fixed-row virtualization. */
.modern-route-view { width:100%; height:100%; min-height:0; }
.modern-route-view[hidden] { display:none !important; }
.modern-route-view.active { display:block; }
.modern-results.virtualized { position:relative; overflow:auto; contain:layout paint style; overflow-anchor:none; }
.virtual-list-spacer { position:relative; width:100%; min-height:1px; }
.virtual-list-window { position:absolute; inset:0 0 auto 0; will-change:transform; contain:layout paint; }
.virtual-list-window .result-row { height:46px; min-height:46px; width:100%; }
.wordbook-sort-status { min-height:14px; font-size:10px; color:#7a6f64; text-align:right; padding:0 2px; }
#v22LoadingOverlay { position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; background:rgba(250,247,241,.72); backdrop-filter:blur(3px); }
#v22LoadingOverlay.open { display:flex; }
#v22LoadingOverlay>div { border:1px solid #d8cbbd; border-radius:16px; background:#fff; box-shadow:0 16px 48px rgba(30,24,18,.18); padding:18px 22px; font-weight:850; color:#473b31; }

/* v23 cloud sync panel */
.cloud-sync-panel { border-color: #c7dbe5 !important; background: #f7fbfd !important; }
.cloud-sync-device { color: #506776; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.cloud-sync-status { margin-top: 7px; border: 1px solid #cbd9e2; border-radius: 9px; background: #fff; color: #2f5f7f; padding: 8px 9px; font-size: 12px; font-weight: 800; line-height: 1.35; }
.cloud-sync-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.cloud-sync-actions button { border: 1px solid #b9ccd8; border-radius: 9px; background: #fff; color: #244d68; padding: 8px 7px; cursor: pointer; font-size: 11px; font-weight: 800; }
.cloud-sync-actions button:hover { background: #edf7fb; }
#cloudRestoreFromServer { grid-column: 1 / -1; border-color: #d8b7aa; color: #823d2b; background: #fffaf7; }
#cloudRestoreFromServer:hover { background: #fff0e9; }
.cloud-sync-note { color: #6b7a84; font-size: 10.5px; line-height: 1.45; margin: 8px 0 0; }
#syncSupabase[data-sync-kind="error"] { border-color: #d68a78; background: #fff4ef; color: #9c3219; }
#syncSupabase[data-sync-kind="pending"], #syncSupabase[data-sync-kind="offline"] { border-color: #d8b46e; background: #fff9eb; color: #8a5a08; }
#syncSupabase[data-sync-kind="success"] { border-color: #79b393; background: #eefaf3; color: #0b6a3e; }


/* v24 adaptive CBT coverage */
.cbt-data-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px 10px;
}
.cbt-coverage-count {
  padding-left: 9px;
  border-left: 1px solid rgba(47,95,127,.24);
  white-space: nowrap;
}
.cbt-coverage-count strong { color: #174a36; font-size: 1.08em; }
.cbt-coverage-percent {
  min-width: 48px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f4ec;
  border: 1px solid #bdd7c5;
  color: #174a36;
  font-weight: 850;
  text-align: center;
}
.adaptive-exam-note {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #d6e4db;
  border-radius: 10px;
  background: #f2faf5;
  color: #355b47;
  font-size: 12px;
  line-height: 1.45;
}
.adaptive-exam-note strong { margin-right: 5px; color: #174a36; }
@media (max-width: 720px) {
  .cbt-data-status { justify-content: flex-start; }
  .cbt-coverage-count { padding-left: 0; border-left: 0; }
}

/* v26 시험 집중 모드 */
#integratedCbtApp .sync-status[hidden]{display:none!important;}
@media (max-width:760px){
  #integratedCbtApp .domain-header{padding:8px 10px 9px;gap:2px;}
  #integratedCbtApp .domain-header-path{font-size:11px;}
  #integratedCbtApp .domain-header-instruction{font-size:10.5px;}
}


/* v27 exam UI stability: same type = same layout; editor below; compact test explanation. */
#integratedCbtApp .cbt-wrong-sticker{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;min-width:30px!important;height:19px!important;margin:0 2px 0 4px!important;padding:0 6px!important;border:1px solid #f3b4ad!important;border-radius:999px!important;background:#fff3f1!important;color:#b53a32!important;font-family:'Malgun Gothic','Apple SD Gothic Neo',sans-serif!important;font-size:10px!important;line-height:1!important;font-weight:900!important;letter-spacing:-.02em!important;vertical-align:middle!important;box-shadow:none!important;}
#integratedCbtApp .cbt-inline-editor-slot{display:block!important;width:100%!important;box-sizing:border-box!important;margin:-8px 0 20px!important;padding:0 8px 2px!important;clear:both!important;}
#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-editor{width:100%!important;max-width:none!important;box-sizing:border-box!important;margin:0!important;}
#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-field.full{grid-column:1/-1!important;}
#integratedCbtApp .cbt-inline-editor-slot textarea{min-height:92px!important;}
#integratedCbtApp .question-row.v27-fixed-inline{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:14px!important;overflow-x:auto!important;overflow-y:hidden!important;}
#integratedCbtApp .question-row.v27-fixed-inline .q-main-text,#integratedCbtApp .question-row.v27-fixed-inline .q-text-wrapper,#integratedCbtApp .question-row.v27-fixed-inline .choices-area.inline-mode{flex:0 0 auto!important;width:auto!important;min-width:max-content!important;}
#integratedCbtApp .question-row.v27-fixed-inline .choices-area.inline-mode{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:8px!important;}
#integratedCbtApp .question-row.v27-fixed-stacked{display:block!important;}
#integratedCbtApp .question-row.v27-fixed-stacked .q-main-text{width:100%!important;margin:0 0 12px!important;}
#integratedCbtApp .question-row.v27-fixed-stacked .choices-area.stacked-mode{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;width:100%!important;}
#integratedCbtApp .cbt-clear-wrong-btn{display:none!important;}

.test-explanation-card{overflow:visible!important;max-width:100%!important;min-height:0!important;height:auto!important;}
.test-explanation-card .screen-study-card{max-height:none!important;height:auto!important;overflow:visible!important;padding:5px!important;}
.test-explanation-card .screen-card-grid{grid-template-columns:150px minmax(0,1fr)!important;grid-template-rows:112px 152px auto!important;gap:5px 6px!important;align-items:stretch!important;min-height:0!important;}
.test-explanation-card .screen-char-column{min-height:0!important;height:112px!important;}
.test-explanation-card .screen-char-box{height:112px!important;min-height:112px!important;}
.test-explanation-card .screen-char{font-size:76px!important;line-height:.9!important;}
.test-explanation-card .screen-favorite-star{width:29px!important;height:29px!important;font-size:20px!important;top:5px!important;right:5px!important;}
.test-explanation-card .screen-huneum-box{height:112px!important;min-height:112px!important;}
.test-explanation-card .screen-sense-row{grid-template-columns:minmax(0,1fr) 64px!important;min-height:0!important;}
.test-explanation-card .screen-sense-meaning{font-size:18px!important;line-height:1.08!important;padding:4px 10px 4px 6px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.test-explanation-card .screen-sense-reading{width:64px!important;min-width:64px!important;font-size:20px!important;line-height:1!important;padding:4px!important;}
.test-explanation-card .screen-equip-box,.test-explanation-card .screen-detail-box{height:152px!important;min-height:152px!important;max-height:152px!important;}
.test-explanation-card .screen-equip-box .equipment-board{transform:scale(.70)!important;transform-origin:center center!important;}
.test-explanation-card .screen-detail-box{padding:6px 8px!important;overflow:auto!important;}
.test-explanation-card .screen-detail-box .structure-main{font-size:14px!important;line-height:1.22!important;}
.test-explanation-card .screen-detail-box .structure-line{font-size:12.5px!important;line-height:1.35!important;}
.test-explanation-card .screen-detail-box .structure-meaning{font-size:13.5px!important;line-height:1.25!important;padding:3px 6px!important;}
.test-explanation-card .screen-detail-box .structure-row,.test-explanation-card .screen-detail-box .structure-result{min-height:19px!important;grid-template-columns:13px minmax(0,1fr)!important;column-gap:4px!important;}
.test-explanation-card .screen-example-box{grid-column:1/-1!important;grid-row:3!important;height:auto!important;min-height:92px!important;max-height:180px!important;padding:7px 9px!important;gap:5px!important;overflow:hidden!important;}
.test-explanation-card .screen-word-head{padding-bottom:4px!important;}
.test-explanation-card .screen-example-label{font-size:11.5px!important;}
.test-explanation-card .screen-word-count{font-size:9px!important;padding:1px 6px!important;}
.test-explanation-card .screen-example-items{height:auto!important;min-height:0!important;max-height:118px!important;overflow-y:auto!important;overflow-x:hidden!important;}
.test-explanation-card .screen-example-item{min-height:0!important;height:auto!important;padding:4px 2px!important;font-size:12.5px!important;line-height:1.38!important;white-space:normal!important;word-break:keep-all!important;overflow-wrap:anywhere!important;overflow:visible!important;}
.test-explanation-card .screen-vocab-term{font-size:1.06em!important;white-space:nowrap!important;}
.test-explanation-card .screen-vocab-reading{font-size:.9em!important;white-space:nowrap!important;}
.test-explanation-card .screen-vocab-badge{font-size:8px!important;min-height:16px!important;padding:1px 4px!important;}
.test-explanation-card .screen-word-actions{min-height:22px!important;padding-top:3px!important;}
.test-explanation-card .screen-example-edit{min-height:22px!important;font-size:9px!important;padding:3px 7px!important;}
.test-explanation-card .screen-practice-pad{display:none!important;}
@media(max-width:760px){#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-grid{grid-template-columns:1fr!important;}#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-field.full{grid-column:auto!important;}.test-explanation-card .screen-card-grid{grid-template-columns:132px minmax(0,1fr)!important;grid-template-rows:104px 144px auto!important;}.test-explanation-card .screen-char-column,.test-explanation-card .screen-char-box,.test-explanation-card .screen-huneum-box{height:104px!important;min-height:104px!important;}.test-explanation-card .screen-char{font-size:68px!important;}.test-explanation-card .screen-sense-row{grid-template-columns:minmax(0,1fr) 58px!important;}.test-explanation-card .screen-sense-meaning{font-size:16px!important;}.test-explanation-card .screen-sense-reading{width:58px!important;min-width:58px!important;font-size:18px!important;}.test-explanation-card .screen-equip-box,.test-explanation-card .screen-detail-box{height:144px!important;min-height:144px!important;max-height:144px!important;}}


/* v28 시험 직전 UI 최적화 ---------------------------------------------------
   원칙: 같은 folder_path = 같은 템플릿. 질문 길이/1·2글자/오답 여부는 레이아웃에 관여하지 않는다. */
#integratedCbtApp .question-area{
  padding:14px 18px 18px!important;
}
#integratedCbtApp .question-row.v28-fixed-inline,
#integratedCbtApp .question-row.v28-fixed-stacked{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;
  gap:7px!important;
  width:min(100%,1100px)!important;
  max-width:1100px!important;
  min-width:0!important;
  margin:0 0 12px 0!important;
  padding:10px 10px 13px!important;
  box-sizing:border-box!important;
  overflow:visible!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .q-main-text,
#integratedCbtApp .question-row.v28-fixed-stacked .q-main-text{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .q-text-wrapper,
#integratedCbtApp .question-row.v28-fixed-stacked .q-text-wrapper{
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  gap:4px 8px!important;
  width:100%!important;
  min-width:0!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .q-num,
#integratedCbtApp .question-row.v28-fixed-stacked .q-num{
  flex:0 0 auto!important;
  min-width:3.15ch!important;
  width:auto!important;
  text-align:right!important;
  padding:0!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .q-text-large,
#integratedCbtApp .question-row.v28-fixed-inline .q-text-normal,
#integratedCbtApp .question-row.v28-fixed-stacked .q-text-large,
#integratedCbtApp .question-row.v28-fixed-stacked .q-text-normal{
  flex:1 1 220px!important;
  min-width:0!important;
  max-width:100%!important;
}
/* 짧은 한자형: 보기는 항상 한 줄의 독립 영역. 넘칠 때 그 영역만 가로 스크롤. */
#integratedCbtApp .question-row.v28-fixed-inline .choices-area.inline-mode{
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:100%!important;
  max-width:820px!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}
#integratedCbtApp .question-row.v28-fixed-inline .choices-area.inline-mode .choice-item{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:74px!important;
  max-width:210px!important;
  padding:7px 11px!important;
  line-height:1.22!important;
  white-space:nowrap!important;
}
/* 긴 뜻/독해형: 보기 폭을 과도하게 늘리지 않고 읽기 좋은 폭으로 고정. */
#integratedCbtApp .question-row.v28-fixed-stacked .choices-area.stacked-mode{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:6px!important;
  width:min(100%,980px)!important;
  max-width:980px!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
}
#integratedCbtApp .question-row.v28-fixed-stacked .choices-area.stacked-mode .choice-item{
  width:100%!important;
  min-width:0!important;
  padding:7px 11px!important;
  line-height:1.34!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:anywhere!important;
}
/* ? ! X 字 해설 수정: 문제/보기 아래 왼쪽의 작은 고정 도구행 */
#integratedCbtApp .question-row.v28-fixed-inline .cbt-row-tail-actions,
#integratedCbtApp .question-row.v28-fixed-stacked .cbt-row-tail-actions{
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  width:auto!important;
  max-width:100%!important;
  min-height:0!important;
  margin:2px 0 0 3.15ch!important;
  padding:0!important;
  align-self:start!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .cbt-row-tail-actions .action-btn,
#integratedCbtApp .question-row.v28-fixed-stacked .cbt-row-tail-actions .action-btn{
  min-width:30px!important;
  width:auto!important;
  min-height:29px!important;
  height:29px!important;
  padding:2px 8px!important;
  border-radius:6px!important;
  font-size:11.5px!important;
  line-height:1!important;
  box-shadow:none!important;
}
#integratedCbtApp .question-row.v28-fixed-inline .cbt-row-tail-actions .cbt-explanation-open-btn,
#integratedCbtApp .question-row.v28-fixed-inline .cbt-row-tail-actions .cbt-inline-edit-trigger,
#integratedCbtApp .question-row.v28-fixed-stacked .cbt-row-tail-actions .cbt-explanation-open-btn,
#integratedCbtApp .question-row.v28-fixed-stacked .cbt-row-tail-actions .cbt-inline-edit-trigger{
  min-width:44px!important;
}
#integratedCbtApp .cbt-wrong-sticker{
  min-width:28px!important;
  height:18px!important;
  margin:0!important;
  padding:0 6px!important;
  font-size:9.5px!important;
}
/* 수정 폼은 항상 해당 문제 바로 아래, 동일한 읽기 폭. */
#integratedCbtApp .cbt-inline-editor-slot{
  width:min(100%,1100px)!important;
  max-width:1100px!important;
  margin:-4px 0 12px!important;
  padding:0 10px 2px!important;
}
#integratedCbtApp .cbt-inline-editor-slot .cbt-inline-question-editor{
  width:100%!important;
  max-width:100%!important;
}
/* 지문/자극문도 무한정 늘어나지 않게 읽기 폭을 맞춘다. */
#integratedCbtApp .stimulus-box,
#integratedCbtApp .reading-passage-block{
  width:min(100%,1100px)!important;
  max-width:1100px!important;
  box-sizing:border-box!important;
}
@media(max-width:760px){
  #integratedCbtApp .question-area{padding:10px 8px 14px!important;}
  #integratedCbtApp .question-row.v28-fixed-inline,
  #integratedCbtApp .question-row.v28-fixed-stacked{padding:8px 4px 11px!important;gap:6px!important;}
  #integratedCbtApp .question-row.v28-fixed-inline .choices-area.inline-mode{max-width:100%!important;}
  #integratedCbtApp .question-row.v28-fixed-stacked .choices-area.stacked-mode{max-width:100%!important;}
  #integratedCbtApp .question-row.v28-fixed-inline .cbt-row-tail-actions,
  #integratedCbtApp .question-row.v28-fixed-stacked .cbt-row-tail-actions{margin-left:0!important;}
  #integratedCbtApp .cbt-inline-editor-slot{padding-left:4px!important;padding-right:4px!important;}
}
