:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #fcfcfc;
  --border: #e3e3e3;
  --text: #333333;
  --text-2: #666666;
  --ember: #ff9900;
  --star-gold: #c9a227;
  --smoke: #8e8e93;
  --success: #4cd964;
  --warning: #ff9500;
  --radius-sm: 4px;
  --radius-md: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --font-xs: 12px;
  --font-sm: 13px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 22px;
  --shisha-ember: #e8855a;
  --shisha-smoke: #8b9dc3;
  --shisha-mint: #4ecdc4;
  --shisha-gold: #c4950a;
  --shisha-surface: #f9f9f7;
}
.light {
  --bg: #f8f8f8;
  --surface: #ffffff;
  --surface-2: #fcfcfc;
  --border: #e3e3e3;
  --text: #333333;
  --text-2: #666666;
  --ember: #f39800;
  --smoke: #8e8e93;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Helvetica Neue", sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}
.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(3px);
}
.age-gate-card {
  width: min(680px, 100%);
  border-radius: 12px;
  border: 1px solid #e6d8c6;
  background: #ffffff;
  color: #2e2e2e;
  padding: 20px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}
.age-gate-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}
.age-gate-text {
  margin: 0;
  line-height: 1.7;
}
.age-gate-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.age-gate-note {
  margin-top: 10px;
}
.age-gate-overlay.hidden {
  display: none !important;
}
img,
video,
canvas,
svg {
  max-width: 100%;
}
.app {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4) 28px;
}
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px var(--space-3);
  position: sticky;
  top: 6px;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.logo {
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color: var(--ember);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}
.logo.logo-with-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.logo-text {
  line-height: 1.2;
}
.top-actions, .seg { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn, .chip {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 8px 12px;
  min-height: 40px;
  font-size: var(--font-xs);
  font-weight: 400;
  cursor: pointer;
}
.btn.primary { background: var(--ember); color: #fff; border: 1px solid #e48e00; font-weight: 700; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.seg .btn.active, .chip.active {
  border-color: var(--ember);
  color: var(--ember);
  background: color-mix(in srgb, var(--ember) 8%, var(--surface));
}
.layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}
.search-layout { display: grid; grid-template-columns: 1fr; gap: 10px; }
.search-sidebar {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 10px;
}
.search-main {
  min-width: 0;
}
.search-sidebar h4 { margin: 0 0 8px; font-size: 13px; }
.filter-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 44px;
  background: #fff;
  color: var(--text-2);
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip-icon { font-size: 13px; line-height: 1; }
.chip-toggle.active {
  border-color: var(--ember);
  background: var(--ember);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}
