/* =====================================================================
   잠든 숲 화면 스타일
   색은 아래 :root 에서만 정한다. 바꾸고 싶으면 여기 값만 고치면 된다.
   (디자인 가이드: 메인 #5B9E7A · 보조 #A7D7B3 · 포인트 #F7D7E6 · 배경 #DFF4FF)
   ===================================================================== */

:root {
  --main: #5B9E7A;        /* 메인 컬러: 버튼, 태그, 고른 탭 */
  --main-deep: #3F7D5D;   /* 진한 초록: 제목, 강조 */
  --sub: #A7D7B3;         /* 보조 컬러: 연한 초록 칸, 테두리 */
  --sub-soft: #E4F3E6;    /* 아주 연한 초록: 고른 탭 바탕, 마우스를 올렸을 때 */
  --point: #F7D7E6;       /* 포인트 컬러: 경고 칸, 꽃 */
  --sky: #DFF4FF;         /* 배경 컬러: 하늘 */

  --ink: #2c4a3b;         /* 글씨: 진한 숲색 */
  --ink-soft: #5E7F70;    /* 흐린 글씨 */
  --hint: #8EA79B;        /* 아주 흐린 글씨 */
  --bad: #E0606B;         /* 나쁜 상태, 경고 */
  --bad-soft: #FDEEF2;    /* 경고 칸 바탕 */
  --good: #3E8F65;        /* 좋은 상태 */

  --glass: rgb(255 251 242 / 0.95);        /* 크림색 카드 */
  --glass-strong: #fffdf7;                 /* 진한 크림 (행동 줄) */
  --glass-line: rgb(255 255 255 / 0.85);
  --line: rgb(150 128 84 / 0.18);          /* 구분선 */
  --shadow: 0 6px 24px rgb(62 110 90 / 0.12);

  /* 4단계 디자인: 크림 카드 · 진한 초록 · 세이지, 말랑하게 부풀어 오른 입체감 */
  --cream: #fffaf0;
  --cream-2: #f8efdc;
  --cream-edge: #e9dcc0;
  --forest: #2c4a3b;
  --sage: #8fb49a;
  --paper: #fbfcf9;       /* 바탕: 눈이 편한 흰색 (단색) */
  --card: #ffffff;
  --card-line: #e3ebe0;
  --sage-band: #eef4ec;   /* 제목 띠 */
  --sage-band-2: #e2ede0;
  --puff: inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 -3px 0 rgb(214 199 166 / 0.3), 0 2px 0 rgb(214 199 166 / 0.55), 0 10px 26px rgb(76 92 62 / 0.12);
  --puff-sm: inset 0 1px 0 #fff, inset 0 -2px 0 rgb(214 199 166 / 0.35), 0 3px 0 rgb(214 199 166 / 0.65), 0 6px 12px rgb(76 92 62 / 0.08);
  --puff-press: inset 0 2px 4px rgb(160 140 100 / 0.25), 0 1px 0 rgb(214 199 166 / 0.6);

  --radius: 18px;
  --radius-sm: 10px;
  --font: "Pretendard", "Pretendard Variable", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --side: 40px;           /* 화면 양옆 여백 */
}

* { box-sizing: border-box; }


body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  /* 하늘 → 구름 → 풀밭 (그림은 components 폴더) */
  background: transparent;
}

/* 하늘은 html 바탕, 구름과 풀밭은 화면에 붙어 있는 그림 판.
   화면 비율과 상관없이 풀밭은 항상 화면 맨 아래, 구름은 맨 위에 있다. (휴대폰에서도 같다) */
html { background: var(--paper); }
body::before, body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}
body::before, body::after { content: none; }

a { color: var(--main-deep); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; }

.quiet { color: var(--ink-soft); }
.hint { color: var(--hint); }
.small { font-size: 0.85rem; }

.icon { width: 22px; height: 22px; flex: none; }

/* 유리처럼 비치는 칸 */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ---------- 머리 ---------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 20px var(--side) 0;
  padding: 10px 24px;
  position: sticky;
  top: 12px;
  z-index: 10;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--main-deep);
  text-decoration: none;
  white-space: nowrap;
}
.logo-sprig { width: 24px; height: 26px; }
.logo-sprig.flip { transform: scaleX(-1); }

.site-nav { display: flex; gap: 8px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--main-deep); }
.site-nav a[aria-current="page"] { color: var(--main-deep); border-color: var(--main); }
.site-nav .icon { width: 20px; height: 20px; }

.account-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--main-deep);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover { background: rgb(91 158 122 / 0.12); }

/* ---------- 일반 화면 (로그인, 공지 등) ---------- */
main { flex: 1; width: 100%; }
main:focus { outline: none; }

.page {
  width: calc(100% - 32px);
  max-width: 640px;
  margin: 32px auto 48px;
  padding: 32px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

h1 { font-size: 1.6rem; line-height: 1.3; margin: 0 0 14px; color: var(--main-deep); }
h2 { font-size: 1.1rem; margin: 28px 0 10px; color: var(--main-deep); }

.panel {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
}

/* ---------- 입력 ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .chat-form input, .set-input input, .tag-input {
  font: inherit;
  color: var(--ink);
  padding: 10px 40px 10px 14px;
  border: 1px solid var(--sub);
  border-radius: var(--radius-sm);
  /* 오른쪽 끝의 작은 잎사귀 (디자인 가이드의 입력창) */
  background: var(--glass-strong) url("components/sprig.svg") right 12px center / 14px auto no-repeat;
}
.field input:focus, .chat-form input:focus, .set-input input:focus { border-color: var(--main); outline: none; box-shadow: 0 0 0 3px rgb(167 215 179 / 0.45); }
.field .hint { font-size: 0.8rem; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.check input { margin-top: 5px; accent-color: var(--main); }

/* 기본 버튼 / 보조 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 22px;
  border: 1px solid var(--main);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #6CAE89, var(--main));
  color: #fff;
  box-shadow: 0 2px 6px rgb(62 125 93 / 0.25);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn .icon { width: 18px; height: 18px; }
.quiet-btn { background: var(--glass-strong); color: var(--main-deep); box-shadow: none; }
.danger-btn { background: var(--glass-strong); color: var(--bad); border-color: var(--bad); box-shadow: none; }
.small-btn { padding: 6px 14px; font-size: 0.9rem; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn.strong { color: var(--main-deep); font-weight: 600; }

.row-end { display: flex; justify-content: flex-end; gap: 8px; }

/* 안내 / 경고 메시지 */
.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  border: 1px solid var(--sub);
  margin: 0 0 16px;
}
.notice.error { border-color: #F2B6C4; background: var(--bad-soft); color: var(--bad); }
.notice.error::before { content: "!"; font-weight: 800; }
.notice:empty { display: none; }

/* ---------- 캐릭터 목록 ---------- */
.char-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.char-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.char-list a:hover { border-color: var(--main); }
.char-name { font-size: 1.15rem; font-weight: 700; color: var(--main-deep); }

/* =====================================================================
   플레이 화면: [왼쪽 프로필·메뉴 | 가운데 칸 | 오른쪽 소지품]
   ===================================================================== */
.play {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
  margin: 20px var(--side) 40px;
}
.play-side { display: grid; gap: 16px; position: sticky; top: 96px; }

/* 오른쪽 소지품 칸: 늘 떠 있고, 길면 칸 안에서 스크롤 */
.inv-side {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding: 16px 16px 18px;
  overscroll-behavior: contain;
}
.inv-sheet-head { display: none; }
.items-title { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 1.1rem; }
.bag-title { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin: 16px 0 8px; }
.inv-side .item-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.inv-side .item-tile { padding: 10px 4px 8px; border-radius: 12px; }
.inv-side .item-tile .item-icon { width: 34px; height: 34px; margin-bottom: 2px; }
.inv-side .item-name { font-size: 0.8rem; }
.inv-side .item-detail { flex-direction: column; gap: 6px; padding: 12px 14px; }
.inv-side .item-detail-icon { display: none; }

/* 체력·정신력 막대 */
.pools { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pool { display: grid; grid-template-columns: 3.6em 1fr auto; align-items: center; gap: 8px; font-size: 0.85rem; }
.pool-name { font-weight: 600; color: var(--ink); }
.pool-track { height: 8px; border-radius: 999px; background: rgb(91 158 122 / 0.15); overflow: hidden; }
.pool-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8FCB9C, var(--main)); }
.pool[data-pool="spirit"] .pool-fill { background: linear-gradient(90deg, #A9D6F2, #6FAFD8); }
.pool[data-low] .pool-fill { background: linear-gradient(90deg, #F4A9B4, var(--bad)); }
.pool-value { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* 휴대폰 아래쪽 메뉴 막대 (넓은 화면에서는 숨김) */
.bottom-bar { display: none; }

/* 진행 막대 */
.progress { display: block; height: 6px; margin: 8px 0 6px; border-radius: 999px; background: rgb(91 158 122 / 0.15); overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8FCB9C, var(--main)); transition: width 0.6s ease; }
.busy-main { flex: 1; min-width: 0; }

/* [?] 설명 */
.with-help { display: flex; align-items: center; gap: 8px; }
.help { position: relative; display: inline-flex; }
.help-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--sub);
  background: #fff;
  color: var(--main-deep);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}
.help-pop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: -12px;
  width: min(340px, 80vw);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--sub);
  background: rgb(255 255 255 / 0.97);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.12s;
}
.help-pop strong { display: block; margin-bottom: 4px; color: var(--main-deep); }
.help-pop ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.help:hover .help-pop, .help:focus-within .help-pop { visibility: visible; opacity: 1; }

.view-title { font-size: 1.3rem; margin: 0 0 12px; }
.view-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 30px; }
.view-head .view-title { margin: 0; }

/* 프로필 카드 */
.profile { padding: 22px 22px 18px; position: relative; }
.profile::after, .stage::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 36px;
  background: url("components/sprig.svg") center / contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
}
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }

.avatar {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  /* 사진이 없을 때: 무지갯빛 동그라미 */
  background: conic-gradient(from 210deg, #A7D7B3, #9FD3F0, #C9B8F0, #F7D7E6, #F6E3A8, #A7D7B3);
  box-shadow: 0 2px 8px rgb(62 110 90 / 0.2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .avatar-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2px 0 6px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgb(47 89 71 / 0.7);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}
.avatar:hover .avatar-hint, .avatar:focus-visible .avatar-hint { opacity: 1; }
.avatar[aria-busy="true"] { opacity: 0.6; cursor: wait; }

.profile-name { font-size: 1.55rem; font-weight: 700; line-height: 1.2; margin: 0; }
.profile-days { margin: 4px 0 0; font-size: 0.9rem; color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; list-style: none; }
.tags li {
  padding: 2px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #6CAE89, var(--main));
  border: 1px solid #4E9170;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
.tags-empty { color: var(--hint); font-size: 0.85rem; margin: 0 0 14px; }

.vitals { border-top: 1px solid var(--line); padding-top: 12px; font-size: 0.9rem; color: var(--ink-soft); }
.vitals-row { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
.numbers > span + span::before { content: " · "; color: var(--hint); }

.condition { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.condition-label { font-weight: 600; color: var(--ink-soft); }
.effect { font-weight: 600; color: var(--ink-soft); }
.effect[data-kind="good"] { color: var(--good); }
.effect[data-kind="bad"] { color: var(--bad); }



/* 가운데 칸 */
.stage { padding: 20px 24px 8px; position: relative; min-width: 0; }

.stage-content { line-height: 1.75; }

/* 행동 줄: [아이콘 이름 ... 오른쪽 글자] */
.rows { display: grid; gap: 10px; }
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.45;
}
.row:hover:not(:disabled) { border-color: var(--main); background: #fff; }
.row:disabled { cursor: not-allowed; }
.row:disabled .row-name { color: var(--hint); }
.row-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--main); flex: none; }
.row-icon .item-icon { width: 30px; height: 30px; }
.row-main { display: grid; flex: 1; min-width: 0; }
.row-name { font-weight: 600; font-size: 1.02rem; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-sub { font-size: 0.82rem; color: var(--ink-soft); }
.row-meta { font-size: 0.82rem; color: var(--ink-soft); text-align: right; max-width: 50%; }
.row:disabled .row-meta { color: var(--hint); }
.row { flex-wrap: wrap; row-gap: 2px; }
.row-meta.long { order: 3; max-width: none; flex-basis: 100%; padding-left: 44px; text-align: left; }
.row-strong { border: 1px solid var(--main); background: linear-gradient(180deg, #F2FAF4, #E1F3E6); margin-bottom: 12px; }

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 8px;
  border: 1px solid var(--sub);
  border-radius: 999px;
  background: #fff;
  color: var(--main-deep);
}
.chip.here { background: var(--main); border-color: var(--main); color: #fff; }

/* 알림 (빨간 줄) */
.advice {
  margin: 0 0 14px;
  padding: 11px 16px;
  border-left: 4px solid var(--bad);
  border-radius: 0 12px 12px 0;
  background: var(--glass-strong);
  color: var(--bad);
  font-weight: 600;
}

/* 도와주기 (경고 메시지 칸) */
.callout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--bad-soft);
  border: 1px solid #F2B6C4;
  border-radius: 12px;
}
.callout p { margin: 0; flex: 1; font-weight: 600; color: #B9475A; }
.callout-icon { color: var(--bad); display: grid; }

/* 하고 있는 일 */
.busy {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px solid var(--sub);
  border-radius: 12px;
  background: linear-gradient(180deg, #F4FBF6, #E6F5EA);
}
.busy p { margin: 0; }
.busy-title { font-weight: 600; }

.place { margin-bottom: 14px; }
.place p { margin: 0; }
.sky { color: var(--ink-soft); font-size: 0.9rem; }
.place-name { font-size: 1.3rem; font-weight: 700; color: var(--main-deep); margin: 4px 0 2px !important; }
.place-desc { color: var(--ink); }
.prompt { font-weight: 600; margin: 18px 0 10px; }

.section-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 26px 0 8px; }
.section-title.first { margin-top: 0; }

.map-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.map-list li { display: flex; gap: 14px; align-items: center; padding: 10px 18px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px; }
.map-list li[data-here] { border-color: var(--main); }

.journal { margin: 8px 0 18px; }
.journal ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 0.92rem; color: var(--ink-soft); }
.journal li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; }
.journal time { color: var(--hint); font-variant-numeric: tabular-nums; }

/* 이끌림·부탁 */
.quest { background: var(--glass-strong); border: 1px solid var(--sub); border-radius: 12px; padding: 14px 18px; margin: 0 0 10px; }
.quest-title { margin: 0 0 8px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.quest-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 0.95rem; }
.quest-steps li { display: flex; gap: 8px; }
.quest-steps li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 6px; border: 1.5px solid var(--sub); border-radius: 4px; background: #fff; }
.quest-steps li[data-done] { color: var(--hint); text-decoration: line-through; }
.quest-steps li[data-done]::before { background: var(--main) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; border-color: var(--main); }
.done-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--ink-soft); }
.done-list li { display: flex; gap: 8px; align-items: center; }

/* 소지품 */
.items-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.items-head p { margin: 0; }
.bag .section-title { display: flex; justify-content: space-between; align-items: baseline; }
.bag-count { font-size: 0.82rem; font-weight: 400; color: var(--hint); }
.item-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.item-tile {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  padding: 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  cursor: pointer;
  text-align: center;
}
.item-tile:hover { border-color: var(--sub); background: #fff; }
.item-tile[aria-pressed="true"] { border-color: var(--main); box-shadow: 0 0 0 2px rgb(167 215 179 / 0.6); background: #fff; }
.item-tile .item-icon { width: 40px; height: 40px; margin-bottom: 4px; }
.item-name { font-size: 0.88rem; font-weight: 600; line-height: 1.3; word-break: keep-all; }
.item-qty { font-size: 0.78rem; color: var(--ink-soft); }
.item-detail {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--sub);
  border-radius: 14px;
  background: #fff;
}
.item-detail p { margin: 0 0 6px; }
.item-detail-icon .item-icon { width: 52px; height: 52px; }
.item-detail-name { font-weight: 700; color: var(--main-deep); }
.item-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* 만들기 */
.recipes { display: grid; gap: 12px; }
.recipe { display: flex; gap: 16px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.recipe-icon .item-icon { width: 46px; height: 46px; }
.recipe-body { flex: 1; min-width: 0; }
.recipe-name { margin: 0 0 2px; font-weight: 700; font-size: 1.05rem; color: var(--main-deep); }
.recipe p { margin: 0 0 8px; }
.recipe-materials { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.88rem; }
.recipe-materials li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border-radius: 999px; background: var(--sub-soft); }
.recipe-materials li .item-icon, .recipe-materials li .icon { width: 20px; height: 20px; }
.recipe-materials li[data-short] { background: var(--bad-soft); color: var(--bad); }
.recipe-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 대화 */
.chats { display: grid; gap: 14px; margin: 18px 0 4px; }
.chats:empty { display: none; }
.chat { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--sub); }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; color: var(--main-deep); }
.chat-log { list-style: none; padding: 0; margin: 0 0 10px; max-height: 240px; overflow-y: auto; display: grid; gap: 6px; }
.chat-log li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; font-size: 0.95rem; }
.chat-log li[data-mine] .chat-from { color: var(--ink-soft); }
.chat-from { font-weight: 700; }
.chat-text { word-break: break-word; }
.chat-log time { font-size: 0.75rem; color: var(--hint); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; }

