@charset "UTF-8";
@import url("tokens.css");
/**
 * HKT48 Mail Data - モダンSaaSスタイルデザインシステム (v2.0)
 * 2025/2026年主流SaaS（Linear, Raycast, Vercel）に準拠した極簡・Bento Gridデザイン
 * ※ すべてのコメントは日本語で記述されています。
 */

/* -------------------------------------------------------------------------
   1. デザイントークン定義 (CSS Custom Properties)
   ------------------------------------------------------------------------- */
:root {
  /* 背景・サーフェス（原本 mail.html の純黒 #000000 をベースに採用） */
  --bg-canvas: #000000;
  --bg-surface: rgba(18, 18, 22, 0.72);
  --bg-surface-elevated: rgba(28, 28, 34, 0.82);
  --bg-surface-hover: rgba(36, 36, 44, 0.75);
  --bg-subtle: rgba(255, 255, 255, 0.04);

  /* 境界線・ハイライト（Linear特徴のインセット境界ハイライト） */
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: rgba(99, 102, 241, 0.5);
  --highlight-inset: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

  /* ブランド・アクセントカラー（Linear / Raycast ライクな微光カラー） */
  --accent-primary: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #38bdf8 100%);

  /* タイポグラフィ・テキストカラー */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  /* レイアウト・エフェクト */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --blur-glass: blur(20px) saturate(180%);
  --shadow-bento: 0 20px 40px -15px rgba(0, 0, 0, 0.75), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  --shadow-hover: 0 24px 48px -12px rgba(0, 0, 0, 0.9), 0 0 25px rgba(59, 130, 246, 0.14), inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------------------------------------------------------------------------
   2. リセット＆ベースタイポグラフィ
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #000000;
  /* 原本 mail.html の純黒背景 */
  background-image: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* -------------------------------------------------------------------------
   3. ヘッダー＆フローティングガラスナビゲーション
   ------------------------------------------------------------------------- */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow), var(--highlight-inset);
  color: #ffffff;
  font-size: 15px;
}

.header-title-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.02em;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-animation 2s infinite ease-in-out;
}

@keyframes pulse-animation {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.55;
  }
}

/* -------------------------------------------------------------------------
   4. ナビゲーション（twitter.html 準拠のピル型セグメントコントロール）
   ------------------------------------------------------------------------- */
.nav-container,
.tag-navigation {
  max-width: 1240px;
  margin: 16px auto 14px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* メインサービス切り替えタブバー（twitter.html 準拠仕様） */
.pill-tabs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 6px;
  background: rgba(18, 18, 24, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), var(--highlight-inset);
  width: fit-content;
  max-width: 100%;
}

.pill-tabs-row::-webkit-scrollbar {
  display: none;
}

.pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition-smooth);
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.pill-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pill-tab.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 2px 12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.pill-tab .badge-new {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.4);
}

/* NEW バッジおよびドロワー内バッジスタイル（薬丸型カプセル・赤色グラデーション） */
.new-badge,
.drawer-nav-item .new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  line-height: 1;
  letter-spacing: 0.04em;
  animation: badge-pulse 2s infinite ease-in-out;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

/* サブナビゲーション行（twitter.html 準拠の小ぶりなピルタブ） */
.pill-subnav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.subnav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: rgba(18, 18, 24, 0.6);
  border: 1px solid var(--border-subtle);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  transition: var(--transition-smooth);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), var(--highlight-inset);
}

.subnav-pill:hover {
  color: #ffffff;
  border-color: var(--border-medium);
  background: rgba(28, 28, 38, 0.75);
  transform: translateY(-1px);
}

.subnav-pill.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 2px 10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* -------------------------------------------------------------------------
   5. Bento Grid 網格佈局コンテナ (12カラムグリッド)
   ------------------------------------------------------------------------- */
.bento-layout {
  max-width: 1240px;
  margin: 10px auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: 100%;
}

/* Bento カード共通スタイル */
.bento-card {
  background: var(--bg-surface);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-bento);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.bento-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
}

/* カードヘッダー */
.bento-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.bento-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-card-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 13px;
}

.bento-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.bento-update-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* グリッド配置指定 */
.bento-chart-36 {
  grid-column: span 6;
}

.bento-chart-30 {
  grid-column: span 6;
}

.bento-ranking,
.bento-member-stats {
  grid-column: span 7;
}

