/* --- 共通レイアウト・スマホ対応 CSS --- */
* {
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 20px 10px;
    color: #333;
}
.container {
    max-width: 860px;
    margin: 0 auto;
}
.lang-switch {
    text-align: right;
    margin-bottom: 10px;
}
.lang-switch a {
    text-decoration: none;
    font-size: 13px;
    color: #0066cc;
    font-weight: bold;
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #cce0ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.lang-switch a:hover {
    background-color: #f0f4f8;
}
.header {
    text-align: center;
    margin-bottom: 20px;
}
.header h1 {
    color: #d32f2f;
    margin-bottom: 6px;
    font-size: 26px;
    letter-spacing: -0.5px;
}
.header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* 検索条件コントロールバー */
.search-control-bar {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.search-summary {
    font-size: 13px;
    color: #444;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}
.toggle-panel-btn {
    background-color: #f0f4f8;
    color: #0066cc;
    border: 1px solid #cce0ff;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.toggle-panel-btn:hover {
    background-color: #e1ecf7;
}

/* 検索パネル */
.search-panel {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
}
.form-row {
    margin-bottom: 15px;
}
.form-row.grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 6px;
}
.form-group select,
.form-group input {
    width: 100%;
    padding: 11px 12px;
    font-size: 14px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background-color: #fff;
}

/* カウンターボックス */
.guests-box {
    background: #fafbfc;
    border: 1px solid #edf0f2;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.guests-title {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}
.counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.counter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e1e4e8;
    padding: 8px 12px;
    border-radius: 6px;
}
.counter-label {
    font-size: 13px;
    color: #444;
    font-weight: 500;
}
.counter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.counter-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #0066cc;
    background: #fff;
    color: #0066cc;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.counter-value {
    font-size: 14px;
    font-weight: bold;
    width: 18px;
    text-align: center;
}

/* オプション・ソート・ペット */
.options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.sort-box {
    background: #fafbfc;
    border: 1px solid #edf0f2;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sort-box label {
    font-weight: bold;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    margin: 0;
}
.sort-box select {
    flex-grow: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
}
.pet-box {
    background: #fff0f0;
    border: 2px solid #ffcdd2;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.pet-box input {
    width: 22px;
    height: 22px;
    accent-color: #d32f2f;
    margin-right: 12px;
    flex-shrink: 0;
}
.pet-title {
    font-size: 14px;
    font-weight: bold;
    color: #c62828;
}
.pet-desc {
    font-size: 11px;
    color: #d32f2f;
    margin-top: 2px;
}
.gps-btn {
    background-color: #f0f4f8;
    color: #0066cc;
    border: 1px solid #cce0ff;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    width: 100%;
    font-weight: bold;
}
.search-btn {
    width: 100%;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 17px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
}

/* ローディング・結果一覧 */
#loading {
    display: none;
    text-align: center;
    padding: 25px;
    font-size: 15px;
    color: #666;
}
.spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(211, 47, 47, 0.2);
    border-radius: 50%;
    border-top-color: #d32f2f;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.hotel-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #eaeaea;
}
.hotel-card img {
    width: 240px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}
.hotel-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hotel-name a {
    font-size: 19px;
    font-weight: bold;
    color: #1a0dab;
    text-decoration: none;
}
.hotel-score {
    font-size: 13px;
    color: #e65100;
    font-weight: bold;
    margin: 5px 0;
}
.hotel-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
}
.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}
.hotel-price {
    font-size: 21px;
    font-weight: bold;
    color: #d32f2f;
}
.hotel-price span {
    font-size: 11px;
    color: #777;
    font-weight: normal;
}
.btn-reserve {
    background-color: #ff9800;
    color: white;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
}

/* スマホ用の画面幅（768px以下）での自動レイアウト切り替え */
@media (max-width: 768px) {
    body { padding: 10px 5px; }
    .header h1 { font-size: 21px; }
    .form-row.grid-3 { grid-template-columns: 1fr; gap: 12px; }
    .counter-grid { grid-template-columns: 1fr; gap: 8px; }
    .options-row { grid-template-columns: 1fr; gap: 12px; }
    .hotel-card { flex-direction: column; }
    .hotel-card img { width: 100%; height: 160px; }
    .card-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
    .btn-reserve { width: 100%; text-align: center; padding: 10px; }
}