:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --bg: #eef3f4;
  --page: #f8fbfb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f3fbfb;
  --text: #0e2340;
  --muted: #637386;
  --subtle: #9fb1bd;
  --line: #e7f1f2;
  --line-strong: #cfe4e6;
  --brand: #00c2c7;
  --brand-ink: #007d82;
  --brand-soft: #e8fbfc;
  --accent: #0e2340;
  --accent-soft: #eaf0f6;
  --food: #00c2c7;
  --drink: #0e2340;
  --green: #5f8b76;
  --danger: #bb4b45;
  --shadow: 0 18px 36px rgba(14, 35, 64, 0.09);
  --shadow-soft: 0 8px 22px rgba(14, 35, 64, 0.06);
  --focus: rgba(0, 194, 199, 0.22);
}

[data-theme="amber"] {
  --bg: #eef3f4;
  --page: #f8fbfb;
  --surface: #ffffff;
  --surface-soft: #f3fbfb;
  --text: #0e2340;
  --muted: #637386;
  --subtle: #9fb1bd;
  --line: #e7f1f2;
  --line-strong: #cfe4e6;
  --brand: #00c2c7;
  --brand-ink: #007d82;
  --brand-soft: #e8fbfc;
  --accent: #0e2340;
  --accent-soft: #eaf0f6;
  --food: #00c2c7;
  --drink: #0e2340;
  --green: #5f8b76;
  --focus: rgba(0, 194, 199, 0.22);
}

[data-theme="indigo"] {
  --bg: #f5f5f1;
  --page: #fafaf6;
  --surface-soft: #eef0f3;
  --text: #171923;
  --muted: #656a76;
  --line: #dfe2e5;
  --line-strong: #c8ccd4;
  --brand: #315f8f;
  --brand-ink: #173559;
  --brand-soft: #e7f0fa;
  --accent: #9a5b34;
  --accent-soft: #f7eee8;
  --food: #9a5b34;
  --drink: #315f8f;
  --green: #4b8061;
  --focus: rgba(49, 95, 143, 0.18);
}

[data-theme="wasabi"] {
  --bg: #f3f6ef;
  --page: #fbfcf7;
  --surface-soft: #eaf0df;
  --text: #182016;
  --muted: #687260;
  --line: #dbe4d1;
  --line-strong: #c8d5bb;
  --brand: #5f8d3b;
  --brand-ink: #2f4c1c;
  --brand-soft: #edf6df;
  --accent: #b86637;
  --accent-soft: #fbefe7;
  --food: #b86637;
  --drink: #3c788a;
  --green: #5f8d3b;
  --focus: rgba(95, 141, 59, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 72%, white);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 16px 96px;
  background: var(--surface);
}

.topbar,
.home-heading,
.view-header,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -14px -16px 18px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px);
}

