/* AmpleWorld 홈페이지. 게임 일러스트(밤의 마을, 등불)에 맞춘 어두운 남색 + 호박색 강조. */
:root {
  --bg: #0e1120;
  --bgDeep: #090b16;
  --panel: #171b2e;
  --panelHi: #1f2440;
  --line: #2c3354;
  --lineHi: #444d7a;
  --text: #ece6d6;
  --muted: #9a9fb8;
  --gold: #f2b65a;
  --goldHi: #ffd98a;
  --red: #e0604f;
  --green: #7cc36a;
  --silver: #c9d1e6;
  --bronze: #d08a52;
  --pixelFont: "Galmuri11", "Galmuri9", monospace;
  --bodyFont: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  --shadow: 4px 4px 0 0 var(--bgDeep);
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--bodyFont);
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: var(--goldHi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .eyebrow, .tag, .button, .tabs a, .chip, .rankNo, .stageNo, .level { font-family: var(--pixelFont); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
img.pixel, .pixel img { image-rendering: pixelated; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.input:focus-visible { outline: none; }
.backLink { display: inline-block; margin: 0 0 12px; font-size: .9rem; color: var(--muted); }
.backLink:hover { color: var(--gold); text-decoration: none; }

.sprite { position: relative; display: inline-block; flex-shrink: 0; vertical-align: middle; }
.sprite img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.sprite.animated img { visibility: hidden; animation: spriteFrame .88s step-end infinite; }
.sprite.animated img:nth-child(1) { animation-delay: -.88s; }
.sprite.animated img:nth-child(2) { animation-delay: -.66s; }
.sprite.animated img:nth-child(3) { animation-delay: -.44s; }
.sprite.animated img:nth-child(4) { animation-delay: -.22s; }
@keyframes spriteFrame { 0% { visibility: visible; } 25% { visibility: hidden; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

.container { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }
.page { padding-top: 40px; padding-bottom: 64px; }
.narrow { width: min(860px, 100%); }

/* ---------- 헤더 ---------- */
.siteHeader {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9, 11, 22, .92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}
.headerInner { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; }
.brandLogo { display: block; height: auto; }
.siteNav { display: flex; gap: 4px; margin-left: auto; }
.siteNav a { color: var(--muted); padding: 8px 12px; border-radius: var(--radius); font-weight: 600; }
.siteNav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.siteNav a.active { color: var(--bgDeep); background: var(--gold); }
.siteNav .adminBadge { border: 1px dashed var(--gold); color: var(--gold); }
.siteNav .downloadLink { color: var(--gold); border: 1px solid var(--gold); }
.navToggle { display: none; margin-left: auto; background: none; border: 2px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; }
.navToggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; }

@media (max-width: 960px) {
  .navToggle { display: block; }
  .siteNav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; padding: 8px 16px 16px; background: var(--bgDeep); border-bottom: 2px solid var(--line);
  }
  .navOpen .siteNav { display: flex; }
  .siteNav a { padding: 12px; }
}

/* ---------- 공용 요소 ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: 2px solid var(--lineHi); border-radius: var(--radius);
  background: var(--panelHi); color: var(--text); font-size: .95rem; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s;
}
.button:hover { text-decoration: none; border-color: var(--gold); }
.button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--bgDeep); }
.button:disabled { opacity: .5; cursor: progress; }
.button.primary { background: var(--gold); border-color: var(--goldHi); color: var(--bgDeep); }
.button.danger { border-color: var(--red); color: var(--red); }

.input {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bgDeep); border: 2px solid var(--line); border-radius: var(--radius);
}
.input:focus { outline: none; border-color: var(--gold); }
select.input { width: auto; }

.panel {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.panelHead, .sectionHead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panelHead h2, .sectionHead h2 { margin: 0; }
.more { font-size: .85rem; color: var(--muted); }

.eyebrow { color: var(--gold); font-size: .8125rem; letter-spacing: .2em; margin: 0 0 6px; }
.pageHead { margin-bottom: 28px; }
.pageHead h1 { font-size: 2rem; margin-bottom: 8px; }
.pageHead.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pageHead.row > .button { flex-shrink: 0; white-space: nowrap; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section { margin-top: 48px; }

.tag {
  display: inline-block; padding: 2px 8px; font-size: .8125rem; border-radius: 2px;
  background: var(--bgDeep); color: var(--gold); border: 1px solid var(--line);
}
.tag.boss { background: var(--red); color: #fff; border-color: var(--red); }

.stateBox { padding: 48px 16px; text-align: center; color: var(--muted); }
.stateBox.error { color: var(--red); }
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table thead th { color: var(--muted); font-weight: 600; font-size: .85rem; border-bottom: 2px solid var(--line); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: .85rem;
}
.chip:hover { color: var(--text); border-color: var(--lineHi); }
.chip.active { background: var(--gold); color: var(--bgDeep); border-color: var(--gold); }

.tabs { display: flex; gap: 4px; box-shadow: inset 0 -2px var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 18px; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--gold); background: var(--panel); box-shadow: inset 0 -3px var(--gold); border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- 홈 ---------- */
.hero {
  position: relative; min-height: min(78vh, 680px); display: flex; flex-direction: column; justify-content: center;
  background-size: cover; background-position: center 35%;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,17,32,.15) 0%, rgba(14,17,32,.35) 45%, var(--bg) 100%),
              linear-gradient(90deg, rgba(9,11,22,.8) 0%, rgba(9,11,22,.1) 60%);
}
.heroInner { position: relative; width: min(1180px, 100%); margin: 0 auto; padding: 48px 16px 24px; }
.heroTitle { margin: 0; line-height: 0; }
.heroTitle img { width: clamp(240px, 40vw, 440px); height: auto; filter: drop-shadow(4px 4px 0 var(--bgDeep)); }
.heroActions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.heroParty {
  position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(4px, 2vw, 28px);
  padding: 8px 16px 0; margin-top: auto;
}

.homeGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 960px) { .homeGrid { grid-template-columns: 1fr; } }
.postMini, .rankMini { list-style: none; padding: 0; margin: 0; }
.postMini li { display: flex; gap: 12px; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.postMini li:last-child { border-bottom: none; }
.postMini a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postMini time { color: var(--muted); font-size: .8125rem; flex-shrink: 0; }
.rankMini li a { display: flex; align-items: center; gap: 10px; padding: 4px; color: var(--text); border-radius: var(--radius); }
.rankMini li a:hover { background: var(--panelHi); text-decoration: none; }
.rankMini .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankMini .lv { color: var(--gold); font-family: var(--pixelFont); }

.rankNo {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 2px;
  background: var(--bgDeep); border: 1px solid var(--line); font-size: .85rem;
}
.rankNo.r1 { background: var(--gold); color: var(--bgDeep); border-color: var(--goldHi); }
.rankNo.r2 { background: var(--silver); color: var(--bgDeep); border-color: #fff; }
.rankNo.r3 { background: var(--bronze); color: var(--bgDeep); border-color: #f0b083; }

.raidStrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.raidChip {
  display: flex; flex-direction: column; gap: 2px; padding: 0 0 12px; color: var(--text);
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.raidChip:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.raidChip > strong, .raidChip > span { padding: 0 12px; }
.raidChip strong { margin-top: 8px; font-family: var(--pixelFont); }
.raidChip > span { color: var(--muted); font-size: .85rem; }
.tileBand { height: 56px; background-size: auto 100%; background-repeat: repeat-x; image-rendering: pixelated; border-bottom: 2px solid var(--line); }

/* ---------- 다운로드 ---------- */
.downloadPanel { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; padding: 32px 20px; }
.downloadLogo { width: 165px; height: auto; }
.button.big { font-size: 1.1rem; padding: 14px 28px; }
.fileInfo { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 0; font-size: .9rem; }
.fileInfo dt { color: var(--muted); font-size: .8125rem; }
.fileInfo dd { margin: 0; font-family: var(--pixelFont); }
.fileInfo .hash { width: 100%; }
.fileInfo code, .tipList code { font-family: Consolas, monospace; font-size: .8125rem; overflow-wrap: anywhere; color: var(--muted); }
.tipList { padding-left: 1.2em; margin: 0; color: var(--muted); }
.tipList li { margin-bottom: 8px; }
.tipList b { color: var(--text); }
.tipList .command {
  display: block; margin-top: 6px; padding: 8px 12px; white-space: nowrap; overflow-x: auto; overflow-wrap: normal;
  background: var(--bgDeep); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}

/* ---------- 게임소개 ---------- */
.banner {
  position: relative; min-height: 260px; display: flex; align-items: flex-end; padding: 28px;
  border: 2px solid var(--line); border-radius: var(--radius); background-size: cover; background-position: center; overflow: hidden;
  box-shadow: var(--shadow);
}
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,11,22,.92), rgba(9,11,22,.1) 70%); }
.banner > div { position: relative; max-width: 36em; }
.banner p { margin: 0; color: var(--text); }

.loop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 860px) { .loop { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .loop { grid-template-columns: 1fr; } }
.loopStep { position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; }
.loopStep strong { display: block; font-family: var(--pixelFont); font-size: 1.1rem; margin: 8px 0 4px; }
.loopStep p { margin: 0; color: var(--muted); font-size: .92rem; }
.stepNo { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--gold); color: var(--bgDeep); font-family: var(--pixelFont); border-radius: 2px; }

.raceGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.raceCard { display: block; text-align: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; }
.raceCard .sprite { background: radial-gradient(circle, var(--panelHi) 0 55%, transparent 56%); }
.raceCard p { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.raceCard h3 { margin: 6px 0 4px; }
.raceCard .tag { display: table; margin: 8px auto 0; }
.raceStats { display: grid; gap: 4px; margin: 0; font-size: .8125rem; text-align: left; }
.raceStats div { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: center; }
.raceStats dt { color: var(--gold); font-family: var(--pixelFont); }
.raceStats dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.raceStats .bar { flex: 1; height: 8px; background: var(--bgDeep); border: 1px solid var(--line); }
.raceStats .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--goldHi)); }
.raceRow .raceStats { max-width: 220px; margin-top: 8px; }

.twoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .twoCol { grid-template-columns: 1fr; } }
.statList { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; }
.statList dt { font-family: var(--pixelFont); color: var(--gold); }
.statList dd { margin: 0; }
.starterList { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.starterList li { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.starterList p { margin: 0; color: var(--muted); font-size: .9rem; }
.starterList .icons { display: flex; justify-content: center; flex-shrink: 0; width: 92px; }
.featureGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.featureGrid article { background: var(--panel); border: 2px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 18px; }
.featureGrid p { margin: 0; color: var(--muted); font-size: .92rem; }
.controls th { width: 140px; color: var(--gold); font-family: var(--pixelFont); font-weight: 400; }

/* ---------- 도감 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.toolbar input[type="search"] { flex: 1 1 220px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cardGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cardGrid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); color: var(--text);
  box-shadow: var(--shadow);
}
.monsterCard {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; font: inherit; cursor: pointer; text-align: center;
}
.monsterCard { position: relative; color: var(--text); }
a.card:hover, a.raceCard:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
a.card, a.raceCard { color: var(--text); transition: transform .1s, border-color .1s; }
.monsterCard.boss { border-color: var(--red); background: linear-gradient(180deg, rgba(224,96,79,.18), var(--panel) 60%); }
.monsterCard .level { font-size: .8125rem; color: var(--gold); }
.monsterCard .miniStats { font-size: .8125rem; color: var(--muted); }
.monsterSprite { position: relative; display: inline-block; flex-shrink: 0; }
.monsterSprite img, .monsterSprite .tint { position: absolute; inset: 0; width: 100%; height: 100%; }
.monsterSprite .tint {
  mix-blend-mode: multiply; mask-size: 100% 100%; -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
}

.itemCard { padding: 16px; display: flex; flex-direction: column; }
.itemHead { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.itemHead h3 { margin: 4px 0 0; }
.itemIcon { background: var(--bgDeep); border: 1px solid var(--line); border-radius: 2px; padding: 4px; box-sizing: content-box; }
.itemCard .desc { color: var(--muted); font-size: .9rem; }
.itemStats { list-style: none; padding: 0; margin: 0 0 12px; font-size: .9rem; }
.itemStats li::before { content: "▸ "; color: var(--gold); }
.itemFoot { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8125rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.itemFoot span:first-child { color: var(--goldHi); }

.raidGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .raidGrid { grid-template-columns: 1fr; } }
.raidCard { overflow: hidden; scroll-margin-top: 80px; }
.raidCard.highlight { border-color: var(--gold); }
.raidBody { padding: 16px; }
.raidTitle { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.raidTitle h3 { margin: 0; }
.stageList { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: .88rem; }
.stageList li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.stageNo { text-align: center; background: var(--bgDeep); border: 1px solid var(--line); border-radius: 2px; font-size: .8125rem; padding: 2px 0; }
.stageList li:last-child .stageNo { background: var(--red); border-color: var(--red); color: #fff; }
.bossLine { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--bgDeep); border: 1px solid var(--red); border-radius: var(--radius); color: var(--text); font-size: .9rem; }

.raceList { display: grid; gap: 16px; }
.raceRow { padding: 18px; display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; }
@media (max-width: 720px) { .raceRow { grid-template-columns: 1fr; } }
.directions { display: flex; flex-wrap: wrap; gap: 4px; }
.directions .sprite { background: var(--bgDeep); border-radius: 2px; }

.statGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0 0 20px; }
.statGrid dt { font-size: .8125rem; color: var(--muted); }
.statGrid dd { margin: 0 0 4px; font-family: var(--pixelFont); }
.dropList { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.dropList li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dropList .itemIcon { padding: 2px; }
.linkList { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 랭킹 ---------- */
.ranking td { vertical-align: middle; }
.ranking tr.top { background: rgba(242, 182, 90, .06); }
.ranking tr.r1 td { font-size: 1.05rem; }
.who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.who .sprite { background: var(--bgDeep); border-radius: 2px; }
.expBar { display: inline-block; width: 120px; height: 10px; background: var(--bgDeep); border: 1px solid var(--line); vertical-align: middle; }
.expBar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--goldHi)); }
@media (max-width: 640px) { .hideMobile { display: none; } .table th, .table td { padding: 10px 6px; } }

/* ---------- 게시판 ---------- */
.postList { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--line); }
.postList a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 16px 8px; border-bottom: 1px solid var(--line); color: var(--text); }
.postList a:hover { background: var(--panel); text-decoration: none; }
.postNo { color: var(--muted); font-family: var(--pixelFont); font-size: .85rem; text-align: center; }
.postTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.postList time { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) {
  .postList a { grid-template-columns: 1fr; gap: 2px; }
  .postNo { display: none; }
}
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a { min-width: 36px; padding: 6px 10px; text-align: center; border: 2px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.pager a.active { background: var(--gold); border-color: var(--gold); color: var(--bgDeep); }

.postView { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
.postView > header { border-bottom: 2px solid var(--line); margin-bottom: 24px; padding-bottom: 16px; }
.postView h1 { font-size: 1.6rem; }
.postView header p { margin: 0; font-size: .9rem; }
.markdown { overflow-wrap: anywhere; }
.markdown h2, .markdown h3, .markdown h4 { margin-top: 1.4em; color: var(--goldHi); }
.markdown ul, .markdown ol { padding-left: 1.4em; margin: 0 0 1em; }
.markdown li { margin: 2px 0; }
.markdown blockquote { margin: 0 0 1em; padding: 8px 16px; border-left: 4px solid var(--gold); background: var(--bgDeep); }
.markdown blockquote p { margin: 4px 0; }
.markdown code { font-family: Consolas, monospace; background: var(--bgDeep); padding: 1px 6px; border-radius: 2px; font-size: .9em; }
.markdown hr { border: none; border-top: 2px dashed var(--line); margin: 1.6em 0; }
.adminTools { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.editor { display: grid; gap: 12px; }
.editor textarea { resize: vertical; font-family: Consolas, var(--bodyFont); line-height: 1.6; }
.editorTitle { margin-bottom: 12px; }
.preview { min-height: 300px; background: var(--panel); border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; }
.editorActions { display: flex; justify-content: flex-end; gap: 10px; }
.formStatus { color: var(--red); margin: 0; min-height: 1.5em; }
.formStatus.ok { color: var(--green); }

/* ---------- 의견 게시판 ---------- */
.feedbackList a { grid-template-columns: 56px 1fr auto auto auto; }
.feedbackList .author { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) {
  .feedbackList a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .feedbackList .postTitle { width: 100%; }
}
.statusBadge {
  display: inline-block; padding: 2px 8px; border-radius: 2px; font-family: var(--pixelFont); font-size: .8125rem;
  white-space: nowrap; border: 1px solid var(--line); color: var(--muted);
}
.statusBadge.reviewing { color: var(--silver); border-color: var(--silver); }
.statusBadge.done { color: var(--bgDeep); background: var(--green); border-color: var(--green); }
.statusBadge.hold { color: var(--red); border-color: var(--red); }
.feedbackTags { display: flex; gap: 6px; margin: 0 0 10px !important; }
.plainText { white-space: pre-wrap; overflow-wrap: anywhere; }
.answerBox { margin-top: 28px; padding: 16px 20px; background: var(--bgDeep); border-left: 4px solid var(--gold); border-radius: var(--radius); }
.answerBox h3 { color: var(--gold); display: flex; align-items: baseline; gap: 10px; }
.answerBox time { color: var(--muted); font-family: var(--bodyFont); font-size: .8125rem; font-weight: 400; }
.answerForm { display: grid; gap: 12px; margin-top: 24px; }
.answerForm h3 { margin: 0; }
.feedbackMeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
label.inline { display: flex; align-items: center; gap: 8px; }

/* ---------- 로그인 ---------- */
.authLayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .authLayout { grid-template-columns: 1fr; } .authIntro { order: 2; } }
.authCard { display: grid; gap: 14px; padding: 32px 28px; text-align: center; align-content: start; }
.authCard h2 { margin: 0; font-size: 1.4rem; }
.authIntro {
  position: relative; display: flex; align-items: flex-end; min-height: 420px; overflow: hidden;
  background-size: cover; background-position: center; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.authIntro::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,11,22,.96) 35%, rgba(9,11,22,.2)); }
