:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --page: #f8fbfb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f4f8f8;
  --navy: #0e2340;
  --muted: #6d7b8e;
  --subtle: #aab7c3;
  --line: #e4edef;
  --line-strong: #cddde0;
  --brand: #00c2c7;
  --brand-rgb: 0, 194, 199;
  --brand-dark: #007d82;
  --brand-soft: #e7fbfb;
  --brand-contrast: #ffffff;
  --hunt: #ed6659;
  --hunt-rgb: 237, 102, 89;
  --hunt-soft: rgba(237, 102, 89, 0.34);
  --photo-filter: hue-rotate(0deg) saturate(1);
  --shadow: 0 18px 38px rgba(14, 35, 64, 0.12);
  --accent-button-shadow: 0 12px 22px rgba(var(--brand-rgb), .2);
  --accent-control-shadow: 0 8px 18px rgba(var(--brand-rgb), .18);
  --accent-nav-shadow: 0 10px 26px rgba(var(--brand-rgb), .22);
  --accent-nav-surface: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 78%, var(--navy)));
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

html { min-height: 100%; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--navy);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 32%, transparent);
  outline-offset: 3px;
}

.hunt-shell {
  position: relative;
  width: min(100%, 1120px);
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: 88px;
  overflow-x: clip;
  background: var(--surface);
}

.hunt-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 76px 1fr 76px;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: max(18px, env(safe-area-inset-top)) 18px 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(22px);
}

.hunt-title { display: grid; min-width: 0; justify-items: center; text-align: center; }
.hunt-brand-logo { width: 112px; height: 52px; object-fit: contain; }
.hunt-header-actions { display: flex; justify-content: flex-end; }
.header-login,
.header-done { min-width: 72px; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: var(--surface); font-size: 11px; font-weight: 720; }
.header-login.is-logged-in { color: #477560; border-color: #d8e9e0; background: #f0f8f4; }
.header-done { display: none; padding-right: 6px; padding-left: 6px; border-color: var(--brand); color: var(--brand-contrast); background: var(--brand); box-shadow: var(--accent-control-shadow); font-size: 10px; white-space: nowrap; }
.hunt-shell[data-view="editor"] .header-login { display: none; }
.hunt-shell[data-view="editor"] .header-done { display: block; }
.hunt-shell[data-view="my"] .color-picker,
.hunt-shell[data-view="post"] .color-picker,
.hunt-shell[data-view="editor"] .color-picker { display: none; }
.hunt-shell[data-view="editor"] { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.hunt-shell[data-view="editor"] .hunt-nav { display: none; }

.round-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--surface);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.round-button:active { transform: scale(.92); }
.round-button i { font-size: 23px; }
.accent-button { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.color-picker { padding: 14px 18px 13px; border-bottom: 1px solid var(--line); }
.color-picker-heading, .section-heading, .view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.color-picker h2, .section-heading h2, .view-heading h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.color-picker h2 { font-size: 19px; letter-spacing: -.02em; }
.color-picker-actions { display: flex; align-items: center; gap: 8px; }
.color-rail { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 2px; margin-top: 10px; padding: 10px 5px 7px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.color-button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 51px;
  grid-template-rows: 36px auto;
  justify-items: center;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  transition: transform 180ms ease, background 180ms ease;
  isolation: isolate;
}
.color-drop {
  position: relative;
  display: block;
  z-index: 2;
  width: 31px;
  height: 28px;
  border: 0;
  border-radius: 64% 36% 58% 42% / 40% 58% 42% 60%;
  background: var(--swatch);
  box-shadow: none;
  transform: rotate(-7deg) scale(1);
  transform-origin: 50% 58%;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms ease, border-radius 220ms ease;
}
.color-drop::after { content: none; }
.color-button-all .color-drop { background: conic-gradient(from 24deg, #ff6f78 0 16.6%, #ffda58 16.6% 33.2%, #95ca7a 33.2% 49.8%, #f39bc7 49.8% 66.4%, #58a8d3 66.4% 83%, #b47ebf 83% 100%); }
.color-ripple { position: absolute; top: 18px; left: 50%; z-index: 1; width: 30px; height: 20px; border: 1.5px solid var(--swatch); border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.58); }
.color-label { overflow: hidden; max-width: 100%; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.color-button[aria-pressed="true"] { background: color-mix(in srgb, var(--swatch) 9%, white); }
.color-button[aria-pressed="true"] .color-drop { box-shadow: none; transform: rotate(-7deg) scale(1.08); }
.color-button[aria-pressed="true"] .color-label { color: var(--navy); }
.color-button:active .color-drop { transform: rotate(-4deg) scaleX(1.13) scaleY(.86); }
.color-button.is-rippling .color-drop { animation: liquid-wobble 620ms cubic-bezier(.18,.72,.24,1); }
.color-button.is-rippling .color-ripple { animation: liquid-ripple 680ms cubic-bezier(.12,.64,.24,1); }
@keyframes liquid-wobble {
  0% { border-radius: 58% 42% 51% 49% / 46% 57% 43% 54%; transform: scale(1); }
  18% { border-radius: 46% 54% 43% 57% / 58% 45% 55% 42%; transform: scaleX(1.17) scaleY(.84) rotate(-2deg); }
  38% { border-radius: 55% 45% 60% 40% / 43% 59% 41% 57%; transform: scaleX(.9) scaleY(1.12) rotate(1.5deg); }
  60% { border-radius: 43% 57% 48% 52% / 54% 44% 56% 46%; transform: scaleX(1.07) scaleY(.94) rotate(-1deg); }
  80% { border-radius: 61% 39% 53% 47% / 45% 56% 44% 55%; transform: scaleX(.98) scaleY(1.04); }
  100% { border-radius: 58% 42% 51% 49% / 46% 57% 43% 54%; transform: scale(1); }
}
@keyframes liquid-ripple {
  0% { opacity: .58; transform: translate(-50%, -50%) scale(.58); }
  65% { opacity: .22; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.72); }
}

.hunt-main { min-height: 600px; }
.hunt-view { display: none; animation: view-in 260ms cubic-bezier(.2,.75,.2,1); }
.hunt-view.is-active { display: block; }
.timeline-view.is-active { display: grid; grid-template-columns: minmax(0, 1fr); }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.public-intro { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 22px 18px 12px; }
.public-intro h2 { margin: 0; font-size: 19px; }
.public-intro > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.view-only-badge, .public-pill, .view-only-label { color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-weight: 750; }
.view-only-badge { display: inline-flex; align-items: center; gap: 4px; padding: 7px 9px; border-radius: 999px; }
.timeline-feed { display: grid; gap: 12px; padding: 0 14px 28px; background: var(--surface); scroll-snap-type: y proximity; }
.timeline-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; outline: 0 solid color-mix(in srgb, var(--hunt) 0%, transparent); background: var(--surface); box-shadow: 0 8px 24px rgba(14,35,64,.045); scroll-margin: 72px 0 96px; scroll-snap-align: start; transition: outline 220ms ease, transform 220ms ease, box-shadow 220ms ease; }
.timeline-card.is-map-focus { outline: 4px solid color-mix(in srgb, var(--hunt) 28%, transparent); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(14,35,64,.13); }
.timeline-card > header { display: grid; grid-template-columns: 11px 1fr auto; align-items: center; gap: 10px; padding: 12px 13px; }
.timeline-color { width: 10px; height: 10px; border-radius: 50%; background: var(--avatar); box-shadow: 0 0 0 5px color-mix(in srgb, var(--avatar) 14%, transparent); }
.timeline-card header strong, .timeline-card header small { display: block; }
.timeline-card header strong { font-size: 12px; }
.timeline-card header small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.public-pill { padding: 5px 8px; border-radius: 999px; }
.timeline-card-actions { display: inline-flex; align-items: center; gap: 6px; }
.timeline-delete-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(204,78,87,.16); border-radius: 50%; color: #b94f5c; background: #fff; font-size: 14px; }
.timeline-delete-button:active { transform: scale(.92); }
.timeline-delete-button svg, .own-post-delete svg, .hunt-delete-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.timeline-photo { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-soft); }
.timeline-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.timeline-copy { display: grid; min-height: 47px; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 7px 10px 8px 13px; }
.timeline-copy p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--navy); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.timeline-copy button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-size: 15px; white-space: nowrap; transition: transform 160ms ease; }
.timeline-copy button:active { transform: scale(.94); }
.timeline-empty { display: grid; min-height: 142px; place-items: center; align-content: center; gap: 6px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); text-align: center; background: #fbfdfd; }
.timeline-empty i { color: var(--brand); font-size: 28px; }
.timeline-empty strong { color: var(--navy); font-size: 13px; }
.timeline-empty span { font-size: 10px; }

