/* ============================================
   OBIRU Design System
   Color: Pale base + Blue/Cyan accent
   ============================================ */

:root {
  /* Core Palette - Pale Blue System */
  --obiru-bg: #eef6fb;
  --obiru-bg-2: #f5f9fd;
  --obiru-bg-card: rgba(255, 255, 255, 0.85);
  --obiru-pale-1: #daeef9;
  --obiru-pale-2: #c5e4f5;
  --obiru-pale-3: #b0d9f0;

  /* Blue Accent */
  --obiru-blue-light: #7ec8e3;
  --obiru-blue: #5ba4d4;
  --obiru-blue-deep: #3a7fbf;
  --obiru-cyan: #4ecdc4;
  --obiru-cyan-light: #a8e6e0;

  /* Text */
  --text-primary: #1a2e3e;
  --text-secondary: #4a6274;
  --text-muted: #8aa4b4;
  --text-white: #ffffff;

  /* Semantic */
  --obiru-accent: #ff8fab;
  --obiru-gold: #ffd166;
  --obiru-green: #a8d8b9;
  --obiru-success: #52c97a;
  --obiru-warning: #ffd166;

  /* Gradients */
  --grad-main: linear-gradient(135deg, #daeef9 0%, #c5e4f5 50%, #b5d8f0 100%);
  --grad-blue: linear-gradient(135deg, #5ba4d4 0%, #3a7fbf 100%);
  --grad-cyan: linear-gradient(135deg, #7ec8e3 0%, #4ecdc4 100%);
  --grad-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(234,246,253,0.9) 100%);
  --grad-hero: linear-gradient(160deg, #eef6fb 0%, #daeef9 40%, #c5e4f5 100%);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px rgba(91, 164, 212, 0.15);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Typography */
  --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-en: 'Inter', 'SF Pro Display', sans-serif;

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-base: 0.25s ease;
  --trans-slow: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base: 0;
  --z-card: 10;
  --z-modal: 100;
  --z-nav: 200;
  --z-toast: 300;

  /* Nav height */
  --nav-height: 46px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja);
  /* safe-area-inset-top 領域も #app と同じグラデーションで統一 */
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(126,200,227,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 100% 60%, rgba(78,205,196,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(91,164,212,0.1) 0%, transparent 60%),
    linear-gradient(175deg, #eef6fb 0%, #e4f1f9 35%, #daeef9 70%, #d0e8f5 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--nav-height);
  color-scheme: light; /* ダークモード完全無効 */
}

/* ============================================
   App Shell
   ============================================ */
#app {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  /* 全ページ共通の御影バックグラウンド */
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(126,200,227,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 100% 60%, rgba(78,205,196,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(91,164,212,0.1) 0%, transparent 60%),
    linear-gradient(175deg, #eef6fb 0%, #e4f1f9 35%, #daeef9 70%, #d0e8f5 100%);
}

/* ============================================
   Glassmorphic Cards
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.card {
  background: var(--obiru-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 4px 20px rgba(91, 164, 212, 0.1);
  border: 1px solid rgba(255,255,255,0.9);
}

/* ============================================
   Page System
   ============================================ */
.page {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  padding: 0;
  animation: pageIn 0.28s cubic-bezier(0.25, 1, 0.5, 1) both;
  animation-fill-mode: both;
  /* 背景は #app から透視 */
  background: transparent;
}

.page.active {
  display: block;
  opacity: 1;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   Header / AppBar
   ============================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  padding: 14px var(--space-lg);
  padding-top: calc(14px + env(safe-area-inset-top));
  /* 完全透過—ページ背景をそのまま表示 */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header .logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-header .logo .logo-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ページ内ヘッダー（大タイトルニードなページ用） */
.page-hero {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.page-hero-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.page-hero-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.app-header .header-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(91, 164, 212, 0.12);
  color: var(--obiru-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-base);
  font-size: 18px;
  position: relative;
  overflow: visible;
}

/* ベルアイコンSVGのサイズを固定 */
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--obiru-blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(91, 164, 212, 0.25);
  transform: scale(1.05);
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--grad-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(91, 164, 212, 0.3);
}

/* ============================================
   Bottom Navigation (Translucent)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-height);
  z-index: var(--z-nav);
  padding: 0 var(--space-lg);
  padding-bottom: env(safe-area-inset-bottom, 4px);
  /* #app の外にあるので transform の影響を受けない */
  display: flex;
  align-items: center;
  justify-content: space-around;

  /* Ultra-thin translucent glass */
  background: rgba(20, 60, 100, 0.35);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: var(--trans-base);
  position: relative;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  min-width: 44px;
  flex: 1;
}

.nav-item.active {
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: white;
  border-radius: 0 0 4px 4px;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* White outline icons for nav */
.nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--obiru-accent);
  border-radius: var(--radius-full);
  border: 2px solid rgba(58, 127, 191, 0.75);
  font-size: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Floating Action Button - Create OBI (独立・右下固定) */
.fab-create {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
  /* PCでもコンテナ(430px)右端に追従 */
  right: max(20px, calc(50% - 430px/2 + 20px));
  width: 52px;
  height: 52px;
  background: var(--grad-cyan);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(78, 205, 196, 0.55),
              0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans-slow);
  border: none;
  z-index: calc(var(--z-nav) + 1);
  /* 背景透過グラス */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* active のみ（hover はiPhoneで残留するため削除） */
.fab-create:active {
  transform: scale(0.93);
  box-shadow: 0 4px 16px rgba(78, 205, 196, 0.5);
}

.fab-create svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* FAB tooltip label — iPhoneでhoverが残留するため非表示 */
.fab-create::before {
  display: none;
}

/* ============================================
   HOME PAGE - 今日の一冊店長
   ============================================ */
.hero-section {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(126, 200, 227, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--grad-blue);
  color: white;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  box-shadow: 0 2px 8px rgba(91,164,212,0.35);
}
/* hero-label内のアイコンラップは背景なし・白で統一 */
.hero-label .section-icon-wrap {
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
  width: 20px;
  height: 20px;
}

.manager-card {
  background: var(--grad-card);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 8px 32px rgba(91, 164, 212, 0.15), 0 0 0 1px rgba(91, 164, 212, 0.05);
  position: relative;
  overflow: hidden;
}

.manager-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.15) 0%, transparent 70%);
}

.manager-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.manager-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--grad-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
  border: 3px solid white;
}

.manager-info .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.manager-info .role {
  font-size: 11px;
  color: var(--obiru-blue);
  font-weight: 600;
}

.obi-book-card {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* ── book-cover: マネージャーカード書影（72×100px） ── */
.book-cover {
  width: 72px;
  height: 100px;
  border-radius: 7px 3px 3px 7px;
  flex-shrink: 0;
  box-shadow: 5px 5px 14px rgba(0,0,0,0.22), inset -2px 0 0 rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 背表紙 */
.book-cover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: rgba(0,0,0,0.22);
  z-index: 1;
}
/* 光沢 */
.book-cover::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,0.13) 0%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}
/* book-cover: タイトル縦書き */
.book-cover-title-vert {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 5px;
  bottom: 42px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
  letter-spacing: 0.1em;
  line-height: 1.3;
  overflow: hidden;
  z-index: 3;
  display: flex;
  align-items: flex-start;
}
/* book-cover: 帯エリア（下部） */
.book-cover-obi-band {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: rgba(255,255,255,0.92);
  z-index: 4;
  padding: 5px 6px 5px 12px;
  display: flex;
  align-items: center;
  border-top: 1.5px solid rgba(255,255,255,0.35);
}
.book-cover-obi-text {
  font-size: 7px;
  font-weight: 700;
  color: #1a2e3e;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  letter-spacing: 0.01em;
}

.book-cover-inner {
  width: 72px;
  height: 100px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(0,0,0,0.15);
}

.book-info .title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.book-info .author {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.obi-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid var(--obiru-cyan);
  padding-left: var(--space-sm);
}

.like-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-md);
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid rgba(255, 143, 171, 0.3);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  color: var(--obiru-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-base);
}

.like-btn.liked {
  background: rgba(255, 143, 171, 0.1);
  border-color: var(--obiru-accent);
}

.like-btn:hover {
  background: rgba(255, 143, 171, 0.1);
  transform: scale(1.02);
}

.view-btn {
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-slow);
  box-shadow: 0 4px 12px rgba(91, 164, 212, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 164, 212, 0.5);
}

/* Feed Section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg) var(--space-sm);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-link {
  font-size: 12px;
  color: var(--obiru-blue);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* OBI Feed Cards */
.obi-feed {
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.obi-feed-card {
  background: var(--obiru-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(91, 164, 212, 0.08);
  display: flex;
  gap: var(--space-md);
  cursor: pointer;
  transition: var(--trans-base);
}

.obi-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 164, 212, 0.15);
}

/* ── mini-book: obiFeedカード書影（52×72px） ── */
.obi-feed-card .mini-book {
  width: 52px;
  height: 72px;
  border-radius: 5px 3px 3px 5px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 3px 4px 10px rgba(0,0,0,0.22), inset -2px 0 0 rgba(0,0,0,0.18);
}
.mini-book-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: rgba(0,0,0,0.22);
  z-index: 2;
}
.mini-book-spine::after {
  content: '';
  position: absolute;
  left: 3px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.15);
}
.mini-book-inner {
  position: absolute;
  left: 6px; right: 0; top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 3px;
  gap: 4px;
  z-index: 1;
}
.mini-book-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}
.mini-book-title {
  font-size: 6.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
.mini-book-bottom {
  position: absolute;
  bottom: 0; left: 6px; right: 0;
  height: 3px;
  background: rgba(0,0,0,0.12);
  z-index: 2;
}
/* 表面光沢ハイライト */
.obi-feed-card .mini-book::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,0.08) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.obi-feed-card .feed-content {
  flex: 1;
  min-width: 0;
}

