/* ========================================
   Feelmap - Light Theme / Orange & Black
   Black:  #141413
   Orange: #ff7b2f (accent)
   White:  #faf9f7
   ======================================== */

:root {
    --brand: #ff7b2f;
    --brand-dark: #e8651a;
    --brand-light: #fff3eb;
    --brand-soft: rgba(255, 123, 47, 0.08);
    --bg-primary: #faf9f7;
    --bg-secondary: #f3f2ef;
    --bg-card: #ffffff;
    --bg-hover: #eeecea;
    --text-primary: #141413;
    --text-secondary: #4a4a48;
    --text-muted: #8a8a86;
    --accent: #ff7b2f;
    --accent-soft: rgba(255, 123, 47, 0.08);
    --border: #e2e0dc;
    --border-light: #eeecea;
    --shadow: 0 2px 12px rgba(20, 20, 19, 0.06);
    --shadow-lg: 0 8px 32px rgba(20, 20, 19, 0.10);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sidebar-width: 340px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font);
    font-weight: 400;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header: orange top line + warm white bg ===== */
#app-header {
    background: var(--bg-card);
    border-top: 3px solid var(--brand);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    z-index: 1000;
    flex-shrink: 0;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.site-logo {
    height: 26px;
    width: auto;
    display: block;
    position: relative;
    top: 2px;
}

.site-logo path {
    fill: #141413;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.control-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: var(--font);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    white-space: nowrap;
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.control-icon {
    font-size: 0.9rem;
}

/* ===== Mobile Mood Summary ===== */
.mobile-mood-summary {
    display: none;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* ===== Left Sidebar Panel ===== */
.sidebar-panel {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-panel:empty {
    display: none;
}

/* ===== Map ===== */
#map {
    flex: 1;
    z-index: 1;
    min-width: 0;
    background: #f0eeea;
}

/* ===== Mobile Footer ===== */
.mobile-footer {
    display: none;
}

/* Scrollable area inside sidebar */
.mood-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 14px;
    min-height: 0;
}

.mood-scroll-area::-webkit-scrollbar { width: 4px; }
.mood-scroll-area::-webkit-scrollbar-track { background: transparent; }
.mood-scroll-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }

.mood-lead {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.mood-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.mood-emoji-big {
    font-size: 3rem;
    line-height: 1;
}

.mood-text-block {
    display: flex;
    flex-direction: column;
}

.mood-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.mood-pct {
    font-size: 0.95rem;
    color: var(--brand);
    font-weight: 600;
    margin-top: 2px;
}

.mood-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 8px 0 14px;
    font-weight: 400;
}

.mood-updated {
    display: inline;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-left: 2px;
}

/* Emotion filter pills */
.mood-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.filter-emoji { font-size: 0.95rem; }
.filter-label { font-size: 0.8rem; }

/* News picks */
.mood-news-picks {
    margin-bottom: 10px;
}

.mood-news-picks-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.mood-news-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.mood-news-pick:last-child { border-bottom: none; }
.mood-news-pick:hover { opacity: 0.7; }

.pick-thumb {
    width: 54px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.pick-emoji {
    font-size: 1rem;
    flex-shrink: 0;
}

.pick-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pick-text {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.35;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pick-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
}

.pick-emotion {
    color: var(--text-muted);
    font-weight: 500;
}

.pick-country {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sidebar footer buttons */
.mood-footer {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}

.mood-footer-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.mood-footer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mood-footer-btn.accent-btn {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.mood-footer-btn.accent-btn:hover {
    background: var(--brand-dark);
}

/* ===== Bottom Bar ===== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    z-index: 800;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 4px 12px;
    pointer-events: none;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.7;
}

.copyright { pointer-events: none; }

/* ===== Emoji Markers ===== */
.emoji-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.emoji-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 123, 47, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulse 3s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(20, 20, 19, 0.08);
}

.emoji-marker:hover {
    transform: scale(1.3);
    box-shadow: 0 4px 20px rgba(255, 123, 47, 0.3);
    z-index: 100 !important;
}

.emoji-marker.dimmed {
    opacity: 0.15;
    animation: none;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(20, 20, 19, 0.08); }
    50% { box-shadow: 0 2px 16px rgba(255, 123, 47, 0.18); }
}

/* User emotion dots */
.user-emotion-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(20, 20, 19, 0.06);
    opacity: 0.7;
}

/* Feel panel */
#feel-panel {
    position: fixed;
    bottom: 72px;
    left: 16px;
    z-index: 901;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
}

#feel-panel.hidden { display: none; }

.feel-title {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
    font-weight: 500;
}