.bento-maillist {
  grid-column: span 5;
}

/* -------------------------------------------------------------------------
   6. Highcharts チャート領域のモダンオーバーライド
   ------------------------------------------------------------------------- */
.chart-container-inner {
  padding: 4px 6px 4px 6px;
  min-height: 235px;
  position: relative;
}

/* Highcharts クレジット表記（右下ロゴ）の非表示化 */
.highcharts-credits {
  display: none;
}

/* Highchartsの旧式グレー背景と枠線を透明化＆美化 */
.mb-mail-chat,
#chart_36,
#chart_30,
#mb-mail-chat,
#mb-hourly-chart {
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
}

.highcharts-background {
  fill: transparent;
}

.highcharts-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-dasharray: 3, 3;
}

.highcharts-axis-line,
.highcharts-tick {
  stroke: rgba(255, 255, 255, 0.08);
}

.highcharts-axis-labels text {
  fill: var(--text-tertiary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* 折れ線グラフをモダンな光るネオングラデーションラインに */
.highcharts-series path.highcharts-graph {
  stroke: #38bdf8;
  stroke-width: 2.5px;
  filter: drop-shadow(0 4px 10px rgba(56, 189, 248, 0.5));
}

.highcharts-legend-item text {
  fill: var(--text-secondary);
  font-size: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* -------------------------------------------------------------------------
   7. ランキングコンポーネント (Bento Ranking)
   ------------------------------------------------------------------------- */
.ranking-toolbar {
  padding: 14px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

/* モダンなセレクトボックス (Linear風カスタムドロップダウン) */
.modern-select-wrapper {
  position: relative;
  display: inline-block;
}

.modern-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 7px 32px 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--highlight-inset);
  transition: var(--transition-smooth);
}

.modern-select-wrapper select:hover {
  border-color: var(--accent-primary);
  background: rgba(30, 41, 59, 0.8);
}

.modern-select-wrapper select:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.modern-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-tertiary);
  font-size: 11px;
}

/* ランキングテーブルヘッダー（#ranking-text のスタイル上書き） */
#ranking-text {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

#ranking-text .auto {
  flex: 1;
}

.ranking-header-this-year,
.ranking-header-30-day,
.ranking-header-30-day-avg {
  text-align: right;
  width: 68px;
  padding: 0 4px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* 特定年（例：2026年総計）選択時のヘッダー折り返し防止 */
.ranking-header-year-total {
  text-align: right;
  width: auto;
  min-width: 68px;
  padding: 0 4px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* ランキングリストコンテナ */
#mail-ranking {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  max-height: 850px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

#mail-ranking::-webkit-scrollbar {
  width: 6px;
}

#mail-ranking::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

/* ランキング各行 (.mail-item) の超モダンSaaS化 */
#mail-ranking .mail-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  position: relative;
}

#mail-ranking .mail-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
  transform: translateX(2px);
}

/* 順位バッジ (.ranking-number) */
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* 上位3位のゴールド・シルバー・ブロンズハイライトバッジ */
#mail-ranking .mail-item:nth-child(1) .ranking-number {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

#mail-ranking .mail-item:nth-child(2) .ranking-number {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}

#mail-ranking .mail-item:nth-child(3) .ranking-number {
  background: linear-gradient(135deg, #b45309, #78350f);
  color: #ffffff;
  border-color: rgba(180, 83, 9, 0.6);
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.3);
}

/* メンバーアバター (.member-icon) */
.member-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.member-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.mail-item:hover .member-icon img {
  transform: scale(1.08);
}

/* メンバー名 */
.member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}

.member-name a {
  color: var(--text-primary);
}

.member-name a:hover {
  color: var(--accent-cyan);
}

.member-name .chart-icon {
  font-size: 11px;
  color: var(--text-tertiary);
  opacity: 0.7;
}

.chart-icon::before {
  content: "\f201";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900;
  margin-left: 4px;
}

/* スペーサー（右寄せ用） */
.auto {
  flex: 1 1 auto;
}

/* 数値カラム（Tabular Numbers適用） */
.this-year-mail,
.day-mail,
.average-mail {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  width: 68px;
  padding: 0 4px;
}

.this-year-mail {
  color: #60a5fa;
}

.day-mail {
  color: var(--text-primary);
}