.obi-feed-card .feed-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.feed-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--obiru-pale-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--obiru-blue-deep);
}

.feed-username {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.feed-store {
  font-size: 10px;
  color: var(--obiru-blue);
  margin-left: auto;
}

.feed-book-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-obi {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: 8px;
}

.feed-like {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--obiru-accent);
}

.feed-tag {
  background: rgba(91, 164, 212, 0.12);
  color: var(--obiru-blue);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Trending books horizontal scroll */
.trending-scroll {
  padding: 0 var(--space-lg);
  /* 右端にFABが被らないよう余白を確保 */
  padding-right: 80px;
  overflow-x: auto;
  display: flex;
  gap: var(--space-md);
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-sm);
}

.trending-scroll::-webkit-scrollbar { display: none; }

.trending-book {
  flex-shrink: 0;
  width: 120px;
  cursor: pointer;
  transition: var(--trans-base);
}

.trending-book:hover {
  transform: translateY(-3px);
}

/* ── trending-cover: トレンド書影（120×168px） ── */
.trending-cover {
  width: 120px;
  height: 168px;
  border-radius: 8px 4px 4px 8px;
  margin-bottom: 8px;
  box-shadow: 5px 6px 18px rgba(0,0,0,0.28), inset -3px 0 0 rgba(0,0,0,0.22);
  position: relative;
  overflow: hidden;
  background: var(--grad-blue);
}
/* 背表紙 */
.trending-cover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  background: rgba(0,0,0,0.25);
  z-index: 2;
}
/* 表面光沢 */
.trending-cover::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 28%;
  height: 100%;
  background: linear-gradient(to left, rgba(255,255,255,0.13) 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  pointer-events: none;
  z-index: 6;
}
/* タイトル縦書き（背表紙の右側・上部エリア） */
.trending-cover-title-vert {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 6px;
  bottom: 68px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  letter-spacing: 0.12em;
  line-height: 1.3;
  overflow: hidden;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
/* 帯エリア（下部1/3） */
.trending-cover-obi-band {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255,255,255,0.93);
  z-index: 5;
  padding: 7px 8px 7px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 2px solid rgba(255,255,255,0.4);
}
.trending-cover-obi-text {
  font-size: 8.5px;
  font-weight: 700;
  color: #1a2e3e;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  letter-spacing: 0.01em;
}
.trending-cover-obi-count {
  font-size: 7.5px;
  font-weight: 800;
  color: var(--obiru-blue-deep);
  letter-spacing: 0.04em;
  margin-top: 2px;
  flex-shrink: 0;
}

.trending-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 3px;
}

.trending-author {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================
   MAP PAGE - 水彩風マップUI（参考画像準拠）
   ============================================ */

/* マップページ全体ラッパー：通常スクロール */
#page-map {
  /* scroll-area クラスがスクロールを担う */
}

/* タイトル＋検索窓だけ sticky 固定 */
.map-sticky-top {
  position: sticky;
  top: 0;
  z-index: 30;
  /* グラデーション背景を透かして見せる（ホームと同じ質感） */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.map-sticky-top .app-header {
  position: static; /* sticky は親に任せる */
}

/* 検索バー */
.map-search-bar {
  padding: 0 var(--space-lg) 10px;
}

.map-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid rgba(91,164,212,0.2);
  border-radius: var(--radius-full);
  padding: 9px 14px;
  box-shadow: 0 2px 8px rgba(91,164,212,0.08);
}

.map-search-input svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.map-search-input span {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

/* マップコンテナ：画面の1/3 */
.map-container {
  position: relative;
  height: 28vh;
  min-height: 160px;
  max-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: 0 var(--space-lg) var(--space-sm);
  box-shadow: 0 4px 20px rgba(91,164,212,0.15);
}

/* 現在地ボタン（マップ右下） */
.map-locate-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  color: var(--obiru-blue);
  font-size: 18px;
  transition: var(--trans-base);
}

.map-locate-btn:active {
  transform: scale(0.92);
}

/* 水彩風マップビュー */
.map-view {
  width: 100%;
  height: 100%;
  position: relative;
  /* 水彩風ベース：淡いパステルブルー */
  background-color: #e8f4fb;
  background-image:
    /* 公園・緑地（水彩風ぼかし） */
    radial-gradient(ellipse 38% 28% at 18% 28%, rgba(178,224,170,0.55) 0%, rgba(178,224,170,0.1) 70%, transparent 100%),
    radial-gradient(ellipse 28% 22% at 72% 62%, rgba(178,224,170,0.5) 0%, rgba(178,224,170,0.08) 70%, transparent 100%),
    radial-gradient(ellipse 20% 18% at 48% 82%, rgba(178,224,170,0.4) 0%, transparent 100%),
    /* 川・水路（水色） */
    radial-gradient(ellipse 14% 60% at 62% 50%, rgba(160,210,235,0.45) 0%, transparent 100%),
    radial-gradient(ellipse 8% 40% at 40% 30%, rgba(160,210,235,0.3) 0%, transparent 100%),
    /* 淡いクリーム街区 */
    radial-gradient(ellipse 18% 14% at 84% 18%, rgba(255,244,200,0.35) 0%, transparent 100%),
    radial-gradient(ellipse 22% 16% at 12% 72%, rgba(255,244,200,0.3) 0%, transparent 100%),
    /* ベース水彩グラデ */
    linear-gradient(165deg, #d6edf8 0%, #e4f2fb 35%, #cde5f5 65%, #d8eef7 100%);
  overflow: hidden;
}

/* 水彩風道路レイヤー */
.map-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    /* 主要道路（やや太め・白め） */
    linear-gradient(to right, rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    linear-gradient(to right, rgba(255,255,255,0.65), rgba(255,255,255,0.65)),
    linear-gradient(to bottom, rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    linear-gradient(to bottom, rgba(255,255,255,0.65), rgba(255,255,255,0.65)),
    /* 斜め道路風（細め） */
    linear-gradient(38deg, rgba(255,255,255,0.4), rgba(255,255,255,0.4));
  background-size:
    100% 14px,
    100% 8px,
    14px 100%,
    8px 100%,
    6px 100%;
  background-position:
    0 38%,
    0 65%,
    52% 0,
    28% 0,
    70% 0;
  background-repeat:
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* 水彩風建物ブロック */
.map-view::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(210,230,245,0.55) 0%, rgba(210,230,245,0.55) 100%),
    linear-gradient(rgba(215,232,246,0.5) 0%, rgba(215,232,246,0.5) 100%),
    linear-gradient(rgba(205,225,242,0.45) 0%, rgba(205,225,242,0.45) 100%),
    linear-gradient(rgba(220,235,248,0.5) 0%, rgba(220,235,248,0.5) 100%),
    linear-gradient(rgba(208,228,244,0.4) 0%, rgba(208,228,244,0.4) 100%),
    linear-gradient(rgba(212,230,245,0.45) 0%, rgba(212,230,245,0.45) 100%);
  background-size:
    55px 44px,
    72px 56px,
    44px 62px,
    82px 40px,
    50px 72px,
    68px 48px;
  background-position:
    4% 8%,
    66% 6%,
    8% 52%,
    62% 48%,
    33% 76%,
    78% 72%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* Map roads - 非表示 */
.map-road {
  display: none;
}

/* マップ内コンテンツのz-index */
.map-pin, .map-popup, #map-pins > * {
  z-index: 10;
}

/* Map pins - リアルマップ風ピン */
.map-pin {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -100%);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), filter 0.2s;
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.22));
}

.map-pin:hover, .map-pin:active {
  z-index: 20;
  filter: drop-shadow(0 6px 14px rgba(58,127,191,0.45));
  transform: translate(-50%, -110%) scale(1.12);
}

.map-pin .pin-body {
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-slow);
  position: relative;
  border: 2.5px solid rgba(255,255,255,0.7);
}

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

.map-pin.active {
  filter: drop-shadow(0 8px 20px rgba(58,127,191,0.5));
  transform: translate(-50%, -115%) scale(1.18);
  z-index: 30;
}

