/* 너울섬 웹사이트 — 기본 스타일
   팔레트는 AGENTS.md 파스텔 정본을 그대로 씁니다. */

@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/pretendard-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/pretendard-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('/assets/fonts/pretendard-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galmuri11';
  src: url('/assets/fonts/galmuri11-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #fbf3ea;
  --cream: #fdf8f0;
  --cream-edge: #e7d8c4;
  --blush: #f3dcd4;
  --blush-edge: #e4c9c1;
  --sage: #e1eddd;
  --sage-edge: #cbdcc6;
  --butter: #f6d79b;
  --butter-edge: #dec08a;
  --coral: #f0a9a2;
  --lavender: #c9b8e0;
  --ink: #4e4238;
  --muted: #7a6b5e;
  --hairline: #e3d5c6;
  --shadow-sm: 0 1px 2px rgba(78, 66, 56, 0.06), 0 2px 8px rgba(78, 66, 56, 0.05);
  --shadow-md: 0 2px 4px rgba(78, 66, 56, 0.06), 0 10px 28px rgba(78, 66, 56, 0.08);
  --radius-card: 18px;
  --radius-btn: 12px;
  --radius-chip: 999px;
  --step: 24px;
  --font-body: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-pixel: 'Galmuri11', 'Pretendard', monospace;
  --wrap: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid #6f5c9c;
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cream);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-btn) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── 헤더 ───────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 243, 234, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  border: 1px solid var(--cream-edge);
  color: var(--ink);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--cream);
}

.site-nav a.is-active {
  color: var(--ink);
  background: var(--butter);
  box-shadow: inset 0 -2px 0 var(--butter-edge);
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
    margin: 0 0 8px;
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-wrap: wrap;
    gap: 2px;
  }
  .site-nav a {
    padding: 9px 12px;
  }
}

/* ── 페이지 골격 ─────────────────────────────────────── */

main {
  display: block;
  padding: 32px 0 64px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.page-head h1 {
  font-family: var(--font-pixel);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.01em;
}

.page-head .lede {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}

.section {
  margin-top: 48px;
}

.section > h2 {
  font-family: var(--font-pixel);
  font-size: 20px;
  margin-bottom: 16px;
}

/* ── 카드 / 패널 ─────────────────────────────────────── */

.card {
  background: var(--cream);
  border: 1px solid var(--cream-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card--flat {
  box-shadow: none;
}

.grid {
  display: grid;
  gap: var(--step);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ── 버튼 / 칩 ───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--butter-edge);
  background: var(--butter);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}

.btn:hover {
  background: #f2cf8a;
}

.btn--ghost {
  background: var(--cream);
  border-color: var(--cream-edge);
}

.btn--ghost:hover {
  background: #fff;
}

.btn--small {
  padding: 7px 12px;
  min-height: 36px;
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--hairline);
  background: var(--cream);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--cream-edge);
}

.chip[aria-pressed='true'],
.chip.is-active {
  background: var(--butter);
  border-color: var(--butter-edge);
  color: var(--ink);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-chip);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--hairline);
  background: var(--canvas);
  color: var(--muted);
  white-space: nowrap;
}

.tag--sage {
  background: var(--sage);
  border-color: var(--sage-edge);
  color: #3f5238;
}
.tag--blush {
  background: var(--blush);
  border-color: var(--blush-edge);
  color: #7a4640;
}
.tag--butter {
  background: var(--butter);
  border-color: var(--butter-edge);
  color: #5e4a1f;
}
.tag--lavender {
  background: #ece6f6;
  border-color: var(--lavender);
  color: #55407a;
}

/* ── 폼 ─────────────────────────────��───────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--cream-edge);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  min-height: 44px;
  width: 100%;
}

.input::placeholder {
  color: #9a8b7d;
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-row .input {
  flex: 1 1 240px;
}

/* ── 상태 / 신선도 ───────────────────────────────────── */

.freshness {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.freshness .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fbf83;
  flex: 0 0 auto;
}

