/* =====================================================
   느린 기차 — 전체 스타일
   구성: 1) 공통(변수/리셋)  2) 시작 화면(승차권)  3) 게임 화면(HUD/하단 바)
         4) 패널(말풍선/간식 메뉴)  5) 팝업(모달/카드)  6) 화이트보드 포스트잇
   ===================================================== */

/* ---------- 1) 공통: 색상 변수 + 다크모드 + 리셋 ---------- */
:root {
  --navy: #1d2f4f;
  --blue: #2f62b0;
  --red: #e8553d;
  --paper: #e9eef2;
  --ink: #1d2f4f;
  --sub: #4b5d78;
  --line: #9fb0c2;
  --field: #fff;
  box-sizing: border-box;
  /* 노치/홈바가 있는 모바일 기기에서 내용이 가려지지 않게 안전 영역 확보 */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* 다크 모드: 종이/글자/테두리 색만 어둡게 교체 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #26364f;
    --ink: #f1f4f8;
    --sub: #b5c2d4;
    --line: #5b6f8c;
    --field: #1a2638;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family:
    "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    sans-serif;
  background: var(--navy);
  color: var(--ink);
}
/* hidden 속성이 다른 display 규칙에 덮이지 않도록 강제 */
[hidden] {
  display: none !important;
}

/* ---------- 2) 시작 화면 ---------- */
.start {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(
      ellipse 55% 45% at 18% 28%,
      rgba(215, 155, 65, 0.35) 0%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 48% 52% at 82% 72%,
      rgba(175, 95, 45, 0.25) 0%,
      transparent 60%
    ),
    linear-gradient(155deg, #2a1a0e 0%, #4a2e14 45%, #3d2410 75%, #1c0e06 100%);
}
/* 승차권 카드: 양쪽 스캘럽드(반원 톱니) 엣지 */
.ticket {
  position: relative;
  overflow: visible;
  width: min(620px, 100%);
  background:
    radial-gradient(circle at 0 11px, transparent 9px, #f7f0e3 10px) 0 0 / 18px
      22px repeat-y,
    radial-gradient(circle at 18px 11px, transparent 9px, #f7f0e3 10px) 100% 0 /
      18px 22px repeat-y,
    #f7f0e3;
  border-radius: 6px;
  border: 1px solid #c8b080;
  padding: 16px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow:
    0 8px 48px rgba(10, 4, 0, 0.65),
    0 1px 6px rgba(200, 160, 80, 0.2);
  color: #1d2f4f;
}
/* 헤더 행 */
.tk-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}
.tk-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.tk-logo > span {
  font-size: 26px;
  flex-shrink: 0;
}
.tk-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.tk-logo-text small {
  font-size: 9px;
  font-weight: 400;
  color: #7a8a9a;
}
.tk-title-wrap {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tk-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #1d2f4f;
  border-bottom: 2px solid #1d2f4f;
  padding-bottom: 2px;
  white-space: nowrap;
}
.tk-subtitle {
  font-size: 11px;
  color: #7a8a9a;
}
.tk-num {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  min-width: 80px;
  white-space: nowrap;
}
.tk-num em {
  color: #e8553d;
  font-style: normal;
  font-size: 13px;
}
/* 구분선 */
.tk-sep {
  border: none;
  border-top: 1.5px dashed #c0a880;
  margin: 7px 0;
}
/* 노선 행 */
.tk-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
  font-weight: 700;
}
.tk-pipe {
  color: #c0a880;
  font-weight: 400;
}
.tk-arrow {
  font-size: 16px;
}
/* 정보 그리드 */
.tk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid #c0a880;
  border-radius: 4px;
  overflow: hidden;
  margin: 2px 0;
}
.tk-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border-right: 1.5px solid #c0a880;
}
.tk-cell:last-child {
  border-right: none;
}
.tk-cell small {
  font-size: 10px;
  color: #7a8a9a;
  letter-spacing: 0.3px;
}
.tk-cell strong {
  font-size: 15px;
  font-weight: 700;
}
/* 이름 입력칸 */
.tk-cell-input input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #1d2f4f;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid #c0a880;
  text-align: center;
  padding: 2px 2px;
  outline: none;
}
.tk-cell-input input::placeholder {
  color: #c0a880;
  font-weight: 400;
  font-size: 12px;
}
.tk-cell-input input:focus {
  border-bottom-color: #e8553d;
}
/* 안내 문구 */
.tk-note {
  margin: 0;
  font-size: 11px;
  color: #8a7a60;
  text-align: center;
  line-height: 1.6;
  padding: 1px 0;
}
/* 탑승 버튼 2개 */
.ticket-btns {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 10px;
  margin-top: 10px;
}
.ticket-btns button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 10px;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.1s;
}
.ticket-btns button:hover {
  filter: brightness(1.08);
}
.ticket-btns button:active {
  transform: scale(0.98);
}
.ticket-btns button:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 2px;
}
.ticket-btns button[data-mode="ticket"] {
  background: #1d2f4f;
  color: #fff;
}
.ticket-btns button.free {
  background: #e4ddd0;
  color: #3a2e1e;
  border: 1.5px solid #c0a880;
}
.ticket-btns button span:first-child {
  font-size: 18px;
  flex-shrink: 0;
}
.ticket-btns button b {
  opacity: 0.65;
  font-size: 13px;
  margin-left: 2px;
}
/* 모바일 */
@media (max-width: 500px) {
  .ticket {
    padding: 12px 18px 12px;
  }
  .tk-title {
    font-size: 20px;
    letter-spacing: 3px;
  }
  .tk-route {
    font-size: 12px;
    gap: 6px;
  }
  .tk-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tk-cell {
    border-bottom: 1.5px solid #c0a880;
  }
  .tk-cell:nth-child(2n) {
    border-right: none;
  }
  .tk-cell:nth-child(n + 3) {
    border-bottom: none;
  }
  .ticket-btns {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- 3) 게임 화면 ---------- */
#game {
  position: fixed;
  inset: 0;
  display: none;
}
#game canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* 상단 정보 바(HUD) */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(29, 47, 79, 0.88);
  color: #fff;
  font-size: 14px;
}
.hud strong {
  font-size: 18px;
  margin-right: auto;
}