.pin-blue .pin-body { background: linear-gradient(135deg, #5ba4d4, #3a7fbf); }
.pin-cyan .pin-body { background: linear-gradient(135deg, #4ecdc4, #38b2a8); }
.pin-pink .pin-body { background: linear-gradient(135deg, #ff8fab, #e8607a); }

/* 現在地点ピン */
.current-location-pin {
  position: absolute;
  z-index: 15;
}

.current-location-pin .dot {
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  border: 3px solid var(--obiru-blue);
  box-shadow: 0 2px 8px rgba(91,164,212,0.5);
  position: relative;
  z-index: 2;
}

.current-location-pin .pulse {
  position: absolute;
  top: -6px; left: -6px;
  width: 28px; height: 28px;
  background: rgba(91,164,212,0.25);
  border-radius: 50%;
  animation: locPulse 2s ease-out infinite;
  z-index: 1;
}

.current-location-pin .pulse2 {
  animation-delay: 0.7s;
  background: rgba(91,164,212,0.12);
  width: 36px; height: 36px;
  top: -10px; left: -10px;
}

@keyframes locPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Map popup - 参考画像風白カード */
.map-popup {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
  left: 12px;
  right: 12px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 12px var(--space-md);
  transform: translateY(calc(100% + 80px));
  transition: 0.32s cubic-bezier(0.34, 1.45, 0.64, 1);
  z-index: calc(var(--z-nav) - 1);
  box-shadow: 0 6px 28px rgba(0,0,0,0.12);
  /* page非表示時は確実に隠す */
  pointer-events: none;
}

.map-popup.visible {
  transform: translateY(0);
  pointer-events: auto;
}

/* popup表示中はFABを完全に隠す（z-index競合の完全解決） */
body.map-popup-open .fab-create {
  display: none !important;
}



.popup-handle {
  width: 32px;
  height: 3px;
  background: rgba(91, 164, 212, 0.25);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-sm);
}

/* 近くの書店セクション */
.map-store-section {
  /* ページ全体の scroll-area がスクロールするので overflow 不要 */
}

.map-store-header {
  padding: 10px var(--space-lg) 0;
}

.map-store-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Store list - マップ下の一覧 */
.store-list {
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 12px var(--space-md);
  border: 1px solid rgba(255,255,255,0.92);
  box-shadow: 0 2px 12px rgba(91,164,212,0.08);
  display: flex;
  gap: var(--space-md);
  cursor: pointer;
  transition: var(--trans-base);
  align-items: center;
}

.store-card:hover {
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(91,164,212,0.15);
  background: rgba(255,255,255,0.9);
}

.store-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--grad-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.store-info .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.store-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.store-dist {
  font-size: 11px;
  color: var(--obiru-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.store-event-badge {
  background: rgba(255, 209, 102, 0.2);
  color: #d4a017;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 209, 102, 0.4);
}

.store-obi-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* Map filter tabs */
.map-filter {
  display: flex;
  gap: 8px;
  padding: 6px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: transparent;
}
.map-filter::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid rgba(91,164,212,0.25);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--trans-base);
}

.filter-chip.active {
  background: var(--grad-blue);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(91,164,212,0.4);
}

/* ============================================
   CREATE OBI PAGE - 帯をつくる
   ============================================ */
.create-steps {
  padding: var(--space-md) var(--space-lg);
}

.step-indicator {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xl);
  gap: 0;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--trans-base);
}

.step-dot.done { background: var(--obiru-blue); color: white; }
.step-dot.active { background: var(--grad-cyan); color: white; box-shadow: 0 3px 10px rgba(78,205,196,0.4); }
.step-dot.inactive { background: var(--obiru-pale-1); color: var(--text-muted); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--obiru-pale-2);
  position: relative;
  overflow: hidden;
}

.step-line.done::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--obiru-blue);
}

/* Book search input */
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: white;
  border: 1.5px solid var(--obiru-pale-2);
  border-radius: var(--radius-full);
  padding: 10px 8px 10px var(--space-md);
  margin-bottom: var(--space-md);
  transition: var(--trans-base);
}

.search-box:focus-within {
  border-color: var(--obiru-blue);
  box-shadow: 0 0 0 3px rgba(91, 164, 212, 0.15);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  font-family: var(--font-ja);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* ISBN info card */
.isbn-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(91,164,212,0.08) 0%, rgba(91,164,212,0.04) 100%);
  border: 1px solid rgba(91,164,212,0.2);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: -4px;
  margin-bottom: var(--space-md);
}

.isbn-info-left {
  flex-shrink: 0;
}

.isbn-info-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.isbn-info-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--obiru-blue);
  letter-spacing: 0.03em;
}

.isbn-info-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ISBN badge */
.isbn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--obiru-blue);
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(91,164,212,0.5);
}

/* OBI text editor */
.obi-editor {
  background: white;
  border: 1.5px solid var(--obiru-pale-2);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: var(--trans-base);
}

.obi-editor:focus-within {
  border-color: var(--obiru-blue);
  box-shadow: 0 0 0 3px rgba(91, 164, 212, 0.15);
}

.obi-editor textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--font-ja);
  color: var(--text-primary);
  line-height: 1.8;
  resize: none;
  min-height: 100px;
  background: transparent;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.char-counter.warn { color: var(--obiru-accent); }

/* Design selector */
.design-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.design-option {
  aspect-ratio: 3/1;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--trans-slow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.05em;
}

.design-option.selected {
  border-color: white;
  box-shadow: 0 0 0 3px var(--obiru-blue);
  transform: scale(1.03);
}

/* OBI preview */
.obi-preview {
  background: var(--obiru-bg-2);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  border: 1.5px dashed var(--obiru-pale-3);
}

.obi-band {
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
  color: white;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

.obi-band::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════════════════
   OBI CANVAS — リアルタイムプレビュー
   ═══════════════════════════════════════════════════ */
.obi-canvas-wrap {
  margin-bottom: 28px;
}

.obi-canvas {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.obi-canvas-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.obi-canvas-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px 16px 24px;
  position: relative;
  z-index: 2;
}

.obi-canvas-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
  display: none;
}
.obi-canvas-tag:not(:empty) { display: block; }

.obi-canvas-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  opacity: 0.9;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.obi-canvas-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.obi-canvas-meta span {
  font-size: 10px;
  opacity: 0.6;
  font-weight: 600;
}

.obi-canvas-author {
  font-size: 9px !important;
  opacity: 0.5 !important;
}

.obi-canvas-side {
  width: 6px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.18);
  position: relative;
  z-index: 2;
}

.obi-canvas-label {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   DESIGN CATEGORY TABS
   ═══════════════════════════════════════════════════ */
.design-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.design-category-tabs::-webkit-scrollbar { display: none; }

.design-cat-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--obiru-pale-3);
  background: white;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.design-cat-tab:hover {
  border-color: var(--obiru-blue);
  color: var(--obiru-blue);
  background: var(--obiru-pale-1);
}
.design-cat-tab.active {
  background: var(--obiru-blue);
  border-color: var(--obiru-blue);
  color: white;
  box-shadow: 0 4px 14px rgba(91,164,212,0.4);
}

/* ═══════════════════════════════════════════════════
   DESIGN CARD GRID — 世界最高峰
   ═══════════════════════════════════════════════════ */
.design-grid-new {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.design-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}
.design-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.design-card.selected {
  border-color: var(--obiru-blue);
  box-shadow: 0 0 0 3px rgba(91,164,212,0.35), 0 8px 24px rgba(0,0,0,0.15);
  transform: translateY(-2px) scale(1.01);
}
.design-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  color: var(--obiru-blue);
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 10;
  line-height: 22px;
  text-align: center;
}

.design-card-swatch {
  height: 72px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 8px 10px;
}
/* 光沢オーバーレイ */
.design-card-swatch::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 100%);
  pointer-events: none;
}
/* 背面ストライプ装飾 */
.design-card-swatch::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}

.design-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.25);
  color: white;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 2;
}

.design-card-neon {
  font-size: 11px;
  font-weight: 900;
  color: #00ffcc;
  text-shadow: 0 0 8px #00ffcc, 0 0 20px #00ffcc88;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 2;
}

.design-card-name {
  padding: 9px 12px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  background: white;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   FONT SECTION — 世界最高峰
   ═══════════════════════════════════════════════════ */
.font-section {
  margin-bottom: 24px;
}

.font-section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.font-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--obiru-pale-2);
  background: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  text-align: left;
  overflow: hidden;
}
.font-pill::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 40px;
  border-radius: 0 14px 0 100%;
  background: var(--obiru-pale-1);
  transition: background 0.2s;
}
.font-pill:hover {
  border-color: var(--obiru-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(91,164,212,0.18);
}
.font-pill.selected {
  border-color: var(--obiru-blue);
  background: linear-gradient(135deg, rgba(91,164,212,0.06) 0%, rgba(78,205,196,0.06) 100%);
  box-shadow: 0 6px 20px rgba(91,164,212,0.25);
}
.font-pill.selected::before {
  background: rgba(91,164,212,0.12);
}
.font-pill.selected::after {
  content: '✓';
  position: absolute;
  top: 9px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--obiru-blue);
  color: white;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
  text-align: center;
}

.font-pill-label {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 2px;
}
.font-pill-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.font-pill-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 100px;
  background: var(--obiru-pale-2);
  color: var(--obiru-blue-deep);
  letter-spacing: 0.06em;
}
.font-pill.selected .font-pill-tag {
  background: var(--obiru-blue);
  color: white;
}

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-slow);
  box-shadow: 0 6px 20px rgba(91, 164, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  letter-spacing: 0.04em;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(91, 164, 212, 0.5);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Book search results */
.book-result-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 300px;
  overflow-y: auto;
}

.book-result-item {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--trans-base);
  background: white;
  border: 1.5px solid transparent;
}

.book-result-item:hover, .book-result-item.selected {
  border-color: var(--obiru-blue);
  background: rgba(91, 164, 212, 0.05);
}

.book-result-item .mini-cover {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  background: var(--grad-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.12);
}

/* ============================================
   CHECKIN / QR PAGE
   ============================================ */
.qr-scanner {
  margin: var(--space-lg) auto;
  width: calc(100% - var(--space-lg) * 2);
  max-width: 360px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  background: rgba(10, 30, 50, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-frame {
  width: 200px;
  height: 200px;
  position: relative;
}

.qr-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--obiru-cyan);
  border-style: solid;
}

.qr-corner.tl { top: 0; left: 0; border-width: 3px 0 0 3px; }
.qr-corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; }
.qr-corner.bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.qr-corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.qr-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--obiru-cyan), transparent);
  animation: scanLine 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--obiru-cyan);
}

@keyframes scanLine {
  0%, 100% { top: 0; }
  50% { top: 100%; }
}

.checkin-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}

.checkin-success.visible { display: flex; }

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--grad-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4);
}

@keyframes bounceIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ============================================
   PASSPORT / STAMP PAGE
   ============================================ */
.passport-header {
  /* 背景を #app のグラデーションに乗せる—独自背景なし */
  background: transparent;
  padding: 0 var(--space-lg) var(--space-lg);
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.passport-header .passport-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.passport-header .passport-sub {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}

.passport-stats {
  display: flex;
  gap: var(--space-sm);
  margin-top: 0;
}

.passport-stat {
  flex: 1;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-sm);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(91,164,212,0.08);
}

.passport-stat .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--obiru-blue);
  display: block;
}

.passport-stat .label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.3;
}

/* Stamp grid */
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  padding: var(--space-lg);
}

.stamp {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--trans-slow);
  position: relative;
}

.stamp.earned {
  box-shadow: 0 4px 12px rgba(91, 164, 212, 0.3);
}

