
    /* ========================================
       v7.31: カラーパレット統一
       ======================================== */
    :root {
      /* メインカラー */
      --color-primary: #667eea;
      --color-primary-dark: #764ba2;
      --color-primary-light: #8896ff;
      
      /* ステータスカラー */
      --color-success: #28a745;
      --color-warning: #ffc107;
      --color-error: #dc3545;
      --color-info: #17a2b8;
      
      /* グレースケール */
      --color-gray-50: #f8f9fa;
      --color-gray-100: #e9ecef;
      --color-gray-200: #dee2e6;
      --color-gray-300: #ced4da;
      --color-gray-600: #6c757d;
      --color-gray-700: #495057;
      --color-gray-900: #2c3e50;
      
      /* 背景・テキスト */
      --color-bg: #f5f5f5;
      --color-text: #333;
      --color-text-light: #666;
      
      /* グラデーション */
      --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
      --gradient-warning: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    }


    /* ========================================
       基本スタイル (v7から変更なし)
       ======================================== */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      /* 📝 v7.31: フォント改善 - 読みやすさ向上 */
      font-family: -apple-system, BlinkMacSystemFont, 
                   "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
                   "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
      background: #f5f5f5;
      color: #333;
      font-size: 16px;           /* 基本サイズを明示 */
      line-height: 1.8;          /* 1.6 → 1.8 (読みやすく) */
      letter-spacing: 0.03em;    /* 文字間を少し広げる */
    }

    /* ========================================
       ヘッダー (v7から変更なし)
       ======================================== */
    .site-header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 0;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    .header-top {
      background: rgba(0,0,0,0.1);
      padding: 8px 0;
    }

    .header-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .visitor-counter {
      display: flex;
      gap: 15px;
      font-size: 11px;
      opacity: 0.85;
    }

    .visitor-item {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .visitor-number {
      font-weight: bold;
      font-size: 13px;
    }

    .header-main {
      padding: 15px 0;
    }

    .site-branding {
      display: flex;
      align-items: center;
      gap: 15px;
      cursor: pointer;
    }

    .site-logo {
      font-size: 36px;
    }

    .site-title {
      font-size: 28px;
      font-weight: bold;
      margin: 0;
    }

    .site-description {
      font-size: 13px;
      opacity: 0.9;
      margin-top: 3px;
    }

    /* ========================================
       ナビゲーション (v7から変更なし)
       ======================================== */
    .main-navigation {
      background: white;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .nav-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      gap: 0;
    }

    .nav-item {
      flex: 1;
      padding: 15px;
      text-align: center;
      cursor: pointer;
      background: white;
      color: #666;
      border: none;
      font-size: 15px;
      font-weight: 500;
      transition: all 0.3s;
      position: relative;
    }

    .nav-item:hover {
      background: #f8f9fa;
      color: #667eea;
    }

    .nav-item.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }

    .nav-item.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-bottom: 10px solid #f5f5f5;
    }

    /* ========================================
       v7.30: 管理者タブ非表示・認証機能
       ======================================== */
    .nav-item.hidden {
      display: none;
    }

    .site-branding {
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
    }

    /* パスワード入力モーダル */
    .admin-modal {
      display: none;
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0,0,0,0.6);
      animation: fadeIn 0.3s;
    }

    .admin-modal-content {
      background-color: white;
      margin: 15% auto;
      padding: 35px;
      border-radius: 15px;
      width: 90%;
      max-width: 420px;
      box-shadow: 0 5px 30px rgba(0,0,0,0.3);
      animation: slideDown 0.4s;
    }

    @keyframes slideDown {
      from {
        transform: translateY(-50px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .admin-modal-content h3 {
      color: #2c3e50;
      margin-bottom: 20px;
      font-size: 24px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .admin-modal-content input {
      width: 100%;
      padding: 14px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 16px;
      margin-bottom: 15px;
      transition: border-color 0.3s;
      font-family: inherit;
    }

    .admin-modal-content input:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .admin-modal-content button {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }

    .admin-modal-content button:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

    .admin-modal-close {
      color: #aaa;
      float: right;
      font-size: 28px;
      font-weight: bold;
      line-height: 20px;
      cursor: pointer;
      transition: color 0.3s;
    }

    .admin-modal-close:hover {
      color: #333;
    }

    .admin-modal-hint {
      color: #6c757d;
      font-size: 12px;
      margin-top: 12px;
      text-align: center;
      line-height: 1.6;
    }

    /* ========================================
       v7.30: お問い合わせフォーム
       ======================================== */
    .contact-form-group {
      margin-bottom: 20px;
    }

    .contact-form-group label {
      display: block;
      font-weight: 600;
      margin-bottom: 8px;
      color: #2c3e50;
      font-size: 14px;
    }

    .contact-form-group input,
    .contact-form-group textarea {
      width: 100%;
      padding: 12px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 14px;
      font-family: inherit;
      transition: all 0.3s;
    }

    .contact-form-group input:focus,
    .contact-form-group textarea:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .contact-form-group textarea {
      min-height: 180px;
      resize: vertical;
      line-height: 1.6;
    }

    .contact-form-required {
      color: #dc3545;
      margin-left: 4px;
    }

    .contact-success-message {
      background: #d4edda;
      color: #155724;
      padding: 16px;
      border-radius: 8px;
      margin-bottom: 20px;
      border-left: 4px solid #28a745;
      line-height: 1.6;
    }

    .contact-error-message {
      background: #f8d7da;
      color: #721c24;
      padding: 16px;
      border-radius: 8px;
      margin-bottom: 20px;
      border-left: 4px solid #dc3545;
      line-height: 1.6;
    }

    /* ========================================
       v7.30: 数学的背景
       ======================================== */
    .math-section {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      padding: 25px;
      border-radius: 12px;
      margin: 25px 0;
      border-left: 5px solid #667eea;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .math-section h4 {
      color: #667eea;
      margin-bottom: 15px;
      font-size: 20px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .math-section p {
      color: #495057;
      line-height: 1.8;
      margin-bottom: 10px;
    }

    .formula-box {
      background: white;
      padding: 20px 25px;
      border-radius: 8px;
      /* 📐 アカデミックな数式フォント */
      font-family: 'STIX Two Math', 'Latin Modern Math', 'Cambria Math', 
                   'DejaVu Math TeX Gyre', 'Times New Roman', 
                   'Courier New', monospace;
      font-size: 15px;
      font-weight: 400;
      letter-spacing: 0.02em;
      margin: 18px 0;
      overflow-x: auto;
      border: 2px solid #e3f2fd;
      border-left: 4px solid #667eea;
      line-height: 1.8;
      color: #2c3e50;
      box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    .math-info-box {
      background: #e3f2fd;
      padding: 20px;
      border-radius: 10px;
      margin: 20px 0;
      border-left: 5px solid #2196f3;
      line-height: 1.8;
    }

    .math-info-box strong {
      color: #1976d2;
      font-weight: 700;
    }

    .math-warning-box {
      background: #fff3cd;
      padding: 20px;
      border-radius: 10px;
      margin: 20px 0;
      border-left: 5px solid #ffc107;
      line-height: 1.8;
    }

    .math-warning-box strong {
      color: #856404;
      font-weight: 700;
    }

    /* ========================================
       メインコンテンツ (v7から変更なし)
       ======================================== */
    .main-content {
      max-width: 1200px;
      margin: 30px auto;
      padding: 0 20px;
    }

    .tab-content {
      display: none;
      animation: fadeIn 0.5s;
    }

    .tab-content.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* ========================================
       セクション (v7から変更なし)
       ======================================== */
    .section {
      background: white;
      border-radius: 15px;
      padding: 30px;
      margin-bottom: 30px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .section h2 {
      color: #333;
      font-size: 24px;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 3px solid #667eea;
    }

    /* ========================================
       数字選択機能のスタイル (v7から変更なし)
       ======================================== */
    .number-selection-section {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 30px;
      border-left: 5px solid #667eea;
    }

    .number-selection-title {
      color: #667eea;
      font-size: 20px;
      font-weight: bold;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .number-selection-description {
      font-size: 14px;
      color: #6c757d;
      margin-bottom: 20px;
      line-height: 1.6;
    }

    .number-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
      gap: 8px;
      margin-bottom: 20px;
    }

    .number-btn {
      width: 50px;
      height: 50px;
      border: 2px solid #dee2e6;
      border-radius: 10px;
      background: white;
      font-size: 16px;
      font-weight: bold;
      color: #495057;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      user-select: none;
    }

    .number-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      z-index: 10;
    }

    .number-btn:active {
      transform: scale(0.95);
    }

    .number-btn.normal {
      background: white;
      border-color: #dee2e6;
      color: #495057;
    }

    .number-btn.required {
      background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
      border-color: #28a745;
      color: white;
      box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
    }

    .number-btn.required::after {
      content: '✓';
      position: absolute;
      top: -5px;
      right: -5px;
      background: #20c997;
      color: white;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid white;
    }

    .number-btn.excluded {
      background: linear-gradient(135deg, #dc3545 0%, #c92a2a 100%);
      border-color: #dc3545;
      color: white;
      opacity: 0.7;
      box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
    }

    .number-btn.excluded::after {
      content: '✕';
      position: absolute;
      top: -5px;
      right: -5px;
      background: #c92a2a;
      color: white;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid white;
    }

    .selection-controls {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .selection-status {
      display: flex;
      gap: 20px;
      margin-bottom: 15px;
      padding: 15px;
      background: white;
      border-radius: 10px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .status-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
    }

    .status-count {
      font-weight: bold;
      font-size: 18px;
      padding: 5px 10px;
      border-radius: 6px;
      background: #f8f9fa;
    }

    .status-item.required .status-count {
      background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
      color: #28a745;
    }

    .status-item.excluded .status-count {
      background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
      color: #dc3545;
    }

    /* ========================================
       条件フィルター機能のスタイル (v7から変更なし)
       ======================================== */
    .filter-section {
      background: linear-gradient(135deg, #f5f3ff 0%, #ede8ff 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 30px;
      border-left: 5px solid #9775fa;
    }

    .filter-title {
      color: #9775fa;
      font-size: 20px;
      font-weight: bold;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .filter-description {
      font-size: 14px;
      color: #6c757d;
      margin-bottom: 20px;
      line-height: 1.6;
    }

    .filter-stats-info {
      background: white;
      border-radius: 10px;
      padding: 15px;
      margin-bottom: 20px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .stats-row {
      display: flex;
      gap: 20px;
      margin-bottom: 10px;
    }

    .stats-item {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      background: #f8f9fa;
      border-radius: 8px;
    }

    .stats-label {
      font-size: 13px;
      color: #6c757d;
    }

    .stats-value {
      font-weight: bold;
      font-size: 16px;
      color: #333;
    }

    .filter-group {
      background: white;
      border-radius: 10px;
      padding: 20px;
      margin-bottom: 15px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .filter-group-title {
      font-size: 16px;
      font-weight: bold;
      color: #495057;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .filter-options {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-bottom: 10px;
    }

    .filter-checkbox {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 15px;
      background: #f8f9fa;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
      user-select: none;
    }

    .filter-checkbox:hover {
      background: #e9ecef;
      transform: translateY(-1px);
    }

    .filter-checkbox input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
    }

    .filter-checkbox label {
      cursor: pointer;
      font-size: 14px;
    }

    .filter-checkbox input[type="checkbox"]:checked + label {
      color: #667eea;
      font-weight: 600;
    }

    .range-filter {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 10px 0;
    }

    .range-input {
      width: 80px;
      padding: 8px;
      border: 2px solid #dee2e6;
      border-radius: 6px;
      font-size: 14px;
      text-align: center;
    }

    .range-input:focus {
      border-color: #667eea;
      outline: none;
    }

    /* ========================================
       高度なフィルター機能のスタイル (v7から変更なし)
       ======================================== */
    .advanced-filter-section {
      background: linear-gradient(135deg, #f0f8ff 0%, #e0f0ff 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 30px;
      border-left: 5px solid #4a90e2;
    }

    .advanced-filter-title {
      color: #4a90e2;
      font-size: 20px;
      font-weight: bold;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .advanced-filter-description {
      font-size: 14px;
      color: #6c757d;
      margin-bottom: 20px;
      line-height: 1.6;
    }

    .ac-value-display {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 20px;
      border-radius: 12px;
      margin: 15px 0;
      text-align: center;
    }

    .ac-value-number {
      font-size: 48px;
      font-weight: bold;
      margin: 10px 0;
    }

    .ac-value-label {
      font-size: 14px;
      opacity: 0.9;
    }

    .ac-recommendation {
      background: rgba(255, 255, 255, 0.2);
      padding: 10px;
      border-radius: 8px;
      margin-top: 10px;
      font-size: 13px;
    }

    .number-status-display {
      display: flex;
      gap: 15px;
      margin: 15px 0;
    }

    .hot-numbers, .cold-numbers {
      flex: 1;
      padding: 15px;
      border-radius: 10px;
    }

    .hot-numbers {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
      color: white;
    }

    .cold-numbers {
      background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
      color: white;
    }

    .number-status-title {
      font-size: 14px;
      font-weight: bold;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .number-status-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .status-number {
      width: 32px;
      height: 32px;
      background: rgba(255, 255, 255, 0.3);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      font-size: 14px;
    }

    .filter-strength-meter {
      background: #e9ecef;
      border-radius: 10px;
      height: 30px;
      position: relative;
      overflow: hidden;
      margin: 15px 0;
    }

    .filter-strength-fill {
      height: 100%;
      background: linear-gradient(90deg, #28a745 0%, #ffc107 50%, #dc3545 100%);
      border-radius: 10px;
      transition: width 0.5s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 14px;
    }

    /* ========================================
       統計検証機能のスタイル (v7から変更なし)
       ======================================== */
    .stats-verification {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      border-radius: 15px;
      padding: 25px;
      margin-bottom: 30px;
      border-left: 5px solid #667eea;
    }

    .verification-title {
      color: #667eea;
      font-size: 24px;
      font-weight: bold;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
      margin-bottom: 25px;
    }

    .stat-card {
      background: white;
      border-radius: 10px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
      border-left: 4px solid #667eea;
      transition: transform 0.2s;
    }

    .stat-card:hover {
      transform: translateY(-3px);
    }

    .stat-card.warning {
      border-left-color: #ffc107;
    }

    .stat-card.danger {
      border-left-color: #dc3545;
    }

    .stat-card.success {
      border-left-color: #28a745;
    }

    .stat-label {
      font-size: 13px;
      color: #6c757d;
      margin-bottom: 8px;
      font-weight: 600;
    }

    .stat-value {
      font-size: 32px;
      font-weight: bold;
      color: #333;
      margin-bottom: 5px;
    }

    .stat-subtitle {
      font-size: 12px;
      color: #6c757d;
    }

    .confidence-meter {
      background: #e9ecef;
      border-radius: 10px;
      height: 30px;
      position: relative;
      overflow: hidden;
      margin-top: 10px;
    }

    .confidence-fill {
      height: 100%;
      background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
      border-radius: 10px;
      transition: width 0.5s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: bold;
      font-size: 14px;
    }

    /* ========================================
       その他の共通スタイル (v7から変更なし)
       ======================================== */
    .loading {
      text-align: center;
      padding: 40px;
      color: #6c757d;
    }

    .spinner {
      border: 4px solid #f3f3f3;
      border-top: 4px solid #667eea;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: 0 auto 20px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .error-message {
      background: #f8d7da;
      color: #721c24;
      padding: 20px;
      border-radius: 10px;
      border-left: 4px solid #dc3545;
      margin: 20px 0;
    }

    .filter-warning {
      background: #fff3cd;
      color: #856404;
      padding: 20px;
      border-radius: 10px;
      border-left: 4px solid #ffc107;
      margin: 20px 0;
    }

    .trend-warning {
      background: #fff3cd;
      color: #856404;
      padding: 20px;
      border-radius: 10px;
      border-left: 4px solid #ffc107;
      margin: 20px 0;
      animation: fadeIn 0.5s;
    }

    .trend-warning-title {
      font-weight: bold;
      color: #856404;
      margin-bottom: 8px;
      font-size: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .trend-warning-content {
      color: #665103;
      font-size: 14px;
      line-height: 1.6;
    }

    .prediction-card {
      background: white;
      border-radius: 15px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
      border-left: 4px solid #dee2e6;
      transition: all 0.3s;
    }

    .prediction-card:hover {
      transform: translateX(5px);
      box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }

    .prediction-card.best {
      border-left-color: #ffc107;
      background: linear-gradient(135deg, #fffbf0 0%, #fff9e6 100%);
    }

    .prediction-card.ai-balanced { border-left-color: #667eea; }
    .prediction-card.ai-hot { border-left-color: #ff6b6b; }
    .prediction-card.ai-cold { border-left-color: #4dabf7; }

    .prediction-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }

    .prediction-rank {
      font-size: 16px;
      font-weight: bold;
      color: #495057;
    }

    .prediction-rank.best {
      color: #ffc107;
      font-size: 18px;
    }

    .prediction-rank.ai-balanced { color: #667eea; }
    .prediction-rank.ai-hot { color: #ff6b6b; }
    .prediction-rank.ai-cold { color: #4dabf7; }

    .prediction-score {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 5px 15px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: bold;
    }

    .pattern-label {
      background: #f8f9fa;
      color: #495057;
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 12px;
      display: inline-block;
      margin-bottom: 15px;
    }

    .numbers {
      display: flex;
      gap: 10px;
      margin-bottom: 15px;
    }

    .number-ball {
      width: 45px;
      height: 45px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      font-size: 16px;
      box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    }

    .number-ball.ai-hot {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
      box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    }
    .number-ball.ai-cold {
      background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
      box-shadow: 0 3px 10px rgba(77, 171, 247, 0.4);
    }

    .prediction-details {
      display: flex;
      gap: 15px;
      flex-wrap: wrap;
      padding-top: 15px;
      border-top: 1px solid #e9ecef;
    }

    .detail-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 13px;
    }

    .detail-label {
      color: #6c757d;
      font-weight: 600;
    }

    button {
      padding: 12px 25px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    button:active {
      transform: translateY(0);
    }

    button.secondary {
      background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
      box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    }

    button.danger {
      background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
      box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    }

    button.ai-hot {
      background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
      box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    button.ai-hot:hover {
      box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }
    button.ai-cold {
      background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
      box-shadow: 0 4px 15px rgba(77, 171, 247, 0.4);
    }
    button.ai-cold:hover {
      box-shadow: 0 6px 20px rgba(77, 171, 247, 0.4);
    }


    input[type="number"], input[type="text"], input[type="password"], textarea, select {
      width: 100%;
      padding: 10px;
      border: 2px solid #dee2e6;
      border-radius: 8px;
      font-size: 14px;
      transition: border-color 0.3s;
    }

    input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
      border-color: #667eea;
      outline: none;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: #495057;
      font-size: 14px;
    }

    .info-box {
      background: #e7f3ff;
      border-left: 4px solid #0066cc;
      padding: 15px;
      border-radius: 8px;
      margin: 20px 0;
    }

    .info-box-title {
      font-weight: bold;
      color: #0066cc;
      margin-bottom: 8px;
    }

    .info-box-content {
      color: #333;
      font-size: 14px;
      line-height: 1.6;
    }

    /* v7改: ページネーション用 */
    .pagination-controls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 15px;
      margin-top: 20px;
    }
    .pagination-controls button {
      padding: 8px 15px;
      font-size: 14px;
    }
    .pagination-controls button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .pagination-info {
        font-size: 14px;
        color: #6c757d;
    }

    /* ========================================
       統計分析：2階層タブ (新規追加)
       ======================================== */
    .analysis-categories {
      display: flex;
      gap: 10px;
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      padding: 15px;
      border-radius: 15px 15px 0 0;
      overflow-x: auto;
      flex-wrap: wrap;
      border-bottom: 3px solid #e9ecef;
    }

    .analysis-category {
      padding: 15px 25px;
      background: white;
      border: 2px solid #e9ecef;
      border-radius: 10px;
      cursor: pointer;
      font-size: 15px;
      font-weight: 600;
      color: #6c757d;
      transition: all 0.3s;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .analysis-category:hover {
      background: #f8f9fa;
      color: #495057;
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .analysis-category.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border-color: #667eea;
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .analysis-subtabs-container {
      display: none;
      background: white;
      padding: 15px;
      border-radius: 0 0 15px 15px;
    }

    .analysis-subtabs-container.active {
      display: block;
    }

    .analysis-subtabs {
      display: flex;
      gap: 5px;
      background: #f8f9fa;
      padding: 10px;
      border-radius: 10px;
      overflow-x: auto;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }

    .analysis-subtab {
      padding: 10px 18px;
      background: white;
      border: 2px solid #e9ecef;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      color: #6c757d;
      transition: all 0.3s;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .analysis-subtab:hover {
      background: #e9ecef;
      color: #495057;
    }

    .analysis-subtab.active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border-color: #667eea;
      box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    }

    .analysis-subtab-content {
      display: none;
      animation: fadeIn 0.3s ease-in;
    }

    .analysis-subtab-content.active {
      display: block;
    }

    /* 管理人からタブのサブタブコンテンツ */
    .admin-info-subtab-content {
      display: none;
      animation: fadeIn 0.3s ease-in;
    }

    .admin-info-subtab-content.active {
      display: block;
    }

    /* ========================================
       レスポンシブ対応 (v7から変更なし)
       ======================================== */
    @media (max-width: 768px) {
      .header-container {
        flex-direction: column;
        gap: 10px;
      }

      .nav-container {
        flex-direction: column;
      }

      .nav-item {
        border-bottom: 1px solid #e9ecef;
      }

      .nav-item:last-child {
        border-bottom: none;
      }

      .stats-grid {
        grid-template-columns: 1fr;
      }

      .number-status-display {
        flex-direction: column;
      }

      .prediction-details {
        gap: 10px;
      }

      .site-title {
        font-size: 20px;
      }

      .site-logo {
        font-size: 28px;
      }

      /* v7改: ページネーションボタン縮小 */
      .pagination-controls button {
        padding: 6px 10px;
        font-size: 12px;
      }
      .pagination-info {
        font-size: 12px;
      }

      /* v7.33: 管理人からタブのモバイル最適化 */
      .admin-info-subtab-content h4 {
        font-size: 16px !important;
        margin-top: 20px !important;
      }
      
      .admin-info-subtab-content p {
        font-size: 14px !important;
        line-height: 1.8 !important;
      }
      
      .admin-info-subtab-content li {
        font-size: 14px !important;
      }
      
      .admin-info-subtab-content > div {
        padding: 20px 15px !important;
      }

      /* v7.34: ラッキーナンバーセクションのモバイル最適化 */
      #luckyNumberContent input[type="number"] {
        width: 50px !important;
        padding: 6px !important;
        font-size: 14px !important;
      }
    }

    /* ========================================
       開発者を応援ページのスタイル (v7から変更なし)
       ======================================== */
    .content-card {
      background: white;
      border-radius: 15px;
      padding: 40px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .content-card h1 {
      color: #667eea;
      font-size: 36px;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 3px solid #667eea;
    }

    .content-card h2 {
      color: #2c3e50;
      font-size: 28px;
      margin: 40px 0 20px 0;
      padding-bottom: 10px;
      border-bottom: 2px solid #e9ecef;
    }

    .intro-section {
      background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
      padding: 30px;
      border-radius: 15px;
      margin-bottom: 40px;
      border-left: 5px solid #667eea;
    }

    .intro-section h2 {
      color: #667eea;
      border: none;
      margin: 0 0 15px 0;
      padding: 0;
    }

    .support-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 25px;
      margin: 30px 0;
    }

    .support-card {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      padding: 30px;
      border-radius: 15px;
      text-align: center;
      transition: all 0.3s;
      border: 2px solid transparent;
    }

    .support-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 20px rgba(0,0,0,0.15);
      border-color: #667eea;
    }

    .support-icon {
      font-size: 64px;
      margin-bottom: 20px;
    }

    .support-title {
      font-size: 22px;
      font-weight: bold;
      color: #2c3e50;
      margin-bottom: 15px;
    }

    .support-desc {
      font-size: 14px;
      color: #6c757d;
      line-height: 1.6;
      margin-bottom: 20px;
      min-height: 60px;
    }

    .support-button {
      width: 100%;
      padding: 12px 25px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
    }

    .support-button:hover {
      transform: scale(1.05);
      box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

    .thank-you-section {
      background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
      padding: 40px;
      border-radius: 15px;
      text-align: center;
      margin-top: 50px;
      border: 3px solid #ffc107;
    }

    .thank-you-section h2 {
      color: #856404;
      border: none;
      margin: 0 0 20px 0;
      padding: 0;
    }

    /* ========================================
       モーダル (v7から変更なし)
       ======================================== */
    .modal {
      display: none;
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0,0,0,0.5);
      overflow: auto;
    }

    .modal.active {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .modal-content {
      background-color: #fefefe;
      padding: 30px;
      border-radius: 15px;
      max-width: 500px;
      width: 90%;
      position: relative;
      animation: modalSlideIn 0.3s ease-out;
    }

    @keyframes modalSlideIn {
      from {
        transform: translateY(-50px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .modal-close {
      position: absolute;
      right: 20px;
      top: 20px;
      font-size: 28px;
      font-weight: bold;
      color: #aaa;
      cursor: pointer;
      transition: color 0.3s;
    }

    .modal-close:hover {
      color: #333;
    }

    /* ========================================
       v7.31: 追従型「先頭に戻る」ボタン
       ======================================== */
    .scroll-to-top {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 50px;
      height: 50px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 24px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      z-index: 999;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .scroll-to-top.visible {
      opacity: 1;
      visibility: visible;
    }

    .scroll-to-top:hover {
      transform: translateY(-5px);
      box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    }

    .scroll-to-top:active {
      transform: translateY(-2px);
    }

    /* モバイル調整 */
    @media (max-width: 768px) {
      .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
      }
    }

    /* ========================================
       v7.31: 過去データのカード形式（モバイル）
       ======================================== */
    .history-card-container {
      display: none; /* デフォルトは非表示（モバイルで表示） */
    }

    .history-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 15px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .history-card:active {
      transform: scale(0.98);
    }

    .history-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      padding-bottom: 12px;
      border-bottom: 2px solid #f0f0f0;
    }

    .history-card-round {
      font-size: 18px;
      font-weight: bold;
      color: #667eea;
    }

    .history-card-date {
      font-size: 13px;
      color: #666;
    }

    .history-card-numbers {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 15px;
    }

    .history-card-number {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 12px;
      border-radius: 8px;
      text-align: center;
      font-size: 18px;
      font-weight: bold;
      box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    }

    .history-card-bonus {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 12px;
      background: #fff3cd;
      border-radius: 8px;
      border-left: 4px solid #ffc107;
    }

    .history-card-bonus-label {
      font-size: 13px;
      color: #856404;
      font-weight: bold;
    }

    .history-card-bonus-number {
      font-size: 20px;
      font-weight: bold;
      color: #856404;
    }

    /* モバイルではカード形式、PCではテーブル形式 */
    @media (max-width: 768px) {
      .history-card-container {
        display: block;
      }
      
      .history-table-container {
        display: none;
      }

      /* モバイルのボタンサイズを大きく */
      button {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 20px;
      }

      /* モバイルの入力フォームを大きく */
      input, select, textarea {
        min-height: 48px;
        font-size: 16px;
        padding: 10px 15px;
      }
    }

    /* PC表示 */
    @media (min-width: 769px) {
      .history-card-container {
        display: none;
      }
      
      .history-table-container {
        display: block;
      }
    }

    /* ========================================
       v7.31: 統一されたローディング表示
       ======================================== */
    .loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none; /* 背景クリックを可能に */
      z-index: 9999;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .loading-overlay.active {
      visibility: visible;
      opacity: 1;
    }

    .loading-content {
      position: fixed;
      bottom: 30px;
      right: 30px;
      background: white;
      padding: 20px 25px;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      text-align: left;
      max-width: 350px;
      min-width: 300px;
      pointer-events: auto; /* コンテンツ自体はクリック可能 */
      border-left: 4px solid #667eea;
    }

    .loading-spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid #f3f3f3;
      border-top: 3px solid #667eea;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin-right: 10px;
      vertical-align: middle;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .loading-text {
      display: inline-block;
      font-size: 15px;
      color: #333;
      font-weight: 600;
      margin-bottom: 10px;
      vertical-align: middle;
    }

    .loading-subtext {
      font-size: 13px;
      color: #666;
      margin-top: 8px;
      line-height: 1.4;
    }

    .loading-progress-bar {
      width: 100%;
      height: 6px;
      background: #e9ecef;
      border-radius: 3px;
      margin-top: 12px;
      overflow: hidden;
    }

    .loading-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
      border-radius: 3px;
      transition: width 0.3s ease;
      width: 0%;
    }

    /* モバイル対応 */
    @media (max-width: 768px) {
      .loading-content {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        min-width: 0;
      }
    }


    /* ========================================
       バックテスト用の小さな進捗表示
       ======================================== */
    .backtest-progress {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: white;
      padding: 20px 25px;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      z-index: 9999;
      min-width: 300px;
      max-width: 400px;
      display: none;
      animation: slideInRight 0.3s ease;
    }

    .backtest-progress.active {
      display: block;
    }

    @keyframes slideInRight {
      from {
        transform: translateX(100%);
        opacity: 0;
      }
      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    .backtest-progress-header {
      display: flex;
      align-items: center;
      margin-bottom: 15px;
      gap: 12px;
    }

    .backtest-progress-spinner {
      width: 24px;
      height: 24px;
      border: 3px solid #e3f2fd;
      border-top: 3px solid #667eea;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    .backtest-progress-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      flex: 1;
    }

    .backtest-progress-bar {
      width: 100%;
      height: 8px;
      background: #e9ecef;
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 10px;
    }

    .backtest-progress-fill {
      height: 100%;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      transition: width 0.3s ease;
      border-radius: 4px;
    }

    .backtest-progress-text {
      font-size: 14px;
      color: #666;
      text-align: center;
    }


    /* ========================================
       v7.31: 管理者タブ内「先頭に戻る」ボタン
       ======================================== */
    .section-divider {
      text-align: center;
      margin: 40px 0;
      padding: 20px 0;
      border-top: 2px solid #e9ecef;
      border-bottom: 2px solid #e9ecef;
    }

    .scroll-to-section-top {
      background: var(--gradient-primary);
      color: white;
      border: none;
      padding: 10px 25px;
      border-radius: 25px;
      font-size: 14px;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
      transition: all 0.3s ease;
    }

    .scroll-to-section-top:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .scroll-to-section-top:active {
      transform: translateY(0);
    }


    /* ========================================
       v7.42: 重み調整±ボタン（モバイルファースト）
       ======================================== */
    .weight-btn {
      min-width: 48px;
      min-height: 48px;
      font-size: 24px;
      padding: 0;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      touch-action: manipulation;
      user-select: none;
      font-weight: bold;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .weight-btn:active {
      transform: scale(0.95);
      opacity: 0.8;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .weight-btn:hover {
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    /* タブレット・PC用の調整 */
    @media (min-width: 768px) {
      .weight-btn {
        min-width: 42px;
        min-height: 42px;
        font-size: 22px;
      }
    }

    /* 大画面用の調整 */
    @media (min-width: 1200px) {
      .weight-btn {
        min-width: 40px;
        min-height: 40px;
        font-size: 20px;
      }
    }
