/* Daylight palette: white sheets over the photo, fresh green for actions,
   coral for the current selection. Every surface and state reads from here. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --cream: #f6f8f7;
  --canvas: #eef2f0;
  --tint: #e9f4ee;
  --tint-strong: #d5ebdf;
  --ink: #1c2925;
  --muted: #5b6a65;
  --line: #e1e7e4;
  --line-strong: #c9d3cf;
  --forest: #167049;
  --forest-hover: #0f5c3b;
  --forest-rgb: 22 112 73;
  --accent: #c2461f;
  --accent-ink: #b23f1b;
  --accent-rgb: 194 70 31;
  --accent-soft: #fdeee7;
  --accent-line: #f2c9b8;
  --warn-ink: #80520f;
  --warn-soft: #fff3dd;
  --danger-ink: #a8341b;
  --danger-soft: #fdece8;
  --ops-ink: #2d4767;
  --ops-soft: #eaf0f7;
  --shadow-rgb: 24 38 33;
  --menu-width: 188px;
  --map-width: 160px;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--tint-strong); color: var(--ink); }

*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--forest); text-underline-offset: .22em; }
button, a, input, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:focus-visible { position: relative; z-index: 2; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, p, a, button { overflow-wrap: anywhere; }
button svg { width: 20px; height: 20px; flex: 0 0 auto; }
[hidden] { display: none !important; }

.tour-shell { --content-sheet-height: min(52dvh, 520px); position: relative; width: 100%; height: 100dvh; isolation: isolate; overflow: hidden; }
/* Own stacking context: the viewer's marker z-indexes stay inside the 360 and below the overlays. */
#panorama.viewer { position: absolute; inset: 0; z-index: 0; background: var(--canvas); }
.scene-caption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  position: absolute;
  inset: env(safe-area-inset-top) auto auto env(safe-area-inset-left);
  z-index: 2;
  max-width: min(380px, calc(100vw - 104px));
  padding: 6px 8px;
  border-radius: 0 0 10px 0;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 2px 18px rgb(var(--shadow-rgb) / 10%);
  pointer-events: none;
}
.scene-caption h1 { font-size: 15px; font-weight: 650; letter-spacing: -.035em; }
.scene-caption p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.scene-caption > strong { font-size: 18px; font-weight: 700; letter-spacing: -.06em; }
.scene-caption > span { font-size: 12px; }
.scene-caption > small { flex-basis: 100%; font-size: 10px; color: var(--muted); }
.scene-caption, .tools-peek {
  opacity: 0;
  transition: opacity .18s ease;
}
.tour-shell.tools-active .scene-caption, .tour-shell:has(.tools-peek:focus-within) .scene-caption,
.tour-shell.tools-visible .scene-caption, .tour-shell .tools-visible.scene-caption,
.tour-shell.tools-active .tools-peek, .tour-shell:has(.tools-peek:focus-within) .tools-peek,
.tour-shell.tools-visible .tools-peek, .tools-peek.tools-visible { opacity: 1; }
.tour-shell.tools-active .tools-peek, .tour-shell:has(.tools-peek:focus-within) .tools-peek,
.tour-shell.tools-visible .tools-peek, .tools-peek.tools-visible { pointer-events: auto; }
.tools-peek {
  position: absolute;
  top: env(safe-area-inset-top);
  right: env(safe-area-inset-right);
  /* Navigation stays on top of 360 pins and the spatial sheet (5) (user request 2026-10-21). */
  z-index: 6;
  pointer-events: none;
}
.tools-menu {
  display: grid;
  gap: 2px;
  position: relative;
  width: var(--menu-width);
  min-width: 0;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 6px 6px 4px;
  border: 0;
  border-radius: 0 0 0 14px;
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 10px 32px rgb(var(--shadow-rgb) / 14%), 0 2px 6px rgb(var(--shadow-rgb) / 8%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  touch-action: pan-y;
}
.tool-group { display: grid; gap: 1px; min-width: 0; }
.tool-group + .tool-group { margin-top: 10px; }
.tool-group-title { margin: 0; padding: 4px 10px 3px; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.4; }
.tool-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 560;
  line-height: 1.3;
  text-align: left;
  transition: background-color .15s ease, color .15s ease;
}
.tool-button .tool-glyph { width: 20px; height: 20px; color: var(--forest); pointer-events: none; }
.tool-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tool-button:hover { background: var(--tint); }
.tool-button:active { background: var(--tint-strong); }
.tool-button[aria-pressed="true"] { background: var(--tint-strong); color: var(--forest-hover); font-weight: 680; }
.tool-button:disabled { cursor: default; opacity: 1; color: var(--muted); }
.tool-button:disabled .tool-glyph { opacity: .4; }
.tool-button:disabled:hover { background: transparent; }
.tool-button:focus-visible, .ops-switch:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.ops-heading { margin: 0 0 4px; padding: 7px 10px; border-radius: 10px; background: var(--ops-soft); color: var(--ops-ink); font-size: 11.5px; font-weight: 600; line-height: 1.45; }
.ops-tools .tool-button .tool-glyph { color: var(--ops-ink); }
.ops-tools .tool-button[aria-pressed="true"] { background: var(--ops-soft); color: var(--ops-ink); }
.ops-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--cream);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.switch-track { position: relative; flex: 0 0 34px; width: 34px; height: 20px; border-radius: 10px; background: var(--line-strong); transition: background-color .18s ease; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(var(--shadow-rgb) / 30%); transition: transform .18s cubic-bezier(.16, 1, .3, 1); }
.ops-switch[aria-checked="true"] { color: var(--ops-ink); }
.ops-switch[aria-checked="true"] .switch-track { background: var(--ops-ink); }
.ops-switch[aria-checked="true"] .switch-thumb { transform: translateX(14px); }
.ops-caption { padding: 1px 6px; border-radius: 5px; background: var(--ops-soft); color: var(--ops-ink) !important; font-weight: 600; }
.tour-shell.tools-visible .scene-caption { max-width: min(380px, calc(100vw - var(--menu-width) - 12px)); }