.stamp.earned:hover {
  transform: scale(1.08) rotate(-3deg);
}

.stamp.empty {
  background: var(--obiru-pale-1);
  border: 2px dashed var(--obiru-pale-3);
}

.stamp-icon { font-size: 20px; }
.stamp-name { font-size: 8px; color: white; font-weight: 700; text-align: center; line-height: 1.2; }

.challenge-card {
  margin: 0 var(--space-lg) var(--space-md);
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(91, 164, 212, 0.08);
}

.progress-bar {
  height: 8px;
  background: var(--obiru-pale-1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background: var(--grad-blue);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   PROFILE / RANK PAGE
   ============================================ */
.profile-hero {
  background: transparent;
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
  text-align: center;
  position: relative;
  overflow: visible;
}

.profile-crown-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.profile-crown-img {
  width: 96px;
  height: auto;
  background: transparent;
  display: block;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--obiru-cyan), var(--obiru-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 0;
  border: 4px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 24px rgba(78,205,196,0.4), 0 0 0 6px rgba(78,205,196,0.1);
}

/* ユーザー名 */
.profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

/* ランクpill（ランク名のみ、王冠は別） */
.profile-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(91,164,212,0.2);
  border-radius: var(--radius-full);
  padding: 6px 20px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px rgba(91,164,212,0.12);
  transition: transform 0.15s ease;
}
.profile-rank-pill:active { transform: scale(0.97); }
.profile-rank-pill-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--obiru-blue-deep);
  letter-spacing: 0.04em;
}
.profile-rank-pill-ja {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* 旧 rank-badge（後方互換） */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,164,212,0.12);
  border-radius: var(--radius-full);
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--obiru-blue);
  border: 1.5px solid rgba(91,164,212,0.25);
  margin-bottom: var(--space-sm);
}

.rank-next-info {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: var(--space-sm);
}

.profile-stats-row {
  display: flex;
  margin: 0 0 0 0;
  margin-top: 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: 0 4px 20px rgba(91,164,212,0.12);
  border: 1px solid rgba(255,255,255,0.95);
  position: relative;
  z-index: 5;
}

.profile-stat {
  flex: 1;
  text-align: center;
  padding: var(--space-sm);
}

.profile-stat .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--obiru-blue);
  display: block;
}

.profile-stat .label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-stat + .profile-stat {
  border-left: 1px solid var(--obiru-pale-1);
}

.perk-list {
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.perk-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--obiru-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.9);
  font-size: 13px;
  color: var(--text-primary);
}

.perk-icon {
  width: 36px;
  height: 36px;
  background: rgba(91, 164, 212, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================
   EVENT PAGE
   ============================================ */
.event-hero {
  margin: 0 var(--space-lg) var(--space-md);
  background: var(--grad-blue);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-lg);
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(58,127,191,0.3);
}

.event-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.event-hero::after {
  content: '📚';
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-md);
  font-size: 52px;
  opacity: 0.25;
}

.event-date-badge {
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: var(--space-sm);
  border: 1px solid rgba(255,255,255,0.3);
}

/* ============================================
   イベントページ レイアウト
   ============================================ */

/* ページ全体: 非表示時は .page の display:none を維持 */
.events-layout {
  flex-direction: column;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

/* アクティブ時だけ flex に切り替え */
.events-layout.active {
  display: flex;
}

/* ヘッダーを常時表示（scroll-areaの外なので自動で固定） */
.events-page-header {
  flex-shrink: 0;
  position: static;   /* flexアイテムとして上部に留まる */
}

/* 店長トークカードは events-layout の直接子 → スクロールに巻き込まれない */
.events-layout > .manager-talk-card {
  flex-shrink: 0;
}

/* イベントリスト部分だけスクロール */
.events-scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.events-scroll-area::-webkit-scrollbar { display: none; }

/* ============================================
   今日の一冊店長トーク カード
   ============================================ */
.manager-talk-card {
  margin: 0 var(--space-lg) var(--space-lg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  min-height: 200px;
  background: linear-gradient(135deg, #3a7fbf 0%, #5ba4d4 50%, #4ecdc4 100%);
  box-shadow:
    0 12px 40px rgba(58, 127, 191, 0.35),
    0 4px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.manager-talk-card:active {
  transform: scale(0.985);
  box-shadow: 0 6px 20px rgba(58,127,191,0.3);
}

/* bookclub イラスト：右半分に大きく */
.manager-talk-illust {
  position: absolute;
  right: -8px;
  bottom: 0;
  height: 190px;
  width: auto;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  filter: drop-shadow(-4px 0 12px rgba(0,0,0,0.15));
}

/* テキスト部分 */
.manager-talk-body {
  position: relative;
  z-index: 2;
  padding: var(--space-lg);
  /* 左側にテキスト、右はイラスト */
  max-width: 65%;
}

.manager-talk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  white-space: nowrap;
}
.talk-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffeb3b;
  flex-shrink: 0;
  animation: talkDotPulse 1.6s ease-in-out infinite;
}
@keyframes talkDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.manager-talk-title {
  font-size: 19px;
  font-weight: 900;
  color: white;
  line-height: 1.3;
  margin-bottom: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.manager-talk-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  margin-bottom: 14px;
}

.manager-talk-host {
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-talk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.manager-talk-host-name {
  font-size: 12px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.manager-talk-host-role {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
}
.manager-talk-join-btn {
  margin-left: auto;
  background: white;
  color: var(--obiru-blue-deep);
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.event-list {
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.event-card {
  background: var(--obiru-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(91, 164, 212, 0.08);
  cursor: pointer;
  transition: var(--trans-base);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(91, 164, 212, 0.18);
}

.event-card-top {
  height: 8px;
}

.event-card-body {
  padding: var(--space-md);
}

.event-card-meta {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  align-items: center;
}

.event-tag {
  background: rgba(91, 164, 212, 0.12);
  color: var(--obiru-blue);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.event-date {
  font-size: 11px;
  color: var(--text-muted);
}

.event-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.event-venue {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.event-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--obiru-bg-2);
  border-top: 1px solid var(--obiru-pale-1);
}

.capacity-info {
  font-size: 11px;
  color: var(--text-muted);
}

.join-btn {
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-base);
}

.join-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(91, 164, 212, 0.4);
}

/* ============================================
   REVIEW (2026年のふりかえり)
   ============================================ */
.review-header {
  /* 独自背景なし— ページ背景から浮かび上がる */
  background: transparent;
  padding: 0 var(--space-lg) var(--space-md);
  text-align: left;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.review-year {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 0.9;
  display: block;
  margin-bottom: 4px;
}

.review-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: var(--space-lg);
}

.review-stat-card {
  background: var(--obiru-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 16px rgba(91, 164, 212, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stat-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--obiru-blue);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Genre pills */
.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: 0 var(--space-lg) var(--space-md);
}

.genre-pill {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

/* ============================================
   INVITE PAGE
   ============================================ */
.invite-hero {
  background: transparent;
  padding: 0 var(--space-lg) var(--space-md);
  text-align: center;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.invite-count {
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.invite-code-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(91, 164, 212, 0.12);
}

.invite-code {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--obiru-blue);
}

.copy-btn {
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-base);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 60, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: calc(var(--z-modal) + 50);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--obiru-bg-2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + var(--nav-height) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(92vh - var(--nav-height));
  overflow-y: auto;
}

.modal-overlay.visible .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--obiru-pale-3);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 72px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  background: var(--text-primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
}

.toast.success { background: var(--obiru-cyan); }
.toast.error { background: #e74c3c; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-blue { color: var(--obiru-blue); }
.text-muted { color: var(--text-muted); }
.text-white { color: white; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 10px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.p-md { padding: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.w-full { width: 100%; }

.divider {
  height: 1px;
  background: var(--obiru-pale-1);
  margin: var(--space-md) var(--space-lg);
}

.section-pad {
  padding: var(--space-md) var(--space-lg);
}

/* Scroll area */
.scroll-area {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* Loading skeleton */
@keyframes shimmer {
  from { background-position: -200% center; }
  to { background-position: 200% center; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--obiru-pale-1) 25%,
    var(--obiru-pale-2) 50%,
    var(--obiru-pale-1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 430px) {
  #app {
    box-shadow: 0 0 60px rgba(91, 164, 212, 0.2);
  }
}

@media (max-width: 380px) {
  .stamp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Safe area for iOS */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom), 4px);
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }
  .fab-create {
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px);
    right: max(20px, calc(50% - 430px/2 + 20px));
  }
}

/* Dark mode */
/* ダークモード無効化 — ライトトーン固定 */

/* Install prompt */
.install-banner {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 16px;
  right: 16px;
  max-width: 398px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(91, 164, 212, 0.2);
  box-shadow: 0 8px 32px rgba(91, 164, 212, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: calc(var(--z-nav) - 1);
  display: none;
  align-items: center;
  gap: var(--space-md);
}

.install-banner.show { display: flex; }

.install-text { flex: 1; font-size: 13px; color: var(--text-secondary); }
.install-text strong { color: var(--text-primary); }

.install-btn {
  background: var(--grad-blue);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}

/* ============================================
   ILLUSTRATION IMAGES
   ============================================ */

/* ① ホーム ヒービジュアル (girl-reading) */
.home-hero-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 var(--space-lg) 0 0;
  margin-top: -8px;
  margin-bottom: -12px;
  overflow: hidden;
  height: 130px;
  pointer-events: none;
}

.hero-illust {
  height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(91,164,212,0.18));
  position: relative;
  z-index: 2;
}

.hero-illust-caption {
  position: absolute;
  left: var(--space-lg);
  bottom: 18px;
}

.hero-illust-tag {
  background: rgba(91,164,212,0.12);
  border: 1px solid rgba(91,164,212,0.25);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--obiru-blue);
  white-space: nowrap;
}

/* ② みんなの帯バナー (two-girls-share) */
.feed-visual-banner {
  margin: 0 var(--space-lg) var(--space-md);
  background: linear-gradient(135deg, rgba(91,164,212,0.08), rgba(78,205,196,0.08));
  border: 1px solid rgba(91,164,212,0.15);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  overflow: hidden;
}

.feed-banner-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.08));
}