.topbar > div:not(.topbar-actions) {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.brand-block {
  display: grid;
  justify-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-swatches {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.theme-swatch {
  width: 15px;
  height: 15px;
  min-height: 15px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 0;
  background: linear-gradient(135deg, #00c2c7 0 50%, #0e2340 50% 100%);
}

.theme-swatch[data-theme="indigo"] {
  background: linear-gradient(135deg, #315f8f 0 50%, #9a5b34 50% 100%);
}

.theme-swatch[data-theme="wasabi"] {
  background: linear-gradient(135deg, #5f8d3b 0 50%, #b86637 50% 100%);
}

.theme-swatch.is-active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface);
}

.location-label,
.brand-concept,
.panel-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-concept {
  margin: 0;
  color: var(--brand-ink);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.brand-logo {
  width: 118px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

h2 {
  margin-bottom: 6px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.ghost-button,
.primary-button,
.secondary-button,
.text-button,
.icon-button,
.nav-item {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  font-weight: 600;
}

.ghost-button {
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost-button.is-logged-in {
  color: color-mix(in srgb, var(--green) 72%, black);
  background: color-mix(in srgb, var(--green) 13%, white);
  border-color: color-mix(in srgb, var(--green) 28%, white);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 22px color-mix(in srgb, var(--brand) 20%, transparent);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.secondary-button:disabled,
.danger-button:disabled,
.text-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.feather-cta {
  width: 56px;
  padding: 0;
  overflow: hidden;
}

.feather-icon {
  width: 38px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.secondary-button {
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.text-button {
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  min-height: 32px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  padding: 0;
  color: var(--text);
  background: var(--surface-strong);
  border: 0;
}

.menu-button {
  background: transparent;
}

.icon-button svg,
.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-heading {
  align-items: flex-start;
  margin-bottom: 26px;
}

.home-heading .primary-button {
  min-width: 72px;
  min-height: 46px;
  padding: 0 14px;
  line-height: 1.12;
}

.search-panel {
  margin-bottom: 18px;
}

.area-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: -4px 0 12px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.area-rail::-webkit-scrollbar {
  display: none;
}

.area-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.area-chip.is-active {
  color: var(--text);
  background: var(--surface-soft);
}

.search-box {
  display: block;
  margin-bottom: 10px;
}

.search-box input,
.post-form input,
.post-form textarea,
.post-form select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--text);
  background: var(--surface-strong);
  outline: 0;
  box-shadow: none;
}

.search-box input:focus,
.post-form input:focus,
.post-form textarea:focus,
.post-form select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus);
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  font-size: 11.5px;
  font-weight: 600;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  box-shadow: none;
}

.chip.is-active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.tag {
  min-height: 24px;
  padding: 0 9px;
}

.tag.food {
  color: color-mix(in srgb, var(--food) 64%, black);
  background: color-mix(in srgb, var(--food) 12%, white);
  border-color: color-mix(in srgb, var(--food) 28%, white);
}

.tag.drink {
  color: color-mix(in srgb, var(--drink) 68%, black);
  background: color-mix(in srgb, var(--drink) 11%, white);
  border-color: color-mix(in srgb, var(--drink) 27%, white);
}

.tag.green {
  color: color-mix(in srgb, var(--green) 68%, black);
  background: color-mix(in srgb, var(--green) 12%, white);
  border-color: color-mix(in srgb, var(--green) 28%, white);
}

.live-map {
  position: relative;
  height: 292px;
  touch-action: none;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-soft) 74%, #cfd7c8);
  box-shadow: none;
}

.map-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 132%;
  height: 132%;
  transform: translate(calc(-11% + var(--map-pan-x, 0px)), calc(-14% + var(--map-pan-y, 0px))) scale(var(--map-zoom, 1.03));
  transform-origin: center;
  filter: saturate(0.62) contrast(1.02) brightness(1.04);
  will-change: transform;
}

.map-tiles img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), color-mix(in srgb, var(--bg) 42%, transparent)),
    linear-gradient(90deg, color-mix(in srgb, var(--surface-strong) 8%, transparent), transparent 28% 72%, color-mix(in srgb, var(--surface-strong) 12%, transparent));
  pointer-events: none;
}

.map-place-pins,
.map-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translate(var(--map-pan-x, 0px), var(--map-pan-y, 0px)) scale(var(--map-zoom, 1));
  transform-origin: center;
  will-change: transform;
}

.map-place-pins button,
.map-bubbles button {
  pointer-events: auto;
}

.map-place-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  transform: translate(-50%, -100%);
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: var(--brand);
  background: transparent;
}

.map-place-pin span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid color-mix(in srgb, var(--surface) 90%, transparent);
  border-radius: 999px 999px 999px 2px;
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(14, 35, 64, 0.16);
  transform: rotate(-45deg);
}

.map-place-pin span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
}

.map-place-pin.is-active span,
.map-place-pin.is-draft span {
  background: var(--accent);
}

.map-place-pin small {
  position: absolute;
  left: 50%;
  top: 29px;
  transform: translateX(-50%);
  max-width: 110px;
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: 0 6px 16px rgba(14, 35, 64, 0.1);
  font-size: 10px;
  font-weight: 620;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
}

.map-control-button {
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: 0 6px 16px rgba(14, 35, 64, 0.08);
  font-size: 15px;
  font-weight: 680;
}

.map-reset-button {
  width: auto;
  padding: 0 9px;
  font-size: 11px;
}

