:root {
    /* 更明亮的水彩/色鉛筆色調 */
    --paper-cream: #FAF7F0;
    --paper-gray: #F0EDE4;
    --soft-brown: #9B8A7B;
    --warm-gray: #7B6D62;
    --soft-pink: #F5D8D4;
    --soft-blue: #E0EDF2;
    --soft-green: #E4F0DC;
    --accent-brown: #8A7B6A;
    --text-dark: #6A5A4A;
    /* 手繪風格增強色 */
    --hand-drawn-border: #A89685;
    --highlight-pink: #FFE5E0;
    --highlight-yellow: #FFF5D0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    background: #E8E3D8;
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
    padding-bottom: 20px;
    position: relative;
    /* 增強手寫感 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 手繪日本風景背景 */
.background-art {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: url('./bkg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.75;
}

/* 飄落的櫻花瓣裝飾 */
.sakura-petal {
    position: fixed;
    width: 8px;
    height: 8px;
    background: rgba(232, 212, 208, 0.6);
    border-radius: 50% 0 50% 0;
    z-index: 1;
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.2;
    }
}

/* 頂部狀態列 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(250, 247, 240, 0.65);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(155, 138, 123, 0.3);
    box-shadow: 0 2px 4px rgba(139, 122, 107, 0.1);
}

/* 小木牌樣式的地點標籤 - 增強 */
.location-pill {
    background: var(--paper-cream);
    color: var(--accent-brown);
    padding: 7px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transform: rotate(-1.5deg);
    border: 3px solid var(--soft-brown);
    box-shadow: 
        3px 3px 0 rgba(139, 122, 107, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.location-pill:hover {
    transform: rotate(-1.5deg) scale(1.05);
    box-shadow: 
        4px 4px 0 rgba(139, 122, 107, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.location-pill:active {
    transform: rotate(-1.5deg) scale(0.98);
}

.location-pill::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--soft-brown);
    border-radius: 50%;
}

/* 地點選擇下拉選單 */
.location-selector {
    position: relative;
    display: inline-block;
}

.location-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--paper-cream);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(155, 138, 123, 0.03) 1px, rgba(155, 138, 123, 0.03) 2px);
    border: 3px solid var(--hand-drawn-border);
    border-radius: 12px 20px 15px 18px / 18px 15px 20px 12px;
    box-shadow: 
        0 6px 12px rgba(139, 122, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    min-width: 180px;
    z-index: 200;
    display: none;
    backdrop-filter: blur(8px);
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--soft-brown) transparent;
}

.location-dropdown::-webkit-scrollbar {
    width: 6px;
}

.location-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.location-dropdown::-webkit-scrollbar-thumb {
    background: var(--soft-brown);
    border-radius: 3px;
    opacity: 0.5;
}

.location-dropdown.show {
    display: block;
}

.location-option {
    padding: 10px 20px;
    color: var(--accent-brown);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(139, 122, 107, 0.2);
}

.location-option:last-child {
    border-bottom: none;
}

.location-option:hover {
    background: rgba(255, 255, 255, 0.6);
}

.location-option.active {
    background: var(--soft-blue);
    color: var(--accent-brown);
}

/* 和紙貼紙樣式的日期標籤 - 增強可見度 */
.update-pill {
    font-size: 0.9rem;
    color: #8B6B5A;
    background: var(--highlight-pink);
    padding: 6px 14px;
    border-radius: 18px;
    border: 2.5px dashed var(--soft-brown);
    font-weight: 700;
    transform: rotate(2deg);
    box-shadow: 
        3px 3px 6px rgba(139, 122, 107, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.8),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.8);
    position: relative;
    backdrop-filter: blur(4px);
}

/* 日期標籤的手繪裝飾點 */
.update-pill::before {
    content: '✿';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
    color: var(--soft-pink);
    transform: rotate(15deg);
    opacity: 0.8;
}

.container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* === 核心：今日焦點卡片 - 仿舊紙張效果 === */
.hero-card {
    background: rgba(250, 247, 240, 0.85);
    background-image: 
        /* 紙張紋理 */
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(155, 138, 123, 0.04) 2px, rgba(155, 138, 123, 0.04) 4px),
        /* 輕微的紙張質感 */
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    padding: 30px 25px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    /* 手繪不規則邊框效果 - 增強 */
    border: 4px solid var(--hand-drawn-border);
    border-radius: 12px 30px 15px 25px / 25px 15px 30px 12px;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 6px 12px rgba(139, 122, 107, 0.25),
        0 2px 4px rgba(139, 122, 107, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.8),
        inset 0 -2px 0 rgba(139, 122, 107, 0.15);
    /* 手繪筆觸效果 */
    filter: drop-shadow(2px 2px 3px rgba(139, 122, 107, 0.2));
}

/* 紙膠帶裝飾效果 - 增強 */
.hero-card::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 25px;
    width: 70px;
    height: 24px;
    background: var(--highlight-yellow);
    border: 2px dashed var(--soft-brown);
    transform: rotate(6deg);
    border-radius: 3px;
    opacity: 0.9;
    box-shadow: 
        2px 2px 4px rgba(139, 122, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 1;
}