.map-stage { position: relative; height: clamp(320px, 82vw, 420px); margin: 12px 14px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f3f3f3; isolation: isolate; }
.hunt-map {
  --map-filter: grayscale(100%) saturate(0%) brightness(1.02) contrast(.92);
  --map-vector-filter: none;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #f3f3f3;
  color-scheme: only light;
}
.hunt-map .leaflet-tile-pane {
  -webkit-filter: none !important;
  filter: none !important;
}
.hunt-map .leaflet-tile {
  -webkit-filter: grayscale(100%) saturate(0%) brightness(1.02) contrast(.92) !important;
  filter: grayscale(100%) saturate(0%) brightness(1.02) contrast(.92) !important;
  opacity: .92 !important;
}
.hunt-map .leaflet-tile.korehane-neutral-raster-tile {
  -webkit-filter: none !important;
  filter: none !important;
  opacity: .96 !important;
}
.hunt-map .maplibre-basemap,
.hunt-map .maplibre-basemap canvas {
  -webkit-filter: none !important;
  filter: none !important;
}
.map-stage > .korehane-map-overlay {
  z-index: 390;
  opacity: .08;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 24%, transparent 74%, rgba(255,255,255,.14)),
    radial-gradient(circle at center, transparent 0 56%, rgba(228,228,228,.26) 100%);
  pointer-events: none;
}
.fluid-canvas { position: absolute; inset: 0; z-index: 420; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: normal; opacity: .72; filter: none; transition: opacity 260ms ease; }
.fluid-canvas[hidden] { display: none !important; }
.hunt-shell[data-map-mode="territory"] .fluid-canvas { opacity: .66; filter: none; }
.fluid-canvas[data-ink-engine="webgl-stable-fluid"] { mix-blend-mode: normal; opacity: .72; filter: none; }
.hunt-shell[data-map-mode="territory"] .fluid-canvas[data-ink-engine="webgl-stable-fluid"] { opacity: .66; filter: none; }
.map-color-wash {
  position: absolute;
  inset: 0;
  z-index: 370;
  pointer-events: none;
  background: var(--hunt-soft);
  mix-blend-mode: multiply;
  transition: background 320ms ease;
}
.map-color-wash { display: none; opacity: 0; }
.map-color-wash.is-hidden { opacity: 0; }
.hunt-map .leaflet-control-attribution { font-size: 8px; opacity: .72; }
.hunt-map .leaflet-marker-pane { z-index: 610 !important; }
.hunt-map .leaflet-tooltip-pane { z-index: 650 !important; }
.hunt-pin-layer { position: absolute; inset: 0; z-index: 780; overflow: hidden; pointer-events: none; }
.hunt-pin-button { position: absolute; top: 0; left: 0; width: 48px; height: 56px; padding: 0; border: 0; background: transparent; pointer-events: auto; transform-origin: 24px 54px; transition: filter 180ms ease; }
.hunt-pin-button:active { filter: brightness(.96); }
.hunt-pin-button[hidden] { display: none; }
.map-empty-state { position: absolute; top: 50%; left: 50%; z-index: 740; display: grid; min-width: 172px; place-items: center; gap: 5px; padding: 14px 18px; border: 1px solid rgba(218,228,231,.9); border-radius: 16px; color: var(--muted); text-align: center; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); transform: translate(-50%, -50%); pointer-events: none; }
.map-empty-state[hidden] { display: none; }
.map-empty-state i { color: var(--brand); font-size: 27px; }
.map-empty-state strong { color: var(--navy); font-size: 12px; }
.map-empty-state span { font-size: 9px; }
.map-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 800;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 8px;
  color: var(--navy);
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(14,35,64,.13);
  backdrop-filter: blur(14px);
}
.map-actions button { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.map-actions button:last-child { border-bottom: 0; color: var(--brand-dark); }
.map-actions i { font-size: 18px; }
.territory-summary { display: none; margin: 10px 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.territory-summary.is-visible { display: block; }
.territory-summary h2 { margin: 0; font-size: 15px; }
.territory-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.territory-summary > p { margin: 6px 0 12px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.territory-legend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.territory-stat { display: grid; grid-template-rows: 19px auto; align-items: center; gap: 4px; min-width: 0; padding: 5px 3px; border: 0; border-radius: 8px; text-align: center; background: var(--surface-soft); }
.territory-stat > span { width: 100%; height: 19px; border-radius: 6px; background: linear-gradient(90deg, var(--stat-color) 0 var(--pressure), color-mix(in srgb, var(--stat-color) 12%, white) var(--pressure)); }
.territory-stat strong { display: block; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.territory-tooltip { padding: 7px 9px !important; border: 0 !important; border-radius: 10px !important; color: var(--navy) !important; box-shadow: var(--shadow) !important; font-size: 10px !important; }

.leaflet-div-icon { border: 0; background: transparent; }
.photo-pin {
  position: relative;
  display: block;
  width: 48px;
  height: 56px;
  filter: drop-shadow(0 8px 9px rgba(14,35,64,.2));
  transform: scale(1);
  transform-origin: 24px 54px;
  transition: transform 180ms ease;
}
.photo-pin::before { position: absolute; top: 0; left: 0; width: 48px; height: 48px; box-sizing: border-box; border: 3px solid white; border-radius: 50%; background: var(--pin-color, var(--hunt)); content: ""; }
.photo-pin::after { position: absolute; bottom: 2px; left: 17px; z-index: -1; width: 14px; height: 14px; border-right: 3px solid white; border-bottom: 3px solid white; border-radius: 0 0 4px; background: var(--pin-color, var(--hunt)); content: ""; transform: rotate(45deg); }
.photo-pin img { position: absolute; top: 6px; left: 6px; z-index: 1; display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; filter: none; transform: none; }
.hunt-pin-button.is-selected .photo-pin { transform: scale(1.14); filter: drop-shadow(0 9px 11px rgba(14,35,64,.24)); }
.user-pin { display: grid; width: 28px; height: 28px; place-items: center; border: 3px solid white; border-radius: 50%; color: var(--brand-contrast); background: var(--brand); box-shadow: 0 5px 16px rgba(14,35,64,.24); }

.influence-tooltip { padding: 7px 9px !important; border: 0 !important; border-radius: 10px !important; color: var(--navy) !important; box-shadow: var(--shadow) !important; font-size: 10px !important; }
.active-color-chip { display: block; width: 28px; height: 28px; border: 4px solid white; border-radius: 50%; background: var(--hunt); box-shadow: 0 0 0 1px var(--line), 0 5px 12px rgba(var(--hunt-rgb),.22); transition: background 280ms ease; }

.record-section { padding: 19px 18px 26px; border-top: 1px solid var(--line); }
.section-heading { align-items: center; margin-bottom: 13px; }
.text-action { display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; border: 0; color: var(--brand-dark); background: transparent; font-size: 12px; font-weight: 750; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; overflow: hidden; background: var(--surface); }
.grid-cell { position: relative; aspect-ratio: 3 / 4; overflow: hidden; padding: 0; border: 0; background: var(--surface-soft); touch-action: none; }
.grid-cell img { position: absolute; top: 50%; left: 50%; display: block; width: var(--base-width, 100%); max-width: none; height: var(--base-height, 100%); object-fit: fill; filter: var(--photo-filter); transform: translate(-50%, -50%) translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(var(--scale, 1)); transform-origin: center; transition: filter 320ms ease, transform 80ms linear; user-select: none; -webkit-user-drag: none; }
.gallery-grid .grid-cell:active img, .compact-grid .grid-cell:active img { transform: translate(-50%, -50%) translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(calc(var(--scale, 1) * .98)); }
.grid-cell.is-selected { z-index: 2; box-shadow: inset 0 0 0 3px var(--brand), 0 0 0 1px white; }
.grid-cell.is-selected::before, .grid-cell.is-selected::after { position: absolute; z-index: 3; pointer-events: none; content: ""; }
.grid-cell.is-selected::before { inset: 33.333% 0 auto; height: 33.333%; border-top: 1px solid rgba(255,255,255,.86); border-bottom: 1px solid rgba(255,255,255,.86); }
.grid-cell.is-selected::after { inset: 0 auto 0 33.333%; width: 33.333%; border-left: 1px solid rgba(255,255,255,.86); border-right: 1px solid rgba(255,255,255,.86); }
.editor-canvas.hide-crop-guides .grid-cell.is-selected::before,
.editor-canvas.hide-crop-guides .grid-cell.is-selected::after { display: none; }
.compact-grid { border-radius: 2px; }
.compact-grid .grid-cell { cursor: pointer; }

.post-view { width: min(100%, 520px); margin: 0 auto; padding: 14px 18px 28px; }
.post-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.post-progress li { display: grid; min-height: 48px; place-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 8px; font-weight: 720; }
.post-progress li i { font-size: 17px; }
.post-progress li.is-done { color: #477560; background: #f0f8f4; }
.post-progress li.is-current { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); background: var(--brand-soft); }
.post-color-card { margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.post-color-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-color-heading h2 { margin: 0; font-size: 15px; }
.post-color-heading > strong { color: var(--brand-dark); font-size: 12px; }
.post-color-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin-top: 8px; }
.post-color-rail button { display: grid; min-width: 0; min-height: 54px; grid-template-rows: 34px auto; place-items: center; gap: 3px; padding: 3px 0; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 8px; font-weight: 720; transition: background 180ms ease, transform 180ms ease; }
.post-color-rail button.is-active { color: var(--navy); background: color-mix(in srgb, var(--swatch) 13%, white); }
.post-color-rail button:active { transform: scale(.94); }
.post-color-drop { display: block; width: 29px; height: 27px; border-radius: 64% 36% 58% 42% / 40% 58% 42% 60%; background: var(--swatch); transform: rotate(-7deg); transition: transform 220ms cubic-bezier(.2,.8,.2,1), border-radius 220ms ease; }
.post-color-rail button.is-active .post-color-drop { transform: rotate(5deg) scale(1.1); }
.post-color-rail button.is-rippling .post-color-drop { animation: liquid-wobble 620ms cubic-bezier(.18,.72,.24,1); }
.post-photo-preview { position: relative; display: block; width: min(100%, 210px); aspect-ratio: 3 / 4; margin: 0 auto 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); touch-action: none; }
.post-photo-preview img { width: 100%; height: 100%; object-fit: contain; transform: translate(var(--post-x, 0px), var(--post-y, 0px)) scale(var(--post-scale, 1)) rotate(var(--post-rotation, 0deg)); transform-origin: center; transition: transform 80ms linear; user-select: none; -webkit-user-drag: none; }
.post-photo-preview > .post-photo-change { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 50%; color: var(--brand-dark); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.post-photo-preview[data-has-photo="false"] > .post-photo-change,
.post-photo-preview[data-has-photo="false"] > .post-photo-gesture { display: none; }
.post-photo-preview > .post-photo-empty { position: absolute; inset: 0; z-index: 2; display: grid; width: 100%; height: 100%; place-content: center; gap: 8px; padding: 0; border: 0; color: var(--muted); background: #f5f8f8; }
.post-photo-empty[hidden] { display: none !important; }
.post-photo-empty strong { font-size: 11px; }
.post-photo-empty i { font-size: 22px; }
.post-photo-preview > span i { font-size: 20px; }
.post-photo-gesture { position: absolute; bottom: 12px; left: 12px; z-index: 2; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.88); pointer-events: none; }
.post-photo-controls { display: grid; width: min(100%, 332px); grid-template-columns: 34px minmax(0, 1fr) 34px 42px 34px 34px; align-items: center; gap: 5px; margin: 0 auto 10px; }
.post-photo-controls button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: var(--surface); }
.post-photo-controls button:disabled { color: var(--subtle); background: var(--surface-soft); }
.post-photo-controls input { width: 100%; min-width: 0; accent-color: var(--brand); }
.post-photo-controls output { color: var(--muted); font-size: 9px; font-weight: 720; text-align: center; }
.post-photo-sources { display: grid; width: min(100%, 300px); grid-template-columns: repeat(2, 1fr); gap: 8px; margin: -2px auto 14px; }
.post-photo-sources button { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand-dark); background: var(--surface); font-size: 10px; font-weight: 760; }
.post-photo-sources button:active { transform: scale(.97); }
.post-photo-sources i { font-size: 17px; }
.post-caption-field { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 7px; width: min(100%, 300px); margin: -2px auto 14px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); background: var(--surface); transition: border-color 180ms ease, box-shadow 180ms ease; }
.post-caption-field:focus-within { border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 11%, transparent); }
.post-caption-field i { color: var(--brand-dark); font-size: 16px; }
.post-caption-field input { min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; color: var(--navy); background: transparent; font: inherit; font-size: 11px; }
.post-caption-field input::placeholder { color: var(--muted); opacity: 1; }
.post-map-card { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.post-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.post-map-heading h2 { margin: 0; font-size: 15px; }
.post-map-heading button { display: inline-flex; min-height: 34px; align-items: center; gap: 4px; padding: 0 10px; border: 0; border-radius: 8px; color: var(--brand-dark); background: var(--brand-soft); font-size: 9px; font-weight: 740; }
.hunt-place-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-bottom: 6px; }
.hunt-place-search input { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--navy); background: #fff; font: inherit; font-size: 11px; outline: none; }
.hunt-place-search input:focus { border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.hunt-place-search > button { display: inline-flex; min-width: 64px; height: 40px; align-items: center; justify-content: center; padding: 0 11px; border: 0; border-radius: 10px; color: var(--brand-contrast); background: var(--brand); box-shadow: var(--accent-control-shadow); font-size: 9px; font-weight: 760; white-space: nowrap; }
.hunt-place-search > button:disabled { color: var(--muted); background: var(--surface-soft); }
.hunt-place-results { display: grid; gap: 5px; margin-bottom: 6px; }
.hunt-place-result { display: grid; gap: 2px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; text-align: left; background: var(--surface); }
.hunt-place-result strong { overflow: hidden; color: var(--navy); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.hunt-place-result span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.hunt-place-search-hint { min-height: 15px; margin: 0 0 8px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.hunt-place-selection { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 54px; margin: 0 0 8px; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 11px; background: color-mix(in srgb, var(--brand) 5%, #fff); }
.hunt-place-selection > i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, #fff); font-size: 17px; }
.hunt-place-selection > span { display: grid; min-width: 0; gap: 1px; }
.hunt-place-selection small { color: var(--muted); font-size: 7px; font-weight: 720; }
.hunt-place-selection strong,
.hunt-place-selection span span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hunt-place-selection strong { color: var(--navy); font-size: 10px; }
.hunt-place-selection span span { color: var(--muted); font-size: 7.5px; }
.hunt-place-selection em { padding: 4px 6px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 7px; font-style: normal; font-weight: 740; }
.hunt-place-selection[data-state="candidate"] em { color: var(--brand-text, var(--brand)); background: color-mix(in srgb, var(--brand) 12%, #fff); }
.hunt-place-selection[data-state="confirmed"] { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
.hunt-place-selection[data-state="confirmed"] em { color: var(--brand-contrast); background: var(--brand); }
.hunt-post-map { position: relative; height: 184px; }
.post-auth-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 8px; color: var(--muted); font-size: 9px; }
.post-auth-hint i { color: var(--brand-dark); font-size: 15px; }
.post-submit.primary-action { width: 100%; margin: 0; }

.view-heading { align-items: center; padding: 21px 18px 0; }
.private-banner { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; margin: 16px 18px 0; padding: 13px; border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); border-radius: 10px; background: var(--brand-soft); }
.private-avatar { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-size: 17px; }
.private-banner strong, .private-banner small { display: block; }
.private-banner strong { font-size: 13px; }
.private-banner small { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--muted); font-size: 9px; }
.my-view .private-banner { grid-template-columns: 40px 1fr auto; margin-top: 10px; padding: 9px 12px; }
.my-view .private-avatar { width: 40px; height: 40px; }
.my-view .view-heading { padding-top: 13px; }
.my-view .view-lead { margin-top: 4px; margin-bottom: 10px; }
.my-view .gallery-grid { width: min(calc(100% - 36px), 330px); margin-right: auto; margin-left: auto; }
.collage-settings { display: grid; gap: 7px; margin: 10px 18px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfd; }
.collage-setting-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 32px; }
.collage-setting-row > span { color: var(--muted); font-size: 9px; font-weight: 720; }
.collage-border-modes { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; }
.collage-border-modes button { min-width: 31px; min-height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 9px; font-weight: 740; }
.collage-border-modes button.is-active { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); background: var(--brand-soft); }
.collage-border-width input { width: 100%; accent-color: var(--brand); }
.collage-border-width input:disabled { opacity: .34; }
.collage-border-width output { min-width: 32px; color: var(--muted); font-size: 9px; text-align: right; }
.collage-color-row[hidden] { display: none; }
.collage-color-drops { display: flex; min-width: 0; gap: 3px; }
.collage-color-drops button { position: relative; display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; border: 0; border-radius: 11px; background: transparent; transition: background 160ms ease, transform 160ms ease; }
.collage-color-drops button span { display: block; width: 24px; height: 24px; border-radius: 55% 45% 52% 48% / 45% 58% 42% 55%; background: var(--swatch); transform: rotate(-7deg); transition: transform 180ms ease; }
.collage-color-drops button.is-active { background: color-mix(in srgb, var(--swatch) 16%, white); }
.collage-color-drops button.is-active span { transform: rotate(7deg) scale(.82); }
.collage-color-drops button.is-active::after { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--navy); content: ""; }
.grid-count { display: grid; min-width: 70px; min-height: 30px; padding: 0 9px; place-items: center; border-radius: 999px; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 12%, white); font-size: 9px; font-weight: 760; white-space: nowrap; }
.grid-source-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 11px 18px 12px; }
.grid-source-actions button { display: grid; min-height: 64px; place-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 8px; font-weight: 720; }
.grid-source-actions i { color: var(--brand-dark); font-size: 21px; }
.view-lead { margin: 7px 18px 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.gallery-grid { width: calc(100% - 36px); aspect-ratio: 3 / 4; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(var(--grid-rows, 1), minmax(0, 1fr)); gap: var(--collage-gap, 0); margin: 0 18px; padding: var(--collage-outer, 0); border-radius: 6px; background: var(--collage-border, #fff); }
.gallery-grid[data-empty="true"] { min-height: 150px; aspect-ratio: auto; }
.gallery-grid .grid-cell { min-width: 0; min-height: 0; grid-column: span var(--grid-span, 12); aspect-ratio: auto; cursor: grab; isolation: isolate; touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: opacity 140ms ease, transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms ease; }
.gallery-grid .grid-cell img,
.editor-canvas .grid-cell img { object-fit: fill; }
.gallery-grid .grid-cell img { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.album-photo-edit { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; cursor: grab; }
.album-photo-edit:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 72%, white); outline-offset: -3px; }
.album-photo-remove { position: absolute; top: 6px; left: 6px; z-index: 5; display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; color: var(--navy); background: rgba(255,255,255,.88); box-shadow: 0 3px 12px rgba(14,35,64,.09); backdrop-filter: blur(10px); touch-action: manipulation; transition: color 150ms ease, background 150ms ease, transform 150ms ease; }
.album-photo-remove span { font-size: 19px; font-weight: 520; line-height: 1; transform: translateY(-1px); }
.album-photo-remove:active { color: #fff; background: #bf5662; transform: scale(.9); }
.album-reorder-grip { position: absolute; top: 6px; right: 6px; z-index: 4; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(255,255,255,.74); border-radius: 9px; color: var(--navy); background: rgba(255,255,255,.82); box-shadow: 0 3px 12px rgba(14,35,64,.09); backdrop-filter: blur(10px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.album-reorder-grip i { font-size: 16px; }
.gallery-grid.is-reordering .grid-cell { cursor: grabbing; }
.gallery-grid .grid-cell.is-hold-pending .album-reorder-grip { animation: album-hold-pulse 240ms ease-out both; }
.gallery-grid .grid-cell.is-dragging { z-index: 1; opacity: .24; transform: scale(.94); }
.gallery-grid .grid-cell.is-drop-target { z-index: 2; box-shadow: inset 0 0 0 4px var(--brand), inset 0 0 0 6px rgba(255,255,255,.9); transform: scale(.96); }
.gallery-grid .grid-cell.was-swapped { transform: scale(.94); }
.album-drag-active { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.album-drag-ghost.grid-cell { position: fixed; z-index: 1600; margin: 0; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: var(--surface-soft); box-shadow: 0 18px 44px rgba(14,35,64,.24), 0 0 0 3px rgba(255,255,255,.9); opacity: .94; pointer-events: none; transform: rotate(1.5deg) scale(1.04); }
.album-drag-ghost .album-reorder-grip { display: none; }
.album-drag-ghost .album-photo-remove { display: none; }
@keyframes album-hold-pulse {
  0% { box-shadow: 0 3px 12px rgba(14,35,64,.09), 0 0 0 0 rgba(var(--brand-rgb),.38); transform: scale(1); }
  100% { box-shadow: 0 3px 12px rgba(14,35,64,.09), 0 0 0 8px rgba(var(--brand-rgb),0); transform: scale(.92); }
}
.album-empty-prompt { display: grid; grid-column: 1 / -1; place-content: center; justify-items: center; gap: 5px; min-width: 0; min-height: 0; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--brand-dark); background: #f8fbfb; }
.album-empty-prompt i { font-size: 28px; }
.album-empty-prompt strong { font-size: 12px; }
.album-empty-prompt small { color: var(--muted); font-size: 8px; }
.album-add-more { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 5px; margin: 8px 18px 0 auto; padding: 0 12px; border: 1px dashed color-mix(in srgb, var(--brand) 44%, var(--line)); border-radius: 999px; color: var(--brand-dark); background: color-mix(in srgb, var(--brand) 6%, white); font-size: 9px; font-weight: 750; }
.album-add-more[hidden] { display: none; }
.album-add-more i { font-size: 15px; }
.album-add-more:active { transform: scale(.96); }
.grid-cell.is-empty { color: var(--subtle); background: #f4f7f7; box-shadow: inset 0 0 0 1px #e7eeee; }
.grid-cell.is-empty span { display: grid; place-items: center; gap: 2px; }
.grid-cell.is-empty i { font-size: 17px; }
.grid-cell.is-empty small { font-size: 7px; }
.grid-meta { display: grid; grid-template-columns: 32px 1fr 44px; align-items: center; gap: 12px; margin: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-meta strong, .grid-meta small { display: block; }
.grid-meta strong { font-size: 14px; }
.grid-meta small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.primary-action, .done-button {
  border: 0;
  color: var(--brand-contrast);
  background: var(--brand);
  font-weight: 760;
  box-shadow: var(--accent-button-shadow);
}
.primary-action { display: flex; width: calc(100% - 36px); min-height: 52px; align-items: center; justify-content: center; gap: 8px; margin: 0 18px 26px; border-radius: 9px; }
button:disabled { cursor: default; opacity: .42; box-shadow: none !important; }
.my-actions { position: fixed; bottom: calc(74px + env(safe-area-inset-bottom)); left: 50%; z-index: 1100; display: grid; width: min(calc(100% - 24px), 406px); grid-template-columns: .8fr 1.2fr; gap: 8px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 10px 28px rgba(14,35,64,.12); backdrop-filter: blur(18px); transform: translateX(-50%); }
.my-actions .primary-action { width: auto; min-height: 50px; margin: 0; padding: 0 11px; }
.secondary-action, .instagram-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); font-size: 11px; font-weight: 750; }
.secondary-action i { color: var(--brand-dark); font-size: 19px; }
.instagram-action { width: calc(100% - 36px); margin: 0 18px 26px; color: var(--navy); border-color: color-mix(in srgb, var(--hunt) 45%, var(--line)); background: color-mix(in srgb, var(--hunt) 8%, white); }
.instagram-action i { color: var(--hunt); font-size: 20px; }
.primary-action:active, .done-button:active { transform: translateY(1px) scale(.985); }
.collage-export-note,
.editor-state-note { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 9px; }
.collage-export-note { margin: 0 18px 110px; }
.collage-export-note i,
.editor-state-note i { color: var(--brand-dark); font-size: 14px; }

.editor-view { padding-bottom: 22px; }
.done-button { min-width: 74px; min-height: 40px; padding: 0 17px; border-radius: 999px; font-size: 13px; }
.editor-stage { position: relative; width: min(calc(100% - 28px), 330px); margin: 14px auto 0; }
.location-bar { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; width: auto; max-width: calc(100% - 78px); min-height: 34px; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; text-align: left; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.location-bar > i { flex: 0 0 auto; color: var(--brand-dark); font-size: 17px; }
.location-bar strong { overflow: hidden; font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.editor-photo-count { position: absolute; top: 10px; right: 10px; z-index: 5; display: grid; min-width: 48px; height: 34px; place-items: center; padding: 0 8px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); font-size: 10px; font-weight: 760; }
.editor-canvas { display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: var(--surface-soft); touch-action: none; }
.editor-canvas .grid-cell { width: 100%; height: 100%; aspect-ratio: auto; cursor: grab; }
.editor-canvas .grid-cell:active { cursor: grabbing; }
.editor-canvas .grid-cell.is-selected { box-shadow: none; }
.gesture-hint { position: absolute; bottom: 10px; left: 50%; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; margin: 0; padding: 0 10px; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); font-size: 9px; font-weight: 680; white-space: nowrap; transform: translateX(-50%); }
.gesture-hint i { color: var(--brand-dark); font-size: 15px; }
.editor-filmstrip { display: flex; gap: 7px; margin-top: 9px; padding: 3px 18px 4px; overflow-x: auto; scroll-padding: 0 18px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.editor-filmstrip::-webkit-scrollbar { display: none; }
.editor-thumb { position: relative; flex: 0 0 48px; width: 48px; height: 64px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: var(--surface-soft); cursor: grab; scroll-snap-align: center; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: opacity 140ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.editor-thumb img { position: absolute; top: 50%; left: 50%; display: block; width: var(--base-width, 100%); max-width: none; height: var(--base-height, 100%); object-fit: fill; filter: var(--photo-filter); pointer-events: none; -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; transform: translate(-50%, -50%) translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotation, 0deg)) scale(var(--scale, 1)); transform-origin: center; }
.editor-thumb::after { position: absolute; right: 3px; bottom: 3px; display: grid; min-width: 17px; height: 17px; padding: 0 4px; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; color: white; background: rgba(14,35,64,.76); content: attr(data-order); font-size: 8px; font-weight: 760; }
.editor-thumb.is-selected { border-color: var(--brand); box-shadow: 0 5px 14px rgba(var(--brand-rgb), .2); transform: translateY(-2px); }
.editor-filmstrip.is-reordering { scroll-snap-type: none; }
.editor-filmstrip.is-reordering .editor-thumb { cursor: grabbing; }
.editor-thumb.is-hold-pending::after { animation: album-hold-pulse 240ms ease-out both; }
.editor-thumb.is-dragging { opacity: .24; transform: translateY(-2px) scale(.9); }
.editor-thumb.is-drop-target { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 7px 18px rgba(var(--brand-rgb),.28); transform: translateY(-2px) scale(.96); }
.editor-thumb.was-swapped { transform: translateY(-2px) scale(.9); }
.album-drag-ghost.editor-thumb { position: fixed; z-index: 1600; flex: none; margin: 0; overflow: hidden; padding: 0; border-color: var(--brand); background: var(--surface-soft); box-shadow: 0 16px 36px rgba(14,35,64,.24), 0 0 0 3px rgba(255,255,255,.92); opacity: .96; pointer-events: none; transform: scale(1.06); }
.zoom-control { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px 42px; align-items: center; gap: 8px; margin: 8px 18px 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.zoom-control button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 10px; color: var(--brand-dark); background: var(--brand-soft); }
.zoom-control input { width: 100%; accent-color: var(--brand); }
.zoom-control output { color: var(--muted); text-align: center; font-size: 9px; font-weight: 720; }
.edit-tools { display: flex; justify-content: center; gap: 8px; margin: 10px 18px 0; }
.edit-tools button { display: grid; width: 48px; height: 48px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); background: var(--surface); transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.edit-tools button:active { transform: scale(.92); }
.edit-tools i { font-size: 21px; }
.edit-tools button.is-active { border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); color: var(--brand-dark); background: var(--brand-soft); }
.editor-state-note { margin: 12px 18px 0; }

.hunt-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1200;
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  margin: 0 auto;
  backdrop-filter: blur(22px);
}
.hunt-nav button { display: grid; min-height: 58px; place-items: center; gap: 3px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; }
.hunt-nav i { font-size: 23px; }
.hunt-nav span { font-size: 10px; font-weight: 700; }
.hunt-nav button.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.hunt-nav button.hunt-primary-nav { color: var(--brand-contrast); background: var(--accent-nav-surface); box-shadow: var(--accent-nav-shadow); }
.hunt-nav .hunt-primary-nav i { font-size: 22px; }

.source-sheet { width: min(calc(100% - 24px), 406px); margin: auto auto 12px; padding: 0; border: 0; border-radius: 12px; color: var(--navy); background: var(--surface); box-shadow: var(--shadow); }
.source-sheet::backdrop { background: rgba(14,35,64,.42); backdrop-filter: blur(4px); }
.source-sheet form { padding: 21px 18px 18px; }
.source-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.source-sheet h2 { margin: 0; font-size: 18px; }
.source-sheet-head button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: var(--surface-soft); }
.source-sheet form > button:not(.source-sheet-head button) { display: grid; width: 100%; grid-template-columns: 40px 1fr 18px; align-items: center; gap: 12px; padding: 14px 3px; border: 0; border-top: 1px solid var(--line); text-align: left; background: transparent; }
.source-sheet form > button > i:first-child { color: var(--brand-dark); font-size: 26px; }
.source-sheet form > button > i:last-child { color: var(--subtle); }
.source-sheet strong, .source-sheet small { display: block; }
.source-sheet strong { font-size: 13px; }
.source-sheet small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.source-sheet [hidden] { display: none !important; }
.own-post-sheet form { min-height: 190px; }
.own-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.own-post-item { position: relative; min-width: 0; }
.own-post-grid [data-own-post] { width: 100%; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 8px; background: var(--surface-soft); }
.own-post-grid [data-own-post]:focus-visible { border-color: var(--brand); }
.own-post-grid img { width: 100%; height: 100%; object-fit: cover; }
.own-post-grid [data-own-post] > span { position: absolute; right: 5px; bottom: 5px; padding: 3px 6px; border-radius: 999px; color: var(--navy); background: rgba(255,255,255,.88); backdrop-filter: blur(8px); font-size: 8px; font-weight: 720; }
.own-post-delete { position: absolute; top: 5px; right: 5px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(204,78,87,.16); border-radius: 50%; color: #b94f5c; background: rgba(255,255,255,.92); box-shadow: 0 4px 12px rgba(14,35,64,.12); }
.own-post-empty { margin: 20px 0 8px; text-align: center; color: var(--muted); font-size: 10px; }

.hunt-delete-dialog { width: min(calc(100% - 28px), 390px); margin: auto; padding: 0; border: 0; border-radius: 14px; color: var(--navy); background: var(--surface); box-shadow: var(--shadow); }
.hunt-delete-dialog::backdrop { background: rgba(14,35,64,.42); backdrop-filter: blur(4px); }
.hunt-delete-card { display: grid; gap: 17px; padding: 23px; }
.hunt-delete-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #b94f5c; background: rgba(204,78,87,.1); font-size: 22px; }
.hunt-delete-card h2 { margin: 4px 0 8px; font-size: 19px; }
.hunt-delete-card p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.hunt-delete-actions { display: flex; justify-content: flex-end; gap: 9px; }
.hunt-delete-actions button { min-height: 40px; border: 0; border-radius: 9px; padding: 0 14px; color: var(--muted); background: var(--surface-soft); font-weight: 750; }
.hunt-delete-actions .is-danger { color: #fff; background: #bf5662; }

.hunt-toast { position: fixed; bottom: 92px; left: 50%; z-index: 1400; display: flex; max-width: min(330px, calc(100% - 28px)); align-items: center; gap: 10px; padding: 8px 9px 8px 15px; border-radius: 999px; color: white; background: var(--navy); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 180ms ease, transform 180ms ease; }
.hunt-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.hunt-toast.has-action { pointer-events: auto; }
.hunt-shell[data-view="my"] ~ .hunt-toast { bottom: calc(202px + env(safe-area-inset-bottom)); }
.hunt-toast > span { min-width: 0; }
.hunt-toast button { min-height: 32px; flex: 0 0 auto; padding: 0 11px; border: 0; border-radius: 999px; color: var(--navy); background: #fff; font-size: 10px; font-weight: 780; }

@media (min-width: 700px) {
  .my-view,
  .editor-view { width: min(100%, 700px); margin: 0 auto; }
  .my-view .gallery-grid { width: 420px; }
  .editor-stage { width: 420px; }
  .color-rail { grid-template-columns: repeat(7, 60px); justify-content: start; gap: 6px; }
}

@media (min-width: 900px) {
  .hunt-shell {
    padding-right: 28px;
    padding-bottom: 0;
    padding-left: 28px;
    border-right: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
    border-left: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
  }

  .hunt-header {
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .color-picker {
    margin-right: -28px;
    margin-left: -28px;
    padding-right: 28px;
    padding-left: 28px;
  }

  .timeline-view.is-active {
    grid-template-columns: minmax(0, 1.08fr) 430px;
    grid-template-areas:
      "map intro"
      "map feed"
      "territory feed";
    gap: 0 24px;
    padding-top: 18px;
  }

  .timeline-view .map-stage { grid-area: map; height: 630px; margin: 0; }
  .timeline-view .territory-summary { grid-area: territory; margin: 12px 0 0; }
  .timeline-view .public-intro { grid-area: intro; align-self: start; padding: 0 0 14px; }
  .timeline-view .timeline-feed {
    grid-area: feed;
    align-content: start;
    grid-auto-rows: max-content;
    max-height: 584px;
    overflow: auto;
    padding: 0 4px 0 0;
  }

  .timeline-view .timeline-card {
    display: grid;
    min-height: 104px;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "photo card-head"
      "photo card-meta";
  }

  .timeline-view .timeline-card > header {
    grid-area: card-head;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 12px 12px 4px;
  }

  .timeline-view .timeline-avatar { width: 34px; height: 34px; }
  .timeline-view .timeline-photo { grid-area: photo; min-height: 104px; aspect-ratio: auto; }
  .timeline-view .timeline-photo img { height: 100%; }
  .timeline-view .timeline-copy { grid-area: card-meta; padding: 4px 12px 10px; }

  .hunt-nav {
    position: static;
    max-width: 520px;
    margin: 24px auto 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
  }

  .my-actions { position: static; width: auto; margin: 0 18px 10px; padding: 0; border: 0; background: transparent; box-shadow: none; transform: none; }
  .collage-export-note { margin-bottom: 24px; }
}

@media (max-width: 360px) {
  .hunt-header { grid-template-columns: 70px 1fr 70px; padding-right: 14px; padding-left: 14px; }
  .header-login, .header-done { min-width: 68px; padding-right: 8px; padding-left: 8px; }
  .color-picker, .record-section { padding-right: 14px; padding-left: 14px; }
  .color-rail { padding-right: 3px; padding-left: 3px; }
  .color-drop { width: 29px; height: 27px; }
  .map-stage { height: 306px; margin-right: 10px; margin-left: 10px; }
  .map-actions { top: 10px; right: 10px; }
  .territory-summary { margin-right: 10px; margin-left: 10px; }
  .gallery-grid { width: calc(100% - 28px); margin-right: 14px; margin-left: 14px; }
  .my-view .gallery-grid { width: min(calc(100% - 28px), 306px); margin-right: auto; margin-left: auto; }
  .editor-stage { width: min(calc(100% - 24px), 318px); }
  .editor-filmstrip { padding-right: 14px; padding-left: 14px; }
  .zoom-control { margin-right: 14px; margin-left: 14px; }
}

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