.map-caption {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 11.5px;
  font-weight: 650;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: 0 6px 16px rgba(31, 39, 50, 0.06);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 16%, transparent);
}

.map-bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  width: min(150px, 42vw);
  padding: 7px;
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(31, 39, 50, 0.12);
  transform: translate(-18px, -100%);
  animation: floatIn 520ms ease both;
}

.map-bubble.is-featured {
  z-index: 2;
  width: min(170px, 48vw);
  border-color: color-mix(in srgb, var(--brand) 38%, white);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--brand) 19%, rgba(39, 31, 20, 0.14));
}

.map-bubble::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  transform: rotate(45deg);
}

.map-bubble img {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
}

.map-bubble strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-bubble.is-featured strong {
  font-size: 12px;
}

.map-bubble span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translate(-18px, calc(-100% + 10px)) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-18px, -100%) scale(1);
  }
}

.section-title-row {
  margin: 24px 0 12px;
}

.section-title-row h3 {
  margin-bottom: 0;
}

.timeline-list,
.ranking-list {
  display: grid;
  gap: 11px;
}

.discovery-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-width: 0 0 1px;
  background: transparent;
  box-shadow: none;
}

.discovery-row img {
  width: 76px;
  height: 76px;
  border-radius: 7px;
  object-fit: cover;
}

.row-content {
  min-width: 0;
}

.row-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0;
}

.row-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.row-title h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 680;
  line-height: 1.28;
}

.row-note {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.muted-small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.row-actions,
.share-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.like-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.like-button.is-liked {
  color: #fff;
  background: #c94f45;
}

.map-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 2px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 650;
}

.view-header {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.post-form {
  display: grid;
  gap: 14px;
}

.auth-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
  font-size: 12px;
  font-weight: 620;
}

.auth-nudge.is-hidden {
  display: none;
}

.post-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.post-progress span {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 680;
}

.post-progress span.is-active {
  color: #fff;
  background: var(--text);
}

.post-readiness {
  margin: -1px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.post-readiness.is-ready {
  color: var(--brand-ink);
  font-weight: 600;
}

.post-status {
  margin: -3px 0 1px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.post-status[hidden] {
  display: none;
}

.post-status.is-success {
  color: var(--brand-ink);
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
}

.post-status.is-warning {
  color: #7b531c;
  background: #fff7df;
}

.post-status.is-error {
  color: #8d2d2a;
  background: #fff0ee;
  border-color: #f1bbb6;
}

.post-form label,
.post-form fieldset,
.profile-capture {
  display: grid;
  gap: 7px;
  margin: 0;
  border: 0;
  padding: 0;
}

.post-form label > span,
.post-form legend {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.post-form textarea {
  min-height: 92px;
  resize: vertical;
}

.post-form small {
  justify-self: end;
  color: var(--muted);
}

.form-hint {
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 680;
}

.post-map-picker {
  position: relative;
  display: block;
  min-height: 168px;
  height: clamp(168px, 44vw, 240px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 80%, #d9e1d7);
  cursor: grab;
  touch-action: none;
}

.post-map-picker.is-panning {
  cursor: grabbing;
}

.post-map-picker:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 72%, white);
  outline-offset: 2px;
}

.post-map-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 128%;
  height: 128%;
  transform: translate(calc(-11% + var(--post-map-pan-x, 0px)), calc(-14% + var(--post-map-pan-y, 0px))) scale(var(--post-map-zoom, 1.02));
  transform-origin: center;
  filter: saturate(0.58) contrast(1.02) brightness(1.06);
  will-change: transform;
}

.post-map-tiles img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-map-picker::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), color-mix(in srgb, var(--bg) 36%, transparent)),
    radial-gradient(circle at center, transparent 0 20%, color-mix(in srgb, var(--surface) 22%, transparent) 70%);
}

.post-map-pins {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: translate(var(--post-map-pan-x, 0px), var(--post-map-pan-y, 0px)) scale(var(--post-map-zoom, 1));
  transform-origin: center;
  will-change: transform;
}

.post-map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -100%);
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
}

.post-map-pin span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 2px solid color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: 999px 999px 999px 2px;
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(14, 35, 64, 0.16);
  transform: rotate(-45deg);
}