.feed-banner-text {
  flex: 1;
  min-width: 0;
}

.feed-banner-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.feed-banner-sub {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ③ 帯作成ページ (hand-writing-obi) */
.create-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-lg) 0;
  gap: 6px;
}

.create-illust {
  width: 100%;
  max-width: 280px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(91,164,212,0.15));
}

.create-visual-caption {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  margin: 0;
}

/* ④ チェックインページ (qr-scan) */
.checkin-visual {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.checkin-illust {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(78,205,196,0.2));
}

/* ⑤ パスポートページ (four-seasons) */
.passport-visual {
  display: flex;
  justify-content: center;
  padding: 0 var(--space-lg);
  margin: -28px 0 -12px; /* ヘッダー直下にくっつける */
  background: transparent;
}

.passport-illust {
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(91,164,212,0.15));
}

/* ⑥ 店長カード bookclub画像：削除済みのため非表示 */
.manager-bookclub-img {
  display: none;
}

/* ============================================
   PULL TO REFRESH
   ============================================ */

/* インジケーター本体：画面最上部に固定 */
#ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: none;
  will-change: transform;
}

#ptr-indicator.ptr-releasing,
#ptr-indicator.ptr-loading {
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* バブル本体 */
.ptr-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 6px 24px rgba(91, 164, 212, 0.4),
    0 2px 8px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* overflow: hidden は使わない → SVGリングが切れない */
}

/* SVGリング：バブルより少し大きく配置してリングが全周見える */
.ptr-ring {
  position: absolute;
  inset: -4px;          /* バブル外周にはみ出させる */
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  pointer-events: none;
}

.ptr-ring-track {
  stroke: rgba(91, 164, 212, 0.15);
  fill: none;
  stroke-dasharray: 150.8;   /* 2πr = 2×π×24 ≈ 150.8 */
  stroke-dashoffset: 0;
}

.ptr-ring-fill {
  stroke: var(--obiru-cyan);
  fill: none;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 150.8;  /* 0% = 全部隠れている */
  transition: none;
  filter: drop-shadow(0 0 3px rgba(78,205,196,0.5));
}

/* 矢印アイコン */
.ptr-arrow {
  width: 24px;
  height: 24px;
  color: var(--obiru-blue);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  position: relative;
  z-index: 1;
}

/* リリース可能状態 → 矢印が上を向く + シアンに */
#ptr-indicator.ptr-ready .ptr-arrow {
  transform: rotate(180deg) scale(1.1);
  color: var(--obiru-cyan);
}

/* ローディング状態 → 矢印非表示 */
#ptr-indicator.ptr-loading .ptr-arrow {
  display: none;
}

/* ローディングスピナー */
.ptr-spinner {
  display: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(91,164,212,0.18);
  border-top-color: var(--obiru-blue);
  border-radius: 50%;
  animation: ptrSpin 0.65s linear infinite;
  position: relative;
  z-index: 1;
}

#ptr-indicator.ptr-loading .ptr-spinner {
  display: block;
}

/* ローディング中はリングも回転 */
#ptr-indicator.ptr-loading .ptr-ring {
  animation: ptrRingRotate 1.2s linear infinite;
}

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

/* ページ本体を引っ張ったとき下げる（margin-topでtransformを使わない → fixedナビへの影響ゼロ） */
#app {
  transition: none;
}
#app.ptr-pulling {
  transition: none;
}
#app.ptr-releasing {
  transition: margin-top 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#app.ptr-snap-back {
  transition: margin-top 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 完了フラッシュ */
.ptr-done-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--obiru-blue), var(--obiru-cyan));
  z-index: 10000;
  transform: scaleX(0);
  transform-origin: left;
  animation: ptrFlash 0.6s ease-out forwards;
}

@keyframes ptrFlash {
  0%   { transform: scaleX(0); opacity: 1; }
  60%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ============================================
   ADMIN PAGE - J-BOOK 管理ダッシュボード
   ============================================ */

/* ── レイアウト ── */
.admin-layout {
  display: none;
  flex-direction: column;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
  background: #f4f6f9;
}
.admin-layout.active {
  display: flex;
}
.admin-sticky-top {
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 30;
}
.admin-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px 32px;
}

/* ── ヘッダー ── */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
  min-height: 52px;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-logo-icon {
  font-size: 20px;
}
.admin-logo-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.admin-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  margin-top: 1px;
}
.admin-period-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-period-btn:active {
  background: rgba(255,255,255,0.25);
}

/* ── タブ ── */
.admin-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 2px solid #eef0f4;
  background: #fff;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.admin-tab.active {
  color: #2d6a9f;
  border-bottom-color: #2d6a9f;
  font-weight: 700;
}

/* ── タブコンテンツ ── */
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* ── セクション共通 ── */
.admin-section {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.admin-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
  letter-spacing: 0.3px;
}

/* ── KPI グリッド ── */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border-left: 3px solid var(--kpi-color, #3a7fbf);
  position: relative;
  overflow: hidden;
}
.admin-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 40px;
  background: var(--kpi-color, #3a7fbf);
  opacity: 0.06;
  border-radius: 0 12px 0 100%;
}
.admin-kpi-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.admin-kpi-body { flex: 1; min-width: 0; }
.admin-kpi-label {
  font-size: 10px;
  color: #888;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: #1a3a5c;
  line-height: 1.1;
}
.admin-kpi-unit {
  font-size: 11px;
  font-weight: 500;
  color: #666;
  margin-left: 2px;
}
.admin-kpi-sub {
  font-size: 10px;
  color: #aaa;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-kpi-formula {
  font-size: 9px;
  color: #bbb;
  margin-top: 3px;
  line-height: 1.4;
  font-style: italic;
  border-top: 1px solid #f0f0f0;
  padding-top: 3px;
}

/* PROTOTYPE バッジ */
.admin-proto-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── ネットワークバナー ── */
.admin-network-banner {
  background: linear-gradient(135deg, #f8fbff 0%, #edf4fc 100%);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #d0e4f5;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(58,127,191,0.1);
}
.admin-network-left { flex: 0 0 auto; }
.admin-network-label {
  font-size: 10px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.admin-network-value {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: #27ae60;
}
.admin-network-desc {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}
.admin-network-right { flex: 1; }
.admin-network-bar-wrap {
  height: 10px;
  background: #e0e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}
.admin-network-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.admin-network-target {
  font-size: 10px;
  color: #aaa;
  text-align: right;
}

/* ── チャートラップ ── */
.admin-chart-legend {
  display: flex;
  gap: 12px;
}
.admin-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #888;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-label {
  font-size: 10px;
  color: #888;
}
.admin-chart-wrap {
  height: 160px;
  position: relative;
}
.admin-chart-wrap canvas {
  width: 100% !important;
}

/* ── ファネル ── */
.admin-funnel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-funnel-label {
  font-size: 11px;
  color: #555;
  width: 120px;
  flex-shrink: 0;
  text-align: right;
}
.admin-funnel-bar-wrap {
  flex: 1;
  height: 24px;
  background: #f0f4f8;
  border-radius: 4px;
  overflow: hidden;
}
.admin-funnel-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: width 0.8s ease;
  min-width: 40px;
  position: relative;
}
.admin-funnel-count {
  position: absolute;
  left: 8px;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.admin-funnel-rate {
  font-size: 11px;
  color: #888;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* ── セグメントグリッド ── */
.admin-segment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-segment-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e8edf3;
}
.admin-segment-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.admin-segment-name {
  font-size: 12px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 2px;
}
.admin-segment-count {
  font-size: 16px;
  font-weight: 800;
  color: #2d6a9f;
}
.admin-segment-pct {
  font-size: 11px;
  color: #888;
  margin-bottom: 6px;
}
.admin-segment-bar-wrap {
  height: 6px;
  background: #e0e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.admin-segment-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.admin-segment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.admin-segment-meta span {
  font-size: 10px;
  color: #888;
  background: #edf2f7;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── 店舗ツールバー ── */
.admin-store-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.admin-search {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  outline: none;
}
.admin-search:focus {
  border-color: #3a7fbf;
  box-shadow: 0 0 0 3px rgba(58,127,191,0.1);
}
.admin-sort-select {
  padding: 9px 10px;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  outline: none;
  color: #555;
}

/* ── 店舗カード ── */
.admin-store-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  border-left: 4px solid #4ecdc4;
  position: relative;
  transition: box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.admin-store-card:active {
  transform: scale(0.98);
  box-shadow: 0 0 2px rgba(0,0,0,0.08);
}
.admin-store-warning {
  border-left-color: #e74c3c;
}
.admin-store-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.admin-store-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 3px;
}
.admin-store-region {
  font-size: 11px;
  color: #888;
}
.admin-score-badge {
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.admin-score-badge.good {
  background: #e8f8f0;
  color: #27ae60;
}
.admin-score-badge.warn {
  background: #fdecea;
  color: #e74c3c;
}
.admin-store-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.admin-store-metric {
  text-align: center;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 4px;
}
.metric-val {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #2d6a9f;
}
.metric-lbl {
  display: block;
  font-size: 9px;
  color: #aaa;
  margin-top: 2px;
}
.admin-store-card-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-size: 18px;
  color: #c0c8d0;
}

/* ── 店舗ドリルダウン ── */
.admin-store-detail {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.admin-store-detail.hidden { display: none; }
.admin-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #f0f4f8;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: #2d6a9f;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}
.admin-detail-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f4;
}
.admin-detail-store-name {
  font-size: 18px;
  font-weight: 800;
  color: #1a3a5c;
  margin-bottom: 4px;
}
.admin-detail-store-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}
.admin-detail-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.status-ok  { background: #e8f8f0; color: #27ae60; }
.status-warn{ background: #fdecea; color: #e74c3c; }

.admin-detail-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.admin-detail-kpi {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #e8edf3;
}
.dk-val {
  font-size: 18px;
  font-weight: 800;
  color: #2d6a9f;
  line-height: 1.1;
}
.dk-lbl {
  font-size: 10px;
  color: #aaa;
  margin-top: 3px;
}

/* ── ミニトレンドバー ── */
.admin-mini-trend {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
}
.admin-mini-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.admin-mini-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.admin-mini-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
}
.admin-mini-label {
  font-size: 9px;
  color: #aaa;
  margin-top: 3px;
}
.admin-mini-val {
  font-size: 9px;
  color: #888;
  font-weight: 600;
}

/* ── 比較テーブル ── */
.admin-compare-table { font-size: 12px; }
.admin-compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f8;
  align-items: center;
}
.admin-compare-head {
  font-weight: 700;
  color: #888;
  font-size: 11px;
  padding-bottom: 6px;
}
.admin-compare-row.highlight {
  background: #f0f8ff;
  border-radius: 6px;
  padding: 8px 6px;
  font-weight: 700;
  color: #2d6a9f;
}

/* ── 地域カード ── */
.admin-region-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  gap: 12px;
  border-left: 4px solid #3a7fbf;
  transition: box-shadow 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.admin-region-card:active {
  transform: scale(0.98);
}
.admin-region-card-left { flex: 1; min-width: 0; }
.admin-region-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 3px;
}
.admin-region-meta {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
}
.admin-region-bar-wrap {
  height: 6px;
  background: #e0e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.admin-region-bar {
  height: 100%;
  background: linear-gradient(90deg, #3a7fbf, #4ecdc4);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.admin-region-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.admin-region-kpi {
  text-align: right;
  display: flex;
  flex-direction: column;
}
.admin-region-kpi span:first-child {
  font-size: 16px;
  font-weight: 800;
  color: #1a3a5c;
}
.rk-lbl {
  font-size: 9px;
  color: #aaa;
}
.admin-region-arrow {
  font-size: 18px;
  color: #c0c8d0;
}

/* ── 地域内店舗テーブル ── */
.admin-region-store-table { font-size: 12px; }
.admin-region-store-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f8;
}
.admin-region-store-head {
  font-weight: 700;
  color: #888;
  font-size: 11px;
}