.authIntroBody { position: relative; padding: 28px; }
.authIntroBody h2 { font-size: 1.5rem; }
.authIntroLinks { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.fieldHint { color: var(--muted); font-size: .8125rem; }
.fieldHint.warn { color: var(--gold); }
.accountSummary { display: grid; gap: 16px; align-content: start; }
.accountSummary h2 { margin: 0; }
.accountWho { display: flex; align-items: center; gap: 18px; }
.accountWho .sprite { background: radial-gradient(circle, var(--panelHi) 0 55%, transparent 56%); }
.accountWho p { margin: 0; }
.accountSummary .statGrid { margin: 0; }
.expBar.wide { width: 100%; height: 12px; }
.authActions.start { justify-content: flex-start; margin-top: 0; }
.accountCard { text-align: left; }
.accountCard > .button.danger { justify-self: start; }
.accountBox { padding: 12px 14px; background: var(--bgDeep); border: 1px solid var(--line); border-radius: var(--radius); }
.accountBox summary { cursor: pointer; font-weight: 600; }
.accountBox[open] summary { margin-bottom: 12px; }
.authLogo { justify-self: center; width: 110px; height: auto; margin-bottom: 4px; }
.authCard h1 { font-size: 1.6rem; margin: 0; }
.authText { margin: 0; color: var(--muted); }
.authHint { margin: 0; color: var(--muted); font-size: .85rem; }
.authForm { display: grid; gap: 12px; text-align: left; margin-top: 8px; }
.authForm .button { width: 100%; margin-top: 4px; }
.authForm .formStatus { text-align: center; }
.authForm .humanCheck { display: flex; justify-content: center; min-height: 65px; } /* Turnstile 위젯 (사이트 키가 있을 때만) */
.authForm .humanCheck[hidden] { display: none; }
.field { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.authActions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
/* 회원가입·비밀번호 찾기 (emailAuth.js) */
.authLinks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin: 0; font-size: .9rem; }
.authLinks span { color: var(--muted); }
.codeBox { display: grid; gap: 12px; padding: 14px; background: var(--bgDeep); border: 1px solid var(--line); border-radius: var(--radius); }
.codeBox .authHint { overflow-wrap: anywhere; }
.codeInput { font-family: Consolas, monospace; font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.codeActions { display: flex; flex-wrap: wrap; gap: 8px; }
.authForm .codeActions .button { width: auto; flex: 1 1 140px; margin-top: 0; }
.authForm .input[readonly] { color: var(--muted); border-style: dashed; }

/* ---------- 푸터 ---------- */
.siteFooter { border-top: 2px solid var(--line); background: var(--bgDeep); margin-top: 48px; }
.footerInner { width: min(1180px, 100%); margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; color: var(--muted); font-size: .85rem; }
.footerLinks { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footerLinks a { color: var(--muted); }
.footerInner .copyright { width: 100%; order: 3; font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  a.card:hover, a.raceCard:hover, .raidChip:hover, .shortcut:hover, .button:active { transform: none; }
  html { scroll-behavior: auto; }
  .sprite.animated img { animation: none; }
  .sprite.animated img:first-child { visibility: visible; }
  .spinner { animation: none; }
}

/* ---------- 공용: 접근성·보조 ---------- */
.skipLink {
  position: fixed; top: 8px; left: 8px; z-index: 50; padding: 8px 14px; transform: translateY(-200%);
  background: var(--gold); color: var(--bgDeep); border: none; border-radius: var(--radius); font: inherit; cursor: pointer;
}
.skipLink:focus { transform: none; }
h1:focus { outline: none; }
.topButton {
  position: fixed; right: 16px; bottom: 16px; z-index: 15; width: 44px; height: 44px;
  background: var(--panelHi); color: var(--gold); border: 2px solid var(--lineHi); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; font-size: 1rem;
}
.topButton:hover { border-color: var(--gold); }
.button { min-height: 40px; }
.centerRow { justify-content: center; }
.tableWrap { overflow-x: auto; }
.emptyBox { grid-column: 1 / -1; padding: 32px 16px; text-align: center; color: var(--muted); }
.emptyBox p { margin: 0 0 12px; }
.stateBox .button { margin-top: 12px; }
.resultCount { margin-left: auto; white-space: nowrap; }
.newBadge {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; vertical-align: 2px;
  background: var(--red); color: #fff; font: 700 .75rem/1.2 var(--bodyFont); border-radius: 2px;
}
kbd {
  display: inline-block; min-width: 24px; padding: 1px 7px; text-align: center; font: .85rem/1.5 var(--pixelFont);
  background: var(--bgDeep); color: var(--text); border: 1px solid var(--lineHi); border-bottom-width: 3px; border-radius: 4px;
}
.copyButton {
  padding: 2px 10px; font: .8125rem var(--bodyFont); color: var(--muted); background: var(--panelHi);
  border: 1px solid var(--lineHi); border-radius: var(--radius); cursor: pointer; vertical-align: middle;
}
.copyButton:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .chip { flex-shrink: 0; }
}

/* ---------- 홈 추가 ---------- */
.heroRace { display: grid; justify-items: center; color: var(--muted); font: .8125rem var(--pixelFont); }
.heroRace:hover { color: var(--gold); text-decoration: none; }
.heroRace .sprite { width: clamp(56px, 12vw, 96px) !important; height: clamp(56px, 12vw, 96px) !important; filter: drop-shadow(0 6px 4px rgba(0,0,0,.5)); }
@media (max-width: 640px) {
  .hero { min-height: auto; }
  .heroInner { padding-top: 32px; }
  .heroActions .button { flex: 1 1 auto; }
}
.postMini .statusBadge { flex-shrink: 0; }
.shortcutGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.shortcut {
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); color: var(--text);
  box-shadow: var(--shadow);
}
.shortcut:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.shortcutMedia { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; background: var(--bgDeep); border-radius: var(--radius); }
.shortcut strong { font-family: var(--pixelFont); }
.shortcut .muted { font-size: .85rem; }

/* ---------- 게임소개 추가 ---------- */
.featureGrid .more { display: inline-block; margin-top: 10px; color: var(--gold); }
.strongLink { font-weight: 700; color: var(--text); }
.starterList .icons a { display: inline-flex; }

/* ---------- 도감: 검색·목록 ---------- */
.pageHead.row .globalSearch { flex: 0 1 360px; }
@media (max-width: 720px) {
  .pageHead.row:has(.globalSearch) { flex-direction: column; align-items: stretch; }
  .pageHead.row .globalSearch { flex-basis: auto; }
}
.globalSearch { position: relative; }
.searchResults {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10; list-style: none; margin: 0; padding: 6px;
  max-height: 60vh; overflow-y: auto; background: var(--bgDeep); border: 2px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.searchResults li { padding: 2px 0; }
.searchResults li.muted { padding: 8px; font-size: .85rem; }
.searchResults a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; color: var(--text); border-radius: var(--radius); }
.searchResults a:hover, .searchResults a:focus-visible { background: var(--panelHi); text-decoration: none; }
.searchResults .chipName { flex: 1; }
.cornerTag { position: absolute; top: 8px; left: 8px; }
.miniPlace { font-size: .8125rem; color: var(--goldHi); }
.miniDrops { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 2px; }
.miniDrops .itemIcon { padding: 1px; }
.itemFoot { align-items: center; }
.itemFoot .sourceBadges { margin-left: auto; }
.raidCard .miniDrops { justify-content: flex-start; margin-top: 8px; }
.raidCard p { margin: 0; }
.npcGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .npcGrid { grid-template-columns: 1fr; } }
.npcCard { padding: 16px; scroll-margin-top: 80px; }
.npcCard.highlight { border-color: var(--gold); }
.npcHead { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.npcHead h3 { margin: 4px 0 2px; }
.npcHead p { margin: 0; font-size: .85rem; }
.npcSprite { flex-shrink: 0; background: var(--bgDeep); border-radius: var(--radius); }
.shopTable td, .shopTable th { padding: 8px; }
.shopTable td:last-child { white-space: nowrap; }

/* ---------- 도감: 상세 ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--text); }
.detailHero {
  display: flex; align-items: center; gap: 24px; padding: 24px; margin-bottom: 8px;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.detailHero.boss { border-color: var(--red); background: linear-gradient(90deg, rgba(224,96,79,.16), var(--panel) 50%); }
.detailMedia:empty { display: none; }
.detailMedia { display: grid; place-items: center; flex-shrink: 0; min-width: 128px; min-height: 128px; padding: 8px;
  background: radial-gradient(circle, var(--panelHi) 0 60%, transparent 61%); }
.detailMedia .itemIcon { padding: 8px; }
.detailTitle h1 { font-size: 2rem; margin: 0 0 6px; }
.detailTitle p { margin: 0; }
.tagRow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px !important; }
.tag.starter { color: var(--green); border-color: var(--green); }
@media (max-width: 560px) {
  .detailHero { flex-direction: column; text-align: center; padding: 20px 16px; }
  .tagRow { justify-content: center; }
  .detailTitle h1 { font-size: 1.6rem; }
}
.detailSection { margin-top: 32px; }
.detailSection > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.detailSection h3 { margin: 20px 0 10px; font-size: 1rem; color: var(--goldHi); }
.itemStats.big { font-size: 1rem; display: grid; gap: 4px; }
.statNotes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.statNotes strong { color: var(--gold); font-family: var(--pixelFont); margin-right: 6px; }
.tileBand.big { height: 120px; border: 2px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.prevNextBar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.prevNext { display: grid; gap: 2px; padding: 12px 16px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); color: var(--text); }
.prevNext.next { text-align: right; }
.prevNext small { color: var(--muted); }
.prevNext:hover { border-color: var(--gold); text-decoration: none; }

/* 몬스터·아이템 링크 칩 */
.chipList { display: flex; flex-wrap: wrap; gap: 8px; }
.entityChip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; max-width: 100%;
  background: var(--bgDeep); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-size: .9rem;
}
.entityChip:hover { border-color: var(--gold); text-decoration: none; }
.entityChip.boss { border-color: var(--red); }
.entityChip.plain { background: none; border-color: transparent; padding-left: 0; }
.entityChip .monsterSprite, .entityChip .itemIcon { flex-shrink: 0; }
.entityChip .itemIcon { padding: 2px; }
.chipName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chipMeta { color: var(--muted); font-size: .8125rem; white-space: nowrap; }