/* 하단 조작 바 */
.bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(29, 47, 79, 0.82);
  color: #fff;
  font-size: 13px;
}
.bar button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 6px;
  background: #e8553d;
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
}
.bar button:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 2px;
}
.bar button.alt {
  background: var(--blue);
}
.bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bar button.icon {
  font-size: 18px;
  padding: 5px 12px;
  line-height: 1.2;
}
/* 조작 힌트 문구는 한 줄을 다 차지하며 가운데 정렬 */
#hint {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  opacity: 0.85;
}

/* 소리 컨트롤 묶음 박스 — 상단바 아래 오른쪽 고정 */
/* 소리 컨트롤 묶음 박스 — 흰색 pill 디자인 */
.sound-group {
  position: absolute;
  top: calc(48px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(220, 220, 220, 0.8);
  border-radius: 999px;
  padding: 5px 10px;
  color: #2a3a52;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.sound-group input[type="range"] {
  width: 52px;
  height: 3px;
  cursor: pointer;
}
.sound-group #vol {
  accent-color: #e8a020;
}
.sound-group #volEar {
  accent-color: #4a90c4;
}
.sound-group button.icon {
  padding: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #2a3a52;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.1s;
}
.sound-group button.icon:hover {
  background: rgba(0, 0, 0, 0.08);
}
.sound-group button.icon svg {
  display: block;
  pointer-events: none;
  width: 16px;
  height: 16px;
}
/* Lucide SVG 아이콘 공통 */
svg.lucide {
  pointer-events: none;
}
/* 하단 바 버튼 인라인 아이콘 */
.bar button svg.lucide {
  width: 13px;
  height: 13px;
  display: inline;
  vertical-align: middle;
  margin-right: 2px;
}
/* 팝업 카드 h2 아이콘 */
.card h2 svg.lucide {
  width: 15px;
  height: 15px;
  display: inline;
  vertical-align: text-bottom;
  margin-right: 4px;
}
/* 로고 아이콘 */
.tk-logo > span svg.lucide {
  width: 26px;
  height: 26px;
  display: block;
}
/* 시작화면 탑승 버튼 아이콘 */
.ticket-btns button span:first-child svg.lucide {
  width: 20px;
  height: 20px;
  display: block;
}
/* 구분선 */
.sound-sep {
  width: 1px;
  height: 14px;
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

/* 모바일: 하단 바 컴팩트 */
@media (max-width: 600px) {
  #toast {
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
    /* HUD 높이(약 44px 콘텐츠) + 여유 10px */
    top: calc(54px + env(safe-area-inset-top, 0px));
    font-size: 12px;
    font-weight: 500;
    padding: 9px 13px;
    border-radius: 10px;
    line-height: 1.4;
    background: rgba(29, 47, 79, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
  .bar {
    font-size: 11px;
    gap: 7px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .bar button {
    padding: 6px 10px;
    font-size: 11px;
  }
  .bar button.icon {
    font-size: 16px;
    padding: 4px 9px;
  }
  #hint {
    font-size: 10px;
  }
  .sound-group {
    top: auto;
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    right: 8px;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 999px;
  }
  .sound-group input[type="range"] {
    width: 40px;
  }
  .sound-group button.icon {
    width: 24px;
    height: 24px;
  }
}

/* Netlify 무료 플랜 배지 숨김 */
.netlify-badge,
[data-netlify-identity-button],
#netlify-modal-overlay,
.nf-badge {
  display: none !important;
}

/* 좌석 ID 툴팁(마우스 호버) */
#tip {
  position: fixed;
  pointer-events: none;
  background: var(--navy);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: none;
  transform: translate(-50%, -140%);
}
/* 상단 알림(토스트) */
#toast {
  position: absolute;
  left: 50%;
  top: calc(64px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  max-width: 90%;
  z-index: 5;
  text-align: center;
}

/* ---------- 4) 패널: 말풍선 선택 / 간식 메뉴 ---------- */
.panel {
  position: absolute;
  left: 50%;
  bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  background: #f7f0e3;
  color: #1d2f4f;
  border-radius: 8px;
  border: 1px solid #c8b080;
  padding: 0 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 50vh;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow:
    0 -2px 16px rgba(10, 4, 0, 0.3),
    0 8px 28px rgba(10, 4, 0, 0.35);
}
/* 패널 제목: 카드 h2와 동일한 티켓 헤더 스타일 */
.panel h2 {
  width: calc(100% + 24px);
  margin: 0 -12px 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #1d2f4f;
  color: #f2b632;
  border-bottom: 1.5px dashed #c8b080;
}
/* 말풍선 문구 — 말풍선처럼 둥근 pill 형태 */
.panel button {
  font: inherit;
  font-size: 13px;
  color: #1d2f4f;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid #c8b080;
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition:
    background 0.1s,
    border-color 0.1s;
}
.panel button:hover {
  background: #fff3cf;
  border-color: #f2b632;
}
/* 간식 메뉴 — 한 줄 전체, 직사각형 */
.panel button.item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px;
  padding: 9px 13px;
  font-size: 14px;
}
.panel button.item span:last-child {
  font-weight: 700;
  color: #2f62b0;
  font-size: 13px;
}
.panel button:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 2px;
}