.post-map-pin span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
}

.post-map-pin.is-active span,
.post-map-pin.is-draft span {
  background: var(--accent);
}

.post-map-pin small {
  position: absolute;
  left: 50%;
  top: 28px;
  max-width: 104px;
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: 0 6px 16px rgba(14, 35, 64, 0.1);
  font-size: 10px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-map-target {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.post-map-target span {
  display: block;
  width: 32px;
  height: 32px;
  border: 2px solid color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: 999px 999px 999px 3px;
  background: var(--brand);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 26%, rgba(14, 35, 64, 0.2));
  transform: rotate(-45deg);
}

.post-map-target span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 7px;
  border: 2px solid var(--surface);
  border-top: 0;
  border-left: 0;
  transform: translate(-50%, -50%) rotate(20deg);
}

.post-map-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.post-map-actions button {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: 0 6px 16px rgba(14, 35, 64, 0.08);
  font-size: 11.5px;
  font-weight: 680;
}

.post-map-actions button:first-child {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  color: var(--surface);
  background: var(--brand);
}

.post-map-guide {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  margin: 0;
  border-radius: 999px;
  padding: 7px 9px;
  max-width: calc(100% - 20px);
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: 0 6px 16px rgba(14, 35, 64, 0.08);
  font-size: 11.5px;
  font-weight: 680;
}

.profile-capture {
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface-soft);
}

.profile-capture h3 {
  margin-bottom: 2px;
  font-size: 14px;
}

.profile-capture p {
  margin-bottom: 0;
  font-size: 11.5px;
}

.post-guideline {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-strong);
}

.post-guideline h3 {
  font-size: 13px;
}

.post-guideline ul {
  display: grid;
  gap: 5px;
  padding-left: 1.2em;
}

.post-guideline li,
.post-guideline a {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.post-guideline a {
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), color-mix(in srgb, var(--accent) 10%, transparent)),
    var(--surface);
  color: var(--muted);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.photo-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.photo-picker img {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-picker.has-photo img {
  display: block;
}

.photo-picker.has-photo span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.54);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control label {
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 700;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label:has(input:checked) {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.full-width {
  width: 100%;
}

.post-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.button-feather {
  width: 27px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.share-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 74%, var(--surface-strong));
  box-shadow: var(--shadow-soft);
}

.share-panel h3 {
  margin-bottom: 6px;
}

.share-url-notice {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.share-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.share-action-button span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--surface);
  background: var(--text);
  font-size: 10px;
  font-weight: 780;
}

.text-button.share-action-button span {
  color: var(--surface);
  background: var(--brand-ink);
}

.draft-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--brand-soft) 48%, var(--surface));
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.draft-notice[hidden] {
  display: none;
}

.draft-notice .text-button {
  flex: 0 0 auto;
}

.ranking-grid {
  display: grid;
  gap: 22px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-radius: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  background: var(--text);
  font-weight: 700;
}

.ranking-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ops-panel h3 {
  margin-bottom: 0;
}

.admin-queue-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-queue-panel h3 {
  margin-bottom: 0;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-summary-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-strong);
}

