:root {
  --brand-from: #6366f1;
  --brand-to: #8b5cf6;
  --primary: #4f46e5;
  --primary-soft: #eef0fe;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #1e2233;
  --muted: #6b7280;
  --line: #e5e7ef;
  --good: #10b981;
  --good-soft: #e7f7f1;
  --mid: #f59e0b;
  --mid-soft: #fdf3e2;
  --bad: #ef4444;
  --bad-soft: #fdeaea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 -8px 32px rgba(16, 24, 40, 0.12);
  --tabbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-from: #818cf8;
    --brand-to: #a78bfa;
    --primary: #818cf8;
    --primary-soft: #232741;
    --bg: #0f1117;
    --surface: #171a23;
    --surface-2: #1f2430;
    --text: #e8eaf2;
    --muted: #9aa1b4;
    --line: #2a2f3d;
    --good-soft: #10312a;
    --mid-soft: #33270f;
    --bad-soft: #3a1d1d;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 -8px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: 0.01em; }
a { color: var(--primary); }

.muted { color: var(--muted); font-size: 13px; }
.fine { color: var(--muted); font-size: 12px; line-height: 1.7; }
.error { color: var(--bad); font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 28px 0; }

.screen { min-height: 100%; display: flex; flex-direction: column; }

.page { padding: 8px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0 12px;
}
.page-head h1 { font-size: 19px; }

.brandmark { display: flex; align-items: center; gap: 8px; }
.brandmark svg { width: 26px; height: 26px; display: block; }
.brandmark span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--brand-from), var(--brand-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
}
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tab.active { color: var(--primary); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.card-title h2 { font-size: 14px; }

.hero {
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  border: none;
  color: #fff;
}
.hero .muted, .hero .label { color: rgba(255, 255, 255, 0.78); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn + .btn { margin-top: 10px; }
.btn.primary {
  background: linear-gradient(120deg, var(--brand-from), var(--brand-to));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn.ghost { background: transparent; }
.btn.small { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 17px;
  font-family: inherit;
  cursor: pointer;
}

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.hero .tile { background: rgba(255, 255, 255, 0.16); border-color: transparent; }
.label { display: block; font-size: 11px; color: var(--muted); }
.value { display: block; font-size: 17px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.value.lg { font-size: 30px; letter-spacing: -0.01em; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 12px;
  margin-bottom: 14px;
}
.segmented button {
  flex: 1;
  padding: 9px 4px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.rate-row { margin-bottom: 16px; }
.rate-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.rate-label small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.segs { display: flex; gap: 8px; }
.seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 11px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.seg .face { font-size: 19px; line-height: 1; }
.seg.on[data-v="3"] { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.seg.on[data-v="2"] { background: var(--mid-soft); border-color: var(--mid); color: var(--mid); }
.seg.on[data-v="1"] { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }

.buckets { display: flex; gap: 6px; }
.bucket {
  flex: 1;
  padding: 9px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.bucket.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.list li:first-child { border-top: none; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.list .amount { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  min-width: 36px;
  padding: 3px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.mid { background: var(--mid-soft); color: var(--mid); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.flat { background: var(--surface-2); color: var(--muted); }

.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-from), var(--brand-to));
  transition: width 0.4s ease;
}

.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.bars .hour { width: 38px; flex: none; color: var(--muted); text-align: right; }
.bars .track { display: block; flex: 1; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bars .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); }
.bars .val { width: 88px; flex: none; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.field { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.stack input, .stack select { margin-top: 0; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 17, 23, 0.45); }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1001;
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 20px);
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-up 0.22s ease;
}
@keyframes sheet-up { from { transform: translateY(16px); opacity: 0.6; } }
.sheet-grip { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 2px auto 14px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 17px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 1200;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.login-box { margin: auto; padding: 28px 24px; max-width: 360px; width: 100%; text-align: center; }
.login-box .brandmark { justify-content: center; margin-bottom: 14px; }
.login-box .brandmark svg { width: 44px; height: 44px; }
.login-box .brandmark span { font-size: 27px; }
.login-box .lead { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.guest-form { margin-top: 10px; }

.guest-banner {
  padding: 10px 13px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.guest-banner a { font-weight: 700; margin-left: 6px; white-space: nowrap; }

/* ── PCでは端末幅に閉じ込める ──────────── */
:root { --app-w: 430px; }

body {
  position: relative;
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100%;
}

/* position:fixed はビューポート基準なので、同じ幅で中央に寄せ直す */
.tabbar,
.sheet,
.sheet-backdrop,
.map-screen {
  max-width: var(--app-w);
  margin-inline: auto;
}

@media (min-width: 480px) {
  html { background: #e8eaf2; }
  body {
    box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(16, 24, 40, 0.14);
  }
}

@media (min-width: 480px) and (prefers-color-scheme: dark) {
  html { background: #07090d; }
}

/* ── 天気 ─────────────────────────────── */
.head-right { display: flex; align-items: center; gap: 10px; }
.weather { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.weather .deg { font-weight: 700; color: var(--text); }

.rain-alert { background: var(--mid-soft); border-color: var(--mid); }
.rain-body { display: flex; align-items: center; gap: 12px; }
.rain-alert .glyph { font-size: 24px; line-height: 1; }
.rain-alert strong { display: block; font-size: 15px; }
.rain-alert span { font-size: 12px; color: var(--muted); }

.credit { display: block; margin-top: 10px; font-size: 11px; color: var(--muted); text-align: right; }

/* ── 流れるお知らせ ─────────────────────── */
.ticker {
  overflow: hidden;
  background: linear-gradient(120deg, var(--brand-from), var(--brand-to));
  color: #fff;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 600;
}
/* 動かすのは weather-bar.js。CSS animation は端末の省電力設定で止まる */
.ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-item { padding: 0 14px; white-space: nowrap; }
.ticker-item::after { content: "●"; margin-left: 18px; opacity: 0.45; font-size: 8px; vertical-align: middle; }

/* 流さないときは、代わりに指で送れるようにして内容は落とさない */
.ticker.static { overflow-x: auto; scrollbar-width: none; }
.ticker.static::-webkit-scrollbar { display: none; }
.ticker.static .ticker-track { transform: none !important; }

/* ── 5時間の予報 ────────────────────────── */
.hourly {
  display: flex;
  gap: 2px;
  padding: 3px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hour-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0;
  border-radius: 8px;
  font-size: 10px;
  color: var(--muted);
}
.hour-slot.now { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.hour-slot .h, .hour-slot .p { white-space: nowrap; }
.hour-slot .g { font-size: 13px; line-height: 1; }
.hour-slot .p { font-variant-numeric: tabular-nums; }


/* ── 地図 ─────────────────────────────── */
.map-screen {
  position: fixed;
  inset: 0;
  /* 地図の長押しで画面が選択状態にならないようにする */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* 入力欄だけは選択とコピーを許す */
.map-screen input,
.map-screen textarea {
  -webkit-user-select: text;
  user-select: text;
}
.map-wrap { position: absolute; inset: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--bg); transform-origin: 50% 50%; }
/* 回転すると四隅が欠けるので、ヘディングアップ中だけコンテナを広げる */
.map-wrap.rotating #map { inset: -32%; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10px; }

.map-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 800;
  padding-top: env(safe-area-inset-top);
  pointer-events: none;
}
.map-head > * { pointer-events: auto; }
.map-float { padding: 12px; pointer-events: none; }
.map-float > * { pointer-events: auto; }

.today-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.today-bar .grow { flex: 1; min-width: 0; }
.today-bar .btn { flex: none; margin-top: 0; }

.map-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.tool-btn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.tool-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 場所を選ぶモード */
.pick-crosshair {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 810;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  pointer-events: none;
}
/* 地図の上でも埋もれないよう、太く描いて白で縁取る */
.pick-crosshair::before,
.pick-crosshair::after {
  content: "";
  position: absolute;
  background: var(--primary);
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 1px 4px rgba(16, 24, 40, 0.3);
}
.pick-crosshair::before { left: 50%; top: 0; width: 6px; height: 100%; margin-left: -3px; }
.pick-crosshair::after { top: 50%; left: 0; height: 6px; width: 100%; margin-top: -3px; }

/* 中心をはっきりさせる小さな輪 */
.pick-crosshair span {
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.pick-bar {
  position: absolute;
  left: 12px; right: 12px;
  z-index: 810;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  color: var(--muted);
}
.pick-bar .grow { flex: 1; min-width: 0; }
.pick-bar .btn { flex: none; margin-top: 0; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search input {
  flex: 1;
  border: none;
  background: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.search input:focus { outline: none; }
.search .glyph { color: var(--muted); font-size: 15px; }
.map-chips { margin-top: 10px; }
.pin-temp .pin-dot { background: #ec4899; }

.nearby {
  position: absolute;
  left: 12px; right: 12px;
  z-index: 800;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  margin: 0;
  cursor: pointer;
}
.nearby .card-title { margin-bottom: 6px; }
.nearby-actions { display: flex; gap: 8px; margin-top: 12px; }
.nearby-actions .btn { margin-top: 0; }

/* Leaflet の divIcon。画像を使わないのでCDNの取りこぼしやズレが起きない */
.pin { background: transparent; border: none; }

.pin-body {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.38);
  background: #64748b;
}
.pin-body b {
  display: block;
  transform: rotate(45deg);
  line-height: 22px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.pin-pickup  .pin-body { background: #f97316; }
.pin-dropoff .pin-body { background: #4f46e5; }
.pin-rest    .pin-body { background: #06b6d4; }
.pin-gas     .pin-body { background: #16a34a; }
.pin-other   .pin-body { background: #64748b; }
.pin-temp    .pin-body { background: #ec4899; }
.pin-active  .pin-body { transform: rotate(-45deg) scale(1.2); }

.pin-label {
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
}

/* 現在地だけは丸のまま。向きを持たないので雫型にしない */
.pin-me .pin-dot {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: #2563eb;
  box-shadow: 0 1px 5px rgba(16, 24, 40, 0.4);
}
.pin-ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.22);
  animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.spot-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.spot-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 13px;
  white-space: pre-wrap;
}


/* 夜の配達で画面が眩しくならないよう、ダークテーマではタイルだけ落とす。
   ピンは marker-pane にあるので影響しない */
@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane { filter: brightness(0.72) saturate(0.85) contrast(1.06); }
}

/* 場所を選ぶ間は、近くのスポットのカードを隠して地図を広く見せる */
.nearby.shifted { display: none; }

/* ── スポットの評価 ─────────────────────── */
.stars { display: flex; gap: 4px; }
.star {
  flex: 1;
  padding: 9px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--line);
  font-size: 21px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}
.star.on { color: #f59e0b; border-color: #f59e0b; background: var(--mid-soft); }

.chips.wrap { flex-wrap: wrap; overflow: visible; }
.tag-group { margin-bottom: 14px; }
.tag-group-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.rating-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.rating-head .score { font-size: 28px; font-weight: 800; line-height: 1; }
.rating-head .stars-static { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.rating-head .count { font-size: 12px; color: var(--muted); }

.tag-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tag-count {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.tag-count b { color: var(--muted); font-weight: 700; margin-left: 4px; }

.reviews { list-style: none; margin: 0; padding: 0; }
.reviews li { padding: 12px 0; border-top: 1px solid var(--line); }
.reviews .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.reviews .who .mine { color: var(--primary); font-weight: 700; }
.reviews .stars-static { color: #f59e0b; font-size: 12px; }
.reviews .body { margin-top: 5px; font-size: 14px; white-space: pre-wrap; }
.reviews .tags { margin-top: 6px; font-size: 11px; color: var(--muted); }

/* ── 記録できたときの手応え ───────────────── */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.celebrate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 28px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-lg);
  animation: celebrate-out 0.9s ease forwards;
}
.celebrate-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  animation: celebrate-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.celebrate-title { font-size: 16px; font-weight: 800; }
.celebrate-sub { font-size: 12px; color: var(--muted); }

@keyframes celebrate-pop {
  from { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.08); }
  to { transform: scale(1); opacity: 1; }
}
@keyframes celebrate-out {
  0%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .celebrate-card, .celebrate-mark { animation: none; }
  .celebrate-card { opacity: 1; }
}

/* お気に入り */
.fav-btn {
  border: none;
  background: none;
  color: var(--line);
  font-size: 20px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  padding: 0 2px;
}
.fav-btn.on { color: #f59e0b; }