/* ---------- 5) 팝업(모달) + 카드 ---------- */
.modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 10;
  padding: 16px;
}
.card {
  position: relative;
  overflow: hidden;
  /* 티켓 종이: 양옆 스캘럽드 엣지 */
  background:
    radial-gradient(circle at 0 11px, transparent 9px, #f7f0e3 10px) 0 0 / 18px
      22px repeat-y,
    radial-gradient(circle at 18px 11px, transparent 9px, #f7f0e3 10px) 100% 0 /
      18px 22px repeat-y,
    #f7f0e3;
  color: #1d2f4f;
  border-radius: 6px;
  border: 1px solid #c8b080;
  padding: 0 20px 20px;
  width: min(380px, 100%);
  text-align: center;
  box-shadow:
    0 8px 40px rgba(10, 4, 0, 0.6),
    0 1px 6px rgba(200, 160, 80, 0.2);
}
/* 헤더: 남색 배경에 금색 타이틀 */
.card h2 {
  background: #1d2f4f;
  color: #f2b632;
  margin: 0 -20px 16px;
  padding: 13px 20px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-bottom: 1.5px dashed #c8b080;
}
.card p {
  margin: 7px 0;
  font-size: 14px;
  line-height: 1.55;
  color: #2a3a52;
}
.card .row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.card button {
  font: inherit;
  font-weight: 700;
  border: 1.5px solid #1d2f4f;
  border-radius: 5px;
  padding: 9px 20px;
  background: #1d2f4f;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: filter 0.12s;
}
.card button:hover {
  filter: brightness(1.15);
}
.card button.free {
  background: transparent;
  color: #4b5d78;
  border-color: #c0a880;
}
.card button.free:hover {
  background: rgba(0, 0, 0, 0.05);
}
.card button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.card button:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 2px;
}
/* 지도 팝업 */
.map-card {
  width: min(520px, 92vw);
  padding-top: 16px;
}
.map-img-wrap {
  width: 100%;
  margin: 4px 0 12px;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}
.map-img-wrap img {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}
@media (max-width: 600px) {
  .map-card { width: min(480px, 94vw); }
  .map-img-wrap img { max-height: 55vh; }
}
/* 승차권 선택 버튼(표 검사 팝업) — 선택되면 황금 강조 */
.card button.tk {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.65);
  color: #1d2f4f;
  border: 1.5px solid #c8b080;
  text-align: left;
  padding: 9px 14px;
}
.card button.tk.on {
  border-color: #f2b632;
  background: #fff3cf;
  color: #1d2f4f;
}