/* 手繪裝飾線條 */
.hero-card::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15%;
    width: 60%;
    height: 2px;
    background: var(--soft-brown);
    border-radius: 1px;
    opacity: 0.3;
    transform: rotate(-0.5deg);
}

/* 手繪圓形標籤樣式的時段標籤 - 增強 */
.hero-period {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: var(--soft-blue);
    color: var(--accent-brown);
    padding: 7px 20px;
    border-radius: 22px;
    font-weight: 700;
    border: 3px solid var(--soft-brown);
    box-shadow: 
        3px 3px 6px rgba(139, 122, 107, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    text-shadow: 0.5px 0.5px 1px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.hero-temp-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.hero-icon {
    font-size: 5rem;
    filter: 
        drop-shadow(2px 2px 2px rgba(139, 122, 107, 0.2))
        blur(0.5px);
    animation: float 3s ease-in-out infinite;
    opacity: 0.9;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

.hero-temp {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--accent-brown);
    line-height: 1;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8), 0 0 2px rgba(139, 122, 107, 0.3);
    letter-spacing: -2px;
}

.hero-desc {
    font-size: 1.5rem;
    color: var(--warm-gray);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
}

/* === 快速建議區 === */
.advice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px dashed var(--soft-brown);
    border-top-color: rgba(155, 138, 123, 0.5);
    position: relative;
}

/* 手繪裝飾點 */
.advice-grid::before {
    content: '• • •';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--soft-brown);
    font-size: 0.8rem;
    background: rgba(250, 247, 240, 0.9);
    padding: 0 8px;
    letter-spacing: 4px;
}

.advice-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.75);
    padding: 12px;
    border-radius: 14px;
    border: 2.5px dashed var(--soft-brown);
    backdrop-filter: blur(6px);
    box-shadow: 
        inset 0 2px 3px rgba(255, 255, 255, 0.6),
        0 2px 4px rgba(139, 122, 107, 0.15);
}

.advice-icon {
    font-size: 2rem;
    margin-bottom: 5px;
    filter: drop-shadow(1px 1px 1px rgba(139, 122, 107, 0.2));
}

.advice-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-brown);
    margin: 5px 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* === 稍後預報：橫向滑動區 === */
.section-title {
    font-size: 1.3rem;
    color: var(--accent-brown);
    margin-bottom: 15px;
    margin-left: 10px;
    font-weight: 700;
    text-shadow: 
        1px 1px 2px rgba(255, 255, 255, 0.8),
        0 0 4px rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding-left: 20px;
}

/* 手繪裝飾線 */
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 2px;
    background: var(--soft-brown);
    border-radius: 1px;
    opacity: 0.6;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.mini-card {
    min-width: 140px;
    background: rgba(250, 247, 240, 0.85);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(155, 138, 123, 0.03) 1px, rgba(155, 138, 123, 0.03) 2px);
    padding: 20px 15px;
    text-align: center;
    border: 3px solid var(--hand-drawn-border);
    border-radius: 8px 20px 10px 18px / 18px 10px 20px 8px;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 4px 8px rgba(139, 122, 107, 0.2),
        0 2px 4px rgba(139, 122, 107, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(139, 122, 107, 0.1);
    position: relative;
    filter: drop-shadow(1px 1px 2px rgba(139, 122, 107, 0.15));
}

/* 小紙膠帶裝飾 - 增強 */
.mini-card::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 45px;
    height: 14px;
    background: var(--highlight-yellow);
    border: 2px dashed var(--soft-brown);
    transform: rotate(4deg);
    border-radius: 2px;
    opacity: 0.85;
    box-shadow: 1px 1px 3px rgba(139, 122, 107, 0.25);
}

.mini-time {
    background: var(--soft-green);
    color: var(--accent-brown);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
    border: 1px solid var(--soft-brown);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.mini-icon {
    font-size: 2.5rem;
    margin: 5px 0;
    filter: drop-shadow(1px 1px 1px rgba(139, 122, 107, 0.2));
}

.mini-temp {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-brown);
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* Loading 畫面 - 簡潔手繪風格 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        #E8E3D8 0%, 
        #E0D8C8 50%, 
        #F0E8D8 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* 簡潔的手繪卡片容器 - 與主卡片風格一致 */
.loading-content {
    position: relative;
    z-index: 1;
    background: rgba(250, 247, 240, 0.85);
    background-image: 
        /* 紙張紋理 */
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(155, 138, 123, 0.04) 2px, rgba(155, 138, 123, 0.04) 4px),
        /* 輕微的紙張質感 */
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    padding: 35px 40px;
    border-radius: 12px 25px 15px 22px / 22px 15px 25px 12px;
    border: 3px solid var(--hand-drawn-border);
    backdrop-filter: blur(8px);
    box-shadow: 
        0 4px 12px rgba(139, 122, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    text-align: center;
    min-width: 260px;
    filter: drop-shadow(2px 2px 3px rgba(139, 122, 107, 0.15));
}

.loading-screen p {
    color: var(--accent-brown);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.1rem;
    text-shadow: 
        1px 1px 2px rgba(255, 255, 255, 0.8);
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* 雲朵圖標容器 */
.loading-icon-wrapper {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}