.average-mail {
  color: var(--text-secondary);
}

/* メンバー統計テーブルヘッダー（mail_member.html） */
.stats-header {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

.stats-header-label {
  flex: 1;
}

.stats-header-this-year,
.stats-header-30-day,
.stats-header-30-day-avg {
  text-align: right;
  width: 68px;
  padding: 0 4px;
  font-family: 'JetBrains Mono', monospace;
}

#mb-mail-data {
  padding: 12px 16px 8px;
}

#mb-mail-data .mail-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), var(--highlight-inset);
}

/* -------------------------------------------------------------------------
   8. 新着メール一覧コンポーネント (Bento Live Mail Feed)
   ------------------------------------------------------------------------- */
#all-new-mail,
#new-mail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  max-height: 850px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

#all-new-mail::-webkit-scrollbar,
#new-mail::-webkit-scrollbar {
  width: 6px;
}

#all-new-mail::-webkit-scrollbar-thumb,
#new-mail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

/* 新着メール各行 (.mail-item) の洗練レイアウト */
#all-new-mail .mail-item,
#new-mail .mail-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  gap: 10px;
}

#all-new-mail .mail-item:hover,
#new-mail .mail-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

#all-new-mail .member-name,
#new-mail .member-name {
  min-width: 85px;
  font-size: 13.5px;
  flex-shrink: 0;
}

/* メールタイトルの複数行表示（省略記号「...」を排除し、全文を表示） */
.mail-title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  padding: 0 8px;
}

.mail-item:hover .mail-title {
  color: var(--text-primary);
}

.mail-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.3;
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   9. ページネーションコントロール (モダンボタンUI)
   ------------------------------------------------------------------------- */
#all-mail-pagination,
#member-mail-pagination {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.01);
}

.pagination-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--highlight-inset);
  transition: var(--transition-smooth);
}

.page-btn:hover:not([disabled]) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.page-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------
   10. スケルトンローディングのモダンシマーアニメーション
   ------------------------------------------------------------------------- */