.filter-group input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  margin: 6px 0 8px;
}
.map-placeholder {
  border: 1px dashed var(--border);
  border-radius: 6px;
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  background: repeating-linear-gradient(-45deg, #faf7f2, #faf7f2 10px, #f2ece3 10px, #f2ece3 20px);
}
.search-map-wrap {
  display: grid;
  gap: 10px;
}
.search-leaflet-map {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f6f6f6;
}
.search-map-list {
  display: grid;
  gap: 6px;
}
.search-map-list .item a {
  color: var(--ember);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  min-width: 0;
  max-width: 100%;
}
.stack {
  display: grid;
  min-width: 0;
  gap: 12px;
}
.hero { display: grid; gap: 8px; }
.hero h1 { margin: 0; font-size: var(--font-xl); font-family: "Hiragino Mincho ProN", serif; }
.hero p { margin: 0; color: var(--text-2); font-size: var(--font-sm); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.carousel-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.carousel-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.shop-card {
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dddddd;
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.shop-card > div:last-child {
  min-width: 0;
}
.shop-card:hover { border-color: #d5d5d5; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.thumb {
  width: 164px;
  height: 123px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f3efe8, #e8ddd0);
  font-size: 38px;
  border: 1px solid #eadfcf;
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.shop-card-main {
  min-width: 0;
  position: relative;
  padding-right: 92px;
}
.shop-name { margin: 0 0 8px; font-size: 20px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }
.meta { font-size: 13px; margin-bottom: 4px; }
.sub { font-size: 12px; color: var(--text-2); }
.shop-budget-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.budget-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ece5da;
  border-radius: 999px;
  background: #fff9ef;
  color: #6b6257;
  font-size: 12px;
  padding: 4px 10px;
}
.shop-bookmark-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid #e8dcc7;
  background: #fff;
  color: #7a6e60;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.shop-bookmark-btn.saved {
  border-color: #f3ca78;
  color: #a36a00;
  background: #fff4dc;
}
.badge {
  font-size: 11px;
  background: var(--ember);
  color: #fff;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-right: 6px;
}
.open { color: var(--success); }
.open-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 6px;
}
.open-badge.open { background: #e9f8ef; color: #1a9b4a; }
.open-badge.closed { background: #f1f1f1; color: #8e8e93; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
}
.detail-main { min-width: 0; }
.detail-sidebar { min-width: 0; }
.detail-sticky-card {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}
.score-num { font-size: 30px; font-family: "DM Mono", monospace; color: var(--ember); font-weight: 700; }
.score-row { display: grid; grid-template-columns: 72px 1fr 30px; gap: 8px; align-items: center; margin-bottom: 6px; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fill { height: 100%; background: var(--smoke); }
.review {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  background: var(--surface-2);
}
.review p { margin: 6px 0 0; color: var(--text-2); line-height: 1.6; font-size: 13px; }
.hero-carousel {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  margin-bottom: 10px;
}
.hero-main, .hero-sub {
  border-radius: 6px;
  background: linear-gradient(135deg, #f4d6a8, #ecd2bf);
  display: grid;
  place-items: center;
  font-size: 30px;
}
.hero-main { min-height: 164px; font-size: 42px; }
.hero-sub-list { display: grid; gap: 8px; }
.hero-sub { min-height: 78px; font-size: 24px; }
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.score-bars {
  display: grid;
  gap: 6px;
}
.rating-distribution {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.dist-row { display: grid; grid-template-columns: 30px 1fr 36px; gap: 8px; align-items: center; font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.dist-bar { height: 8px; border-radius: 999px; background: #f2eee8; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--ember); }
.sticky-actions {
  position: sticky;
  bottom: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  background: linear-gradient(to top, var(--surface), color-mix(in srgb, var(--surface) 80%, transparent));
}

/* Right-column preview should not nest another two-column layout */
#detailPreviewPanel {
  padding: 14px;
}
#detailPreviewPanel .detail-layout {
  grid-template-columns: 1fr;
  gap: 10px;
}
#detailPreviewPanel .detail-sidebar {
  order: -1;
}
#detailPreviewPanel .detail-sticky-card {
  position: static;
}
#detailPreviewPanel .hero-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
  margin-bottom: 10px;
}
#detailPreviewPanel .hero-main,
#detailPreviewPanel .hero-sub {
  min-height: 96px;
  font-size: 24px;
}
#detailPreviewPanel .hero-main {
  min-height: 204px;
  font-size: 34px;
}
#detailPreviewPanel .hero-sub-list {
  display: grid;
  gap: 8px;
}
#detailPreviewPanel #detailTabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
}
#detailPreviewPanel #detailTabs .tab {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: center;
  white-space: nowrap;
}
#detailPreviewPanel .sticky-actions {
  position: static;
  grid-template-columns: 1fr 1fr;
}
#detailPreviewPanel .score-num {
  font-size: 48px;
}
#detailPreviewPanel .score-row {
  grid-template-columns: 86px 1fr 36px;
}
#detailPreviewPanel .dist-row {
  grid-template-columns: 34px 1fr 40px;
}
#detailPreviewPanel .detail-head {
  margin-bottom: 10px;
}

@media (max-width: 919px) {
  #detailPreviewPanel {
    padding: 10px;
  }
  #detailPreviewPanel .hero-gallery {
    grid-template-columns: 1fr;
  }
  #detailPreviewPanel .hero-main {
    min-height: 160px;
  }
  #detailPreviewPanel .hero-sub-list {
    grid-template-columns: 1fr 1fr;
  }
}
.stepper { display: flex; gap: 6px; margin-bottom: 10px; }
.step { height: 6px; border-radius: 999px; flex: 1; background: var(--surface-2); }
.step.active { background: var(--ember); }

