@font-face {
  font-family: 'Pretendard';
  src: url('./fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #F6F3EC;
  --paper: #FFFFFF;
  --tint: #EFEBE1;
  --obsidian: #141413;
  --obsidian-2: #1E1D1B;
  --obsidian-line: #2F2C27;
  --gold: #7B5C2E;
  --gold-bright: #C6A263;
  --gold-light: #E2C287;
  --vermilion: #B83227;
  --vermilion-bright: #EA6B5F;
  --sage: #73CCA7;
  --sage-dark: #1E5C45;
  --ink: #141413;
  --ink-2: #46423C;
  --ink-3: #6D6860;
  --rule: #DCD5C8;
  --rule-strong: #C2B9AA;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header */
.folio-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  max-width: 100%;
}
.sq { width: 9px; height: 9px; background: var(--vermilion); display: inline-block; flex-shrink: 0; }
.mode-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
  max-width: 100%;
}
.mode-tag .dot { color: var(--gold); margin: 0 5px; }

/* Tab Bar — 4-col on normal screens, automatic clean 2x2 on ultra-narrow / large OS fonts */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1.5px solid var(--rule-strong);
  margin-bottom: 16px;
  background: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 15;
}
body.compact-2col .tab-bar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tab-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 12px 4px 11px;
  min-height: 46px;
  min-width: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink-3);
  cursor: pointer;
  position: relative;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
}
body.compact-2col .tab-btn {
  border-bottom: 1px solid var(--rule);
  padding: 10px 6px;
}
.tab-btn.active { color: var(--ink); font-weight: 900; }
.tab-btn.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3.5px;
  background: var(--gold);
}
.tab-num {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--gold);
  margin-right: 4px;
}

.panel { display: none; flex: 1; min-width: 0; }
.panel.active { display: block; }

/* Responsive Layout: Mobile Single-Focus -> PC 2-Column with Sidebar */
.dual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.main-col { min-width: 0; max-width: 100%; }
.pc-aside { display: none; min-width: 0; }

@media (min-width: 960px) {
  .app-shell { padding: 26px 34px 32px; }
  .brand { font-size: 1.3rem; }
  .mode-tag { font-size: 0.9rem; }
  .tab-btn { font-size: 1.0625rem; padding: 16px 8px; }
  .tab-num { font-size: 1rem; margin-right: 6px; }
  .dual-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.78fr); gap: 28px; }
  .pc-aside { display: flex; flex-direction: column; gap: 16px; }
}

/* Kickers & Input Zone */
.kicker-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.kicker {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.db-pill {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--sage-dark);
  background: rgba(30, 92, 69, 0.11);
  border: 1px solid rgba(30, 92, 69, 0.35);
  padding: 4px 9px;
  max-width: 100%;
}

.search-wrap { position: relative; max-width: 100%; }
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 2px solid var(--ink);
  background: var(--paper);
  min-height: 52px;
}
body.large-font .search-row {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 340px) {
  .search-row { grid-template-columns: minmax(0, 1fr); }
}
.search-input {
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  background: transparent;
  width: 100%;
  min-width: 0;
}
.search-btn {
  appearance: none;
  border: none;
  border-left: 2px solid var(--ink);
  background: var(--obsidian);
  color: #F6F3EC;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 10px 16px;
  min-height: 48px;
  cursor: pointer;
  white-space: nowrap;
}
body.large-font .search-btn {
  border-left: none;
  border-top: 2px solid var(--ink);
  width: 100%;
}
@media (max-width: 340px) {
  .search-btn {
    border-left: none;
    border-top: 2px solid var(--ink);
    width: 100%;
  }
}
.search-btn:active { opacity: 0.85; }

/* Autocomplete Dropdown */
.suggest-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 2px);
  z-index: 30;
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 0 18px 40px rgba(20, 20, 19, 0.22);
  max-height: 320px;
  overflow-y: auto;
}
.suggest-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item:focus-visible { background: var(--tint); outline: none; }
.sug-main { min-width: 0; flex: 1 1 160px; }
.sug-name { font-size: 0.94rem; font-weight: 800; color: var(--ink); }
.sug-ingr { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  background: var(--tint);
}
.sug-badge.high { border-color: var(--vermilion); color: var(--vermilion); background: rgba(184, 50, 39, 0.08); }
.sug-badge.med { border-color: var(--gold); color: var(--gold); background: rgba(123, 92, 46, 0.10); }

