/* ───────── Korea Unpacked · 한국 전통 테마 ─────────
 * Sea: 청자 celadon with 물결 water lines and 구름 clouds
 * Cards: 한지 hanji paper · Accents: 단청 dancheong bands, 색동 saekdong stripes, 낙관 red seal
 */
:root {
  --celadon: #cfe2d9;          /* 청자색 sea */
  --celadon-deep: #a9cbbd;
  --hanji: #f8f2e4;            /* 한지 */
  --hanji-deep: #ece2cb;
  --meok: #2c2724;             /* 먹 ink */
  --meok-soft: #6f655d;
  --jeok: #b83a2e;             /* 적 red (seal) */
  --jeok-deep: #8e2a21;
  --cheong: #1f4e79;           /* 청 blue */
  --hwang: #e2b33c;            /* 황 yellow */
  --nok: #2f7d6d;              /* 뇌록 dancheong green */
  --line: rgba(60, 45, 30, .14);
  --shadow: 0 4px 0 rgba(80, 60, 40, .10), 0 14px 30px rgba(50, 40, 30, .16);
  --shadow-sm: 0 2px 0 rgba(80, 60, 40, .10), 0 6px 14px rgba(50, 40, 30, .12);
  --font-title: "Gowun Batang", "Noto Serif KR", Georgia, serif;
  --font-body: "Gowun Dodum", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-brush: "Nanum Brush Script", "Gowun Batang", cursive;
  /* Hangul always uses Korean fonts, whatever the interface language */
  --font-ko: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-ko-title: "Gowun Batang", "Apple SD Gothic Neo", "Malgun Gothic", serif;

  /* 한지 fibers */
  --hanji-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .35' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .42 0 0 0 0 .3 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* 물결 water lines */
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='36'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.5' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M0 9c10-6 20-6 30 0s20 6 30 0 20-6 30 0 20 6 30 0'/%3E%3Cpath d='M-30 27c10-6 20-6 30 0s20 6 30 0 20-6 30 0 20 6 30 0 20-6 30 0'/%3E%3C/g%3E%3C/svg%3E");
  /* 단청 band: green · red · yellow · blue · white */
  --dancheong: repeating-linear-gradient(90deg,
      var(--nok) 0 14px, #fff 14px 16px, var(--jeok) 16px 26px, #fff 26px 28px,
      var(--hwang) 28px 34px, #fff 34px 36px, var(--cheong) 36px 46px, #fff 46px 48px);
  /* 색동 saekdong stripes */
  --saekdong: linear-gradient(90deg,
      #d9473b 0 14.28%, #f2c14e 14.28% 28.56%, #3f9a6b 28.56% 42.84%, #2f63a6 42.84% 57.12%,
      #e98fb0 57.12% 71.4%, #f8f2e4 71.4% 85.68%, #7d4aa1 85.68%);
}

/* Interface fonts for Japanese / Chinese (Korean fonts would draw Han characters in Korean style) */
html:lang(ja) {
  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-title: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
html:lang(zh-Hant) {
  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-title: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
}
html:lang(zh-Hans) {
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-title: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
}
html:lang(th) {
  --font-body: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  --font-title: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}
html:lang(vi) {
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-title: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:where([lang="ko"]) { font-family: var(--font-ko); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--meok);
  background: var(--celadon);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.hanji { background-color: var(--hanji); background-image: var(--hanji-tex); }
.app { position: relative; width: 100vw; height: 100vh; height: 100dvh; }
:focus-visible { outline: 3px solid var(--cheong); outline-offset: 2px; }

/* ───────── Top bar ───────── */
.topbar {
  position: absolute; z-index: 40; top: 14px; left: 16px; right: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 20px 9px 10px; text-decoration: none;
  border-radius: 6px 6px 14px 14px; box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.brand::before { /* dancheong band along the top edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--dancheong);
}
/* 낙관 seal logo */
.seal {
  display: grid; place-items: center; grid-template-rows: 1fr 1fr;
  width: 44px; height: 44px; padding: 3px 0; border-radius: 5px;
  background: var(--jeok); color: #fff7ee;
  font-family: var(--font-ko-title); font-weight: 700; font-size: 15px; line-height: 1;
  box-shadow: inset 0 0 0 2px var(--jeok), inset 0 0 0 3.5px #fff6;
  transform: rotate(-4deg);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: "Gowun Batang", Georgia, serif; font-weight: 700; font-size: 21px; letter-spacing: -.2px; line-height: 1.1; }
.brand-ko { font-size: 12.5px; color: var(--meok-soft); margin-top: 3px; font-family: var(--font-ko); }
.brand-ko em { font-family: var(--font-body); }
.brand-ko em { font-style: normal; color: var(--jeok); }

.tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--hanji); background-image: var(--hanji-tex);
  box-shadow: var(--shadow-sm); font-size: 14px;
  transition: transform .15s;
}
.tool-btn:hover { transform: translateY(-1px); }
.tool-ico { color: var(--jeok); font-size: 16px; }
.is-seal .tool-ico {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px;
  background: var(--jeok); color: #fff; font-size: 12px; font-family: var(--font-title); transform: rotate(-5deg);
}
.tool-n {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--meok); color: var(--hanji); font-size: 12px;
}
.tool-n.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.45); } }

