@import url('https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@700&display=swap');

:root {
  --ink: #292a23;
  --ink-soft: #45463d;
  --muted: #747267;
  --paper: #f4f0e6;
  --paper-deep: #e9e2d2;
  --surface: #fffdf7;
  --surface-soft: #f8f4ea;
  --line: #d9d1c0;
  --line-dark: #bcb39f;
  --olive: #7d813f;
  --olive-dark: #555b2e;
  --olive-soft: #e6e6ce;
  --gold: #bd8738;
  --rust: #a45e38;
  --charcoal: #24251f;
  --success: #5f7f3c;
  --danger: #a34f45;
  --wrap: min(1180px, calc(100% - 40px));
  --radius: 14px;
  --shadow: 0 16px 36px rgba(55, 48, 35, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(92, 85, 67, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 85, 67, .025) 1px, transparent 1px);
  background-size: 34px 34px;
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  word-break: keep-all;
}
html, body { overflow-x: hidden; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.42), transparent 260px);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
.wrap { width: var(--wrap); margin: 0 auto; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(36, 37, 31, .97);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav { min-height: 74px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; color: #fffdf5; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #f5e9cf;
  border: 1px solid #d8c9aa;
  border-radius: 10px;
  transform: rotate(-2deg);
}
.brand-mark img { width: 29px; height: 29px; object-fit: contain; image-rendering: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { margin-bottom: 4px; color: #aaa999; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.brand-text strong { font-size: 18px; letter-spacing: -.04em; }
.nav-links { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.nav-links a { position: relative; display: flex; align-items: center; padding: 0 13px; color: #bdbdaf; font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: #fffdf5; }
.nav-links a.active { color: #fffdf5; }
.nav-links a.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; background: #c9ab63; }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-trigger {
  height: 38px;
  min-width: 174px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 11px;
  color: #bdbdaf;
  background: #30312a;
  border: 1px solid #484940;
  border-radius: 8px;
  cursor: pointer;
}
.search-trigger:hover { color: #fffdf5; border-color: #65665c; }
.search-trigger svg, .search-field svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-trigger span { flex: 1; text-align: left; font-size: 13px; }
.search-trigger kbd { padding: 2px 7px; color: #8e8e82; background: #24251f; border: 1px solid #505147; border-radius: 4px; font-size: 11px; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { width: 40px; height: 40px; display: grid; place-content: center; gap: 4px; list-style: none; cursor: pointer; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { width: 20px; height: 2px; background: #f4f0e6; }
.mobile-menu nav { position: absolute; top: 48px; right: 0; width: 210px; padding: 8px; background: var(--charcoal); border: 1px solid #484940; box-shadow: 0 18px 40px rgba(0,0,0,.24); }
.mobile-menu nav a { display: block; padding: 11px 12px; color: #e9e5dc; border-bottom: 1px solid #3b3c34; font-size: 14px; }
.mobile-menu nav a:last-child { border-bottom: 0; }

main.wrap { min-height: calc(100vh - 220px); padding: 42px 0 96px; }
section { margin-top: 74px; }
main > section:first-child { margin-top: 0; }
.kicker, .eyebrow { display: block; color: var(--olive-dark); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.section-heading h2, .section-head h2 { margin: 8px 0 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -.045em; }
.section-heading p { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.section-link { flex: 0 0 auto; color: var(--olive-dark); font-size: 14px; font-weight: 700; }
.section-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.as-button { padding: 0; background: none; border: 0; cursor: pointer; }

.btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fffdf7; background: var(--olive-dark); border-color: var(--olive-dark); }
.btn.primary:hover { background: #454a26; }
.btn.secondary, .btn.ghost { background: var(--surface); border-color: var(--line); }
.btn.text { padding-inline: 5px; color: var(--ink); background: transparent; }
.hero-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }

/* Home */
.home-hero {
  min-height: 555px;
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.home-hero > *, .hero-art-grid > *, .job-grid > *, .wiki-card-grid > * { min-width: 0; }
.mobile-break { display: none; }
.home-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 6vw, 72px); }
.home-hero-copy h1 { margin: 17px 0 20px; font-family: "Gowun Batang", Georgia, serif; font-size: clamp(42px, 5.5vw, 68px); line-height: 1.14; letter-spacing: -.055em; }
.home-hero-copy h1 em { color: var(--olive-dark); font-style: normal; }
.home-hero-copy .lead { max-width: 610px; margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.82; }
.server-address { max-width: 440px; display: flex; align-items: center; justify-content: space-between; margin: 31px 0 14px; padding: 12px 12px 12px 17px; background: var(--surface-soft); border: 1px solid var(--line); border-left: 4px solid var(--gold); }
.server-address div { display: flex; flex-direction: column; }
.server-address small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.server-address strong { margin-top: 3px; font-size: 20px; letter-spacing: .02em; }
.server-address button, .home-callout button { padding: 9px 13px; background: var(--charcoal); color: #fff; border: 0; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.client-note { max-width: 440px; margin: -3px 0 16px; color: var(--muted); font-size: 12px; }
.hero-art { position: relative; display: flex; flex-direction: column; padding: 26px; overflow: hidden; color: #f5f1e8; background: #303226; }
.hero-art::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(#e7e0c8 1px, transparent 1px), linear-gradient(90deg, #e7e0c8 1px, transparent 1px); background-size: 40px 40px; }
.hero-art > * { position: relative; z-index: 1; }
.hero-art-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #d6d2c5; font-size: 13px; }
.live-state { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.live-state i { width: 8px; height: 8px; background: #9a765a; border-radius: 50%; }
.live-state i.online { background: #91b662; box-shadow: 0 0 0 4px rgba(145,182,98,.13); }
.hero-art-grid { min-width: 0; flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.art-tile { min-height: 198px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.11); }
.art-tile img { width: 160px; height: 160px; margin-bottom: -4px; object-fit: contain; transition: transform .2s ease; }
.art-tile:hover img { transform: translateY(-5px); }
.art-tile strong { width: 100%; padding: 8px 6px 3px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.stone { --tone: #5e625b; } .water { --tone: #426c6b; } .field { --tone: #798049; } .ember { --tone: #8b573c; } .wood { --tone: #725b3b; } .smith { --tone: #7b5748; }
.art-tile.stone { background: #44463e; } .art-tile.water { background: #344f4d; } .art-tile.field { background: #565d34; } .art-tile.ember { background: #633f2d; }
.hero-art-note { display: flex; align-items: center; gap: 12px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; }
.hero-art-note span { padding: 5px 8px; color: #26271f; background: #cdb66f; font-weight: 800; }
.hero-art-note b { color: #ddd9cc; font-weight: 500; }

.fact-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 18px; background: var(--surface); border: 1px solid var(--line); }
.fact-strip div { display: flex; flex-direction: column; align-items: center; padding: 20px; border-right: 1px solid var(--line); }
.fact-strip div:last-child { border-right: 0; }
.fact-strip strong { font-family: Georgia, serif; font-size: 20px; }
.fact-strip span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.start-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line-dark); }
.start-card { min-height: 188px; display: grid; grid-template-columns: auto 1fr auto; gap: 17px; padding: 28px 24px; background: rgba(255,253,247,.6); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.start-card:first-child { border-left: 1px solid var(--line); }
.start-card:hover { background: var(--surface); }
.start-card > span { color: var(--gold); font-family: Georgia, serif; font-size: 15px; }
.start-card h3 { margin: 0 0 11px; font-size: 20px; letter-spacing: -.025em; }
.start-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.start-card > i { align-self: end; color: var(--olive-dark); font-style: normal; }
.job-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.job-card { min-height: 270px; display: grid; grid-template-columns: 205px 1fr; align-items: center; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.job-card::before { content: ""; position: absolute; }
.job-card img { width: 205px; height: 230px; padding: 18px; object-fit: contain; background: color-mix(in srgb, var(--tone) 14%, var(--surface-soft)); }
.job-card > div { padding: 27px; }
.job-card span { color: var(--tone); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.job-card h3 { margin: 8px 0 11px; font-size: 27px; letter-spacing: -.04em; }
.job-card p { min-height: 70px; margin: 0 0 17px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.job-card b { color: var(--olive-dark); font-size: 12px; }
.job-card:hover { border-color: var(--line-dark); box-shadow: var(--shadow); }
.wiki-card-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.wiki-card { min-height: 225px; display: flex; flex-direction: column; padding: 25px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--olive); }
.wiki-card > span { color: var(--olive-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.wiki-card h3 { margin: 17px 0 10px; font-size: 20px; }
.wiki-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.wiki-card b { margin-top: auto; font-size: 12px; }
.wiki-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.home-callout { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px 44px; color: #f6f1e7; background: var(--charcoal); }
.home-callout h2 { margin: 7px 0; font-family: "Gowun Batang", Georgia, serif; font-size: 32px; }
.home-callout p { margin: 0; color: #aaa99c; }
.home-callout .kicker { color: #c6ad6d; }
.home-callout > div:last-child { display: flex; align-items: center; gap: 9px; padding: 9px; background: #30312a; border: 1px solid #494a41; }
.home-callout code { min-width: 170px; padding-left: 10px; font-size: 18px; }
.home-callout button { color: var(--charcoal); background: #d0b66e; }

/* Index pages */
.index-hero { min-height: 390px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; padding: clamp(35px, 6vw, 70px); background: var(--surface); border: 1px solid var(--line); }
.index-hero h1, .map-hero h1 { margin: 15px 0 20px; font-family: "Gowun Batang", Georgia, serif; font-size: clamp(40px, 5vw, 62px); line-height: 1.2; letter-spacing: -.055em; }
.index-hero > div:first-child > p, .map-hero > div:first-child > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.index-hero-side { justify-self: end; width: 300px; display: flex; flex-direction: column; align-items: center; padding: 25px; background: #eeeadc; border: 1px solid var(--line); }
.index-hero-side img { width: 190px; height: 190px; object-fit: contain; }
.index-hero-side span { display: flex; flex-direction: column; align-items: center; margin-top: 7px; color: var(--muted); font-size: 12px; }
.index-hero-side b { margin-bottom: 4px; color: var(--ink); }
.guide-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guide-list-card { min-height: 155px; display: grid; grid-template-columns: 42px 1fr auto; align-items: start; gap: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.guide-list-card:hover { border-color: var(--olive); }
.guide-no { color: var(--gold); font-family: Georgia, serif; font-size: 14px; }
.guide-list-card small { color: var(--olive-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.guide-list-card h3 { margin: 7px 0 8px; font-size: 20px; }
.guide-list-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.guide-list-card > b { align-self: end; color: var(--olive-dark); }
.tip-banner { display: flex; align-items: center; gap: 18px; padding: 20px 24px; background: var(--olive-soft); border: 1px solid #cecfad; }
.tip-banner > b { color: var(--olive-dark); }
.tip-banner > a { margin-left: auto; font-size: 13px; font-weight: 700; }
kbd { padding: 3px 7px; background: var(--surface); border: 1px solid var(--line-dark); border-bottom-width: 2px; border-radius: 4px; font-family: inherit; font-size: .82em; }

.life-index-hero { background: #f7f2e7; }
.life-index-hero .hero-actions { margin-top: 25px; }
.stat-art-stack { justify-self: end; width: min(100%, 420px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-art-stack > div { min-height: 155px; display: flex; flex-direction: column; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); }
.stat-art-stack img { width: 105px; height: 105px; object-fit: contain; }
.stat-art-stack span { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 10px; }
.stat-art-stack b { color: var(--ink); font-size: 13px; }
.life-job-list { border-top: 1px solid var(--line-dark); }
.life-job-row { display: grid; grid-template-columns: 50px 160px 1fr auto; align-items: center; min-height: 190px; padding: 16px 25px; background: rgba(255,253,247,.72); border: 1px solid var(--line); border-top: 0; }
.life-job-row:hover { background: var(--surface); }
.life-job-index { color: var(--gold); font-family: Georgia, serif; }
.life-job-row img { width: 145px; height: 145px; padding: 7px; object-fit: contain; }
.life-job-row > div { padding: 15px 30px; border-left: 1px solid var(--line); }
.life-job-row small { color: var(--tone); font-weight: 800; letter-spacing: .13em; }
.life-job-row h3 { display: inline-block; margin: 0 14px 7px 8px; font-size: 27px; }
.life-job-row p { margin: 0 0 10px; color: var(--muted); line-height: 1.65; }
.life-job-row > div > span { color: var(--tone); font-size: 12px; font-weight: 700; }
.life-job-row > b { color: var(--olive-dark); font-size: 12px; }
.life-resource-grid, .map-help-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 26px; }
.life-resource-grid a, .map-help-grid a { min-height: 215px; display: flex; flex-direction: column; padding: 25px; background: var(--surface); border: 1px solid var(--line); }
.life-resource-grid span, .map-help-grid span { color: var(--olive-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.life-resource-grid h3, .map-help-grid h3 { margin: 16px 0 10px; font-size: 20px; }
.life-resource-grid p, .map-help-grid p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.life-resource-grid b, .map-help-grid b { margin-top: auto; font-size: 12px; }

/* World */
.map-hero { min-height: 430px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; padding: clamp(35px, 6vw, 70px); color: #f3eee2; background: var(--charcoal); }
.map-hero .kicker { color: #c4aa6b; }
.map-hero > div:first-child > p { color: #b8b5aa; }
.key-guide { width: max-content; display: flex; align-items: center; gap: 9px; margin-top: 28px; padding: 10px 12px; color: #d9d4c8; background: #30312a; border: 1px solid #4a4b42; font-size: 12px; }
.key-guide kbd { color: #292a23; background: #e8e1d2; border-color: #aaa38f; }
.key-guide b { margin-left: 6px; }
.world-orbit { position: relative; justify-self: center; width: 340px; height: 340px; border: 1px solid #535449; border-radius: 50%; }
.world-orbit::before, .world-orbit::after { content: ""; position: absolute; inset: 48px; border: 1px solid #45463d; border-radius: 50%; }
.world-orbit::after { inset: 102px; }
.orbit-center { position: absolute; inset: 50%; width: 82px; height: 82px; display: grid; place-items: center; transform: translate(-50%,-50%); color: #292a23; background: #d0b76f; border-radius: 50%; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.orbit-dot { position: absolute; width: 18px; height: 18px; background: #8b8f53; border: 4px solid #34352d; border-radius: 50%; }
.dot-1 { top: 31px; left: 154px; } .dot-2 { right: 35px; top: 153px; background: #607978; } .dot-3 { left: 154px; bottom: 31px; background: #9d5538; } .dot-4 { left: 35px; top: 153px; background: #746077; }
.world-orbit em { position: absolute; color: #9e9e91; font-size: 11px; font-style: normal; }
.world-orbit em:nth-of-type(1) { top: 65px; right: 67px; } .world-orbit em:nth-of-type(2) { right: 66px; bottom: 66px; } .world-orbit em:nth-of-type(3) { left: 67px; bottom: 66px; } .world-orbit em:nth-of-type(4) { left: 66px; top: 66px; }
.world-card-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 12px; }
.world-card { grid-column: span 2; min-height: 310px; display: flex; flex-direction: column; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--tone); }
.world-card:nth-child(4), .world-card:nth-child(5) { grid-column: span 3; }
.world-card.spawn { --tone: #b38c3e; } .world-card.village { --tone: #778044; } .world-card.wild { --tone: #597054; } .world-card.nether { --tone: #9b4f38; } .world-card.end { --tone: #6c5973; }
.world-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.world-card-top b { padding: 4px 7px; color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, white); }
.world-symbol { height: 62px; display: flex; align-items: end; gap: 5px; margin: 18px 0; }
.world-symbol i { width: 22px; height: 22px; background: color-mix(in srgb, var(--tone) 75%, white); transform: rotate(45deg); }
.world-symbol i:nth-child(2) { width: 34px; height: 34px; }
.world-symbol i:nth-child(3) { width: 14px; height: 14px; }
.world-card small { color: var(--tone); font-weight: 800; }
.world-card h3 { margin: 6px 0 10px; font-size: 24px; }
.world-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.72; }
.travel-panel { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: center; padding: 38px; background: var(--olive-soft); border: 1px solid #cfd0ad; }
.travel-panel h2 { margin: 8px 0 13px; font-size: 28px; }
.travel-panel h2 code { color: var(--olive-dark); }
.travel-panel p { margin: 0; color: #656550; line-height: 1.7; }
.cooldown-table { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #bdbf94; }
.cooldown-table div { display: flex; flex-direction: column; align-items: center; padding: 20px; background: rgba(255,255,255,.35); border-right: 1px solid #bdbf94; }
.cooldown-table div:last-child { border-right: 0; }
.cooldown-table span { color: #6c6e4f; font-size: 12px; }
.cooldown-table strong { margin-top: 4px; font-family: Georgia, serif; font-size: 24px; }
.map-help-grid { grid-template-columns: 1fr 1fr; }

/* Document layout */
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.doc-sidebar { position: sticky; top: 98px; padding: 18px 0; }
.sidebar-home { display: flex; flex-direction: column; padding: 0 12px 17px; border-bottom: 1px solid var(--line); }
.sidebar-home span, .sidebar-toc > span { color: var(--olive-dark); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.sidebar-home strong { margin-top: 4px; font-size: 18px; }
.sidebar-nav { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sidebar-nav a { display: block; margin: 2px 0; padding: 9px 12px; color: var(--muted); border-left: 2px solid transparent; font-size: 13px; }
.sidebar-nav a:hover { color: var(--ink); background: rgba(255,255,255,.35); }
.sidebar-nav a.active { color: var(--olive-dark); background: var(--olive-soft); border-left-color: var(--olive); font-weight: 700; }
.sidebar-toc { padding: 18px 12px 0; }
.sidebar-toc nav { margin-top: 10px; }
.sidebar-toc a { display: block; padding: 5px 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.sidebar-toc a:hover { color: var(--olive-dark); }
.sidebar-toc a.depth-3 { padding-left: 12px; }
.doc-shell { min-width: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.doc-hero { min-height: 245px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(30px, 5vw, 54px); background: #ece6d7; border-bottom: 1px solid var(--line); overflow: hidden; }
.doc-hero-copy { min-width: 0; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 25px; color: var(--muted); font-size: 11px; }
.breadcrumbs a:hover { color: var(--olive-dark); }
.doc-hero h1 { margin: 10px 0 13px; font-family: "Gowun Batang", Georgia, serif; font-size: clamp(38px, 5vw, 58px); line-height: 1.15; letter-spacing: -.05em; }
.doc-summary { max-width: 650px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.doc-cover-image { width: 190px; height: 190px; flex: 0 0 auto; object-fit: contain; }
.doc-body { max-width: 800px; padding: clamp(35px, 5vw, 62px); }
.doc-body h2 { margin: 54px 0 17px; padding-bottom: 11px; border-bottom: 1px solid var(--line); font-size: 27px; line-height: 1.3; letter-spacing: -.035em; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin: 34px 0 12px; color: var(--olive-dark); font-size: 20px; letter-spacing: -.02em; }
.doc-body p, .doc-body li { color: var(--ink-soft); font-size: 15px; line-height: 1.86; }
.doc-body p { margin: 0 0 16px; }
.doc-body ul, .doc-body ol { margin: 12px 0 23px; padding-left: 22px; }
.doc-body li { margin: 5px 0; }
.doc-body strong { color: var(--ink); }
.doc-body a { color: var(--olive-dark); font-weight: 700; text-decoration: underline; text-decoration-color: #b8ba91; text-underline-offset: 3px; }
.doc-body code, .doc-body pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.doc-body code { padding: .15em .4em; color: #6d4c2b; background: #eee6d5; border: 1px solid #ddd1ba; border-radius: 4px; font-size: .88em; }
.doc-body pre { overflow: auto; margin: 22px 0; padding: 18px; color: #f0ecdf; background: var(--charcoal); border-radius: 6px; line-height: 1.7; }
.doc-body pre code { padding: 0; color: inherit; background: none; border: 0; }
.doc-body table { width: 100%; margin: 21px 0 29px; border-collapse: collapse; font-size: 13px; }
.doc-body th { padding: 12px 13px; color: #f8f5eb; background: #525445; border: 1px solid #666856; text-align: left; }
.doc-body td { padding: 12px 13px; color: var(--ink-soft); background: #fffef9; border: 1px solid var(--line); line-height: 1.65; }
.doc-body tr:nth-child(even) td { background: #f7f3e9; }
.doc-body blockquote { margin: 22px 0; padding: 17px 20px; background: var(--olive-soft); border-left: 4px solid var(--olive); }
.doc-body blockquote p { margin: 0; color: #55583d; }
.doc-body input[type="checkbox"] { accent-color: var(--olive-dark); }
.doc-end { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 clamp(35px, 5vw, 62px); padding: 22px 0 30px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.doc-end a { color: var(--olive-dark); font-weight: 700; }

/* Search */
.search-dialog { width: min(700px, calc(100% - 28px)); max-height: min(720px, calc(100vh - 40px)); padding: 0; background: var(--surface); border: 1px solid var(--line-dark); box-shadow: 0 30px 90px rgba(28,27,22,.3); }
.search-dialog::backdrop { background: rgba(25,26,22,.66); backdrop-filter: blur(3px); }
.search-panel { padding: 18px; }
.search-field { height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 12px; background: var(--surface-soft); border: 1px solid var(--line-dark); }
.search-field svg { flex: 0 0 auto; color: var(--muted); }
.search-field input { min-width: 0; flex: 1; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 16px; }
.search-field button { padding: 5px 7px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); font-size: 10px; cursor: pointer; }
.search-hint { margin: 13px 3px; color: var(--muted); font-size: 11px; }
.search-results { max-height: 520px; overflow: auto; border-top: 1px solid var(--line); }
.search-results > a { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 20px; padding: 15px 10px; border-bottom: 1px solid var(--line); }
.search-results > a:hover { background: var(--olive-soft); }
.search-results > a span { display: flex; flex-direction: column; }
.search-results small { margin-bottom: 3px; color: var(--olive-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.search-results strong { font-size: 14px; }
.search-results p { margin: 0; color: var(--muted); font-size: 12px; }
.search-empty { padding: 40px 15px; color: var(--muted); text-align: center; }

/* Footer */
.footer { color: #c4c2b8; background: var(--charcoal); border-top: 1px solid #36372f; }
.footer-inner { min-height: 145px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-brand img { width: 36px; height: 36px; padding: 4px; object-fit: contain; background: #f0e7d2; border-radius: 8px; }
.footer-brand strong { color: #f4f0e7; }
.footer-brand p { margin: 4px 0 0; color: #8e8e83; font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; font-size: 12px; }
.footer-links a:hover { color: #fff; }

/* Existing generic and admin surfaces */
.hero, .section-surface, .doc-hub, .admin-shell, .card { background: var(--surface); border: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1px; }
.hero-card { padding: 38px; }
.hero-card + .hero-card { border-left: 1px solid var(--line); }
.hero h1 { margin: 12px 0; font-family: "Gowun Batang", Georgia, serif; font-size: 52px; }
.hero .lead { color: var(--muted); line-height: 1.8; }
.feature-grid, .quick-grid, .timeline-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.feature-card, .doc-tile, .timeline-card { min-height: 170px; padding: 23px; background: var(--surface); border: 1px solid var(--line); }
.feature-card h3, .doc-tile h3 { margin: 13px 0 9px; }
.feature-card p, .doc-tile p, .timeline-card p { color: var(--muted); line-height: 1.65; }
.tag, .pill { display: inline-flex; padding: 4px 7px; color: var(--olive-dark); background: var(--olive-soft); font-size: 10px; font-weight: 800; }
.pill-list { display: flex; flex-wrap: wrap; gap: 7px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 22px; }
.section-head p { color: var(--muted); }
.admin-shell { padding: 30px; }
.login-box { max-width: 460px; margin: 20px auto; padding: 28px; background: var(--surface-soft); border: 1px solid var(--line); }
.field { margin: 15px 0; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-dark); outline: 0; }
.field textarea { min-height: 420px; resize: vertical; font-family: ui-monospace, Consolas, monospace; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--olive); }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.admin-sidebar, .admin-main { padding: 20px; background: var(--surface-soft); border: 1px solid var(--line); }
.admin-topbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.admin-list { display: grid; gap: 6px; }
.admin-item { width: 100%; padding: 11px; background: var(--surface); border: 1px solid var(--line); text-align: left; cursor: pointer; }
.admin-item.active { background: var(--olive-soft); border-color: var(--olive); }
.alert, .doc-error, .doc-loading { margin-top: 16px; padding: 14px; background: #eee7d8; border: 1px solid var(--line); }
.alert.err, .doc-error { color: var(--danger); background: #f5e5e1; border-color: #dfbbb4; }
.alert.ok { color: var(--success); background: #e8efdd; border-color: #bdcda7; }

@media (max-width: 1050px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .home-hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 520px; }
  .job-card { grid-template-columns: 165px 1fr; }
  .job-card img { width: 165px; }
  .wiki-card-grid { grid-template-columns: repeat(2,1fr); }
  .index-hero, .map-hero { grid-template-columns: 1fr 360px; }
  .doc-layout { grid-template-columns: 200px minmax(0,1fr); gap: 18px; }
}

@media (max-width: 820px) {
  :root { --wrap: min(100% - 28px, 720px); }
  main.wrap { padding-top: 28px; }
  section { margin-top: 55px; }
  .search-trigger { min-width: auto; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact-strip div:nth-child(2) { border-right: 0; }
  .fact-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .start-grid, .job-grid, .guide-list-grid { grid-template-columns: 1fr; }
  .start-card { border-left: 1px solid var(--line); }
  .index-hero, .map-hero { grid-template-columns: 1fr; gap: 35px; }
  .index-hero-side, .stat-art-stack { justify-self: stretch; width: 100%; }
  .world-orbit { width: 300px; height: 300px; }
  .world-card-grid { grid-template-columns: 1fr 1fr; }
  .world-card, .world-card:nth-child(4), .world-card:nth-child(5) { grid-column: auto; }
  .world-card:last-child { grid-column: 1 / -1; }
  .travel-panel { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { position: static; display: none; }
  .life-job-row { grid-template-columns: 35px 125px 1fr; }
  .life-job-row img { width: 120px; height: 120px; }
  .life-job-row > div { padding: 12px 20px; }
  .life-job-row > b { display: none; }
  .life-resource-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 28px 0; }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 590px) {
  :root { --wrap: calc(100% - 20px); }
  body { word-break: normal; overflow-wrap: anywhere; }
  main.wrap { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .nav { position: relative; width: calc(100vw - 20px); max-width: calc(100vw - 20px); min-height: 66px; gap: 12px; }
  .nav-actions { position: absolute; right: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 16px; }
  .home-hero { display: block; max-width: calc(100vw - 20px); overflow: hidden; }
  .home-hero-copy, .hero-art, .hero-art-grid, .art-tile { max-width: 100%; min-width: 0; }
  .home-hero-copy { padding: 34px 24px; }
  .home-hero-copy h1 { max-width: 100%; font-size: 36px; word-break: keep-all; overflow-wrap: anywhere; }
  .mobile-break { display: inline; }
  .home-hero-copy .lead { font-size: 15px; }
  .server-address { width: 100%; min-width: 0; align-items: stretch; }
  .server-address > div { min-width: 0; }
  .server-address button { flex: 0 0 auto; }
  .hero-art { min-height: 480px; padding: 16px; }
  .hero-art-heading > span:first-child { display: none; }
  .hero-art-heading { justify-content: flex-end; }
  .art-tile { min-height: 165px; }
  .art-tile img { width: 125px; height: 125px; }
  .fact-strip strong { font-size: 17px; }
  .fact-strip div { padding: 15px 8px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-heading h2 { font-size: 31px; }
  .start-card { min-height: 165px; padding: 22px 18px; }
  .job-card { grid-template-columns: 120px 1fr; min-height: 235px; }
  .job-card img { width: 120px; height: 100%; padding: 8px; }
  .job-card > div { padding: 18px 15px; }
  .job-card h3 { font-size: 22px; }
  .job-card p { min-height: auto; font-size: 12px; }
  .wiki-card-grid, .world-card-grid, .map-help-grid { grid-template-columns: 1fr; }
  .world-card:last-child { grid-column: auto; }
  .home-callout { align-items: stretch; flex-direction: column; padding: 30px 24px; }
  .home-callout > div:last-child { justify-content: space-between; }
  .home-callout code { min-width: auto; }
  .index-hero, .map-hero { padding: 34px 24px; }
  .index-hero h1, .map-hero h1 { font-size: 38px; }
  .index-hero-side img { width: 150px; height: 150px; }
  .stat-art-stack { grid-template-columns: 1fr 1fr; }
  .stat-art-stack img { width: 85px; height: 85px; }
  .guide-list-card { grid-template-columns: 30px 1fr auto; padding: 19px 15px; }
  .tip-banner { align-items: flex-start; flex-wrap: wrap; }
  .tip-banner > a { width: 100%; margin-left: 0; }
  .life-job-row { grid-template-columns: 30px 90px 1fr; padding: 12px; }
  .life-job-row img { width: 88px; height: 100px; }
  .life-job-row > div { padding: 7px 0 7px 12px; }
  .life-job-row h3 { display: block; margin: 4px 0; font-size: 21px; }
  .life-job-row p { font-size: 12px; }
  .life-job-row > div > span { font-size: 10px; }
  .world-orbit { width: 250px; height: 250px; transform: scale(.95); }
  .world-orbit::before { inset: 36px; }
  .world-orbit::after { inset: 78px; }
  .dot-1 { top: 22px; left: 116px; } .dot-2 { right: 24px; top: 116px; } .dot-3 { left: 116px; bottom: 22px; } .dot-4 { left: 24px; top: 116px; }
  .world-orbit em:nth-of-type(1) { top: 45px; right: 47px; } .world-orbit em:nth-of-type(2) { right: 46px; bottom: 47px; } .world-orbit em:nth-of-type(3) { left: 48px; bottom: 47px; } .world-orbit em:nth-of-type(4) { left: 47px; top: 45px; }
  .travel-panel { padding: 26px 20px; }
  .doc-hero { min-height: 230px; padding: 28px 22px; }
  .doc-hero h1 { font-size: 38px; }
  .doc-cover-image { width: 105px; height: 105px; margin-right: -12px; }
  .doc-body { padding: 32px 21px; }
  .doc-body h2 { font-size: 23px; }
  .doc-body table { display: block; overflow-x: auto; white-space: nowrap; }
  .doc-end { align-items: flex-start; flex-direction: column; margin: 0 21px; }
  .search-results > a { grid-template-columns: 1fr; gap: 5px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; gap: 15px; }
  .feature-grid, .quick-grid, .timeline-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