.minimap {
  position: absolute;
  left: env(safe-area-inset-left);
  bottom: env(safe-area-inset-bottom);
  z-index: 3;
  width: var(--map-width);
  padding: 0;
  border: 1px solid rgb(var(--forest-rgb) / 28%);
  border-radius: 0 10px 0 0;
  background: var(--cream);
  box-shadow: 0 5px 24px rgb(var(--shadow-rgb) / 19%);
}
.map-canvas { position: relative; width: 100%; height: 110px; border-radius: inherit; background: var(--canvas); overflow: hidden; }
.map-canvas > svg { width: 100%; height: 100%; border-radius: inherit; }
.map-canvas .park { fill: #c9e3c0; }
.map-canvas .building { fill: #d9dfdc; stroke: #fff; stroke-width: 1; }
.map-canvas .path { fill: none; stroke: #fff; stroke-width: 5; }
.map-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 1px 5px rgb(var(--shadow-rgb) / 25%);
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.map-pin::before { position: absolute; inset: -6px; content: ""; border-radius: inherit; }
/* A visitor spot's 44px touch area must not cover a nearby official place's centre (public 명지대역, 2026-10-20). */
.map-pin[data-geo-id^="spot:"] { z-index: 1; }
.map-pin-icon { width: 18px; height: 18px; display: block; pointer-events: none; }
.map-canvas .map-pin { width: 18px; height: 18px; min-width: 18px; border-width: 1px; }
.map-canvas .map-pin::before { inset: -14px; } /* Keep the 44px touch target around the smaller marker. */
.map-canvas .map-pin-icon { width: 11px; height: 11px; }
.map-canvas .map-pin::after {
  position: absolute;
  inset: -3px;
  border: 1px solid var(--forest);
  border-radius: inherit;
  content: "";
  opacity: .35;
  pointer-events: none;
}
.map-pin[aria-pressed="true"], .map-pin[data-selected="true"], .map-pin.is-selected {
  background: var(--accent);
  outline: 2px solid rgb(var(--accent-rgb) / 25%);
  outline-offset: 2px;
  z-index: 3;
}
.map-canvas .map-pin:is([aria-pressed="true"], [data-selected="true"], .is-selected)::after {
  border-color: var(--accent);
  animation: map-pin-ripple 2.4s ease-out infinite;
}
@keyframes map-pin-ripple {
  0% { transform: scale(.85); opacity: .65; }
  85%, 100% { transform: scale(1.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .map-canvas .map-pin::after { animation: none; transform: none; opacity: .5; }
}
.map-pin:focus-visible { position: absolute; z-index: 4; outline-color: var(--ink); }
.map-camera { position: absolute; z-index: 1; color: var(--forest); transform: translate(-50%, -50%); }
.view-cone { fill: rgb(var(--forest-rgb) / 20%); stroke: var(--forest); stroke-width: .6; transform-box: fill-box; }
.map-caption { position: absolute; inset: auto 0 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 3px 8px; padding: 2px 4px; background: rgb(255 255 255 / 88%); pointer-events: none; font-size: 10px; line-height: 1.4; font-weight: 650; }
.map-caption svg { width: 12px; height: 12px; }
.map-caption span { display: inline-flex; align-items: center; gap: 3px; }
.map-caption .selected-location { color: var(--accent); }
.map-canvas > .geographic-layer, .editor-map > .geographic-layer { position: absolute; inset: 0; }
.geographic-minimap .map-canvas > svg, .geographic-editor > svg { position: absolute; inset: 0; pointer-events: none; }
.geographic-minimap .map-canvas > svg > :not(.view-cone), .geographic-editor > svg > * { visibility: hidden; }
.geographic-minimap .map-scene:not([aria-pressed="true"]) { visibility: hidden; }
.geographic-attribution { position: absolute; right: 0; top: 0; z-index: 4; padding: 1px 3px; background: rgb(255 255 255 / 92%); color: var(--ink); font-size: 9px; line-height: 1.4; }
.geographic-retry { display: none; position: absolute; left: 0; top: 16px; z-index: 4; min-height: 44px; background: var(--cream); font-size: 11px; }
.geographic-layer[data-state="error"] ~ .geographic-retry { display: block; }
.geographic-minimap .map-caption { position: static; }
.map-height-reference { flex-basis: 100%; }
.map-height-reference:empty { display: none; }
.map-capture-options { display: flex; overflow-x: auto; scrollbar-width: thin; background: var(--cream); }
.map-capture-option { flex: 1 0 44px; min-height: 44px; padding: 2px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 10px; }
.map-capture-option[aria-pressed="true"] { color: var(--cream); background: var(--forest); }
.map-capture-option:focus-visible { outline-offset: -2px; }

dialog.content-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  overflow: clip;
}
dialog.content-dialog[open] { display: grid; place-items: end stretch; }
dialog.content-dialog::backdrop { background: rgb(var(--shadow-rgb) / 24%); }
.modal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: var(--content-sheet-height);
  min-height: 0;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  scroll-padding-top: 64px;
  background: var(--paper);
  box-shadow: 0 18px 80px rgb(var(--shadow-rgb) / 28%);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.modal-card > * { flex-shrink: 0; }
.sheet-handle { position: relative; display: block; flex: 0 0 auto; width: 72px; height: 20px; margin: 0 auto; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; }
.sheet-handle::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 4px; background: var(--line-strong); transform: translateX(-50%); transition: background-color .15s ease, width .15s ease; }
.sheet-handle:hover::before, .sheet-handle:focus-visible::before { width: 44px; background: var(--muted); }
.sheet-handle:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; border-radius: 8px; }
.sheet-handle:active { cursor: grabbing; }
.modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--paper);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 { flex: 1; min-width: 0; font-size: 17px; line-height: 1.45; letter-spacing: -.035em; }
.modal-header .icon-button { flex-shrink: 0; }
.filter-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  flex-wrap: wrap;
  padding: 12px 20px 4px;
}
.filter-tabs button {
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}
.filter-tabs button:hover { background: var(--tint); }
.filter-tabs button[aria-pressed="true"], .filter-tabs button.is-selected { color: var(--accent); background: var(--accent-soft); }
.feed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 20px 24px 24px; }
.post-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  text-align: left;
  background: transparent;
}
.post-card figure { overflow: hidden; border-radius: 10px; background: var(--canvas); }
.post-card img { width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; border-radius: 10px; }
.post-card h3, .post-card > strong { display: block; margin-top: 11px; font-size: 17px; font-weight: 650; line-height: 1.45; letter-spacing: -.03em; }
.post-card p { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.post-card .author-row { margin-bottom: 10px; }
.post-card > img + .author-row { margin: 12px 0 8px; }
.post-card > .image-preview + .author-row, .post-card > .link-card + .author-row { margin: 8px 0; }
.post-card .location-chip { margin-top: 8px; }
.post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.post-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); min-height: 0; }
.media-column { min-width: 0; padding: 18px; }
.post-media { display: grid; place-items: center; min-width: 0; border-radius: 9px; background: var(--canvas); overflow: hidden; }
.post-media img { width: 100%; height: auto; max-height: 52dvh; object-fit: contain; }
.image-preview { width: 100%; min-width: 0; }
.image-preview img { display: block; }
.image-preview img[hidden] { display: none; }
.image-preview > .field-hint { padding: 8px; }
.link-card { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--cream); text-align: left; }
.link-card img { width: 100%; height: auto; max-height: min(30dvh, 330px); object-fit: contain; }
.link-summary { display: grid; gap: 4px; padding: 8px; overflow-wrap: anywhere; }
.link-domain { color: var(--forest); font-size: 11px; }
.link-summary strong { font-size: 14px; line-height: 1.4; }
.link-summary p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.link-address { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card .link-summary p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .link-card img { aspect-ratio: 1.5; object-fit: cover; }
.post-composer .image-preview img { width: 100%; height: auto; max-height: 220px; object-fit: contain; }
.youtube-preview { width: 100%; min-width: 0; overflow: hidden; border-radius: 9px; background: var(--canvas); }
.youtube-preview.is-short { width: min(100%, 320px); justify-self: center; }
.youtube-preview iframe { display: block; width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; background: #17251d; }
.youtube-preview.is-short iframe { aspect-ratio: 9 / 16; }
.youtube-original { display: block; padding: 12px 14px; color: var(--forest); font-size: 12px; text-align: center; text-underline-offset: 3px; }
.youtube-original:focus-visible { outline: 2px solid var(--forest); outline-offset: -3px; }
.conversation-column { min-width: 0; padding: 20px 22px 22px; }
.author-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.author-row strong { color: var(--ink); font-weight: 650; }
.avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; color: var(--forest); background: var(--tint); font-size: 13px; font-weight: 700; }
.post-title { margin-top: 22px; font-size: clamp(20px, 2vw, 26px); font-weight: 650; letter-spacing: -.055em; line-height: 1.4; }
.post-body { margin-top: 12px; font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
.location-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; padding: 5px 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 650; line-height: 1.5; }
.location-chip svg { width: 15px; height: 15px; }
.location-chip strong, .location-chip b { padding: 1px 5px; border-radius: 5px; background: var(--accent); color: white; font-size: 10px; }
.social-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; padding: 12px 0; }
.social-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 5px 2px; border: 0; background: transparent; font-size: 12px; }
.social-actions button[aria-pressed="true"] { color: var(--accent); }
.social-actions > span { color: var(--muted); font-size: 12px; }
.comments { margin-top: 18px; }
.comments h3, .comments h4 { margin: 0; font-size: 13px; font-weight: 700; }
.comment { display: flex; gap: 10px; padding-top: 16px; font-size: 12px; }
.comment > div { min-width: 0; }
.comment p { margin-top: 6px; font-size: 13px; line-height: 1.75; }
.comment .text-button { margin-top: 4px; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 20px; }
.comment-input { min-width: 0; flex: 1; width: 100%; min-height: 44px; max-height: 180px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; color: var(--ink); background: var(--paper); font-size: 14px; line-height: 1.5; }
.comment-input::placeholder { color: var(--muted); opacity: 1; }
.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 11px 15px; border: 1px solid transparent; border-radius: 10px; background: var(--forest); color: white; font-size: 13px; font-weight: 650; text-decoration: none; }
.action-button:hover { background: var(--forest-hover); }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: var(--cream); color: var(--forest); }
.icon-button:hover { background: var(--tint); }
.text-button { min-height: 36px; padding: 5px 0; border: 0; background: transparent; color: var(--forest); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.empty-state { padding: 28px 22px; color: var(--muted); font-size: 14px; line-height: 1.8; text-align: center; }
.status-message { margin: 12px 18px; padding: 10px 12px; border-radius: 9px; background: var(--tint); color: var(--forest-hover); font-size: 12px; line-height: 1.7; }
.dialog-notice { margin: 10px 18px; padding: 10px 12px; border-radius: 9px; background: var(--tint); color: var(--forest-hover); font-size: 12px; line-height: 1.7; }
.tour-shell > .status-message { position: absolute; top: 82px; left: 24px; right: 24px; width: fit-content; max-width: 520px; margin: 0; z-index: 4; box-shadow: 0 3px 18px rgb(var(--shadow-rgb) / 12%); }
.demo-note { padding: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.modal-card > .demo-note { padding: 0 22px 14px; }
.external-preview { display: grid; place-items: center; gap: 16px; width: 100%; min-height: 230px; padding: 28px; text-align: center; background: var(--canvas); }
.external-preview p { max-width: 38ch; color: var(--muted); font-size: 13px; line-height: 1.8; }
.external-preview h3 { font-size: 19px; letter-spacing: -.035em; }
.scene-list { display: grid; gap: 10px; padding: 20px; }
.scene-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; font-size: 14px; }
.scene-option:hover, .scene-option[aria-pressed="true"] { border-color: var(--line-strong); background: var(--tint); }
.scene-option img { flex: 0 0 auto; width: 100px; height: 68px; object-fit: cover; border-radius: 8px; }
.scene-option strong { flex: 1; min-width: 0; }
.scene-option > span { font-size: 12px; color: var(--muted); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  :root { --map-width: 140px; }
  .scene-caption { padding: 6px 8px; }
  .scene-caption h1 { font-size: 13px; }
  .map-canvas { height: 100px; }
  .map-caption { font-size: 9px; gap: 3px 5px; }
  .modal-header { gap: 6px; }
  .modal-header h2 { font-size: 16px; }
  .filter-tabs { gap: 1px; padding: 9px 12px 2px; }
  .filter-tabs button { padding: 8px 10px; min-height: 42px; font-size: 12px; }
  .scene-option { flex-wrap: wrap; }
  .scene-option img { width: 76px; height: 56px; }
  .scene-option > span { flex-basis: 100%; text-align: right; }
  .feed-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px; }
  .post-detail { display: block; }
  .media-column { padding: 14px 16px 0; }
  .post-media img { max-height: none; }
  .conversation-column { padding: 18px 18px 22px; }
  .post-title { margin-top: 16px; font-size: 23px; }
  .post-body { font-size: 14px; }
  .comment-input { font-size: 16px; }
  .comment-form { gap: 7px; }
  .comment-form .action-button { padding-inline: 13px; }
  .external-preview { min-height: 190px; padding: 24px 16px; }
}