.freshness[data-state='stale'] .dot {
  background: var(--butter-edge);
}
.freshness[data-state='error'] .dot {
  background: var(--coral);
}
.freshness[data-state='loading'] .dot {
  background: var(--lavender);
}

.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--cream-edge);
  background: var(--cream);
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.notice-bar strong {
  color: var(--ink);
}

.notice-bar--stale {
  background: #fdf6e6;
  border-color: var(--butter-edge);
}

.notice-bar--error {
  background: #fdf0ee;
  border-color: var(--blush-edge);
  color: #7a4640;
}

.empty-state {
  border: 1px dashed var(--cream-edge);
  border-radius: var(--radius-card);
  background: rgba(253, 248, 240, 0.6);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14.5px;
  max-width: 48ch;
  margin: 0 auto;
}

.skeleton {
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, #f4eadd 25%, #faf3e9 50%, #f4eadd 75%);
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
  min-height: 96px;
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* ── 홈 ─────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--cream-edge);
  background: var(--cream);
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-body {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  padding: 24px;
}

@media (max-width: 900px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
}

.connect-card {
  background: var(--cream);
  border: 1px solid var(--cream-edge);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.address-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
}

.address-display .addr {
  font-family: var(--font-pixel);
  font-size: clamp(18px, 2.4vw, 22px);
  letter-spacing: 0.04em;
  color: var(--ink);
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
}

.stat .k {
  font-size: 13px;
  color: var(--muted);
}

.stat .v {
  font-family: var(--font-pixel);
  font-size: 20px;
  margin-top: 2px;
}

.copy-feedback {
  font-size: 13px;
  color: #4b6b42;
  min-height: 20px;
}

.steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  color: var(--muted);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--sage);
  border: 1px solid var(--sage-edge);
  color: #3f5238;
  font-weight: 700;
  font-size: 13px;
}

.steps li strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
}

/* ── 목록 / 공지 ─────────────────────────────────────── */

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-item a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--cream-edge);
  background: var(--cream);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.notice-item a:hover {
  border-color: var(--butter-edge);
  background: #fffdf8;
}

.notice-item .title {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notice-item .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.notice-item .arrow {
  color: var(--muted);
  font-size: 18px;
}

.prose {
  font-size: 16px;
  line-height: 1.8;
  color: #41372e;
}

.prose > * + * {
  margin-top: 16px;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--font-pixel);
  margin-top: 32px;
  font-size: 19px;
}

.prose h1 {
  font-size: 22px;
}
.prose h3 {
  font-size: 17px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  color: #6a4f92;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 1px 6px;
}

.prose pre {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  overflow-x: auto;
}

.prose pre code {
  border: 0;
  background: none;
  padding: 0;
}

.prose blockquote {
  margin: 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--lavender);
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border: 1px solid var(--hairline);
  padding: 8px 12px;
  text-align: left;
}

.prose th {
  background: var(--canvas);
}

.prose img {
  border-radius: var(--radius-btn);
}

/* ── 표 ─────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--cream-edge);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

@media (max-width: 640px) {
  table.data {
    min-width: 0;
    font-size: 14px;
  }
  table.data th,
  table.data td {
    padding: 10px 12px;
  }

  /* 안내 표는 좁은 화면에서 행 하나를 카드처럼 세로로 풉니다. */
  table.data.stackable {
    display: block;
  }
  .stackable thead {
    display: none;
  }
  .stackable tbody {
    display: block;
  }
  .stackable tbody tr {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
  }
  .stackable tbody tr:last-child {
    border-bottom: 0;
  }
  .stackable tbody th,
  .stackable tbody td {
    display: block;
    border: 0;
    padding: 0;
  }
  .stackable tbody th {
    font-size: 15.5px;
    margin-bottom: 4px;
  }
  .stackable tbody td {
    color: var(--muted);
    font-size: 14px;
  }
  .stackable tbody td:empty {
    display: none;
  }
  .stackable tbody td.num {
    text-align: left;
  }
  .stackable tbody td[data-label]::before {
    content: attr(data-label) ' · ';
    color: var(--muted);
    font-weight: 400;
  }
  .stackable .item-label .item-id {
    margin-top: 4px;
  }
}