/* ── ユーザーセグメント詳細 ── */
.admin-user-seg-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-user-seg-header {
  padding-left: 10px;
  margin-bottom: 12px;
}
.admin-user-seg-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a5c;
}
.admin-user-seg-count {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.admin-user-seg-metrics { display: flex; flex-direction: column; gap: 8px; }
.admin-user-seg-metric {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-user-seg-metric-label {
  width: 60px;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}
.admin-user-seg-metric-bar-wrap {
  flex: 1;
  height: 8px;
  background: #f0f4f8;
  border-radius: 4px;
  overflow: hidden;
}
.admin-user-seg-metric-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.admin-user-seg-metric-val {
  width: 42px;
  font-size: 12px;
  font-weight: 700;
  color: #2d6a9f;
  text-align: right;
  flex-shrink: 0;
}

/* ── コホートテーブル ── */
.admin-cohort-table { overflow-x: auto; }
.admin-cohort-row {
  display: grid;
  grid-template-columns: 90px repeat(6, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.admin-cohort-cell {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  border-radius: 4px;
}
.admin-cohort-head {
  font-weight: 700;
  color: #888;
  font-size: 10px;
}
.admin-cohort-label {
  font-size: 10px;
  color: #555;
  text-align: left;
  padding-left: 4px;
  display: flex;
  align-items: center;
}
.admin-cohort-val {
  font-weight: 700;
}
.admin-cohort-na {
  color: #ccc;
  background: #f8fafc;
}
.admin-cohort-legend {
  margin-top: 8px;
  text-align: right;
}

/* ── リコメンドカード ── */
.admin-badge-count {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: #eef4fb;
  color: #2d6a9f;
  font-weight: 700;
}
.admin-badge-count.urgent {
  background: #fdecea;
  color: #e74c3c;
}
.admin-rec-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  cursor: pointer;
  border-left: 4px solid #ccc;
  transition: box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.admin-rec-card.priority-high { border-left-color: #e74c3c; }
.admin-rec-card.priority-med  { border-left-color: #f39c12; }
.admin-rec-card.priority-low  { border-left-color: #27ae60; }
.admin-rec-card:active { box-shadow: 0 0 2px rgba(0,0,0,0.06); }
.admin-rec-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.admin-rec-priority-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.admin-rec-type {
  font-size: 11px;
  color: #888;
  background: #f0f4f8;
  padding: 3px 8px;
  border-radius: 8px;
}
.admin-rec-timing {
  font-size: 11px;
  color: #f39c12;
  font-weight: 600;
  margin-left: auto;
}
.admin-rec-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 6px;
}
.admin-rec-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}
.admin-rec-body {
  font-size: 12px;
  color: #555;
  line-height: 1.7;
  margin-top: 6px;
}
.admin-rec-detail {
  margin-top: 12px;
  border-top: 1px solid #f0f4f8;
  padding-top: 12px;
}
.admin-rec-detail.hidden { display: none; }
.admin-rec-detail-inner { display: flex; flex-direction: column; gap: 10px; }
.admin-rec-detail-section {}
.admin-rec-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #2d6a9f;
  margin-bottom: 4px;
}
.admin-rec-detail-body {
  font-size: 12px;
  color: #555;
  line-height: 1.7;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
}
.admin-rec-toggle-hint {
  font-size: 11px;
  color: #bbb;
  text-align: right;
  margin-top: 8px;
}

/* ── ナビバー管理ボタン ── */
.nav-item-admin .nav-icon svg {
  stroke: none;
  fill: currentColor;
}
.nav-item-admin.active .nav-icon,
.nav-item-admin.active .nav-label {
  color: #2d6a9f;
}

/* ── その他ユーティリティ ── */
.admin-empty {
  text-align: center;
  padding: 24px;
  color: #aaa;
  font-size: 13px;
}


/* ============================================
   NOTIFY PAGE - 今日の一冊・入荷通知
   ============================================ */

.notify-today-wrap {
  margin: 12px 12px 4px;
  background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fc 100%);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #c8e0f5;
  box-shadow: 0 2px 10px rgba(58,127,191,0.10);
}
.notify-today-label {
  font-size: 11px;
  font-weight: 700;
  color: #2d6a9f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.notify-today-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.notify-today-cover {
  font-size: 44px;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}
.notify-today-body { flex: 1; min-width: 0; }
.notify-today-reason {
  font-size: 10px;
  color: #3a7fbf;
  font-weight: 700;
  background: rgba(58,127,191,0.1);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.notify-today-title {
  font-size: 17px;
  font-weight: 800;
  color: #1a3a5c;
  line-height: 1.2;
  margin-bottom: 2px;
}
.notify-today-author {
  font-size: 11px;
  color: #888;
  margin-bottom: 8px;
}
.notify-obi-wrap {
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  border-left: 3px solid #3a7fbf;
  margin-bottom: 10px;
}
.notify-obi-text {
  font-size: 12px;
  color: #333;
  font-style: italic;
  line-height: 1.6;
}
.notify-obi-by {
  font-size: 10px;
  color: #aaa;
  margin-top: 4px;
  text-align: right;
}
.notify-visit-btn {
  width: 100%;
  padding: 9px 12px;
  background: linear-gradient(135deg, #3a7fbf, #2d6a9f);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.notify-arrivals-list { padding: 0 12px; }
.notify-arrival-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.notify-arrival-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.notify-arrival-store {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
}
.notify-arrival-dist {
  font-size: 11px;
  color: #888;
}
.notify-book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
}
.notify-book-row:last-of-type { border-bottom: none; }
.notify-book-cover { font-size: 22px; flex-shrink: 0; }
.notify-book-info { flex: 1; }
.notify-book-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a5c;
}
.notify-book-author { font-size: 11px; color: #888; }
.notify-book-arrow { font-size: 16px; color: #c0c8d0; }
.new-badge {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.notify-store-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: #f0f4f8;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  color: #2d6a9f;
  font-weight: 600;
  cursor: pointer;
}

.notify-social-list { padding: 0 12px; }
.notify-social-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.notify-social-avatar { font-size: 24px; flex-shrink: 0; }
.notify-social-body { flex: 1; }
.notify-social-text { font-size: 12px; color: #555; margin-bottom: 4px; }
.notify-social-obi {
  font-size: 11px;
  color: #888;
  font-style: italic;
  line-height: 1.5;
  background: #f8fafc;
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 4px;
}
.notify-social-meta { font-size: 10px; color: #aaa; }

/* ── 通知設定ページ ── */
.settings-section {
  background: #fff;
  border-radius: 12px;
  margin: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 12px;
}
.settings-genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-genre-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  border: 1.5px solid #d0dce8;
  background: #f8fafc;
  color: #555;
  cursor: pointer;
  transition: all 0.18s;
}
.settings-genre-pill.selected {
  background: #2d6a9f;
  color: #fff;
  border-color: #2d6a9f;
}
.settings-store-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f4f8;
}
.settings-store-row:last-child { border-bottom: none; }
.settings-store-name { font-size: 13px; font-weight: 600; color: #1a3a5c; }
.settings-store-area { font-size: 11px; color: #888; }
.settings-follow-btn {
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #3a7fbf;
  background: #fff;
  color: #3a7fbf;
  cursor: pointer;
}
.settings-follow-btn.following {
  background: #3a7fbf;
  color: #fff;
}
.settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f0f4f8;
  cursor: pointer;
}
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-left { display: flex; align-items: center; gap: 10px; }
.settings-toggle-icon { font-size: 16px; }
.settings-toggle-label { font-size: 13px; color: #444; }
.settings-toggle-switch {
  width: 42px;
  height: 24px;
  background: #d0dce8;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.settings-toggle-switch.on { background: #27ae60; }
.settings-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.settings-toggle-switch.on .settings-toggle-knob { left: 20px; }

/* ============================================
   SOCIAL PAGE - 友人の帯から来店へ
   ============================================ */

.social-filter-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  background: #fff;
  border-bottom: 2px solid #eef0f4;
  flex-shrink: 0;
}
.social-filter-tabs::-webkit-scrollbar { display: none; }
.social-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}
.social-tab.active {
  color: #2d6a9f;
  border-bottom-color: #2d6a9f;
  font-weight: 700;
}

.social-visit-banner {
  margin: 10px 12px 4px;
}
.social-visit-inner {
  background: linear-gradient(135deg, #edf4fc, #f0f8ff);
  border: 1px solid #c8e0f5;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.social-visit-avatar { font-size: 24px; flex-shrink: 0; }
.social-visit-text { flex: 1; font-size: 12px; color: #444; line-height: 1.5; }
.social-visit-sub { font-size: 11px; color: #2d6a9f; margin-top: 2px; font-weight: 600; }
.social-visit-arrow { font-size: 20px; color: #3a7fbf; }

.social-feed-list { padding: 8px 12px; }
.social-obi-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.social-obi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.social-obi-avatar { font-size: 28px; }
.social-obi-user-info { flex: 1; }
.social-obi-username { font-size: 13px; font-weight: 700; color: #1a3a5c; }
.social-obi-time { font-size: 10px; color: #aaa; }
.social-follow-btn {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid #3a7fbf;
  background: #fff;
  color: #3a7fbf;
  cursor: pointer;
  flex-shrink: 0;
}
.social-follow-btn.followed {
  background: #3a7fbf;
  color: #fff;
}
.social-obi-book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.social-obi-cover { font-size: 28px; flex-shrink: 0; }
.social-obi-book-title { font-size: 14px; font-weight: 700; color: #1a3a5c; }
.social-obi-book-author { font-size: 11px; color: #888; }
.social-obi-text {
  font-size: 13px;
  color: #333;
  font-style: italic;
  line-height: 1.7;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #3a7fbf;
  margin-bottom: 12px;
}
.social-obi-store-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f0f8ff, #edf4fc);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid #d0e4f5;
}
.social-obi-store-icon { font-size: 16px; flex-shrink: 0; }
.social-obi-store-info { flex: 1; }
.social-obi-store-name { font-size: 13px; font-weight: 700; color: #1a3a5c; display: block; }
.social-obi-store-dist { font-size: 11px; color: #888; }
.social-visit-store-btn {
  padding: 6px 12px;
  background: #2d6a9f;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.social-obi-actions {
  display: flex;
  gap: 8px;
}
.social-like-btn,
.social-comment-btn,
.social-share-btn {
  flex: 1;
  padding: 7px 4px;
  background: #f8fafc;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  text-align: center;
  transition: background 0.18s;
}
.social-like-btn.liked {
  background: #fdecea;
  color: #e74c3c;
  border-color: #e74c3c;
}

/* ============================================
   ONBOARDING - 全面リデザイン
   ============================================ */
/* オンボーディングはホーム画面の上にかぶさるシート */
.onboarding-layout {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 400;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.onboarding-layout.active { display: flex; }

.ob-card {
  width: calc(100% - 48px);
  max-width: 382px;
  /* heightはJSでwindow.innerHeightから設定 */
  background: #f7f4ef;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}

/* スキップボタン */
.ob-skip {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}

/* トラック全体のラッパー */
.ob-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ob-track {
  display: flex;
  height: 100%;
  width: 500%;
  will-change: transform;
}

/* 各スライド: ラッパー幅の1/5 = 実画面1枚分 */
.ob-slide {
  width: 20%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;  /* 垂直方向を中央寄せ */
  padding: 28px 28px 12px;
  box-sizing: border-box;
  overflow-y: auto;
  text-align: center;  /* 子要素のテキストを中央揃え */
}

/* イラスト: 小さくすっきり */
.ob-img-wrap {
  width: 100%;
  max-width: 150px;  /* 220px → 150px に縮小 */
  aspect-ratio: 1;
  margin-bottom: 20px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
}
.ob-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.10));
}

/* コピー: 完全センタリング */
.ob-copy {
  text-align: center;
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;  /* eyebrowタグ含め全要素を中央揃え */
}
.ob-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: #3a7fbf;
  background: rgba(58,127,191,0.12);
  border-radius: 20px;
  padding: 5px 16px;
  margin-bottom: 12px;
  /* 自身を中央に */
  align-self: center;
}
.ob-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.45;  /* 1.25 → 1.45 で行間を広く */
  color: #1a2a3a;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
  text-align: center;
  width: 100%;
}
.ob-title em {
  font-style: normal;
  background: linear-gradient(120deg, #2d6a9f, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ob-body {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* ジャンル選択スライド */
.ob-slide--genre {
  padding-top: 36px;
  overflow-y: auto;
  justify-content: flex-start;
}
.ob-copy--genre { margin-bottom: 16px; }
.ob-title--sm { font-size: 22px; }

/* ヒーロースライド（Slide1） */
.ob-slide--hero {
  justify-content: center;
}
.ob-hero-icon {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(91,164,212,0.45) 0%, rgba(91,164,212,0.0) 70%);
  animation: obHeroFloat 3s ease-in-out infinite;
  position: relative;
}
.ob-hero-icon svg {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
}
@keyframes obHeroFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ヒントスライド（Slide2〜5） */
.ob-slide--hint {
  justify-content: center;
  padding-top: 0;
  gap: 16px;
}
.ob-hint-icon {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
  animation: obHeroFloat 3s ease-in-out infinite;
  position: relative;
}
.ob-hint-icon img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}
/* 放射状グラデーション：中心に色・外側は完全透明に溶ける */
.ob-hint-icon--pink  { background: radial-gradient(ellipse at center, rgba(255,182,208,0.55) 0%, rgba(255,182,208,0.0) 70%); }
.ob-hint-icon--orange{ background: radial-gradient(ellipse at center, rgba(255,214,120,0.50) 0%, rgba(255,214,120,0.0) 70%); }
.ob-hint-icon--green { background: radial-gradient(ellipse at center, rgba(100,220,150,0.45) 0%, rgba(100,220,150,0.0) 70%); }
.ob-hint-icon--blue  { background: radial-gradient(ellipse at center, rgba(91,164,212,0.45) 0%, rgba(91,164,212,0.0) 70%); }

.ob-hint-card {
  background: white;
  border-radius: 20px;
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(91,164,212,0.10);
  border: 1px solid rgba(91,164,212,0.12);
  width: 100%;
}
.ob-hint-step {
  font-size: 10px;
  font-weight: 800;
  color: #5ba4d4;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.ob-hint-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}
.ob-hint-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* PWAスライド（Slide6） */
.ob-slide--pwa {
  justify-content: center;
  background: linear-gradient(160deg, #eef6fd 0%, #e4f1f9 100%);
}
.ob-pwa-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 8px 24px rgba(91,164,212,0.35));
  animation: obHeroFloat 3s ease-in-out infinite;
}
.ob-copy--pwa { text-align: center; }
.ob-pwa-steps {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.ob-pwa-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ob-pwa-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5ba4d4;
  color: white;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ob-proto-note {
  font-size: 10px;
  color: #bbb;
  margin-top: 16px;
  text-align: center;
  letter-spacing: 0.02em;
}

.onboarding-genre-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 320px;
  padding-bottom: 8px;
}
.onboarding-genre-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 2px solid #e2ddd8;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.18s;
}
.onboarding-genre-btn span:first-child { font-size: 22px; }
.onboarding-genre-btn.selected {
  background: var(--genre-color, #3a7fbf);
  color: #fff;
  border-color: var(--genre-color, #3a7fbf);
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ドット */
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 6px;
  flex-shrink: 0;
}
.ob-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #c8bfb6;
  transition: all 0.3s;
}
.ob-dot.active {
  width: 22px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2d6a9f, #4ecdc4);
}

/* フッター（次へボタン） */
.ob-footer {
  padding: 8px 20px 16px;
  flex-shrink: 0;
}
.ob-next {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1a3a5c, #2d6a9f);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(29,58,94,0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ob-next:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(29,58,94,0.18);
}

/* ============================================
   CAMPAIGN PAGE - 全国キャンペーン
   ============================================ */

.campaign-hero { margin: 0 0 4px; }
.campaign-hero-inner {
  padding: 24px 20px 20px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.campaign-hero-emoji { font-size: 48px; margin-bottom: 10px; display: block; }
.campaign-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}
.campaign-hero-sub { font-size: 12px; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.campaign-hero-theme {
  font-size: 13px;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-block;
  margin-bottom: 14px;
}
.campaign-progress-wrap {
  height: 8px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.campaign-progress-bar {
  height: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: 4px;
  transition: width 0.8s ease;
}
.campaign-progress-label { font-size: 11px; color: rgba(255,255,255,0.8); margin-bottom: 12px; }
.campaign-my-rank {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 8px 16px;
  display: inline-block;
}
.campaign-join-btn {
  background: #fff;
  color: #e67e22;
  border: none;
  border-radius: 24px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.campaign-list { padding: 0 12px; }
.campaign-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.campaign-card-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.campaign-card-body { flex: 1; min-width: 0; }
.campaign-card-title { font-size: 13px; font-weight: 700; color: #1a3a5c; margin-bottom: 2px; }
.campaign-card-sub { font-size: 11px; color: #888; margin-bottom: 4px; }
.campaign-card-theme {
  font-size: 11px;
  color: #2d6a9f;
  background: #edf4fc;
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 8px;
}
.campaign-card-progress-wrap {
  height: 5px;
  background: #f0f4f8;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.campaign-card-progress {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.campaign-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #888;
  margin-bottom: 8px;
}
.campaign-my-status {
  font-size: 12px;
  color: #27ae60;
  font-weight: 700;
}
.campaign-card-join-btn {
  padding: 6px 16px;
  background: linear-gradient(135deg, #2d6a9f, #3a7fbf);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.campaign-ranking-list { padding: 0 12px; }
.campaign-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.campaign-rank-row.my-rank {
  background: linear-gradient(135deg, #f0f8ff, #edf4fc);
  border: 1.5px solid #c8e0f5;
}
.campaign-rank-pos { font-size: 16px; width: 28px; text-align: center; flex-shrink: 0; }
.campaign-rank-avatar { font-size: 26px; flex-shrink: 0; }
.campaign-rank-info { flex: 1; }
.campaign-rank-name { font-size: 13px; font-weight: 700; color: #1a3a5c; }
.campaign-rank-store { font-size: 10px; color: #888; }
.campaign-rank-stats { text-align: right; font-size: 10px; color: #888; }
.campaign-rank-val { font-size: 14px; font-weight: 800; color: #2d6a9f; }

.campaign-past-list { padding: 0 12px; }
.campaign-past-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.campaign-past-emoji { font-size: 28px; flex-shrink: 0; }
.campaign-past-body { flex: 1; }
.campaign-past-title { font-size: 13px; font-weight: 700; color: #1a3a5c; }
.campaign-past-meta { font-size: 11px; color: #888; margin: 2px 0; }
.campaign-past-winner { font-size: 11px; color: #e67e22; font-weight: 600; }

/* ── ホームキャンペーンバナー ── */
.home-campaign-banner {
  margin: 8px 12px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.home-campaign-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.home-campaign-emoji { font-size: 28px; flex-shrink: 0; }
.home-campaign-text { flex: 1; }
.home-campaign-title { font-size: 13px; font-weight: 700; color: #fff; }
.home-campaign-sub { font-size: 11px; color: rgba(255,255,255,0.82); margin-top: 2px; }
.home-campaign-arrow { font-size: 22px; color: rgba(255,255,255,0.7); }


/* ============================================
   RANK PAGE - 会員ランク詳細
   ============================================ */

/* ヒーローセクション */
.rank-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  background: linear-gradient(160deg, var(--obiru-pale-1) 0%, rgba(255,255,255,0) 100%);
  text-align: center;
}

/* 王冠アイコン */
.rank-crown-wrap {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, rgba(91,164,212,0.15), rgba(78,205,196,0.12));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  box-shadow: 0 8px 32px rgba(91,164,212,0.18), 0 2px 8px rgba(0,0,0,0.06);
  border: 2px solid rgba(255,255,255,0.95);
}
.rank-crown-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(91,164,212,0.3));
}

/* ランク名 */
.rank-hero-name {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.rank-hero-ja {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

/* プログレスバー */
.rank-progress-wrap {
  width: 100%;
  max-width: 280px;
}
.rank-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(91,164,212,0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}
.rank-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--obiru-blue), var(--obiru-cyan));
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.rank-progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.rank-progress-label strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--obiru-blue);
}

/* セクション共通 */
.rank-section {
  margin: 0 var(--space-lg) var(--space-lg);
}
.rank-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

/* 特典アイテム */
.rank-perk-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255,255,255,0.85);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 2px 10px rgba(91,164,212,0.07);
  margin-bottom: 8px;
}
.rank-perk-icon {
  width: 40px;
  height: 40px;
  background: rgba(91,164,212,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rank-perk-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.rank-perk-check {
  color: var(--obiru-blue);
  font-weight: 700;
  font-size: 16px;
}

/* 全ランク一覧アイテム */
.rank-all-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  margin-bottom: 8px;
  transition: var(--trans-base);
}
.rank-all-item.current {
  background: rgba(255,255,255,0.95);
  border-color: rgba(91,164,212,0.35);
  box-shadow: 0 4px 16px rgba(91,164,212,0.12);
}
.rank-all-emoji {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.rank-all-info {
  flex: 1;
}
.rank-all-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.rank-all-books {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.rank-all-current-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--obiru-blue);
  background: rgba(91,164,212,0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ============================================
   SNS SHARE BUTTONS
   ============================================ */

.sns-share-section {
  margin: 4px 0 0;
  text-align: left;
}

.sns-share-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sns-share-label svg {
  display: block;
  flex-shrink: 0;
}

.sns-share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.sns-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 56px;
  padding: 10px 4px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.sns-btn:active {
  transform: scale(0.91);
}

.sns-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
}
.sns-logo svg { display: block; }

.sns-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* X */
.sns-btn.sns-x { background: none; color: #111; box-shadow: none; }
.sns-btn.sns-x .sns-logo { background: #f0f0f0; border-radius: 50%; }
/* TikTok */
.sns-btn.sns-tiktok { background: none; color: #111; box-shadow: none; }
.sns-btn.sns-tiktok .sns-logo { background: linear-gradient(135deg, rgba(105,201,208,0.35), rgba(254,44,85,0.28)); border-radius: 50%; color: #111; }
/* Instagram */
.sns-btn.sns-instagram { background: none; color: #c2366b; box-shadow: none; }
.sns-btn.sns-instagram .sns-logo { background: linear-gradient(135deg, rgba(240,148,51,0.35), rgba(188,24,136,0.28)); border-radius: 50%; }
/* LINE */
.sns-btn.sns-line { background: none; color: #06a347; box-shadow: none; }
.sns-btn.sns-line .sns-logo { background: rgba(6,199,85,0.22); border-radius: 50%; }
/* Facebook */
.sns-btn.sns-facebook { background: none; color: #1877F2; box-shadow: none; }
.sns-btn.sns-facebook .sns-logo { background: rgba(24,119,242,0.18); border-radius: 50%; }

/* ============================================
   SVG Icon System
   ============================================ */

/* セクションタイトル前アイコン */
.section-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
.section-icon-red    { background: rgba(224,82,82,0.14);  color: #d63a3a; }
.section-icon-blue   { background: rgba(91,164,212,0.15);  color: var(--obiru-blue); }
.section-icon-gold   { background: rgba(255,209,102,0.22); color: #b07c00; }
.section-icon-green  { background: rgba(82,201,122,0.15);  color: #2d9e57; }
.section-icon-pink   { background: rgba(255,143,171,0.15); color: #c04575; }
.section-icon-cyan   { background: rgba(78,205,196,0.15);  color: #1f9993; }

/* アバター SVG */
.avatar-sm.avatar-sakura {
  background: linear-gradient(135deg, var(--obiru-pale-2), var(--obiru-pale-3));
  color: var(--obiru-blue-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(91,164,212,0.2);
}
.profile-avatar.profile-avatar-svg {
  background: linear-gradient(135deg, var(--obiru-pale-2), var(--obiru-pale-3));
  color: var(--obiru-blue-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 4px 20px rgba(91,164,212,0.25);
}

/* ランクバッジアイコン */
.rank-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(91,164,212,0.15);
  border-radius: 4px;
  flex-shrink: 0;
}

/* 書店アイコン SVG */
.store-icon.store-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-icon.store-icon-svg svg { display: block; }

/* スタンプアイコン SVG */
.stamp-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* メニューアイコン */
.menu-icon-wrap {
  width: 40px;
  height: 40px;
  background: rgba(91,164,212,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--obiru-blue);
  flex-shrink: 0;
  transition: var(--trans-base);
}

/* ベスト本カバー */
.best-book-cover {
  width: 64px;
  height: 90px;
  background: var(--grad-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

/* stat-icon SVG版 */
.stat-icon-svg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.stat-icon-blue  { background: rgba(91,164,212,0.12);  color: var(--obiru-blue); }
.stat-icon-green { background: rgba(82,201,122,0.12);  color: #3ab865; }
.stat-icon-cyan  { background: rgba(78,205,196,0.12);  color: #2da89f; }
.stat-icon-pink  { background: rgba(255,143,171,0.12); color: #d45f8a; }

/* admin KPI icon */
.admin-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.3);
  color: var(--kpi-color, var(--obiru-blue));
  flex-shrink: 0;
}


/* ============================================
   SPLASH SCREEN
   ============================================ */

/*
 * #splash-backdrop は #app の外に配置（overflow:hidden の影響を受けない）。
 * スプラッシュ表示中、背後のホーム画面を完全に隠す全画面の幕。
 * z-index: 9998（スプラッシュ本体より1段低い）
 */
#splash-backdrop {
  position: fixed;
  inset: 0;
  background: var(--obiru-bg, #eef6fb);
  z-index: 9998;
  transition: opacity 0.45s ease;
}

#splash-backdrop.hiding {
  opacity: 0;
  pointer-events: none;
}

/* スプラッシュ本体：position:fixed で viewport に固定、#app と同じ幅・位置に合わせる */
/* 外枠：全画面コンテナ（サイズはJSでinnerWidth/innerHeightを使って設定） */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

#splash-screen.ready {
  opacity: 1;
  pointer-events: auto;
}

/* 内側KVカード：JSからwidth/height/top/leftをstyleで直接指定する */
#splash-inner {
  position: absolute;
  background-image: url('/static/imgs/splash-kv.jpg');
  background-size: cover;
  background-position: center center;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 140px;
  box-sizing: border-box;
}



#splash-screen.hiding {
  opacity: 0;
  pointer-events: none;
}

.splash-bar-wrap {
  width: 160px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  overflow: hidden;
}

.splash-bar {
  height: 100%;
  width: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  /* アニメーションは #splash-screen.ready が付いてから開始 */
  animation: none;
}

#splash-screen.ready .splash-bar {
  animation: splashBarFill 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashBarFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