@media (min-width: 560px) and (max-height: 560px) {
  .post-detail { display: block; }
  .conversation-column { border-left: 0; }
  .post-media img { max-height: none; }
}

/* Share the boundary with the real viewer viewport: canonical target angles stay unchanged. */
/* At rest the viewer ends where a story sheet begins. While a sheet moves (.sheet-moving, set by
   web/bottom-sheet.js) the viewer runs on behind it and web/sheet-offset.js keeps the area above the
   half sheet (.sheet-bound) exactly as it was, so dragging or closing never shows an empty band. */
.tour-shell:not(.sheet-moving):has(.spatial-sheet[open]) > #panorama { bottom: var(--content-sheet-height); }
.sheet-bound { position: absolute; top: 0; left: 0; right: 0; height: 100%; visibility: hidden; pointer-events: none; }
.tour-shell:has(.spatial-sheet[open]) > .sheet-bound { height: calc(100% - var(--content-sheet-height)); }
dialog.content-dialog.spatial-sheet { padding: 0; z-index: 5; pointer-events: none; }
.spatial-sheet > .modal-card, .spatial-sheet > .minimap { pointer-events: auto; }
.content-dialog .tools-menu { max-height: calc(100dvh - var(--content-sheet-height) - env(safe-area-inset-top)); }
dialog.content-dialog.spatial-sheet[open] { align-items: end; }
dialog.content-dialog.spatial-sheet::backdrop { background: transparent; }
.spatial-sheet .modal-card {
  width: 100%;
  height: var(--content-sheet-height);
  max-height: var(--content-sheet-height);
  padding-bottom: env(safe-area-inset-bottom);
  scroll-padding-top: 84px;
  border-bottom: 0;
  box-shadow: 0 -4px 24px rgb(var(--shadow-rgb) / 12%);
}
.content-dialog[open] .modal-card { animation: content-sheet-enter .24s ease-out; }
.spatial-sheet :is(.post-detail, .feed-grid, .feed-toolbar, .filter-tabs) { width: 100%; align-self: stretch; }
.spatial-sheet .post-media img { max-height: min(30dvh, 330px); }
.content-dialog .minimap { top: env(safe-area-inset-top); bottom: auto; border-radius: 0 0 10px 0; }
@media (max-width: 700px) {
  .content-dialog.spatial-sheet .minimap { width: min(140px, calc(50vw - 50px)); }
  .tour-shell:has(.spatial-sheet[open]) > #panorama .vrtour-panorama-pin[aria-pressed="true"] .pin-title {
    transform: translateX(-22px);
    max-width: min(156px, calc(50vw - 12px));
  }
}
@keyframes content-sheet-enter {
  from { transform: translateY(100%); opacity: .4; }
  to { transform: translateY(0); opacity: 1; }
}

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

