.wiki-shell {
  min-height: 100vh;
  background: #f4f5f6;
  color: #26272b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans KR", sans-serif;
}
.wiki-shell * { box-sizing: border-box; }
.wiki-shell a { color: #2379b7; text-decoration: none; }
.wiki-shell a:hover { text-decoration: underline; }

/* Detail media and static shell use the same styles as the public Guide UI. */
.knowledge-guide-media { margin: 20px 0; }
.knowledge-guide-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 7px; }
.knowledge-guide-media figcaption { margin-top: 8px; color: #73786f; font-size: 13px; }
.knowledge-guide-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; border-radius: 7px; }
.knowledge-guide-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.knowledge-guide-related { margin: 28px 34px 0; padding-top: 18px; border-top: 1px solid #d7d1c5; overflow-wrap: anywhere; }
.knowledge-guide-related .related-question { display: block; margin-top: 4px; }
.knowledge-guide-fiction-notice { color: #63665f; font-size: 0.9em; margin: 6px 0 13px; line-height: 1.55; }
.knowledge-guide-fiction-stories { display: grid; gap: 8px; }
.knowledge-guide-fiction-story { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #d9ddd6; border-radius: 6px; background: #f7f8f5; text-decoration: none; }
.knowledge-guide-fiction-story:hover { border-color: #8b9c86; background: #eef2eb; }
.knowledge-guide-fiction-story:focus-visible { outline: 2px solid #496546; outline-offset: 2px; }
.knowledge-guide-fiction-story img { flex: none; width: 104px; height: 74px; object-fit: cover; border-radius: 4px; }
.knowledge-guide-fiction-story span { min-width: 0; }
.knowledge-guide-fiction-story strong { display: block; color: #334b37; }
.knowledge-guide-fiction-story small { display: block; margin-top: 4px; color: #626861; }
@media (max-width: 420px) { .knowledge-guide-fiction-story { align-items: flex-start; } .knowledge-guide-fiction-story img { width: 88px; height: 68px; } }

.wiki-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(280px, 560px) auto;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 66px;
  padding: 9px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid #d9dbde;
  background: rgba(255,255,255,.97);
}
.wiki-brand { display: grid; min-width: 128px; color: #202126 !important; text-decoration: none !important; }
.wiki-brand strong { font-size: 19px; letter-spacing: -.04em; }
.wiki-brand span { color: #777a80; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.wiki-search-area { position: relative; min-width: 0; }
.wiki-search { display: grid; grid-template-columns: minmax(0,1fr) auto; min-width: 0; }
.wiki-search input { min-width: 0; height: 42px; padding: 0 13px; border: 1px solid #cfd2d5; border-right: 0; border-radius: 6px 0 0 6px; background: #fff; color: #222; font-size: 14px; }
.wiki-search button { min-width: 60px; border: 1px solid #cfd2d5; border-radius: 0 6px 6px 0; background: #f7f7f8; color: #33353a; font-weight: 700; }
.wiki-topbar > nav { display: flex; gap: 4px; }
.wiki-topbar > nav a { padding: 8px 9px; color: #4e5056; font-size: 13px; font-weight: 650; white-space: nowrap; }

.wiki-frame { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 80px; }
.wiki-breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 12px; color: #777a80; font-size: 12px; }
.wiki-breadcrumb strong { color: #4a4d52; }

.wiki-document {
  position: relative;
  min-height: 900px;
  padding: 26px 30px 44px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.wiki-document-header {
  min-height: 150px;
  padding: 0 320px 19px 0;
  border-bottom: 1px solid #d7d9dd;
}
.wiki-document-kicker { margin: 0 0 7px; color: #8a8c91; font-size: 11px; font-weight: 700; }
.wiki-document-header h1 { margin: 0; color: #202126; font-size: clamp(34px, 5vw, 50px); letter-spacing: -.055em; line-height: 1.1; }
.wiki-document-header > p:last-child { max-width: 660px; margin: 14px 0 0; color: #666970; font-size: 15px; line-height: 1.7; }

.wiki-infobox {
  position: absolute;
  top: 26px;
  right: 30px;
  width: 276px;
  overflow: hidden;
  border: 1px solid #bfc2c7;
  background: #fff;
}
.wiki-infobox-cover {
  display: grid;
  height: 150px;
  place-items: center;
  border-bottom: 1px solid #bfc2c7;
  background: linear-gradient(145deg, #eef0f2, #dfe2e5);
  color: #85888f;
  font-size: 13px;
  font-weight: 650;
}
.wiki-infobox h2 { margin: 0; padding: 10px 12px; border-bottom: 1px solid #bfc2c7; background: #2d3132; color: #fff; font-size: 16px; text-align: center; }
.wiki-infobox dl { margin: 0; }
.wiki-infobox dl div { display: grid; grid-template-columns: 92px minmax(0,1fr); border-top: 1px solid #e0e2e5; }
.wiki-infobox dl div:first-child { border-top: 0; }
.wiki-infobox dt { padding: 9px 8px; background: #f0f1f2; color: #55585f; font-size: 12px; font-weight: 750; }
.wiki-infobox dd { min-width: 0; margin: 0; padding: 9px 10px; color: #35373c; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

.wiki-toc {
  width: min(440px, calc(100% - 320px));
  margin: 22px 0 26px;
  border: 1px solid #d6d8dc;
  background: #fbfbfc;
}
.wiki-toc summary { padding: 12px 14px; color: #2f3137; font-size: 17px; font-weight: 750; cursor: pointer; }
.wiki-toc ol { display: grid; gap: 5px; margin: 0; padding: 0 16px 14px 42px; }
.wiki-toc li { color: #75787e; font-size: 14px; }
.wiki-toc a { display: inline-block; padding: 1px 0; }

.wiki-article-body { max-width: 760px; padding-right: 12px; }
.wiki-article-body section { scroll-margin-top: 82px; }
.wiki-article-body h2 {
  margin: 36px 0 16px;
  padding: 0 0 9px;
  border-bottom: 1px solid #d7d9dd;
  color: #24262b;
  font-size: 27px;
  letter-spacing: -.035em;
}
.wiki-article-body h2 span { margin-right: 7px; color: #2e7fb4; }
.wiki-article-body h3 { margin: 28px 0 12px; color: #33363b; font-size: 20px; }
.wiki-article-body p { margin: 0 0 18px; color: #36383e; font-size: 16px; line-height: 1.9; word-break: keep-all; }
.wiki-related-links { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 25px; }
.wiki-related-links a { padding: 6px 9px; border: 1px solid #d9dbde; border-radius: 4px; background: #f9f9fa; font-size: 13px; }
.wiki-source-box { display: grid; grid-template-columns: 100px minmax(0,1fr); border: 1px solid #d9dbde; }
.wiki-source-box strong, .wiki-source-box span { padding: 10px 12px; border-top: 1px solid #e1e3e5; font-size: 13px; }
.wiki-source-box strong:nth-child(1), .wiki-source-box strong:nth-child(1) + span { border-top: 0; }
.wiki-source-box strong { background: #f2f3f4; color: #55585d; }

.wiki-document-footer { max-width: 760px; margin-top: 44px; padding-top: 17px; border-top: 1px solid #d9dbde; }
.wiki-document-footer > strong { display: block; margin-bottom: 10px; font-size: 14px; }
.wiki-document-footer nav { display: flex; flex-wrap: wrap; gap: 7px 13px; font-size: 13px; }

.wiki-floating-nav {
  position: fixed;
  z-index: 30;
  right: max(14px, calc((100vw - 1210px) / 2));
  bottom: 28px;
  display: grid;
  overflow: hidden;
  border: 1px solid #d9dbde;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(20,22,25,.1);
}
.wiki-floating-nav a { display: grid; width: 44px; height: 44px; place-items: center; border-top: 1px solid #e1e3e5; color: #6b6e74; font-size: 20px; text-decoration: none !important; }
.wiki-floating-nav a:first-child { border-top: 0; }

@media (max-width: 820px) {
  .wiki-topbar { grid-template-columns: 1fr auto; gap: 8px; padding: 9px 14px; }
  .wiki-search-area { grid-column: 1 / -1; grid-row: 2; }
  .wiki-topbar > nav { justify-content: end; }
  .wiki-frame { width: min(100% - 20px, 720px); padding-top: 10px; }
  .wiki-document { padding: 18px 16px 42px; }
  .wiki-document-header { min-height: 0; padding: 0 0 19px; }
  .wiki-document-header h1 { font-size: 35px; }
  .wiki-infobox { position: static; width: 100%; margin: 18px 0 20px; }
  .wiki-infobox-cover { height: 180px; }
  .wiki-toc { width: 100%; margin-top: 0; }
  .wiki-article-body { max-width: none; padding: 0; }
  .wiki-article-body p { font-size: 16px; line-height: 1.85; }
  .wiki-floating-nav { right: 10px; bottom: 18px; }
}

@media (max-width: 520px) {
  .wiki-brand span { display: none; }
  .wiki-topbar > nav a { padding: 7px 5px; font-size: 11px; }
  .wiki-frame { width: 100%; padding: 0 0 64px; }
  .wiki-breadcrumb { padding: 10px 14px 0; }
  .wiki-document { border-right: 0; border-left: 0; padding: 16px 14px 38px; }
  .wiki-infobox-cover { height: 155px; }
  .wiki-article-body h2 { font-size: 25px; }
  .wiki-source-box { grid-template-columns: 84px minmax(0,1fr); }
}

.wiki-infobox-cover.has-image {
  height: auto;
  min-height: 0;
  background: #eceeef;
}
.wiki-infobox-cover.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.wiki-lead {
  color: #24262b !important;
  font-weight: 650;
}
.wiki-muted {
  color: #7c7f85 !important;
}
.wiki-previous-context { margin: 12px 0 22px; }
.wiki-previous-context summary { cursor: pointer; color: #64676d; font-size: 14px; }
.wiki-previous-context[open] summary { margin-bottom: 14px; }
.wiki-record-sources { margin-top: 8px; font-size: 13px; }
.wiki-record-sources span { display: inline-flex; gap: 12px; margin-right: 12px; }
.wiki-timeline .wiki-activity-role { margin-bottom: 7px; font-weight: 650; }
.wiki-history-facts { margin: 8px 0; font-size: 13px; }
.wiki-history-facts div { display: flex; gap: 10px; }
.wiki-history-facts dt { color: #74777d; }
.wiki-history-facts dd { margin: 0; }
.wiki-source-box .wiki-inline-source { display: inline-block; padding: 0 10px 4px 0; border: 0; }
.wiki-bullet-list {
  margin: 0 0 22px;
  padding-left: 23px;
  color: #36383e;
  font-size: 15px;
  line-height: 1.8;
}
.wiki-bullet-list li + li {
  margin-top: 4px;
}
.wiki-subsection + .wiki-subsection {
  margin-top: 28px;
}
.wiki-timeline {
  display: grid;
  margin: 24px 0 10px;
  border-top: 1px solid #d9dbde;
}
.wiki-timeline article {
  display: grid;
  grid-template-columns: 110px minmax(0,1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #e3e5e7;
}
.wiki-timeline time {
  color: #74777d;
  font-size: 13px;
  font-weight: 700;
}
.wiki-timeline strong {
  display: block;
  margin-bottom: 4px;
  color: #2f3136;
  font-size: 14px;
}
.wiki-timeline p {
  margin: 0;
  color: #55585e;
  font-size: 14px;
  line-height: 1.6;
}
.wiki-relation-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.wiki-relation-list a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #d9dbde;
  border-radius: 5px;
  background: #fafafb;
  text-decoration: none;
}
.wiki-relation-list a:hover {
  border-color: #b7bbc0;
  background: #f4f5f6;
  text-decoration: none;
}
.wiki-relation-list strong {
  color: #2379b7;
  font-size: 14px;
}
.wiki-relation-list span {
  color: #4e5157;
  font-size: 12px;
  font-weight: 700;
}
.wiki-relation-list small {
  color: #7b7e84;
  font-size: 11px;
  line-height: 1.45;
}
.wiki-main-visual {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 24px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.wiki-main-visual-frame {
  width: 100%;
  overflow: hidden;
}
.wiki-main-visual-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.wiki-main-visual figcaption {
  padding: 9px 11px;
  border-top: 1px solid #e0e2e5;
  color: #73767c;
  font-size: 12px;
}
.wiki-inline-source {
  display: inline;
}

@media (max-width: 620px) {
  .wiki-relation-list { grid-template-columns: 1fr; }
  .wiki-timeline article { grid-template-columns: 84px minmax(0,1fr); gap: 10px; }
}

.wiki-preview-tools {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 8px 10px;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px dashed #cdd0d4;
  border-radius: 6px;
  background: #fafbfb;
}
.wiki-preview-tools label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.wiki-preview-tools label > span {
  color: #686b71;
  font-size: 11px;
  font-weight: 750;
}
.wiki-preview-tools select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #cfd2d5;
  border-radius: 5px;
  background: #fff;
  color: #303238;
  font-size: 13px;
}
.wiki-preview-tools button {
  height: 38px;
  padding: 0 13px;
  border: 1px solid #c5c8cc;
  border-radius: 5px;
  background: #f1f2f3;
  color: #33363b;
  font-weight: 700;
}
.wiki-preview-tools small {
  grid-column: 1 / -1;
  color: #8a8d92;
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .wiki-preview-tools { grid-template-columns: 1fr auto; margin: 10px 12px; }
  .wiki-preview-tools select { font-size: 12px; }
}

.wiki-search-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  left: 0;
  width: min(680px, 92vw);
  max-height: min(68vh, 640px);
  overflow: auto;
  border: 1px solid #cfd2d5;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(28,31,35,.16);
}
.wiki-search-result-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #e0e2e5;
  background: #f7f8f9;
  color: #4f5258;
  font-size: 12px;
}
.wiki-search-group {
  padding: 9px 10px 4px;
}
.wiki-search-group + .wiki-search-group {
  border-top: 1px solid #eceef0;
}
.wiki-search-group h2 {
  margin: 0 0 6px;
  color: #777a80;
  font-size: 11px;
  letter-spacing: .02em;
}
.wiki-search-group > div {
  display: grid;
}
.wiki-search-group a {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 2px 8px;
  padding: 9px 8px;
  border-radius: 5px;
  text-decoration: none !important;
}
.wiki-search-group a:hover {
  background: #f3f5f6;
}
.wiki-search-kind {
  grid-row: span 3;
  align-self: start;
  margin-top: 2px;
  padding: 3px 5px;
  border-radius: 4px;
  background: #eef1f3;
  color: #6b6e74;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.wiki-search-group strong {
  min-width: 0;
  color: #2379b7;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.wiki-search-group small {
  color: #75787f;
  font-size: 10px;
}
.wiki-search-group p {
  grid-column: 2;
  margin: 2px 0 0;
  color: #55585f;
  font-size: 11px;
  line-height: 1.45;
}
.wiki-search-empty {
  margin: 0;
  padding: 18px 14px;
  color: #777a80;
  font-size: 13px;
}

@media (max-width: 820px) {
  .wiki-search-area { grid-column: 1 / -1; grid-row: 2; }
  .wiki-search-results { width: 100%; max-height: 58vh; }
}


/* Stage 7: Wiki-first home and Chronicle index */
.wiki-home-frame {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 80px;
}
.wiki-home-intro,
.wiki-chronicle-header {
  padding: 26px 28px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.wiki-home-intro h1,
.wiki-chronicle-header h1 {
  margin: 3px 0 10px;
  color: #202126;
  font-size: clamp(34px,5vw,50px);
  letter-spacing: -.055em;
  line-height: 1.1;
}
.wiki-home-intro > p:last-child,
.wiki-chronicle-header > p:last-of-type {
  max-width: 760px;
  margin: 0;
  color: #5d6066;
  font-size: 15px;
  line-height: 1.75;
}
.wiki-current-chronicle {
  margin-top: 14px;
  border-left: 4px solid #7a8580 !important;
}
.wiki-home-columns {
  display: grid;
  grid-template-columns: minmax(0,1.65fr) minmax(280px,.75fr);
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}
.wiki-home-columns > div,
.wiki-home-columns > aside {
  display: grid;
  gap: 14px;
}
.wiki-home-section {
  padding: 18px 20px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.wiki-home-section > p {
  margin: 8px 0 0;
  color: #5f6268;
  font-size: 14px;
  line-height: 1.7;
}
.wiki-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e0e2e5;
}
.wiki-section-heading > div {
  min-width: 0;
}
.wiki-section-heading h2 {
  margin: 0;
  color: #292b30;
  font-size: 19px;
}
.wiki-section-heading span,
.wiki-section-heading > strong,
.wiki-section-heading > a {
  color: #777a80;
  font-size: 11px;
  font-weight: 700;
}
.wiki-current-chronicle .wiki-section-heading {
  margin-bottom: 7px;
}
.wiki-current-chronicle .wiki-section-heading div > span {
  display: block;
  margin-bottom: 4px;
  color: #7b7e84;
  font-size: 10px;
  font-weight: 750;
}
.wiki-current-chronicle .wiki-section-heading h2 {
  font-size: 25px;
}
.wiki-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.wiki-home-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #cfd2d5;
  border-radius: 5px;
  background: #fafafa;
  color: #404349;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}
.wiki-home-actions a.primary {
  border-color: #52575b;
  background: #373b3d;
  color: #fff;
}
.wiki-change-list {
  display: grid;
}
.wiki-change-list > a {
  display: grid;
  grid-template-columns: auto minmax(150px,.9fr) minmax(190px,1.5fr) auto;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  padding: 10px 3px;
  border-top: 1px solid #eceef0;
  text-decoration: none !important;
}
.wiki-change-list > a:first-child {
  border-top: 0;
}
.wiki-change-list strong {
  min-width: 0;
  color: #2379b7;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.wiki-change-list small {
  min-width: 0;
  overflow: hidden;
  color: #666970;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wiki-change-list time {
  color: #8a8d92;
  font-size: 10px;
  white-space: nowrap;
}
.wiki-type-badge {
  min-width: 32px;
  padding: 3px 5px;
  border-radius: 4px;
  background: #eef1f3;
  color: #6a6d73;
  font-size: 9px;
  font-weight: 750;
  text-align: center;
}
.wiki-category-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border: 1px solid #dfe1e4;
}
.wiki-category-grid > section {
  min-width: 0;
  padding: 13px;
  border-left: 1px solid #e1e3e5;
}
.wiki-category-grid > section:first-child {
  border-left: 0;
}
.wiki-category-grid > section > strong {
  color: #35383d;
  font-size: 14px;
}
.wiki-category-grid > section > b {
  float: right;
  color: #7d8086;
  font-size: 12px;
}
.wiki-category-grid > section > div {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}
.wiki-category-grid a {
  min-width: 0;
  color: #2379b7;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.wiki-category-grid .wiki-category-more {
  display: block;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #eceef0;
  color: #555b60;
  font-weight: 750;
  text-decoration: none;
}
.wiki-category-grid .wiki-category-more:hover {
  color: #2379b7;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wiki-world-index-page {
  scroll-behavior: smooth;
}
.wiki-world-index-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.wiki-world-index-jump a {
  padding: 8px 12px;
  border: 1px solid #d8dade;
  border-radius: 999px;
  background: #fff;
  color: #4c5358;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.wiki-world-index-jump a:hover {
  border-color: #9fa4a8;
  color: #2379b7;
}
.wiki-world-index-section {
  scroll-margin-top: 78px;
}
.wiki-world-index-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 18px;
  border-top: 1px solid #e4e5e7;
}
.wiki-world-index-list > a {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 2px;
  border-bottom: 1px solid #eceef0;
  color: inherit;
  text-decoration: none;
}
.wiki-world-index-list > a:hover strong {
  color: #2379b7;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wiki-world-index-list strong {
  color: #384044;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.wiki-world-index-list small {
  color: #81858a;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.wiki-chronicle-list {
  display: grid;
}
.wiki-chronicle-list article {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #eceef0;
}
.wiki-chronicle-list article:first-child {
  border-top: 0;
}
.wiki-chronicle-list article > span {
  color: #85888e;
  font-size: 12px;
  font-weight: 800;
}
.wiki-chronicle-list article > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.wiki-chronicle-list strong {
  color: #33363b;
  font-size: 13px;
}
.wiki-chronicle-list small {
  color: #7c7f85;
  font-size: 10px;
}
.wiki-chronicle-list a {
  font-size: 11px;
  font-weight: 700;
}
.wiki-knowledge-list {
  display: grid;
}
.wiki-knowledge-list > a {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-top: 1px solid #eceef0;
  text-decoration: none !important;
}
.wiki-knowledge-list > a:first-child {
  border-top: 0;
}
.wiki-knowledge-list strong {
  color: #2379b7;
  font-size: 12px;
  line-height: 1.5;
}
.wiki-knowledge-list small {
  color: #7f8288;
  font-size: 10px;
}
.wiki-chronicle-header {
  margin-bottom: 14px;
}
.wiki-chronicle-columns {
  margin-top: 0;
}
.wiki-chronicle-info {
  margin: 0;
}
.wiki-chronicle-info > div {
  display: grid;
  grid-template-columns: 82px minmax(0,1fr);
  border-top: 1px solid #e4e6e8;
}
.wiki-chronicle-info > div:first-child {
  border-top: 0;
}
.wiki-chronicle-info dt,
.wiki-chronicle-info dd {
  margin: 0;
  padding: 8px 5px;
  font-size: 12px;
}
.wiki-chronicle-info dt {
  color: #73767c;
  font-weight: 700;
}
.wiki-chronicle-info dd {
  color: #34363c;
}
.wiki-quick-links {
  display: grid;
  gap: 6px;
}
.wiki-quick-links a,
.wiki-text-link {
  color: #2379b7;
  font-size: 12px;
}
.wiki-legacy-chronicle {
  margin-top: 14px;
}

@media (max-width: 860px) {
  .wiki-home-columns { grid-template-columns: 1fr; }
  .wiki-home-columns > aside { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .wiki-home-frame { width: 100%; padding-top: 8px; }
  .wiki-home-intro,
  .wiki-chronicle-header,
  .wiki-home-section { border-right: 0; border-left: 0; }
  .wiki-home-intro,
  .wiki-chronicle-header { padding: 20px 14px; }
  .wiki-home-section { padding: 15px 14px; }
  .wiki-home-columns { gap: 10px; margin-top: 10px; }
  .wiki-home-columns > div,
  .wiki-home-columns > aside { gap: 10px; }
  .wiki-home-columns > aside { grid-template-columns: 1fr; }
  .wiki-change-list > a {
    grid-template-columns: auto minmax(0,1fr) auto;
  }
  .wiki-change-list small {
    grid-column: 2 / -1;
    white-space: normal;
  }
  .wiki-category-grid { grid-template-columns: 1fr; }
  .wiki-world-index-list { grid-template-columns: 1fr; }
  .wiki-category-grid > section {
    border-top: 1px solid #e1e3e5;
    border-left: 0;
  }
  .wiki-category-grid > section:first-child { border-top: 0; }
}


/* Stage 8: practical Knowledge Guide preview */
.knowledge-guide-frame {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 80px;
}
.knowledge-guide {
  border: 1px solid #d9dbde;
  background: #fff;
}
.knowledge-guide-header {
  padding: 30px 34px 24px;
  border-bottom: 1px solid #dde0e3;
}
.knowledge-guide-header h1 {
  max-width: 820px;
  margin: 4px 0 14px;
  color: #202126;
  font-size: clamp(32px,5vw,48px);
  line-height: 1.22;
  letter-spacing: -.045em;
  word-break: keep-all;
}
.knowledge-guide-lead {
  max-width: 800px;
  margin: 0;
  color: #41444a;
  font-size: 17px;
  line-height: 1.85;
}
.knowledge-guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.knowledge-guide-meta span {
  padding: 5px 8px;
  border: 1px solid #d8dadd;
  border-radius: 999px;
  background: #f7f8f8;
  color: #666970;
  font-size: 10px;
  font-weight: 700;
}
.knowledge-guide-summary {
  display: grid;
  grid-template-columns: minmax(180px,.7fr) minmax(0,1.5fr);
  gap: 14px 24px;
  margin: 22px 34px 8px;
  padding: 18px 20px;
  border: 1px solid #d5d9d5;
  border-left: 4px solid #738173;
  background: #f8faf8;
}
.knowledge-guide-summary h2 {
  margin: 2px 0 0;
  color: #313630;
  font-size: 21px;
}
.knowledge-guide-summary > p {
  margin: 0;
  color: #343a35;
  font-size: 15px;
  line-height: 1.75;
}
.knowledge-guide-summary dl {
  grid-column: 1 / -1;
  display: grid;
  margin: 0;
  border-top: 1px solid #dfe3df;
}
.knowledge-guide-summary dl > div {
  display: grid;
  grid-template-columns: 95px minmax(0,1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e8e5;
}
.knowledge-guide-summary dt {
  color: #727871;
  font-size: 11px;
  font-weight: 700;
}
.knowledge-guide-summary dd {
  margin: 0;
  color: #414641;
  font-size: 12px;
}
.knowledge-guide-toc {
  margin: 20px 34px 8px;
  padding: 14px 18px;
  border: 1px solid #dfe1e3;
  background: #fafbfb;
}
.knowledge-guide-toc > strong {
  display: block;
  margin-bottom: 8px;
  color: #3e4146;
  font-size: 14px;
}
.knowledge-guide-toc ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 22px;
}
.knowledge-guide-toc a {
  color: #2379b7;
  font-size: 12px;
}
.knowledge-guide-body {
  padding: 0 34px 10px;
}
.knowledge-guide-body > section {
  scroll-margin-top: 82px;
  padding-top: 26px;
}
.knowledge-guide-body h2 {
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid #d9dbde;
  color: #272a2f;
  font-size: 25px;
  letter-spacing: -.03em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.knowledge-guide-body h2 span {
  color: #6f7e72;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  flex: none;
}
.knowledge-guide-provenance {
  margin: 24px 34px 20px;
  padding: 4px 18px 10px;
  border-left: 3px solid #8b9a88;
  background: #f7f8f5;
}
.knowledge-guide-provenance h2 span { font-size: 11px; }
.knowledge-guide-body p {
  margin: 0 0 17px;
  color: #36393f;
  font-size: 15px;
  line-height: 1.9;
  word-break: keep-all;
}
.knowledge-guide-note {
  margin: 18px 0;
  padding: 13px 15px;
  border: 1px solid #e7d6ad;
  border-left: 4px solid #c4963f;
  background: #fffaf0;
}
.knowledge-guide-note strong {
  display: block;
  margin-bottom: 5px;
  color: #7a5a1d;
  font-size: 12px;
}
.knowledge-guide-note p {
  margin: 0;
  color: #66542f;
  font-size: 13px;
  line-height: 1.7;
}
.knowledge-guide-steps {
  display: grid;
  gap: 8px;
  margin: 12px 0 20px;
  padding-left: 28px;
}
.knowledge-guide-steps li {
  padding-left: 4px;
  color: #34373c;
  font-size: 14px;
  line-height: 1.7;
}
.knowledge-guide-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 16px 0 22px;
  border: 1px solid #d9dbde;
}
.knowledge-guide-table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}
.knowledge-guide-table-wrap th,
.knowledge-guide-table-wrap td {
  padding: 10px 12px;
  border-top: 1px solid #e2e4e6;
  border-left: 1px solid #e2e4e6;
  color: #3e4146;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}
.knowledge-guide-table-wrap tr:first-child th {
  border-top: 0;
}
.knowledge-guide-table-wrap th:first-child,
.knowledge-guide-table-wrap td:first-child {
  border-left: 0;
}
.knowledge-guide-table-wrap th {
  background: #f2f3f4;
  color: #55585d;
  font-weight: 750;
}
.knowledge-guide-tool {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 12px;
  margin: 18px 0 22px;
  padding: 15px 17px;
  border: 1px solid #cfd6d0;
  border-radius: 6px;
  background: #f6faf7;
  text-decoration: none !important;
}
.knowledge-guide-tool strong {
  color: #315c3b;
  font-size: 14px;
}
.knowledge-guide-tool span {
  grid-column: 1;
  color: #68716a;
  font-size: 11px;
}
.knowledge-guide-tool b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #315c3b;
  font-size: 11px;
}
.knowledge-guide-sources {
  margin: 30px 34px 0;
  padding: 18px 20px;
  border: 1px solid #d9dbde;
  background: #fafafa;
}
.knowledge-guide-sources > div:last-child {
  display: grid;
}
.knowledge-guide-sources article {
  display: grid;
  grid-template-columns: minmax(180px,.8fr) minmax(0,1.4fr) auto;
  gap: 10px 18px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid #e1e3e5;
}
.knowledge-guide-sources article:first-child {
  border-top: 0;
}
.knowledge-guide-sources article > div {
  display: grid;
  gap: 3px;
}
.knowledge-guide-sources strong {
  color: #33363b;
  font-size: 12px;
}
.knowledge-guide-sources small {
  color: #82858b;
  font-size: 10px;
}
.knowledge-guide-sources article p {
  margin: 0;
  color: #5b5e64;
  font-size: 11px;
  line-height: 1.55;
}
.knowledge-guide-sources article > a {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.knowledge-guide-footer {
  margin: 18px 34px 34px;
  padding-top: 14px;
  border-top: 1px solid #dedfe2;
}
.knowledge-guide-footer p {
  margin: 0;
  color: #777a80;
  font-size: 11px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .knowledge-guide-frame { width: 100%; padding-top: 8px; }
  .knowledge-guide { border-right: 0; border-left: 0; }
  .knowledge-guide-header { padding: 21px 14px 18px; }
  .knowledge-guide-header h1 { font-size: 31px; }
  .knowledge-guide-lead { font-size: 15px; line-height: 1.75; }
  .knowledge-guide-summary {
    grid-template-columns: 1fr;
    margin: 14px 14px 0;
    padding: 15px;
  }
  .knowledge-guide-summary dl { grid-column: 1; }
  .knowledge-guide-toc { margin: 14px; }
  .knowledge-guide-body { padding: 0 14px 8px; }
  .knowledge-guide-body h2 { font-size: 22px; }
  .knowledge-guide-provenance { margin: 24px 14px 20px; padding: 4px 12px 8px; }
  .knowledge-guide-sources { margin: 24px 14px 0; padding: 15px; }
  .knowledge-guide-sources article { grid-template-columns: 1fr; gap: 5px; }
  .knowledge-guide-related { margin: 24px 14px 0; }
  .knowledge-guide-footer { margin: 16px 14px 26px; }
  .knowledge-guide-tool { grid-template-columns: 1fr; }
  .knowledge-guide-tool b { grid-column: 1; grid-row: auto; margin-top: 5px; }
}


.knowledge-guide-list {
  display: grid;
  gap: 7px;
  margin: 12px 0 20px;
  padding-left: 22px;
}
.knowledge-guide-list li {
  color: #34373c;
  font-size: 14px;
  line-height: 1.7;
}
.knowledge-library-header {
  padding: 28px 30px 24px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.knowledge-library-header h1 {
  margin: 4px 0 10px;
  color: #202126;
  font-size: clamp(34px,5vw,48px);
  letter-spacing: -.05em;
}
.knowledge-library-header > p:last-child {
  max-width: 760px;
  margin: 0;
  color: #5d6066;
  font-size: 15px;
  line-height: 1.75;
}
.knowledge-library-notice {
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid #e1cfaa;
  background: #fff8e9;
  color: #6f5729;
  font-size: 12px;
  line-height: 1.55;
}
.knowledge-library-list {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #d9dbde;
  background: #fff;
}
.knowledge-library-list > div:last-child {
  display: grid;
}
.knowledge-library-list article {
  padding: 15px 2px;
  border-top: 1px solid #e4e6e8;
}
.knowledge-library-list article:first-child {
  border-top: 0;
}
.knowledge-library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.knowledge-library-meta span {
  color: #5f6f61;
  font-size: 10px;
  font-weight: 800;
}
.knowledge-library-meta small {
  color: #898c91;
  font-size: 10px;
}
.knowledge-library-list h3 {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.45;
}
.knowledge-library-list h3 a {
  color: #2379b7;
}
.knowledge-library-list article > p {
  margin: 0;
  color: #55585e;
  font-size: 13px;
  line-height: 1.7;
}
.knowledge-library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}
.knowledge-library-footer span {
  color: #7a7d83;
  font-size: 10px;
}
.knowledge-library-footer a {
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .knowledge-library-header {
    padding: 21px 14px 18px;
    border-right: 0;
    border-left: 0;
  }
  .knowledge-library-list {
    padding: 15px 14px;
    border-right: 0;
    border-left: 0;
  }
  .knowledge-library-notice {
    margin-right: 14px;
    margin-left: 14px;
  }
  .knowledge-library-meta {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }
}

/* STEP 3-1: existing public menu wraps; Knowledge home rules stay scoped. */
.wiki-topbar > nav { flex-wrap: wrap; }
.wiki-topbar > nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.wiki-knowledge-home .wiki-home-intro h1 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.3; }
.wiki-knowledge-home .wiki-home-frame > .wiki-home-section { margin-top: 14px; }
.wiki-home-knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wiki-home-recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wiki-knowledge-home .wiki-home-knowledge-card { display: block; min-width: 0; padding: 16px; border: 1px solid var(--sd-line); border-radius: 6px; color: var(--sd-ink); background: var(--sd-paper-soft); }
.wiki-home-knowledge-card h3 { margin: 0 0 9px; color: var(--sd-olive-dark); font-size: 19px; line-height: 1.4; }
.wiki-home-knowledge-card p { margin: 0; color: var(--sd-muted); font-size: 14px; line-height: 1.65; }
.wiki-home-card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; color: var(--sd-rust); font-size: 12px; }
.wiki-knowledge-home .wiki-chronicle-list article { grid-template-columns: minmax(0, 1fr) auto; }
.wiki-knowledge-home .wiki-home-policy p { margin: 0; }
.wiki-knowledge-home a:focus-visible, .wiki-topbar a:focus-visible { outline: 2px solid var(--sd-olive); outline-offset: 3px; }
@media (max-width: 820px) {
  .wiki-topbar { grid-template-columns: minmax(0, 1fr); }
  .wiki-topbar > nav { grid-row: 2; justify-content: start; }
  .wiki-search-area { grid-row: 3; }
}
@media (max-width: 600px) {
  .wiki-home-knowledge-grid, .wiki-home-recent-grid { grid-template-columns: 1fr; }
  .wiki-knowledge-home .wiki-home-intro { padding: 16px 14px; }
  .wiki-knowledge-home .wiki-home-frame > .wiki-home-section { margin-top: 10px; }
}

/* STEP 3-2: static Knowledge topic navigation, public only. */
.knowledge-library-shell .knowledge-category-nav { margin: 15px 0 0; }
.knowledge-library-shell .knowledge-category-nav a:focus-visible { outline: 2px solid var(--sd-olive); outline-offset: 3px; }
.knowledge-library-shell .knowledge-library-list { scroll-margin-top: 18px; }
.knowledge-library-shell .knowledge-library-list > .wiki-section-heading { margin-bottom: 8px; }
/* Keep mobile Knowledge list action links legible beside long scope text. */
.knowledge-library-shell .knowledge-library-footer a { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 600px) {
  .knowledge-library-shell .knowledge-library-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* STEP 3-2 subject cues: restrained identity, not risk/status colors.
   Scoped to the published Knowledge shelf and its home topic shortcuts. */
.knowledge-library-shell [data-knowledge-category="household"],
.wiki-knowledge-home [data-knowledge-category="household"] {
  --knowledge-topic-accent: #385f34;
  --knowledge-topic-tint: #e0edda;
  --knowledge-topic-line: #aac79f;
}
.knowledge-library-shell [data-knowledge-category="information"],
.wiki-knowledge-home [data-knowledge-category="information"] {
  --knowledge-topic-accent: #2e6281;
  --knowledge-topic-tint: #dfeefa;
  --knowledge-topic-line: #a4c5d8;
}
.knowledge-library-shell [data-knowledge-category="evacuation"],
.wiki-knowledge-home [data-knowledge-category="evacuation"] {
  --knowledge-topic-accent: #8a581c;
  --knowledge-topic-tint: #f7e7cf;
  --knowledge-topic-line: #ddbe8e;
}
.knowledge-library-shell [data-knowledge-category="community"],
.wiki-knowledge-home [data-knowledge-category="community"] {
  --knowledge-topic-accent: #874940;
  --knowledge-topic-tint: #f4dfda;
  --knowledge-topic-line: #d7aba2;
}
.knowledge-library-shell [data-knowledge-category="other"],
.wiki-knowledge-home [data-knowledge-category="other"] {
  --knowledge-topic-accent: #626b77;
  --knowledge-topic-tint: #f0f2f5;
  --knowledge-topic-line: #d5dbe1;
}

/* Reuse the same color identity on home shortcuts and the static library. */
.knowledge-library-shell nav.knowledge-category-nav a[data-knowledge-category],
.wiki-knowledge-home nav[aria-label="주제별 생존 지식"] a[data-knowledge-category] {
  border: 1px solid var(--knowledge-topic-line);
  border-left: 4px solid var(--knowledge-topic-accent);
  color: var(--knowledge-topic-accent);
  background: var(--knowledge-topic-tint);
  text-decoration: none;
}
.knowledge-library-shell nav.knowledge-category-nav a[data-knowledge-category]:hover,
.wiki-knowledge-home nav[aria-label="주제별 생존 지식"] a[data-knowledge-category]:hover {
  background: #fff;
  border-color: var(--knowledge-topic-accent);
  color: var(--knowledge-topic-accent);
}
.knowledge-library-shell nav.knowledge-category-nav a[data-knowledge-category]:focus-visible,
.wiki-knowledge-home nav[aria-label="주제별 생존 지식"] a[data-knowledge-category]:focus-visible {
  outline: 2px solid var(--knowledge-topic-accent);
  outline-offset: 3px;
}
.knowledge-library-shell section.knowledge-library-list[data-knowledge-category] {
  border-top: 4px solid var(--knowledge-topic-accent);
  background: linear-gradient(180deg, var(--knowledge-topic-tint) 0, #fff 96px);
}
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] > .wiki-section-heading {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-bottom-color: var(--knowledge-topic-line);
  border-left: 4px solid var(--knowledge-topic-accent);
  border-radius: 3px;
  background: var(--knowledge-topic-tint);
}
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] > .wiki-section-heading h2,
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] > .wiki-section-heading span {
  color: var(--knowledge-topic-accent);
}
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] h3 a,
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] .knowledge-library-footer a {
  color: var(--knowledge-topic-accent);
}
.knowledge-library-shell .knowledge-library-list[data-knowledge-category] a:focus-visible {
  outline: 2px solid var(--knowledge-topic-accent);
  outline-offset: 3px;
}

/* Static Knowledge pages reuse WikiTopbar; search links to the interactive home search. */
.wiki-topbar .wiki-search-static {
  display: flex;
  align-items: center;
  min-height: 42px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--sd-line, #cfd2d5);
  border-radius: 6px;
  background: var(--sd-paper, #fff);
  color: var(--sd-ink-soft, #33353a);
  font-size: 14px;
  text-decoration: none;
}
.wiki-topbar .wiki-search-static:hover { background: #f3f4ef; }
.wiki-topbar .wiki-search-static:focus-visible { outline: 2px solid var(--sd-olive, #385f34); outline-offset: 2px; }
