* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', sans-serif;
}

body {
    background-color: #0b0f17;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 言語セレクター */
.lang-selector-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.lang-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Main Header */
.main-header {
    position: relative;
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background-image: url('../images/back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg, 
        rgba(17, 24, 39, 0.15) 0%,    
        rgba(17, 24, 39, 0.45) 100%  
    );
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

#main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), 0 2px 4px rgba(0, 0, 0, 0.9); 
    margin-bottom: 12px;
    text-transform: uppercase;
}

#main-subtitle {
    font-size: 1.1rem;
    color: #ffffff; 
    font-weight: 500; 
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
}

.main-content-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px;
}

.search-filter-section {
    background: #111827;
    padding: 30px;
    border-radius: 14px;
    border: 1px solid #1f2937;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.search-bar-container {
    display: flex;
    gap: 14px;
    margin-bottom: 25px;
}

#search-input {
    flex: 1;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 14px 18px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

#search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

#near-me-btn {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
    font-weight: 700;
    padding: 0 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#near-me-btn:hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.area-filter-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1f2937;
}

.area-filter-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.area-btn {
    background: #1f2937;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.area-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #9ca3af;
}

.area-btn.active {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.method-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.direct-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.direct-checkbox-label:hover .checkbox-text {
    color: #fff;
}

.checkbox-text {
    font-size: 0.95rem;
    color: #9ca3af;
    font-weight: 500;
    transition: color 0.2s ease;
}

input[type="checkbox"].price-checkbox, input[type="checkbox"].dish-checkbox {
    width: 19px;
    height: 19px;
    accent-color: #10b981;
    cursor: pointer;
}

.results-counter {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 20px;
    padding-left: 4px;
}

#options-count {
    color: #10b981;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 4px;
}

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

.shop-card {
    background: #111827;
    border: 1px solid #1f2937;
    padding: 24px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.shop-card:hover {
    transform: translateY(-4px);
    border-color: #374151;
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.5);
}

.area-badge {
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 0.02em;
}

.action-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #1f2937;
    width: 100%;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 9px 14px;
    border-radius: 6px;
    flex: 1 1 100%;
    text-align: center;
    transition: background 0.2s ease;
}

.map-btn:hover { 
    background: #059669; 
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1f2937 !important;
    border: 1px solid #374151;
    color: #d1d5db !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    min-width: 95px;
    text-align: center;
    transition: all 0.2s ease;
}

.mini-btn:hover {
    background: #374151 !important;
    color: #ffffff !important;
    border-color: #4b5563;
}

.main-footer {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 0.9rem;
    border-top: 1px solid #1f2937;
    background: #0f172a;
}

.footer-share-section {
    max-width: 500px;
    margin: 0 auto 10px auto;
    padding-bottom: 20px;
    border-bottom: 1px dashed #1f2937;
}

.footer-share-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: #ffffff;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.wa-btn { background-color: #25D366; }
.wc-btn { background-color: #07C160; }
.ln-btn { background-color: #06C755; }
.copy-btn { 
    background-color: #374151; 
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

/* 📱 画面幅が768px以下のモバイル環境にだけ適用 */
@media screen and (max-width: 768px) {
    .main-header {
        /* 👇 パディングを限界まで小さくし、高さを4割ほど短く詰め込みます */
        padding: 15px 15px 20px 15px !important; 
        
        /* 🛑 もし元コードに固定値がある場合を想定し、高さを強制コントロールします */
        height: auto !important;
        min-height: 180px !important; 
    }

    .header-content {
        /* 文字の上下余白も少し詰めてコンパクトに */
        margin-top: 5px !important; 
    }

    .header-content h1 {
        font-size: 1.4rem !important;
        margin-bottom: 4px !important;
        text-shadow: 0 3px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    }

    .header-content p {
        font-size: 0.75rem !important;
        margin-bottom: 0 !important;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95) !important;
    }
    /* ⚡ ここでヘッダーとコンテンツの間の巨大なギャップを解消 */
    .main-content-wrapper { 
        padding: 8px 12px 20px 12px !important; /* 上のpaddingを40pxから8pxに激減 */
    }

    /* ⚡ 検索エリア自体の外周マージンと内側パディングを縮小 */
    .search-filter-section { 
        padding: 16px !important; 
        margin-bottom: 12px !important; /* 下のカードエリアとの隙間も微調整 */
    }

    /* ⚡ インプットフィールド周りの隙間を詰める */
    .search-bar-container { 
        flex-direction: column; 
        gap: 8px !important; 
        margin-bottom: 12px !important; 
    }

    #search-input { 
        padding: 10px 12px !important; 
        font-size: 0.9rem; 
    }

    #near-me-btn { 
        width: 100%; 
        padding: 10px 0 !important; 
        font-size: 0.9rem; 
    }

    .area-filter-container { 
        gap: 6px !important; 
        margin-bottom: 12px !important; 
        padding-bottom: 10px !important; 
    }

    .area-btn { 
        padding: 5px 10px !important; 
        font-size: 0.78rem; 
    }

    .method-filter-container { 
        flex-direction: column; 
        gap: 8px !important; 
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .shop-card { padding: 18px; }
    .action-buttons-container { gap: 6px; }
    .mini-btn { min-width: 80px; font-size: 0.75rem; padding: 8px 6px; }

    .footer-share-container { gap: 6px; }
    .share-btn {
        padding: 8px 10px;
        font-size: 0.76rem;
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }
}