:root {
  --paper: #f7f1e7;
  --paper-deep: #eee1cf;
  --card: #fffaf1;
  --ink: #2e241b;
  --ink-soft: #59493b;
  --muted: #94816d;
  --line: rgba(76, 56, 38, 0.13);
  --line-strong: rgba(76, 56, 38, 0.22);
  --red: #d94f2b;
  --red-dark: #b23a1b;
  --red-soft: #f8dfd6;
  --gold: #e4a13b;
  --green: #5b7c5e;
  --shadow-sm: 0 3px 14px rgba(64, 41, 22, 0.07);
  --shadow-md: 0 14px 44px rgba(64, 41, 22, 0.14);
  --shadow-lg: 0 28px 80px rgba(46, 29, 15, 0.24);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection { background: #f2b7a4; color: #3a1c11; }

.app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ---------------------------------- sidebar --------------------------------- */

.sidebar {
  position: relative;
  z-index: 700;
  display: flex;
  flex-direction: column;
  flex: 0 0 412px;
  width: 412px;
  height: 100dvh;
  padding: 24px 26px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 252, 244, 0.9), transparent 38%),
    radial-gradient(circle at 92% 46%, rgba(229, 189, 143, 0.14), transparent 36%),
    linear-gradient(160deg, #f8f2e8 0%, #f3eadc 100%);
  border-right: 1px solid rgba(84, 60, 38, 0.12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.sidebar > * { position: relative; z-index: 1; }

.sheet-handle { display: none; }

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px 12px 12px 4px;
  background: var(--red);
  color: #fff8ec;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(178, 58, 27, 0.24);
  transform: rotate(-2deg);
}

.brand-mark.small { width: 36px; height: 36px; font-size: 20px; border-radius: 10px 10px 10px 3px; }

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.brand-name.small { font-size: 16px; }

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(91, 124, 94, 0.2);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.66);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.online-pill.compact { margin-top: 5px; padding: 3px 8px; font-size: 9px; background: rgba(255, 250, 241, 0.8); }

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #63a168;
  box-shadow: 0 0 0 3px rgba(99, 161, 104, 0.13);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(99, 161, 104, 0.45);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.65); opacity: 0.8; }
  80%, 100% { transform: scale(1.65); opacity: 0; }
}

.hero-copy { margin-bottom: 22px; }

.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 2.45vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.brush {
  position: relative;
  display: inline-block;
  color: var(--red);
  margin: 0 1px;
  transform: rotate(-2deg);
}

.brush::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4px;
  right: -4px;
  bottom: 2px;
  height: 9px;
  border-radius: 50%;
  background: rgba(217, 79, 43, 0.14);
  transform: rotate(-1.5deg);
}

.hero-copy p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.85;
}

/* ---------------------------------- search --------------------------------- */

.search-section { position: relative; z-index: 40; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 13px;
  border: 1px solid rgba(91, 66, 43, 0.16);
  border-radius: 15px;
  background: rgba(255, 251, 243, 0.92);
  box-shadow: 0 8px 24px rgba(64, 41, 22, 0.07), inset 0 1px 0 #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-box:focus-within {
  border-color: rgba(217, 79, 43, 0.48);
  box-shadow: 0 10px 28px rgba(178, 58, 27, 0.13), 0 0 0 3px rgba(217, 79, 43, 0.09);
  transform: translateY(-1px);
}

.search-box:has(.search-clear:not([hidden])) kbd { display: none; }

.icon-search {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.5px;
}

