/* ad576 schools.php の見た目（もとはページの中に直接書いていたもの。キャッシュで速くするため外に出した。中身は同じ） */
/* schools.php専用スタイル */
        .main-content {
            max-width: 1400px;
            margin: 20px auto;
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        }
        
        .page-title {
            font-size: 28px;
            font-weight: 900;
            color: #333;
            margin-bottom: 8px;
        }
        
        .subtitle {
            color: #666;
            font-size: 14px;
            margin-bottom: 20px;
        }
        
        /* ====================================
           マッチングシステム - 検索エリア
           ==================================== */
        .matching-area {
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
            border: 2px solid #e0e7ff;
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 25px;
        }
        
        /* 折りたたみ可能なヘッダー */
        .matching-header-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            gap: 15px;
            user-select: none;
            -webkit-user-select: none;
        }
        
        .matching-header-left {
            flex: 1;
        }
        
        .matching-toggle-btn {
            flex-shrink: 0;
            padding: 12px 24px;
            border-radius: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-size: 14px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
            white-space: nowrap;
        }
        
        .matching-header-toggle:hover .matching-toggle-btn {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
            background: linear-gradient(135deg, #5a6fd6 0%, #6a3f96 100%);
        }
        
        .matching-toggle-btn .toggle-arrow {
            font-size: 12px;
            transition: transform 0.3s;
        }
        
        /* 閉じている時のボタン表示 */
        .matching-toggle-btn .btn-text-open {
            display: inline;
        }
        .matching-toggle-btn .btn-text-close {
            display: none;
        }
        
        /* 開いている時のボタン表示 */
        .matching-area:not(.collapsed) .matching-toggle-btn .btn-text-open {
            display: none;
        }
        .matching-area:not(.collapsed) .matching-toggle-btn .btn-text-close {
            display: inline;
        }
        .matching-area:not(.collapsed) .matching-toggle-btn {
            background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
            box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
            padding: 10px 20px;
            font-size: 13px;
        }
        .matching-area:not(.collapsed) .matching-toggle-btn .toggle-arrow {
            transform: rotate(180deg);
        }
        
        .matching-body {
            margin-top: 20px;
            overflow: hidden;
        }
        
        .matching-area.collapsed .matching-body {
            display: none;
        }
        
        .matching-area.collapsed {
            padding-bottom: 20px;
        }
        
        .matching-title {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .matching-title h2 {
            font-size: 20px;
            color: #333;
            margin: 0;
        }
        
        .matching-title .icon {
            font-size: 28px;
        }
        
        .matching-disclaimer {
            font-size: 12px;
            color: #92400e;
            margin-top: 15px;
            padding: 12px 16px;
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-radius: 8px;
            border: 2px solid #f59e0b;
            font-weight: 500;
        }
        
        .matching-subtitle {
            font-size: 14px;
            color: #4b5563;
            margin-top: 8px;
        }
        
        /* ====================================
           マッチングタブ
           ==================================== */
        .matching-tabs {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 25px;
        }
        
        .matching-tab {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 15px 8px;
            background: white;
            border: 3px solid #e0e0e0;
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .matching-tab:hover {
            border-color: #667eea;
            background: #f8f9ff;
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
        }
        
        .matching-tab.active {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 5px 25px rgba(102, 126, 234, 0.4);
        }
        
        .matching-tab .tab-icon {
            font-size: 28px;
            margin-bottom: 6px;
        }
        
        /* ====================================
           診断クイズスタイル
           ==================================== */
        .quiz-section {
            max-width: 800px;
            margin: 0 auto;
        }
        
        .quiz-question {
            background: white;
            border-radius: 16px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .quiz-number {
            display: inline-block;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 14px;
            margin-bottom: 10px;
        }
        
        .quiz-text {
            font-size: 18px;
            font-weight: bold;
            color: #1f2937;
            margin-bottom: 20px;
        }
        
        .quiz-options {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        
        .quiz-options-3 {
            grid-template-columns: repeat(3, 1fr);
        }
        
        .quiz-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px 15px;
            background: #f8f9fa;
            border: 3px solid #e5e7eb;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .quiz-btn:hover {
            border-color: #667eea;
            background: #f0f4ff;
        }
        
        .quiz-btn.selected {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .quiz-icon {
            font-size: 32px;
            margin-bottom: 10px;
        }
        
        .quiz-label {
            font-weight: bold;
            font-size: 15px;
            margin-bottom: 5px;
        }
        
        .quiz-desc {
            font-size: 12px;
            opacity: 0.8;
        }
        
        .quiz-result {
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border: 3px solid #10b981;
            border-radius: 16px;
            padding: 30px;
            text-align: center;
            margin-top: 30px;
        }
        
        .quiz-result-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .quiz-result-header .result-icon {
            font-size: 36px;
        }
        
        .quiz-result-header h4 {
            font-size: 22px;
            color: #065f46;
            margin: 0;
        }
        
        .quiz-result-text {
            font-size: 16px;
            color: #047857;
            line-height: 1.8;
            margin-bottom: 15px;
        }
        
        .quiz-result-hint {
            font-size: 13px;
            color: #6b7280;
            background: white;
            padding: 12px 20px;
            border-radius: 8px;
            display: inline-block;
        }
        
        /* 学習スタイル・環境スタイル共通 */
        .style-section, .environment-section {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .style-category, .environment-category {
            background: white;
            border-radius: 16px;
            padding: 25px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .style-category h4, .environment-category h4 {
            font-size: 16px;
            color: #374151;
            margin: 0 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 2px dashed #e5e7eb;
        }
        
        .style-options, .environment-options {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }
        
        .style-btn, .environment-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 18px 12px;
            background: #f8f9fa;
            border: 3px solid #e5e7eb;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .style-btn:hover, .environment-btn:hover {
            border-color: #667eea;
            background: #f0f4ff;
            transform: translateY(-2px);
        }
        
        .style-btn.active, .environment-btn.active {
            border-color: #667eea;
            background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
        }
        
        .style-btn .emoji, .environment-btn .emoji {
            font-size: 28px;
            margin-bottom: 8px;
        }
        
        .style-btn .label, .environment-btn .label {
            font-weight: bold;
            font-size: 13px;
            color: #1f2937;
            margin-bottom: 4px;
        }
        
        .style-btn .desc, .environment-btn .desc {
            font-size: 11px;
            color: #6b7280;
        }
        
        .style-result {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border: 3px solid #f59e0b;
            border-radius: 16px;
            padding: 25px;
            text-align: center;
            margin-top: 25px;
        }
        
        .matching-tab .tab-label {
            font-weight: 700;
            font-size: 14px;
            margin-bottom: 4px;
        }
        
        .matching-tab .tab-desc {
            font-size: 11px;
            opacity: 0.7;
        }
        
        /* ====================================
           マッチングモード共通
           ==================================== */
        .matching-mode {
            display: none;
            animation: fadeIn 0.3s ease;
        }
        
        .matching-mode.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .mode-header {
            text-align: center;
            margin-bottom: 25px;
            padding: 20px;
            background: linear-gradient(135deg, #fff7e6 0%, #ffe4b3 100%);
            border-radius: 15px;
            border: 2px solid #ff9800;
        }
        
        .mode-header h3 {
            font-size: 20px;
            color: #e65100;
            margin-bottom: 8px;
        }
        
        .mode-header p {
            color: #666;
            font-size: 14px;
        }
        
        /* ====================================
           性格タイプ診断スタイル
           ==================================== */
        .personality-section {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .personality-category {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.08);
        }
        
        .personality-category h4 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            color: #333;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px dashed #e0e0e0;
        }
        
        .personality-category .cat-icon {
            font-size: 22px;
        }
        
        .personality-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
        }
        
        .personality-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 18px 15px;
            background: #f8f9fa;
            border: 3px solid transparent;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .personality-btn:hover {
            background: #e0e7ff;
            border-color: #667eea;
            transform: scale(1.02);
        }
        
        .personality-btn.active {
            background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
            border-color: #667eea;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        .personality-btn .emoji {
            font-size: 36px;
            margin-bottom: 10px;
        }
        
        .personality-btn .label {
            font-weight: 700;
            font-size: 14px;
            color: #333;
            margin-bottom: 5px;
        }
        
        .personality-btn .desc {
            font-size: 11px;
            color: #666;
        }
        
        .personality-result {
            margin-top: 25px;
            padding: 25px;
            background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
            border: 3px solid #10b981;
            border-radius: 20px;
            text-align: center;
        }
        
        .result-badge {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: white;
            padding: 12px 25px;
            border-radius: 30px;
            margin-bottom: 15px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        }
        
        .result-badge .badge-icon {
            font-size: 28px;
        }
        
        .result-badge .badge-type {
            font-weight: 700;
            font-size: 18px;
            color: #047857;
        }
        
        .result-desc {
            font-size: 15px;
            color: #065f46;
            line-height: 1.8;
        }
        
        /* ====================================
           将来の夢スタイル
           ==================================== */
        .future-section {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .future-category {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.08);
        }
        
        .future-category h4 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            color: #333;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px dashed #e0e0e0;
        }
        
        .future-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
        }
        
        .future-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 18px 12px;
            background: #f8f9fa;
            border: 3px solid transparent;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }
        
        .future-btn:hover {
            background: #fef3c7;
            border-color: #f59e0b;
            transform: scale(1.02);
        }
        
        .future-btn.active {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-color: #f59e0b;
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
        }
        
        .future-btn .emoji {
            font-size: 32px;
            margin-bottom: 8px;
        }
        
        .future-btn .label {
            font-weight: 700;
            font-size: 13px;
            color: #333;
        }
        
        .future-btn .subdesc {
            font-size: 10px;
            color: #666;
            margin-top: 4px;
        }
        
        /* ====================================
           学校生活スタイル
           ==================================== */
        .lifestyle-section {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .lifestyle-category {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.08);
        }
        
        .lifestyle-category h4 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            color: #333;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px dashed #e0e0e0;
        }
        
        .lifestyle-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
        }
        
        .lifestyle-btn {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px 18px;
            background: #f8f9fa;
            border: 3px solid transparent;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: left;
        }
        
        .lifestyle-btn:hover {
            background: #dbeafe;
            border-color: #3b82f6;
        }
        
        .lifestyle-btn.active {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-color: #3b82f6;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }
        
        .lifestyle-btn .emoji {
            font-size: 28px;
        }
        
        .lifestyle-btn .label {
            font-weight: 600;
            font-size: 14px;
            color: #333;
        }
        
        .result-count {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 8px 20px;
            border-radius: 25px;
            font-weight: bold;
            font-size: 14px;
        }
        
        /* 学校名検索ボックス */
        .search-box {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .search-input {
            flex: 1;
            padding: 14px 20px;
            border: 2px solid #e0e0e0;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s;
        }
        
        .search-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .search-btn {
            padding: 14px 28px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .search-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }
        
        /* フィルターセクション */
        .filter-sections {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .filter-section {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        .filter-section-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 700;
            color: #333;
            margin-bottom: 15px;
            font-size: 15px;
        }
        
        .filter-section-title .icon {
            font-size: 18px;
        }
        
        /* クイックフィルター（基本フィルター） */
        .quick-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .filter-btn {
            padding: 10px 18px;
            background: #f0f0f0;
            border: 2px solid transparent;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            font-size: 13px;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .filter-btn:hover {
            background: #e0e7ff;
            border-color: #667eea;
        }
        
        .filter-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-color: transparent;
        }
        
        .filter-btn .emoji {
            font-size: 14px;
        }
        
        /* グループ化されたフィルター */
        .filter-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 12px;
            background: #fafafa;
            border-radius: 12px;
            margin-bottom: 12px;
        }
        
        .filter-group:last-child {
            margin-bottom: 0;
        }
        
        .filter-group-label {
            width: 100%;
            font-size: 12px;
            color: #666;
            margin-bottom: 6px;
            font-weight: 600;
        }
        
        /* 詳細フィルター展開ボタン */
        .advanced-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            background: white;
            border: 2px dashed #d0d0d0;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            color: #666;
            transition: all 0.3s;
            margin-top: 15px;
        }
        
        .advanced-toggle:hover {
            border-color: #667eea;
            color: #667eea;
            background: #f8f9ff;
        }
        
        .advanced-toggle.active {
            border-style: solid;
            border-color: #667eea;
            color: #667eea;
            background: #f0f4ff;
        }
        
        /* 詳細フィルターエリア */
        .advanced-filters {
            display: none;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px dashed #e0e0e0;
        }
        
        .advanced-filters.show {
            display: block;
        }
        
        .advanced-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }
        
        /* 偏差値スライダー */
        .hensachi-slider-container {
            padding: 15px;
            background: #fafafa;
            border-radius: 12px;
        }
        
        .hensachi-display {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }
        
        .hensachi-value {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 8px 20px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 18px;
            min-width: 60px;
            text-align: center;
        }
        
        .hensachi-range {
            color: #666;
            font-size: 14px;
        }
        
        .dual-slider {
            position: relative;
            height: 40px;
        }
        
        .dual-slider input[type="range"] {
            position: absolute;
            width: 100%;
            height: 8px;
            background: transparent;
            pointer-events: none;
            -webkit-appearance: none;
            appearance: none;
        }
        
        .dual-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 24px;
            height: 24px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }
        
        .slider-track {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 100%;
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
        }
        
        .slider-range {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            height: 8px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 4px;
        }
        
        /* チェックボックススタイル */
        .checkbox-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 8px;
        }
        
        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #fafafa;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 13px;
        }
        
        .checkbox-item:hover {
            background: #e0e7ff;
        }
        
        .checkbox-item input {
            display: none;
        }
        
        .checkbox-item .checkmark {
            width: 18px;
            height: 18px;
            border: 2px solid #ccc;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }
        
        .checkbox-item input:checked + .checkmark {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-color: #667eea;
        }
        
        .checkbox-item input:checked + .checkmark::after {
            content: "✓";
            color: white;
            font-size: 12px;
            font-weight: bold;
        }
        
        .checkbox-item.active {
            background: #e0e7ff;
            border: 1px solid #667eea;
        }
        
        /* ソートボタン */
        .sort-section {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px 20px;
            background: white;
            border-radius: 12px;
            margin-top: 15px;
            flex-wrap: wrap;
        }
        
        .sort-label {
            font-weight: 600;
            color: #666;
            font-size: 13px;
        }
        
        .sort-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .sort-btn {
            padding: 8px 16px;
            background: #f0f0f0;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-weight: 600;
            font-size: 12px;
            transition: all 0.3s;
        }
        
        .sort-btn:hover {
            background: #e0e7ff;
        }
        
        .sort-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        /* リセットボタン */
        .reset-btn {
            padding: 10px 24px;
            background: #f8f9fa;
            border: 2px solid #dc3545;
            border-radius: 25px;
            color: #dc3545;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-left: auto;
        }
        
        .reset-btn:hover {
            background: #dc3545;
            color: white;
        }
        
        /* 選択中のフィルター表示 */
        .active-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #e0e0e0;
        }
        
        .active-filter-tag {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: #e0e7ff;
            border-radius: 20px;
            font-size: 12px;
            color: #667eea;
            font-weight: 600;
        }
        
        .active-filter-tag .remove {
            cursor: pointer;
            font-size: 14px;
            opacity: 0.7;
        }
        
        .active-filter-tag .remove:hover {
            opacity: 1;
        }
        
        /* 入試優遇バッジ */
        .privilege-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }
        
        .privilege-badge.eiken {
            background: #dbeafe;
            color: #1d4ed8;
        }
        
        .privilege-badge.sports {
            background: #fef3c7;
            color: #92400e;
        }
        
        .privilege-badge.returnee {
            background: #d1fae5;
            color: #047857;
        }
        
        /* 情報注記 */
        .info-note {
            background: #e7f3ff;
            border-left: 4px solid #667eea;
            padding: 12px 16px;
            margin-bottom: 20px;
            border-radius: 0 8px 8px 0;
            font-size: 13px;
        }
        
        .yomikata-link-box {
            text-align: center;
            margin-bottom: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        
        .yomikata-link-box a {
            display: inline-block;
            padding: 10px 24px;
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            transition: opacity 0.2s;
        }
        
        .yomikata-link-box a:hover {
            opacity: 0.9;
        }
        
        .yomikata-link-box .btn-qa {
            background: linear-gradient(135deg, #5c4d8e, #8b6cc1);
            text-align: center;
            line-height: 1.5;
            padding: 14px 28px;
        }

        /* 共通偏差値フィルタ */
        .mhf-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .mhf-btn {
            padding: 7px 14px;
            border: 2px solid #c5cae9;
            border-radius: 20px;
            background: #fff;
            color: #444;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .mhf-btn:hover { border-color: #7986cb; background: #e8eaf6; }
        .mhf-btn.active {
            background: linear-gradient(135deg, #5c6bc0, #7e57c2);
            color: #fff;
            border-color: #5c6bc0;
        }
        .yomikata-link-box .btn-qa .btn-qa-main {
            display: block;
            font-size: 15px;
            font-weight: 700;
        }
        .yomikata-link-box .btn-qa .btn-qa-sub {
            display: block;
            font-size: 11px;
            font-weight: 400;
            opacity: 0.85;
            margin-top: 2px;
        }
        
        .yomikata-link-box .btn-yomikata {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        /* テーマ別ガイドグリッド */
        .guide-grid-box {
            margin-bottom: 24px;
            background: #f8f9ff;
            border-radius: 12px;
            padding: 20px;
        }
        .guide-grid-title {
            font-size: 16px;
            font-weight: 700;
            color: #333;
            text-align: center;
            margin-bottom: 14px;
        }
        .guide-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        .guide-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            padding: 14px 16px;
            background: #fff;
            border-radius: 10px;
            text-decoration: none;
            color: #333;
            transition: all 0.2s;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        }
        .guide-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .guide-icon {
            font-size: 24px;
            margin-bottom: 6px;
        }
        .guide-label {
            font-size: 14px;
            font-weight: 700;
            color: #333;
            line-height: 1.3;
        }
        .guide-sub {
            font-size: 11px;
            color: #888;
            margin-top: 3px;
        }
        @media (max-width: 599px) {
            .guide-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        
        /* ====================================
           学校テーブル - PC版
           ==================================== */
        .school-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .school-table th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 12px;
            text-align: left;
            font-size: 14px;
        }
        
        .school-table td {
            padding: 12px;
            border-bottom: 1px solid #eee;
            vertical-align: middle;
        }
        
        .school-table tr:hover { background: #f8f9fa; }
        
        .school-table tr.hidden { display: none; }
        
        .school-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .school-badge {
            background: #28a745;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: bold;
            white-space: nowrap;
        }
        
        .school-badge.pending {
            background: #6c757d;
        }
        
        .school-name {
            font-weight: 600;
            color: #333;
        }
        
        .school-name-wrap {
            display: flex;
            flex-direction: column;
        }
        
        .school-furigana {
            font-size: 11px;
            color: #999;
            line-height: 1.3;
            margin-top: 2px;
        }
        
        .hensachi {
            font-size: 24px;
            font-weight: 900;
            color: #667eea;
        }
        
        .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }
        
        .tag {
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 12px;
            background: #f0f0f0;
            color: #333;
        }
        
        .tag.blue { background: #e7f3ff; color: #0066cc; }
        .tag.purple { background: #f3e7ff; color: #6600cc; }
        .tag.green { background: #d1fae5; color: #047857; }
        .tag.orange { background: #fef3c7; color: #92400e; }
        
        .access-line {
            margin-top: 8px;
            font-size: 13px;
            color: #1a5f7a;
            display: flex;
            align-items: center;
            gap: 4px;
            flex-wrap: wrap;
        }
        .access-line .access-more {
            color: #888;
            font-size: 12px;
        }
        
        .actions {
            display: flex;
            flex-wrap: nowrap;
            gap: 6px;
        }
        
        .btn {
            padding: 8px 10px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            white-space: nowrap;
            flex-shrink: 0;
        }
        
        .btn-green { background: #28a745; color: white; }
        .btn-orange { background: #fd7e14; color: white; }
        .btn-blue { background: #007bff; color: white; }
        .btn-cyan { background: #17a2b8; color: white; }
        .btn-red { background: #dc3545; color: white; }
        
        /* 該当なしメッセージ */
        .no-results {
            text-align: center;
            padding: 60px 20px;
            color: #666;
        }
        
        .no-results .icon {
            font-size: 60px;
            margin-bottom: 20px;
        }
        
        .no-results h3 {
            color: #333;
            margin-bottom: 10px;
        }
        
        /* ====================================
           スマホ対応
           ==================================== */
        @media (max-width: 768px) {
            
            .main-content {
                margin: 10px;
                padding: 15px;
                border-radius: 12px;
            }
            
            .page-title { font-size: 20px; }
            .subtitle { font-size: 12px; }
            
            .matching-area {
                padding: 15px;
            }
            
            .matching-header-toggle {
                flex-direction: row;
                align-items: center;
                gap: 10px;
            }
            
            .matching-header-left {
                flex: 1;
            }
            
            .matching-toggle-btn {
                padding: 10px 16px;
                font-size: 12px;
            }
            
            .matching-title h2 {
                font-size: 17px;
            }
            
            .search-box {
                flex-direction: column;
            }
            
            .filter-section {
                padding: 15px;
            }
            
            .filter-btn {
                padding: 8px 14px;
                font-size: 12px;
            }
            
            .advanced-grid {
                grid-template-columns: 1fr;
            }
            
            .checkbox-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .sort-section {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .reset-btn {
                margin-left: 0;
                margin-top: 10px;
                width: 100%;
            }
            
            /* テーブルをカード形式に */
            .school-table thead { display: none; }
            
            .school-table tr {
                display: block;
                background: white;
                border: 1px solid #eee;
                border-radius: 12px;
                margin-bottom: 12px;
                padding: 12px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            }
            
            .school-table td {
                display: block;
                padding: 4px 0;
                border: none;
            }
            
            .school-table td:first-child {
                padding-bottom: 8px;
                border-bottom: 1px solid #eee;
                margin-bottom: 8px;
            }
            
            .school-info {
                flex-direction: row;
                align-items: center;
            }
            
            .school-name {
                font-size: 15px;
            }
            
            
            .school-table td:nth-child(2) {
                display: block;
                width: auto;
                vertical-align: middle;
            }
            
            .hensachi {
                font-size: 28px;
            }
            
            .tags {
                display: inline-flex;
            }
            
            .tag {
                padding: 3px 8px;
                font-size: 11px;
            }
            
            .school-table td:last-child {
                margin-top: 10px;
                padding-top: 10px;
                border-top: 1px solid #eee;
            }
            
            .actions {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
                gap: 8px;
            }
            
            .btn {
                padding: 10px 6px;
                font-size: 12px;
                min-height: 44px;
                flex-direction: column;
                gap: 3px;
            }
            
            .btn br { display: none; }
        }
        
        .search-hint {
            font-size: 13px;
            color: #64748b;
            margin-top: 12px;
            text-align: center;
        }
        
        /* ====================================
           メイン検索窓スタイル
           ==================================== */
        .main-search-container {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 25px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        }
        
        .main-search-box {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        
        .main-search-input-wrapper {
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .main-search-icon {
            position: absolute;
            left: 18px;
            font-size: 20px;
            z-index: 1;
        }
        
        .main-search-input {
            width: 100%;
            padding: 18px 50px 18px 50px;
            font-size: 16px;
            border: 3px solid #e2e8f0;
            border-radius: 50px;
            outline: none;
            transition: all 0.3s;
            background: white;
        }
        
        .main-search-input:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
        }
        
        .main-search-input::placeholder {
            color: #94a3b8;
        }
        
        .main-search-clear {
            position: absolute;
            right: 15px;
            background: #94a3b8;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            cursor: pointer;
            font-size: 14px;
            line-height: 1;
        }
        
        .main-search-clear:hover {
            background: #64748b;
        }
        
        .main-search-btn {
            padding: 18px 35px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }
        
        .main-search-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        }
        
        .main-search-suggestions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 15px;
            flex-wrap: wrap;
        }
        
        .suggestion-label {
            font-size: 13px;
            color: #64748b;
            font-weight: 500;
        }
        
        .suggestion-tag {
            padding: 6px 14px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 20px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .suggestion-tag:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }
        
        /* ====================================
           詳細検索アコーディオンスタイル
           ==================================== */
        .detail-search-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .detail-section {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.06);
            border: 2px solid #e5e7eb;
            transition: all 0.3s;
        }
        
        .detail-section.open {
            border-color: #667eea;
        }
        
        .detail-section-header {
            display: flex;
            align-items: center;
            padding: 18px 20px;
            cursor: pointer;
            background: #f8fafc;
            transition: all 0.2s;
        }
        
        .detail-section-header:hover {
            background: #f1f5f9;
        }
        
        .detail-section.open .detail-section-header {
            background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
        }
        
        .section-icon {
            font-size: 22px;
            margin-right: 12px;
        }
        
        .section-title {
            flex: 1;
            font-weight: 700;
            font-size: 15px;
            color: #333;
        }
        
        .section-toggle {
            color: #94a3b8;
            font-size: 12px;
            transition: transform 0.3s;
        }
        
        .detail-section.open .section-toggle {
            transform: rotate(0deg);
        }
        
        .detail-section:not(.open) .section-toggle {
            transform: rotate(-90deg);
        }
        
        .detail-section-content {
            padding: 20px;
            border-top: 1px solid #e5e7eb;
        }
        
        .detail-row {
            margin-bottom: 20px;
        }
        
        .detail-row:last-child {
            margin-bottom: 0;
        }
        
        .detail-label {
            font-size: 13px;
            font-weight: 600;
            color: #64748b;
            margin-bottom: 10px;
        }
        
        .detail-options {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .detail-options .filter-btn {
            padding: 10px 16px;
            font-size: 13px;
        }
        
        /* 偏差値プリセットボタン */
        .hensachi-presets {
            display: flex;
            gap: 8px;
            margin-top: 15px;
            flex-wrap: wrap;
        }
        
        .preset-btn {
            padding: 8px 16px;
            background: #f1f5f9;
            border: 2px solid #e2e8f0;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .preset-btn:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }
        
        /* 通学エリア選択スタイル */
        .commute-select-wrapper {
            margin-top: 10px;
        }
        
        .commute-select {
            width: 100%;
            max-width: 400px;
            padding: 12px 15px;
            font-size: 15px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            background: white;
            cursor: pointer;
            outline: none;
        }
        
        .commute-select:focus {
            border-color: #667eea;
        }
        
        .commute-note {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 15px;
        }
        
        .filter-note {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 10px;
            padding: 10px;
            background: #f8fafc;
            border-radius: 8px;
        }
        
        /* レスポンシブ対応 */
        @media (max-width: 768px) {
            .main-search-box {
                flex-direction: column;
            }
            
            .main-search-input-wrapper {
                width: 100%;
            }
            
            .main-search-btn {
                width: 100%;
            }
            
            .main-search-suggestions {
                justify-content: center;
            }
            
            .detail-options .filter-btn {
                padding: 8px 12px;
                font-size: 12px;
            }
        }
        
        /* フッター */
        footer {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-align: center;
            padding: 30px 20px;
            margin-top: 30px;
        }
        
        footer a { color: white; text-decoration: none; }
        footer a:hover { text-decoration: underline; }
        
        .footer-note {
            font-size: 12px;
            margin-top: 10px;
            opacity: 0.9;
        }
        
        .footer-links {
            margin-top: 15px;
        }
        
        .footer-links a {
            margin: 0 15px;
            font-size: 14px;
        }
    /* 6ボタン1行対応 */
    .header-nav {
        display: flex;
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: center;
    }
    .header-nav a {
        font-size: 13px;
        padding: 5px 8px;
        white-space: nowrap;
    }
    @media (max-width: 768px) {
        .header-nav {
            flex-wrap: wrap;
            justify-content: flex-start;
        }
        .header-nav a {
            font-size: 12px;
            padding: 4px 6px;
        }
    }