/* ---------- 확인 창 ---------- */
.dialog {
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.95);
  color: var(--ink);
  max-width: min(420px, calc(100vw - 32px));
  padding: 24px;
  box-shadow: 0 12px 40px rgb(47 89 71 / 0.25);
}
.dialog::backdrop { background: rgb(47 89 71 / 0.3); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dialog p { font-size: 1.05rem; margin: 0 0 20px; }
.dialog .field { margin-bottom: 20px; }
.dialog .stack { display: grid; gap: 8px; }

/* ---------- 바닥 ---------- */
.site-footer { display: flex; gap: 16px; justify-content: center; padding: 16px var(--side) 24px; font-size: 0.8rem; }
.site-footer a { color: var(--ink-soft); padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.7); text-decoration: none; }
.site-footer a:hover { color: var(--main-deep); }

.policy h2 { font-size: 1rem; margin-top: 24px; }
.policy li { font-size: 0.95rem; }

/* '여기서' 안의 작은 메뉴 */
.sub-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  border-radius: 12px;
  background: rgb(91 158 122 / 0.1);
}
.sub-tabs a {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.sub-tabs a:hover { color: var(--main-deep); }
.sub-tabs a[aria-current="page"] { background: #fff; color: var(--main-deep); box-shadow: 0 1px 4px rgb(62 110 90 / 0.15); }

/* 소식지 */
.notice-card { background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.notice-card p { margin: 0; }
.notice-title { margin-bottom: 4px !important; }
.done-box { margin-top: 6px; }
.done-box summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; padding: 4px 0; }
.done-box .done-list { margin-top: 6px; }

/* 이야기 */
.story-summary { margin: -4px 0 8px; color: var(--ink-soft); font-size: 0.9rem; }
.story-day .section-title { position: sticky; top: 0; }
.story-log { list-style: none; padding: 0 0 0 4px; margin: 0; display: grid; gap: 6px; border-left: 2px solid var(--sub-soft); }
.story-log li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding-left: 10px; line-height: 1.6; }
.story-log time { color: var(--hint); font-variant-numeric: tabular-nums; font-size: 0.88rem; padding-top: 1px; }

/* ---------- 3단계: 품질 표시, 지닌 것, 모닥불, 먼저 온 사람, 창고, 요리법 분류 ---------- */
.item-tile { position: relative; }
.badges { position: absolute; top: 4px; left: 4px; right: 4px; display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-start; pointer-events: none; }
.badge { font-size: 0.62rem; font-weight: 700; line-height: 1.5; padding: 0 5px; border-radius: 999px; background: var(--sub-soft); color: var(--main-deep); }
.badge.equipped { background: var(--main); color: #fff; }
.badge.perfect { background: #fff3c4; color: #9a6b00; }
.badge.warm { background: #ffe1d2; color: #b9542a; }
.badge.lukewarm { background: #fdf0e3; color: #a7743d; }
.badge.q1, .badge.q2 { background: #f1ede6; color: #7d6f5c; }
.badge.q4 { background: #e3f1fb; color: #2f6f99; }
.badge.q5 { background: #efe6fd; color: #6b46b8; }
.effect-list { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 2px; font-size: 0.85rem; color: var(--main-deep); }
.effect-list li::before { content: "✦ "; color: var(--sub); }
.worn { list-style: none; padding: 8px 10px; margin: 10px 0 0; display: grid; gap: 2px; font-size: 0.85rem; border-radius: 12px; background: var(--sub-soft); }
.worn li { display: flex; gap: 8px; }
.worn-slot { color: var(--ink-soft); min-width: 2.5em; }

.campfire {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #f3c9a4;
  background: linear-gradient(180deg, #fff6ec, #ffeedd);
}
.campfire .row-icon { color: #e0793a; }

.npc-head { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--line); }
.npc-head > div { flex: 1; min-width: 0; }
.npc-head p { margin: 0; }
.npc-face { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sub-soft); color: var(--main-deep); flex: none; }
.npc-name { font-weight: 700; font-size: 1.1rem; color: var(--main-deep); }
.rows.compact .row { padding: 8px 14px; }
.storage { margin-top: 8px; }
.storage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--sub-soft); }
.ship-form { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-strong); }
.ship-form select, .ship-form input { font: inherit; color: var(--ink); padding: 4px 8px; border: 1px solid var(--sub); border-radius: 8px; background: #fff; }
.ship-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.ship-items li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.9rem; }
.ship-items input { width: 5.5em; }
.ship-list { margin: 0; padding-left: 1.2em; font-size: 0.88rem; color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip-btn { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--sub); background: #fff; color: var(--ink-soft); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--main); border-color: var(--main); color: #fff; }
.recipe-group { margin-left: 8px; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 6px !important; }
.grade { font-size: 0.82rem; color: #d29a1e; font-weight: 700; letter-spacing: 0.02em; }

/* ---------- 조금 좁은 컴퓨터 화면: 세 칸을 조금씩 줄인다 ---------- */
@media (max-width: 1280px) {
  :root { --side: 24px; }
  .play { grid-template-columns: 236px minmax(0, 1fr) 260px; gap: 16px; }
  .profile { padding: 18px; }
  .avatar { width: 64px; height: 64px; }
  .stage { padding: 18px 18px 6px; }
}

/* ---------- 태블릿·휴대폰: 한 줄로 쌓고, 메뉴는 아래 막대 ---------- */
@media (max-width: 1100px) {
  :root { --side: 16px; }
  body { padding-bottom: 76px; }
  .site-header { gap: 16px; padding: 8px 14px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 8px 10px; }
  .account-tools { gap: 2px; }

  .play { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .play-side { position: static; }
  .logged-in .site-nav { display: none; } /* 로그인 후 메뉴는 아래 막대에 있다 */
  .stage::after { display: none; }
  .stage { padding: 14px 14px 4px; }


  /* 소지품: 아래에서 올라오는 판 */
  .inv-side {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 72px;
    top: auto;
    z-index: 30;
    max-height: min(70vh, 560px);
    background: rgb(255 255 255 / 0.96);
    transform: translateY(calc(100% + 90px));
    transition: transform 0.22s ease;
  }
  .inv-side:not(.open) { visibility: hidden; transition: transform 0.22s ease, visibility 0s linear 0.22s; }
  .inv-side.open { transform: none; visibility: visible; }
  .inv-sheet-head { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 4px; }
  .inv-sheet-head strong { font-size: 1.05rem; color: var(--main-deep); }
  .inv-side .items-title { display: none; }
  .inv-side .items-head { justify-content: flex-end; margin-top: -40px; margin-right: 44px; }
  .inv-side .item-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

  .bottom-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgb(255 255 255 / 0.92);
    border-top: 1px solid var(--glass-line);
    box-shadow: 0 -4px 18px rgb(62 110 90 / 0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .bottom-item {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 6px 2px;
    border: none;
    border-radius: 12px;
    background: none;
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }
  .bottom-item .icon { width: 22px; height: 22px; }
  .bottom-item[aria-current="page"], .bottom-item[aria-expanded="true"] { color: var(--main-deep); background: var(--sub-soft); }
  .site-footer { display: none; }
}

/* ---------- 휴대폰 ---------- */
@media (max-width: 560px) {
  :root { --side: 10px; }
  body { font-size: 15px; }
  .site-header { margin-top: 8px; top: 6px; padding: 6px 10px; }
  .logo { font-size: 1.4rem; gap: 2px; }
  .logo-sprig { width: 18px; height: 20px; }
  .logo-sprig:first-child { display: none; }
  .icon-btn { width: 36px; height: 36px; }
  .site-nav .icon { display: none; }
  .page { padding: 22px 18px; margin-top: 16px; }
  .profile { padding: 14px 16px; }
  .profile-head { margin-bottom: 10px; }
  .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
  .profile-name { font-size: 1.3rem; }
  .row { padding: 10px 12px; gap: 2px 10px; }
  .row-meta { max-width: 40%; font-size: 0.78rem; }
  .row-meta.long { padding-left: 40px; }
  .callout { flex-wrap: wrap; }
  .callout .btn { width: 100%; }
  .recipe { flex-direction: column; gap: 8px; }
  .help-pop { left: auto; right: -60px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   흰 바탕 디자인: 단색 바탕 + 맨 위 풀밭 배너, 흰 카드, 세이지 제목 띠, 납작한 버튼
   (위의 규칙을 덮어쓴다)
   ===================================================================== */
:root {
  --ink: #2f4237;
  --ink-soft: #66776c;
  --hint: #9aa89e;
  --line: #e6ece3;
  --shadow: 0 1px 2px rgb(47 66 55 / 0.05), 0 4px 14px rgb(47 66 55 / 0.05);
  --radius: 16px;
}
body { background: var(--paper); }

/* 맨 위 풀밭 배너 */
.site-cover {
  height: clamp(110px, 17vh, 190px);
  background: url("components/cover-meadow.svg") center / cover no-repeat, #a9d488;
}
.site-header {
  margin-top: -34px;
  position: sticky;
  top: 10px;
}

.glass, .page {
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header.glass { background: rgb(255 255 255 / 0.96); }
h1, .view-title, .place-name, .profile-name { color: var(--forest); }
.profile::after, .stage::after { display: none; }

/* 제목 띠 (세이지) */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--sage-band);
  font-size: 0.98rem;
}
.section-title.first { margin-top: 0; }
.section-title::before, .items-title::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: url("components/leaf-mini.svg") center / contain no-repeat;
}
.items-title { display: flex; align-items: center; gap: 6px; }
.view-title { display: flex; align-items: center; gap: 8px; }

/* 버튼 */
.btn {
  border-radius: 10px;
  border: 1px solid #4f9070;
  background: var(--main);
  box-shadow: 0 1px 2px rgb(47 92 69 / 0.2);
}
.btn:hover:not(:disabled) { background: #529170; filter: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.quiet-btn, .danger-btn { background: #fff; border: 1px solid var(--card-line); box-shadow: none; }
.quiet-btn { color: var(--forest); }
.quiet-btn:hover:not(:disabled) { background: var(--sage-band); }

/* 행동 줄 */
.row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.row:hover:not(:disabled) { background: #f6faf4; border-color: var(--sub); }
.row:disabled { background: #fafbf9; }
.row-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--sage-band); color: var(--main); }
.row-icon .icon { width: 20px; height: 20px; }
.row.done .row-name { color: var(--hint); }
.row-strong { background: #f2f8ef; border-color: var(--sub); }

.chip, .chip-btn { box-shadow: none; }
.item-tile, .recipe, .quest, .notice-card, .npc-head, .chat, .storage-head, .ship-form { background: #fff; border-color: var(--line); box-shadow: none; }
.item-tile:hover { background: #f6faf4; }
.badge { box-shadow: none; }
.sub-tabs { background: var(--sage-band); border-radius: 12px; }
.sub-tabs a[aria-current="page"] { background: #fff; box-shadow: 0 1px 3px rgb(47 66 55 / 0.12); color: var(--forest); }
.busy { background: #f2f8ef; border: 1px solid var(--sub); box-shadow: none; }
.campfire { background: #fff7ef; border-color: #f2d6bd; }
.callout { background: var(--bad-soft); }
.advice { background: #fff; }
.worn { background: var(--sage-band); }
.recipe-materials li { background: var(--sage-band); }

/* ---------- 장소 머리 ---------- */
.place { margin-bottom: 14px; }
.place-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; }
.place-head .place-name { margin: 0 !important; font-size: 1.35rem; }
.place-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.place-chip { font-size: 0.78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--sage-band); color: var(--ink-soft); }
.stars { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: var(--good); }
.stars.d1 { color: #c9920f; }
.stars.d2 { color: #df7a2e; }
.stars.d3 { color: #d64553; }
.place-desc { margin: 4px 0 0 !important; }
.weather-line { margin: 2px 0 0 !important; }

/* 길 (지도가 없을 때 글로) */
.row.route .row-meta { font-weight: 700; color: var(--good); }
.row.route.d1 .row-meta { color: #c9920f; }
.row.route.d2 .row-meta { color: #df7a2e; }
.row.route.d3 .row-meta { color: #d64553; }
.row.shifting .row-icon { background: #efeafc; color: #7a5cc4; }
.row.shifting .row-sub { color: #7a5cc4; }

/* ---------- 왼쪽 프로필: 사진은 맨 위 가운데 ---------- */
.profile-head { flex-direction: column; text-align: center; gap: 10px; }
.profile-id { display: grid; gap: 2px; }
.profile-title { margin: 0; font-size: 0.8rem; font-weight: 700; color: #b0863a; letter-spacing: 0.04em; }
.profile-title::before, .profile-title::after { content: " ✦ "; color: #e5c77b; }
.profile-home { margin: 0; font-size: 0.8rem; color: var(--hint); }
.avatar-frame {
  /* 테두리는 화면 UI 색을 따른다 (받은 달의 테두리를 두르면 그 테두리) */
  --ring: var(--main);
  padding: 4px;
  border-radius: 50%;
  background: var(--ring);
}
.avatar-frame .avatar { width: 92px; height: 92px; border-width: 3px; box-shadow: none; }
.avatar-frame[data-frame="1"] { --ring: conic-gradient(#ffffff, #cfe8ff, #ffffff, #b9d9f5, #ffffff); }
.avatar-frame[data-frame="2"] { --ring: conic-gradient(#e85b6b, #ffb3b9, #e85b6b, #6aa772, #e85b6b); }
.avatar-frame[data-frame="3"] { --ring: conic-gradient(#ffd1dc, #ffeef2, #f7b6c8, #ffeef2, #ffd1dc); }
.avatar-frame[data-frame="4"] { --ring: conic-gradient(#b8e39f, #e8f7d6, #8fcb7a, #e8f7d6, #b8e39f); }
.avatar-frame[data-frame="5"] { --ring: conic-gradient(#f28aa0, #ffd3dc, #6aa772, #ffd3dc, #f28aa0); }
.avatar-frame[data-frame="6"] { --ring: conic-gradient(#9ab8f0, #d7c4f2, #b5d6f6, #d7c4f2, #9ab8f0); }
.avatar-frame[data-frame="7"] { --ring: conic-gradient(#2c4a3b, #e9f78a, #2c4a3b, #e9f78a, #2c4a3b); }
.avatar-frame[data-frame="8"] { --ring: conic-gradient(#f8c93b, #ffe9a3, #e9a21f, #ffe9a3, #f8c93b); }
.avatar-frame[data-frame="9"] { --ring: conic-gradient(#e2683c, #f6b26b, #c94f2c, #f6b26b, #e2683c); }
.avatar-frame[data-frame="10"] { --ring: conic-gradient(#a6774b, #d9b48a, #7f5634, #d9b48a, #a6774b); }
.avatar-frame[data-frame="11"] { --ring: conic-gradient(#d8c79a, #f2e8c9, #b9a678, #f2e8c9, #d8c79a); }
.avatar-frame[data-frame="12"] { --ring: conic-gradient(#3b4a8a, #f5e9a8, #6c7bc9, #f5e9a8, #3b4a8a); }
/* 시즌 기념 테두리 */
.avatar-frame[data-frame="autumn_leaves"] { --ring: conic-gradient(#e0a526, #f6d77a, #c9652b, #f6d77a, #8a5a2b, #e0a526); }
.avatar-frame[data-frame="frost_festival"] { --ring: conic-gradient(#ffffff, #d6ecff, #9fc8ef, #ffffff, #e6f2ff, #ffffff); }
.avatar-frame[data-frame="dawn_stars"] { --ring: conic-gradient(#1f2a5c, #8fa6ff, #fff3b0, #4a5aa8, #1f2a5c); }
.tags li { background: var(--main); border-color: var(--main); }
.tags li.tag { background: var(--tag, var(--main)); border-color: transparent; color: var(--tag-ink, #fff); }

/* 왼쪽 아래 나뭇잎 카드 (누르면 나뭇잎 화면) */
.leaf-mini { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.leaf-mini:hover { border-color: var(--sub); background: #f6faf4; }
.leaf-mini[aria-current="page"] { border-color: var(--main); box-shadow: 0 0 0 2px rgb(167 215 179 / 0.5); }
.leaf-mini-main { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.leaf-mini-main strong { font-size: 0.9rem; color: var(--forest); }
.leaf-mini-main .pass-chip { justify-self: start; margin-top: 4px; }
.leaf-coin {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f0cc55 50%, #d9a937);
  flex: none;
}
.leaf-coin .icon { width: 18px; height: 18px; }
.leaf-coin.big { width: 52px; height: 52px; }
.leaf-coin.big .icon { width: 28px; height: 28px; }
.pass-chip { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sage-band); color: var(--ink-soft); white-space: nowrap; }
.pass-chip.on { background: var(--main); color: #fff; }

/* ---------- 지도 (납작한 그림 지도) ---------- */
.wm { position: relative; margin: 0 0 12px; border-radius: 16px; overflow: hidden; background: #f3f9ef; border: 1px solid var(--card-line); user-select: none; }
.wm-view { position: relative; height: clamp(340px, 58vh, 560px); overflow: hidden; cursor: grab; touch-action: none; outline: none; }
.wm-view.dragging { cursor: grabbing; }
.wm-plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wm-svg { display: block; }
.wm-zone.unknown { filter: url(#wm-fog); }
.wm-road { fill: none; stroke: #ffffff; stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.wm-road-edge { fill: none; stroke: #d9e9cf; stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.wm-road.faint, .wm-road-edge.faint { opacity: 0.55; }
.wm-move-line { fill: none; stroke: var(--main); stroke-width: 6; stroke-dasharray: 2 16; stroke-linecap: round; opacity: 0.8; }
.wm-move-line.shifting { stroke: #8a6ad0; }
.wm-deco { pointer-events: none; }
.wm-dot.unknown { fill: rgb(90 130 90 / 0.18); }
.wm-pin { cursor: default; }
.wm-pin .wm-drop { fill: #fff; stroke: var(--main); stroke-width: 5; }
.wm-pin .wm-drop-dot { fill: var(--main); }
.wm-pin.village .wm-drop { stroke: #c98a3f; }
.wm-pin.village .wm-drop-dot { fill: #c98a3f; }
.wm-pin.near .wm-drop { stroke: #9fbf9f; }
.wm-pin.near .wm-drop-dot { fill: #9fbf9f; }
.wm-pin.here .wm-drop { fill: #f7d7e6; stroke: #cf5f86; }
.wm-pin.here .wm-drop-dot { fill: #cf5f86; }
.wm-pin.movable { cursor: pointer; }
.wm-pin.movable .wm-drop { stroke-width: 7; }
.wm-pin.movable:hover .wm-drop, .wm-pin.movable:focus .wm-drop, .wm-pin.movable.open .wm-drop { fill: #e9f6e4; }
.wm-here-ring { fill: none; stroke: #cf5f86; stroke-width: 5; opacity: 0.6; animation: wm-pulse 1.8s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes wm-pulse { from { transform: scale(0.6); opacity: 0.8; } to { transform: scale(1.5); opacity: 0; } }
.wm-label { font: 700 28px var(--font); fill: var(--forest); paint-order: stroke; stroke: #fff; stroke-width: 9px; stroke-linejoin: round; }
.wm-pin.near .wm-label { fill: #7c9584; }
.wm-stars { font: 700 22px var(--font); paint-order: stroke; stroke: #fff; stroke-width: 6px; fill: var(--good); }
.wm-stars.d1 { fill: #c9920f; }
.wm-stars.d2 { fill: #df7a2e; }
.wm-stars.d3 { fill: #d64553; }
.wm-tools { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.wm-tool { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--card-line); background: #fff; font-size: 1.1rem; font-weight: 700; color: var(--forest); cursor: pointer; box-shadow: 0 1px 3px rgb(47 66 55 / 0.12); }
.wm-tool:hover { background: var(--sage-band); }
.wm-legend { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; }
.wm-legend .lg { padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.94); border: 1px solid var(--card-line); }
.wm-legend .lg.visited::before { content: "● "; color: var(--main); }
.wm-legend .lg.near::before { content: "● "; color: #9fbf9f; }
.wm-legend .lg.unknown::before { content: "● "; color: #cfe1c6; }
.wm-legend .lg.move::before { content: "● "; color: #cf5f86; }
/* 커서를 올리면 뜨는 상자: [a로 이동하기] / 소요 시간 */
.wm-pop {
  position: absolute;
  z-index: 5;
  min-width: 170px;
  max-width: 260px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--card-line);
  box-shadow: 0 6px 20px rgb(47 66 55 / 0.18);
  transform: translate(-50%, calc(-100% - 14px));
}
.wm-pop[hidden] { display: none; }
.wm-go {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.wm-go:hover, .wm-go:focus-visible { background: var(--sage-band); }
.wm-go + .wm-go { border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.wm-go-name { font-weight: 700; color: var(--forest); }
.wm-go-sub { font-size: 0.75rem; color: var(--hint); }
.wm-go-sub .d1 { color: #c9920f; } .wm-go-sub .d2 { color: #df7a2e; } .wm-go-sub .d3 { color: #d64553; }
.map-info { margin: 0 2px 10px; color: var(--ink-soft); }
.map-busy { margin-bottom: 12px; }

/* ---------- 먼저 온 사람이 거는 대화 ---------- */
.talk-dialog {
  width: min(540px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid var(--card-line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 50px rgb(47 66 55 / 0.28);
}
.talk-dialog::backdrop { background: rgb(47 66 55 / 0.3); }
.talk-body { padding: 18px 20px 20px; }
.talk-head { display: flex; align-items: center; gap: 12px; margin: -18px -20px 14px; padding: 14px 20px; background: var(--sage-band); border-radius: 20px 20px 0 0; }
.talk-head > div { flex: 1; }
.talk-head p { margin: 0; }
.talk-face { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 30%, #d9f3a8, #a9d66a 55%, #7fb34a); }
.talk-face[data-npc="toran"] { background: radial-gradient(circle at 35% 30%, #e9fbb0, #b7e36b 55%, #8cc43f); }
.talk-name { font-weight: 800; font-size: 1.08rem; color: var(--forest); }
.talk-title { font-size: 0.82rem; color: var(--ink-soft); }
.talk-lines { display: grid; gap: 8px; margin-bottom: 16px; }
.talk-line { margin: 0; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #f5f9f3; border: 1px solid var(--line); font-size: 1.02rem; animation: talk-in 0.35s ease both; }
.talk-event { margin: 0; text-align: center; font-weight: 700; color: #a6774b; animation: talk-in 0.35s ease both; }
/* 대답: 한 줄에 하나 (예/아니오처럼 짧고 자리가 정해진 것만 나란히) */
.talk-choices { display: grid; gap: 8px; animation: talk-in 0.35s ease both; }
.talk-choices.pair { grid-template-columns: 1fr 1fr; }
.talk-choice {
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #cfe3d2;
  background: #fff;
  color: var(--forest);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.talk-choices.pair .talk-choice { text-align: center; }
.talk-choice:hover:not(:disabled) { background: var(--sage-band); border-color: var(--sub); }
.talk-choice.picked { background: var(--sage-band-2); border-color: var(--main); }
.talk-choice:disabled:not(.picked) { opacity: 0.5; }
@keyframes talk-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.talk-callout { background: #f2f8ef; border-color: var(--sub); }
.talk-callout p { color: var(--forest); }
.talk-callout .callout-icon { color: var(--main); }

/* ---------- 소식지 ---------- */
.news-card { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; margin: 0 0 8px; }
.news-card p { margin: 0; }
.news-card.battle { display: flex; align-items: center; gap: 12px; }
.news-card.battle .row-icon { background: #fbecee; color: var(--bad); }
.news-card.prayer { background: #fcf1f6; border-color: #f4d5e3; text-align: center; padding: 18px 16px; }
.prayer-text { font-size: 1.05rem; font-weight: 600; color: #7d4a62; }
.prayer-text::before, .prayer-text::after { content: " ❀ "; color: #e9a9c5; }
.notice-card.important { border-left: 4px solid var(--main); }

/* ---------- 출석 ---------- */
.attend-card { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-bottom: 8px; }
.attend-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attend-head > div { flex: 1; min-width: 180px; }
.attend-head p { margin: 0; }
.attend-title { font-weight: 800; color: var(--forest); }
.attend-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--main); background: var(--sage-band); }
.attend-dots { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 12px 0 6px; }
.attend-dots li { width: 14px; height: 14px; border-radius: 50%; background: #eef2ec; }
.attend-dots li[data-done] { background: var(--main); }
.attend-dots li[data-mark] { outline: 2px solid #e5c77b; outline-offset: 1px; }

/* ---------- 나뭇잎 화면 ---------- */
.wallet { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; background: #fffbea; border: 1px solid #f1e6bf; }
.wallet p { margin: 0; }
.wallet-total { font-size: 1.6rem; font-weight: 800; color: var(--forest); }
.wallet-today { margin-left: auto; min-width: 160px; display: grid; gap: 2px; }
.offer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin: 0 0 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.offer.pass { background: #f4faf1; border-color: var(--sub); }
.offer.on { outline: 2px solid var(--sub); }
.offer-main { flex: 1; min-width: 220px; }
.offer-main p { margin: 0; }
.offer-title { font-weight: 800; color: var(--forest); }
.offer-list { margin: 6px 0; padding-left: 1.1em; font-size: 0.88rem; color: var(--ink); }
.good { color: var(--good); }
.first-double { margin: 0 0 10px; padding: 8px 14px; border-radius: 12px; background: #fcf1f6; color: #9a4b6b; font-weight: 700; font-size: 0.9rem; }
.packs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pack { display: grid; justify-items: center; gap: 2px; padding: 14px 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); text-align: center; }
.pack p { margin: 0; }
.pack-leaves { font-weight: 800; font-size: 1.15rem; color: var(--forest); }
.pack-kind { font-size: 0.7rem; font-weight: 700; color: #7a5cc4; }
.pack-bonus { font-size: 0.8rem; font-weight: 700; color: #c58d12; }
.pack-bonus.none { color: var(--hint); font-weight: 400; }
.pack-double { font-size: 0.75rem; color: #cf5f86; font-weight: 700; }
.pack .btn { margin-top: 6px; }
.row.eternal .row-icon { background: #efeafc; color: #7a5cc4; }

/* 만들 개수 */
.foot-right { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; background: var(--sage-band); }
.step-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--card-line); background: #fff; font-weight: 800; color: var(--forest); cursor: pointer; }
.step-btn:disabled { opacity: 0.4; cursor: default; }
.step-num { min-width: 2ch; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 부엉이 · 잠긴 캐릭터 */
.owl-note { margin: 0 0 8px; padding: 6px 12px; border-radius: 10px; background: #f1eafd; color: #6a4fb0; }
.char-locked { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: var(--radius-sm); background: #f3f5f2; opacity: 0.75; }
.char-list a { background: #fff; }
.view-title .icon { width: 24px; height: 24px; color: var(--main); }

@media (max-width: 1100px) {
  .site-header { margin-top: -28px; top: 6px; }
  .profile-head { flex-direction: row; text-align: left; }
  .avatar-frame .avatar { width: 68px; height: 68px; }
  .bottom-bar { background: rgb(255 255 255 / 0.97); }
}
@media (max-width: 560px) {
  .site-cover { height: 96px; }
  .site-header { margin-top: -22px; }
  .avatar-frame .avatar { width: 60px; height: 60px; }
  .wallet-today { margin-left: 0; width: 100%; }
  .talk-body { padding: 16px; }
  .talk-head { margin: -16px -16px 12px; padding: 12px 16px; }
  .foot-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .wm-view { height: 62vh; }
}

/* ---------- 왼쪽 나뭇잎 카드: 이름 / 수량 ---------- */
.leaf-mini-main strong { font-size: 0.85rem; }
.leaf-count { font-size: 1.15rem; font-weight: 800; color: var(--forest); font-variant-numeric: tabular-nums; }

/* ---------- 소식지 배너 두 장 ---------- */
.day-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 8px; }
.day-banner {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 16px 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f4faf1;
  text-align: center;
  min-height: 240px;
}
.day-banner.prayer { background: #fdf3f7; border-color: #f4d9e5; }
.day-title { margin: 0; font-weight: 800; color: var(--forest); }
.day-banner.prayer .day-title { color: #8a4a66; }
.day-art { width: 96px; height: 96px; }
.day-btn { min-width: 150px; }
.day-banner.prayer .day-btn:not(.off) { background: #d77aa0; border-color: #c4678e; }
.day-banner.prayer .day-btn:not(.off):hover { background: #c96a92; }
.day-btn.off, .day-btn:disabled { background: #fff; color: var(--ink-soft); border: 1px solid var(--card-line); box-shadow: none; opacity: 1; cursor: default; }
.day-sub { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.day-found { color: #8a4a66; font-weight: 600; }

/* ---------- 출석부 ---------- */
.attend-board { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; margin-bottom: 8px; --att-w: 112px; }
.att-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.att-title { margin: 0; font-weight: 800; color: var(--forest); }
.att-body { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.att-labels { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.att-badge {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}
.att-badge .icon { width: 28px; height: 28px; }
.att-badge.basic { background: var(--main); color: #fff; }
.att-badge.special { background: linear-gradient(160deg, #f5e3a5, #e8c96a); color: #6d4e12; }
.att-rail { position: relative; min-width: 0; }
.att-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.att-grid { display: grid; grid-template-rows: auto auto; gap: 8px; width: max-content; }
.att-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 52px 1fr auto;
  justify-items: center;
  gap: 4px;
  width: var(--att-w);
  min-height: 150px;
  padding: 8px 6px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfdf9;
  text-align: center;
  overflow: hidden;
  scroll-snap-align: start;
}
.att-card.special { background: #fffbef; border-color: #f1e3b5; }
.att-card.today { border: 2px solid var(--main); background: #f2f9ee; }
.att-card.special.ready { border: 2px solid #d7a93a; }
.att-card.got { opacity: 0.72; }
.att-card.locked { filter: grayscale(0.55); opacity: 0.6; }
.att-day { margin: 0; font-size: 0.8rem; font-weight: 800; color: var(--ink); }
.att-icons { display: flex; align-items: center; justify-content: center; gap: 2px; }
.att-icons .item-icon, .att-icons .leaf-coin, .att-icons .cos-icon { width: 40px; height: 40px; }
.att-icons .leaf-coin .icon { width: 22px; height: 22px; }
.att-name { margin: 0; font-size: 0.76rem; line-height: 1.3; color: var(--ink-soft); word-break: keep-all; }
.att-foot { display: block; width: calc(100% + 12px); margin: 0 -6px; padding: 6px 0; font-size: 0.8rem; font-weight: 800; border: none; background: var(--sage-band); color: var(--ink-soft); }
.att-card.special .att-foot { background: #f6edcd; color: #8a6a1c; }
.att-foot.go { background: var(--main); color: #fff; cursor: pointer; }
.att-foot.go.special { background: #d7a93a; color: #fff; }
.att-foot.go:hover { filter: brightness(1.05); }
.att-stamp { position: absolute; top: 26px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--main); color: #fff; transform: rotate(-12deg); }
.att-stamp .icon { width: 16px; height: 16px; }
.att-arrow { position: absolute; top: 50%; z-index: 3; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; border: 1px solid var(--card-line); background: #fff; color: var(--forest); font-size: 1.2rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgb(47 66 55 / 0.15); }
.att-arrow.left { left: -10px; }
.att-arrow.right { right: -10px; }
/* 잠긴 특별한 보상 줄 위의 [5,900원] (줄은 그대로 넘겨 볼 수 있다) */
.att-lock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: calc(50% - 4px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.35);
  pointer-events: none;
  z-index: 2;
}
.att-buy { pointer-events: auto; min-width: 140px; font-size: 1.05rem; background: #d7a93a; border-color: #c4952a; }
.att-buy:hover:not(:disabled) { background: #c99a2f; }
.att-lock-note { font-size: 0.75rem; font-weight: 700; color: #6d4e12; background: rgb(255 251 236 / 0.92); padding: 1px 8px; border-radius: 999px; }
.cos-icon { display: inline-grid; place-items: center; border-radius: 50%; }
.cos-icon.frame { border: 6px solid #c98a3f; background: #fff; box-sizing: border-box; }
.cos-icon.title { background: #f6edcd; color: #b0863a; }

/* ---------- 우클릭·꾹 누르기 메뉴 ---------- */
.pop-menu {
  position: fixed;
  z-index: 60;
  min-width: 190px;
  max-width: 260px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: #fff;
  box-shadow: 0 8px 26px rgb(47 66 55 / 0.2);
}
.pop-menu-title { margin: 2px 8px 6px; font-size: 0.78rem; font-weight: 700; color: var(--hint); }
.pop-menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 2px; }
.pop-item { display: grid; width: 100%; padding: 8px 10px; border: none; border-radius: 8px; background: none; text-align: left; font-size: 0.92rem; cursor: pointer; color: var(--ink); }
.pop-item:hover:not(:disabled), .pop-item:focus-visible { background: var(--sage-band); }
.pop-item:disabled { color: var(--hint); cursor: default; font-size: 0.82rem; }
.pop-item.danger { color: var(--bad); font-weight: 700; }
.pop-item.danger:hover { background: var(--bad-soft); }
.pop-sub { font-size: 0.75rem; color: var(--hint); }
.skip-check { margin: -8px 0 16px; }
.recipe.picked { border-color: var(--main); box-shadow: 0 0 0 3px rgb(167 215 179 / 0.55); }

/* ---------- 임시 보관함 ---------- */
.overflow-box { margin: 8px 0 4px; padding: 8px 10px; border-radius: 12px; background: #fff7ef; border: 1px solid #f2d6bd; }
.overflow-box .bag-title { margin: 0 0 6px; }
.overflow-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.overflow-list li { display: flex; align-items: center; gap: 8px; }
.overflow-list .item-icon { width: 28px; height: 28px; }
.overflow-name { flex: 1; display: grid; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }

@media (max-width: 560px) {
  .day-banners { grid-template-columns: 1fr 1fr; gap: 8px; }
  .day-banner { min-height: 210px; padding: 12px 8px; }
  .day-art { width: 72px; height: 72px; }
  .day-btn { min-width: 0; width: 100%; padding: 8px 6px; font-size: 0.85rem; }
  .attend-board { --att-w: 96px; padding: 10px; }
  .att-body { grid-template-columns: 64px minmax(0, 1fr); gap: 6px; }
  .att-badge { font-size: 0.7rem; }
  .att-badge .icon { width: 22px; height: 22px; }
  .att-arrow { display: none; }
}

/* 캐릭터 고르기: 캐릭터 칸 영구 추가 */
.slot-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; padding: 14px 16px; border-radius: 14px; background: #fffbea; border: 1px solid #f1e6bf; }
.slot-main { flex: 1; min-width: 180px; }
.slot-main p { margin: 0; }
.slot-title { font-weight: 800; color: var(--forest); }

/* ---------- 화면 아래 알림 (모달리스) ---------- */
.toast-shelf { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--main); box-shadow: 0 8px 24px rgba(40, 70, 50, 0.14); color: var(--ink); font-size: 0.97rem; line-height: 1.5; animation: toast-in 0.25s ease both; }
.toast.error { border-left-color: var(--bad); background: #fff8fa; color: var(--bad); }
.toast.leaving { animation: toast-out 0.25s ease both; }
.toast-text { flex: 1; white-space: pre-line; }
.toast-close { border: 0; background: transparent; color: var(--ink-soft); font-size: 1.2rem; line-height: 1; padding: 0 2px; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }
@media (max-width: 760px) { .toast-shelf { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* ---------- 설정 ---------- */
.set-title { margin: 28px 0 8px; font-size: 1.05rem; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.set-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; padding: 10px 0; }
.set-label { font-weight: 700; color: var(--ink); padding-top: 8px; }
.set-input { min-width: 0; }
.set-input > strong { display: inline-block; padding-top: 8px; word-break: break-all; }
.settings-form { gap: 0; }
.inline-pair { display: flex; gap: 8px; }
.inline-pair input { flex: 1; min-width: 0; }
.at-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding-left: 10px; }
.at-input .at { color: var(--ink-soft); }
.at-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; }
.field-note { margin: 6px 0 0; font-size: 0.86rem; color: var(--ink-soft); }
.field-note.good { color: #3d8a5a; }
.field-note.bad { color: var(--bad); }
.field-note:empty { display: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: #eef1ee; padding: 3px 12px 3px 3px; cursor: pointer; font: inherit; color: var(--ink-soft); margin-top: 3px; }
.switch-knob { width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--main); color: #fff; border-color: var(--main); flex-direction: row-reverse; padding: 3px 3px 3px 12px; }
.set-bottom { margin-top: 40px; padding-top: 16px; border-top: 1px dashed var(--line); }
.leave-box { border: 1px solid #f2c9d1; background: #fff8fa; border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.leave-box h3 { margin: 0; font-size: 1rem; color: var(--bad); }
.leave-box p { margin: 0; }
@media (max-width: 560px) { .set-row { grid-template-columns: 1fr; gap: 4px; } .set-label { padding-top: 0; } }

/* ---------- 색 고르기 창 ---------- */
.cp-dialog { width: min(380px, calc(100vw - 32px)); }
.cp-dialog form { display: grid; gap: 14px; }
.cp-title { margin: 0; font-weight: 700; }
.cp-top { display: flex; gap: 12px; height: 220px; }
.cp-sv { position: relative; flex: 1; border-radius: 8px; cursor: crosshair; touch-action: none; outline-offset: 2px; }
.cp-sv-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.cp-bar { position: relative; width: 26px; border-radius: 6px; cursor: pointer; touch-action: none; outline-offset: 2px; }
.cp-hue { background: linear-gradient(to bottom, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); }
.cp-alpha { background-color: #fff; background-image: linear-gradient(45deg, #d9d9d9 25%, transparent 25%, transparent 75%, #d9d9d9 75%), linear-gradient(45deg, #d9d9d9 25%, transparent 25%, transparent 75%, #d9d9d9 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; border: 1px solid var(--line); }
.cp-alpha-fill { position: absolute; inset: 0; border-radius: 5px; }
.cp-knob { position: absolute; left: -3px; right: -3px; height: 10px; margin-top: -5px; border-radius: 3px; background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.cp-presets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.cp-preset { aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); cursor: pointer; padding: 0; }
.cp-preset:hover, .cp-preset:focus-visible { outline: 2px solid var(--main); outline-offset: 1px; }
.cp-bottom { display: flex; gap: 12px; align-items: stretch; padding-top: 12px; border-top: 1px solid var(--line); }
.cp-swatch { width: 72px; flex: none; border-radius: 6px; border: 1px solid var(--line); background-color: #fff; background-image: linear-gradient(45deg, #d9d9d9 25%, transparent 25%, transparent 75%, #d9d9d9 75%), linear-gradient(45deg, #d9d9d9 25%, transparent 25%, transparent 75%, #d9d9d9 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; overflow: hidden; }
.cp-swatch-fill { display: block; width: 100%; height: 100%; }
.cp-fields { flex: 1; display: grid; gap: 8px; }
.cp-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: #fff; }
.cp-field input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 7px 0; font-family: ui-monospace, monospace; }
.cp-field span { color: var(--hint); font-size: 0.82rem; }
.cp-clear { margin-right: auto; }

/* 소식지를 아직 모르면 메뉴에서 숨긴다 */
body.news-locked [data-menu="news"] { display: none !important; }

/* ---------- 프로필: 이름과 타이틀, 태그 ---------- */
.profile-name-btn { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 6px; border: 0; background: transparent; padding: 2px 6px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.profile-name-btn:hover, .profile-name-btn:focus-visible { background: rgba(91, 158, 122, 0.08); }
.title-prefix, .title-suffix { font-size: 0.82rem; font-weight: 700; color: #b0863a; }
.profile-name-btn .profile-name { display: inline; }
.tags-btn { display: block; width: 100%; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: inherit; }
.tags-btn .tags { justify-content: center; }
.tags li { padding: 0; background: none !important; border: 0 !important; }
.tag-chip { display: inline-block; padding: 2px 10px; border-radius: 6px; background: var(--tag, var(--main)); color: var(--tag-ink, #fff); font-weight: 600; font-size: 0.85rem; line-height: 1.6; }
.tags-add { display: inline-flex; align-items: center; gap: 4px; width: 100%; justify-content: center; border: 1px dashed var(--line); border-radius: 8px; background: transparent; padding: 6px; cursor: pointer; color: var(--ink-soft); font: inherit; font-size: 0.88rem; }
.tags-add:hover { border-color: var(--main); color: var(--main-deep); }
.tags-add svg { width: 16px; height: 16px; }
.avatar.has-bg { background-image: none; }

.title-box, .tag-box { display: grid; gap: 12px; }
.title-dialog { width: min(460px, calc(100vw - 32px)); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: #f6faf4; border-radius: 10px; }
.title-select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; font: inherit; font-size: 0.9rem; max-width: 160px; }
.title-name { font-size: 1.15rem; }
.title-about p { margin: 0; font-size: 0.84rem; color: var(--hint); text-align: center; }
.owner-line { margin: 0; font-size: 0.85rem; text-align: center; }

.tag-dialog { width: min(460px, calc(100vw - 32px)); }
.tag-head { display: flex; justify-content: space-between; align-items: baseline; }
.tag-count { font-size: 0.85rem; color: var(--ink-soft); }
.tag-mine { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; padding: 10px; border-radius: 10px; background: #f6faf4; }
.tag-mine p { margin: 0; }
.tag-mine-item { display: inline-flex; align-items: center; }
.tag-mine-btn { border: 0; background: transparent; padding: 0; cursor: pointer; }
.tag-x { border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 1rem; padding: 0 4px; }
.tag-search { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.tag-input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; padding: 9px 12px; font: inherit; }
.tag-plus { border: 0; border-left: 1px solid var(--line); background: var(--main); color: #fff; width: 44px; display: grid; place-items: center; cursor: pointer; }
.tag-plus svg { width: 18px; height: 18px; }
.tag-results { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; padding: 2px; }
.tag-results p { margin: 0; }
.tag-result { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 10px; cursor: pointer; font: inherit; }
.tag-result:hover:not([disabled]) { border-color: var(--main); }
.tag-result[disabled] { opacity: 0.5; cursor: default; }
.tag-uses { font-size: 0.8rem; color: var(--hint); }

/* ---------- 처음 눈뜨기, 필수 이끌림, 둘러보기 풍경 ---------- */
.main-quest { border: 1px solid #e6d3a8; background: #fffaf0; border-left: 4px solid #d9a441; border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.main-quest p { margin: 0; }
.main-quest-kind { font-size: 0.75rem; font-weight: 700; color: #b0863a; letter-spacing: 0.04em; }
.main-quest-title { font-weight: 700; font-size: 1.05rem; margin: 2px 0 6px !important; }
.main-quest-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 3px; font-size: 0.93rem; }
.main-quest-steps li::before { content: "○ "; color: #d9a441; }
.main-quest-steps li.done { color: var(--hint); text-decoration: line-through; }
.main-quest-steps li.done::before { content: "● "; }
.scene { display: grid; gap: 6px; padding: 14px 16px; margin: 0 0 16px; border-radius: 12px; background: #f6faf4; border: 1px solid var(--line); }
.scene p { margin: 0; }
.scene-line { line-height: 1.7; }
.scene-hint { color: #7a6a3a; font-size: 0.92rem; }
.scene-hint::before { content: "· "; }
.scene-someone { color: var(--main-deep); font-weight: 600; }
.scene-question { margin-top: 8px !important; font-weight: 700; }
.choice-list { display: grid; gap: 8px; margin-top: 6px; }
.choice-btn { justify-content: flex-start; text-align: left; }
.topic-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.day-banners.one { grid-template-columns: 1fr; }
.rumors { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink); }

.at-input:focus-within, .tag-search:focus-within { border-color: var(--main); box-shadow: 0 0 0 3px rgb(167 215 179 / 0.45); }

/* =====================================================================
   이번 단계: 이어서 하는 일, 만들기 창, 수련 막대, 신분증, 캐릭터 목록, 공지 게시판, 관리자
   ===================================================================== */

/* 이어서 하는 일 (채집·낚시·수련): 진행 막대 아래 얻은 것, [그만두기] */
.busy.running { background: #f4faf1; }
.found-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.found-list li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--card-line); font-size: 0.88rem; animation: found-in 0.35s ease both; }
.found-list li .item-icon { width: 22px; height: 22px; }
.found-list li b { color: var(--main-deep); font-variant-numeric: tabular-nums; }
@keyframes found-in { from { opacity: 0; transform: translateY(4px) scale(0.96); } to { opacity: 1; transform: none; } }
.run-gain { margin: 8px 0 0 !important; }
.busy-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.boost-btn { background: #fff7e6; color: #8a5a12; border-color: #ecd29c; }
.boost-btn .icon { width: 18px; height: 18px; }
.row.row-craft .row-icon { background: #fff4df; color: #a5712a; }

/* 이끌림 (할 수 있는 일 맨 위): 필수 이끌림이 먼저 */
.main-quest + .main-quest { margin-top: -6px; }
.main-quest:not(.main) { border-left-color: #e2bd6e; background: #fffcf5; }

/* 큰 창 (만들기, 신분증, 물건 고르기) */
.dialog.modal { padding: 0; width: min(560px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 32px); overflow: hidden; display: none; flex-direction: column; }
.dialog.modal[open] { display: flex; }
.dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 1.15rem; color: var(--main-deep); flex: 1; }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; }
.modal-body p { font-size: 1rem; }
.recipe.unavailable { opacity: 0.72; }
.step-num { width: 3.4em; border: 0; background: transparent; font: inherit; font-weight: 800; text-align: center; color: var(--forest); -moz-appearance: textfield; }
.step-num::-webkit-outer-spin-button, .step-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pre-line { white-space: pre-line; }

/* 수련 막대: 수치에 커서를 올리거나(컴퓨터) 꾹 누르면(휴대폰) 0/100 */
.stat { position: relative; cursor: help; border-bottom: 1px dotted var(--hint); outline: none; }
.stat-pop { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 30; display: none; width: 190px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--card-line); box-shadow: 0 8px 24px rgb(47 66 55 / 0.16); color: var(--ink); font-size: 0.82rem; line-height: 1.45; }
.stat-pop::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; }
.stat:hover .stat-pop, .stat:focus-visible .stat-pop, .stat.show .stat-pop { display: grid; gap: 4px; }
.stat-track { display: block; height: 8px; }
.stat-num { font-weight: 700; color: var(--main-deep); font-variant-numeric: tabular-nums; }
.stat-desc { color: var(--ink-soft); }
.vitals-row .stat:first-child .stat-pop { left: 0; transform: none; }
.vitals-row .stat:first-child .stat-pop::after { left: 24px; }
.idcard-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--card-line); background: #fff; color: var(--ink-soft); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.idcard-btn .icon { width: 16px; height: 16px; }
.idcard-btn:hover { color: var(--main-deep); border-color: var(--sub); }

/* 신분증 (85.6 × 54 비율) */
.idc { position: relative; width: 100%; max-width: 360px; aspect-ratio: 340 / 214; border-radius: 14px; overflow: hidden; background: var(--idc-paper); box-shadow: 0 6px 18px rgb(47 66 55 / 0.18); color: #2b2b2b; container-type: inline-size; }
.idc-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.idc-inner { position: absolute; inset: 7% 6.5%; display: flex; flex-direction: column; }
.idc-head { margin: 0 !important; display: flex; justify-content: space-between; align-items: baseline; font-size: 4.4cqi; font-weight: 800; color: var(--idc-color); letter-spacing: 0.02em; }
.idc-kind { font-size: 3.4cqi; font-weight: 700; padding: 0 2.4cqi; border-radius: 999px; background: var(--idc-color); color: var(--idc-paper); }
.idc-body { display: flex; gap: 4.5cqi; align-items: center; flex: 1; min-height: 0; }
.idc-photo { flex: none; width: 30cqi; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #fff; border: 2px solid var(--idc-color); display: grid; place-items: center; }
.idc-photo-img { width: 100%; height: 100%; object-fit: cover; }
.idc-photo-empty .icon { width: 14cqi; height: 14cqi; color: var(--idc-accent); }
.idc-text { min-width: 0; flex: 1; }
.idc-text p { margin: 0 !important; line-height: 1.25; }
.idc-prefix, .idc-suffix { font-size: 3.6cqi; font-weight: 700; color: var(--idc-color); }
.idc-name { font-size: 7.2cqi; font-weight: 900; color: #1f2a24; word-break: keep-all; }
.idc-tags { display: flex; flex-wrap: wrap; gap: 1.2cqi; margin-top: 2cqi !important; }
.idc-tag { font-size: 3cqi; font-weight: 700; padding: 0.3cqi 1.8cqi; border-radius: 4px; }
.idc-stamp { position: absolute; right: 6.5%; bottom: 8%; width: 17cqi; height: 17cqi; border-radius: 50%; border: 0.9cqi double color-mix(in srgb, var(--idc-color) 80%, #c0392b); color: color-mix(in srgb, var(--idc-color) 70%, #c0392b); display: grid; place-items: center; transform: rotate(-14deg); opacity: 0.82; font-weight: 900; font-size: 3.9cqi; letter-spacing: -0.04em; mix-blend-mode: multiply; }
.idc-stamp span { writing-mode: vertical-rl; text-orientation: upright; line-height: 1; letter-spacing: -0.1em; }
.idc-preview { display: flex; justify-content: center; margin: 0 0 14px; }
.idc-form { display: grid; gap: 12px; margin: 8px 0 16px; }
.idc-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.idc-select { display: grid; gap: 4px; flex: 1; min-width: 180px; }
.idc-select select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--card-line); background: #fff; font: inherit; }
.tags-row { flex-direction: column; gap: 6px; }
.idc-pick-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.idc-pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--sage-band); font-size: 0.9rem; cursor: pointer; }
.idc-pick:has(input:checked) { background: var(--main); color: #fff; }
.idc-pick:has(input:disabled) { opacity: 0.5; cursor: default; }
.idc-old summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 8px; }
.idc-done { display: grid; justify-items: center; gap: 10px; }
.idc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.idc-list figure { margin: 0; display: grid; gap: 6px; }

/* 우편 (창고) */
.mail-card { border: 1px solid var(--card-line); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.mail-card p { margin: 0 0 6px; }
.mail-title { display: flex; align-items: center; gap: 6px; }
.mail-title .icon { width: 18px; height: 18px; color: var(--main); }
.mail-card .btn { margin-top: 10px; }

/* 나뭇잎 화면: 설명과 상점 */
.leaf-about { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0; font-size: 0.9rem; }
.leaf-about dt { font-weight: 700; color: var(--main-deep); }
.leaf-about dd { margin: 0; color: var(--ink-soft); }
.leaf-shop { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.leaf-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--card-line); }
.leaf-item-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f1eafd; color: #6a4fb0; flex: none; }
.leaf-item-icon .icon { width: 22px; height: 22px; }
.leaf-item-main { flex: 1; min-width: 0; }
.leaf-item-main p { margin: 0; }
.leaf-item-name { font-weight: 700; }
.leaf-price { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.leaf-price .leaf-coin { width: 22px; height: 22px; }

/* 내 캐릭터 목록 (위쪽 메뉴의 사람 아이콘) */
.char-pop { position: absolute; z-index: 80; width: min(340px, calc(100vw - 24px)); padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--card-line); box-shadow: 0 14px 40px rgb(47 66 55 / 0.2); }
.char-menu { display: grid; gap: 8px; }
.cm-head { margin: 0; padding: 0 4px; font-weight: 800; color: var(--main-deep); }
.cm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cm-row { display: flex; align-items: center; gap: 6px; border-radius: 12px; background: var(--paper); border: 1px solid var(--card-line); transition: box-shadow 0.15s, transform 0.15s; }
.cm-row.current { border-color: var(--main); }
.cm-row.locked { opacity: 0.6; }
.cm-row.dragging { box-shadow: 0 8px 22px rgb(47 66 55 / 0.22); transform: scale(1.02); position: relative; z-index: 2; }
.cm-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: inherit; text-decoration: none; border-radius: 12px; }
a.cm-main:hover { background: var(--sub-soft); }
.cm-face { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--sage-band); font-weight: 800; color: var(--main-deep); }
.cm-face img { width: 100%; height: 100%; object-fit: cover; }
.cm-text { min-width: 0; display: grid; }
.cm-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.cm-name .title-prefix, .cm-name .title-suffix { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.cm-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-grip { flex: none; width: 34px; height: 44px; margin-left: 4px; border: 0; background: transparent; color: var(--ink-soft); cursor: grab; touch-action: none; border-radius: 8px; }
.cm-grip:active { cursor: grabbing; }
.cm-grip .icon { width: 20px; height: 20px; }
.cm-trash { color: var(--bad); margin-right: 4px; }
.cm-new { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 12px; border: 1.5px dashed var(--sub); background: transparent; color: var(--main-deep); font: inherit; font-weight: 700; cursor: pointer; }
.cm-new:hover { background: var(--sub-soft); }
.cm-new .icon { width: 18px; height: 18px; }
.cm-tidy { justify-self: center; padding: 4px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cm-tidy.on { background: var(--main); color: #fff; text-decoration: none; }
.char-menu.page-mode .cm-row { background: #fff; }
.modal .slot-offer { margin: 12px 0; justify-content: space-between; }
.slot-title { font-weight: 800; }
.slot-buy { display: inline-flex; align-items: center; gap: 6px; }
.slot-buy .leaf-coin { width: 22px; height: 22px; }

/* 공지 게시판: [▾ 제목] 을 누르면 부드럽게 펼쳐진다 */
.notice-board { display: grid; gap: 10px; }
.nb-list { display: grid; gap: 6px; }
.nb-item { border: 1px solid var(--card-line); border-radius: 12px; background: #fff; overflow: hidden; }
.nb-row { display: flex; align-items: center; }
.nb-head { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--forest); text-align: left; cursor: pointer; }
.nb-head:hover { background: var(--sub-soft); }
.nb-caret { display: inline-grid; transition: transform 0.25s ease; transform: rotate(-90deg); color: var(--main); }
.nb-caret .icon { width: 18px; height: 18px; }
.nb-item.open .nb-caret { transform: none; }
.nb-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.nb-item.open .nb-body { grid-template-rows: 1fr; }
.nb-inner { overflow: hidden; padding: 0 16px; }
.nb-item.open .nb-inner { padding-bottom: 12px; }
.nb-text { margin: 0 0 6px; white-space: pre-line; }
.nb-date { margin: 0; }
.nb-del { color: var(--bad); margin-right: 6px; }
.nb-pages { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.nb-page { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--card-line); background: #fff; font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.nb-page[aria-current="page"] { background: var(--main); color: #fff; border-color: var(--main); }
@media (prefers-reduced-motion: reduce) { .nb-body, .nb-caret, .found-list li { transition: none; animation: none; } }

/* 지도 위 갈 곳 상자: 위험도는 맨 위에 한 번만 */
.wm-go-head { margin: 0; padding: 6px 12px 4px; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.wm-go-head .d1 { color: #c9920f; } .wm-go-head .d2 { color: #df7a2e; } .wm-go-head .d3 { color: #d64553; }
.wm-pin.open .wm-stars { display: none; }

/* 관리자 화면 */
.admin-tabs { margin: 0 0 16px; }
.admin-body { display: grid; gap: 14px; }
.admin-body .field { gap: 4px; }
.field-label { font-size: 0.9rem; font-weight: 600; }
.admin-body textarea, .admin-body input[type="text"], .admin-body input[type="number"], .admin-body input[type="search"], .modal-body input[type="search"] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--card-line); background: #fff; font: inherit; color: var(--ink); }
.admin-body textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.reward-rows { display: grid; gap: 6px; }
.reward-row { display: grid; grid-template-columns: minmax(120px, 2fr) repeat(3, minmax(60px, 1fr)) 36px; gap: 8px; align-items: center; }
.reward-row.head { font-weight: 700; }
.reward-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.reward-item .item-icon { width: 24px; height: 24px; flex: none; }
.mail-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.mail-slot { min-height: 82px; display: grid; justify-items: center; align-content: center; gap: 2px; padding: 8px; border-radius: 12px; border: 1.5px dashed var(--sub); background: #fff; font: inherit; cursor: pointer; color: var(--ink-soft); }
.mail-slot .icon { width: 20px; height: 20px; }
.mail-slot.filled { border-style: solid; border-color: var(--card-line); color: var(--ink); }
.mail-slot .item-icon { width: 30px; height: 30px; }
.mail-slot-name { font-size: 0.85rem; font-weight: 700; text-align: center; }
.mail-slot b { color: var(--main-deep); font-size: 0.85rem; }
.radios { display: flex; gap: 16px; flex-wrap: wrap; }
.radio { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.people-box { display: grid; gap: 8px; }
.people-box[hidden] { display: none; }
.pick-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.pick-list.people { max-height: 240px; margin: 0; }
.pick-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: var(--paper); font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.pick-item:hover, .pick-item:focus-visible { border-color: var(--sub); background: var(--sub-soft); }
.pick-item .item-icon, .pick-item .icon { width: 24px; height: 24px; flex: none; }
.pick-item span:nth-child(2) { font-weight: 700; }
.pick-item .quiet { margin-left: auto; text-align: right; }
.chips.chosen:empty::before { content: "아직 아무도 고르지 않았어요."; color: var(--hint); font-size: 0.85rem; }
.person-chip { display: inline-flex; align-items: center; gap: 4px; }
.chip-x { border: 0; background: transparent; color: inherit; font-size: 1rem; cursor: pointer; padding: 0 2px; line-height: 1; }

@media (max-width: 760px) {
  .char-pop { position: fixed; left: 12px; right: 12px !important; top: 64px !important; width: auto; }
  .reward-row { grid-template-columns: 1fr repeat(3, 56px) 32px; gap: 4px; }
  .busy-actions { justify-content: stretch; }
  .busy-actions .btn { flex: 1; }
}
.form-row { align-items: start; }
.admin-body .field input, .admin-body .field textarea { margin: 0; }

/* ===================== 7단계 다듬기: 제목 글꼴, 지도, 채팅, 타이틀 ===================== */

/* 제목 '잠든 숲' — 제주돌담체 (글꼴 파일은 jsDelivr 에서 받는다. 못 받으면 기본 글꼴) */
@font-face {
  font-family: 'JejuStoneWall';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2210-EF@1.0/EF_jejudoldam.woff2') format('woff2');
  font-weight: normal;
  font-display: swap;
}
.logo, .brand-title { font-family: 'JejuStoneWall', var(--font); font-weight: normal; letter-spacing: 0.04em; }

/* 스탯: 밑줄 없이, 누르면 상세 */
.stat { border-bottom: 0; cursor: pointer; }

/* 지도 안내: 왼쪽 위 */
.wm-legend { top: 10px; bottom: auto; left: 10px; right: 60px; }
.wm-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.wm-legend .lg::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--c); margin: 0 4px 0 3px; color: transparent; }
.wm-legend .lg.here::before { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #f7d7e6; box-shadow: inset 0 0 0 2.5px #cf5f86; margin: 0 3px; }
.wm-legend .lg.visited { --c: #4f9d5d; }
.wm-legend .lg.near { --c: #8fc79a; }
.wm-legend .lg.unknown { --c: #b9c4b5; }
.wm-legend .lg.count::before { display: none; }

/* 동그라미 표시: 커서를 올리면 살짝 커진다 */
.wm-mark { transition: transform 0.16s ease; transform-box: fill-box; transform-origin: center; }
.wm-pin:not(.plain):hover .wm-mark, .wm-pin.open .wm-mark, .wm-pin:focus-visible .wm-mark { transform: scale(1.2); }
.wm-pin.here .wm-mark { transform-origin: 50% 100%; }
.wm-pin.movable, .wm-pin.visited { cursor: pointer; }
.wm-pin:focus { outline: none; }
.wm-pin.unknown.plain { pointer-events: none; }

/* 누르면 뜨는 상자: 길의 묘사 한 줄 + [이동하기] */
.wm-pop { min-width: 220px; max-width: 280px; }
.wm-go-item + .wm-go-item { border-top: 1px solid var(--line); }
.wm-go-desc { margin: 0; padding: 2px 12px 6px; font-size: 0.84rem; line-height: 1.5; color: var(--ink); }
.wm-go { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wm-go + .wm-go { border-top: 0; }

/* 걷는 중: 가는 길 위로 화살표가 흘러간다 */
.wm-trip-line { fill: none; stroke: #e0913a; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 18 16; animation: wm-trip 0.9s linear infinite; opacity: 0.85; }
@keyframes wm-trip { to { stroke-dashoffset: -34; } }
.wm-trip-arrow { fill: #e0913a; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.wm-trip-time { font: 700 30px var(--font); fill: #b9661b; paint-order: stroke; stroke: #fff; stroke-width: 10px; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .wm-trip-line { animation: none; } .wm-trip-arrow { display: none; } }
.turn-back { margin-top: 10px; }
.turn-back .btn { display: inline-flex; gap: 6px; align-items: center; }
.sub-tabs a.locked { opacity: 0.45; }

/* 지도 왼쪽 아래의 대화 (이동 중 도움, 모닥불): 입력칸 위로 말이 쌓이고, 4번째 줄부터 흐려진다 */
.chats.on-map { position: absolute; left: 10px; bottom: 10px; width: min(340px, calc(100% - 20px)); margin: 0; gap: 8px; z-index: 4; pointer-events: none; }
.chats.on-map .chat { background: transparent; border: 0; padding: 0; pointer-events: none; }
.chats.on-map .chat-head, .chats.on-map .chat-form { pointer-events: auto; }
.chat .chat-head { margin: 4px 0; font-size: 0.75rem; color: var(--ink-soft); }
.chats.on-map .chat-head { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.9); }
.chat .chat-log { max-height: none; overflow: visible; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; margin: 0; }
.chat .chat-log li { display: block; width: fit-content; max-width: 100%; padding: 4px 10px; border-radius: 12px; background: rgb(255 255 255 / 0.92); box-shadow: 0 1px 3px rgb(47 66 55 / 0.12); font-size: 0.86rem; transition: opacity 0.6s ease; }
.chat .chat-log li .chat-from { margin-right: 6px; }
.chat .chat-log li time { margin-left: 6px; }
.chat .chat-log li[data-age="3"] { opacity: 0.6; }
.chat .chat-log li[data-age="4"] { opacity: 0.35; }
.chat .chat-log li[data-age="5"] { opacity: 0.15; }
.chat .chat-log li[data-age="6"] { display: none; }
.chats.on-map .chat-form input { background: rgb(255 255 255 / 0.95); }
.chats:not(.on-map) .chat { background: var(--sage-band); }

/* 전체 채팅 (왼쪽, 프로필 카드 아래) */
.gchat { padding: 14px 16px; display: grid; gap: 8px; }
.gchat-head { margin: 0; display: flex; justify-content: space-between; align-items: baseline; color: var(--main-deep); }
.gchat-log { list-style: none; margin: 0; padding: 0; height: 240px; overflow-y: auto; display: grid; align-content: start; gap: 6px; font-size: 0.86rem; }
.gchat-log li { line-height: 1.45; word-break: break-word; }
.gchat-from { margin-right: 6px; color: var(--main-deep); }
.gchat-from .title-prefix { margin-right: 4px; font-size: 0.75rem; }
.gchat-log time { margin-left: 6px; font-size: 0.7rem; color: var(--hint); }
.gchat-form { display: flex; gap: 6px; }
.gchat-form input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.gchat-form input:focus { border-color: var(--main); outline: none; box-shadow: 0 0 0 3px rgb(167 215 179 / 0.45); }
@media (max-width: 900px) { .gchat-log { height: 160px; } }

/* 반짝이는 나뭇잎 카드: 소지품 아래 */
.inv-side .leaf-mini { margin-top: 14px; box-shadow: none; border: 1px solid var(--card-line); }

/* 만들기: 지금 만들 수 있는 게 없을 때 */
.craft-none { margin: 0 0 6px; padding: 10px 14px; border-radius: 12px; background: var(--sage-band); color: var(--ink-soft); font-weight: 700; grid-column: 1 / -1; }

/* 신분증 거래 이득 */
.card-bonus { margin: 0 0 8px; padding: 6px 12px; border-radius: 10px; background: var(--sub-soft); color: var(--main-deep); }

/* 타이틀 창: 하나만 고른다 */
.title-row .title-select { width: 100%; }
.title-effect { color: var(--main-deep); font-weight: 700; }
.play-side, .play-side > * { min-width: 0; }
.gchat-form .btn { flex: none; white-space: nowrap; }
.wm-legend .lg.visited::before, .wm-legend .lg.near::before, .wm-legend .lg.unknown::before, .wm-legend .lg.here::before { content: ""; }
.gchat { grid-template-columns: minmax(0, 1fr); }
.gchat > * { min-width: 0; }
/* 휴대폰: 전체 채팅은 지금 화면 아래로 (게임 화면이 먼저 보이게) */
@media (max-width: 1100px) {
  .play-side { display: contents; }
  .play-side > .gchat { order: 3; }
}

/* ===================== 필드 전투 ===================== */
.battle { margin-top: 12px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--card-line); display: grid; gap: 12px; }
.battle-head { display: flex; gap: 12px; align-items: center; }
.battle-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); flex: none; }
.battle-icon svg { width: 22px; height: 22px; }
.battle-ambush { margin: 0; font-weight: 700; color: var(--ink); line-height: 1.5; }
.battle-ask { margin: 0; color: var(--ink-soft); }
.battle-stances { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.battle-stance { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--card-line); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); transition: transform 0.12s ease, border-color 0.12s ease; }
.battle-stance strong { font-size: 1.05rem; color: var(--main-deep); }
.battle-stance:hover:not(:disabled) { border-color: var(--main); transform: translateY(-1px); }
.battle-stance.stance-attack strong { color: #c0563b; }
.battle-stance.stance-flee strong { color: var(--ink-soft); }
.battle-stance.picked { border-color: var(--main); background: var(--sub-soft); }
.battle-stance:disabled { cursor: default; opacity: 0.7; }
.battle-stance-line { margin: 0; }
.battle-log { list-style: none; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); display: grid; gap: 6px; max-height: 340px; overflow-y: auto; font-size: 0.95rem; line-height: 1.5; }
.battle-log li.who-me { color: var(--ink); }
.battle-log li.who-foe { color: #a2482f; }
.battle-log li.who-sys { color: var(--main-deep); font-weight: 700; }
.battle-log li.new { animation: battle-in 0.35s ease both; }
@keyframes battle-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .battle-log li.new { animation: none; } }
a.row { text-decoration: none; }
.battle-decide { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--point); }
.battle-decide[hidden] { display: none; }
.battle-decide-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.battle-count { font-weight: 700; color: var(--bad); font-variant-numeric: tabular-nums; }

/* ===================== 사람 메뉴, 채팅 탭, 동행, 관리 ===================== */
.name-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--main-deep); cursor: pointer; text-decoration: none; }
.name-btn:hover, .name-btn:focus-visible { text-decoration: underline; }
.chats.on-map .name-btn { pointer-events: auto; }
.person-menu { position: absolute; z-index: 60; min-width: 150px; padding: 6px; border-radius: 14px; border: 1px solid var(--card-line); background: #fff; box-shadow: 0 10px 30px rgb(47 66 55 / 0.18); display: grid; gap: 2px; }
.person-menu-title { margin: 2px 8px 4px; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.person-menu-item { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: inherit; color: var(--ink); cursor: pointer; }
.person-menu-item:hover, .person-menu-item:focus-visible { background: var(--sage-band); outline: none; }
.person-menu-item.danger { color: var(--bad); }
.gchat-head { flex-wrap: wrap; gap: 6px; }
.gchat-tabs { display: flex; gap: 4px; }
.gchat-tab { border: 1px solid var(--card-line); background: #fff; border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.gchat-tab[aria-selected="true"] { background: var(--main); border-color: var(--main); color: #fff; }
.gchat-me { color: var(--ink-soft); }
.gchat-name { color: var(--main-deep); }
.party-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 12px; border-radius: 14px; background: var(--sub-soft); border: 1px solid var(--sub); }
.party-names { margin: 0; flex: 1; font-size: 0.9rem; }
.party-name.leader { font-weight: 700; }
.party-name.away { color: var(--hint); }
.callout-actions { display: flex; gap: 6px; margin-left: auto; }
.nearby-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.nearby-list li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--card-line); }
.nearby-list li svg { width: 16px; height: 16px; color: var(--ink-soft); }
.banned-page { text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center; }
.banned-page h1 { margin: 0; font-size: 1.4rem; }
.banned-icon svg { width: 40px; height: 40px; color: var(--sage); }
.contact-mail { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.contact-mail svg { width: 20px; height: 20px; }
.mod-card { border: 1px solid var(--card-line); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 8px; background: #fff; }
.mod-who { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.mod-chip { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); }
.mod-chip.chat_ban { background: #fff4dc; color: #a26a00; }
.mod-reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mod-reports li { padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.mod-reports li.handled { opacity: 0.55; }
.mod-reports p { margin: 0; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; }

/* 스탭 기록 */
.mod-logs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mod-logs li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--glass-soft, rgba(255,255,255,.05)); }
.mod-logs time { white-space: nowrap; }

/* 오너 나이 */
.set-select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; min-width: 120px; }

/* ---------- 채팅 지문 (상호작용 결과) ---------- */
.gchat-log li.gchat-system { color: var(--ink-soft); font-style: italic; text-align: center; font-size: 0.86rem; }
.gchat-log li.gchat-system time { margin-left: 6px; font-style: normal; font-size: 0.75rem; color: var(--hint); }
.chat-log li[data-system] { font-style: italic; color: var(--ink-soft); }
.chat .chat-log li[data-system] { background: rgb(238 244 236 / 0.95); }

/* ---------- 요청 팝업 ([거절/수락]) ---------- */
.ask-stack { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.ask-pop { pointer-events: auto; padding: 12px 14px; border-radius: 14px; box-shadow: var(--puff); background: var(--glass-strong); border: 1px solid var(--card-line); animation: ask-in 0.25s ease; }
.ask-pop.ask-trade { border-left: 4px solid #e2bd6e; }
.ask-pop.ask-interact { border-left: 4px solid var(--main); }
.ask-text { margin: 0 0 8px; font-weight: 600; word-break: break-word; }
@keyframes ask-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask-pop { animation: none; } }

/* ---------- 상호작용 입력 ---------- */
.interact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 1.02rem; }
.interact-input { flex: 1 1 140px; min-width: 120px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.interact-form .row-end { align-items: center; gap: 10px; }

/* ---------- 거래창 ---------- */
.dialog.modal.trade-modal { width: min(1080px, calc(100vw - 24px)); }
.trade-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.6fr) minmax(200px, 1fr); gap: 14px; padding: 14px 16px 16px; min-height: 0; overflow-y: auto; }
.trade-col-title { margin: 0 0 6px; font-size: 0.95rem; color: var(--main-deep); }
.trade-chat, .trade-side { display: flex; flex-direction: column; min-height: 0; background: var(--sage-band); border-radius: 14px; padding: 10px; }
.trade-chat-log { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 160px; max-height: 420px; overflow-y: auto; display: grid; align-content: start; gap: 4px; font-size: 0.88rem; }
.trade-chat-log li { background: #fff; border-radius: 10px; padding: 4px 8px; word-break: break-word; }
.trade-chat-log li b { margin-right: 6px; color: var(--main-deep); }
.trade-chat-log li[data-mine] b { color: var(--ink-soft); }
.trade-chat-log time { margin-left: 6px; font-size: 0.72rem; color: var(--hint); }
.trade-chat-form { display: flex; gap: 6px; margin-top: 8px; }
.trade-chat-form input { flex: 1; min-width: 0; padding: 7px 9px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.trade-center { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.trade-board { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 12px; box-shadow: var(--puff-sm); }
.trade-line { border: 0; border-top: 2px dashed var(--cream-edge); margin: 12px 0; }
.trade-who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.trade-photo { flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; background: var(--sub-soft); display: grid; place-items: center; border: 2px solid var(--sub); }
.trade-photo img { width: 100%; height: 100%; object-fit: cover; }
.trade-who-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.trade-name { color: var(--forest); }
.trade-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.trade-tag { font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; background: var(--sub-soft); color: var(--main-deep); }
.trade-ready-badge { flex: none; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--main); color: #fff; }
.trade-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.trade-slot { position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--card-line); background: var(--paper); display: grid; place-items: center; align-content: center; padding: 4px; font: inherit; color: inherit; min-width: 0; }
.trade-person.me .trade-slot { border-color: var(--sub); }
.trade-slot.filled { border-style: solid; background: #fff; }
.trade-slot.over { background: var(--sub-soft); border-color: var(--main); }
button.trade-slot.filled:hover { border-color: var(--bad); }
.trade-slot svg { width: 26px; height: 26px; }
.trade-slot-name { font-size: 0.68rem; line-height: 1.15; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; }
.trade-slot-qty { position: absolute; right: 4px; top: 2px; font-size: 0.7rem; font-weight: 700; color: var(--main-deep); }
.trade-person.ready .trade-slots { outline: 2px solid var(--main); outline-offset: 3px; border-radius: 12px; }
.trade-status { margin: 0; min-height: 1.4em; display: grid; gap: 2px; text-align: center; font-weight: 600; }
.trade-status .bad { color: var(--bad); }
.trade-actions { display: flex; justify-content: center; gap: 10px; }
.trade-actions .btn { min-width: 120px; }
.trade-hint { margin: 0 0 6px; }
.trade-inv { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; overflow-y: auto; max-height: 440px; }
.trade-inv-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--card-line); font: inherit; color: inherit; text-align: left; cursor: grab; }
.trade-inv-item:hover { background: var(--sub-soft); }
.trade-inv-item svg { width: 22px; height: 22px; }
.trade-inv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.trade-inv-qty { font-size: 0.8rem; font-weight: 700; color: var(--main-deep); }
@media (max-width: 860px) {
  .trade-grid { grid-template-columns: 1fr; }
  .trade-center { order: -1; }
  .trade-chat-log { max-height: 160px; min-height: 80px; }
  .trade-inv { max-height: 220px; }
}

/* ---------- 친구 ---------- */
.friends-bar { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 10px; border-radius: 14px; border: 1px solid var(--card-line); font: inherit; color: var(--forest); font-weight: 700; cursor: pointer; text-align: left; }
.friends-bar[hidden] { display: none; }
.friends-bar:hover { background: var(--sub-soft); }
.friends-bar-text { flex: 1; }
.friends-letter { display: inline-grid; place-items: center; color: #c9883a; animation: letter-bob 1.8s ease-in-out infinite; }
.friends-letter[hidden] { display: none; }
@keyframes letter-bob { 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .friends-letter { animation: none; } }
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 0.72rem; font-weight: 700; }
.count-badge[hidden] { display: none; }
.dialog.modal.friends-modal { width: min(980px, calc(100vw - 24px)); }
.friends-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.friends-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; background: none; font: inherit; color: var(--ink-soft); border-bottom: 3px solid transparent; cursor: pointer; }
.friends-tab[aria-selected="true"] { color: var(--main-deep); font-weight: 700; border-bottom-color: var(--main); }
.friend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .friend-grid { grid-template-columns: 1fr; } }
.friend-card { display: grid; gap: 6px; }
.friend-open { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.friend-open .idc { max-width: none; }
.friend-letter-badge { position: absolute; top: -6px; right: -6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; background: #fff4df; color: #b87322; font-size: 0.78rem; font-weight: 700; box-shadow: var(--puff-sm); }
.friend-letter-badge svg { width: 16px; height: 16px; }
.friend-nocard { aspect-ratio: 340 / 214; border-radius: 14px; background: var(--sage-band); display: grid; place-items: center; align-content: center; gap: 6px; }
.friend-actions { display: flex; justify-content: space-between; }
.danger-link { color: var(--bad); }
.friends-empty { padding: 24px 0; text-align: center; }
.friend-req-list, .friend-out-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.friend-req-list li { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--sage-band); }
.friend-req-text { display: grid; gap: 2px; }
.friend-ox { display: flex; gap: 8px; }
.ox-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; font: inherit; font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: var(--puff-sm); }
.ox-o { background: var(--main); color: #fff; }
.ox-x { background: #fff; color: var(--bad); }
.friend-out-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--paper); }
@media (max-width: 520px) { .friend-req-list li { grid-template-columns: 1fr auto; } .friend-req-card { grid-column: 1 / -1; } }
.letter-back { margin-bottom: 6px; }
.letter-title { margin: 0 0 10px; color: var(--main-deep); }
.letter-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
.letter { padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: #fffaf0; border: 1px solid var(--cream-edge); max-width: 80%; }
.letter.mine { justify-self: end; border-radius: 14px 4px 14px 14px; background: var(--sub-soft); border-color: var(--sub); }
.letter-head { margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; font-size: 0.85rem; }
.letter-head time { color: var(--hint); font-size: 0.75rem; }
.letter-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.letter-form textarea { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 12px; border: 1px solid var(--card-line); font: inherit; resize: vertical; }
.letter-form .row-end { align-items: center; gap: 10px; margin-top: 6px; }
.letter .letter-head, .letter .letter-text { margin: 0; }
.friend-req-list li { grid-template-columns: minmax(200px, 260px) 1fr auto; }
@media (max-width: 860px) {
  .trade-grid { align-content: start; }
  .trade-chat, .trade-side { min-height: auto; flex: none; }
  .trade-chat-log { flex: none; }
}

/* ---------- 우편함 (창고지기) ---------- */
.post-box { display: grid; gap: 8px; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.post-head p { margin: 0; flex: 1 1 220px; }
.mail-card.market { border-left: 4px solid #e2bd6e; }
.mail-note { margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: #fffaf0; border: 1px dashed var(--cream-edge); white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; }
.mail-pick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; }
.mail-pick li { display: grid; grid-template-columns: auto 1fr 72px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--paper); border: 1px solid var(--card-line); }
.mail-pick svg { width: 22px; height: 22px; }
.mail-pick-name { font-size: 0.88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-pick input { width: 100%; padding: 5px 6px; border-radius: 8px; border: 1px solid var(--card-line); font: inherit; }
.mail-form, .gift-form, .market-sell-form { display: grid; gap: 10px; }
.mail-form textarea, .gift-form textarea, .gift-form input, .mail-form input[type="text"], .market-sell-form input { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.mail-fee, .gift-total { margin: 0; font-weight: 700; color: var(--main-deep); }
.mail-fee.bad, .gift-total.bad { color: var(--bad); }

/* ---------- 시장 ---------- */
.dialog.modal.market-modal { width: min(860px, calc(100vw - 24px)); }
.market-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.market-purse { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #fff4df; color: #9a6a22; font-weight: 700; font-size: 0.9rem; }
.market-purse.card { background: var(--sub-soft); color: var(--main-deep); }
.market-purse svg { width: 18px; height: 18px; }
.market-search { display: flex; gap: 8px; margin-bottom: 10px; }
.market-search input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.market-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.market-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--card-line); }
.market-icon svg { width: 28px; height: 28px; }
.market-main { min-width: 0; }
.market-main p { margin: 0; }
.market-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-price { display: grid; justify-items: end; line-height: 1.1; }
.market-price b { color: #9a6a22; font-size: 1.05rem; }
.market-empty { padding: 20px 0; text-align: center; }
.market-sell-item { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.count-badge.soft { background: var(--sub); color: var(--main-deep); }
@media (max-width: 560px) {
  .market-row { grid-template-columns: auto 1fr auto; }
  .market-row > .btn { grid-column: 1 / -1; }
}

/* ---------- 선물 ---------- */
.gift-section { display: grid; gap: 8px; }
.gift-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gift-head p { margin: 0; flex: 1 1 240px; }
.gift-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gift-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, #fff7f0, #fdeef4); border: 1px solid #f1d6e2; }
.gift-ribbon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: #d06a8f; box-shadow: var(--puff-sm); }
.gift-main p { margin: 0; }
.gift-title { display: flex; gap: 0; }
.gift-note { margin-top: 4px !important; font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); }
.gift-sent { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gift-sent li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--paper); }
.gift-products { display: grid; gap: 6px; }
.gift-product { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--card-line); background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.gift-product[aria-checked="true"] { border-color: var(--main); background: var(--sub-soft); }
.gift-product-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--sage-band); }
.gift-product-text { display: grid; gap: 2px; min-width: 0; }
.gift-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #9a6a22; white-space: nowrap; }
.gift-price svg { width: 16px; height: 16px; }
.gift-chip { align-self: start; margin-left: auto; padding: 2px 8px; border-radius: 999px; background: #fdeef4; color: #c45780; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.gift-chip[hidden] { display: none; }
.market-sell-item svg { width: 28px; height: 28px; flex: none; }

/* ---------- 동행 전투의 '함께 싸우는 장면' ---------- */
.battle-log li.who-scene { color: #6a4fa0; font-style: italic; background: #f6f1fd; border-radius: 8px; padding: 2px 8px; }

/* ---------- 설정: 탭, 감정표현 ---------- */
.set-tabs { margin: 4px 0 18px; }
.set-pane[hidden] { display: none; }
.emote-form { display: grid; gap: 10px; }
.emote-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: emote; }
.emote-row { display: grid; grid-template-columns: auto 110px auto 1fr; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--card-line); }
.emote-row input { min-width: 0; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--card-line); font: inherit; }
.emote-slash { font-weight: 800; color: var(--main-deep); }
.emote-colon { color: var(--hint); font-weight: 700; }
.emote-preview { grid-column: 2 / -1; margin: 0; min-height: 0; }
.emote-preview:empty { display: none; }
.emote-special { margin-top: 18px; }
.small-title { font-size: 1rem; }
.emote-special-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.emote-special-list li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: #f6f1fd; border: 1px solid #e4dbf5; }
.emote-special-list code { font-weight: 700; color: #6a4fa0; }
.emote-special-list p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 520px) { .emote-row { grid-template-columns: auto 80px auto 1fr; } }

/* ---------- 근처의 사람: 사진과 태그 (필드에서는 말하기 전까지 이름 없이) ---------- */
.nearby-list li { flex-wrap: wrap; }
.nearby-photo { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: var(--sage-band); flex: none; }
.nearby-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nearby-list li .nearby-photo svg { width: 16px; height: 16px; }
.nearby-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.nearby-tags .tag-chip { font-size: 0.75rem; padding: 0 7px; }
.nearby-hidden { border-style: dashed !important; }
.nearby-hint { margin: -4px 0 12px; }

/* ---------- 친구창: 차단 목록 ---------- */
.friend-blocks > p:first-child { margin: 0 0 10px; }
.block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.block-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--card-line); background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.block-item:hover, .block-item:focus-visible { border-color: var(--danger, #c0564b); }
.block-item svg { width: 18px; height: 18px; color: var(--ink-soft); }
.block-item strong { flex: 1; }

/* ---------- 필드 이벤트 창 ---------- */
.fev-back { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(28, 40, 30, 0.38); animation: fev-fade 0.3s ease; }
.fev-card { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 22px 18px; border-radius: 20px; box-shadow: var(--puff); background: var(--glass-strong); border: 1px solid var(--card-line); display: grid; gap: 14px; }
.fev-lines { display: grid; gap: 6px; }
.fev-line { margin: 0; line-height: 1.7; animation: fev-line 0.5s ease both; }
.fev-choices { display: grid; gap: 8px; }
.fev-choice { width: 100%; justify-content: center; background: #fff; color: var(--ink); border: 1px solid var(--card-line); }
.fev-choice:hover:not([disabled]) { border-color: var(--main); }
.fev-choice.picked { background: var(--main); color: #fff; border-color: var(--main); }
.fev-timer { height: 4px; border-radius: 999px; background: var(--sage-band); overflow: hidden; }
.fev-timer span { display: block; height: 100%; background: var(--main); transition: width 0.25s linear; }
.fev-timer.low span { background: #d9895b; }
.fev-party { margin: 0; }
.fev-picked { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fev-chip { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--main); color: #fff; font-weight: 600; font-size: 0.9rem; }
.fev-effects { display: flex; flex-wrap: wrap; gap: 6px; }
.fev-fx { padding: 2px 10px; border-radius: 8px; background: var(--sage-band); font-size: 0.85rem; }
.fev-fx.bad { background: #f6e3dc; color: #8a4a35; }
@keyframes fev-fade { from { opacity: 0; } }
@keyframes fev-line { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .fev-back, .fev-line { animation: none; } }

/* ---------- 반려동물 카드 ---------- */
.pet-card { padding: 14px 16px; border-radius: 18px; display: grid; gap: 10px; }
.pet-head { display: flex; align-items: center; gap: 10px; }
.pet-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-band); color: var(--main); flex: none; }
.pet-icon svg { width: 20px; height: 20px; }
.pet-with.eternal .pet-icon { opacity: 0.55; filter: blur(0.3px); }
.pet-name strong { font-size: 1.05rem; }
.pet-look, .pet-meta { margin: 0; line-height: 1.6; }
.pet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pet-tag { padding: 0 8px; border-radius: 999px; background: var(--sage-band); font-size: 0.75rem; }
.pet-tag.bad { background: #f6e3dc; color: #8a4a35; }
.pet-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pet-actions .btn { justify-content: center; }
.pet-left { margin: 0; }
.pet-more summary { cursor: pointer; font-size: 0.85rem; color: var(--ink-soft); }
.pet-more-row { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; }
.link-btn.danger { color: #b5523f; }
.pet-inn ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.pet-inn li { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.pet-foods { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pet-food { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--card-line); background: #fff; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.pet-food:hover { border-color: var(--main); }
.pet-food svg { width: 26px; height: 26px; flex: none; }
.pet-release { display: grid; gap: 10px; }
.pet-release p { margin: 0; }
.pet-chip { background: #efe6d6 !important; color: #6b5a3a !important; }
.idc-pet { margin: 4px 0 0; font-size: 0.78rem; opacity: 0.8; }
.fev-pet { justify-items: stretch; }
.fev-pet-icon { justify-self: center; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-band); color: var(--main); }
.fev-pet-icon svg { width: 26px; height: 26px; }
.fev-name-form { display: flex; gap: 8px; }
.fev-name { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--card-line); font: inherit; }
.fev-hint { margin: 0; }
.fev-hint.bad { color: #b5523f; opacity: 1; }
/* 반려동물 카드는 한 줄, 누르면 창 */
.pet-card { padding: 10px 12px; }
.pet-summary { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pet-summary .pet-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-summary.eternal .pet-icon { opacity: 0.55; }
.pet-lv { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--sage-band); color: var(--main-deep); font-size: 0.8rem; font-weight: 600; }
.pet-lv.bad { background: #f6e3dc; color: #8a4a35; }
.pet-window { display: grid; gap: 14px; }
.pet-modal .pet-actions { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .pet-modal .pet-actions { grid-template-columns: repeat(2, 1fr); } }

/* 시즌 이벤트 안내 (소식지) */
.season-banner { border-radius: 14px; padding: 12px 16px; margin: 4px 0 14px; border: 1px solid var(--line, rgba(0,0,0,.12)); background: var(--glass, rgba(255,255,255,.6)); }
.season-banner strong { display: block; margin-bottom: 4px; }
.season-banner p { margin: 2px 0; }
.season-autumn_leaves { background: linear-gradient(120deg, rgba(246, 215, 122, .35), rgba(201, 101, 43, .18)); }
.season-frost_festival { background: linear-gradient(120deg, rgba(214, 236, 255, .55), rgba(255, 255, 255, .35)); }
.season-dawn_stars { background: linear-gradient(120deg, rgba(31, 42, 92, .22), rgba(255, 243, 176, .3)); }

.admin-seasons { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.admin-seasons li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--glass, rgba(255,255,255,.6)); }
.ok-text { color: #2f7d4f; }

/* 메뉴의 느낌표 (가까운 전투, 습격) */
[data-menu].menu-alert { position: relative; }
[data-menu].menu-alert::after { content: '!'; position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: #d9534f; color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
/* 습격 */
.raid-banner { border-radius: 14px; padding: 12px 16px; margin: 4px 0 14px; background: linear-gradient(120deg, rgba(217, 83, 79, .14), rgba(255, 255, 255, .4)); border: 1px solid rgba(217, 83, 79, .25); }
.raid-banner p { margin: 4px 0 0; }
.raid-callout .raid-call-text { font-weight: 700; margin: 0; }
.raid-callout .callout-actions { flex-wrap: wrap; }
.btn.picked { outline: 2px solid currentColor; outline-offset: 1px; }
/* 가까운 곳의 전투 */
.battle-near-who { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 4px 0 0; }
.near-tag { opacity: .85; }
.prompt-card .fev-line { font-weight: 600; }

/* 부탁 게시판 */
.board-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.board-card { border-radius: 14px; padding: 12px 14px; background: var(--glass, rgba(255,255,255,.6)); border: 1px solid var(--line, rgba(0,0,0,.1)); }
.board-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.board-body { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.board-items { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.board-item { display: flex; align-items: center; gap: 6px; }
.board-item.short span:first-of-type { opacity: .7; }
.board-item input[type="number"] { width: 64px; }
.board-actions { gap: 10px; }
.board-form { display: grid; gap: 10px; margin-top: 8px; }
.board-field { display: grid; gap: 4px; }
.board-field input, .board-field textarea { width: 100%; box-sizing: border-box; }
.board-row { display: flex; flex-wrap: wrap; gap: 10px; }
.board-row .small-field { flex: 1 1 140px; }
.board-search-results { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.board-pick { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line, rgba(0,0,0,.15)); background: transparent; cursor: pointer; font: inherit; }
.gchat-report { margin-left: 6px; font-size: 11px; opacity: .7; }
.pet-card[hidden] { display: none; }
.battle-near .callout-actions .btn, .raid-callout .callout-actions .btn { white-space: nowrap; }
.battle-near .callout-actions, .raid-callout .callout-actions { flex-shrink: 0; }
.board-items svg, .board-search-results svg { width: 24px; height: 24px; flex: 0 0 24px; }
.board-item .item-icon, .board-pick .item-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.board-field input, .board-field textarea, .board-item input[type="number"] { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(0,0,0,.18)); font: inherit; background: var(--input-bg, #fff); color: inherit; }
.board-field textarea { resize: vertical; }

/* 신분증: 마을마다 그린 테두리와 풍경 도장 (그림의 검은 선을 마을 색으로 칠한다) */
.idc-art { background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--idc-paper) 92%, #fff) 0%, var(--idc-paper) 60%, color-mix(in srgb, var(--idc-paper) 88%, var(--idc-color)) 100%); border-radius: 12px; }
.idc-frame-art { position: absolute; inset: 2.5% 2.2%; background: var(--idc-color); -webkit-mask: var(--idc-frame) center / 100% 100% no-repeat; mask: var(--idc-frame) center / 100% 100% no-repeat; pointer-events: none; }
.idc-art .idc-inner { inset: 15.5% 13% 17% 13.5%; gap: 2cqi; }
.idc-art .idc-head { font-size: 4.2cqi; }
.idc-art .idc-kind { background: color-mix(in srgb, var(--idc-color) 88%, #000); }
.idc-art .idc-photo { border-width: 1.5px; border-radius: 8px; width: 25cqi; }
.idc-photo-wrap { position: relative; flex: none; }
.idc-seal { position: absolute; right: -10.5cqi; bottom: -6.5cqi; width: 20cqi; height: 20cqi; background: color-mix(in srgb, var(--idc-color) 85%, #000); -webkit-mask: var(--idc-seal) center / contain no-repeat; mask: var(--idc-seal) center / contain no-repeat; transform: rotate(-9deg); opacity: 0.82; pointer-events: none; }
.idc-art .idc-text { padding-left: 9cqi; }
/* 아래 가운데: 마을 이름 */
.idc-sign { margin: 0 !important; text-align: center; line-height: 1; }
.idc-sign-text { position: relative; display: inline-block; font-size: 3.2cqi; font-weight: 700; color: var(--idc-color); letter-spacing: 0.02em; }
/* 신분증을 바꿀 때 리더가 묻는 말 */
.idc-ask { display: grid; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--sage-band); }
.idc-ask-line { margin: 0; display: grid; gap: 4px; }
.idc-ask-line b { color: var(--main-deep); }

/* ===================== 채팅: 컴퓨터 화면에서는 왼쪽 아래에 늘 떠 있다 ===================== */
.gchat-fold { display: none; margin-left: auto; width: 28px; height: 28px; }
.gchat-fold .icon { width: 18px; height: 18px; transition: transform 0.2s; }
.gchat.folded .gchat-fold .icon { transform: rotate(180deg); }
@media (min-width: 1101px) {
  .play-side > .gchat {
    position: fixed; z-index: 30; left: var(--side); bottom: 16px; width: 270px;
    box-shadow: 0 10px 30px rgb(47 66 55 / 0.2);
  }
  .gchat-fold { display: inline-grid; place-items: center; }
  .gchat.folded .gchat-log, .gchat.folded .gchat-head > .quiet { display: none; }
  .gchat-log { height: 220px; }
  /* 떠 있는 채팅에 가리지 않도록, 왼쪽 칸은 채팅 위까지만 (높이는 global-chat.js 가 잰다. 넘치면 칸 안에서 스크롤) */
  .play-side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (min-width: 1101px) and (max-width: 1280px) {
  .play-side > .gchat { width: 236px; }
}

/* ===================== 먼저 온 사람의 말풍선 (카드 안) ===================== */
.npc-main { min-width: 0; flex: 1; }
.npc-say {
  position: relative; margin-top: 12px; max-width: 34rem; cursor: pointer;
  border: 1.5px solid var(--main); border-radius: 16px; background: #fff;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.say-clip { overflow: hidden; border-radius: 16px; transition: height 0.28s ease; }
.npc-say::before { /* 꼬리: 왼쪽을 가리키는 작은 마름모 */
  content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px;
  background: #fff; border-left: 1.5px solid var(--main); border-bottom: 1.5px solid var(--main);
  transform: rotate(45deg); border-bottom-left-radius: 3px;
}
.npc-say.opening { opacity: 0; transform: translateY(-4px) scale(0.97); }
.say-inner { padding: 9px 16px; display: flex; gap: 10px; align-items: baseline; transition: opacity 0.14s ease; }
.say-inner.fading { opacity: 0; }
.say-text { flex: 1; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.say-more { flex: none; font-size: 0.72rem; color: var(--hint); }
.npc-say.has-more .say-more::after { content: " ▸"; }
@media (prefers-reduced-motion: reduce) { .npc-say, .say-clip, .say-inner { transition: none; } }
/* 그림 테두리: 마을 이름은 사진 모서리 도장 아래, 테두리 선 바로 위 가운데 */
.idc-art .idc-sign { position: absolute; left: 0; right: 0; bottom: -4.3cqi; }
.idc-art .idc-sign-text { padding: 0 1.5cqi; text-shadow: 0 0 2px var(--idc-paper), 0 0 3px var(--idc-paper); }