/* Language picker */
.lang { position: relative; }
.globe { color: inherit !important; }
.lang-menu {
  position: absolute; z-index: 60; top: 48px; right: 0; min-width: 170px; margin: 0; padding: 6px; list-style: none;
  border-radius: 12px; box-shadow: var(--shadow);
}
.lang-menu button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 15px;
}
.lang-menu button:hover { background: var(--hanji-deep); }
.lang-menu button[aria-selected="true"] { background: var(--meok); color: var(--hanji); }
.lang-menu button[aria-selected="true"]::after { content: "✓"; }

/* Search */
.search { position: relative; }
.search input {
  width: 220px; height: 42px; padding: 0 14px 0 36px; border: 0; border-radius: 999px;
  background: var(--hanji); background-image: var(--hanji-tex); box-shadow: var(--shadow-sm);
  font: inherit; font-size: 14px; color: var(--meok);
}
.search input::placeholder { color: var(--meok-soft); }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-52%); font-size: 18px; color: var(--meok-soft); pointer-events: none; }
.search-results {
  position: absolute; top: 48px; right: 0; width: 300px; max-height: 60vh; overflow: auto;
  margin: 0; padding: 6px; list-style: none; border-radius: 12px; box-shadow: var(--shadow);
}
.search-results li button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; text-align: left;
}
.search-results li button:hover, .search-results li button.is-active { background: var(--hanji-deep); }
.search-results .sr-ko { color: var(--meok-soft); font-size: 13px; }
.search-results .sr-empty { padding: 10px; color: var(--meok-soft); font-size: 14px; }