@media (forced-colors: active) {
  .modal-card, .minimap, .tools-menu { border: 1px solid CanvasText; }
  .map-pin[aria-pressed="true"], .filter-tabs button[aria-pressed="true"] { outline: 2px solid Highlight; }
}

.post-composer { padding: 20px 24px 24px; }
.composer-fields { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
.composer-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.composer-field { display: grid; gap: 8px; min-width: 0; }
.composer-field > label, .composer-label { font-size: 13px; font-weight: 650; }
.composer-field[hidden] { display: none; }
.fixed-place { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 650; }
.fixed-place::before { content: ""; flex: none; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.place-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.place-tag { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--accent-ink); font-size: 12px; font-weight: 650; }
.place-description { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.composer-field input, .composer-field textarea, .composer-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.composer-field select { padding-right: 30px; }
.composer-field textarea { min-height: 140px; resize: vertical; }
.composer-field input::placeholder, .composer-field textarea::placeholder { color: var(--muted); opacity: 1; }
.composer-fields:disabled :is(input, textarea, select) { opacity: .65; }
.field-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.composer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 20px; padding-top: 4px; }
.composer-actions .text-button { min-height: 44px; padding-inline: 5px; }
.feed-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 24px 0; }
.feed-toolbar p { min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.post-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 0; }
.post-edit-actions button, .comment-delete { min-height: 44px; }
.comment-delete { flex: 0 0 auto; align-self: flex-start; padding: 6px 8px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; }
.comment-delete:hover { color: var(--accent); background: var(--accent-soft); }
.post-edit-actions .danger-button { color: var(--accent); }

@media (max-width: 700px) {
  .post-composer { padding: 18px 18px 24px; }
  .composer-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .composer-field input, .composer-field textarea, .composer-field select { font-size: 16px; }
  .feed-toolbar { padding: 14px 16px 0; }
}

/* The dialog carries its own heading and map; background controls stay out of view. */
.tour-shell:has(.content-dialog[open]) > :is(.scene-caption, .status-message) { visibility: hidden; }