.search-box input::placeholder { color: #a89581; }
.search-box input::-webkit-search-cancel-button { display: none; }

.search-box kbd {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3e9db;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eadfce;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
}

.search-panel {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-height: min(430px, 55vh);
  overflow: hidden;
  border: 1px solid rgba(91, 66, 43, 0.14);
  border-radius: 16px;
  background: rgba(255, 251, 243, 0.98);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  animation: panelIn 0.18s ease both;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-panel-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  background: linear-gradient(#fffbf3 72%, rgba(255, 251, 243, 0));
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-source { color: #a89581; font-weight: 500; letter-spacing: 0.02em; }

.search-results {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 7px 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 84, 58, 0.18) transparent;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(109, 84, 58, 0.18); }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  border-radius: 11px;
  text-align: left;
  transition: background 0.14s ease;
}

.search-result:hover, .search-result.active { background: #f7ecdd; }

.search-result .result-emoji {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--tint, #f3dfd2);
  font-size: 18px;
}

.search-result .result-main { flex: 1; min-width: 0; }
.search-result b { display: block; overflow: hidden; font-size: 12.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.result-badge {
  flex: none;
  padding: 3px 6px;
  border-radius: 5px;
  background: #e9f0e7;
  color: var(--green);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.result-badge.new { background: #fbebdc; color: #b66a27; }

.search-loading { padding: 14px; color: var(--muted); font-size: 11px; text-align: center; }
.search-loading::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border: 1.5px solid #d8c6b2;
  border-top-color: var(--red);
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

.search-loading-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px 7px;
  color: #a89581;
  font-size: 9px;
}
.search-loading-more::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid #ddcbb9;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.search-empty {
  padding: 22px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.search-empty b { display: block; margin-bottom: 3px; color: var(--ink-soft); font-size: 12px; }

.pick-map-row {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 14px);
  margin: 0 7px 7px;
  padding: 11px 10px;
  border-top: 1px dashed var(--line-strong);
  background: rgba(255, 251, 243, 0.96);
  text-align: left;
}

.pick-map-row:hover { background: #f7ecdd; border-radius: 11px; }
.pick-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px dashed #c9ae91; border-radius: 50%; color: var(--red); font-size: 18px; }
.pick-map-row span:nth-child(2) { flex: 1; }
.pick-map-row b { display: block; font-size: 11.5px; }
.pick-map-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.arrow { color: var(--red); font-size: 15px; }

.quick-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar { display: none; }

.quick-chips button {
  flex: none;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, 0.5);
  color: var(--ink-soft);
  font-size: 10px;
  transition: all 0.16s ease;
}

.quick-chips button:hover { border-color: rgba(217, 79, 43, 0.35); background: #fffaf2; color: var(--red); }

/* ---------------------------------- stats ---------------------------------- */

.stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 16px;
  padding: 13px 6px;
  border: 1px solid rgba(91, 66, 43, 0.1);
  border-radius: 15px;
  background:
    linear-gradient(120deg, rgba(255, 252, 245, 0.9), rgba(241, 228, 209, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.stats-card > div { position: relative; text-align: center; }
.stats-card > div + div::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: var(--line);
}
.stats-card strong { display: block; font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.1; }
.stats-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; letter-spacing: 0.03em; }

/* -------------------------------- filters/tabs ------------------------------ */

.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
  transition: all 0.16s ease;
}

.filter-chip:hover { color: var(--ink); background: rgba(255, 250, 241, 0.7); }
.filter-chip.active { background: var(--ink); color: #fff9ef; box-shadow: 0 4px 10px rgba(46, 36, 27, 0.18); }
.filter-chip .count { opacity: 0.52; font-size: 8.5px; }

.tabs {
  display: flex;
  gap: 18px;
  flex: none;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 8px 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.16s ease;
}

.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: -1px;
  left: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

/* ----------------------------------- feed ---------------------------------- */

.feed-scroll {
  flex: 1;
  min-height: 0;
  margin: 0 -7px;
  padding: 11px 7px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 84, 58, 0.2) transparent;
}

.feed-scroll::-webkit-scrollbar { width: 5px; }
.feed-scroll::-webkit-scrollbar-thumb { border-radius: 9px; background: rgba(109, 84, 58, 0.18); }
.feed-scroll::-webkit-scrollbar-track { background: transparent; }

.feed { display: flex; flex-direction: column; gap: 9px; }

.feed-card {
  position: relative;
  padding: 12px 13px 11px;
  border: 1px solid rgba(93, 67, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 251, 244, 0.68);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.55) inset;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.feed-card:hover {
  background: #fffaf2;
  box-shadow: 0 10px 24px rgba(64, 41, 22, 0.09);
  transform: translateY(-2px);
}

.feed-head { display: flex; align-items: center; gap: 8px; }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: var(--av-bg, #f1ddc8);
  font-size: 15px;
  box-shadow: 0 2px 7px rgba(72, 46, 24, 0.1);
}

.feed-person { flex: 1; min-width: 0; line-height: 1.2; }
.feed-person b { display: block; overflow: hidden; font-size: 11.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.feed-person span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.feed-rating { flex: none; color: var(--gold); font-size: 10px; font-weight: 700; }
.feed-rating small { color: var(--muted); font-size: 8px; font-weight: 500; }

.feed-place {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--red-dark);
  font-size: 10.5px;
  font-weight: 650;
}

.feed-place .place-emoji { font-size: 12px; }
.feed-place .place-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-place .arrow { margin-left: auto; font-size: 12px; opacity: 0.6; transition: transform 0.18s ease; }
.feed-card:hover .feed-place .arrow { transform: translateX(3px); }

.feed-note {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.feed-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.dish-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 60%;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 5px;
  background: #f5e7d6;
  color: #95623a;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  transition: all 0.15s ease;
}

.like-btn .flame { font-size: 11px; filter: grayscale(0.2); }
.like-btn:hover { background: #f8e5da; color: var(--red); }
.like-btn.liked { background: #fbe3d8; color: var(--red); }
.like-btn.liked .flame { filter: none; }

.rank-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(93, 67, 42, 0.1);
  border-radius: 13px;
  background: rgba(255, 251, 244, 0.68);
  cursor: pointer;
  transition: all 0.18s ease;
}

.rank-card:hover { background: #fffaf2; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rank-num { flex: none; width: 21px; color: #b5a18d; font-family: var(--serif); font-size: 16px; font-weight: 700; font-style: italic; text-align: center; }
.rank-card:nth-child(1) .rank-num { color: #c08a2c; font-size: 20px; }
.rank-card:nth-child(2) .rank-num { color: #8a8a8a; font-size: 18px; }
.rank-card:nth-child(3) .rank-num { color: #a97247; font-size: 18px; }
.rank-emoji { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--tint, #f1dfcc); font-size: 17px; }
.rank-main { flex: 1; min-width: 0; }
.rank-main b { display: block; overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.rank-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.rank-score { flex: none; text-align: right; }
.rank-score b { display: block; color: var(--red); font-family: var(--serif); font-size: 17px; line-height: 1; }
.rank-score .stars { margin-top: 4px; font-size: 7px; }

.stars { display: inline-flex; gap: 1px; line-height: 1; }
.stars i { color: #dccbb8; font-style: normal; font-size: 10px; }
.stars i.on { color: var(--gold); }

.empty-state {
  padding: 34px 20px;
  border: 1px dashed rgba(93, 67, 42, 0.18);
  border-radius: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
  text-align: center;
}

.empty-state .empty-emoji { display: block; margin-bottom: 8px; font-size: 28px; filter: grayscale(0.1); }
.empty-state b { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 12.5px; }

.credits {
  margin-top: 18px;
  padding: 14px 4px 0;
  border-top: 1px solid var(--line);
  color: #aa9783;
  font-size: 8.5px;
  line-height: 1.8;
  text-align: center;
}

.credits a { text-decoration-color: rgba(170, 151, 131, 0.5); text-underline-offset: 2px; }

/* ----------------------------------- map ----------------------------------- */

.map-shell {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
  background: #e8ddcc;
}

#map { position: absolute; inset: 0; z-index: 1; background: #e7dece; }

.leaflet-tile-pane { filter: saturate(0.64) contrast(0.94) brightness(1.055) sepia(0.08); }
.leaflet-container.picking { cursor: crosshair !important; }
.leaflet-container.picking .leaflet-interactive { cursor: crosshair !important; }
.leaflet-control-attribution {
  padding: 2px 6px !important;
  border-radius: 4px 0 0 0;
  background: rgba(255, 250, 241, 0.7) !important;
  color: #8e7d6b !important;
  font-size: 8px !important;
  backdrop-filter: blur(4px);
}
.leaflet-control-attribution a { color: #756351 !important; }
.leaflet-bottom.leaflet-right { bottom: 4px; right: 4px; }
.leaflet-control-zoom {
  margin-right: 18px !important;
  margin-bottom: 54px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(59, 38, 20, 0.16) !important;
}
.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  border-color: rgba(76, 56, 38, 0.1) !important;
  background: rgba(255, 251, 243, 0.94) !important;
  color: var(--ink-soft) !important;
  font: 18px/34px var(--sans) !important;
  backdrop-filter: blur(8px);
}
.leaflet-control-zoom a:hover { background: #fff !important; color: var(--red) !important; }
.leaflet-control-scale { margin-bottom: 22px !important; margin-left: 18px !important; }
.leaflet-control-scale-line {
  border-color: rgba(80, 58, 37, 0.32) !important;
  border-top: 0 !important;
  background: rgba(255, 250, 241, 0.5) !important;
  color: #7e6c59 !important;
  font-size: 8px !important;
}

.map-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 48%, rgba(73, 48, 25, 0.08) 100%),
    linear-gradient(to bottom, rgba(255, 248, 235, 0.09), transparent 18%);
  mix-blend-mode: multiply;
}

.map-topbar {
  position: absolute;
  z-index: 500;
  top: 17px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.map-topbar > * { pointer-events: auto; }

.mobile-brand { display: none; align-items: center; gap: 9px; }

.map-location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(76, 56, 38, 0.11);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.82);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
}

.location-pin { color: var(--red); font-size: 13px; }

.map-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }

.map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 11px;
  border: 1px solid rgba(76, 56, 38, 0.11);
  border-radius: 11px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 5px 18px rgba(62, 40, 22, 0.1);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  transition: all 0.17s ease;
}

.map-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.map-btn:hover { background: #fffdf8; color: var(--red); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(62, 40, 22, 0.15); }
.map-btn.avatar-btn { width: 38px; padding: 0; border-radius: 50%; font-size: 17px; background: #fffaf1; }
.map-btn.avatar-btn:hover { transform: translateY(-1px) rotate(-4deg); }
.map-btn.pick-btn { display: none; }
.map-btn.pick-btn .plus { color: var(--red); font-size: 16px; line-height: 1; }

.map-bottom {
  position: absolute;
  z-index: 500;
  right: 20px;
  bottom: 25px;
  left: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.map-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding: 9px 13px;
  border: 1px solid rgba(76, 56, 38, 0.12);
  border-radius: 11px;
  background: rgba(255, 250, 241, 0.84);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
  font-size: 9.5px;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.tip-kicker {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--red);
  color: #fff8ec;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.map-tip button { color: var(--red); font-size: 9.5px; font-weight: 650; white-space: nowrap; }
.map-tip button:hover { text-decoration: underline; text-underline-offset: 2px; }

.map-caption {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(46, 36, 27, 0.7);
  color: #fff6e9;
  font-family: var(--serif);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.map-watermark {
  position: absolute;
  z-index: 450;
  right: 10px;
  bottom: 155px;
  color: rgba(70, 50, 31, 0.4);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.34em;
  writing-mode: vertical-rl;
  pointer-events: none;
}

/* -------------------------------- map markers ------------------------------- */

.leaflet-marker-icon.food-marker { background: transparent; border: 0; }

.food-cluster-wrap { background: transparent; border: 0; }

.food-cluster {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  width: 48px;
  height: 48px;
  padding-top: 12px;
  border: 3px solid #fff9ee;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e9764f, #c2401f 70%);
  box-shadow: 0 8px 20px rgba(154, 52, 22, 0.32), inset 0 -5px 10px rgba(88, 23, 5, 0.16);
  color: #fff8ec;
  font-family: var(--serif);
  transition: transform 0.17s ease;
  transform-origin: 50% 50%;
}

.food-cluster::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(194, 64, 31, 0.35);
  border-radius: 50%;
  animation: clusterPulse 2.2s ease-out infinite;
}

@keyframes clusterPulse {
  0% { transform: scale(0.82); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.food-cluster span { font-size: 17px; font-weight: 700; line-height: 1; }
.food-cluster small { font-family: var(--sans); font-size: 7px; opacity: 0.75; }
.food-cluster:hover { transform: scale(1.08); }

.food-pin {
  position: relative;
  width: 44px;
  height: 50px;
  cursor: pointer;
  filter: drop-shadow(0 7px 7px rgba(58, 35, 17, 0.22));
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1.4);
  transform-origin: 50% 100%;
}

.food-pin:hover, .food-pin.active { transform: translateY(-4px) scale(1.1); z-index: 10; }
.food-pin.active { filter: drop-shadow(0 11px 10px rgba(58, 35, 17, 0.3)); }

.pin-body {
  position: absolute;
  top: 2px;
  left: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 3px solid #fffaf1;
  border-radius: 50% 50% 50% 5px;
  background: var(--pin);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.12);
  transform: rotate(-45deg);
}

.pin-body::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: inherit;
}

.pin-emoji { display: block; font-size: 17px; line-height: 1; transform: rotate(45deg); }

.pin-count {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fffaf1;
  border-radius: 999px;
  background: var(--ink);
  color: #fff7eb;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.food-pin.active .pin-body { background: var(--red); }
.food-pin.active::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 9px;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(217, 79, 43, 0.4);
  border-radius: 50%;
  animation: markerPulse 1.7s ease-out infinite;
}

@keyframes markerPulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(2.1); opacity: 0; }
}

.spot-tooltip {
  padding: 6px 9px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: rgba(46, 36, 27, 0.9) !important;
  box-shadow: 0 7px 18px rgba(46, 36, 27, 0.2) !important;
  color: #fff8ec !important;
  font-family: var(--sans) !important;
  font-size: 9.5px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}
.spot-tooltip::before { border-top-color: rgba(46, 36, 27, 0.9) !important; }

.user-dot {
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #3178d6;
  box-shadow: 0 0 0 6px rgba(49, 120, 214, 0.18), 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* --------------------------------- drawer ---------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(44, 30, 17, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(3px);
}

.drawer {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  box-shadow: -24px 0 80px rgba(50, 31, 14, 0.22);
  transform: translateX(105%);
  transition: transform 0.34s cubic-bezier(0.22, 0.8, 0.26, 1);
}

.drawer.open { transform: translateX(0); }

.drawer-cover {
  position: relative;
  flex: none;
  min-height: 212px;
  padding: 22px 24px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.24), transparent 38%),
    linear-gradient(140deg, var(--cat, #d94f2b), var(--cat-dark, #9e321a));
  color: #fff9ef;
}

.cover-emoji {
  position: absolute;
  top: -28px;
  right: -6px;
  font-size: 138px;
  line-height: 1;
  opacity: 0.2;
  transform: rotate(-9deg);
  filter: saturate(0.7);
}

.cover-grain {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.drawer-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(46, 25, 12, 0.16);
  color: #fff9ef;
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease;
}
.drawer-close:hover { background: rgba(46, 25, 12, 0.3); }

.drawer-cover-content { position: absolute; right: 24px; bottom: 19px; left: 24px; z-index: 2; }

.category-badge {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(46, 25, 12, 0.14);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  backdrop-filter: blur(5px);
}

.drawer-cover h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(52, 24, 10, 0.22);
}

.drawer-address {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 6px 0 0;
  overflow: hidden;
  color: rgba(255, 249, 239, 0.78);
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drawer-address::before { content: "⌖"; flex: none; }

.drawer-scroll {
  flex: 1;
  min-height: 0;
  padding: 18px 22px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rating-block { display: flex; align-items: center; gap: 9px; }
.rating-block > strong { color: var(--red); font-family: var(--serif); font-size: 34px; line-height: 1; }
.rating-block small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.rating-block .stars i { font-size: 10px; }

.drawer-tools { display: flex; gap: 5px; }

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffaf2;
  color: var(--ink-soft);
  font-size: 9px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.tool-btn:hover { border-color: rgba(217, 79, 43, 0.3); color: var(--red); }

.drawer-blurb {
  margin: 13px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(228, 161, 59, 0.08);
  color: #7b6042;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.65;
}

.drawer-cta { display: flex; gap: 7px; margin-top: 15px; }

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--red);
  box-shadow: 0 7px 18px rgba(178, 58, 27, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff9ef;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
  transition: all 0.17s ease;
}
.primary-btn:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(178, 58, 27, 0.28); }
.primary-btn:active { transform: translateY(0); }
.primary-btn span { font-size: 15px; font-weight: 400; }
.drawer-cta .primary-btn { flex: 1; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 250, 242, 0.7);
  color: var(--ink-soft);
  font-size: 10px;
  transition: all 0.16s ease;
}
.ghost-btn:hover { border-color: rgba(217, 79, 43, 0.35); color: var(--red); background: #fffaf2; }

.checkin-form {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid rgba(93, 67, 42, 0.13);
  border-radius: 15px;
  background: #f1e6d6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: formIn 0.25s ease both;
}

@keyframes formIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.form-title b { font-family: var(--serif); font-size: 14px; }
.form-title button { color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }

.draft-fields { display: grid; grid-template-columns: 1fr 104px; gap: 7px; margin-bottom: 10px; }

.field { display: block; margin-bottom: 9px; }
.field > span { display: flex; align-items: center; gap: 4px; margin-bottom: 5px; color: #7c664f; font-size: 9.5px; font-weight: 600; }
.field > span small { color: #b09b85; font-size: 8px; font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(93, 67, 42, 0.16);
  border-radius: 8px;
  outline: 0;
  background: #fffaf2;
  font-size: 10.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(217, 79, 43, 0.5); box-shadow: 0 0 0 3px rgba(217, 79, 43, 0.08); }
.field textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #b5a28e; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8b735b 50%), linear-gradient(135deg, #8b735b 50%, transparent 50%); background-position: calc(100% - 12px) 51%, calc(100% - 8px) 51%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }

.rating-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.star-picker { display: flex; gap: 2px; }
.star-picker button { padding: 0; color: #d8c4ae; font-size: 24px; line-height: 1; transition: transform 0.12s ease, color 0.12s ease; }
.star-picker button:hover { transform: scale(1.14); }
.star-picker button.on { color: var(--gold); }
.star-hint { color: var(--muted); font-size: 9px; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.tag-picker button { padding: 4px 7px; border: 1px solid rgba(93, 67, 42, 0.14); border-radius: 5px; background: rgba(255, 250, 242, 0.6); color: #8c755e; font-size: 8.5px; transition: all 0.14s ease; }
.tag-picker button:hover { border-color: rgba(217, 79, 43, 0.3); color: var(--red); }
.tag-picker button.on { border-color: var(--red); background: var(--red); color: #fff8ec; }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.date-field { display: flex; align-items: center; gap: 5px; color: #8c755e; font-size: 8.5px; }
.date-field input { padding: 5px 6px; border: 1px solid rgba(93, 67, 42, 0.14); border-radius: 6px; background: #fffaf2; color: var(--ink-soft); font-size: 9px; }
.primary-btn.small { height: 36px; padding: 0 14px; font-size: 10px; box-shadow: 0 5px 13px rgba(178, 58, 27, 0.2); }

.drawer-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 6px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.drawer-section-head h3 { margin: 0; font-family: var(--serif); font-size: 14px; }
.drawer-section-head span { color: var(--muted); font-size: 8.5px; }

.drawer-checkins { display: flex; flex-direction: column; }
.dcheckin { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.dcheckin:last-child { border-bottom: 0; }
.dcheckin-head { display: flex; align-items: center; gap: 7px; }
.dcheckin-head .avatar { width: 29px; height: 29px; font-size: 14px; }
.dcheckin-head .role-avatar { width: 29px; height: 29px; font-size: 9px; }
.dcheckin-person { flex: 1; min-width: 0; }
.dcheckin-person b { display: block; font-size: 10.5px; font-weight: 650; }
.dcheckin-person span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.dcheckin-rating { flex: none; text-align: right; }
.dcheckin-rating .stars { font-size: 8px; }
.dcheckin-rating small { display: block; margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.dcheckin-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.dcheckin-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dcheckin-tags span { padding: 2px 6px; border-radius: 4px; background: #f3e6d5; color: #9c7249; font-size: 7.5px; }
.dcheckin-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.dcheckin-dish { color: #9a6a3e; font-size: 8.5px; }
.dcheckin-foot .like-btn { margin-left: auto; }
.dcheckin-delete {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border: 1px solid rgba(217, 79, 43, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.8);
  color: var(--red);
  font-size: 8px;
}
.dcheckin-delete::before { content: "×"; font-size: 11px; line-height: 0.7; }
.dcheckin-delete:hover { border-color: var(--red); background: var(--red-soft); }

.no-checkins { padding: 26px 15px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 10px; line-height: 1.8; text-align: center; }
.no-checkins b { display: block; margin-bottom: 2px; color: var(--ink-soft); font-size: 11px; }

/* ---------------------------------- modals --------------------------------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(44, 30, 17, 0.44);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.welcome-card, .modal-card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100dvh - 40px);
  padding: 34px 34px 28px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(228, 161, 59, 0.13), transparent 36%),
    linear-gradient(155deg, #fbf5eb, #f2e6d5);
  box-shadow: 0 34px 100px rgba(44, 26, 10, 0.32);
  animation: modalIn 0.32s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-deco { position: absolute; top: 24px; right: 24px; font-size: 38px; opacity: 0.18; transform: rotate(9deg); pointer-events: none; }
.welcome-deco span { position: absolute; font-size: 22px; }
.welcome-deco span:nth-child(1) { top: 26px; left: -35px; transform: rotate(-15deg); }
.welcome-deco span:nth-child(2) { top: 58px; left: -11px; font-size: 18px; transform: rotate(8deg); }
.welcome-deco span:nth-child(3) { top: -13px; left: -15px; font-size: 16px; }
.welcome-deco span:nth-child(4) { top: 61px; left: -42px; font-size: 16px; }

.welcome-kicker, .modal-kicker { color: var(--red); font-size: 8.5px; font-weight: 700; letter-spacing: 0.22em; }

.welcome-card h2, .modal-card h2 {
  margin: 11px 0 0;
  font-family: var(--serif);
  font-size: 37px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.01em;
}

.welcome-card h2 em, .modal-card h2 em { color: var(--red); font-style: normal; }

/* Fixed ten-role picker */
.role-card {
  width: min(602px, 100%);
  padding: 30px 30px 24px;
}

.role-card h2 { font-size: 34px; margin-top: 8px; }
.role-card > p { margin: 10px 0 0; max-width: 490px; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 12px;
}

.role-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 10px 4px 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--role-tint);
  color: var(--ink);
  transition: transform 0.17s ease, box-shadow 0.17s ease, border-color 0.17s ease, opacity 0.17s ease;
}

.role-tile:hover:not(:disabled) {
  border-color: var(--role);
  box-shadow: 0 9px 20px rgba(64, 41, 22, 0.13);
  transform: translateY(-3px);
}

.role-tile:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.25);
}

.role-tile.mine {
  border-color: var(--role);
  background: #fffaf2;
  box-shadow: 0 0 0 3px rgba(217, 79, 43, 0.09);
}

.role-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: var(--role);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.12), 0 4px 9px rgba(64, 41, 22, 0.13);
  color: var(--role-text);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.role-name { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.role-state { color: var(--muted); font-size: 7.5px; }
.role-tile.mine .role-state { color: var(--red); font-weight: 700; }

.role-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 8.5px;
}
.role-legend b { color: var(--ink-soft); font-family: var(--serif); font-size: 11px; }
.role-legend > span:last-child { margin-left: auto; }
.legend-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8402a, #d9ad3c, #5e8a58, #4a66a4, #7c5a9c);
  vertical-align: -1px;
}

.role-browse {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 5px;
  color: var(--muted);
  font-size: 9px;
  text-decoration: underline;
  text-decoration-color: rgba(148, 129, 109, 0.4);
  text-underline-offset: 3px;
}
.role-browse:hover { color: var(--red); }
.role-empty { grid-column: 1 / -1; padding: 30px 10px; color: var(--muted); font-size: 10px; text-align: center; }

.role-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 31px;
  height: 31px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: var(--role);
  box-shadow: inset 0 -3px 7px rgba(0, 0, 0, 0.14), 0 3px 8px rgba(64, 41, 22, 0.12);
  color: var(--role-text);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.role-avatar.sm { width: 29px; height: 29px; font-size: 9px; }
.role-avatar.lg { width: 54px; height: 54px; border-width: 3px; font-size: 16px; }

.profile-role {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.profile-role-main { flex: 1; min-width: 0; }
.profile-role-main b { display: block; font-family: var(--serif); font-size: 18px; }
.profile-role-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.profile-role-check { color: var(--green); font-size: 9px; font-weight: 600; }


.welcome-card > p, .modal-card > p {
  margin: 13px 0 20px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
}

.welcome-input-row { display: flex; align-items: center; gap: 9px; }
.avatar-pick {
  display: grid;
  place-items: center;
  flex: none;
  width: 49px;
  height: 49px;
  border: 1px solid rgba(93, 67, 42, 0.15);
  border-radius: 50%;
  background: #fffaf2;
  font-size: 23px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease;
}
.avatar-pick:hover { transform: rotate(-8deg) scale(1.05); }

.welcome-input-row input {
  flex: 1;
  min-width: 0;
  height: 49px;
  padding: 0 13px;
  border: 1px solid rgba(93, 67, 42, 0.16);
  border-radius: 11px;
  outline: 0;
  background: #fffaf2;
  font-size: 13px;
}
.welcome-input-row input:focus { border-color: rgba(217, 79, 43, 0.5); box-shadow: 0 0 0 3px rgba(217, 79, 43, 0.08); }

.name-suggestions { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 18px; }
.name-suggestions button { padding: 5px 8px; border: 1px dashed rgba(93, 67, 42, 0.22); border-radius: 5px; color: #8e755c; font-size: 9px; transition: all 0.15s ease; }
.name-suggestions button:hover { border-style: solid; border-color: var(--red); color: var(--red); background: #fffaf2; }

.primary-btn.wide { width: 100%; }
.welcome-note { display: block; margin-top: 14px; color: #a28d76; font-size: 8px; line-height: 1.7; text-align: center; }

.modal-card { width: min(410px, 100%); padding: 30px; }
.modal-close { position: absolute; top: 15px; right: 15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(93, 67, 42, 0.08); color: var(--ink-soft); font-size: 19px; line-height: 1; }
.modal-close:hover { background: rgba(93, 67, 42, 0.15); }
.modal-card h2 { font-size: 28px; }

.share-card { width: min(650px, 100%); }
.share-body { display: flex; align-items: center; gap: 24px; }
.qr-wrap { flex: none; padding: 11px 11px 8px; border: 1px solid var(--line); border-radius: 13px; background: #fffdf8; text-align: center; box-shadow: var(--shadow-sm); }
.qr-wrap #qrcode { display: grid; place-items: center; width: 170px; height: 170px; }
.qr-wrap #qrcode img, .qr-wrap #qrcode canvas { display: block; width: 170px !important; height: 170px !important; }
.qr-wrap small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: 0.08em; }
.share-info { flex: 1; min-width: 0; }
.share-link { display: block; margin-bottom: 12px; }
.share-link span { display: block; margin-bottom: 5px; color: #7c664f; font-size: 9px; font-weight: 600; }
.share-link input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #fffaf2; color: var(--ink-soft); font-size: 9.5px; }
.share-hint { display: block; margin-top: 10px; color: #a28d76; font-size: 8.5px; line-height: 1.6; text-align: center; }
#nativeShareBtn { margin-top: 7px; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 16px; }
.avatar-picker button { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 50%; background: #fffaf2; font-size: 17px; transition: all 0.15s ease; }
.avatar-picker button:hover { transform: translateY(-2px); }
.avatar-picker button.on { border-color: var(--red); box-shadow: 0 0 0 2px rgba(217, 79, 43, 0.14); background: #fcebe3; }
.profile-stat { display: block; margin-top: 12px; color: var(--muted); font-size: 8.5px; text-align: center; }

/* ---------------------------------- toast ---------------------------------- */

.toast {
  position: fixed;
  z-index: 1500;
  left: 50%;
  bottom: 28px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(46, 36, 27, 0.94);
  box-shadow: 0 12px 32px rgba(46, 36, 27, 0.25);
  color: #fff8ec;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------- confetti --------------------------------- */

.confetti { position: fixed; inset: 0; z-index: 1600; overflow: hidden; pointer-events: none; }
.confetti span {
  position: absolute;
  top: 45%;
  left: 50%;
  font-size: 16px;
  animation: confettiBurst 1s cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}

@keyframes confettiBurst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1) rotate(var(--rot)); }
}

/* -------------------------------- responsive -------------------------------- */

@media (max-width: 1120px) {
  .sidebar { flex-basis: 372px; width: 372px; padding-right: 22px; padding-left: 22px; }
  .hero-copy h1 { font-size: 30px; }
}

@media (max-width: 860px) {
  .app { display: block; height: 100dvh; }
  .map-shell { height: 100dvh; }

  .sidebar {
    position: fixed;
    z-index: 800;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: 58dvh;
    padding: 5px 14px calc(8px + env(safe-area-inset-bottom));
    border: 1px solid rgba(84, 60, 38, 0.12);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 50px rgba(54, 33, 15, 0.16);
    transition: height 0.3s cubic-bezier(0.22, 0.8, 0.26, 1);
  }

  .sidebar.collapsed { height: 120px; }
  .sidebar.collapsed .filter-row,
  .sidebar.collapsed .tabs,
  .sidebar.collapsed .feed-scroll { display: none; }

  .sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 100%;
    height: 21px;
    padding: 0;
  }
  .sheet-handle span { width: 38px; height: 4px; border-radius: 999px; background: #cdbba7; }

  .brand-row, .hero-copy, .stats-card { display: none; }
  .quick-chips { display: none; }
  .search-section { flex: none; }
  .search-box { height: 46px; border-radius: 12px; }
  .search-box kbd { display: none; }
  .search-panel { top: 52px; max-height: 38dvh; }
  .filter-row { flex: none; margin: 8px 0 5px; }
  .tabs { flex: none; gap: 20px; }
  .tab { padding: 6px 0 8px; font-size: 11px; }
  .feed-scroll { padding-top: 8px; }
  .feed { gap: 7px; }
  .feed-card { padding: 10px 11px; border-radius: 12px; }
  .credits { margin-top: 12px; padding-top: 10px; }
  .filter-row {
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    padding-right: 22px;
  }

  .map-topbar { top: 10px; right: 11px; left: 11px; align-items: center; }
  .mobile-brand { display: flex; padding: 7px 10px 7px 7px; border: 1px solid rgba(76, 56, 38, 0.1); border-radius: 13px; background: rgba(255, 250, 241, 0.9); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
  .map-location { display: none; }
  .map-actions { gap: 6px; }
  .map-btn { height: 36px; min-width: 36px; padding: 0 9px; border-radius: 10px; }
  .map-btn.share-btn span { display: none; }
  .map-btn.avatar-btn { width: 36px; height: 36px; }
  .map-btn.pick-btn { display: inline-flex; padding: 0 9px; color: var(--red); }
  .map-btn.pick-btn span:last-child { font-size: 10px; }
  .map-bottom { display: none; }
  .map-watermark { display: none; }
  .leaflet-control-zoom { display: none; }
  .leaflet-control-attribution { font-size: 7px !important; }
  .leaflet-control-scale { display: none; }

  .drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 92dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
  }
  .drawer.open { transform: translateY(0); }
  .drawer-cover { min-height: 188px; padding: 18px 20px; }
  .drawer-cover-content { right: 20px; bottom: 16px; left: 20px; }
  .drawer-cover h2 { font-size: 22px; }
  .drawer-scroll { padding: 15px 20px calc(34px + env(safe-area-inset-bottom)); }
  .drawer-backdrop.show { opacity: 1; pointer-events: auto; }

  .toast { top: 82px; bottom: auto; }
  body.drawer-open .toast { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .modal-layer { padding: 14px; }
  .welcome-card { padding: 28px 24px 24px; border-radius: 20px; }
  .welcome-card h2 { font-size: 32px; }
  .welcome-deco { display: none; }
  .role-card { padding: 24px 16px 20px; }
  .role-card h2 { font-size: 30px; }
  .role-card > p { font-size: 10.5px; line-height: 1.7; }
  .role-grid { gap: 5px; margin: 14px 0 10px; }
  .role-tile { gap: 4px; padding: 8px 2px 7px; border-radius: 11px; }
  .role-number { width: 32px; height: 32px; font-size: 11px; border-width: 1.5px; }
  .role-name { font-size: 9px; }
  .role-state { font-size: 7px; }
  .role-legend { gap: 9px; font-size: 7.5px; }
  .profile-role { padding: 12px; }
  .profile-role-main b { font-size: 16px; }
  .modal-card { padding: 26px 22px; border-radius: 20px; }
  .modal-card h2 { font-size: 25px; }
  .share-body { flex-direction: column; gap: 16px; }
  .qr-wrap #qrcode, .qr-wrap #qrcode img, .qr-wrap #qrcode canvas { width: 142px !important; height: 142px !important; }
  .qr-wrap { padding: 9px 9px 7px; }
  .share-info { width: 100%; }
}

@media (max-width: 390px) {
  .sidebar { padding-right: 11px; padding-left: 11px; }
  .map-btn.share-btn { padding: 0 8px; }
  .feed-note { -webkit-line-clamp: 2; }
  .welcome-card h2 { font-size: 29px; }
  .name-suggestions button { font-size: 8.5px; }
}

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

/* ------------------------- v2: roles, photos, social ------------------------ */

.online-roles { display: inline-flex; align-items: center; margin-right: 2px; }
.online-role-dot {
  width: 8px;
  height: 8px;
  margin-left: -2px;
  border: 1.5px solid #fffaf1;
  border-radius: 50%;
  background: var(--c, #b7a48f);
  box-shadow: 0 1px 3px rgba(64, 41, 22, 0.15);
}
.online-role-dot:first-child { margin-left: 0; }

.decision-row { display: flex; gap: 6px; margin: 0 0 10px; }
.decision-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 5px;
  height: 33px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 250, 242, 0.52);
  color: var(--ink-soft);
  font-size: 10px;
  transition: all 0.16s ease;
}
.decision-btn:hover { border-style: solid; border-color: rgba(217, 79, 43, 0.4); background: #fffaf2; color: var(--red); }
.decision-icon { font-size: 13px; }
.poll-count {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--red);
  color: #fff8ec;
  font-size: 7px;
}
.poll-count:empty { display: none; }

.tabs { gap: 14px; }
.tab { font-size: 11px; }

.drawer-facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.fact-chip { padding: 4px 7px; border: 1px solid rgba(93, 67, 42, 0.1); border-radius: 5px; background: #f7ecdd; color: #7c664f; font-size: 8.5px; }
.fact-chip b { color: #9a6a3e; font-weight: 600; }

.drawer-subactions { display: flex; gap: 5px; margin-top: 10px; }
.subaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 4px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink-soft);
  font-size: 9px;
  transition: all 0.15s ease;
}
.subaction-btn:hover { border-color: rgba(217, 79, 43, 0.3); color: var(--red); }
.subaction-btn.active { border-color: rgba(217, 79, 43, 0.35); background: #fbe3d8; color: var(--red); }

.photo-field { margin: 9px 0; }
.photo-field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: #7c664f; font-size: 9.5px; font-weight: 600; }
.photo-field-head small { color: #b09b85; font-size: 8px; font-weight: 400; }
.photo-field-head span:last-child { color: var(--muted); font-size: 8px; font-weight: 400; }
.photo-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 6px; }
.photo-preview:empty { display: none; }
.photo-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #fffaf2; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(46, 36, 27, 0.75); color: #fff; font-size: 12px; line-height: 1; }
.photo-upload { display: flex; align-items: center; justify-content: center; height: 34px; border: 1px dashed rgba(93, 67, 42, 0.28); border-radius: 8px; color: #a08063; font-size: 9px; cursor: pointer; }
.photo-upload:hover { border-color: var(--red); color: var(--red); background: #fffaf2; }

.checkin-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 7px; }
.checkin-photos button { padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: none; cursor: zoom-in; }
.checkin-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.checkin-photos button:hover img { filter: brightness(0.92); }

.checkin-actions { display: flex; align-items: center; gap: 9px; margin-top: 7px; }
.comment-toggle { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 8.5px; }
.comment-toggle:hover { color: var(--red); }
.comment-toggle span { font-size: 11px; }
.comment-box { margin-top: 7px; padding: 8px; border-radius: 8px; background: rgba(247, 236, 221, 0.7); }
.comment { display: flex; gap: 6px; padding: 5px 0; border-top: 1px dashed rgba(93, 67, 42, 0.11); }
.comment:first-child { border-top: 0; }
.comment .role-avatar { width: 22px; height: 22px; border-width: 1.5px; font-size: 7px; }
.comment .avatar { width: 22px; height: 22px; font-size: 11px; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 7.5px; }
.comment-meta b { color: var(--ink-soft); font-size: 8.5px; }
.comment-text { margin: 2px 0 0; color: var(--ink-soft); font-size: 9.5px; line-height: 1.6; word-break: break-word; }
.comment-delete { margin-left: auto; color: #b49e87; font-size: 7.5px; }
.comment-form { display: flex; gap: 5px; margin-top: 6px; }
.comment-form input { flex: 1; min-width: 0; height: 28px; padding: 0 7px; border: 1px solid rgba(93, 67, 42, 0.16); border-radius: 6px; outline: 0; background: #fffaf2; font-size: 9px; }
.comment-form input:focus { border-color: rgba(217, 79, 43, 0.4); }
.comment-form button { flex: none; padding: 0 8px; border-radius: 6px; background: var(--red); color: #fff8ec; font-size: 8.5px; }
.mention { color: var(--red); font-weight: 650; }

.passport-card { margin-bottom: 10px; padding: 13px; border: 1px solid rgba(93, 67, 42, 0.12); border-radius: 14px; background: linear-gradient(135deg, #fffaf2, #f3e6d6); }
.passport-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.passport-head b { font-family: var(--serif); font-size: 14px; }
.passport-head span { color: var(--muted); font-size: 8.5px; }
.passport-stats { display: flex; gap: 12px; margin: 9px 0 10px; }
.passport-stats div { flex: 1; text-align: center; }
.passport-stats strong { display: block; color: var(--red); font-family: var(--serif); font-size: 18px; line-height: 1.1; }
.passport-stats small { color: var(--muted); font-size: 7.5px; }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.badge-item { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 250, 242, 0.65); color: var(--muted); font-size: 8px; }
.badge-item .badge-icon { font-size: 13px; filter: grayscale(1); opacity: 0.55; }
.badge-item.earned { border-color: rgba(228, 161, 59, 0.4); background: #fff7e7; color: var(--ink-soft); }
.badge-item.earned .badge-icon { filter: none; opacity: 1; }
.badge-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8.5px; }
.badge-item small { display: block; margin-top: 1px; font-size: 7px; }
.badge-progress { display: block; margin-top: 6px; color: #9a8a78; font-size: 8px; }

.dish-board { margin-bottom: 12px; padding: 12px 13px; border: 1px solid rgba(93, 67, 42, 0.12); border-radius: 13px; background: rgba(255, 250, 242, 0.7); }
.dish-board-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.dish-board-head b { font-family: var(--serif); font-size: 14px; }
.dish-board-head span { color: var(--muted); font-size: 8px; }
.dish-row { display: flex; align-items: center; gap: 7px; padding: 6px 0; border-top: 1px dashed var(--line); }
.dish-row:first-of-type { border-top: 0; }
.dish-rank { width: 16px; color: #b5a18d; font-family: var(--serif); font-size: 12px; font-style: italic; }
.dish-row:nth-of-type(1) .dish-rank { color: #c08a2c; }
.dish-main { flex: 1; min-width: 0; }
.dish-main b { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dish-main small { display: block; margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.dish-count { color: var(--red); font-size: 9px; font-weight: 650; white-space: nowrap; }

.wish-card { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(93, 67, 42, 0.1); border-radius: 12px; background: rgba(255, 250, 242, 0.68); cursor: pointer; transition: all 0.17s ease; }
.wish-card:hover { background: #fffaf2; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.wish-emoji { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--tint, #f1dfcc); font-size: 17px; }
.wish-main { flex: 1; min-width: 0; }
.wish-main b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wish-main span { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.wish-remove { color: #b49e87; font-size: 14px; padding: 4px; }
.wish-remove:hover { color: var(--red); }
.pin-wish { position: absolute; top: 0; left: -3px; display: grid; place-items: center; width: 15px; height: 15px; border: 2px solid #fffaf1; border-radius: 50%; background: #fff; color: var(--red); font-size: 7px; }

.roulette-card { width: min(390px, 100%); }
.roulette-result { margin: 4px 0 15px; padding: 18px 14px; border: 1px dashed rgba(217, 79, 43, 0.28); border-radius: 15px; background: #fffaf2; text-align: center; }
.roulette-result .roulette-emoji { display: block; margin-bottom: 7px; font-size: 38px; }
.roulette-result b { display: block; font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.roulette-result span { display: block; margin-top: 5px; color: var(--muted); font-size: 9.5px; }
.roulette-result .roulette-score { margin-top: 7px; color: var(--gold); font-size: 10px; }
.roulette-actions { display: flex; gap: 7px; }
.roulette-actions .primary-btn { flex: 1; }

.poll-card { width: min(560px, 100%); }
.poll-create { padding: 12px; border: 1px solid rgba(93, 67, 42, 0.11); border-radius: 12px; background: #f7ecdd; }
.poll-create > input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fffaf2; font-size: 10px; }
.poll-create > input:focus { border-color: rgba(217, 79, 43, 0.4); }
.poll-option-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 120px; margin: 8px 0; overflow-y: auto; }
.poll-option-list label { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: #fffaf2; color: var(--ink-soft); font-size: 8px; cursor: pointer; }
.poll-option-list input { accent-color: var(--red); }
.poll-create .primary-btn { height: 34px; font-size: 10px; }
.poll-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; margin-top: 12px; overflow-y: auto; }
.poll-item { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf2; }
.poll-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.poll-item-head b { font-size: 11px; }
.poll-item-head span { color: var(--muted); font-size: 8px; white-space: nowrap; }
.poll-option { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; padding: 5px 6px; border: 1px solid transparent; border-radius: 6px; background: #f7ecdd; text-align: left; font-size: 9px; }
.poll-option:hover { border-color: rgba(217, 79, 43, 0.25); }
.poll-option.mine { border-color: rgba(217, 79, 43, 0.35); background: #fbe3d8; }
.poll-option .poll-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-option .poll-votes { color: var(--red); font-weight: 650; white-space: nowrap; }
.poll-bar { width: 54px; height: 5px; overflow: hidden; border-radius: 999px; background: #e7d6c2; }
.poll-bar i { display: block; height: 100%; border-radius: 999px; background: var(--red); }
.poll-closed { color: var(--muted); font-size: 8px; }
.poll-close-btn { margin-left: auto; color: #b49e87; font-size: 8px; }
.poll-close-btn:hover { color: var(--red); }

.poster-card { width: min(390px, 100%); }
.poster-preview { max-height: 58vh; margin: 6px 0 12px; overflow-y: auto; border-radius: 12px; background: #eadfce; }
#posterCanvas { display: block; width: 100%; height: auto; }
.poster-actions { display: flex; gap: 7px; }
.poster-actions .primary-btn { flex: 1; }

.details-card { width: min(500px, 100%); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0 12px; }
.details-grid .field { margin-bottom: 0; }
.details-grid .field input { font-size: 10px; }

.recovery-panel { margin: 9px 0 11px; padding: 10px; border: 1px dashed rgba(93, 67, 42, 0.18); border-radius: 10px; background: rgba(255, 250, 242, 0.6); }
.recovery-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recovery-main span { color: #7c664f; font-size: 9px; font-weight: 600; }
.recovery-main code { padding: 3px 7px; border-radius: 5px; background: #f1e4d2; color: var(--red); font-family: monospace; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; }
.recovery-actions { display: flex; gap: 5px; margin-top: 6px; }
.recovery-actions button { flex: 1; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fffaf2; color: var(--ink-soft); font-size: 8.5px; }
.recovery-actions button:hover { border-color: var(--red); color: var(--red); }
.recovery-panel small { display: block; margin-top: 6px; color: var(--muted); font-size: 7.5px; line-height: 1.6; }
.admin-link { display: block; margin: 12px auto 0; color: #aa9783; font-size: 8px; text-decoration: underline; text-underline-offset: 2px; }
.admin-link:hover { color: var(--red); }

.role-recover { display: block; width: 100%; margin-top: 10px; color: var(--muted); font-size: 8.5px; text-decoration: underline; text-underline-offset: 3px; }
.role-recover:hover { color: var(--red); }
.recover-status { display: block; min-height: 16px; margin-top: 7px; color: var(--red); font-size: 8.5px; text-align: center; }

.admin-card { width: min(560px, 100%); }
.admin-login { display: flex; gap: 6px; margin: 6px 0 10px; }
.admin-login input { flex: 1; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: #fffaf2; font-size: 10px; }
.admin-login .primary-btn { height: 34px; padding: 0 12px; font-size: 9px; }
.admin-body { max-height: 48vh; overflow-y: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 7px 0 10px; }
.admin-stat { padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fffaf2; text-align: center; }
.admin-stat b { display: block; color: var(--red); font-family: var(--serif); font-size: 16px; }
.admin-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 7px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.admin-actions button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fffaf2; color: var(--ink-soft); font-size: 8px; }
.admin-actions button:hover { border-color: var(--red); color: var(--red); }
.admin-spot-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 8.5px; }
.admin-spot-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-spot-row small { color: var(--muted); font-size: 7px; }
.admin-spot-row button { color: #b49e87; font-size: 8px; }
.admin-spot-row button:hover { color: var(--red); }
.admin-status { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; text-align: center; }

.lightbox { position: fixed; inset: 0; z-index: 1700; display: grid; place-items: center; padding: 22px; background: rgba(24, 17, 11, 0.9); backdrop-filter: blur(8px); }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5); }
.lightbox-close { position: absolute; top: 18px; right: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 250, 241, 0.16); color: #fff; font-size: 24px; }

.feed-thumb { position: relative; float: right; width: 62px; height: 62px; margin: 0 0 5px 7px; overflow: hidden; border-radius: 8px; }
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-thumb span { position: absolute; right: 2px; bottom: 2px; padding: 1px 3px; border-radius: 3px; background: rgba(46, 36, 27, 0.65); color: #fff; font-size: 7px; }

.dish-tag.clickable { cursor: pointer; }
.dish-tag.clickable:hover { background: #f0dcc4; }

@media (max-width: 860px) {
  .decision-row { margin-bottom: 7px; }
  .decision-btn { height: 30px; font-size: 9px; }
  .tabs { gap: 13px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .drawer-subactions { margin-top: 8px; }
  .subaction-btn { height: 29px; font-size: 8.5px; }
  .details-grid { grid-template-columns: 1fr; }
  .poster-preview { max-height: 52vh; }
  .poll-card, .roulette-card { width: 100%; }
  .role-recover { margin-top: 8px; }
  .admin-card { width: 100%; }
}

.passport-share { display: block; width: 100%; margin-top: 8px; padding: 6px; border-top: 1px dashed var(--line); color: var(--red); font-size: 8.5px; text-align: right; }
.passport-share:hover { text-decoration: underline; text-underline-offset: 2px; }
.comment-count { color: var(--muted); font-size: 8.5px; }
.wishlist-note { padding: 4px 2px 8px; color: var(--muted); font-size: 8.5px; }

/* -------------------------------- default origin ---------------------------- */

.origin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: -3px 0 13px;
  padding: 7px 10px;
  border: 1px solid rgba(93, 67, 42, 0.12);
  border-radius: 11px;
  background: rgba(255, 250, 242, 0.62);
  text-align: left;
  transition: all 0.16s ease;
}
.origin-bar:hover { border-color: rgba(217, 79, 43, 0.28); background: #fffaf2; }
.origin-pin {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 15px;
}
.origin-copy { flex: 1; min-width: 0; }
.origin-copy small { display: block; color: var(--muted); font-size: 7.5px; letter-spacing: 0.03em; }
.origin-copy b { display: block; overflow: hidden; margin-top: 1px; color: var(--ink-soft); font-size: 9.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.origin-switch { flex: none; color: var(--red); font-size: 8px; white-space: nowrap; }

.origin-marker-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(217, 79, 43, 0.35);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 4px 13px rgba(64, 41, 22, 0.15);
  color: var(--red);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}
.origin-marker-label::before { content: "⌖"; font-size: 12px; }
.origin-marker-wrap { background: transparent; border: 0; }

@media (max-width: 860px) {
  .origin-bar { margin-bottom: 9px; padding: 6px 8px; border-radius: 9px; }
  .origin-pin { width: 24px; height: 24px; font-size: 13px; }
  .origin-copy small { font-size: 7px; }
  .origin-copy b { font-size: 9px; }
  .origin-switch { font-size: 7.5px; }
}

/* ------------------------------- shared wishlist ---------------------------- */

.wish-card { align-items: flex-start; }
.wish-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-roles { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.wish-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--role-color, #8b7358) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--role-color, #8b7358) 8%, #fffaf2);
  color: #6e5844;
  font-size: 7.5px;
  line-height: 1.35;
  white-space: nowrap;
}
.wish-role-chip i { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--role-color, #8b7358); }
.wish-side { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 5px; }
.wish-count { color: var(--muted); font-size: 7.5px; white-space: nowrap; }
.wish-action {
  padding: 4px 7px;
  border: 1px solid rgba(217, 79, 43, 0.25);
  border-radius: 999px;
  color: var(--red);
  font-size: 7.5px;
  white-space: nowrap;
}
.wish-action:hover { background: var(--red-soft); }
.wish-action.active { border-color: transparent; background: var(--red-soft); color: var(--red-deep); }
.wish-action:disabled { opacity: 0.55; cursor: wait; }

.wish-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 1px 0 2px;
  padding: 7px 2px 0;
  border-top: 1px dashed rgba(93, 67, 42, 0.1);
}
.wish-people[hidden] { display: none; }
.wish-people-label { margin-right: 2px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.wish-people .wish-role-chip { font-size: 7.5px; }

.roulette-wishes { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 9px; }
.roulette-wishes .wish-role-chip { font-size: 7.5px; }

.wish-role-del {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 1px;
  padding: 0;
  border: 1px solid rgba(217, 79, 43, 0.24);
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.9);
  color: var(--red);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.wish-role-del:hover { background: rgba(217, 79, 43, 0.13); color: var(--red); }
.wish-main .wish-role-chip {
  display: inline-flex;
  margin-top: 0;
  color: #6e5844;
  font-size: 7.5px;
}

.poll-option-list label small { margin-left: 1px; color: var(--muted); font-size: 7px; }
.poll-empty {
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}
.poll-empty b { display: block; margin-bottom: 2px; color: var(--ink-soft); font-size: 9px; }

.feed-delete {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid rgba(217, 79, 43, 0.26);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--red);
  font-size: 8px;
}
.feed-delete:hover { border-color: var(--red); background: var(--red-soft); }

.app-version { color: #b7a38f; font-size: 7.5px; letter-spacing: 0.04em; }