.feel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.feel-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    font-size: 1.6rem;
    text-align: center;
    transition: all 0.2s;
}

.feel-btn:hover {
    background: var(--brand-light);
    transform: scale(1.1);
}

/* Toast */
#toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: #141413;
    color: #faf9f7;
    border: none;
    border-radius: 16px;
    padding: 10px 20px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.3s;
}

#toast.hidden { opacity: 0; pointer-events: none; }

/* ===== Modal (Country) - orange top accent ===== */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 19, 0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#modal-overlay.hidden { display: none; }

#modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    max-width: 660px;
    width: 92%;
    max-height: 82vh;
    overflow: hidden;
    padding: 22px;
    padding-top: 25px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

#modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand);
    z-index: 1;
}

.modal-scroll-inner {
    overflow-y: auto;
    max-height: calc(82vh - 50px);
    padding-right: 12px;
    margin-right: -12px;
}

.modal-scroll-inner::-webkit-scrollbar { width: 5px; }
.modal-scroll-inner::-webkit-scrollbar-track { background: transparent; }
.modal-scroll-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }
.modal-scroll-inner::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

#modal-close {
    position: absolute;
    top: 6px;
    right: 4px;
    background: var(--bg-card);
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

#modal-close:hover { color: var(--text-primary); }

#modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-right: 28px;
}

.modal-emoji { font-size: 2.8rem; }

.modal-header-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.modal-header-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Emotion stats in modal */
.modal-emotion-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.emotion-stat-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.emotion-stat-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.emotion-stat-chip.active {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

.stat-pct {
    font-weight: 600;
    color: var(--text-primary);
}

/* People emotions in modal */
.modal-people {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
}

.modal-people.hidden { display: none; }

.people-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.people-emotions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.people-emotion-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.92rem;
}

.people-emotion-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.people-emotion-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.people-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
    font-weight: 400;
    font-style: italic;
}

/* Article cards */
.article-card {
    display: flex;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border-radius: 0;
}

.article-card:hover { background: var(--bg-primary); }
.article-card:last-child { border-bottom: none; }

.article-thumb {
    width: 96px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.article-info { flex: 1; min-width: 0; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.article-emotion-tag {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.emotion-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.article-country-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 1px 6px;
    border-radius: 6px;
}

.article-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.article-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 400;
}

.no-articles {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Post mood button inside modal */
.modal-feel-area {
    margin-top: 16px;
    padding-top: 14px;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

#newslist-feel-area {
    margin-bottom: 40px;
}

.modal-feel-area .mood-footer-btn {
    display: inline-flex;
    width: auto;
    padding: 10px 28px;
    font-size: 0.88rem;
}

/* Popup wrapper: positioned relative so popup floats above button */
.modal-feel-wrapper {
    position: relative;
    display: inline-block;
}

.modal-feel-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    min-width: 240px;
}

.modal-feel-popup.hidden { display: none; }

.modal-feel-popup-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
}

.modal-feel-popup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.modal-feel-popup-grid .feel-btn {
    padding: 10px;
    font-size: 1.5rem;
}

/* ===== News List Modal - orange top accent ===== */
#newslist-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 19, 0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#newslist-overlay.hidden { display: none; }

#newslist-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    max-width: 720px;
    width: 94%;
    max-height: 85vh;
    overflow: hidden;
    padding: 22px;
    padding-top: 25px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

#newslist-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand);
    z-index: 1;
}

.newslist-scroll-inner {
    overflow-y: auto;
    max-height: calc(85vh - 50px);
    padding-right: 12px;
    margin-right: -12px;
}

.newslist-scroll-inner::-webkit-scrollbar { width: 5px; }
.newslist-scroll-inner::-webkit-scrollbar-track { background: transparent; }
.newslist-scroll-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }
.newslist-scroll-inner::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.newslist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.newslist-header h2 { font-size: 1.2rem; font-weight: 700; }

.newslist-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.newslist-header button:hover { color: var(--text-primary); }

/* Newslist emotion chips */
.newslist-emotion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.newslist-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.newslist-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.newslist-chip.active {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
}

.newslist-chip .chip-pct {
    font-weight: 600;
    font-size: 0.75rem;
}

/* ===== About Modal - orange top accent ===== */
#about-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 19, 0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#about-overlay.hidden { display: none; }

#about-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    max-width: 540px;
    width: 92%;
    max-height: 80vh;
    overflow: hidden;
    padding: 22px;
    padding-top: 25px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

#about-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand);
    z-index: 1;
}

.about-scroll-inner {
    overflow-y: auto;
    max-height: calc(80vh - 50px);
    padding-right: 12px;
    margin-right: -12px;
}

