:root {
    --primary-blue: #007aff;
    --bg-light: #f5f7fa;
    --text-main: #1d1d1f;
    --max-width: 650px;
}

body { 
    font-family: "Meiryo", "メイリオ", sans-serif; 
    background: var(--bg-light); 
    margin: 0; 
    color: var(--text-main); 
    line-height: 1.6; 
}

.container { 
    max-width: var(--max-width); 
    margin: 0 auto; 
    padding: 0 15px; 
}

header { 
    background: rgba(255, 255, 255, 0.95); 
    padding: 10px 0; 
    text-align: center; 
    border-bottom: 1px solid #eee; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    backdrop-filter: blur(10px);
}

h1 { 
    margin: 0; 
    font-size: 1.2rem; 
    font-weight: 700; 
    letter-spacing: 0.05em; 
    color: var(--primary-blue);
    font-family: 'Zen Maru Gothic', sans-serif;
}

/* タブ・ボタン類 */
.region-tabs-container, .sub-tabs-container { margin: 15px 0 10px 0; }
.region-tabs, .sub-tabs {
    display: flex;
    background: #fff;
    border: 1px solid var(--primary-blue);
    border-radius: 10px;
    overflow: hidden;
}
.sub-tabs { border: 1px solid #8e8e93; }
.region-tabs button, .sub-tabs button {
    flex: 1; border: none; background: white; color: var(--primary-blue);
    padding: 10px 0; font-size: 0.85rem; font-weight: bold; cursor: pointer;
    border-right: 1px solid var(--primary-blue);
}
.sub-tabs button { color: #666; border-right: 1px solid #8e8e93; font-size: 0.8rem; }
.region-tabs button:last-child, .sub-tabs button:last-child { border-right: none; }
.region-tabs button.active { background: var(--primary-blue); color: white; }
.sub-tabs button.active { background: #8e8e93; color: white; }

/* 地図カード */
.map-card { background: white; border-radius: 24px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); margin-bottom: 20px; }
.map-box { width: 100%; aspect-ratio: 1.4 / 1; position: relative; border-radius: 16px; overflow: hidden; background: #eef2f6; }

/* 地図マーカー：機能維持・縦長・気温と天気横並び */
.city-marker { 
    position: absolute; 
    background: rgba(255,255,255,0.95); 
    border-radius: 8px; 
    padding: 5px 4px; 
    min-width: 54px; 
    text-align: center; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.12); 
    z-index: 10; 
    transform: translate(-50%, -50%); 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    gap: 1px;
    line-height: 1.1; 
    border: none;
}

.marker-name { 
    font-size: 10.5px; 
    font-weight: bold; 
    width: 100%; 
    border-bottom: 1px solid #f0f0f0; 
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.marker-mid-row { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: center; 
    gap: 3px; 
    width: 100%; 
}

.marker-weather-text { 
    font-size: 9px; 
    color: #666; 
    white-space: nowrap;
}

.marker-temp { 
    font-size: 11.5px; 
    font-weight: bold; 
    color: var(--primary-blue); 
    white-space: nowrap;
}

.city-marker img { 
    width: 20px !important; 
    height: 20px !important; 
    margin: 1px 0;
    border: none;
    outline: none;
}

.marker-range { 
    font-size: 9px; 
    font-weight: bold; 
    white-space: nowrap; 
    border-top: 1px solid #f0f0f0; 
    padding-top: 2px;
    width: 100%;
}

.range-max { color: #ff453a; }
.range-min { color: #007aff; }

/* 都市リスト・詳細表示 */
.city-item-wrapper { background: white; border-radius: 20px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); border: 1px solid rgba(0,0,0,0.03); overflow: hidden; }
.city-row-main { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }

.city-name-container { display: flex; align-items: baseline; gap: 8px; }
.city-name-jp { font-size: 0.95rem; font-weight: bold; }
.update-time-inline { font-size: 0.75rem; color: #8e8e93; font-weight: normal; white-space: nowrap; }

.detail-card { padding: 0 20px 20px 20px; border-top: 1px solid #f2f2f7; }
.section-title { font-size: 0.9rem; border-left: 4px solid var(--primary-blue); padding-left: 10px; margin: 25px 0 10px; font-weight: bold; }

/* 横スクロールコンテナ */
.forecast-scroll-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.forecast-scroll-container::-webkit-scrollbar { height: 4px; }
.forecast-scroll-container::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 10px; }
.forecast-scroll-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.forecast-grid { display: flex; gap: 12px; padding: 10px 0; flex-wrap: nowrap; }
.forecast-item { min-width: 80px; background: #f5f5f7; padding: 12px 8px; border-radius: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.weather-sub-info { text-align: left; font-size: 0.8rem; color: #444; border-left: 1px solid #d0e0f0; padding-left: 15px; display: flex; flex-direction: column; justify-content: center; min-width: 80px; }
.hidden { display: none; }
footer { text-align: center; padding: 40px 0; color: #999; font-size: 11px; }
.ru-label-sub { font-size: 0.8rem; color: #8e8e93; margin-top: 10px; }