/* 드랍 */
.chanceBadge { display: inline-block; min-width: 48px; padding: 1px 6px; text-align: center; font: .8125rem var(--pixelFont); color: var(--gold); border: 1px solid var(--line); border-radius: 2px; }
.chanceBadge.sure { color: var(--bgDeep); background: var(--gold); border-color: var(--gold); }
.chanceCell { display: inline-flex; align-items: center; gap: 8px; }
.chanceBar { display: inline-block; width: 72px; height: 6px; background: var(--bgDeep); border: 1px solid var(--line); }
.chanceBar span { display: block; height: 100%; background: var(--gold); }
.dropTable td { vertical-align: middle; }
.sourcePanel > p { margin-bottom: 0; }
.sourceGroup { margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.sourceGroup summary { padding: 10px 14px; cursor: pointer; }
.sourceGroup summary:hover { color: var(--gold); }
.sourceGroup .chipList { padding: 0 14px 14px; }
.sourceBadges { display: inline-flex; flex-wrap: wrap; gap: 4px; font-family: var(--bodyFont); }
.sourceBadge { padding: 1px 6px; font-size: .8125rem; font-weight: 600; border-radius: 2px; border: 1px solid; }
.sourceBadge.shop { color: var(--silver); border-color: var(--silver); }
.sourceBadge.drop { color: var(--gold); border-color: var(--gold); }
.sourceBadge.sure { color: var(--bgDeep); background: var(--gold); border-color: var(--gold); }
.sourceBadge.none { color: var(--muted); border-color: var(--line); }

/* 출현 위치·스테이지 */
.placeList { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.placeList li { padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.placeList a { font-weight: 700; }
.stageTags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stageTag { padding: 1px 8px; font-size: .8125rem; background: var(--bgDeep); border: 1px solid var(--line); border-radius: 2px; }
.stageTag.boss { color: #fff; background: var(--red); border-color: var(--red); }
.stageBlocks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.stageBlock { padding: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.stageBlock.boss { border-color: var(--red); }
.stageHead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stageHead .stageNo { min-width: 44px; }
.stageBlock.boss .stageNo { background: var(--red); border-color: var(--red); color: #fff; }
.bossLine { margin-bottom: 8px; }
.bossLine:hover { border-color: var(--gold); text-decoration: none; }
.npcLine { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.npcLine:hover { border-color: var(--gold); text-decoration: none; }

/* ---------- 랭킹·게시판·다운로드·로그인 추가 ---------- */
.rankHolder.loading { opacity: .5; transition: opacity .15s; }
.ranking tr.mine { outline: 2px solid var(--gold); outline-offset: -2px; }
.ranking .who .tag { margin-left: 4px; }
.answeredMark { margin-left: 6px; font-size: .85rem; }
.mineTag { margin-left: 6px; color: var(--green); border-color: var(--green); }
.charCount { justify-self: end; margin-top: -6px; font-size: .8125rem; color: var(--muted); }
.answerPanel { margin-top: 24px; }
.answerPanel summary { cursor: pointer; font-family: var(--pixelFont); color: var(--gold); }
.answerPanel[open] summary { margin-bottom: 12px; }
.notice { margin: 0; padding: 10px 14px; color: var(--goldHi); background: rgba(242, 182, 90, .1); border: 1px solid var(--gold); border-radius: var(--radius); }
.downloadStarted { margin: -8px 0 0; color: var(--green); font-size: .9rem; }
.commandRow { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.commandRow .command { flex: 1; min-width: 0; margin-top: 0; }
.passwordBox { position: relative; display: block; }
.passwordBox .input { padding-right: 72px; }
.revealButton {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 4px 10px; font: .8125rem var(--bodyFont);
  color: var(--muted); background: var(--panelHi); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.revealButton:hover { color: var(--gold); }

/* ---------- 인쇄 ---------- */
@media print {
  .siteHeader, .siteFooter, .topButton, .skipLink, .adminTools, .answerPanel, .prevNextBar, .globalSearch { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .postView, .card, .detailHero { box-shadow: none; background: none; border-color: #999; }
}

/* 화면낭독기 전용 글자 (보이지 않음) */
.srOnly { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 좁은 화면: 제목 옆 버튼이 제목을 누르지 않게 세로로 */
@media (max-width: 560px) { .pageHead.row { flex-direction: column; align-items: stretch; } }
/* 긴 닉네임이 헤더 메뉴를 밀어내지 않게 */
.loginLink { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 랭킹: 내 순위 줄 */
.myRank { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.myRank .tag { margin-right: 4px; }

/* 개인정보처리방침·이용약관 */
.policy .policySection ul { padding-left: 1.2em; }
.policy .policySection li { margin: 4px 0; }

/* 글자처럼 보이는 버튼 (임시 저장 지우기 등) */
.linkButton { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }
.draftNotice { margin: 0 0 8px; }

/* 내 계정: 비밀번호 변경 */
.passwordChange { margin-top: 20px; text-align: left; }
.passwordChange summary { cursor: pointer; color: var(--muted); }
.passwordChange form { margin-top: 12px; }
.heroOnline { margin: 10px 0 0; color: var(--goldHi); font-family: var(--pixelFont); font-size: .9rem; text-shadow: 0 1px 2px #000; }
.wearingRow { display: flex; flex-wrap: wrap; gap: 16px; }
.wearing { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wearing figcaption { font-size: .85rem; color: var(--muted); }
.sprite.wearing { overflow: visible; background: radial-gradient(circle, var(--panelHi) 0 55%, transparent 56%); }
.sprite.wearing img.layer { inset: auto; }

/* ---------- 맵 그림 (mapView.js) ---------- */
.mapFrame { position: relative; width: 100%; background: var(--bgDeep); overflow: hidden; }
.mapCanvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.mapFrame.loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%) var(--bgDeep);
  background-size: 200% 100%; animation: mapShimmer 1.2s linear infinite;
}
@keyframes mapShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.mapMarkers { position: absolute; inset: 0; pointer-events: none; }
.mapMarker {
  position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center;
  pointer-events: auto; color: var(--text); font: 700 .75rem/1.2 var(--bodyFont); white-space: nowrap;
}
.mapLabel { padding: 2px 6px; background: rgba(9,11,22,.85); border: 1px solid var(--gold); border-radius: 2px; order: -1; }
.mapPin, .legendPin { display: inline-block; width: 12px; height: 12px; background: var(--gold); border: 2px solid var(--bgDeep); transform: rotate(45deg); }
.mapPin { margin-top: 2px; box-shadow: 0 0 0 2px rgba(242,182,90,.4); }
a.mapMarker:hover { text-decoration: none; }
a.mapMarker:hover .mapLabel, a.mapMarker:focus-visible .mapLabel { background: var(--gold); color: var(--bgDeep); }
.mapMarker.npc .mapLabel { border-color: var(--silver); }
.mapMarker.npc .mapPin { background: var(--silver); }
.mapTools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.legendPin { width: 10px; height: 10px; vertical-align: -1px; }
.button.small { min-height: 32px; padding: 6px 12px; font-size: .85rem; }
.mapDialog {
  width: min(1240px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; color: var(--text);
  background: var(--bgDeep); border: 2px solid var(--gold); border-radius: var(--radius);
}
.mapDialog::backdrop { background: rgba(0,0,0,.7); }
.mapDialogHead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 2px solid var(--line); }
.mapDialogHead strong { margin-right: auto; font-family: var(--pixelFont); }
.mapDialogBody { --mapZoom: 1; overflow: auto; max-height: calc(100vh - 110px); }
.mapDialogBody .mapFrame.full { width: calc(100% * var(--mapZoom)); min-width: 640px; }

/* ---------- 토벌 지역 목록 ---------- */
.raidGrid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.raidCard { display: flex; flex-direction: column; transition: opacity .15s, transform .1s, border-color .1s; }
.raidThumb { position: relative; border-bottom: 2px solid var(--line); }
.raidThumb .tileBand { height: auto; aspect-ratio: 34 / 26; border: 0; background-size: auto 50%; }
.raidThumb .levelTag { position: absolute; top: 8px; left: 8px; background: rgba(9,11,22,.85); }
.raidThumb .fitTag { position: absolute; top: 8px; right: 8px; display: none; background: var(--gold); color: var(--bgDeep); border-color: var(--gold); }
.raidCard.fit { border-color: var(--gold); }
.raidCard.fit .fitTag { display: inline-block; }
.raidCard.dim { opacity: .5; }
.raidCard.dim:hover { opacity: 1; }
.thumbBoss { position: absolute; right: 6px; bottom: 2px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.7)); }
.raidCard .raidBody { display: grid; gap: 6px; }
.raidCard .raidTitle { margin-bottom: 0; }
.raidCard .dropIcons { gap: 4px; }
.levelInput { width: 92px !important; }
.toolbar .chips { margin-bottom: 0; }

/* ---------- 토벌 지역 상세 ---------- */
.raidHero {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 24px; align-items: start; padding: 20px;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.raidHeroMap .mapFrame { border: 2px solid var(--line); border-radius: var(--radius); }
.raidHeroInfo h1 { font-size: 2rem; margin: 0 0 4px; }
.raidHeroInfo .lead { margin-bottom: 16px; color: var(--goldHi); }
.raidHeroInfo .statGrid { grid-template-columns: repeat(2, 1fr); }
.heroBoss { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; color: var(--text); background: var(--bgDeep); border: 1px solid var(--red); border-radius: var(--radius); }
.heroBoss:hover { border-color: var(--gold); text-decoration: none; }
@media (max-width: 860px) { .raidHero { grid-template-columns: 1fr; padding: 14px; } }
.bossText { display: grid; gap: 2px; }
.bossText .stageTag { margin-left: 4px; }
.stageExp { margin-left: auto; color: var(--goldHi); font: .85rem var(--pixelFont); white-space: nowrap; }
@media (max-width: 560px) { .stageHead { flex-wrap: wrap; } .stageExp { margin-left: 0; width: 100%; } }
.miniStages { font-size: .8125rem; color: var(--muted); }
.tabMore { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; }
.moreLink { text-decoration: none; font-size: .9rem; }
.moreLink:hover { text-decoration: underline; }
.dropSources summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.dropSources[open] summary { margin-bottom: 8px; }
.dropTable .sourceBadge { margin-left: 6px; }
.levelPicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.levelPicker input[type="range"] { flex: 1 1 200px; accent-color: var(--gold); }
.levelValue { font-family: var(--pixelFont); color: var(--gold); min-width: 110px; }

/* ---------- 상세 탭 (detailTabs) ---------- */
.detailTabs { margin-top: 24px; }
.detailTabBar { scroll-margin-top: 76px; margin-bottom: 20px; }
.tabButton {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; font: inherit; font-family: var(--pixelFont); white-space: nowrap;
  color: var(--muted); background: none; border: 0; border-radius: var(--radius) var(--radius) 0 0; cursor: pointer;
}
.tabButton:hover { color: var(--text); }
.tabButton.active { color: var(--gold); background: var(--panel); box-shadow: inset 0 -3px var(--gold); }
.tabCount { min-width: 20px; padding: 0 6px; font-size: .8125rem; line-height: 18px; text-align: center; color: var(--muted); background: var(--bgDeep); border: 1px solid var(--line); border-radius: 999px; }
.tabButton.active .tabCount { color: var(--gold); border-color: var(--gold); }
.tabPanel:focus-visible { outline-offset: 6px; }
.tabPanel > h3:first-of-type { margin-top: 0; }
.tabPanel h3 { margin: 24px 0 10px; font-size: 1rem; color: var(--goldHi); }
@media print { .detailTabBar, .mapTools { display: none !important; } .tabPanel { display: block !important; margin-bottom: 24px; } }

/* ---------- 상점: 마을 지도 ---------- */
.townMap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 20px; align-items: start; margin-bottom: 24px; }
.townMap .mapFrame { border: 2px solid var(--line); border-radius: var(--radius); }
.townMapText h2 { margin-bottom: 8px; }
.townMapText p { font-size: .9rem; }
.npcIndex { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.npcIndex a { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; color: var(--text); border-radius: var(--radius); }
.npcIndex a:hover { background: var(--panelHi); text-decoration: none; }
.npcIndex .npcSprite { background: var(--bgDeep); }
@media (max-width: 860px) { .townMap { grid-template-columns: 1fr; } }
.placeList.withMap li { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.placeMap { display: block; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.placeMap:hover { border-color: var(--gold); }

/* ---------- 게시판·안내: 본문 + 사이드바 (pages/aside.js) ---------- */
.boardLayout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.boardMain { min-width: 0; }
.boardMain .markdown, .boardMain .plainText { max-width: 820px; }
.boardAside { position: sticky; top: 80px; display: grid; gap: 16px; }
.asideBox { padding: 16px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.asideBox h2 { font-size: 1rem; margin-bottom: 10px; }
.asideBox .more { display: inline-block; margin-top: 8px; }
.asideList { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.asideList li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.asideList li:last-child { border-bottom: 0; }
.asideList a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asideList a.active { color: var(--gold); font-weight: 700; }
.asideList time { flex-shrink: 0; color: var(--muted); font-size: .8125rem; }
.tocList { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: .9rem; }
.tocList .linkButton { text-align: left; text-decoration: none; color: var(--muted); }
.tocList .linkButton:hover { color: var(--gold); }
.policySection { scroll-margin-top: 80px; }
.postView .eyebrow { margin-bottom: 4px; }
@media (max-width: 960px) {
  .boardLayout { grid-template-columns: 1fr; }
  .boardAside { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media print { .boardAside { display: none !important; } .boardLayout { display: block; } }
.boardMain > .section:first-child { margin-top: 0; }
.accountSummary > .button { justify-self: start; }

/* ---------- 홈 (사이클 2) ---------- */
.serverBadge { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 4px 12px 4px 10px; font-size: .9rem;
  background: rgba(9,11,22,.7); border: 1px solid var(--line); border-radius: 999px; }
.serverBadge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(124,195,106,.25); }
.serverBadge.off .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(224,96,79,.25); }
.serverBadge strong { color: var(--goldHi); }
.statsBand { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 860px) { .statsBand { grid-template-columns: repeat(3, 1fr); } }
.statsBand a { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.statsBand a:hover { border-color: var(--gold); text-decoration: none; }
.statsBand strong { font: 1.6rem/1.1 var(--pixelFont); color: var(--gold); }
.statsBand span { color: var(--muted); font-size: .85rem; }
.raidStrip { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .raidStrip { grid-template-columns: repeat(2, 1fr); } }
.raidChip .mapFrame { border-bottom: 2px solid var(--line); }
.rankMini li.top a { padding: 6px 4px; }
.rankMini .name small { display: block; color: var(--muted); font-size: .8125rem; }
.shortcutGrid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.shortcutMedia { overflow: hidden; }
.shortcutMedia .mapFrame { width: 56px; }

/* ---------- 게임소개 (사이클 2) ---------- */
.sectionNav { margin: -8px 0 24px; }
#about-flow, #about-races, #about-growth, #about-regions, #about-combat, #about-controls { scroll-margin-top: 80px; }
.turning { display: inline-block; cursor: crosshair; }
.regionGallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.regionCard { display: grid; color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.regionCard:hover { border-color: var(--gold); text-decoration: none; }
.regionCard .mapFrame { border-bottom: 2px solid var(--line); }
.regionText { display: grid; padding: 10px 12px; }
.regionText strong { font-family: var(--pixelFont); }
.regionText .muted { font-size: .85rem; }
.controls kbd + kbd { margin-left: 3px; }

/* ---------- 랭킹 (사이클 2) ---------- */
.raceChip { display: inline-flex; align-items: center; gap: 4px; }
.raceChip .sprite { margin: -6px 0; }
.rankTools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.findBox { display: flex; align-items: center; gap: 10px; flex: 1 1 300px; }
.findBox .input { max-width: 280px; }
.rankTools > .muted { margin-left: auto; }
.ranking tr.found { background: rgba(124,195,106,.14); }
.ranking tr.found td:first-child { box-shadow: inset 4px 0 var(--green); }
.podium { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.podiumStep { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; text-align: center; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.podiumStep.r1 { padding-bottom: 36px; border-color: var(--gold); background: linear-gradient(180deg, rgba(242,182,90,.18), var(--panel)); }
.podiumStep.r2 { padding-bottom: 22px; border-color: var(--silver); }
.podiumStep.r3 { border-color: var(--bronze); }
.podiumStep strong { font-family: var(--pixelFont); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podiumStep .sprite { filter: drop-shadow(0 6px 4px rgba(0,0,0,.5)); }
.raceShare { margin-bottom: 16px; }
.raceShare p { margin: 0 0 6px; }
.shareBar { display: flex; height: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; }
.share { display: inline-block; }
.shareBar .share { height: 100%; }
.share.s0 { background: var(--gold); } .share.s1 { background: var(--silver); } .share.s2 { background: var(--green); }
.share.s3 { background: var(--bronze); } .share.s4 { background: var(--red); }
.shareLegend { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; color: var(--muted); }
.shareLegend .share { width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.expBar.mini { display: block; width: 56px; height: 4px; margin-top: 4px; }
.showMobile { display: none; }
@media (max-width: 640px) { .showMobile { display: block; } .podiumStep .sprite { width: 64px !important; height: 64px !important; } }
.podium { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- 도감 목록 (사이클 2) ---------- */
.filterBox { margin-bottom: 12px; }
.filterBox > summary { display: none; cursor: pointer; padding: 10px 14px; font-weight: 600; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.filterBox .toolbar { margin-bottom: 0; }
@media (max-width: 640px) {
  .filterBox > summary { display: block; }
  .filterBox[open] > summary { margin-bottom: 12px; }
  .filterBox .toolbar > * { flex: 1 1 100%; }
}
.levelRange { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.listBar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.listBar .resultCount { margin-left: 0; }
.viewToggle { display: flex; gap: 4px; margin-left: auto; }
.viewToggle .chip { padding: 4px 12px; }
.sortButton { padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sortButton:hover { color: var(--gold); }
th[aria-sort="ascending"] .sortButton::after { content: " ▲"; color: var(--gold); }
th[aria-sort="descending"] .sortButton::after { content: " ▼"; color: var(--gold); }
.sortTable td { vertical-align: middle; }
.chipCount { margin-left: 6px; font-size: .8125rem; opacity: .75; }
.skillBadges { display: flex; flex-wrap: wrap; gap: 4px; margin: auto 0 0; }
.raceCompare td.best { color: var(--gold); font-weight: 700; }
.raceCompare td, .raceCompare th { text-align: center; }
.raceCompare td:first-child, .raceCompare th:first-child { text-align: left; }
.subHead { margin: 8px 0 12px; font-size: 1.1rem; }
.subHead ~ .subHead { margin-top: 28px; }
.searchGroup { padding: 8px 8px 2px !important; font-size: .8125rem; color: var(--gold); font-family: var(--pixelFont); }
.codexSummary a { color: var(--muted); }
.codexSummary a:hover { color: var(--gold); }
/* 아이템 등급 색 (게임 ItemDb.gd GRADE_COLORS 와 같음) */
.grade0 { --grade: #d8d2c4; } .grade1 { --grade: #7fd77f; } .grade2 { --grade: #5fa8ff; }
.grade3 { --grade: #c27cff; } .grade4 { --grade: #ffa347; } .grade5 { --grade: #ff5a5a; }
.grade6 { --grade: #8ff4ff; }
h3.grade1, h3.grade2, h3.grade3, h3.grade4, h3.grade5, h3.grade6, .entityChip:not(.grade0) .chipName { color: var(--grade); }
.gradeTag { color: var(--grade); border-color: var(--grade); margin-left: 4px; }

/* ---------- 공용 (사이클 2) ---------- */
.siteHeader { transition: box-shadow .2s; }
.scrolled .siteHeader { box-shadow: 0 6px 18px rgba(0,0,0,.45); }
@media (max-width: 960px) {
  .navOpen { overflow: hidden; }
  .navOpen::after { content: ""; position: fixed; inset: 60px 0 0; z-index: 19; background: rgba(0,0,0,.55); }
  .siteNav { max-height: calc(100vh - 60px); overflow-y: auto; }
}
.footerInner { align-items: flex-start; gap: 20px 40px; }
.footerBrand { display: grid; gap: 8px; justify-items: start; }
.footerMap { margin-left: auto; display: grid; grid-template-columns: repeat(4, auto); gap: 8px 40px; }
.footerMap div { display: grid; gap: 4px; align-content: start; }
.footerMap strong { color: var(--text); font-family: var(--pixelFont); font-weight: 400; margin-bottom: 2px; }
.footerMap a { color: var(--muted); }
@media (max-width: 720px) { .footerMap { margin-left: 0; grid-template-columns: repeat(2, 1fr); width: 100%; } }
.notFound .monsterSprite { margin-bottom: 8px; animation: lostBob 1.6s ease-in-out infinite; }
@keyframes lostBob { 50% { transform: translateY(-6px); } }
.skeleton .skLine, .skeleton .skCard {
  background: linear-gradient(100deg, var(--panel) 30%, var(--panelHi) 50%, var(--panel) 70%); background-size: 200% 100%;
  animation: mapShimmer 1.2s linear infinite; border-radius: var(--radius);
}
.skLine { height: 16px; width: 60%; margin-bottom: 12px; }
.skLine.short { width: 80px; height: 12px; }
.skLine.title { width: 220px; height: 34px; }
.skGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }
.skCard { height: 160px; }
.pageEnter { animation: pageEnter .18s ease-out; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(4px); } }
.topButton { background: conic-gradient(var(--gold) var(--progress, 0%), var(--panelHi) 0); }
.topButton::before { content: ""; position: absolute; inset: 3px; background: var(--panelHi); border-radius: 2px; z-index: -1; }
.topButton { isolation: isolate; }
@media (prefers-reduced-motion: reduce) {
  .pageEnter, .notFound .monsterSprite, .skeleton .skLine, .skeleton .skCard, .mapFrame.loading::after { animation: none; }
}

/* ---------- 게시판·플레이 안내 (사이클 2) ---------- */
.postList a { grid-template-columns: 56px minmax(0, 1fr) auto; }
.postMain { display: grid; min-width: 0; gap: 2px; }
.postPreview { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listFind { margin-bottom: 12px; }
.postMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.postMeta .copyButton { margin-left: 6px; }
.tocList li.sub { margin-left: 12px; list-style: circle; }
.mineChip { margin-left: auto; border-style: dashed; }
.playTop { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .playTop { grid-template-columns: 1fr; } }
.envCheck { padding: 20px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.envCheck h2 { font-size: 1.1rem; }
.envCheck ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.envCheck li { display: grid; grid-template-columns: 22px 72px 1fr; gap: 8px; align-items: start; font-size: .9rem; }
.envCheck li.ok .envMark { color: var(--green); }
.envCheck li.bad .envMark { color: var(--red); }
.envCheck li.bad span:last-child { color: var(--goldHi); }

/* ---------- 사이클 3 ---------- */
:root { --control: #646e9e; } /* 입력칸·칩 테두리: 배경 대비 3:1 이상 */
.input, .chip, .copyButton { border-color: var(--control); }
.netBanner {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 30; margin: 0; padding: 8px 16px;
  color: var(--bgDeep); background: var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600;
}
/* 애니메이션 보기 */
.animViewer { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.animStage { background: radial-gradient(circle, var(--panelHi) 0 58%, transparent 59%); }
.animStage img { image-rendering: pixelated; }
.animControls { display: grid; gap: 12px; }
.animControls .chips { margin: 0; }
.dirPad { display: grid; grid-template-columns: repeat(3, 40px); gap: 4px; }
.padButton { height: 40px; font-size: 1.1rem; color: var(--muted); background: var(--panel); border: 2px solid var(--control); border-radius: var(--radius); cursor: pointer; }
.padButton:hover { color: var(--text); }
.padButton.active { color: var(--bgDeep); background: var(--gold); border-color: var(--gold); }
/* 도감: 즐겨찾기·최근 · 상세 도구 줄 */
.savedRows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: -8px 0 20px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.savedRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.savedRow > strong { min-width: 96px; font-size: .85rem; color: var(--muted); }
.entityChip.small { padding: 2px 8px 2px 2px; font-size: .85rem; }
.detailBar { float: right; display: flex; gap: 6px; margin-left: 12px; }
.detailBar a.copyButton { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; }
.favButton.on { color: var(--gold); border-color: var(--gold); }
@media (max-width: 560px) { .detailBar { float: none; margin: 0 0 10px; flex-wrap: wrap; } }
/* 몬스터 상세 */
.bossSkills { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.bossSkills li { display: grid; gap: 2px; padding: 10px 14px; background: var(--bgDeep); border-left: 3px solid var(--red); border-radius: var(--radius); }
.bossSkills p { margin: 0; font-size: .92rem; }
.effTable { display: grid; gap: 10px; max-width: 640px; }
.effRow { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; font-size: .85rem; }
.effLabel { color: var(--muted); }
.effBars { display: grid; gap: 3px; }
.effBar { display: block; min-width: 64px; padding: 1px 6px; font: .8125rem var(--pixelFont); white-space: nowrap; border-radius: 2px; }
.effBar.mine { background: var(--gold); color: var(--bgDeep); }
.effBar.avg { background: var(--panelHi); color: var(--muted); }
/* 표: 지금 항목 강조 */
.sortTable tr.current, .dropTable tr.current { background: rgba(242,182,90,.1); }
.sortTable tr.current td:first-child { box-shadow: inset 3px 0 var(--gold); }
.enchantOut .statGrid, .calcOut .statGrid { margin-bottom: 8px; }
/* 상점 도구 */
.shopTools { margin-bottom: 16px; }
.shopTable tr.tooPricey { opacity: .4; }
/* 토벌 */
.cardExp { font: .8125rem var(--pixelFont); color: var(--goldHi); }
.nextRaid { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; padding: 10px; max-width: 560px;
  color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.nextRaid:hover { border-color: var(--gold); text-decoration: none; }
.nextRaid strong { font-family: var(--pixelFont); }
.stageMix { height: 6px; margin: 0 0 10px; }
/* 홈 */
/* 게시판·에디터 */
.formatBar { display: flex; flex-wrap: wrap; gap: 6px; }
.formatBar .chip { padding: 4px 12px; }
.editorPanes { display: grid; gap: 12px; }
.editorPanes .preview { display: none; }
.editorPanes.showPreview .preview { display: block; }
.editorPanes.showPreview textarea { display: none; }
@media (min-width: 1100px) {
  .editorPanes { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .editorPanes .preview, .editorPanes.showPreview textarea { display: block; }
  .editorPanes .preview { max-height: 640px; overflow-y: auto; }
  .previewToggle { display: none; }
}
.codeBlock { margin: 0 0 1em; padding: 12px 16px; overflow-x: auto; background: var(--bgDeep); border: 1px solid var(--line); border-radius: var(--radius); }
.codeBlock code { background: none; padding: 0; font-family: Consolas, monospace; font-size: .88rem; white-space: pre; }
.markdown .tableWrap { margin: 0 0 1em; }
.statusSteps { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 12px; font: .8125rem var(--pixelFont); counter-reset: step; }
.statusSteps li { flex: 1; position: relative; padding: 6px 8px 6px 28px; color: var(--muted); background: var(--bgDeep); border: 1px solid var(--line); }
.statusSteps li + li { border-left: 0; }
.statusSteps li::before { counter-increment: step; content: counter(step); position: absolute; left: 8px; top: 6px; }
.statusSteps li.past { color: var(--green); }
.statusSteps li.now { color: var(--bgDeep); background: var(--gold); border-color: var(--gold); }
.statusSteps.hold { display: block; padding: 8px 12px; color: var(--red); border: 1px solid var(--red); font-family: var(--bodyFont); }
.rememberMe { font-size: .85rem; color: var(--muted); }
.myFeedback { margin-top: 24px; }
.guildBar { width: 80px; }
/* 인쇄: 도감 상세 */
@media print {
  .detailBar, .detailTabBar, .codexDetail > .tabs, .mapTools, .formatBar, .netBanner, .animControls, .levelPicker { display: none !important; }
  .mapFrame { break-inside: avoid; }
}
.tabPanel .raceStats { max-width: 420px; }

/* ---------- 사이클 4 ---------- */
.toastBox { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { margin: 0; padding: 10px 18px; color: var(--text); background: var(--panelHi); border: 2px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--shadow); animation: pageEnter .18s ease-out; }
.toast.warn { color: var(--bgDeep); background: var(--gold); }
.confirmDialog { max-width: 420px; padding: 24px; color: var(--text); background: var(--panel); border: 2px solid var(--gold); border-radius: var(--radius); }
.confirmDialog::backdrop { background: rgba(0,0,0,.6); }
.confirmDialog p { margin: 0 0 18px; }
.confirmActions { display: flex; justify-content: flex-end; gap: 10px; }
.charCount.warn { color: var(--red); font-weight: 700; }
.questCard { padding: 16px; display: grid; gap: 6px; align-content: start; scroll-margin-top: 90px; }
.questCard.highlight { border-color: var(--gold); }
.questCard h3, .questCard p { margin: 0; }
.questGoal { font: .9rem var(--pixelFont); color: var(--goldHi); }
.questCard .statGrid { margin: 4px 0; }
.affixTag { color: var(--gold); border-style: dashed; margin-left: 4px; }
.sourceBadge.quest { color: var(--green); border-color: var(--green); }
.sourceBadge.pet { color: #ff9ad5; border-color: #ff9ad5; }
.sourceBadge.craft { color: #8ff4ff; border-color: #8ff4ff; }

/* ---------- 도감: 펫 · 제작 ---------- */
.petGuide { margin-bottom: 24px; }
.petGuide p + p { margin-top: 8px; }
.petChances .stageTag { color: var(--grade); border-color: var(--grade); }
.itemHead .tag + .tag { margin-left: 4px; }
.petCard { scroll-margin-top: 80px; }
.petCard.highlight { border-color: var(--gold); }
.craftTable td, .craftTable th { padding: 8px; }
.affixShare { height: 12px; max-width: 520px; }
.gradeLegend { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 720px) { .gradeLegend { grid-template-columns: repeat(4, 1fr); } }
.gradeLegend a { display: grid; justify-items: center; padding: 10px; background: var(--panel); border: 2px solid var(--grade); border-radius: var(--radius); }
.gradeLegend a:hover { text-decoration: none; background: var(--panelHi); }
.gradeLegend strong { color: var(--grade); font-family: var(--pixelFont); }
#about-gear { scroll-margin-top: 80px; }
.moreCards { grid-column: 1 / -1; justify-self: center; }
.pager { align-items: center; }
.pagerInfo { margin-right: 6px; }
.rankStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 28px; margin-bottom: 16px; }
.rankStats .raceShare { margin: 0; }
.levelSpread p { margin: 0 0 6px; }
.levelSpread ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.levelSpread li { display: grid; grid-template-columns: 72px 1fr 40px; gap: 8px; align-items: center; font-size: .8125rem; color: var(--muted); }
.bandBar { height: 8px; background: var(--bgDeep); border: 1px solid var(--line); }
.bandBar span { display: block; height: 100%; background: var(--silver); }
.faq summary { font-weight: 600; }
.faq p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: .92rem; }
.adminStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.statsCard { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.statsCard:hover { border-color: var(--gold); text-decoration: none; }
.statsCard strong { font: 1.6rem/1.1 var(--pixelFont); color: var(--gold); }
.statsCard span { color: var(--muted); font-size: .85rem; }
.adminActions { margin: 20px 0 0; }
.guideSection { scroll-margin-top: 80px; }
.guideLevel { margin-bottom: 8px; font-weight: 600; }
.guideOut h3 { margin: 20px 0 10px; font-size: 1rem; color: var(--goldHi); }
.guideRaids { display: grid; gap: 10px; }
.guideExp { display: block; font-size: .85rem; color: var(--goldHi); }
.guide .featureGrid .tag { margin: 0 0 8px; }
.sortTable tr.safe { background: rgba(124,195,106,.07); }
mark { color: var(--bgDeep); background: var(--gold); border-radius: 2px; padding: 0 1px; }
.markdown a[target="_blank"]::after { content: " ↗"; font-size: .8em; }
/* 모바일: 손가락으로 누르기 쉽게 */
@media (pointer: coarse) {
  .chip, .copyButton, .tabButton, .pager a, .linkButton { min-height: 40px; }
  .copyButton, .linkButton { display: inline-flex; align-items: center; padding: 6px 12px; }
}
/* 고대비 모드: 색으로만 구분하던 상태를 테두리로 */
@media (forced-colors: active) {
  .chip.active, .tabButton.active, .siteNav a.active, .asideNav a.active { outline: 2px solid CanvasText; }
  .tag, .statusBadge, .sourceBadge, .chanceBadge { border: 1px solid CanvasText; }
  .mapFrame canvas { forced-color-adjust: none; }
}

/* ---------- 사이클 5 ---------- */
.tileBand.mapFallback { height: auto; aspect-ratio: 34 / 26; background-size: auto 20%; background-position: center; background-repeat: repeat; }
.table tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
.emptyBox { border: 2px dashed var(--line); border-radius: var(--radius); }
.compareTools { display: inline-flex; gap: 6px; }
.compareTable th:first-child { width: 120px; color: var(--muted); font-weight: 600; }
.compareTable td.best { color: var(--green); font-weight: 700; }
.compareTable thead th { vertical-align: top; }
.compareTable .linkButton { display: block; margin-top: 4px; font-size: .8125rem; }
.versionTag { margin-right: 6px; color: var(--green); border-color: var(--green); }
/* 넘치는 탭·표: 끝에 그림자로 "더 있음" 힌트 (스크롤하면 사라짐) */
.tabs, .tableWrap {
  background: linear-gradient(90deg, var(--bg) 30%, transparent) left / 24px 100% no-repeat local,
              linear-gradient(270deg, var(--bg) 30%, transparent) right / 24px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.5), transparent) left / 10px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.5), transparent) right / 10px 100% no-repeat scroll;
}
/* 도감 상세 탭 바는 스크롤해도 위에 붙는다 */
.detailTabBar { position: sticky; top: 62px; z-index: 6; background-color: var(--bg); }
.scrolled .detailTabBar { box-shadow: inset 0 -2px var(--line), 0 6px 10px -6px rgba(0,0,0,.6); }
@media (max-width: 960px) {
  .navOpen .siteNav .downloadLink, .navOpen .siteNav .loginLink { order: 10; text-align: center; padding: 14px; font-size: 1.05rem; }
  .navOpen .siteNav .loginLink { max-width: none; border: 1px solid var(--lineHi); }
}
@media (max-width: 860px) { .raidHeroInfo { order: -1; } }
@media (max-width: 640px) {
  .statsBand strong, .statsCard strong { font-size: 1.25rem; }
  .mapLabel { font-size: .65rem; padding: 1px 4px; }
}
.monsterCard strong { overflow-wrap: anywhere; }
.statGrid dd { overflow-wrap: anywhere; }
@media print {
  .markdown a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
  .toastBox, dialog { display: none !important; }
}
.benefitList { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
.benefitList li { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid var(--gold); }
.benefitList strong { font-family: var(--pixelFont); }
.benefitList span { color: var(--muted); font-size: .9rem; }

/* 로그인 왼쪽 소식 */
.authIntroBody { width: 100%; }
.authIntro .serverBadge { margin: 0 0 16px; }
.authNews { display: grid; gap: 16px; }
.authNews h2 { margin: 0 0 6px; font-size: 1rem; }
.authNews h2 a { color: var(--text); }
.authNews .postMini li { padding: 7px 0; }
.authLayout > .authCard:not(.accountCard) { align-content: center; }

/* 장비를 입은 캐릭터 (sprites.equippedSprite) · 착용 장비 창 */
.equipped { position: relative; display: inline-block; flex-shrink: 0; vertical-align: middle; }
.equipped > .sprite { position: absolute; left: 0; top: 0; }
.equipped > .lookLayer { pointer-events: none; }
.whoButton { padding: 0; font: inherit; color: inherit; text-align: inherit; background: none; border: 0; cursor: pointer; }
.whoButton:hover .who, .whoButton:focus-visible .who { color: var(--gold); text-decoration: underline; }
.who .equipped { background: var(--bgDeep); border-radius: 2px; overflow: hidden; }
.podiumStep .whoButton { display: block; }
.equipDialog { width: min(760px, calc(100vw - 32px)); }
.equipBody { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 18px; overflow-y: auto; max-height: calc(100vh - 120px); }
@media (max-width: 640px) { .equipBody { grid-template-columns: 1fr; } }
.equipLook { display: grid; justify-items: center; align-content: start; }
.equipStage { display: grid; place-items: center; width: 200px; height: 200px; background: radial-gradient(circle, var(--panelHi) 0 55%, transparent 56%); }
.equipList { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.equipList li { display: grid; grid-template-columns: 56px 1fr; gap: 4px 10px; align-items: center; }
.equipList .slotName { color: var(--muted); font-size: .85rem; }
.equipList .emptySlot { opacity: .55; }
.affixLine { grid-column: 2; color: var(--gold); font-size: .8125rem; }
.who .equipped > .sprite, .rankMini .equipped > .sprite { background: none; }

/* 좁은 화면에서 밀림 방지: 격자·줄 안의 칸이 긴 한 줄 글자(말줄임 제목 등) 때문에 화면보다 넓어지지 않게 */
.homeGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .homeGrid { grid-template-columns: minmax(0, 1fr); } }
.homeGrid > *, .twoCol > *, .loop > *, .prevNextBar > *, .authLayout > *, .boardLayout > *, .raidStrip > *, .cardGrid > *,
.shortcutGrid > *, .featureGrid > *, .raceGrid > *, .npcGrid > *, .raidGrid > *, .regionGallery > *, .rankStats > *,
.townMap > *, .raidHero > *, .playTop > * { min-width: 0; }
.postMini li > a, .postMini li > span:first-child, .rankMini li a > .name, .asideList li > a { min-width: 0; }
.postMini li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .raidGrid, .npcGrid { grid-template-columns: minmax(0, 1fr); } }
.boardAside > *, .authIntroBody, .authNews > *, .boardMain, .postList li, .postList a > * { min-width: 0; }
.postTitle { min-width: 0; }
.asideList li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asideList, .placeList, .stageBlocks, .bossSkills, .equipList, .benefitList, .guideRaids, .chipList { grid-template-columns: minmax(0, 1fr); }
/* 숨김 글자(.srOnly)는 절대 위치라, 말줄임으로 잘린 제목 안에 있어도 잘리지 않고 문서 폭을 늘린다 → 배지 안에 가둔다 */
.newBadge, .answeredMark { position: relative; }
/* 상태 배지·날짜·작성자는 줄어들지 않게 (좁은 화면에서 "반영 완료"가 잘리지 않게) */
.statusBadge, .postList time, .feedbackList .author, .postMini time, .asideList time, .tag { flex-shrink: 0; min-width: max-content; }
/* 그래도 어떤 요소가 넘치면 화면 밖으로 밀지 않고 잘라 둔다 (모바일 브라우저는 body 의 overflow-x 를 무시한다) */
main { overflow-x: clip; }

/* 쉽게 쓰기 사이클 1: 새 글 표시 "새" */
.newBadge { width: auto; padding: 0 4px; font-family: var(--bodyFont); }

/* 쉽게 쓰기 사이클 2: 묶음 탭 · 메뉴 */
.groupTabs { margin: -8px 0 20px; }
.groupTabs a { font-size: .95rem; }
.panelLink { color: var(--text); }
.panelLink:hover { color: var(--gold); text-decoration: none; }
.siteNav .downloadLink { background: var(--gold); color: var(--bgDeep); border-color: var(--gold); }
.siteNav .downloadLink:hover { background: var(--goldHi); color: var(--bgDeep); }
@media (max-width: 960px) {
  .navOpen .siteNav .downloadLink { order: -1; margin-bottom: 6px; }
  .topButton { width: 38px; height: 38px; right: 12px; bottom: 12px; }
}
.backLink { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; color: var(--text); background: var(--panel);
  border: 2px solid var(--control, var(--line)); border-radius: var(--radius); font-size: .95rem; }
.backLink:hover { color: var(--gold); border-color: var(--gold); }
.detailBar { float: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0 0 10px; }

/* 쉽게 쓰기 사이클 3: 필터 줄 · 카드 */
.filterBar { margin-bottom: 12px; }
.filterBar .toolbar { margin-bottom: 0; }
.filterBar .toolbar input[type="search"] { flex: 1 1 240px; }
.moreFilters { margin-top: 10px !important; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.moreToggle { white-space: nowrap; }
.resetFilters { font-size: .85rem; }
.itemCard .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.moreStats { margin: -8px 0 16px; }
.moreStats summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.moreStats[open] summary { margin-bottom: 8px; }
.savedRow .linkButton { margin-left: auto; font-size: .8125rem; color: var(--muted); }
.guideLevel { display: flex; align-items: center; gap: 8px; }
.stepButton { min-width: 40px; font-size: 1.1rem; }
.filterRow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.filterRow .chips { margin: 0; }
.filterRow .mineChip { margin-left: 0; }
.questReward { color: var(--goldHi); font-size: .9rem; }
.skillNeeds { margin: auto 0 0; color: var(--muted); font-size: .85rem; }

/* ---------- 쉽게 쓰기 사이클 4: 글자·터치·모바일 ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sortTable td, .sortTable th, .ranking td, .statGrid dd, .compareTable td { font-variant-numeric: tabular-nums; }
.sortTable td:not(:first-child), .dropTable td:not(:first-child) { white-space: nowrap; }
.markdown { line-height: 1.75; }
.markdown p { margin: 0 0 .9em; }
@media (max-width: 640px) {
  .chip, .button, .copyButton, .tabButton, .tabs a, .pager a, .stepButton, .padButton { min-height: 44px; }
  .copyButton { display: inline-flex; align-items: center; padding: 6px 12px; }
  .input, select.input { font-size: 16px; }              /* 휴대폰이 입력칸을 누를 때 화면을 확대하지 않게 */
  .heroParty .sprite { width: 48px !important; height: 48px !important; }
  .heroInner { padding-top: 20px; }
  .heroTitle img { width: 200px; }
  .cardGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cardGrid.wide { grid-template-columns: minmax(0, 1fr); }
  .monsterCard { padding: 10px 6px; }
  .detailHero { gap: 12px; padding: 14px; }
  .detailMedia { min-width: 0; min-height: 0; padding: 0; }
  .detailMedia .monsterSprite, .detailMedia .sprite { width: 88px !important; height: 88px !important; }
  .detailTitle h1, .raidHeroInfo h1 { font-size: 1.4rem; }
  .ranking thead { display: none; }
  .ranking td { padding: 8px 4px; }
  .who { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .feedbackList .author { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .filterBar .toolbar > * { flex: 1 1 100%; }
  .filterBar .toolbar > .moreToggle { flex: 0 0 auto; }
  .footerMap div:nth-child(2) { display: none; }      /* 도감 칸은 위 메뉴로 충분 */
  .footerInner { padding: 18px 16px; gap: 12px; }
  .mapDialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .chips { background: linear-gradient(90deg, var(--bg) 30%, transparent) left / 24px 100% no-repeat local,
    linear-gradient(270deg, var(--bg) 30%, transparent) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.5), transparent) left / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.5), transparent) right / 10px 100% no-repeat scroll; }
}
@media (max-width: 640px) {
  .codexSummary { display: none; }
  .savedRows { padding: 8px 10px; margin-bottom: 14px; }
  .savedRow { flex-wrap: nowrap; }
  .savedRow > strong { min-width: auto; white-space: nowrap; }
  .savedRow .chipList { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .savedRow .entityChip { flex-shrink: 0; }
  .filterBar .toolbar > select { flex: 1 1 calc(50% - 6px); }
}
@media (max-width: 640px) { .filterBar .toolbar > select { min-width: 0; } }

/* 랭킹 시상대: 1위가 가장 돋보이게 (2026-10-08) — 넓은 가운데 칸 · 금빛 · 닉네임 말줄임 없음, 2·3위는 차분하게 */
.podium { grid-template-columns: 1fr 1.3fr 1fr; }
.podiumStep.r1 { position: relative; padding-top: 26px; padding-bottom: 40px; border-color: var(--gold); border-width: 3px;
  background: linear-gradient(180deg, rgba(242,182,90,.28), rgba(242,182,90,.06) 70%, var(--panel));
  box-shadow: 0 0 0 1px rgba(242,182,90,.35), 0 0 28px rgba(242,182,90,.30); }
.podiumStep.r1::before { content: "♛"; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  color: var(--gold); font-size: 1.6rem; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.5); font-family: system-ui, sans-serif; }
.podiumStep.r1 strong { color: var(--gold); font-size: 1.15rem; white-space: normal; overflow-wrap: anywhere; }
.podiumStep.r1 .rankNo { width: 34px; height: 34px; font-size: 1rem; }
.podiumStep.r2 { padding-bottom: 18px; border-color: rgba(201,209,230,.35); }
.podiumStep.r3 { padding-bottom: 10px; border-color: rgba(208,138,82,.35); }
.podiumStep.r2 strong, .podiumStep.r3 strong { font-size: .9rem; color: var(--text); }
.podiumStep.r2 .sprite, .podiumStep.r3 .sprite { opacity: .92; }
@media (max-width: 640px) {
  .podium { gap: 8px; grid-template-columns: 1fr 1.4fr 1fr; }
  .podiumStep { padding-left: 4px; padding-right: 4px; }
  .podiumStep.r1 .sprite { width: 88px !important; height: 88px !important; }
  .podiumStep.r2 .sprite, .podiumStep.r3 .sprite { width: 56px !important; height: 56px !important; }
  .podiumStep.r1 strong { font-size: 1rem; }
  .podiumStep.r2 strong, .podiumStep.r3 strong { font-size: .8125rem; }
}

/* 장비 창 펫 줄 */
.equipList .petSlot { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); grid-template-columns: 56px 1fr auto; }
.petState { font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.petState.on { color: var(--gold); }
@media (max-width: 640px) { .equipList .petSlot { grid-template-columns: 56px minmax(0, 1fr); } .petState { grid-column: 2; } }