/* レビュー投稿ウィザード */
.post-shop-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 2px solid var(--ember);
  background: linear-gradient(135deg, rgba(255, 120, 40, 0.08), rgba(255, 255, 255, 0.96));
}
.post-shop-banner--warn {
  border-color: var(--warning);
  background: linear-gradient(135deg, rgba(220, 80, 60, 0.08), rgba(255, 255, 255, 0.96));
}
.post-shop-banner__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.post-shop-banner__name {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.post-shop-banner__hint {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-2);
}
.post-shop-banner__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-wizard-top { margin-bottom: 1.25rem; }
.post-wizard-status { margin-top: 0.5rem; font-weight: 600; }
.post-wizard-panels { min-height: 12rem; }
.post-wizard-step { display: none; animation: postWizardFade 0.2s ease; }
.post-wizard-step.is-active { display: block; }
@keyframes postWizardFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-wizard-lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-2);
}
.post-wizard-nav {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.post-wizard-nav .btn.primary.hidden { display: none; }
.post-wizard-post-status { flex: 1 1 12rem; min-width: 8rem; }
.post-wizard-summary {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.post-wizard-dl { margin: 0; display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.5rem 0.75rem; }
.post-wizard-dl dt {
  margin: 0;
  font-weight: 700;
  color: var(--text-2);
}
.post-wizard-dl dd { margin: 0; color: var(--text); line-height: 1.45; word-break: break-word; }
.field { display: grid; gap: 6px; margin-bottom: 10px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.field select, .row select, .row input, .row textarea {
  min-height: 40px;
  max-width: 100%;
}
.stars { display: flex; gap: 8px; font-size: 22px; cursor: pointer; user-select: none; }
.stars span { opacity: .35; transition: transform .1s ease, opacity .1s ease; }
.stars span.on { opacity: 1; color: var(--ember); transform: scale(1.05); }
.hidden { display: none !important; }
.status { font-size: 12px; color: var(--text-2); }
.empty-state {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 18px;
  background: #fff;
  text-align: center;
  color: var(--text-2);
}
.small { font-size: 12px; color: var(--text-2); line-height: 1.4; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-width: 0;
}
.tab {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 10px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}
.tab.active { border-color: var(--ember); color: var(--ember); }
.list { display: grid; gap: 8px; }
.item {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  padding: 9px;
  min-width: 0;
}
.active-draft-card {
  border-color: var(--ember);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ember) 35%, transparent);
}
.mypage-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.mypage-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row > * { min-width: 0; max-width: 100%; }
.small,
.sub,
.status {
  overflow-wrap: anywhere;
}
.review-actions .btn {
  padding: 6px 10px;
  font-size: 12px;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
textarea.mono { width: 100%; min-height: 120px; }
.skeleton {
  height: 92px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  z-index: 999;
  box-shadow: 0 10px 28px rgba(44, 31, 17, 0.15);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 12px;
}
.modal-card {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.modal-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.modal-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.modal-field input, .modal-field textarea, .modal-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Utility classes for index.html */
.u-row-between { justify-content: space-between; }
.u-row-end { justify-content: flex-end; }
.u-row-center { justify-content: center; }
.u-mt-4 { margin-top: 4px; }
.u-mt-6 { margin-top: 6px; }
.u-mt-8 { margin-top: 8px; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-12 { margin-bottom: 12px; }
.u-gap-10 { gap: 10px; }
.u-items-end { align-items: end; }
.u-h-10 { height: 10px; }
.u-h-12 { height: 12px; }
.u-m0 { margin: 0; }
.u-text-ember { color: var(--ember); }
.u-text-muted { color: var(--text-2); }
.u-display-none { display: none; }
.u-ml-6 { margin-left: 6px; }
.u-ml-8 { margin-left: 8px; }

.u-input-surface,
.u-input-white,
.u-select-surface,
.u-select-white {
  border: 1px solid var(--border);
  padding: 8px;
  color: var(--text);
}
.u-input-surface,
.u-select-surface {
  border-radius: 8px;
  background: var(--surface-2);
}
.u-input-white,
.u-select-white {
  border-radius: 4px;
  background: #fff;
}
.u-input-white.lg,
.u-select-white.lg {
  padding: 9px 10px;
}
.u-input-white.xl {
  padding: 10px 12px;
}
.u-select-white.sm {
  padding: 7px 10px;
}
.u-flex-1 { flex: 1; }
.u-flex-2 { flex: 2; }
.u-minw-140 { min-width: 140px; }
.u-minw-160 { min-width: 160px; }
.u-minw-180 { min-width: 180px; }
.u-minw-200 { min-width: 200px; }
.u-minw-220 { min-width: 220px; }
.u-w-120 { width: 120px; }
.u-fill-96 { width: 96%; }
.u-fill-88 { width: 88%; }
.u-fill-82 { width: 82%; }
.u-fill-58 { width: 58%; }
.u-fill-24 { width: 24%; }
.u-fill-12 { width: 12%; }
.u-fill-4 { width: 4%; }
.u-fill-2 { width: 2%; }
.u-bg-gold { background: #f4c842; }
.star-wrap {
  margin-left: 6px;
  display: inline-block;
  position: relative;
  width: 62px;
  letter-spacing: 1px;
  color: #d8d0c3;
}
.star-fill {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  overflow: hidden;
  color: var(--star-gold);
  width: 0;
}
.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  line-height: 1;
}
.rating-inline.is-compact {
  gap: 4px;
  font-size: 11px;
}
.rating-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--star-gold);
}
.rating-count {
  font-size: 12px;
  color: var(--text-2);
}
.saving-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.saving-indicator.is-saving::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--border);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive design system breakpoints:
   - mobile: < 640
   - tablet: 640 - 919
   - desktop: >= 920
*/
@media (max-width: 639px) {
  .app {
    padding: var(--space-2) var(--space-2) 20px;
  }
  .topbar {
    position: static;
    min-height: 0;
    padding: var(--space-2);
    gap: var(--space-2);
  }
  .logo {
    font-size: 18px;
  }
  .topbar,
  .top-actions,
  .seg {
    flex-wrap: wrap;
  }
  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .layout,
  .stack {
    gap: var(--space-2);
  }
  .panel {
    padding: var(--space-2);
  }
  .hero h1 {
    font-size: 18px;
    line-height: 1.3;
  }
  .hero p {
    font-size: var(--font-xs);
  }
  .shop-card {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding: 12px;
  }
  .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .shop-card-main {
    padding-right: 0;
  }
  .shop-bookmark-btn {
    position: static;
    margin-bottom: 8px;
    margin-left: auto;
    display: inline-flex;
  }
  #searchView .search-main .row.u-mb-12 {
    position: sticky;
    bottom: 8px;
    z-index: 8;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, #ffffff 95%, var(--bg));
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    grid-template-columns: 1fr;
  }
  #searchView .search-main .row.u-mb-8 {
    gap: 6px;
  }
  #searchView #searchCountText {
    margin-left: 0;
    flex: 1 1 100%;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sticky-card {
    position: static;
  }
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .score-row {
    grid-template-columns: 64px 1fr 28px;
    gap: 6px;
  }
  .row {
    gap: 6px;
  }
  .row > input,
  .row > select,
  .row > textarea,
  .row > button {
    flex: 1 1 100%;
    min-width: 0 !important;
    width: 100%;
  }
  .u-minw-140,
  .u-minw-160,
  .u-minw-180,
  .u-minw-200,
  .u-minw-220 {
    min-width: 0 !important;
  }
  .chip-group {
    gap: 4px;
  }
  .chip-toggle,
  .btn,
  .chip {
    min-height: 40px;
    padding: 8px 10px;
  }
  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }
  .modal-overlay {
    padding: 8px;
  }
  .modal-card {
    max-height: 88vh;
    overflow: auto;
  }
}

