/* =====================================================
 * ボンガ行脚録 v2.0 - Production Design System
 * Director-approved synthesis of 3 designer proposals
 *
 * 「行ったゲーセンが、地図になり、記録になり、仲間との合言葉になる。
 *  そして、店が消えても、記録は残る。」
 * ===================================================== */

:root {
  /* === Base ─ 暗闇ベース、ゲーセンのネオン管下の体験 === */
  --bg-base: #0B0C10;
  --bg-elevated: #14161D;
  --bg-elevated-2: #1C1F28;
  --bg-overlay: rgba(11,12,16,0.72);

  /* === Border ─ 控えめに === */
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);

  /* === Text === */
  --text-primary: #F5F6F8;
  --text-secondary: #A8ADBA;
  --text-tertiary: #6B7180;
  --text-disabled: #3D4250;

  /* === Accent ─ ネオンピンク1色のみ、画面占有率5%未満 === */
  --accent: #FF2E6B;
  --accent-soft: rgba(255,46,107,0.14);
  --accent-glow: 0 0 24px rgba(255,46,107,0.42);
  --accent-pressed: #E01F58;

  /* === Semantic === */
  --success: #5EEAD4;
  --warning: #F5A623;
  --danger:  #FF5454;
  --info:    #7B5CFF;

  /* === Map pin colors === */
  --pin-undiscovered: #4A4F5C;
  --pin-discovered:   #5EEAD4;
  --pin-king:         #C9A86A;
  --pin-hot:          #FF5454;
  --pin-sacred:       #7B5CFF;

  /* === Tier === */
  --tier-bronze: #B47A4F;
  --tier-silver: #C9CDD6;
  --tier-gold:   #E8C26A;
  --tier-master: #FF2E6B;

  /* === Radii === */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* === Spacing scale (4の倍数) === */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* === Shadows === */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.40);
  --shadow-sheet: 0 -8px 32px rgba(0,0,0,0.56);
  --shadow-fab: 0 8px 24px rgba(255,46,107,0.42), 0 2px 8px rgba(0,0,0,0.4);

  /* === Motion === */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;

  /* === Fonts === */
  --font-display: 'Inter Tight', 'Noto Sans JP', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', monospace;
}

/* === Override existing colors to new palette === */
body { background: var(--bg-base) !important; color: var(--text-primary) !important; }

/* === Typography classes === */
.t-display    { font-family: var(--font-display); font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.t-h1         { font-family: var(--font-display); font-size: 24px; line-height: 1.2;  font-weight: 700; letter-spacing: -0.015em; }
.t-h2         { font-family: var(--font-display); font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.t-h3         { font-family: var(--font-display); font-size: 17px; line-height: 1.3;  font-weight: 600; }
.t-body       { font-family: var(--font-body);    font-size: 15px; line-height: 1.5;  font-weight: 400; }
.t-body-bold  { font-family: var(--font-body);    font-size: 15px; line-height: 1.5;  font-weight: 600; }
.t-caption    { font-family: var(--font-body);    font-size: 13px; line-height: 1.4;  font-weight: 400; color: var(--text-secondary); }
.t-micro      { font-family: var(--font-body);    font-size: 11px; line-height: 1.3;  font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-tertiary); }
.t-mono       { font-family: var(--font-mono);    font-size: 12px; line-height: 1.4;  font-variant-numeric: tabular-nums; }
.t-num-large  { font-family: var(--font-mono);    font-size: 36px; line-height: 1.0;  font-weight: 700; font-variant-numeric: tabular-nums; }

/* === Card === */
.v2-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: var(--s-4);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.v2-card:active { transform: scale(0.98); border-color: var(--border-default); }

/* === Feed Card (4:5 vertical photo) === */
.feed-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s-6);
  box-shadow: var(--shadow-card);
}
.feed-card .media {
  aspect-ratio: 4/5;
  background: #000;
  position: relative;
  overflow: hidden;
}
.feed-card .media img,
.feed-card .media video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.feed-card .media .gen-cover-large {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
  text-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.feed-card .body { padding: var(--s-4); }
.feed-card .head {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.feed-card .head .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-elevated-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.feed-card .head .meta { flex: 1; min-width: 0; }
.feed-card .head .meta .name { font: 600 14px/1.3 var(--font-display); }
.feed-card .head .meta .place { font: 500 12px/1.2 var(--font-body); color: var(--text-secondary); margin-top: 2px; }
.feed-card .head .meta .place .pin-dot { color: var(--accent); }
.feed-card .text { font: 400 15px/1.5 var(--font-body); color: var(--text-primary); margin: var(--s-2) 0; }
.feed-card .actions {
  display: flex; gap: var(--s-4); margin-top: var(--s-3);
  color: var(--text-secondary); font: 500 13px/1 var(--font-body);
}
.feed-card .actions span { display: inline-flex; align-items: center; gap: var(--s-1); cursor: pointer; }

/* === Buttons === */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  height: 48px;
  padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  font: 600 15px/1 var(--font-display);
  letter-spacing: -0.005em;
  border: 0; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.v2-btn:active { transform: scale(0.96); }
.v2-btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: var(--accent-glow);
}
.v2-btn--primary:active { background: var(--accent-pressed); }
.v2-btn--secondary {
  background: var(--bg-elevated-2);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: none;
}
.v2-btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}
.v2-btn--ghost:hover { color: var(--text-primary); }
.v2-btn--full { width: 100%; }
.v2-btn--sm { height: 36px; font-size: 13px; padding: 0 var(--s-4); }