.admin-summary-card span,
.admin-summary-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-summary-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.ops-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ops-refresh-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.ops-checked-at {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ops-status-list {
  display: grid;
  gap: 8px;
}

.ops-status-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 30px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.ops-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.ops-status-item.is-warn .ops-status-dot {
  background: var(--accent);
}

.ops-status-item.is-missing .ops-status-dot {
  background: var(--danger);
}

.ops-status-item.is-missing .ops-status-value {
  color: var(--danger);
}

.ops-status-value {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ops-clear-button {
  justify-self: start;
  min-height: 32px;
  padding: 0;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.danger-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: var(--danger);
  font-weight: 700;
}

.detail-dialog,
.privacy-dialog {
  width: min(calc(100% - 28px), 420px);
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop,
.privacy-dialog::backdrop {
  background: rgba(24, 20, 16, 0.42);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.privacy-dialog {
  padding: 22px;
}

.privacy-dialog h2 {
  margin-bottom: 12px;
  padding-right: 42px;
}

.detail-hero {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.detail-body {
  padding: 16px;
}

.detail-body h3 {
  margin-bottom: 4px;
  font-size: 22px;
}

.detail-note {
  color: var(--text);
  font-size: 15px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 8px 10px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(232, 223, 210, 0.9);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 680;
}

.nav-item.is-active {
  color: var(--text);
}

.nav-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 78%, var(--text)));
  box-shadow: 0 10px 26px rgba(0, 194, 199, 0.22);
}

.nav-feather-icon {
  width: 34px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.menu-dialog {
  width: min(calc(100% - 32px), 360px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 22px 52px rgba(23, 35, 63, 0.16);
}

.menu-dialog::backdrop {
  background: rgba(23, 35, 63, 0.22);
}

.menu-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.menu-dialog-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 620;
}

.menu-close {
  width: 34px;
  min-height: 34px;
}

.menu-section {
  display: grid;
  gap: 4px;
  padding: 12px 18px 18px;
}

.menu-section + .menu-section {
  border-top: 1px solid var(--line);
}

.menu-label {
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-theme-button,
.menu-link-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.menu-theme-button.is-active,
.menu-link-button:hover,
.menu-theme-button:hover {
  background: var(--surface-soft);
}

.nav-primary.is-active {
  color: #fff;
}

.network-banner {
  position: fixed;
  left: 50%;
  bottom: 126px;
  z-index: 79;
  max-width: min(390px, calc(100% - 32px));
  transform: translate(-50%, 0);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--brand-ink);
  background: color-mix(in srgb, var(--brand-soft) 88%, var(--surface));
  box-shadow: 0 14px 32px rgba(32, 37, 46, 0.14);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 80;
  max-width: min(360px, calc(100% - 32px));
  transform: translate(-50%, 18px);
  border-radius: 999px;
  padding: 11px 14px;
  opacity: 0;
  color: #fff;
  background: color-mix(in srgb, var(--text) 94%, transparent);
  font-size: 13px;
  font-weight: 650;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .app-shell {
    width: min(100%, 1120px);
    padding-right: 28px;
    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);
  }

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

  #homeView {
    display: none;
    grid-template-columns: minmax(0, 1.08fr) 430px;
    grid-template-areas:
      "heading heading"
      "filters filters"
      "map timeline";
    gap: 18px 24px;
  }

  #homeView.is-active {
    display: grid;
  }

  #homeView .home-heading {
    grid-area: heading;
  }

  #homeView .search-panel {
    grid-area: filters;
  }

  #homeView .live-map {
    grid-area: map;
    height: 630px;
  }

  #homeView .section-title-row,
  #homeView .timeline-list {
    grid-column: 2;
  }

  #homeView .section-title-row {
    grid-row: 3;
    align-self: start;
    margin-top: 0;
  }

  #homeView .timeline-list {
    grid-row: 3;
    margin-top: 46px;
    max-height: 584px;
    overflow: auto;
    padding-right: 4px;
  }

  .timeline-list {
    align-content: start;
  }

  .bottom-nav {
    max-width: 520px;
    border-radius: 16px 16px 0 0;
  }
}

@supports not (color: color-mix(in srgb, white, black)) {
  body {
    background: #f8fbfb;
  }

  .app-shell,
  .topbar,
  .bottom-nav {
    background: #ffffff;
  }
}

@media (max-width: 520px) {
  .theme-swatches {
    display: none;
  }

  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .view-header {
    align-items: flex-start;
  }

  .auth-nudge .text-button,
  .draft-notice .text-button {
    min-height: 30px;
  }

  .post-progress {
    gap: 6px;
  }

  .post-progress span {
    min-height: 30px;
    font-size: 11.5px;
  }

  .photo-picker {
    min-height: 188px;
  }

  .post-map-picker {
    height: 196px;
  }

  .post-map-actions {
    left: 10px;
  }

  .post-map-actions button {
    flex: 1 1 78px;
    padding: 0 8px;
  }

  .post-map-guide {
    right: 10px;
    border-radius: 8px;
    font-size: 11px;
    white-space: normal;
  }

  .profile-grid,
  .segmented-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .share-action-button {
    width: 100%;
  }
}