@media (min-width: 640px) and (max-width: 919px) {
  .app {
    padding: var(--space-3) var(--space-3) 24px;
  }
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .topbar {
    gap: 8px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .search-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sticky-card {
    position: static;
  }
  .shop-card {
    grid-template-columns: 132px 1fr;
  }
  .thumb {
    width: 132px;
    height: 99px;
  }
  .row > input,
  .row > select,
  .row > textarea {
    min-width: 140px;
    flex: 1 1 calc(50% - 8px);
  }
  .row > button {
    flex: 0 1 auto;
  }
  .u-minw-220 {
    min-width: 180px;
  }
  #searchView .search-main .row.u-mb-12 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #searchView #searchInput {
    grid-column: 1 / -1;
  }
  #searchView #searchCountText {
    flex: 1 1 100%;
    margin-left: 0;
  }
}

@media (min-width: 920px) {
  .topbar {
    flex-wrap: nowrap;
  }
  .top-actions {
    margin-left: auto;
    justify-content: flex-end;
  }
  .layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.95fr);
  }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .search-layout { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 260px); }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .tabs::-webkit-scrollbar {
    height: 6px;
  }
  .tabs::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 999px;
  }
  #searchView .search-main .row.u-mb-12 {
    grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(260px, 1.4fr) auto;
  }
}