/* === Chip === */
.v2-chip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  height: 28px; padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font: 500 12px/1 var(--font-body);
  white-space: nowrap;
}
.v2-chip--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* === Hero card for arcade tile (Map BottomSheet & Discover) === */
.v2-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.v2-tile:active { transform: scale(0.99); }
.v2-tile .v2-cover {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0d10;
}
.v2-tile .v2-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.v2-tile .v2-cover .gen-cover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.v2-tile .v2-cover-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}
.v2-tile .v2-cover-badges {
  position: absolute; top: var(--s-3); left: var(--s-3); right: var(--s-3);
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  z-index: 2;
}
.v2-tile .v2-cover-title {
  position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-3);
  z-index: 2;
}
.v2-tile .v2-cover-title h3 {
  margin: 0;
  font: 700 19px/1.2 var(--font-display);
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
}
.v2-tile .v2-cover-title .v2-loc {
  margin-top: var(--s-1);
  font: 500 12px/1.2 var(--font-body);
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.v2-tile .v2-body {
  padding: var(--s-3) var(--s-4) var(--s-4);
}
.v2-tile .v2-cabs {
  display: flex; gap: var(--s-1); flex-wrap: wrap;
  font: 500 12px/1.4 var(--font-body);
  color: var(--text-secondary);
}
.v2-tile .v2-cab-pill {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-subtle);
  padding: 2px var(--s-2);
  border-radius: var(--r-pill);
}
.v2-tile .v2-meta {
  display: flex; gap: var(--s-3); align-items: center;
  margin-top: var(--s-2);
  font: 400 12px/1 var(--font-body);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.list-summary,
.list-more {
  grid-column: 1 / -1;
  border: 1px solid var(--border-subtle);
  background: rgba(20,22,29,0.72);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-secondary);
  font: 500 13px/1.35 var(--font-body);
}
.list-summary b {
  color: var(--text-primary);
  font: 700 18px/1 var(--font-display);
  margin-right: 8px;
}
.list-summary span {
  color: var(--text-tertiary);
}
.list-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--text-secondary);
  font: 500 13px/1.5 var(--font-body);
  text-align: center;
}
.list-more .btn {
  min-width: min(220px, 100%);
}

.mood-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.mood-pills button {
  min-width: 0;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.055);
  color: var(--text);
  font: 800 12px/1 var(--font-body);
}
.mood-pills button.is-active {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255,77,141,0.24);
}