/* ───────── Region chips: 색동 stripes ───────── */
.chips {
  position: absolute; z-index: 30; top: 86px; left: 16px; right: 16px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; position: relative; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px 9px; border: 0; border-radius: 10px; overflow: hidden;
  background: var(--hanji); background-image: var(--hanji-tex); box-shadow: var(--shadow-sm);
  font-size: 14px; white-space: nowrap; transition: transform .15s, background-color .2s;
}
.chip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--c); opacity: .9; }
.chip .ko { font-family: var(--font-ko-title); font-weight: 700; font-size: 15px; }
.chip .en { color: var(--meok-soft); font-size: 12.5px; }
.chip:hover { transform: translateY(-2px); }
.chip.is-on { background-color: var(--meok); color: var(--hanji); background-image: none; }
.chip.is-on .en { color: #e6dccb; }
.chip.is-on::after { background: var(--saekdong); height: 5px; }
.chip.is-home .ko { color: var(--jeok); }
.chip.is-on.is-home .ko { color: #fff; }

.cat-chips {
  position: absolute; z-index: 30; top: 134px; left: 16px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.cat {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  border: 1.5px solid transparent; border-radius: 999px;
  background: rgba(248, 242, 228, .92); box-shadow: var(--shadow-sm); font-size: 13px;
}
.cat small { font-family: var(--font-title); color: var(--meok-soft); }
.cat.is-on { border-color: var(--c); background: #fff; color: var(--c); font-weight: 700; }
.cat.is-on small { color: var(--c); }

/* ───────── Map ───────── */
.map-wrap {
  position: absolute; inset: 0; overflow: hidden;
  background-color: var(--celadon); background-image: var(--waves);
}
.sea-deco { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; width: 150px; fill: rgba(255, 255, 255, .55); stroke: rgba(255, 255, 255, .9); stroke-width: 1.5; animation: drift 26s ease-in-out infinite alternate; }
.cloud .curl, .cloud path.curl { fill: none; stroke: var(--celadon-deep); stroke-width: 2; stroke-linecap: round; }
.cloud-1 { left: 6%; top: 24%; }
.cloud-2 { right: 30%; top: 15%; width: 120px; animation-duration: 32s; }
.cloud-3 { left: 12%; bottom: 10%; width: 180px; animation-duration: 38s; }
@keyframes drift { to { transform: translateX(40px); } }
.sea-name {
  position: absolute; font-family: var(--font-title); font-size: 20px; letter-spacing: 6px;
  color: rgba(31, 78, 121, .35); writing-mode: vertical-rl;
}
.sea-name i { font-family: var(--font-body); font-style: normal; font-size: 11px; letter-spacing: 2px; }
.sea-east { right: 32%; top: 34%; }
.sea-west { left: 22%; top: 40%; }
.sea-south { left: 50%; bottom: 13%; writing-mode: horizontal-tb; letter-spacing: 8px; }

.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.map:active { cursor: grabbing; }
.land-shadow { fill: rgba(70, 90, 80, .28); }
.prov {
  stroke: #fffaf0; stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  transition: fill .3s, opacity .3s; cursor: pointer;
}
.prov.is-dim { fill: #efe8d6; }
.prov.is-hot { filter: brightness(1.06) saturate(1.15); }
.region-edge { fill: none; stroke: var(--meok); stroke-opacity: .55; stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }

.overlay { position: absolute; inset: 0; pointer-events: none; }
.overlay > * { pointer-events: auto; }

/* Region name plaque (현판 hyeonpan) */
.plaque {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 14px 7px; border: 0; border-radius: 4px;
  background: var(--meok); color: #fdf5e4;
  box-shadow: inset 0 0 0 2px var(--meok), inset 0 0 0 3.5px var(--c), 0 6px 14px rgba(30, 25, 20, .3);
  transition: transform .2s, opacity .3s;
}
.plaque::before { /* hanging cords */
  content: ""; position: absolute; left: 18%; right: 18%; top: -10px; height: 10px;
  border: 1.5px solid rgba(44, 39, 36, .55); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.plaque .ko { font-family: var(--font-ko-title); font-weight: 700; font-size: 17px; letter-spacing: 2px; }
.plaque .en { font-size: 11px; color: #e9ddc5; letter-spacing: .3px; white-space: nowrap; }
.plaque .n { position: absolute; right: -8px; top: -8px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--jeok); color: #fff; font-size: 11px; }
.plaque:hover, .plaque.is-hot { transform: translate(-50%, -50%) translateY(-3px) scale(1.06); }
.plaque.is-hidden { opacity: 0; pointer-events: none; }

/* Hint dots for spots at overview */
.dot { position: absolute; left: 0; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px #fff; pointer-events: none; transition: opacity .3s; }

/* Spot pins */
.pin {
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; margin: -19px;
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: #fffaf0; font-size: 19px; line-height: 1;
  box-shadow: inset 0 0 0 3px var(--c), 0 3px 0 rgba(0, 0, 0, .12), 0 6px 12px rgba(30, 25, 20, .22);
  transition: transform .18s, opacity .25s; animation: pop .35s backwards;
}
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
.pin:hover, .pin.is-hot { transform: scale(1.18); z-index: 3; }
.pin.is-on { transform: scale(1.3); z-index: 4; background: var(--c); box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(30, 25, 20, .3); }
.pin .pin-label {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px);
  padding: 3px 8px; border-radius: 6px; background: var(--meok); color: #fdf5e4;
  font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.pin:hover .pin-label, .pin.is-hot .pin-label, .pin.is-on .pin-label { opacity: 1; }
.pin .mk { position: absolute; right: -5px; top: -5px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 4px; background: var(--jeok); color: #fff; font-size: 9px; font-family: var(--font-title); transform: rotate(-8deg); box-shadow: 0 0 0 1.5px #fff; }
.pin .mk.heart { border-radius: 50%; background: #fff; color: var(--jeok); font-size: 11px; transform: none; }
.pin-lead { position: absolute; left: 0; top: 0; height: 1.5px; background: rgba(44, 39, 36, .5); transform-origin: 0 50%; pointer-events: none; }
.pin-anchor { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--meok); pointer-events: none; }

.compass {
  position: absolute; z-index: 5; left: 18px; bottom: 34px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 0;
  background: var(--hanji); box-shadow: var(--shadow-sm), inset 0 0 0 3px var(--jeok), inset 0 0 0 5px var(--hanji), inset 0 0 0 6px var(--cheong);
  font-family: var(--font-title); line-height: 1;
}
.compass b { font-size: 16px; color: var(--jeok); }
.compass span { font-size: 9px; color: var(--meok-soft); }
.credit { position: absolute; z-index: 5; left: 76px; bottom: 10px; margin: 0; font-size: 11px; color: rgba(44, 39, 36, .6); }
.credit a { color: var(--meok); }

/* ───────── Panel ───────── */
.panel {
  position: absolute; z-index: 20; top: 140px; right: 16px; bottom: 16px; width: 360px;
  display: flex; flex-direction: column; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.panel::before { content: ""; flex: none; height: 6px; background: var(--dancheong); }
.panel-head { flex: none; padding: 16px 18px 12px; border-bottom: 1px dashed var(--line); }
.panel-head .ko-big { font-family: var(--font-brush); font-size: 44px; line-height: .9; color: var(--meok); }
.panel-head h2 { margin: 2px 0 0; font-family: var(--font-title); font-size: 20px; }
.panel-head p { margin: 4px 0 0; color: var(--meok-soft); font-size: 13.5px; }
.panel-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.panel-foot { flex: none; padding: 10px 14px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--meok-soft); }

/* Phrase card */
.phrase {
  margin: 12px 14px 4px; padding: 12px 14px; border-radius: 10px;
  background: #fffaf0; box-shadow: inset 0 0 0 1px var(--line); position: relative;
}
.phrase .lbl { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--jeok); }
.phrase .ko { font-family: var(--font-ko-title); font-weight: 700; font-size: 22px; margin-top: 4px; }
.phrase .rom { font-size: 13px; color: var(--meok-soft); font-style: italic; }
.phrase .en { font-size: 14px; margin-top: 2px; }
.phrase .ph-btns { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--hanji-deep); display: grid; place-items: center; font-size: 15px; }
.icon-btn:hover { background: var(--meok); color: var(--hanji); }

/* Region & spot list cards */
.card {
  position: relative; display: flex; gap: 12px; align-items: center; width: 100%;
  padding: 10px; border: 0; border-radius: 10px; text-align: left;
  background: #fffaf0; box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .15s, box-shadow .15s;
}
.card:hover, .card.is-hot { transform: translateX(-3px); box-shadow: inset 0 0 0 1.5px var(--c), 0 4px 10px rgba(40, 30, 20, .1); }
.card .tile {
  flex: none; width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center;
  font-size: 28px; background: var(--c); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55);
}
.tile .ph, .d-hero .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.has-photo { box-shadow: inset 0 0 0 0 transparent; }
.card .tile .tile-ko { font-family: var(--font-ko-title); font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.card .body { min-width: 0; flex: 1; }
.card .t, .card .s { display: block; }
.card .t { font-family: var(--font-title); font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.card .s { font-size: 12.5px; color: var(--meok-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; color: #fff; background: var(--c); margin-right: 4px; }
.card .marks { position: absolute; right: 10px; top: 8px; display: flex; gap: 4px; }
.card .marks .m-heart { color: var(--jeok); font-size: 13px; }
.card .marks .m-seal { width: 18px; height: 18px; border-radius: 4px; background: var(--jeok); color: #fff; font-size: 10px; display: grid; place-items: center; font-family: var(--font-title); transform: rotate(-8deg); }
.card .go { flex: none; color: var(--meok-soft); font-size: 18px; }

/* ───────── Detail sheet ───────── */
.detail {
  position: absolute; z-index: 35; top: 140px; right: 16px; bottom: 16px; width: 400px;
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  transform: translateX(calc(100% + 30px)); transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.detail.is-open { transform: none; }
.detail-inner { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.detail-close {
  position: absolute; z-index: 3; right: 12px; top: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(44, 39, 36, .75); color: #fff; font-size: 15px;
}
.d-hero {
  position: relative; height: 170px; display: grid; place-items: center;
  background: var(--c); overflow: hidden;
}
.d-hero::before { /* 단청-ish lattice pattern */
  content: ""; position: absolute; inset: 0; opacity: .22;
  background-image:
    repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 18px),
    repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 18px);
}
.d-hero { height: 220px; }
.d-hero.has-photo::before { display: none; }
.d-hero .ph { z-index: 1; }
.d-hero .credit-link {
  position: absolute; z-index: 2; left: 10px; bottom: 14px; padding: 3px 8px; border-radius: 999px;
  background: rgba(30, 26, 22, .55); color: #fff; font-size: 11px; text-decoration: none;
}
.d-hero .credit-link:hover { background: rgba(30, 26, 22, .8); }
.d-hero .emoji { position: relative; font-size: 72px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .2)); }
.d-hero::after { z-index: 2; content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--saekdong); }
.d-eaves { display: block; width: 100%; height: 22px; fill: var(--meok); margin-top: -1px; }
.d-body { padding: 4px 20px 26px; }
.d-cat { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c); font-weight: 700; }
.d-ko-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.d-ko { font-family: var(--font-brush); font-size: 52px; line-height: 1; }
.d-rom { font-size: 13px; color: var(--meok-soft); font-style: italic; }
.d-en { margin: 2px 0 8px; font-family: var(--font-title); font-size: 22px; line-height: 1.25; }
.d-blurb { margin: 0 0 14px; font-size: 15px; line-height: 1.65; }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 12px; border: 0; border-radius: 10px; font-size: 14px; text-decoration: none;
  background: #fffaf0; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px var(--meok); }
.btn.primary { background: var(--meok); color: var(--hanji); box-shadow: none; }
.btn.is-on { background: #fbe6e2; color: var(--jeok-deep); box-shadow: inset 0 0 0 1.5px var(--jeok); }
.btn.seal-btn.is-on { background: var(--jeok); color: #fff; }
.btn .b-seal { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; background: var(--jeok); color: #fff; font-size: 11px; font-family: var(--font-title); transform: rotate(-6deg); }
.btn.seal-btn.is-on .b-seal { background: #fff; color: var(--jeok); }
.btn.wide { grid-column: 1 / -1; }

.d-sec { margin-top: 16px; }
.d-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-title); font-size: 16px; }
.d-sec h3 .hk { font-size: 12px; font-family: var(--font-body); color: var(--meok-soft); font-weight: 400; }
.d-sec h3::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--dancheong); background-size: 48px 14px; }
.d-sec p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.d-why { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.d-why li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.5; }
.d-why li::before { content: "✦"; position: absolute; left: 0; color: var(--c); }
.d-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.d-facts dt { color: var(--meok-soft); }
.d-facts dd { margin: 0; }

/* Season strip 사계절 */
.seasons { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.seasons .m { height: 30px; border-radius: 4px; display: grid; place-items: center; font-size: 10.5px; color: var(--meok-soft); background: var(--hanji-deep); }
.seasons .m.on { color: #fff; font-weight: 700; }
.seasons .m.on.spring { background: #e98fb0; }
.seasons .m.on.summer { background: #3f9a6b; }
.seasons .m.on.autumn { background: #d9822b; }
.seasons .m.on.winter { background: #2f63a6; }
.season-names b { font-family: var(--font-ko-title); font-weight: 400; margin-right: 3px; }
.season-names { display: grid; grid-template-columns: 2fr 3fr 3fr 3fr 1fr; margin-top: 4px; font-family: var(--font-title); font-size: 12px; color: var(--meok-soft); text-align: center; }
.season-names span:first-child, .season-names span:last-child { text-align: left; }
.season-names span:last-child { visibility: hidden; }

.tip {
  position: relative; margin-top: 18px; padding: 14px 16px 14px 54px; border-radius: 10px;
  background: #fff7e0; box-shadow: inset 0 0 0 1px rgba(226, 179, 60, .5); font-size: 14.5px; line-height: 1.55;
}
.tip::before {
  content: "꿀팁"; position: absolute; left: 12px; top: 14px; width: 32px; height: 32px; border-radius: 6px;
  display: grid; place-items: center; background: var(--hwang); color: var(--meok);
  font-family: var(--font-title); font-weight: 700; font-size: 11px; transform: rotate(-5deg);
}
.tip b { display: block; font-family: var(--font-title); margin-bottom: 2px; }
/* Traveler reviews */
.d-reviews { margin-top: 18px; }
.d-reviews h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--font-title); font-size: 16px; }
.d-reviews h3::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--dancheong); background-size: 48px 14px; }
.d-reviews h3 .hk { font-size: 12px; font-family: var(--font-ko); color: var(--meok-soft); font-weight: 400; }
.rv-intro { margin: 0 0 10px; font-size: 13px; color: var(--meok-soft); }
.rv-en { display: block; margin-top: 2px; }
.rv-loading { color: var(--meok-soft); }
.rv-voices { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.rv-voice {
  flex: none; width: 230px; margin: 0; padding: 12px 14px 10px; border-radius: 12px; scroll-snap-align: start;
  background: #fffaf0; box-shadow: inset 0 0 0 1px var(--line); position: relative;
}
.rv-voice::before { content: "\201C"; position: absolute; left: 10px; top: -4px; font-family: Georgia, serif; font-size: 34px; color: var(--jeok); opacity: .5; }
.rv-voice.kr::before { color: var(--cheong); }
.rv-voice blockquote { margin: 8px 0 8px; font-size: 13.5px; line-height: 1.5; }
.rv-voice figcaption { font-size: 11.5px; color: var(--meok-soft); }
.rv-cols { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rv-col { padding: 10px 12px; border-radius: 10px; background: #fffaf0; box-shadow: inset 0 0 0 1px var(--line); }
.rv-col.good { box-shadow: inset 3px 0 0 #3f9a6b, inset 0 0 0 1px var(--line); }
.rv-col.bad { box-shadow: inset 3px 0 0 #d9822b, inset 0 0 0 1px var(--line); }
.rv-col.tips { box-shadow: inset 3px 0 0 var(--hwang), inset 0 0 0 1px var(--line); }
.rv-col h4 { margin: 0 0 6px; font-size: 13.5px; }
.rv-col ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 5px; }
.rv-col li { font-size: 13.5px; line-height: 1.45; }
.rv-refs { margin-left: 4px; white-space: nowrap; }
.rv-ref {
  display: inline-block; margin-left: 2px; padding: 0 4px; border-radius: 4px; font-size: 10px; line-height: 15px;
  text-decoration: none; vertical-align: 1px; color: #fff; background: var(--jeok);
}
.rv-ref.kr { background: var(--cheong); }
.rv-src { margin-top: 10px; font-size: 12.5px; }
.rv-src summary { cursor: pointer; color: var(--meok-soft); }
.rv-src ol { margin: 8px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.rv-src li { display: flex; gap: 6px; align-items: baseline; }
.rv-src li a { color: var(--meok); word-break: break-word; }
.rv-src p { margin: 6px 0 0; color: var(--meok-soft); font-size: 11.5px; }

.d-near { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.d-near .card { width: 220px; flex: none; }
.d-near .card .tile { width: 42px; height: 42px; font-size: 21px; }

/* stamp landing animation */
.stamp-fx {
  position: fixed; z-index: 100; width: 110px; height: 110px; pointer-events: none;
  animation: stampDown .7s cubic-bezier(.3, 1.6, .5, 1) forwards;
}
@keyframes stampDown {
  0% { transform: scale(2.6) rotate(-25deg); opacity: 0; }
  45% { opacity: 1; }
  60% { transform: scale(.92) rotate(-8deg); }
  100% { transform: scale(1) rotate(-8deg); opacity: 0; }
}

/* ───────── Modal ───────── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(30, 26, 22, .5); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; width: min(620px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 16px; box-shadow: var(--shadow); animation: rise .3s cubic-bezier(.2, .8, .2, 1);
}
.modal-box::before { content: ""; display: block; height: 7px; background: var(--dancheong); position: sticky; top: 0; z-index: 2; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.modal-close { position: absolute; z-index: 3; right: 12px; top: 16px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--hanji-deep); }
.m-head { padding: 20px 24px 6px; }
.m-head .ko-big { font-family: var(--font-brush); font-size: 42px; line-height: .9; }
.m-head h2 { margin: 2px 0 4px; font-family: var(--font-title); font-size: 22px; }
.m-head p { margin: 0; color: var(--meok-soft); font-size: 14px; }
.m-body { padding: 14px 24px 26px; }
.m-empty { padding: 26px; text-align: center; color: var(--meok-soft); border: 1.5px dashed var(--line); border-radius: 12px; }
.m-list { display: flex; flex-direction: column; gap: 8px; }

/* Passport */
.passport { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.p-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; }
.p-slot svg { width: 100%; max-width: 110px; aspect-ratio: 1; }
.p-slot .p-en { font-family: var(--font-title); font-weight: 700; font-size: 13px; }
.p-slot .p-n { color: var(--meok-soft); }
.p-progress { height: 10px; border-radius: 999px; background: var(--hanji-deep); overflow: hidden; margin: 12px 0 18px; }
.p-progress span { display: block; height: 100%; background: var(--saekdong); background-size: 220px 100%; }
.m-sub { margin: 22px 0 10px; font-family: var(--font-title); font-size: 16px; }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* Taxi card */
.taxi { padding: 34px 24px 28px; text-align: center; }
.taxi .t-lbl { font-size: 13px; color: var(--meok-soft); }
.taxi .t-ko { font-family: var(--font-ko-title); font-weight: 700; font-size: clamp(44px, 12vw, 76px); line-height: 1.15; margin: 10px 0; word-break: keep-all; }
.taxi .t-say { display: inline-block; font-family: var(--font-ko-title); font-size: 24px; padding: 8px 18px; border-radius: 10px; background: var(--meok); color: var(--hanji); }
.taxi .t-en { margin-top: 14px; color: var(--meok-soft); font-size: 14px; }
.taxi .t-en b { color: var(--meok); }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; background: var(--meok); color: var(--hanji); font-size: 14px;
  box-shadow: var(--shadow); animation: rise .25s;
}
.noscript { position: fixed; inset: auto 16px 16px; padding: 16px; background: var(--hanji); border-radius: 12px; }

/* ───────── Phone ───────── */
@media (max-width: 760px) {
  .topbar { top: 10px; left: 10px; right: 10px; gap: 8px; }
  .brand { padding: 10px 12px 7px 8px; gap: 9px; }
  .seal { width: 36px; height: 36px; font-size: 12.5px; }
  .brand-name { font-size: 17px; }
  .brand-name { white-space: nowrap; }
  .brand-ko { display: none; }
  .plaque { padding: 5px 9px 4px; }
  .plaque .ko { font-size: 14px; letter-spacing: 1px; }
  .plaque .en { display: none; }
  .plaque .n { min-width: 17px; height: 17px; font-size: 10px; right: -7px; top: -7px; }
  .tool-text { display: none; }
  #langShort { display: none; }
  .tools { gap: 4px; }
  .tool-btn { gap: 4px; }
  .brand { min-width: 0; flex-shrink: 1; }
  .brand-text { min-width: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; letter-spacing: -.3px; }
  .brand { gap: 7px; padding-left: 7px; }
  .seal { width: 32px; height: 32px; font-size: 11.5px; }
  .brand { padding-right: 10px; }
  .tool-btn { padding: 0 8px; }
  .tool-n { min-width: 18px; height: 18px; font-size: 11px; padding: 0 4px; }
  .tool-n.is-zero { display: none; }
  .seal { flex: none; }
  .tool-btn { height: 38px; padding: 0 10px; }
  .search input { width: 38px; height: 38px; padding: 0; color: transparent; cursor: pointer; }
  .search input::placeholder { color: transparent; }
  .search-ico { left: 10px; }
  .search.is-open { position: absolute; left: 0; right: 0; top: 0; z-index: 5; }
  .search.is-open input { width: 100%; padding: 0 14px 0 36px; color: var(--meok); cursor: text; }
  .search.is-open input::placeholder { color: var(--meok-soft); }
  .search-results { width: 100%; }
  .chips { top: 70px; left: 0; right: 0; padding: 2px 10px 8px; }
  .chip { padding: 7px 11px 8px; }
  .cat-chips { top: 114px; left: 10px; right: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cat { flex: none; }
  .sea-name, .cloud-2, .credit { display: none; }
  .compass { left: auto; right: 12px; top: 160px; bottom: auto; width: 38px; height: 38px; }

  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 200px; border-radius: 16px 16px 0 0; }
  .panel-head { padding: 10px 14px 6px; display: flex; align-items: baseline; gap: 10px; }
  .panel-head .ko-big { font-size: 30px; }
  .panel-head h2 { font-size: 16px; }
  .panel-head p { display: none; }
  .panel-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 6px 12px 14px; scroll-snap-type: x mandatory; }
  .panel-list .card { width: 250px; flex: none; scroll-snap-align: start; flex-direction: column; align-items: stretch; gap: 8px; }
  .panel-list .card .tile { width: 100%; height: 58px; }
  .panel-list .card .go { display: none; }
  .panel-list .card:hover, .panel-list .card.is-hot { transform: translateY(-2px); }
  .panel .phrase { display: none; }
  .panel-foot { display: none; }

  .detail { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 84vh; height: 84dvh; border-radius: 18px 18px 0 0; transform: translateY(105%); }
  .d-hero { height: 180px; }
  .passport { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