.helper-strip {
  margin-top: 9px;
  background: var(--tint);
  border-left: 3.5px solid var(--gold);
  padding: 9px 12px;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--ink-2);
}
.helper-strip strong { color: var(--gold); margin-right: 6px; }

.quick-strip {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.quick-label { font-size: 0.8rem; font-weight: 800; color: var(--ink-3); margin-right: 2px; }
.quick-chip {
  appearance: none;
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  padding: 7px 11px;
  min-height: 36px;
  max-width: 100%;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.quick-chip.active { background: var(--ink); border-color: var(--ink); color: #F6F3EC; }

/* Obsidian Result Card */
.obsidian-card {
  margin-top: 16px;
  background: var(--obsidian);
  color: #F6F3EC;
  border-top: 4px solid var(--gold-bright);
  padding: 18px 16px 16px;
  max-width: 100%;
  min-width: 0;
}
@media (min-width: 640px) {
  .obsidian-card { padding: 24px 28px 22px; }
}
.ob-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--obsidian-line);
}
.mfds-badge {
  border: 1.5px solid var(--vermilion-bright);
  background: rgba(184, 50, 39, 0.24);
  color: #FFC0B9;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 5px 10px;
  max-width: 100%;
  line-height: 1.35;
}
.mfds-badge.normal {
  border-color: var(--gold-bright);
  background: rgba(198, 162, 99, 0.16);
  color: var(--gold-light);
}
.mfds-badge.safe {
  border-color: var(--sage);
  background: rgba(115, 204, 167, 0.16);
  color: #B4EED5;
}
.gold-badge {
  border: 1.5px solid var(--gold-bright);
  background: rgba(198, 162, 99, 0.16);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 10px;
  max-width: 100%;
  line-height: 1.35;
}
.copy-btn {
  appearance: none;
  background: transparent;
  border: 1.5px solid var(--gold-bright);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 7px 12px;
  min-height: 38px;
  max-width: 100%;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(198, 162, 99, 0.16); }

/* Tab 01 Drug Hero */
.drug-hero {
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--obsidian-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.drug-name {
  font-size: 1.65rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.18;
}
.drug-ingr {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #C9C3B8;
  line-height: 1.4;
}
.drug-meta {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-light);
}

.focus-row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--obsidian-line);
  align-items: start;
}
body.large-font .focus-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}
.focus-row.no-border { border-bottom: none; padding-bottom: 6px; }
.focus-num {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.1;
}
.focus-label { font-size: 0.82rem; font-weight: 700; color: #BDB8AE; margin-bottom: 4px; }
.focus-value { font-size: 1.02rem; font-weight: 800; color: #FFFFFF; line-height: 1.42; }
.focus-value.gold { color: var(--gold-light); }
.focus-sub { font-size: 0.88rem; font-weight: 500; color: #DBD6CE; margin-top: 4px; line-height: 1.48; }

.kakao-box {
  margin-top: 14px;
  background: #1C231F;
  border: 1px solid rgba(115, 204, 167, 0.45);
  border-left: 4px solid var(--sage);
  padding: 13px 14px;
}
.kakao-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.kakao-tag { font-size: 0.82rem; font-weight: 800; color: var(--sage); }
.kakao-copy-mini {
  appearance: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sage);
  border: 1px solid var(--sage);
  padding: 4px 10px;
  min-height: 32px;
  cursor: pointer;
}
.kakao-copy-mini:hover { background: rgba(115, 204, 167, 0.16); }
.kakao-msg { font-size: 0.9rem; font-weight: 600; color: #F5F3EE; line-height: 1.52; }

/* Tab 02 Date Checker */
.dual-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}
@media (min-width: 640px) {
  .dual-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.d-box {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 13px 14px;
  min-width: 0;
  max-width: 100%;
}
.d-box.verdict { border-color: var(--vermilion); background: #FFFBF9; }
.d-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.d-lbl { font-size: 0.85rem; font-weight: 800; color: var(--ink-2); }
.d-box.verdict .d-lbl { color: var(--vermilion); }
.verdict-chip {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--vermilion);
  border: 1px solid var(--vermilion);
  padding: 2px 7px;
}
.date-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1.5px solid var(--rule-strong);
  background: var(--paper);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--ink);
}
.d-hint { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); margin-top: 7px; }
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 9px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  cursor: pointer;
}
.toggle-row input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--vermilion); cursor: pointer; }