@media (max-width: 520px) {
  .list-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .mood-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shrine highlight */
.v2-shrine-badge {
  background: linear-gradient(135deg, var(--tier-gold), #FFB547);
  color: #2D1F00;
  font: 700 11px/1 var(--font-display);
  padding: 5px var(--s-2);
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 3px;
  box-shadow: 0 2px 8px rgba(232,194,106,0.5);
}

/* === Genre placeholder gradients === */
.gen-cover.g0 { background: linear-gradient(135deg, #FF2E6B, #7B5CFF); }
.gen-cover.g1 { background: linear-gradient(135deg, #5EEAD4, #06B6D4); }
.gen-cover.g2 { background: linear-gradient(135deg, #F5A623, #FF5454); }
.gen-cover.g3 { background: linear-gradient(135deg, #7B5CFF, #FF2E6B); }
.gen-cover.g4 { background: linear-gradient(135deg, #FF5454, #FF2E6B); }
.gen-cover.g5 { background: linear-gradient(135deg, #C9A86A, #F5A623); }
.gen-cover.g6 { background: linear-gradient(135deg, #5EEAD4, #7B5CFF); }
.gen-cover.g7 { background: linear-gradient(135deg, #FF2E6B, #FF5454); }

/* === Detail Hero === */
.v2-hero {
  position: relative;
  height: 320px;
  margin: -14px -14px var(--s-5);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  overflow: hidden;
  background: var(--bg-elevated-2);
}
.v2-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-hero .gen-cover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 140px;
  text-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.v2-hero .v2-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.45) 0%,
    transparent 25%,
    transparent 50%,
    rgba(11,12,16,0.92) 100%);
}
.v2-hero .v2-top {
  position: absolute; top: var(--s-3); left: var(--s-3); right: var(--s-3);
  display: flex; gap: var(--s-2);
}
.v2-hero .v2-bottom {
  position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-5);
}
.v2-hero h1 {
  margin: 0;
  font: 700 28px/1.15 var(--font-display);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
}
.v2-hero .v2-meta {
  margin-top: var(--s-2);
  display: flex; gap: var(--s-3); align-items: center;
  font: 500 13px/1.3 var(--font-body);
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  flex-wrap: wrap;
}
.v2-hero .v2-meta .v2-meta-rating {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font: 600 13px/1 var(--font-mono);
}

/* === CTA Row (overlaps hero bottom) === */
.v2-cta-row {
  display: flex;
  gap: var(--s-2);
  margin: -28px var(--s-3) var(--s-4);
  position: relative;
  z-index: 5;
}
.v2-cta-row .v2-btn { flex: 1; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.v2-cta-row .v2-btn--secondary {
  flex: 0.72;
}
@media (max-width: 420px) {
  .v2-cta-row {
    gap: 6px;
  }
  .v2-cta-row .v2-btn {
    padding-inline: 10px;
    font-size: 12px;
  }
}

/* === Quick stats (3-cell pill) === */
.v2-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0 var(--s-3) var(--s-5);
}
.v2-stats .v2-stat {
  background: var(--bg-elevated);
  padding: var(--s-4) var(--s-2);
  text-align: center;
}
.v2-stats .v2-stat .v {
  font: 700 22px/1.0 var(--font-mono);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.v2-stats .v2-stat .l {
  font: 500 11px/1 var(--font-body);
  color: var(--text-tertiary);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.detail-more-list {
  margin-top: 8px;
}
.detail-more-list summary {
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--border-default);
  background: rgba(255,255,255,0.055);
  color: var(--text-secondary);
  font: 800 13px/1 var(--font-body);
  cursor: pointer;
}
.detail-more-list summary::-webkit-details-marker {
  display: none;
}
.detail-more-list summary::after {
  content: "＋";
  margin-left: 8px;
  color: var(--accent);
}
.detail-more-list[open] summary {
  margin-bottom: 8px;
}
.detail-more-list[open] summary::after {
  content: "−";
}
.detail-empty-action {
  display: grid;
  gap: 12px;
}
.detail-empty-action .btn {
  width: 100%;
}
.checkin-card {
  border-color: rgba(255,77,141,0.22);
  background: linear-gradient(180deg, rgba(255,77,141,0.075), rgba(16,19,24,0.98));
}
.checkin-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.checkin-card__head b {
  color: var(--text-primary);
  font: 800 14px/1 var(--font-body);
}
.checkin-card__memo {
  margin-top: 8px;
  color: var(--text-primary);
  font: 500 13px/1.65 var(--font-body);
}

/* === Section Header === */
.v2-sec-h {
  display: flex; justify-content: space-between; align-items: center;
  margin: var(--s-6) var(--s-3) var(--s-3);
}
.v2-sec-h h2 {
  margin: 0;
  font: 700 18px/1.2 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.v2-sec-h h2::before { display: none !important; }
.v2-sec-h .v2-ct {
  font: 500 12px/1 var(--font-mono);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.v2-sec-h .v2-more {
  color: var(--accent);
  font: 600 13px/1 var(--font-display);
  cursor: pointer;
}

/* === Photo strip (horizontal scroll) === */
.v2-photo-strip {
  display: flex; gap: var(--s-2);
  overflow-x: auto;
  padding: 0 var(--s-3) var(--s-3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -14px;
  padding: 0 var(--s-3);
}
.v2-photo-strip::-webkit-scrollbar { display: none; }
.v2-photo-strip .v2-ph {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 4/5;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elevated-2);
  scroll-snap-align: start;
  cursor: pointer;
}
.v2-photo-strip .v2-ph img { width: 100%; height: 100%; object-fit: cover; }

/* === Story bar (24h check-ins) === */
.v2-stories {
  display: flex; gap: var(--s-3);
  overflow-x: auto;
  padding: var(--s-3);
  margin: 0 -14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.v2-stories::-webkit-scrollbar { display: none; }
.v2-stories .v2-story {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
  scroll-snap-align: start;
  cursor: pointer;
}
.v2-stories .v2-story .v2-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--info));
  margin: 0 auto;
}
.v2-stories .v2-story .v2-ring-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border: 2px solid var(--bg-base);
}
.v2-stories .v2-story .v2-name {
  font: 500 11px/1.2 var(--font-body);
  color: var(--text-secondary);
  margin-top: var(--s-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Bottom Nav with FAB === */
.v2-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 72px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(20,22,29,0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr 80px 1fr 1fr;
  align-items: center;
  z-index: 80;
}
.v2-nav .v2-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-tertiary);
  font: 500 10px/1 var(--font-body);
  background: transparent; border: none; cursor: pointer;
  height: 100%; justify-content: center;
}
.v2-nav .v2-nav-item .ic { font-size: 20px; line-height: 1; }
.v2-nav .v2-nav-item.is-active { color: var(--text-primary); }
.v2-nav .v2-nav-item.is-active::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  margin-top: 38px;
}
.v2-nav .v2-fab {
  width: 56px; height: 56px;
  margin: -16px auto 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 26px;
  box-shadow: var(--shadow-fab);
  border: 3px solid var(--bg-elevated);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.v2-nav .v2-fab:active { transform: scale(0.92); }

/* === Pin styles === */
.v2-pin {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform var(--dur-fast);
}
.v2-pin:hover { transform: scale(1.18); }
.v2-pin--undiscovered { background: var(--pin-undiscovered); opacity: 0.55; }
.v2-pin--discovered   { background: var(--pin-discovered); }
.v2-pin--king         {
  background: var(--pin-king);
  width: 28px; height: 28px;
  border-color: var(--pin-king);
  box-shadow: 0 0 12px rgba(201,168,106,0.6);
}
.v2-pin--hot          { background: var(--pin-hot); animation: v2-pulse 1.6s infinite; }
.v2-pin--sacred       { background: var(--pin-sacred); border-color: #fff; }
@keyframes v2-pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); }
}

/* === Skeleton === */
.v2-skel {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-elevated-2) 50%,
    var(--bg-elevated) 100%);
  background-size: 200% 100%;
  animation: v2-shimmer 1.6s infinite linear;
  border-radius: var(--r-sm);
}
@keyframes v2-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Focus / a11y === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================
 * v2.5 Clean Design Integration
 * ===================================================== */

/* === Header === */
.app-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-family: var(--font-display);
  color: var(--text-primary);
  background: none;
}
.app-title small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.42);
  margin-top: 3px;
  display: block;
}
.app-action {
  background: rgba(255,255,255,0.06);
  box-shadow: none;
  color: var(--text-secondary);
}

/* === Map area === */
.map-stage {
  min-height: calc(100vh - 220px);
  position: relative;
}
#map {
  height: calc(100vh - 220px);
  min-height: calc(100vh - 220px);
  background: var(--bg-elevated);
}
@media (min-width: 720px) {
  .map-stage, #map { min-height: calc(100vh - 240px); height: calc(100vh - 240px); }
}

/* Map Overlay Command Card */
.map-command {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  background: rgba(20,22,29,0.86);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 12px 14px;
  z-index: 410;
  pointer-events: auto;
}
.map-kicker {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 4px; font-family: var(--font-body);
}
.map-headline {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; font-family: var(--font-display);
}
.map-subline { display: none; }
.map-stats {
  display: flex; gap: 12px; margin-top: 8px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.7);
}

/* Map Filters */
.subnav { padding: 8px 14px; gap: 6px; }
.page[data-page="arcades"] > .card:first-child {
  position: sticky;
  top: calc(58px + env(safe-area-inset-top, 0px));
  z-index: 45;
}
.subnav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.subnav::-webkit-scrollbar {
  display: none;
}
.arcade-searchbar {
  flex: 1;
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #15102a;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px 0 12px;
}
.arcade-searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,46,107,0.16);
}
.arcade-searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 600 14px/1 var(--font-body);
}
.arcade-searchbar input::placeholder {
  color: rgba(255,255,255,0.46);
}
.arcade-searchbar button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
}
.subnav button {
  height: 30px; padding: 0 11px; font-size: 12px; font-weight: 600;
  border-radius: 999px; background: transparent;
  border: 1px solid rgba(255,255,255,0.16); color: rgba(255,255,255,0.75);
  display: inline-flex; align-items: center; gap: 6px;
}
.subnav button.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 12px rgba(255,46,107,0.32);
}
.filter-count {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.68);
  font: 700 10px/1.3 var(--font-mono);
}
.subnav button.active .filter-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Hide Share Card */
.share-card { display: none; }
.map-content { padding: 12px 14px; }
.map-legend { margin-bottom: 8px; gap: 5px; flex-wrap: wrap; }
.map-legend .tag { font-size: 10px; padding: 2px 7px; }