@media (min-width: 1280px) {
  .layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
    gap: 14px;
  }
  .search-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }
  .shop-card {
    grid-template-columns: 180px 1fr;
  }
  .thumb {
    width: 180px;
    height: 135px;
  }
}

/* 法務・年齢表示（リーガル改訂のサイト上反映） */
.legal-age-banner {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-sm);
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(90deg, #fff4e6 0%, #fff8f0 100%);
  border: 1px solid #ffd4a8;
  border-radius: var(--radius-md);
}
.legal-age-banner strong {
  color: #b45309;
}

.site-footer {
  margin-top: var(--space-5);
  padding: var(--space-5) var(--space-4) calc(var(--space-5) + 56px);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: var(--font-xs);
  color: var(--text-2);
}
.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
}
.site-footer-brand {
  margin: 0 0 var(--space-2);
  font-size: var(--font-sm);
  color: var(--text);
  text-align: center;
}
.site-footer-brand strong {
  color: var(--ember);
  font-weight: 800;
}
.site-footer-age {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  color: var(--text);
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.site-footer-links a {
  color: var(--ember);
  text-decoration: none;
  font-weight: 600;
}
.site-footer-links a:hover {
  text-decoration: underline;
}
.site-footer-sep {
  color: var(--smoke);
  user-select: none;
}
.site-footer-legal-note {
  margin: 0;
  line-height: 1.55;
}
.site-footer-legal-note a {
  color: var(--ember);
  text-decoration: underline;
}

/* --- ルートレイアウト（検索/投稿時は右カラムを隠す） --- */
.layout.spa-hide-aside > aside.stack {
  display: none;
}
@media (min-width: 920px) {
  .layout.spa-hide-aside {
    grid-template-columns: 1fr;
  }
}

/* --- ヒーロー --- */
.hero-subtitle {
  margin: 0 0 var(--space-4);
  color: var(--text-2);
  font-size: var(--font-sm);
}
.hero-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  min-height: 52px;
}
.hero-search-icon {
  font-size: 18px;
  opacity: 0.55;
  flex-shrink: 0;
}
.hero-search-input {
  flex: 1 1 200px;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: var(--font-md);
}
.hero-search-submit {
  flex-shrink: 0;
  border-radius: 999px !important;
}
.hero-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-section-label {
  margin: 0 0 var(--space-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.home-section-title {
  margin: 0 0 var(--space-3);
  font-size: var(--font-lg);
  font-weight: 800;
}
.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-filter-chips {
  flex-wrap: wrap;
  gap: 8px;
}

/* --- 注目店舗カルーセル --- */
.featured-shops-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.featured-shops-scroll .shop-card {
  flex: 0 0 min(280px, 82vw);
  scroll-snap-align: start;
}
.featured-empty {
  margin: 0;
  padding: var(--space-3);
}

/* --- 店舗カード強化 --- */
.thumb {
  position: relative;
}
.thumb-score-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
}
.score-pill {
  display: inline-flex;
  align-items: center;
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.2;
}
.score-pill--gold {
  color: var(--shisha-gold);
  background: color-mix(in srgb, var(--shisha-gold) 16%, #fff);
}
.score-pill--ember {
  color: var(--shisha-ember);
  background: color-mix(in srgb, var(--shisha-ember) 18%, #fff);
}
.score-pill--green {
  color: #2e7d32;
  background: color-mix(in srgb, #2e7d32 14%, #fff);
}
.score-pill--smoke {
  color: var(--shisha-smoke);
  background: color-mix(in srgb, var(--shisha-smoke) 16%, #fff);
}
.shop-card--compact {
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 12px;
}
.shop-card--compact .thumb {
  width: 88px;
  height: 88px;
  aspect-ratio: 1;
}
.shop-card--compact .shop-name {
  font-size: 15px;
}
.rating-count-only {
  font-size: 12px;
  color: var(--text-2);
}
.budget-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-2);
  margin-right: 4px;
}

/* --- 店舗詳細スコア --- */
.score-num {
  font-size: 44px;
  font-weight: 800;
  color: var(--shisha-ember);
  font-family: "DM Mono", ui-monospace, monospace;
  line-height: 1;
}
.u-text-ember {
  color: var(--shisha-ember);
}

/* --- 検索ツールバー・ソートチップ --- */
.search-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.sort-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sort-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sort-chip.active {
  border-color: var(--ember);
  background: color-mix(in srgb, var(--ember) 10%, var(--surface));
  color: var(--text);
}
.btn-ghost {
  border: none;
  background: transparent;
  color: var(--text-2);
  min-height: 36px;
}
.filter-section-title {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
}
.filter-sheet-head {
  display: none;
}
.filter-sheet-foot {
  display: none;
}

/* --- 検索画面のレイアウト崩れ対策 --- */
#searchView .search-main .row.u-mb-12 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 8px;
}
#searchView .search-main .row.u-mb-8 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#searchView #searchCountText {
  margin-left: auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#searchView #searchPager {
  flex-wrap: wrap;
}
#searchView #searchPageInfo {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 919px) {
  body.filter-sheet-open .app-bottomnav {
    display: none !important;
  }
  .filter-sheet-toggle {
    flex-shrink: 0;
  }
  body.filter-sheet-open .filter-sheet-backdrop[hidden] {
    display: none;
  }
  body.filter-sheet-open .filter-sheet-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 50;
  }
  body.filter-sheet-open #searchSidebar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    overflow: auto;
    z-index: 60;
    margin: 0;
    border-radius: 16px 16px 0 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    background: var(--surface);
  }
  .filter-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .filter-sheet-foot {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--surface);
  }
  .search-layout .search-sidebar {
    display: none;
  }
  body.filter-sheet-open .search-layout .search-sidebar {
    display: block;
  }
  .site-footer {
    padding-bottom: calc(var(--space-5) + 88px);
  }
}