.about-scroll-inner::-webkit-scrollbar { width: 5px; }
.about-scroll-inner::-webkit-scrollbar-track { background: transparent; }
.about-scroll-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }
.about-scroll-inner::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

#about-close {
    position: absolute;
    top: 6px;
    right: 4px;
    background: var(--bg-card);
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

#about-close:hover { color: var(--text-primary); }

#about-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

#about-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

#about-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 10px;
    font-weight: 400;
}

#about-content .about-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

#about-content .about-step-num {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.78rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

#about-content .about-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Leaflet Overrides ===== */
.leaflet-control-zoom {
    border: 1px solid var(--border) !important;
    box-shadow: 0 1px 4px rgba(20, 20, 19, 0.06) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover { background: var(--bg-hover) !important; }

.leaflet-control-attribution {
    background: rgba(250, 249, 247, 0.85) !important;
    color: var(--text-muted) !important;
    font-size: 0.6rem !important;
}

.leaflet-control-attribution a { color: var(--text-secondary) !important; }

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    #app-header { padding: 8px 12px; }
    .site-logo { height: 20px; }

    .emoji-marker {
        font-size: 1.4rem;
        width: 36px;
        height: 36px;
    }

    .sidebar-panel {
        display: none !important;
    }

    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    #map { flex: 1; }

    /* Mobile mood summary - horizontal centered */
    .mobile-mood-summary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px 12px;
        padding-top: max(8px, env(safe-area-inset-top));
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .mobile-mood-lead {
        font-size: 0.82rem;
        color: var(--text-muted);
        font-weight: 400;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-mood-emoji {
        font-size: 1.6rem;
        flex-shrink: 0;
    }

    .mobile-mood-label {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-mood-pct {
        font-size: 0.88rem;
        color: var(--brand);
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-mood-detail {
        font-size: 0.75rem;
        color: var(--text-muted);
        font-weight: 400;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .mobile-mood-updated {
        font-size: 0.68rem;
        color: var(--text-muted);
        opacity: 0.6;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Mobile footer with safe area + extra padding for browser UI */
    .mobile-footer {
        display: flex;
        flex-direction: column;
        gap: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        flex-shrink: 0;
        z-index: 800;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 44px);
    }

    .mobile-footer-filters {
        display: flex;
        gap: 5px;
        padding: 6px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid var(--border-light);
        scrollbar-width: none;
    }

    .mobile-footer-filters::-webkit-scrollbar { display: none; }

    .mobile-footer-buttons {
        display: flex;
        gap: 8px;
        padding: 8px 10px;
    }

    .mobile-footer .filter-btn {
        padding: 5px 10px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .mobile-footer .filter-emoji { font-size: 0.95rem; }
    .mobile-footer .filter-label { font-size: 0.82rem; }

    .mobile-footer .mood-footer-btn {
        flex: 1;
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    /* Modals: slide up from bottom on mobile */
    #modal, #newslist-modal, #about-modal {
        max-width: 100%;
        width: 100%;
        max-height: 80vh;
        border-radius: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
    }

    #modal-overlay, #newslist-overlay, #about-overlay {
        align-items: flex-end;
    }

    .article-thumb { width: 80px; height: 58px; }

    .article-info h3 { font-size: 1rem; }
    .article-info p { font-size: 0.88rem; }
    .article-date { font-size: 0.78rem; }
    .emotion-name { font-size: 0.85rem; }
    .article-country-tag { font-size: 0.78rem; }

    #feel-panel {
        left: 50%;
        transform: translateX(-50%);
        bottom: 120px;
        right: auto;
    }

    .bottom-bar {
        display: none;
    }

    .mobile-footer-copyright {
        text-align: center;
        font-size: 0.55rem;
        color: var(--text-muted);
        opacity: 0.6;
        padding: 2px 10px 0;
    }
}

@media (max-width: 480px) {
    .header-right { gap: 5px; }
    .control-btn { padding: 5px 10px; font-size: 0.82rem; }

    .mobile-mood-emoji { font-size: 1.5rem; }
    .mobile-mood-label { font-size: 0.92rem; }
    .mobile-mood-pct { font-size: 0.82rem; }

    .mobile-footer .filter-btn { padding: 5px 8px; font-size: 0.78rem; }
    .mobile-footer .filter-emoji { font-size: 0.88rem; }
    .mobile-footer .filter-label { font-size: 0.78rem; }
    .mobile-footer .mood-footer-btn { font-size: 0.82rem; padding: 9px 10px; }
}

/* Scrollbar hidden on modal outer containers (scroll is inside inner wrappers) */