/* === Bottom Nav (5 Tabs with Center FAB) === */
.bottom-nav.v2-nav-5 {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 64px; padding-bottom: env(safe-area-inset-bottom);
  background: rgba(20,22,29,0.96);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr 80px 1fr 1fr;
  align-items: center; z-index: 80;
}
.bottom-nav.v2-nav-5 button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: 100%; border: none; background: transparent;
  color: rgba(255,255,255,0.45); cursor: pointer;
}
.bottom-nav.v2-nav-5 button .ic {
  font-size: 22px; filter: grayscale(0.4); opacity: 0.7; line-height: 1;
}
.bottom-nav.v2-nav-5 button span:not(.ic):not(.ic-fab) {
  font-size: 10px; font-weight: 600;
}
.bottom-nav.v2-nav-5 button.active { color: var(--accent); }
.bottom-nav.v2-nav-5 button.active .ic { filter: grayscale(0); opacity: 1; }

.bottom-nav.v2-nav-5 .nav-fab {
  width: 56px; height: 56px; margin: -16px auto 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #FF6BA9 100%);
  color: #fff;
  display: grid; place-items: center;
  border: 3px solid var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(255,46,107,0.42), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform var(--dur-fast) var(--ease-out);
}
.bottom-nav.v2-nav-5 .nav-fab:active { transform: scale(0.92); }
.bottom-nav.v2-nav-5 .nav-fab .ic-fab { font-size: 26px; line-height: 1; }

/* Hide redundant old FAB */
.fab#fab { display: none; }

/* Misc padding fixes */
.v2-stories { padding: 14px 12px 8px; margin-bottom: 4px; }
.page[data-page="feed"] { padding-top: 4px; }
.page[data-page="profile"] { padding-top: 0; }
.page[data-page="profile"] .v2-hero { margin-top: -14px; }

/* === Leaflet MarkerCluster Custom UI === */
.marker-cluster-custom {
  background-clip: padding-box;
  border-radius: 50%;
  background: rgba(255, 46, 107, 0.2);
  border: 2px solid rgba(255, 46, 107, 0.8);
  box-shadow: 0 0 16px rgba(255, 46, 107, 0.5);
  display: flex; align-items: center; justify-content: center;
}
.marker-cluster-custom .custom-cluster {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}


/* =====================================================
 * v3.1 Map Premium ─ Clustering + Glass Morphism
 * 2026-05-11
 * ===================================================== */

/* ========== Cluster Pins ========== */
.cluster-pin-wrap { background: transparent !important; border: 0 !important; }
.cluster-pin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out);
}
.cluster-pin::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(11, 12, 16, 0.7);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.cluster-pin__inner {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-feature-settings: "tnum";
}

/* tier-specific glow rings */
.cluster-pin--normal {
  box-shadow:
    0 0 0 2px rgba(91, 232, 255, 0.35),
    0 0 16px rgba(91, 232, 255, 0.30),
    0 4px 12px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, rgba(91,232,255,0.35), rgba(91,232,255,0.06));
}
.cluster-pin--bonga {
  box-shadow:
    0 0 0 2px rgba(255, 46, 107, 0.55),
    0 0 18px rgba(255, 46, 107, 0.42),
    0 4px 14px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, rgba(255,46,107,0.4), rgba(255,46,107,0.06));
}
.cluster-pin--shrine {
  box-shadow:
    0 0 0 2px rgba(255, 216, 77, 0.75),
    0 0 24px rgba(255, 155, 58, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 30% 30%, rgba(255,216,77,0.45), rgba(255,155,58,0.08));
  animation: cluster-shrine-pulse 2.4s ease-in-out infinite;
}
@keyframes cluster-shrine-pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.04); }
}
.cluster-pin:hover { transform: scale(1.06); }

/* Override marker-cluster's default styles */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large,
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: transparent !important;
  background-color: transparent !important;
}
.marker-cluster div { color: transparent !important; }