.spatial-editor { display: grid; gap: 20px; min-width: 0; padding: 20px 24px 24px; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; }
.editor-toolbar h3 { font-size: 16px; letter-spacing: -.035em; }
.editor-toolbar p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 24px; align-items: start; }
.editor-map-column, .editor-pin-panel { display: grid; gap: 14px; min-width: 0; }
.editor-map { position: relative; width: 100%; height: clamp(220px, 32dvh, 360px); border-radius: 12px; background: var(--canvas); overflow: hidden; cursor: crosshair; }
.editor-map > svg { width: 100%; height: 100%; }
.editor-map-pin { width: 36px; height: 36px; font-size: 12px; }
.editor-map-pin:focus-visible { outline-offset: 2px; }
.editor-coordinate-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.editor-pin-list { display: grid; gap: 4px; max-height: 192px; padding: 4px; overflow-y: auto; }
.editor-pin-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; text-align: left; font-size: 13px; }
.editor-pin-option > span { flex-shrink: 0; color: var(--accent); font-size: 11px; }
.editor-pin-option > strong { min-width: 0; font-weight: 600; }
.editor-pin-option:hover { background: var(--tint); }
.editor-pin-option[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.editor-pin-label { display: grid; gap: 5px; }
.editor-pin-label > button { justify-self: end; }
.editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.editor-actions > .field-hint { flex-basis: 100%; }
.editor-actions button, .editor-toolbar button { min-height: 44px; }
.spatial-editor .danger-button { color: var(--accent); }
.editor-confirm { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--accent-line); border-radius: 10px; background: var(--warn-soft); font-size: 13px; line-height: 1.75; }
.editor-save-bar { padding: 12px; border-radius: 12px; background: var(--cream); }
.calibration-editor { min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.calibration-editor[open] { padding-bottom: 12px; }
.calibration-editor > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 14px; font-weight: 650; }
.calibration-editor > p { margin-bottom: 10px; }
.calibration-editor form { margin-top: 18px; }
.calibration-editor legend, .calibration-editor h4 { margin: 0 0 12px; padding: 0; color: var(--forest); font-size: 13px; font-weight: 650; }
.calibration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.calibration-camera { min-width: 0; }
.calibration-editor .composer-fields > button { justify-self: start; }
.placement-tools { position: absolute; z-index: 4; top: env(safe-area-inset-top); right: env(safe-area-inset-right); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; width: max-content; max-width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right)); padding: 4px 8px; border: 1px solid var(--line); border-radius: 0 0 0 10px; background: var(--cream); box-shadow: 0 6px 24px rgb(var(--shadow-rgb) / 17%); }
.placement-tools p { font-size: 13px; line-height: 1.6; }
.placement-tools button { min-height: 44px; }
.tour-shell.pin-placing > .scene-caption, .tour-shell.pin-placing > .tools-peek { visibility: hidden; }
.tour-shell.pin-placing #panorama { cursor: crosshair; }