/* ---------- 6) 내 승차권 팝업 ---------- */
/* 정보 블록: 점선 테두리로 실물 승차권 느낌 */
.ticket-info {
  text-align: left;
  border: 1.5px dashed #c8b080;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 10px 0 4px;
  background: rgba(255, 255, 255, 0.5);
}
/* 각 정보 행: 레이블(왼쪽) + 값(오른쪽) */
.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid #c8b080;
}
.ticket-row:last-child {
  border-bottom: none;
}
.ticket-row span {
  color: #7a8a9a;
  font-size: 12px;
}
.ticket-row strong {
  font-size: 14px;
  color: #1d2f4f;
}
/* 가상 구매 안내 */
.ticket-note {
  font-size: 11px;
  color: #8a7a60;
  margin: 4px 0 8px;
  text-align: center;
}
.ticket-note a {
  color: #2f62b0;
}

/* ---------- 7) 승차권 확인 팝업 (mytk) ---------- */
.mytk-card {
  position: relative;
  overflow: hidden;
  width: min(500px, calc(100% - 32px));
  background:
    radial-gradient(circle at 0 11px, transparent 9px, #d8e8f4 10px) 0 0 / 18px
      22px repeat-y,
    radial-gradient(circle at 18px 11px, transparent 9px, #d8e8f4 10px) 100% 0 /
      18px 22px repeat-y,
    #d8e8f4;
  border-radius: 6px;
  border: 1px solid #94b0c8;
  padding: 16px 24px 0;
  color: #1d2f4f;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
}
/* 헤더 색상 override (파란빛 배경에 맞게) */
.mytk-card .tk-sep {
  border-top-color: #94b0c8;
}
.mytk-card .tk-num em {
  color: #6a90b8;
}
/* 정보 행 */
.mytk-info {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #94b0c8;
  border-radius: 4px;
  overflow: hidden;
  margin: 2px 0;
  background: rgba(255, 255, 255, 0.45);
}
.mytk-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1.5px solid #94b0c8;
}
.mytk-row:last-child {
  border-bottom: none;
}
.mytk-row span {
  font-size: 14px;
  font-weight: 500;
  color: #4a6080;
  min-width: 54px;
}
.mytk-row strong {
  font-size: 16px;
  font-weight: 700;
  margin-left: auto;
  color: #1d2f4f;
}
/* 안내 문구 */
.mytk-note {
  margin: 8px 0 0;
  font-size: 11px;
  color: #5a7a96;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mytk-note::before,
.mytk-note::after {
  content: "";
  flex: 1;
  border-top: 1px solid #94b0c8;
}
/* 하단 풍경 + 버튼 */
.mytk-footer {
  margin: 8px -24px 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(60, 110, 160, 0.15) 100%
  );
}
.mytk-footer::after {
  content: "🏔️🏔️🚃";
  position: absolute;
  bottom: 8px;
  right: 20px;
  font-size: 20px;
  opacity: 0.22;
  pointer-events: none;
  letter-spacing: 4px;
}
#myTicketClose {
  background: #1d2f4f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 40px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 5px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 0.15s;
}
#myTicketClose:hover {
  background: #2a3f60;
}
#myTicketClose:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 2px;
}