/* ========== Individual Arcade Pins ========== */
.arcade-pin-wrap { background: transparent !important; border: 0 !important; }
.arcade-pin {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out);
}
.arcade-pin::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.96);
}
.arcade-pin__inner {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.arcade-pin:hover { transform: scale(1.18); z-index: 999 !important; }

.arcade-pin--normal {
  background: radial-gradient(circle at 30% 30%, #ffe09a, #f0c060);
  box-shadow: 0 0 8px rgba(255, 224, 154, 0.6), 0 2px 6px rgba(0,0,0,0.45);
}
.arcade-pin--visited {
  background: radial-gradient(circle at 30% 30%, #7ff4e0, #3acfe6);
  box-shadow: 0 0 10px rgba(91, 232, 255, 0.65), 0 2px 6px rgba(0,0,0,0.45);
}
.arcade-pin--bonga {
  background: radial-gradient(circle at 30% 30%, #ff86b3, var(--accent));
  box-shadow: 0 0 12px rgba(255, 46, 107, 0.75), 0 2px 8px rgba(0,0,0,0.5);
}
.arcade-pin--bonga .arcade-pin__inner { font-size: 11px; }
.arcade-pin--shrine {
  background: radial-gradient(circle at 30% 30%, #fff0a3, var(--tier-gold) 60%, #FF9B3A);
  box-shadow:
    0 0 0 2px #fff inset,
    0 0 18px rgba(255, 216, 77, 0.75),
    0 0 32px rgba(255, 155, 58, 0.5),
    0 4px 10px rgba(0,0,0,0.55);
  animation: shrine-glow 2.4s ease-in-out infinite;
}
.arcade-pin--shrine::after { border-color: #fff; }
.arcade-pin--shrine .arcade-pin__inner {
  color: #3a2400;
  font-size: 14px;
}
@keyframes shrine-glow {
  0%,100% { box-shadow: 0 0 0 2px #fff inset, 0 0 14px rgba(255,216,77,0.6), 0 0 28px rgba(255,155,58,0.4), 0 4px 10px rgba(0,0,0,0.55); }
  50%     { box-shadow: 0 0 0 2px #fff inset, 0 0 22px rgba(255,216,77,0.9), 0 0 40px rgba(255,155,58,0.6), 0 4px 10px rgba(0,0,0,0.55); }
}
.arcade-pin--closed {
  background: rgba(120, 120, 130, 0.42);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  opacity: 0.55;
}
.arcade-pin--closed::after { border-color: rgba(255,255,255,0.5); }
.arcade-pin--closed .arcade-pin__inner { color: rgba(255,255,255,0.7); }

/* ========== Map controls (glass) ========== */
.map-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 420;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-controls button {
  background: rgba(20, 22, 29, 0.62) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  font: 600 12px/1 var(--font-display);
  padding: 9px 12px !important;
  border-radius: 10px !important;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: all 0.16s var(--ease-out);
}
.map-controls button:hover {
  background: rgba(30, 33, 42, 0.78) !important;
  transform: translateY(-1px);
}

/* ========== Map command (glass card overlay on map) ========== */
.map-command {
  background: rgba(20, 22, 29, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ========== Leaflet popup glass theme ========== */
.leaflet-popup-content-wrapper {
  background: rgba(20, 22, 29, 0.92) !important;
  backdrop-filter: blur(20px);
  color: var(--text-primary) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
}
.leaflet-popup-content {
  margin: 12px 14px !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body);
  font-size: 13px;
}
.leaflet-popup-content b { color: #fff; }
.leaflet-popup-content small { color: rgba(255,255,255,0.7); }
.leaflet-popup-content a { color: var(--accent) !important; }
.leaflet-popup-tip {
  background: rgba(20, 22, 29, 0.92) !important;
  border: 1px solid rgba(255,255,255,0.10);
}
.leaflet-popup-close-button {
  color: rgba(255,255,255,0.6) !important;
  font-size: 20px !important;
  padding: 6px 8px !important;
}

/* ========== Attribution & zoom controls (subtle) ========== */
.leaflet-control-attribution {
  background: rgba(11,12,16,0.5) !important;
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.5) !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
}
.leaflet-control-attribution a {
  color: rgba(255,255,255,0.7) !important;
}
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5) !important;
  margin-bottom: 16px !important;
  margin-right: 14px !important;
}
.leaflet-control-zoom a {
  background: rgba(20, 22, 29, 0.78) !important;
  backdrop-filter: blur(12px);
  color: #fff !important;
  border-color: rgba(255,255,255,0.10) !important;
  font-size: 18px !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}
.leaflet-control-zoom a:hover {
  background: rgba(30, 33, 42, 0.92) !important;
}
.leaflet-control-zoom a:first-child { border-top-left-radius: 8px !important; border-top-right-radius: 8px !important; }
.leaflet-control-zoom a:last-child  { border-bottom-left-radius: 8px !important; border-bottom-right-radius: 8px !important; }

/* ========== Cluster spiderfy lines (subtle, on-brand) ========== */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 0.3s var(--ease-out), opacity 0.3s ease-out;
}
.leaflet-cluster-spider-leg {
  stroke: var(--accent) !important;
  stroke-opacity: 0.4 !important;
  stroke-width: 1.5 !important;
}

/* =====================================================
 * v3.2 BottomSheet ─ Swarm / Apple Maps 風
 * 2026-05-11
 * ===================================================== */

.bottomsheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 480;                          /* マップ・コントロールより前 */
  background: rgba(20, 22, 29, 0.78);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.10);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow:
    0 -16px 48px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.32s var(--ease-out);
}
.bottomsheet--peek { height: 96px; }
.bottomsheet--half { height: 50vh; }
.bottomsheet--full { height: 92vh; }
.bottomsheet--dragging { transition: none; }

/* drag handle */
.bottomsheet__handle {
  width: 100%;
  height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.bottomsheet__handle::before {
  content: '';
  width: 44px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.32);
}
.bottomsheet__handle:hover::before { background: rgba(255,255,255,0.5); }

/* head: search + chips */
.bottomsheet__head {
  padding: 0 14px 8px;
  flex-shrink: 0;
}
.bottomsheet__search {
  position: relative;
  display: flex; align-items: center;
  gap: 10px;
  background: rgba(11,12,16,0.65);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-pill);
  padding: 0 12px;
  height: 40px;
  transition: border-color 0.16s var(--ease-out);
}
.bottomsheet__search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,46,107,0.18);
}
.bottomsheet__search-ic {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
}
.bottomsheet__search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font: 500 14px/1 var(--font-body);
  height: 100%;
}
.bottomsheet__search input::placeholder {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}
.bottomsheet__search-clear {
  background: rgba(255,255,255,0.08);
  border: 0;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.bottomsheet__search-clear:hover { background: rgba(255,255,255,0.16); }

/* chips */
.bottomsheet__chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.bottomsheet__chips::-webkit-scrollbar { display: none; }
.bs-chip {
  flex-shrink: 0;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
  font: 600 12px/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.14s var(--ease-out);
}
.bs-chip:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.bs-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(255,46,107,0.36);
}
.bs-chip__count {
  background: rgba(0,0,0,0.32);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.bs-chip.is-active .bs-chip__count {
  background: rgba(255,255,255,0.18);
}

/* body: scrollable list */
.bottomsheet__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 16px;
  -webkit-overflow-scrolling: touch;
}
.bottomsheet--peek .bottomsheet__body {
  display: none;     /* peek時はリストを隠す（軽量化） */
}