.skeleton-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-pulse {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-line {
  height: 14px;
}

.skeleton-line.medium {
  width: 40%;
}

.skeleton-line.short {
  width: 20%;
}

.skeleton-line.full {
  width: 75%;
}

.skeleton-chart-box {
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* -------------------------------------------------------------------------
   11. フッター（twitter.html 準拠のSaaSスタイル）
   ------------------------------------------------------------------------- */
.footer-wrapper {
  margin-top: auto;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 14, 18, 0.88);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  padding: 24px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 13px;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 15px;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.footer-social-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

@media screen and (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* -------------------------------------------------------------------------
   12. レスポンシブ対応 (モバイル・タブレット最適化)
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .bento-chart-36,
  .bento-chart-30,
  .bento-ranking,
  .bento-member-stats,
  .bento-maillist {
    grid-column: span 12;
  }

  .bento-layout {
    gap: 16px;
    padding: 0 16px;
  }

  .nav-container {
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    height: 56px;
  }

  .header-title-text {
    font-size: 16px;
  }

  .system-status-pill {
    display: none;
  }

  /* モバイル時は上部ピルナビゲーションを非表示にし、mobile-drawer に完全委譲 */
  .nav-container,
  .tag-navigation {
    display: none;
  }

  /* 右上ハンバーガーボタンを表示（44x44px 最小タッチエリア） */
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* 320px〜480px モバイル端末専用レイアウト最適化 */
@media screen and (max-width: 480px) {
  /* メインコンテナ余白の最適化（表示領域の最大化） */
  .bento-layout {
    padding: 0 8px 30px;
    gap: 12px;
  }

  .bento-card {
    padding: 12px 8px;
  }

  /* チャートカード余白最小化・表示空間の最大化 */
  .bento-chart-36,
  .bento-chart-30 {
    padding: 10px 4px 6px 4px;
  }

  .bento-chart-36 .bento-card-header,
  .bento-chart-30 .bento-card-header {
    padding: 2px 6px 6px 6px;
    margin-bottom: 2px;
  }

  .bento-chart-36 .chart-container-inner,
  .bento-chart-30 .chart-container-inner {
    padding: 0 2px 2px 2px;
  }

  /* 1. メール送信ランキング：カードヘッダー＆セレクト最適化 */
  .bento-card-header {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  .bento-card-title {
    font-size: 13.5px;
    white-space: nowrap;
  }

  .modern-select-wrapper select {
    padding: 4px 24px 4px 8px;
    font-size: 11px;
    height: 26px;
  }

  .modern-select-arrow {
    right: 8px;
    font-size: 9px;
  }

  /* 2. ランキングテーブルヘッダー（同一行・切断防止） */
  #ranking-text {
    padding: 6px 6px;
    font-size: 10px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
  }

  #ranking-text > span:first-child,
  #ranking-text > div:first-child {
    font-size: 10.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .ranking-header-this-year {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    font-size: 9px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-align: right;
    padding: 0;
    flex-shrink: 0;
  }

  .ranking-header-30-day {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    font-size: 9px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-align: right;
    padding: 0;
    flex-shrink: 0;
  }

  .ranking-header-30-day-avg {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    font-size: 9px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-align: right;
    padding: 0;
    flex-shrink: 0;
  }

  .ranking-header-year-total {
    width: auto;
    min-width: 42px;
    font-size: 9px;
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-align: right;
    padding: 0;
    flex-shrink: 0;
  }

  /* 3. ランキング各行 (.mail-item) の垂直整列と切断防止 */
  #mail-ranking {
    padding: 6px 0;
    gap: 6px;
  }

  #mail-ranking .mail-item {
    padding: 6px 6px;
    box-sizing: border-box;
    gap: 2px;
  }

  #mail-ranking .ranking-number {
    width: 18px;
    height: 18px;
    min-width: 18px;
    font-size: 11px;
    margin-right: 4px;
    flex-shrink: 0;
  }

  #mail-ranking .member-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    margin-right: 4px;
    flex-shrink: 0;
  }

  #mail-ranking .member-name {
    min-width: 0;
    max-width: 62px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
  }

  #mail-ranking .member-name a {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #mail-ranking .chart-icon {
    font-size: 8.5px;
    margin-left: 2px;
  }

  #mail-ranking .this-year-mail {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    font-size: 10.5px;
    padding: 0;
    text-align: right;
    flex-shrink: 0;
  }

  #mail-ranking .day-mail {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    font-size: 10.5px;
    padding: 0;
    text-align: right;
    flex-shrink: 0;
  }

  #mail-ranking .average-mail {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    font-size: 10.5px;
    padding: 0;
    text-align: right;
    flex-shrink: 0;
  }

  /* 4. 新着メール一覧：縦並び崩れ防止・モダンSaaSカード化 (CSS Grid 2段レイアウト) */
  #all-new-mail,
  #new-mail {
    padding: 6px 0;
    gap: 6px;
  }

  #all-new-mail .mail-item,
  #new-mail .mail-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "icon name time"
      "icon title title";
    column-gap: 6px;
    row-gap: 3px;
    align-items: center;
    padding: 8px 8px;
    box-sizing: border-box;
  }

  #all-new-mail .mail-item > a:first-child,
  #new-mail .mail-item > a:first-child {
    grid-area: icon;
    display: flex;
    align-items: flex-start;
    margin: 0;
  }

  #all-new-mail .member-icon,
  #new-mail .member-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    margin: 0;
  }

  #all-new-mail .member-name,
  #new-mail .member-name {
    grid-area: name;
    min-width: 0;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #all-new-mail .mail-time,
  #new-mail .mail-time {
    grid-area: time;
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    font-size: 10px;
    min-width: auto;
    white-space: nowrap;
  }

  #all-new-mail .mail-title,
  #new-mail .mail-title {
    grid-area: title;
    font-size: 11.5px;
    line-height: 1.35;
    padding: 0;
    margin: 0;
    word-break: break-all;
    overflow-wrap: break-word;
    color: var(--text-primary);
  }
}

/* -------------------------------------------------------------------------
   13. モバイルドロワー（mobile-drawer）のSaaS現代化・統合スタイル
   ------------------------------------------------------------------------- */
.mobile-drawer {
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-left: 1px solid var(--border-medium);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85), var(--highlight-inset);
}

.mobile-drawer-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 18px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title i {
  color: var(--accent-cyan);
  font-size: 17px;
}

.drawer-section-title {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-nav-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: #ffffff;
}

.drawer-nav-item.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.45);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.drawer-nav-item.active i {
  color: var(--accent-cyan);
}

.active-indicator {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