.mini-pill-btn {
  appearance: none;
  background: var(--tint);
  border: 1px solid var(--rule-strong);
  padding: 4px 9px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
}
.mini-pill-btn:hover { border-color: var(--ink); color: var(--ink); }

.bi-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-top: 16px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Mobile-first 1-col compact stack -> 3-col on >= 560px (and stays 1-col in large-font mode!) */
.tri-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--obsidian-line);
}
.tri-cell {
  background: var(--obsidian-2);
  border-left: 3.5px solid var(--gold-bright);
  padding: 11px 13px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
}
.tri-cell .t-k { font-family: Georgia, serif; font-style: italic; font-size: 0.9rem; color: var(--gold-light); }
.tri-cell .t-d { font-size: 1.08rem; font-weight: 900; color: #FFFFFF; }
.tri-cell .t-s { font-size: 0.78rem; color: #BDB8AE; font-weight: 600; width: 100%; line-height: 1.35; }

@media (min-width: 560px) {
  body:not(.large-font) .tri-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  body:not(.large-font) .tri-cell {
    border-left: none;
    border-top: 3px solid var(--gold-bright);
    display: block;
    padding: 12px 11px;
  }
  body:not(.large-font) .tri-cell .t-k { margin-bottom: 4px; }
  body:not(.large-font) .tri-cell .t-d { margin-bottom: 4px; }
}

.case-verdict-box {
  margin-top: 16px;
  background: #241918;
  border: 1.5px solid var(--vermilion-bright);
  border-left: 5px solid var(--vermilion-bright);
  padding: 14px 15px;
}
.case-verdict-box.safe {
  background: #17231E;
  border-color: var(--sage);
  border-left-color: var(--sage);
}
.cv-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.cv-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #FFC0B9;
  background: rgba(184, 50, 39, 0.30);
  padding: 4px 9px;
  max-width: 100%;
}
.case-verdict-box.safe .cv-badge {
  color: #B4EED5;
  background: rgba(115, 204, 167, 0.22);
}
.cv-date { font-size: 0.88rem; font-weight: 900; color: var(--gold-light); }
.cv-main { font-size: 1.08rem; font-weight: 900; color: #FFFFFF; line-height: 1.38; margin-bottom: 5px; }
.cv-sub { font-size: 0.85rem; font-weight: 500; color: #E2DCD3; line-height: 1.48; }

.date-foot-bar {
  margin-top: 14px;
  background: var(--obsidian-2);
  border-left: 3px solid var(--gold-bright);
  padding: 11px 13px;
  font-size: 0.82rem;
  color: #EAE5DC;
  line-height: 1.48;
}
.date-foot-bar strong { color: var(--gold-light); margin-right: 6px; }

/* Tab 03 Ad Compliance */
.ad-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-textarea {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 12px 13px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink);
  resize: vertical;
  min-height: 86px;
}
.ad-preview-box {
  margin-top: 10px;
  background: #FFFDF9;
  border: 1.5px dashed var(--rule-strong);
  padding: 12px 13px;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.62;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
mark.hl-bad {
  background: rgba(184, 50, 39, 0.16);
  border-bottom: 2.5px solid var(--vermilion);
  color: #8C1E15;
  padding: 1px 3px;
  font-weight: 900;
}
.ad-bar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ad-meta { font-size: 0.85rem; font-weight: 800; color: var(--vermilion); line-height: 1.35; }
.ad-meta.safe { color: var(--sage-dark); }
.ad-check-btn {
  appearance: none;
  background: var(--obsidian);
  color: #F6F3EC;
  border: none;
  padding: 9px 14px;
  min-height: 40px;
  max-width: 100%;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.flags-container { margin-top: 4px; }
.flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 13px 0;
  border-bottom: 1px solid var(--obsidian-line);
  align-items: start;
}
@media (min-width: 560px) {
  body:not(.large-font) .flag-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }
}
.flag-row:last-child { border-bottom: none; }
.flag-tag {
  border: 1.5px solid var(--vermilion-bright);
  background: rgba(184, 50, 39, 0.22);
  color: #FFC0B9;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 9px;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}
.flag-tag.ok {
  border-color: var(--sage);
  background: rgba(115, 204, 167, 0.16);
  color: #B4EED5;
}
.flag-title { font-size: 0.94rem; font-weight: 800; color: #FFFFFF; margin-bottom: 4px; line-height: 1.4; }
.flag-fix { font-size: 0.85rem; color: #D8D3CA; line-height: 1.48; }
.flag-fix strong { color: var(--gold-light); }

/* Tab 04 Brandless Library */
.lib-head-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.lib-h1 { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.03em; margin-top: 5px; line-height: 1.25; }
.lib-sub { font-size: 0.88rem; font-weight: 800; color: var(--gold); }

.lib-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lib-card {
  background: var(--obsidian);
  color: #F6F3EC;
  border-left: 5px solid var(--gold-bright);
  padding: 15px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
@media (min-width: 600px) {
  body:not(.large-font) .lib-card {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px 18px;
  }
}
.lib-code {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
}
.lib-c-title { font-size: 1.02rem; font-weight: 900; color: #FFFFFF; margin-bottom: 4px; line-height: 1.35; }
.lib-c-sub { font-size: 0.82rem; color: #BDB8AE; line-height: 1.42; }
.lib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.lib-btn {
  appearance: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 14px;
  max-width: 100%;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}
.lib-btn.preview {
  background: transparent;
  border: 1px solid rgba(245, 243, 238, 0.35);
  color: #F5F3EE;
}
.lib-btn.save {
  background: var(--gold-bright);
  border: 1px solid var(--gold-bright);
  color: #141413;
}

/* PC Sidebar */
.aside-card {
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-top: 3.5px solid var(--gold);
  padding: 18px 20px;
}
.aside-card.muted {
  background: var(--tint);
  border-top-color: var(--ink-3);
}
.aside-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.aside-title { font-size: 1.06rem; font-weight: 900; margin-bottom: 12px; line-height: 1.3; }
.aside-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.aside-p { font-size: 0.82rem; line-height: 1.55; color: var(--ink-2); }
.aside-meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sage-dark);
}

/* Legal 3-Line Footnote */
.legal-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1.5px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.5;
}
.legal-footer .f-num { color: var(--gold); font-weight: 800; margin-right: 6px; }

/* Preview Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 12, 11, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal-box {
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  background: var(--obsidian);
  border: 1.5px solid var(--gold-bright);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--obsidian-line);
}
.modal-title { font-size: 0.94rem; font-weight: 800; color: #FFFFFF; }
.modal-close {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(245, 243, 238, 0.35);
  color: #F5F3EE;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-img-wrap {
  padding: 12px;
  overflow-y: auto;
  text-align: center;
  background: #0D0D0C;
}
.modal-img-wrap img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border: 1px solid rgba(226, 194, 135, 0.3);
}
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-top: 1px solid var(--obsidian-line);
}
.modal-note { font-size: 0.78rem; color: #BDB8AE; font-weight: 600; }
.modal-dl-btn {
  text-decoration: none;
  background: var(--gold-bright);
  color: #141413;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 8px 14px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100vw - 28px);
  text-align: center;
  background: var(--obsidian);
  color: var(--gold-light);
  border: 1.5px solid var(--gold-bright);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.toast[hidden] { display: none; }