/* list rows */
.bs-list { display: flex; flex-direction: column; gap: 2px; }
.bs-row {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.14s var(--ease-out);
}
.bs-row:hover {
  background: rgba(255,255,255,0.04);
}
.bs-row:active {
  background: rgba(255,255,255,0.07);
}
.bs-row__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 8px currentColor;
}
.bs-row__dot--shrine   { background: var(--tier-gold); color: var(--tier-gold); }
.bs-row__dot--bonga    { background: var(--accent); color: var(--accent); }
.bs-row__dot--visited  { background: #5be8ff; color: #5be8ff; }
.bs-row__dot--normal   { background: #ffe09a; color: #ffe09a; }
.bs-row__dot--closed   { background: #666; color: #666; opacity: 0.5; }
.bs-row__body { flex: 1; min-width: 0; }
.bs-row__title {
  font: 700 14px/1.3 var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.bs-row__star {
  color: var(--tier-gold);
  filter: drop-shadow(0 0 4px rgba(255,216,77,0.6));
}
.bs-row__badge {
  font: 700 10px/1 var(--font-body);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.6);
}
.bs-row__badge--closed {
  background: rgba(120,120,130,0.25);
  color: rgba(255,255,255,0.55);
}
.bs-row__meta {
  font: 500 12px/1.3 var(--font-body);
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bs-row__dist {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.bs-row__cabs {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.bs-cab {
  font: 500 10px/1 var(--font-body);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px 7px;
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.7);
}
.bs-cab--more {
  background: rgba(255,46,107,0.12);
  border-color: rgba(255,46,107,0.32);
  color: var(--accent);
}
.bs-row__chev {
  color: rgba(255,255,255,0.3);
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
}

/* empty state */
.bs-empty {
  text-align: center;
  padding: 40px 24px;
  color: rgba(255,255,255,0.5);
}
.bs-empty__ic { font-size: 36px; margin-bottom: 8px; }
.bs-empty__title { font: 600 15px/1.3 var(--font-display); color: rgba(255,255,255,0.85); margin-bottom: 4px; }
.bs-empty__sub { font: 400 12px/1.3 var(--font-body); }
.bs-empty--onboarding {
  padding-top: 28px;
}
.bs-empty--onboarding .btn {
  margin-top: 10px;
}
.bs-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.bs-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 16px 12px 24px;
  color: rgba(255,255,255,0.5);
  font: 500 12px/1.4 var(--font-body);
}
.bs-more .btn {
  min-width: 144px;
}

.preset-modal .body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.preset-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.preset-intro__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,46,107,0.16);
  border: 1px solid rgba(255,46,107,0.34);
  font-size: 22px;
  flex: 0 0 auto;
}
.preset-intro__title {
  color: var(--text-primary);
  font: 800 18px/1.25 var(--font-display);
}
.preset-intro__sub {
  color: var(--text-secondary);
  font: 500 12px/1.55 var(--font-body);
  margin-top: 4px;
}
.preset-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.preset-stats div {
  min-width: 0;
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.preset-stats b {
  display: block;
  color: var(--text-primary);
  font: 800 20px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.preset-stats span {
  display: block;
  color: var(--text-tertiary);
  font: 700 10px/1.2 var(--font-body);
  margin-top: 6px;
}

@media (max-width: 520px) {
  .preset-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* マップに重なる時、既存 map-command を peek 時に隠す（重複防止） */
.bottomsheet--half ~ .map-overlay,
.bottomsheet--full ~ .map-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}
.bottomsheet--peek ~ .map-overlay {
  opacity: 1;
  transition: opacity 0.2s var(--ease-out);
}

/* peek の時に map-command が地図下に被らないよう少し上に */
.bottomsheet--peek + .bs-empty + .map-overlay { /* noop */ }

/* 既存 map-content の chips/legend を控えめに（BottomSheetが主役） */
.bottomsheet--full + .map-content,
.bottomsheet--half + .map-content {
  display: none;
}

/* =====================================================
 * v3.3 Hotfix ─ Chrome実機検証で見えた問題の修正
 * 1. 右上FABを地味なガラスボタンに（specificity強化）
 * 2. 右下のレガシー#fabを完全に非表示
 * 3. 地図画面の .map-content を常時非表示（BottomSheetが主役）
 * ===================================================== */

/* (1) 右上 app-action FAB → 地味なガラス調アイコンボタン */
.appbar .app-action,
header.appbar .app-action,
.app-header .app-action {
  background: rgba(255,255,255,0.08) !important;
  background-color: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: none !important;
  color: rgba(255,255,255,0.72) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  width: 36px !important;
  height: 36px !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.appbar .app-action:hover,
.app-header .app-action:hover {
  background: rgba(255,255,255,0.14) !important;
  color: #fff !important;
}

/* (2) レガシー右下FAB を完全に隠す（中央FABに統一） */
.fab,
#fab,
button.fab,
button#fab {
  display: none !important;
}

/* (3) 地図画面：.map-content（legend + share-card + recent）を非表示 */
/*    BottomSheetが検索・フィルター・リストの全機能を持つ */
.page[data-page="map"] .map-content {
  display: none !important;
}
/* recent / share-card も念のため個別に */
.page[data-page="map"] .share-card,
.page[data-page="map"] .map-legend {
  display: none !important;
}

/* (4) 地図ステージの高さを画面全体に近く拡張 */
/*    BottomSheet が下から来るので、地図は画面いっぱい */
.page[data-page="map"] {
  margin: -14px -14px 0 !important;
  padding: 0 !important;
}
.map-dashboard {
  display: block;
}
.map-stage {
  position: relative;
  min-height: calc(100vh - 64px - 64px - env(safe-area-inset-bottom, 0px)) !important;
  /* viewport - appbar - bottomnav */
  border-bottom: none !important;
}
#map {
  height: calc(100vh - 64px - 64px - env(safe-area-inset-bottom, 0px)) !important;
  min-height: 460px !important;
}

/* (5) BottomSheet を地図ステージ内に固定（map-stageの底に） */
.map-stage .bottomsheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
}

.map-stage > #map {
  position: relative;
  z-index: 1;
}
.map-stage::after {
  z-index: 2;
}
.map-stage > .map-controls {
  z-index: 530;
}
.map-stage > .bottomsheet {
  z-index: 480;
}

/* (6) ヘッダー上のmap-overlay（"みんなで完璧なちづ"カード）をpeek時のみ表示 */
.map-overlay {
  position: absolute;
  top: 16px; left: 16px; right: 16px;
  z-index: 405;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.map-overlay .map-command {
  pointer-events: auto;
}
/* sheet half/full時はoverlayを隠す（既存ルールは残しつつ強化） */
body:has(.bottomsheet--half) .map-overlay,
body:has(.bottomsheet--full) .map-overlay {
  opacity: 0;
  pointer-events: none;
}

/* (7) ヘッダー高さを揃える */
.appbar {
  min-height: 56px;
}

/* (8) ボトムナビと重ならないよう sheet--peek の高さを調整 */
.bottomsheet--peek {
  height: 88px !important;
}

/* =====================================================
 * v3.4 Arcade Detail Rich ─ aliases / confidence / timeline / sources
 * 2026-05-11
 * ===================================================== */

/* === Hero: closed state === */
.v2-hero--closed::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 1;
}
.v2-hero--closed img { filter: grayscale(0.6); }
.v2-namelong {
  margin-top: 4px;
  font: 500 13px/1.3 var(--font-body);
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

/* === Confidence badge === */
.conf-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 10px/1.2 var(--font-body);
  letter-spacing: 0.02em;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.4);
}
.conf-badge--high {
  color: #5eead4;
  border: 1px solid rgba(94,234,212,0.5);
}
.conf-badge--medium {
  color: #ffd84d;
  border: 1px solid rgba(255,216,77,0.45);
}
.conf-badge--low {
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.2);
}