table.data caption {
  text-align: left;
  padding: 14px 18px 0;
  color: var(--muted);
  font-size: 13.5px;
}

table.data th,
table.data td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}

table.data thead th {
  background: var(--canvas);
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

table.data tbody tr:last-child th,
table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: #fffdf8;
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* 상점 품목 라벨: 이름이 주 라벨, itemId 는 보조 힌트 */
.item-label .item-name {
  display: block;
}

.item-label .item-amount {
  margin-left: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.item-label .item-id {
  display: block;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.01em;
  word-break: break-all;
}

.item-label.is-unlocalized .item-name {
  color: var(--muted);
  font-weight: 500;
}

.item-label .item-note {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--muted);
}

.rank-badge[data-rank='1'] {
  background: var(--butter);
  border-color: var(--butter-edge);
  color: #5e4a1f;
}
.rank-badge[data-rank='2'] {
  background: #ece6f6;
  border-color: var(--lavender);
  color: #55407a;
}
.rank-badge[data-rank='3'] {
  background: var(--blush);
  border-color: var(--blush-edge);
  color: #7a4640;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 14px;
  background: var(--cream);
  border: 1px solid var(--cream-edge);
}

.tab {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 42px;
}

.tab:hover {
  color: var(--ink);
  background: #fff;
}

.tab[aria-selected='true'] {
  background: var(--butter);
  border-color: var(--butter-edge);
  color: var(--ink);
}

/* ── 프로필 ─────────────────────────────────────────── */

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1px solid var(--cream-edge);
  background: var(--canvas);
  image-rendering: pixelated;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 15px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-weight: 600;
}

.search-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--cream-edge);
  background: #fff;
  text-decoration: none;
  font-weight: 600;
}

.search-results a:hover {
  background: var(--cream);
}

/* ── 거래소 ─────────────────────────────────────────── */

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-card);
  border: 1px solid var(--cream-edge);
  background: var(--cream);
  box-shadow: var(--shadow-sm);
}

.item-card h3 {
  font-size: 16px;
}

.item-card .price {
  font-family: var(--font-pixel);
  font-size: 17px;
  color: #5e4a1f;
}

.item-card .sub {
  font-size: 13.5px;
  color: var(--muted);
}

.item-card .spacer {
  margin-top: auto;
}

.honor {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--lavender);
  background: linear-gradient(180deg, #f7f2fb 0%, #fdf8f0 100%);
  box-shadow: var(--shadow-sm);
}

.honor .round {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: #55407a;
}

.honor .state-label {
  font-size: 13px;
  color: var(--muted);
}

/* 입찰이 없는 라운드: 0 처럼 보이는 숫자 대신 상태 문구를 같은 자리에 둡니다. */
.honor .honor-nobid {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 640px) {
  .honor {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── 지도 ───────────────────────────────────────────── */

.map-page main {
  padding-bottom: 32px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-frame {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--cream-edge);
  background: var(--sage);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

#map {
  height: clamp(360px, 62vh, 720px);
  width: 100%;
  background: #d9e6d3;
}

@media (max-width: 1024px) {
  #map {
    height: 58vh;
    min-height: 320px;
  }
}

.map-hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-chip);
  background: rgba(253, 248, 240, 0.94);
  border: 1px solid var(--cream-edge);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* 타일 서버(meta.json) 를 받지 못했을 때 지도 위에 남기는 운영자 안내 */
.tile-origin-error {
  position: absolute;
  inset: auto 12px 56px 12px;
  z-index: 600;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--blush-edge);
  background: #fdf0ee;
  color: #7a4640;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}

.tile-origin-error strong {
  display: block;
  color: #5f312c;
  font-size: 15px;
}