/* ---------- 6) 화이트보드 포스트잇 ---------- */

.wb-card {
  position: relative;
  width: min(360px, 92vw);
  background: #faf7f2;
  border-radius: 8px;
  border: 1px solid #d4c8b0;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 36px rgba(10,4,0,0.55), 0 1px 4px rgba(200,160,80,0.15);
  color: #1d2f4f;
}
.wb-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.wb-title {
  font-size: 13px;
  font-weight: 800;
  color: #1d2f4f;
  letter-spacing: 0.3px;
}
.wb-write-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.wb-date {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
}
.wb-loading {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  padding: 24px 0;
}
.wb-section { margin-bottom: 10px; }
.wb-label {
  font-size: 10px;
  color: #9aabb8;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.wb-text-btn {
  font: inherit;
  font-size: 12px;
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 11px;
  margin-bottom: 4px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  background: #fff;
  color: #3a4a5a;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.wb-text-btn:hover { background: #fffde7; border-color: #f2b632; }
.wb-text-btn.on { background: #fffde7; border-color: #f2b632; color: #1d2f4f; font-weight: 700; }

.wb-emoji-row { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-emoji-btn {
  font-size: 16px;
  width: 30px;
  height: 30px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
  line-height: 1;
}
.wb-emoji-btn:hover { background: #fffde7; transform: scale(1.1); }
.wb-emoji-btn.on { background: #fffde7; border-color: #f2b632; transform: scale(1.1); }

.wb-preview {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
}
.wb-preview-hint { font-size: 11px; color: #ccc; }
.wb-postit-preview {
  width: 110px;
  min-height: 82px;
  border-radius: 2px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.14);
  padding: 10px 10px 7px;
  transform: rotate(-2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.wb-postit-preview::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 10px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
}
.wb-pi-emoji { font-size: 18px; line-height: 1.2; }
.wb-pi-text { font-size: 11px; font-weight: 700; color: #333; text-align: center; line-height: 1.4; }
.wb-pi-date { font-size: 10px; color: #999; }

.wb-list {
  max-height: 200px;
  overflow-y: auto;
  margin: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wb-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-left: 3px solid #fffde7;
  border-radius: 0 6px 6px 0;
}
.wb-li-emoji { font-size: 14px; flex-shrink: 0; }
.wb-li-text { font-size: 12px; color: #2a3a52; font-weight: 600; flex: 1; min-width: 0; }
.wb-li-date { font-size: 10px; color: #bbb; flex-shrink: 0; }
.wb-empty {
  text-align: center;
  color: #ccc;
  font-size: 12px;
  padding: 22px 0;
  line-height: 1.8;
}
.wb-btn-row {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 10px;
}
.wb-btn-main {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border: 1.5px solid #1d2f4f;
  border-radius: 5px;
  background: #1d2f4f;
  color: #fff;
  cursor: pointer;
  transition: filter 0.12s;
}
.wb-btn-main:hover { filter: brightness(1.18); }
.wb-btn-main:disabled { opacity: 0.35; cursor: not-allowed; }
.wb-btn-sub {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid #c0a880;
  border-radius: 5px;
  background: transparent;
  color: #7a8a9a;
  cursor: pointer;
  transition: background 0.1s;
}
.wb-btn-sub:hover { background: rgba(0,0,0,0.04); }

/* ---------- 6) 화이트보드 포스트잇 ---------- */

/* 카드 본체 — 남색 헤더 없이 종이 느낌으로 */
.wb-card {
  position: relative;
  width: min(360px, 92vw);
  background: #faf7f2;
  border-radius: 8px;
  border: 1px solid #d4c8b0;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 36px rgba(10, 4, 0, 0.55), 0 1px 4px rgba(200, 160, 80, 0.15);
  color: #1d2f4f;
}

/* 타이틀 행 */
.wb-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.wb-title {
  font-size: 13px;
  font-weight: 800;
  color: #1d2f4f;
  letter-spacing: 0.3px;
}

/* 쓰기 헤더 (타이틀 + 날짜 양쪽 정렬) */
.wb-write-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.wb-date {
  font-size: 11px;
  color: #aaa;
  font-weight: 600;
}

/* 섹션 */
.wb-section { margin-bottom: 10px; }
.wb-label {
  font-size: 11px;
  color: #9aabb8;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 문구 버튼 */
.wb-text-btn {
  font: inherit;
  font-size: 12px;
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 11px;
  margin-bottom: 4px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  background: #fff;
  color: #3a4a5a;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.wb-text-btn:hover { background: #fffde7; border-color: #f2b632; }
.wb-text-btn.on {
  background: #fffde7;
  border-color: #f2b632;
  color: #1d2f4f;
  font-weight: 700;
}

/* 이모티콘 선택 */
.wb-emoji-row { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-emoji-btn {
  font-size: 16px;
  width: 30px;
  height: 30px;
  border: 1px solid #e0d8cc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
  line-height: 1;
}
.wb-emoji-btn:hover { background: #fffde7; transform: scale(1.1); }
.wb-emoji-btn.on {
  background: #fffde7;
  border-color: #f2b632;
  transform: scale(1.1);
}

/* 미리보기 */
.wb-preview {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
}
.wb-preview-hint { font-size: 11px; color: #ccc; }

/* 미리보기 포스트잇 */
.wb-postit-preview {
  width: 110px;
  min-height: 85px;
  border-radius: 2px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.14);
  padding: 10px 10px 7px;
  transform: rotate(-2deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.wb-postit-preview::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 10px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
}
.wb-pi-emoji { font-size: 18px; line-height: 1.2; }
.wb-pi-text { font-size: 11px; font-weight: 700; color: #333; text-align: center; line-height: 1.4; }
.wb-pi-date { font-size: 10px; color: #999; }

/* 보기 모드 목록 */
.wb-list {
  max-height: 200px;
  overflow-y: auto;
  margin: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wb-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-left: 3px solid var(--pc, #fffde7);
  border-radius: 0 6px 6px 0;
  background: rgba(255, 253, 231, 0.5); /* 포스트잇 색 연하게 — JS에서 inline style로 덮어씀 */
}
.wb-li-emoji { font-size: 14px; flex-shrink: 0; }
.wb-li-text { font-size: 12px; color: #2a3a52; font-weight: 600; flex: 1; min-width: 0; }
.wb-li-date { font-size: 10px; color: #bbb; flex-shrink: 0; }
.wb-empty {
  text-align: center;
  color: #ccc;
  font-size: 12px;
  padding: 22px 0;
  line-height: 1.8;
}

/* 버튼 행 */
.wb-btn-row {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 10px;
}
.wb-btn-main {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border: 1.5px solid #1d2f4f;
  border-radius: 5px;
  background: #1d2f4f;
  color: #fff;
  cursor: pointer;
  transition: filter 0.12s;
}
.wb-btn-main:hover { filter: brightness(1.18); }
.wb-btn-main:disabled { opacity: 0.35; cursor: not-allowed; }
.wb-btn-sub {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid #c0a880;
  border-radius: 5px;
  background: transparent;
  color: #7a8a9a;
  cursor: pointer;
  transition: background 0.1s;
}
.wb-btn-sub:hover { background: rgba(0,0,0,0.04); }