@media (min-width: 920px) {
  .filter-sheet-toggle {
    display: none;
  }
  .filter-sheet-head {
    display: none;
  }
  .filter-sheet-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  .filter-sheet-backdrop {
    display: none !important;
  }
}

/* --- ボトムナビ（モバイル） --- */
.app-bottomnav {
  display: none;
}
@media (max-width: 919px) {
  .app {
    padding-bottom: 80px;
  }
  .app-bottomnav {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 45;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  }
  .bottomnav-link {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 10px;
    line-height: 1.25;
    color: var(--text-2);
    text-decoration: none;
    padding: 8px 2px 0;
    font-weight: 600;
  }
  .bottomnav-link--active {
    color: var(--ember);
  }
  .bottomnav-fab-wrap {
    flex: 0 0 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: -14px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .bottomnav-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(160deg, #ff9f4a, var(--ember));
    color: #fff;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(232, 133, 90, 0.45);
  }
  .bottomnav-fab-text {
    font-size: 9px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ember);
    text-align: center;
    max-width: 3.5rem;
  }
  .bottomnav-fab-wrap.bottomnav-fab--active .bottomnav-fab-icon {
    box-shadow:
      0 10px 28px rgba(232, 133, 90, 0.45),
      0 0 0 3px color-mix(in srgb, var(--ember) 35%, transparent);
  }
}