/* === Info cards (alias, timeline, address, share) === */
.info-card {
  background: rgba(20,22,29,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 12px 10px;
  backdrop-filter: blur(8px);
}
.info-card__label {
  font: 600 11px/1.2 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.info-card__body {
  font: 500 13px/1.4 var(--font-body);
  color: var(--text-primary);
}
.info-card--alias .info-card__body {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.info-card--shrine {
  background: linear-gradient(135deg, rgba(255,216,77,0.10), rgba(255,155,58,0.04));
  border-color: rgba(255,216,77,0.32);
}
.info-card--share .info-card__body {
  cursor: pointer;
  user-select: all;
}

/* === Alias pills === */
.alias-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  font: 500 11px/1.3 var(--font-body);
  color: var(--text-secondary);
}

/* === Timeline events === */
.timeline-events {
  display: flex; flex-direction: column; gap: 6px;
}
.tl-event {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}
.tl-event--open { border-left: 3px solid #5eead4; }
.tl-event--close { border-left: 3px solid #888; opacity: 0.85; }
.tl-event .tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  font-size: 14px;
}
.tl-event--open .tl-dot { background: rgba(94,234,212,0.16); }
.tl-event--close .tl-dot { background: rgba(120,120,130,0.25); }
.tl-event .tl-txt {
  font: 500 13px/1.3 var(--font-body);
  color: var(--text-primary);
}
.tl-event--close .tl-txt { color: var(--text-secondary); text-decoration: line-through; }

/* === Genre pills row === */
.genre-pills-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 12px 12px;
}

/* === Sources === */
.sources-list {
  display: flex; flex-direction: column; gap: 4px;
}
.source-link {
  display: block;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--accent);
  font: 500 11px/1.3 var(--font-mono);
  text-decoration: none;
  word-break: break-all;
  transition: background 0.14s;
}
.source-link:hover {
  background: rgba(255,46,107,0.12);
  border-color: rgba(255,46,107,0.32);
}

/* === Disabled state for CTA when closed === */
.v2-btn--primary:disabled {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.3) !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* =====================================================
 * SaaS launch UX layer: white/black themes + one-hand nav
 * ===================================================== */
*, *::before, *::after { letter-spacing: 0 !important; }

html[data-theme="dark"] {
  --bg-base: #090a0d;
  --bg-elevated: #14161a;
  --bg-elevated-2: #1d2026;
  --bg-overlay: rgba(9,10,13,0.74);
  --text-primary: #f8f8fa;
  --text-secondary: #b5bac6;
  --text-tertiary: #7b818e;
  --border-subtle: rgba(255,255,255,0.07);
  --border-default: rgba(255,255,255,0.13);
  --accent-soft: rgba(255,46,107,0.16);
  --bg: #090a0d;
  --panel: #14161a;
  --panel2: #101216;
  --surface: #14161a;
  --surface2: #1d2026;
  --surface3: #0d0f12;
  --text: #f8f8fa;
  --muted: #b5bac6;
  --line: rgba(255,255,255,0.11);
}

html[data-theme="light"] {
  --bg-base: #f7f8fb;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #eef1f6;
  --bg-overlay: rgba(255,255,255,0.82);
  --text-primary: #14171f;
  --text-secondary: #555d6d;
  --text-tertiary: #7b8494;
  --border-subtle: rgba(20,23,31,0.08);
  --border-default: rgba(20,23,31,0.14);
  --accent-soft: rgba(255,46,107,0.10);
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel2: #f1f4f8;
  --surface: #ffffff;
  --surface2: #f1f4f8;
  --surface3: #ffffff;
  --text: #14171f;
  --muted: #5f6878;
  --line: rgba(20,23,31,0.12);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.9) inset, 0 10px 28px rgba(23,31,45,0.10);
  --shadow-sheet: 0 -8px 32px rgba(23,31,45,0.16);
}