.tile-origin-error code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(78, 66, 56, 0.08);
  word-break: break-all;
}

.tile-origin-error p {
  margin: 0;
}

/* 표에서 서버가 아직 보내지 않은 값 자리 (빈 칸 대신 남기는 정직한 표시) */
.cell-pending {
  color: var(--muted);
  font-size: 13px;
}

.guide-id {
  display: block;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: -0.01em;
  word-break: break-all;
}

/* 설명 보조 토큰: 출처 슬러그(itemsadder·mmoitems)를 본문이 아니라 작은 라벨로만 붙입니다. */
.guide-source {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-chip);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  vertical-align: 1px;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.map-toolbar .segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--cream-edge);
  gap: 4px;
}

.map-toolbar .segmented button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
}

.map-toolbar .segmented button[aria-pressed='true'] {
  background: var(--butter);
  border-color: var(--butter-edge);
  color: var(--ink);
}

.coord-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.coord-form .input {
  width: 168px;
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .map-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .map-toolbar .segmented {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .coord-form {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .coord-form .input {
    width: 100%;
    min-width: 0;
  }
  #copy-link {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.map-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-side h2 {
  font-size: 15px;
  font-family: var(--font-pixel);
  margin-bottom: 10px;
}

.marker-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}

.marker-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: 38px;
}

.marker-list button:hover {
  background: var(--canvas);
  border-color: var(--hairline);
}

.marker-list .coord {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.leaflet-container {
  font-family: var(--font-body);
  background: #cfe0cb;
}

.leaflet-container .leaflet-control-attribution {
  background: rgba(253, 248, 240, 0.9);
  color: var(--muted);
  font-size: 11px;
}

.leaflet-container .leaflet-control-attribution a {
  color: #6a4f92;
}

.leaflet-bar a {
  color: var(--ink);
  background: var(--cream);
  border-bottom-color: var(--hairline);
}

.leaflet-bar a:hover {
  background: #fff;
}

/* 최소/최대 줌에서 비활성화된 확대·축소 버튼 (비활성 컨트롤이라 대비 기준 예외) */
.leaflet-bar a.leaflet-disabled {
  color: #6f6156;
  background: var(--hairline);
  cursor: not-allowed;
}

.map-pin-label {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(253, 248, 240, 0.95);
  border: 1px solid var(--cream-edge);
  border-radius: 8px;
  padding: 2px 7px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.map-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(78, 66, 56, 0.35);
}

.chip .map-dot {
  width: 9px;
  height: 9px;
  border-width: 1px;
  box-shadow: none;
}

.map-dot--spawn {
  background: #d99a68;
}
.map-dot--shop {
  background: #e2b45f;
}
.map-dot--dungeon {
  background: #c98f9f;
}
.map-dot--quest {
  background: #8fb583;
}
.map-dot--landmark {
  background: #9e8bc4;
}
/* 카테고리 없는 Essentials 워프 */
.map-dot--default {
  background: #7fb2c9;
}
/* WorldGuard 직육면체 영역 */
.map-dot--cuboid {
  background: #c9b8e0;
}
/* exporter 대체값: warp / region */
.map-dot--warp {
  background: #7fb2c9;
}
.map-dot--region {
  background: #c9b8e0;
}
/* 목록에 없는 카테고리: 투명 원이 아니라 중립 회색 점으로 보이게 합니다. */
.map-dot--unknown {
  background: #7a6b5e;
}

.map-pin {
  filter: drop-shadow(0 2px 3px rgba(78, 66, 56, 0.35));
}

/* ── 푸터 ───────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--cream);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

.site-footer a:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── 유틸 ───────────────────────────────────────────── */

.muted {
  color: var(--muted);
}
.small {
  font-size: 13.5px;
}
.mt-24 {
  margin-top: 24px;
}
.mt-48 {
  margin-top: 48px;
}
.hidden {
  display: none !important;
}

.loading-block {
  display: grid;
  gap: 12px;
}