@media (max-width: 700px) {
  .spatial-editor { gap: 18px; padding: 18px 16px 24px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .editor-map { height: 240px; }
  .editor-coordinate-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-coordinate-form > button { grid-column: 1 / -1; justify-self: end; }
  .calibration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}


.studio-panel { display: grid; gap: 24px; min-width: 0; padding: 20px 24px 24px; }
.studio-section { display: grid; gap: 16px; min-width: 0; padding: 16px; border-radius: 14px; background: var(--cream); }
.studio-section > h3 { font-size: 17px; font-weight: 650; letter-spacing: -.035em; }
.studio-primary { justify-self: start; }
.studio-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 13px; line-height: 1.75; cursor: pointer; }
.studio-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0; accent-color: var(--forest); }
.studio-preview-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--tint); font-size: 13px; }
.studio-media-list { display: grid; gap: 0; }
.studio-media-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.studio-media-preview { flex: 0 0 auto; width: 112px; height: 76px; border-radius: 8px; background: var(--canvas); object-fit: contain; }
.studio-media-copy { flex: 1 1 190px; min-width: 0; }
.studio-media-copy h4 { margin: 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.studio-media-copy p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.studio-media-copy .studio-error, .studio-panel .danger-button { color: var(--accent); }
.studio-binding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.studio-table-scroll { min-width: 0; overflow-x: auto; }
.studio-releases { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.studio-releases th, .studio-releases td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.studio-releases thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.studio-releases th:first-child { width: 62px; }
.studio-releases td:last-child { width: 48%; min-width: 220px; }
.studio-releases td > p { margin-top: 7px; line-height: 1.7; overflow-wrap: anywhere; }
.studio-status { font-size: 12px; color: var(--forest); }
.studio-review-form { display: grid; gap: 7px; margin-top: 12px; }
.studio-review-form .composer-field { gap: 6px; }
.studio-submit { padding-bottom: 6px; }
.studio-revoke-confirm { flex-basis: 100%; margin-top: 10px; }

@media (max-width: 700px) {
  .studio-panel { padding: 18px 16px 24px; }
  .studio-binding-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-media-preview { width: 88px; height: 64px; }
  .studio-media-copy { flex-basis: 150px; }
  .studio-releases { min-width: 490px; }
}

.survey-workbench { display: block; }
.survey-workbench > summary { color: var(--forest); }
.survey-context { padding: 10px 12px; border-radius: 9px; background: var(--tint); color: var(--forest); font-size: 12px; line-height: 1.7; }
.survey-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0; }
.survey-actions button { min-height: 44px; }
.survey-metadata, .survey-point-form { min-width: 0; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.survey-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.survey-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 18px; margin-top: 18px; }
.survey-map { position: relative; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: crosshair; }
.survey-map-point { position: absolute; z-index: 2; max-width: 160px; min-height: 32px; padding: 5px 9px; transform: translate(-50%, -50%); border: 1px solid var(--forest); border-radius: 16px; background: var(--paper); color: var(--forest); font-size: 10px; overflow-wrap: anywhere; cursor: pointer; }
.survey-map-point[data-role="check"] { border-style: dashed; }
.survey-map-point[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.survey-point-list { display: grid; gap: 6px; margin-top: 12px; max-height: 240px; overflow-y: auto; }
.survey-point-option { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); text-align: left; }
.survey-point-option span { color: var(--muted); font-size: 10px; }
.survey-point-option strong { font-size: 12px; overflow-wrap: anywhere; }
.survey-point-option[aria-pressed="true"] { border-color: var(--forest); background: var(--tint); }
.survey-workbench select { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); font-size: 13px; }
.survey-warning { padding: 10px 12px; border-radius: 9px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.survey-report, .survey-pin-review { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }
.survey-report h4, .survey-pin-review h4 { font-size: 14px; }
.survey-issues, .survey-impact { display: grid; gap: 8px; padding-left: 18px; margin: 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.survey-issues { color: var(--warn-ink); }
.survey-table-scroll { min-width: 0; overflow-x: auto; }
.survey-table-scroll table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.survey-table-scroll th, .survey-table-scroll td { padding: 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 700px) {
  .survey-layout { grid-template-columns: 1fr; }
  .survey-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .survey-metadata, .survey-point-form, .survey-report, .survey-pin-review { padding: 12px; }
}

/* Search and moderation stay inside the requested lower content sheet. */
.feed-search { display: flex; gap: 10px; width: 100%; max-width: 1100px; align-self: center; padding: 16px 24px 0; }
.feed-search input { min-width: 0; flex: 1; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 14px; }
.feed-query-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; width: 100%; max-width: 1100px; align-self: center; padding: 14px 24px 0; }
.feed-state, #feed-error { padding: 12px 24px 0; }
.moderation-panel { display: grid; gap: 18px; width: 100%; max-width: 1100px; align-self: center; min-width: 0; padding: 20px 24px 24px; }
.moderation-panel .filter-tabs { padding: 0; }
.moderation-toolbar, .moderation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.moderation-toolbar { justify-content: space-between; }
.moderation-context { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); }
.moderation-context span, .moderation-row small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.moderation-panel form, .moderation-review, .moderation-list { display: grid; gap: 16px; min-width: 0; }
.moderation-layout { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.moderation-row { display: grid; gap: 7px; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.moderation-row[aria-pressed="true"] { border-color: var(--forest); background: var(--tint); }
.moderation-row > span { font-size: 12px; color: var(--forest); }
.moderation-row-reason { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.65; }
.moderation-record { display: grid; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.moderation-record h4 { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.moderation-body, .moderation-previous-note p { margin-top: 8px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.moderation-previous-note { margin-top: 12px; padding: 12px; border-radius: 9px; background: var(--tint); }
.moderation-previous-note strong { font-size: 12px; }
.moderation-error, .moderation-receipt { padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.moderation-error { color: var(--warn-ink); background: var(--warn-soft); }
.moderation-receipt { color: var(--forest); background: var(--tint); }
.moderation-panel select { min-height: 44px; }
.moderation-media { margin-top: 12px; min-width: 0; }
.moderation-media > img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; }
@media (max-width: 700px) {
  .feed-search { padding: 14px 16px 0; }
  .feed-search input { font-size: 16px; }
  .feed-query-fields { padding: 14px 16px 0; }
  .feed-state, #feed-error { padding: 12px 16px 0; }
  .moderation-panel { padding: 16px; }
  .moderation-layout { grid-template-columns: minmax(0, 1fr); }
  .moderation-record { padding: 12px; }
}

.project-panel{display:grid;gap:14px}.project-list{display:grid;gap:10px}.project-option{display:grid;gap:5px;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);padding:14px}.project-option[aria-pressed="true"]{border-color:var(--forest);box-shadow:inset 0 0 0 1px var(--forest)}.project-option small{opacity:.7}.project-panel input{box-sizing:border-box;width:100%;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:10px}

/* Full-width bottom sheets; compact content keeps 44px controls readable. */
.modal-card :is(.post-composer, .spatial-editor, .studio-panel, .scene-list, .moderation-panel, .places-panel, .locations-panel, .inquiries-panel, .inquiry-compose, .ai-panel, .share-panel, .project-panel) { width: 100%; max-width: none; padding: 8px; gap: 12px; }
.modal-card .feed-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); padding: 8px; gap: 12px; }
.modal-card :is(.feed-search, .feed-query-fields, .feed-toolbar, .filter-tabs) { max-width: none; padding: 6px 8px 0; gap: 8px; }
.modal-card :is(.media-column, .conversation-column, .scene-option, .moderation-record, .inquiry-option, .inquiry-detail, .inquiry-message, .place-option, .place-detail, .ai-result, .ai-citation, .ai-proposal-option, .ai-proposal-detail, .project-option) { padding: 8px; }
/* 위치 정보 (2026-10-21): one card per pin; coordinates read as selectable aligned numbers. */
.locations-panel { display: grid; }
/* Dense one-line rows: name, kind, coordinate toggle, story count, 360 (user request 2026-10-21). */
.locations-panel { gap: 4px; }
.locations-panel > .field-hint { margin: 0; font-size: 11px; line-height: 1.4; }
.location-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.location-row { border-radius: 6px; background: var(--cream); }
.location-line { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px 0 8px; }
.location-name { min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.location-kind { flex: none; padding: 0 5px; border-radius: 999px; background: var(--tint); color: var(--forest); font-size: 10px; font-weight: 650; line-height: 1.6; }
.location-row[data-location-key^="spot:"] .location-kind { background: var(--accent-soft); color: var(--accent-ink); }
.location-coords-toggle { position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--forest); }
/* 32px visuals, 44px hit areas inside the 44px row. */
.location-coords-toggle::before, .location-open::before { position: absolute; inset: -6px; content: ""; }
.location-coords-toggle svg { width: 16px; height: 16px; }
.location-coords-toggle:hover, .location-coords-toggle[aria-expanded="true"] { background: var(--tint); }
.location-count { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.location-open { position: relative; flex: none; min-width: 40px; height: 32px; padding: 0 8px; border: 1px solid rgb(var(--forest-rgb) / 28%); border-radius: 6px; background: var(--paper); color: var(--forest); font-size: 12px; font-weight: 700; }
.location-open:hover { background: var(--tint); }
.location-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 4px 8px 6px; border-radius: 0 0 6px 6px; background: var(--paper); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.location-coords { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 12px; line-height: 1.6; }
.location-coords dt { color: var(--muted); }
.location-coords dd { margin: 0 6px 0 0; color: var(--ink); font-variant-numeric: tabular-nums; user-select: all; }
.location-detail a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; }
.locations-empty { color: var(--muted); font-size: 13px; }
.modal-card :is(.composer-fields, .composer-row, .composer-actions, .studio-section, .editor-layout, .places-layout, .inquiry-compose fieldset, .ai-proposal-comparison, .share-grid) { gap: 10px; }
.modal-card > .demo-note { padding: 4px 8px; }
.modal-card .post-title { margin-top: 8px; }
.modal-card .post-body { margin-top: 8px; line-height: 1.65; }
.modal-card .social-actions { padding: 6px 0; }
.modal-card .comments { padding-top: 8px; }
.modal-card .inquiry-option { min-height: 72px; }
.modal-card .ai-proposal-option { min-height: 64px; }
.modal-card :is(.scene-list, .project-list) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.modal-card .dialog-notice { margin: 4px 8px; padding: 6px 8px; }
.tour-shell > .status-message { top: env(safe-area-inset-top); left: env(safe-area-inset-left); right: auto; max-width: calc(100% - var(--menu-width) - 8px - env(safe-area-inset-left) - env(safe-area-inset-right)); }

.map-height-reference { padding: 4px 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.map-height-reference:empty { display: none; }
.post-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; margin-top: 4px; }
.post-secondary-actions .text-button { color: var(--muted); }
@media (max-width: 700px) {
  :root { --menu-width: 172px; }
  .tool-button { font-size: 13px; gap: 9px; }
}

/* Corner minimap opens the full-size visitor map ("공간 지도" sheet). */
.tour-shell > .minimap .map-canvas, .content-dialog > .minimap .map-canvas { cursor: zoom-in; }
.map-expand {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgb(var(--forest-rgb) / 24%);
  border-radius: 7px;
  background: rgb(255 255 255 / 92%);
  color: var(--forest);
  box-shadow: 0 1px 4px rgb(var(--shadow-rgb) / 18%);
}
.map-expand::before { position: absolute; inset: -8px; content: ""; } /* 28px padding box + 16px = 44px touch target, kept inside the clipped canvas */
.map-expand svg { width: 15px; height: 15px; }
.map-expand:hover { background: var(--cream); }
.map-expand:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.modal-card .minimap.large-map, .content-dialog.spatial-sheet .modal-card .minimap.large-map {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  padding: 12px 16px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.large-map .map-canvas {
  width: min(100%, calc(var(--content-sheet-height) - 96px));
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px solid rgb(var(--forest-rgb) / 16%);
  border-radius: 12px;
  cursor: default;
}
.large-map .map-canvas .map-pin { width: 28px; height: 28px; min-width: 28px; border-width: 2px; }
.large-map .map-canvas .map-pin::before { inset: -10px; } /* 24px padding box + 20px = 44px touch target */
.large-map .map-canvas .map-pin-icon { width: 15px; height: 15px; }
.large-map.geographic-minimap .map-scene:not([aria-pressed="true"]) { visibility: visible; opacity: .7; }
.map-pin-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 140px;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1px 4px rgb(var(--shadow-rgb) / 18%);
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.map-pin[aria-pressed="true"] .map-pin-label { color: var(--accent); }
.large-map .map-capture-options { width: min(100%, calc(var(--content-sheet-height) - 96px)); margin: 10px auto 0; }
@media (max-width: 700px) {
  .large-map .map-canvas { width: min(100%, calc(var(--content-sheet-height) - 84px)); }
  .modal-card .minimap.large-map { padding: 8px 10px 12px; }
}

/* Same spot, different heights: a dot-line rail at the bottom right, highest on top.
   Bottom, not middle: the top-right menu (about 520px tall) reappears on any pointer move. */
.altitude-rail { position: absolute; right: calc(8px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2; }
.altitude-rail ol { position: relative; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.altitude-rail ol::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 19px; width: 2px; border-radius: 1px; background: var(--forest); box-shadow: 0 0 0 1px rgb(255 255 255 / 85%); }
.altitude-stop { display: flex; align-items: center; gap: 9px; min-width: 44px; min-height: 44px; padding: 0 12px 0 14px; border: 0; border-radius: 22px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
/* No backing panel: a white outline keeps the height readable over any panorama. */
.altitude-label { text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 3px #fff, 0 0 6px rgb(255 255 255 / 80%); }
.altitude-dot { position: relative; z-index: 1; flex: none; width: 12px; height: 12px; border: 2px solid var(--forest); border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px rgb(255 255 255 / 85%); }
.altitude-stop:hover .altitude-label { color: var(--forest-hover); }
.altitude-stop:hover .altitude-dot { background: var(--tint-strong); }
.altitude-stop[aria-current] { color: var(--forest-hover); cursor: default; }
.altitude-stop[aria-current] .altitude-dot { width: 16px; height: 16px; margin-left: -2px; background: var(--forest); box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgb(var(--forest-rgb) / 30%); }
.altitude-stop:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }

/* The place switch stands alone at the bottom of either menu. */
.tool-place { margin-top: 14px; }

/* The first heading folds the whole menu to itself and unfolds it again. */
.tool-group-title:has(.menu-fold) { padding: 0; }
.menu-fold { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 44px; padding: 4px 10px 3px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.menu-fold svg { width: 14px; height: 14px; transition: transform .15s ease; }
.menu-fold[aria-expanded="false"] svg { transform: rotate(-90deg); }
.menu-fold:hover { background: var(--tint); color: var(--forest); }
.menu-fold:focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.tools-menu.menu-collapsed > :not(:has(.menu-fold)) { display: none; }
.tools-menu.menu-collapsed .tool-group:has(.menu-fold) > :not(.tool-group-title) { display: none; }
/* Phones start folded (2026-10-22). Until the app hydrates and sets the folded state itself, the
   first paint already draws the menu folded; desktop stays open. */
@media (max-width: 700px) {
  .tour-shell:not(.hydrated) .tools-menu > :not(:has(.menu-fold)) { display: none; }
  .tour-shell:not(.hydrated) .tools-menu .tool-group:has(.menu-fold) > :not(.tool-group-title) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .menu-fold svg { transition: none; } }

/* Post controls live in one toolbar row above the post, apart from its content. */
.post-toolbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 12px 14px 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.post-toolbar::-webkit-scrollbar { display: none; }
.post-toolbar:not(:has(button, a)) { display: none; }
.post-toolbar :is(.social-actions, .post-secondary-actions, .post-edit-actions) { display: flex; flex: none; flex-wrap: nowrap; align-items: center; gap: 2px; margin: 0; padding: 0; }
.post-toolbar :is(button, a) { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.post-toolbar :is(button, a):hover:not(:disabled) { background: var(--tint); }
.post-toolbar :is(button, a):focus-visible { outline: 2px solid var(--forest); outline-offset: -2px; }
.post-toolbar button[aria-pressed="true"] { color: var(--accent); }
.post-toolbar .social-actions > span { padding: 0 6px; color: var(--muted); font-size: 12px; }
.post-toolbar .post-secondary-actions :is(button, a) { color: var(--muted); }
.post-toolbar .danger-button { color: var(--accent); }
.post-toolbar .post-edit-actions p { margin: 0 4px; color: var(--danger-ink); font-size: 12px; }
@media (max-width: 700px) { .post-toolbar { margin: 10px 12px 0; } }

/* Story list and post detail (2026-10-21 user requests: the action row read as out of place;
   title and text are the point, so they lead on the left while posting time and a modest author
   profile sit on the right). Each list item is its own bordered card. */
.post-author { color: var(--ink); font-weight: 600; }
.post-kind { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--tint); color: var(--forest); font-size: 11.5px; font-weight: 650; line-height: 1.6; }
.post-time { color: var(--muted); font-size: 12px; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-time:empty { display: none; }
.post-profile { display: inline-flex; align-items: center; gap: 6px; max-width: 9rem; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.post-profile .post-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-profile .avatar { flex: 0 0 22px; width: 22px; height: 22px; font-size: 11px; }
.card-side { display: flex; flex: none; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; min-width: 0; text-align: right; }
.post-place { display: inline-flex; align-self: flex-start; align-items: center; gap: 5px; max-width: 100%; padding: 4px 11px 4px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.post-place > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-place .tool-glyph { flex: none; width: 15px; height: 15px; color: var(--forest); }
button.post-place { position: relative; border: 0; font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; cursor: pointer; transition: background-color var(--duration-fast, 150ms) ease, color var(--duration-fast, 150ms) ease; }
button.post-place::after { content: ""; position: absolute; inset: -9px -4px; }
button.post-place:hover { background: var(--accent-soft); color: var(--accent-ink); }
button.post-place:active { transform: scale(0.98); }
button.post-place:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.post-place-go { flex: none; padding-left: 6px; color: var(--forest); font-weight: 700; }

.modal-card .feed-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; padding: 12px 8px 18px; }
.modal-card .feed-query-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 9.5rem); }
.modal-card .feed-query-fields label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .05); transition: border-color .18s ease, box-shadow .18s ease; }
.post-card-open { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 16px; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.post-card-open:focus-visible { outline: none; }
.post-card:has(.post-card-open:focus-visible) { outline: 2px solid var(--forest); outline-offset: 2px; }
.post-card > .post-place { margin: -4px 16px 14px; }
.post-card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgb(var(--shadow-rgb) / .08); }
.post-card:active { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .05); }
.card-row { display: flex; align-items: stretch; gap: 14px; min-width: 0; }
.card-main { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.card-heading { display: flex; align-items: center; gap: 7px; min-width: 0; }
.card-heading strong { overflow: hidden; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.post-card:hover .card-heading strong { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.6; }
.post-excerpt:empty { display: none; }
.post-card :is(.image-preview, .link-card) { margin: 0; }

.post-detail, .modal-card .post-detail, .spatial-sheet .post-detail { display: flex; flex-direction: column; width: 100%; max-width: 720px; margin-inline: auto; padding: 18px 20px 24px; }
.post-head { display: flex; align-items: flex-start; gap: 16px; }
.post-head-main { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 9px; min-width: 0; }
.post-head .card-side { gap: 8px; padding-top: 4px; }
.post-detail .post-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: -.03em; text-wrap: balance; }
.post-detail .post-place { margin-top: 12px; }
.post-detail .post-media { margin-top: 16px; border-radius: 12px; }
.post-detail .post-body { max-width: 68ch; margin-top: 14px; color: var(--ink); font-size: 16px; line-height: 1.75; white-space: pre-wrap; }
.post-detail .post-toolbar { flex-wrap: wrap; gap: 0 4px; margin: 20px 0 0; padding: 4px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: transparent; overflow: visible; white-space: normal; }
.post-detail .post-toolbar :is(button, a) { gap: 6px; padding: 0 10px; border-radius: 10px; font-size: 14px; }
.post-detail .post-toolbar .tool-glyph { flex: none; width: 20px; height: 20px; color: currentColor; }
.post-detail .post-toolbar [aria-pressed="true"] .tool-glyph { fill: currentColor; }
.post-detail .social-actions > .comment-count { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.post-detail .post-secondary-actions { margin-left: auto; }
.post-detail .post-toolbar :is(.post-secondary-actions, .post-edit-actions) :is(button, a) { padding: 0 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.post-detail .post-toolbar .post-edit-actions .danger-button { color: var(--accent); }
.post-detail .post-toolbar .post-edit-actions p { margin: 0 4px; color: var(--danger-ink); font-size: 13px; }
.post-detail .post-conversation { margin-top: 20px; }
.post-detail .comments { margin-top: 0; padding-top: 0; }
.post-detail .comments h4 { font-size: 15px; font-weight: 700; }
/* Search and filters keep a readable width on wide sheets instead of stretching edge to edge. */
@media (min-width: 900px) {
  .modal-card :is(.feed-search, .feed-query-fields) { max-width: 720px; }
}
@media (max-width: 700px) {
  .post-detail, .modal-card .post-detail, .spatial-sheet .post-detail { padding: 14px 16px 22px; }
  .post-detail .post-title { font-size: 21px; }
  .post-detail .post-toolbar :is(button, a), .post-detail .social-actions > .comment-count { gap: 5px; padding: 0 6px; font-size: 13.5px; }
  .post-detail .post-toolbar :is(.post-secondary-actions, .post-edit-actions) :is(button, a) { padding: 0 5px; font-size: 12.5px; }
  .card-heading strong { font-size: 16px; }
  .post-profile { max-width: 6.5rem; }
}

/* Build version at the very bottom of the menu (2026-10-22): present but barely there. */
.app-version { margin: 4px 12px 2px; color: var(--muted); font-size: 10px; line-height: 1.4; letter-spacing: .02em; text-align: right; opacity: .75; font-variant-numeric: tabular-nums; user-select: all; }
.app-version:empty { display: none; }

/* Bottom sheet detents (2026-10-22, web/bottom-sheet.js): the handle and header drag the sheet; a
   full sheet keeps the panorama at the half-sheet boundary and hides the minimap behind it. */
.spatial-sheet > .modal-card > .modal-header { touch-action: none; }
dialog.content-dialog[data-sheet="full"] > .modal-card { height: calc(100dvh - 12px - env(safe-area-inset-top)); max-height: calc(100dvh - 12px - env(safe-area-inset-top)); border-radius: 16px 16px 0 0; }
.spatial-sheet > .minimap { transition: opacity .2s ease; }
dialog.content-dialog.spatial-sheet[data-sheet="full"] > .minimap { opacity: 0; pointer-events: none; }
/* A full sheet covers the view like the map app; the menu returns with the half sheet. */
.tour-shell:has(dialog.content-dialog[data-sheet="full"]) .tools-peek { visibility: hidden; pointer-events: none; }