html[data-theme="light"] body,
html[data-theme="light"] main {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,46,107,0.07), transparent 32rem),
    linear-gradient(180deg,#ffffff 0%,#f7f8fb 46%,#eef1f6 100%) !important;
  color: var(--text-primary) !important;
}

html[data-theme="dark"] body,
html[data-theme="dark"] main {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,46,107,0.10), transparent 34rem),
    linear-gradient(180deg,#101116 0%,#090a0d 48%,#0d0f12 100%) !important;
  color: var(--text-primary) !important;
}

body {
  min-height: 100dvh;
  color: var(--text-primary) !important;
  background-attachment: fixed !important;
}

main {
  max-width: 720px !important;
  padding-bottom: calc(112px + env(safe-area-inset-bottom,0px)) !important;
}

.appbar {
  background: var(--bg-overlay) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  backdrop-filter: blur(18px) saturate(1.1);
}

.appbar-inner {
  max-width: 720px;
  margin: 0 auto;
  min-height: 58px;
}

.app-title,
.card h2,
.sec-h h2,
.v2-sec-h h2 {
  color: var(--text-primary) !important;
}

.app-title small,
.muted,
.t-caption,
.sec-h .ct {
  color: var(--text-secondary) !important;
}

.card,
.item,
.share-card,
.scope-box,
.scope-note,
.stat,
.quick-stats .stat-cell,
.v2-card,
.feed-card,
.info-card,
.bottomsheet,
.modal {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: var(--shadow-card);
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .checkrow,
html[data-theme="light"] .arcade-searchbar,
html[data-theme="light"] .bottomsheet__search {
  background: #fff !important;
  color: var(--text-primary) !important;
}

.btn,
.app-action {
  border-radius: 12px !important;
  min-height: 46px;
}

.btn.ghost,
.app-action.ghost {
  background: var(--bg-elevated-2) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
}

.bottom-nav.v2-nav-5 {
  left: 50% !important;
  right: auto !important;
  bottom: calc(10px + env(safe-area-inset-bottom,0px)) !important;
  width: min(96vw, 520px);
  transform: translateX(-50%);
  padding: 8px 10px !important;
  border: 1px solid var(--border-default) !important;
  border-radius: 24px !important;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,0.24), 0 1px 0 rgba(255,255,255,0.08) inset;
  backdrop-filter: blur(20px) saturate(1.2);
}

.bottom-nav.v2-nav-5 button {
  min-width: 0;
  min-height: 54px;
  border-radius: 16px !important;
  color: var(--text-tertiary) !important;
}

.bottom-nav.v2-nav-5 button.active {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.bottom-nav.v2-nav-5 .nav-fab {
  width: 58px !important;
  height: 58px !important;
  margin-top: -20px !important;
  border-radius: 19px !important;
}

.fab#fab { display: none !important; }

.saas-panel {
  margin: 12px;
  padding: 16px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-elevated-2));
  border: 1px solid var(--border-default);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

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

.saas-panel__eyebrow {
  color: var(--accent);
  font: 800 11px/1 var(--font-body);
  text-transform: uppercase;
}

.saas-panel__title {
  margin-top: 5px;
  color: var(--text-primary);
  font: 800 20px/1.2 var(--font-display);
}

.saas-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font: 800 11px/1 var(--font-mono);
  border: 1px solid var(--border-default);
}

.saas-status.is-online {
  color: #06352e;
  background: #5eead4;
  border-color: #5eead4;
}

.saas-status.is-offline {
  color: var(--text-secondary);
  background: var(--bg-elevated-2);
}

.saas-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.feed-empty-state {
  margin: 12px;
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;
  min-height: 180px;
}

.feed-empty-state__icon {
  font-size: 42px;
}

.feed-empty-state__title {
  color: var(--text-primary);
  font: 800 17px/1.25 var(--font-display);
}

.feed-card--cloud .media {
  aspect-ratio: 16/10;
}

.feed-cloud-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font: 800 12px/1 var(--font-body);
  backdrop-filter: blur(8px);
}

@media (max-width: 520px) {
  main {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .appbar-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .saas-actions {
    grid-template-columns: 1fr;
  }

  .bottom-nav.v2-nav-5 {
    width: calc(100vw - 16px);
  }
}
