/* ============================================================
   CSS VARIABLES & THEMES
   ============================================================ */
:root {
    --accent: #c85479;
    --accent-2: #9b4068;
    --accent-light: #fce4ed;
    --accent-gold: #c9a96e;
    --sidebar-width: 220px;
    --font-display: 'Shippori Mincho B1', serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --bg: #faf9f6;
    --bg-2: #f4f0ea;
    --surface: #ffffff;
    --surface-2: #fdf9f4;
    --border: #e8ddd2;
    --text: #2a2118;
    --text-2: #5a4e44;
    --text-muted: #9a8e84;
    --shadow: rgba(42,33,24,0.08);
    --shadow-lg: rgba(42,33,24,0.15);
}
[data-theme="ocean"]  { --accent:#1a6b9e; --accent-2:#0d4f7a; --accent-light:#e0f0fc; --accent-gold:#4a9eb8; }
[data-theme="forest"] { --accent:#3a7d52; --accent-2:#2a5e3c; --accent-light:#dff0e8; --accent-gold:#8ab870; }
[data-theme="sunset"] { --accent:#d4641a; --accent-2:#a84e12; --accent-light:#fdecd6; --accent-gold:#e8b84b; }

[data-mode="dark"] {
    --bg:#1a1612; --bg-2:#211d18; --surface:#2a2420; --surface-2:#201c18;
    --border:#3a342e; --text:#f0ebe4; --text-2:#c8bfb4; --text-muted:#7a6e64;
    --shadow:rgba(0,0,0,0.3); --shadow-lg:rgba(0,0,0,0.5);
    --accent-light: rgba(200,84,121,0.18);
}
[data-mode="dark"][data-theme="ocean"]  { --accent-light: rgba(26,107,158,0.18); }
[data-mode="dark"][data-theme="forest"] { --accent-light: rgba(58,125,82,0.18); }
[data-mode="dark"][data-theme="sunset"] { --accent-light: rgba(212,100,26,0.18); }

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s;
}
.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo { font-size: 26px; }
.sidebar-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--accent); letter-spacing: 0.05em; }
.sidebar-subtitle { font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.sidebar-attribution { margin-top: auto; padding: 16px 20px; font-size: 10px; color: var(--text-muted); line-height: 1.5; border-top: 1px solid var(--border); }
.sidebar-attribution a { color: var(--text-muted); text-decoration: underline; }

/* Top-right user panel */
.topbar-user { position: fixed; top: 16px; right: 20px; z-index: 500; display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; cursor: pointer; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 180px; overflow: hidden; }
.user-menu-email { font-size: 12px; color: var(--text-muted); padding: 10px 14px 6px; border-bottom: 1px solid var(--border); word-break: break-all; }
.user-menu-item { display: block; width: 100%; padding: 10px 14px; background: none; border: none; text-align: left; font-size: 13px; cursor: pointer; color: var(--text); }
.user-menu-item:hover { background: var(--accent-light); color: var(--accent); }

/* Auth modal */
#auth-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; }
#auth-modal-overlay.open { display: flex; }
#auth-modal { background: var(--surface); border-radius: 16px; padding: 0; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 12px; background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
#auth-modal .modal-header { padding: 20px 24px 16px; border-bottom: none; }
#auth-modal-body { padding: 0 24px 24px; }

/* Share modal */
#share-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
#share-modal-overlay.open { display: flex; }
#share-modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.share-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 28px 20px; border-bottom: 1px solid var(--border); }
.share-modal-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.share-modal-subtitle { font-size: 13px; color: var(--text-muted); }
.share-modal-body { padding: 24px 28px 28px; }
.share-field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.share-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-section-check { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; cursor: pointer; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; transition: border-color 0.15s, background 0.15s; user-select: none; }
.share-section-check input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.share-section-check:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.share-access-row { display: flex; gap: 12px; align-items: stretch; }
.share-access-option { flex: 1; cursor: pointer; display: flex; }
.share-access-option input { display: none; }
.share-access-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; transition: border-color 0.15s, background 0.15s; flex: 1; }
.share-access-option:has(input:checked) .share-access-card { border-color: var(--accent); background: var(--accent-light); }
.share-access-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.share-access-name { font-size: 14px; font-weight: 600; color: var(--text); }
.share-access-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.share-error { color: #e53e3e; font-size: 13px; margin-top: 12px; display: none; }
.share-link-result { margin-top: 20px; background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; display: none; }
.share-link-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
.share-link-box { font-size: 12px; font-family: monospace; word-break: break-all; color: var(--text); cursor: pointer; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.share-link-box:hover { border-color: var(--accent); }
.share-copied { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 8px; display: none; }
.share-existing-section { margin-top: 24px; }
.share-existing-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.share-existing-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.share-existing-item:last-child { border-bottom: none; }
.share-existing-sections { font-size: 13px; font-weight: 600; color: var(--text); }
.share-existing-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Share banner */
#share-banner { position: fixed; top: 0; left: var(--sidebar-width); right: 0; z-index: 1500; }
.share-banner-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; background: var(--accent); color: white; font-size: 13px; gap: 16px; }
.share-banner-inner strong { font-weight: 700; }
.share-banner-mode { background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.share-banner-error { background: #e53e3e; justify-content: center; }
body:has(#share-banner[style*="block"]) .section { padding-top: 60px; }

/* Read-only share view — hide all action buttons and inputs */
.share-view-only .section-header .btn,
.share-view-only .section-header button,
.share-view-only .btn-danger,
.share-view-only .add-event-btn,
.share-view-only .ev-actions,
.share-view-only .predep-add-row,
.share-view-only .predep-item-del,
.share-view-only .pack-item-del,
.share-view-only .pack-add-row,
.share-view-only .day-actions,
.share-view-only [onclick*="edit"],
.share-view-only [onclick*="Edit"],
.share-view-only [onclick*="delete"],
.share-view-only [onclick*="Delete"],
.share-view-only [onclick*="addDay"],
.share-view-only [onclick*="addEvent"],
.share-view-only [onclick*="addExpense"],
.share-view-only [onclick*="addPack"],
.share-view-only [onclick*="addAccommodation"],
.share-view-only [onclick*="addRestaurant"],
.share-view-only [onclick*="addPredep"],
.share-view-only [onclick*="addCustom"],
.share-view-only [onclick*="addChecklist"],
.share-view-only [onclick*="addDestination"] { display: none !important; }
.nav-list { list-style: none; padding: 12px 0; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.nav-item:hover { background: var(--accent-light); color: var(--accent); }
.nav-sub-item { font-size: 13px; }
.nav-item.active { background: var(--accent-light); color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { font-size: 13px; white-space: nowrap; }
.nav-divider { padding: 8px 20px 4px; font-size: 10px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.theme-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.theme-swatches { display: flex; gap: 8px; margin-bottom: 12px; }
.theme-swatch {
    width: 22px; height: 22px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent; transition: all 0.2s;
}
.theme-swatch:hover, .theme-swatch.active { border-color: var(--text); transform: scale(1.1); }
.theme-swatch[data-theme="sakura"]  { background: #c85479; }
.theme-swatch[data-theme="ocean"]   { background: #1a6b9e; }
.theme-swatch[data-theme="forest"]  { background: #3a7d52; }
.theme-swatch[data-theme="sunset"]  { background: #d4641a; }
.mode-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-2); user-select: none; }
.toggle-track { width: 36px; height: 20px; background: var(--border); border-radius: 10px; position: relative; transition: background 0.3s; flex-shrink: 0; }
.toggle-thumb { width: 16px; height: 16px; background: white; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
[data-mode="dark"] .toggle-track { background: var(--accent); }
[data-mode="dark"] .toggle-thumb { transform: translateX(16px); }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-content { margin-left: var(--sidebar-width); flex: 1; min-height: 100vh; }
.section { display: none; min-height: 100vh; padding: 40px 220px 40px 48px; animation: fadeIn 0.3s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.section-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.section-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.section-title { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--text); line-height: 1.1; }
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px;
    font-family: var(--font-body); font-size: 13px; font-weight: 500;
    cursor: pointer; border: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 12px var(--shadow); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-2); border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 4px 8px; }
.btn-ghost:hover { color: var(--accent); background: var(--accent-light); }
.btn-danger { background: transparent; color: #e53e3e; padding: 4px 8px; border: none; cursor: pointer; font-size: 13px; border-radius: 6px; }
.btn-danger:hover { background: #fff5f5; }
.btn.btn-danger { background: #e05555; color: white; border: none; padding: 10px 20px; font-size: 14px; }
.btn.btn-danger:hover { background: #cc4040; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: all 0.2s; }
.card:hover { box-shadow: 0 4px 16px var(--shadow); }

/* ============================================================
   FORMS
   ============================================================ */
input, select, textarea {
    font-family: var(--font-body); font-size: 14px;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 12px; transition: all 0.2s; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
textarea { resize: vertical; min-height: 80px; }
label { font-size: 12px; font-weight: 500; color: var(--text-2); display: block; margin-bottom: 4px; }
.form-group { margin-bottom: 16px; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.icon-pick-btn { background: var(--bg-2); border: 2px solid transparent; border-radius: 8px; padding: 6px 8px; font-size: 20px; cursor: pointer; transition: border-color 0.15s; }
.icon-pick-btn:hover { border-color: var(--accent); }
.icon-pick-btn.selected { border-color: var(--accent); background: var(--accent-light); }
.form-row { display: grid; gap: 12px; }
.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   PHOTON AUTOCOMPLETE
   ============================================================ */
.photon-wrap { position: relative; }
.photon-dropdown { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1000;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 8px 24px var(--shadow-lg); overflow: hidden; }
.photon-dropdown.open { display: block; }
.photon-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.1s; }
.photon-item:last-of-type { border-bottom: none; }
.photon-item:hover, .photon-item.active { background: var(--accent-light); }
[data-mode="dark"] .photon-item:hover, [data-mode="dark"] .photon-item.active { background: var(--bg-2); }
.photon-name { font-size: 13px; font-weight: 500; color: var(--text); }
.photon-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.photon-attr { padding: 6px 14px; font-size: 10px; color: var(--text-muted); background: var(--bg-2);
    border-top: 1px solid var(--border); }
.photon-attr a { color: var(--text-muted); text-decoration: underline; }

/* ============================================================
   HERO SECTION
   ============================================================ */
#section-hero {
    background: linear-gradient(135deg, var(--bg) 0%, var(--accent-light) 100%);
    position: relative; overflow: hidden; padding: 60px 48px;
}
.hero-bg-deco {
    position: absolute; top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 65%);
    opacity: 0.6; pointer-events: none;
}
.hero-petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petal {
    position: absolute; width: 8px; height: 8px;
    background: var(--accent); opacity: 0.12;
    border-radius: 50% 50% 50% 0; animation: petalFall linear infinite;
}
@keyframes petalFall {
    0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0.2; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0;   }
}
.hero-content { position: relative; z-index: 1; max-width: 750px; }
.hero-label { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.hero-title { font-family: var(--font-display); font-size: 54px; font-weight: 800; color: var(--text); line-height: 1.05; margin-bottom: 8px; cursor: pointer; transition: color 0.2s; }
.hero-title:hover { color: var(--accent); }
.hero-title-input {
    font-family: var(--font-display); font-size: 54px; font-weight: 800;
    color: var(--accent); background: transparent; border: none;
    border-bottom: 3px solid var(--accent); border-radius: 0;
    padding: 0; width: 100%; outline: none; box-shadow: none; margin-bottom: 8px;
}
.hero-dates { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-date-group { display: flex; flex-direction: column; gap: 4px; }
.hero-date-label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.hero-date-input { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 15px; font-weight: 500; width: auto; }
.hero-date-sep { color: var(--text-muted); font-size: 20px; padding-bottom: 8px; }

.countdown-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px 28px;
    display: inline-flex; gap: 20px; margin-bottom: 36px;
    box-shadow: 0 4px 20px var(--shadow);
}
.countdown-unit { text-align: center; }
.countdown-number { font-family: var(--font-display); font-size: 38px; font-weight: 800; color: var(--accent); line-height: 1; }
.countdown-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }
.countdown-sep { font-size: 30px; color: var(--border); align-self: center; margin-top: -4px; }

.hero-checklist { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; max-width: 480px; box-shadow: 0 2px 12px var(--shadow); }
.hero-checklist-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 12px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--text-2); }
.checklist-item.done { color: var(--text-muted); text-decoration: line-through; }
.checklist-cb {
    width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s; background: var(--surface); font-size: 11px;
}
.checklist-cb.checked { background: var(--accent); border-color: var(--accent); color: white; }

/* ============================================================
   ITINERARY
   ============================================================ */
.day-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 20px; overflow: hidden; }
.day-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.day-header-left { display: flex; align-items: center; gap: 12px; }
.day-number { width: 34px; height: 34px; background: var(--accent); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.day-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text); }
.day-date { font-size: 12px; color: var(--text-muted); }
.day-actions { display: flex; gap: 4px; align-items: center; }
.day-body { padding: 16px 20px; }
.map-toggle-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.map-toggle-btn { background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; transition: all 0.2s; color: var(--text-2); font-family: var(--font-body); }
.map-toggle-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.day-map { height: 450px; border-radius: 10px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--border); display: none; }
.event-list { display: flex; flex-direction: column; gap: 0; }
.event-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; cursor: grab; transition: all 0.2s; position: relative;
}
.event-item:hover { border-color: var(--accent); box-shadow: 0 2px 8px var(--shadow); }
.event-item.dragging { opacity: 0.4; cursor: grabbing; }
.event-item.drag-over { border-color: var(--accent); background: var(--accent-light); }
.ev-cat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cat-food        { background: #f6a623; }
.cat-transport   { background: #4a90d9; }
.cat-sightseeing { background: #5cb85c; }
.cat-accommodation { background: #9b59b6; }
.cat-shopping    { background: #e74c3c; }
.cat-other       { background: #95a5a6; }
.ev-time { display: flex; flex-direction: column; gap: 1px; width: 58px; flex-shrink: 0; }
.ev-time-start { font-size: 12px; font-weight: 600; color: var(--text-2); }
.ev-time-dur { font-size: 11px; color: var(--text-muted); }
.ev-computed-time-display { font-size: 14px; font-weight: 600; color: var(--accent); padding: 4px 0; }
.ev-fixed-pin { font-size: 10px; vertical-align: middle; }
.timing-toggle { display: flex; gap: 8px; margin-top: 4px; }
.timing-opt { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13px;
    padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
    transition: all 0.15s; user-select: none; }
.timing-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-light); color: var(--accent); font-weight: 500; }
.timing-opt input { display: none; }
.ev-content { flex: 1; min-width: 0; }
.ev-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-location { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.2s; }
.event-item:hover .ev-actions { opacity: 1; }
.add-event-btn {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    background: transparent; border: 1px dashed var(--border); border-radius: 10px;
    color: var(--text-muted); cursor: pointer; font-size: 13px; width: 100%;
    transition: all 0.2s; margin-top: 8px; font-family: var(--font-body);
}
.add-event-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* transport segment — vertical timeline connector between events */
.transport-seg {
    display: flex; align-items: stretch;
    padding: 0 14px 0 14px;
}
.transport-line-track {
    width: 10px; flex-shrink: 0; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.transport-line-track::before {
    content: ''; position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 2px; background: var(--border);
    transform: translateX(-50%);
}
.transport-inner {
    flex: 1; padding: 7px 0 7px 10px;
    display: flex; flex-direction: column; gap: 5px;
}
.transport-mode-row { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.transport-mode-btn {
    background: none; border: none; cursor: pointer;
    font-size: 14px; padding: 3px 5px; border-radius: 6px;
    opacity: 0.3; transition: opacity 0.15s, background 0.15s;
    line-height: 1; font-family: var(--font-body);
}
.transport-mode-btn:hover { opacity: 0.7; }
.transport-mode-btn.active { opacity: 1; background: var(--accent-light); }
.transport-seg-right { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.transport-duration-val { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.transport-calculating { font-size: 12px; color: var(--text-muted); white-space: nowrap; animation: pulse 1s ease-in-out infinite; }
.transport-no-coords { font-size: 11px; color: var(--text-muted); white-space: nowrap; cursor: help; }
.transport-recalc {
    background: none; border: none; cursor: pointer; font-size: 13px;
    color: var(--text-muted); padding: 2px 5px; border-radius: 6px;
    transition: all 0.15s; line-height: 1; font-family: var(--font-body);
}
.transport-recalc:hover { color: var(--accent); background: var(--accent-light); }
.transport-lines-section { display: flex; flex-direction: column; gap: 4px; }
.transport-lookup-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; color: var(--accent);
    background: var(--accent-light); border-radius: 6px;
    padding: 4px 8px; text-decoration: none; cursor: pointer;
    width: fit-content; transition: opacity 0.15s;
}
.transport-lookup-btn:hover { opacity: 0.8; }
.transport-lookup-disabled { opacity: 0.45; cursor: default; }
.transport-lines-entry { display: flex; align-items: center; gap: 6px; }
.transport-lines-label { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.transport-lines-entry.has-lines .transport-lines-label { color: var(--accent); }
.transport-lines-input {
    font-size: 12px; color: var(--text-2); background: none;
    border: none; border-bottom: 1px dashed var(--border);
    padding: 2px 0; flex: 1; min-width: 0;
    font-family: var(--font-body); outline: none; transition: border-color 0.2s;
}
.transport-lines-input::placeholder { color: var(--text-muted); font-style: italic; }
.transport-lines-input:focus { border-bottom-color: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.transit-route-options { display: flex; flex-direction: column; gap: 4px; }
.transit-route-opt {
    display: flex; align-items: baseline; gap: 8px;
    background: none; border: 1px solid var(--border); border-radius: 6px;
    padding: 5px 8px; cursor: pointer; text-align: left; width: 100%;
    transition: border-color 0.15s, background 0.15s;
}
.transit-route-opt:hover { border-color: var(--accent); background: var(--accent-light); }
.transit-route-opt.active { border-color: var(--accent); background: var(--accent-light); }
.transit-route-time { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.transit-route-lines { font-size: 11px; color: var(--text-2); }

.share-view-only .transport-mode-btn,
.share-view-only .transport-recalc,
.share-view-only .transport-lookup-btn { display: none; }
.share-view-only .transport-lines-input { pointer-events: none; border-bottom-color: transparent; }

/* ============================================================
   DESTINATIONS
   ============================================================ */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.dest-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: all 0.3s; cursor: default; }
.dest-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--shadow-lg); }
.dest-img { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 52px; background-size: cover; background-position: center; }
.dest-body { padding: 16px; }
.dest-region { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.dest-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.dest-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.dest-highlights { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.highlight-tag { font-size: 11px; padding: 2px 8px; background: var(--bg-2); border-radius: 12px; color: var(--text-2); }
.dest-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.dest-map-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 500; text-decoration: none; padding: 4px 8px; border-radius: 6px; transition: background 0.2s; }
.dest-map-link:hover { background: var(--accent-light); }
.dest-actions { display: flex; gap: 4px; }

/* ============================================================
   BUDGET
   ============================================================ */
.budget-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.budget-goal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.budget-goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.budget-bar { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.budget-bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s ease; }
.bar-ok   { background: var(--accent); }
.bar-warn { background: #f6a623; }
.bar-over { background: #e53e3e; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.chart-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.chart-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chart-bar-label { font-size: 13px; color: var(--text-2); width: 120px; flex-shrink: 0; }
.chart-bar-track { flex: 1; height: 18px; background: var(--bg-2); border-radius: 9px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 9px; transition: width 0.5s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 10px; color: white; font-weight: 700; min-width: 24px; }
.chart-bar-amount { font-size: 13px; font-weight: 600; width: 90px; text-align: right; flex-shrink: 0; }
.expense-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.expense-table-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg-2); }
table.expense-table { width: 100%; border-collapse: collapse; }
table.expense-table th { padding: 10px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 1px solid var(--border); text-align: left; background: var(--bg-2); }
table.expense-table td { padding: 11px 16px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--border); }
table.expense-table tr:last-child td { border-bottom: none; }
table.expense-table tr:hover td { background: var(--bg); }

/* ============================================================
   PACKING
   ============================================================ */
.packing-hero { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; border-radius: 16px; padding: 24px; margin-bottom: 24px; display: flex; align-items: center; gap: 24px; }
.packing-circle { width: 80px; height: 80px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.packing-pct { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.packing-info { flex: 1; }
.packing-info h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.packing-info p { font-size: 13px; opacity: 0.85; margin-bottom: 8px; }
.pack-bar { height: 6px; background: rgba(255,255,255,0.3); border-radius: 3px; overflow: hidden; }
.pack-bar-fill { height: 100%; background: white; border-radius: 3px; transition: width 0.4s ease; }
.pack-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pack-cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pack-cat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.pack-cat-name { font-size: 14px; font-weight: 600; }
.pack-cat-count { font-size: 12px; color: var(--text-muted); }
.pack-items { padding: 6px 0; }
.pack-item { display: flex; align-items: center; gap: 10px; padding: 6px 16px; transition: background 0.15s; }
.pack-item:hover { background: var(--bg); }
.pack-item input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.pack-item-text { flex: 1; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pack-item.checked .pack-item-text { text-decoration: line-through; color: var(--text-muted); }
.pack-item-del { opacity: 0; background: none; border: none; color: #e53e3e; cursor: pointer; font-size: 14px; transition: opacity 0.2s; padding: 0 4px; }
.pack-item:hover .pack-item-del { opacity: 1; }
.pack-add-row { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.pack-add-row input { flex: 1; font-size: 13px; padding: 6px 10px; }

/* ============================================================
   TRANSPORT
   ============================================================ */
.transport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 36px; }
.transport-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: all 0.2s; }
.transport-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px var(--shadow); }
.transport-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.transport-icon { font-size: 28px; width: 50px; height: 50px; background: var(--accent-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.transport-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.transport-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.transport-tips { list-style: none; font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 12px; }
.transport-tips li::before { content: "→ "; color: var(--accent); font-weight: 600; }
.transport-cost { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-2); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.shinkansen-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.shinkansen-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.shinkansen-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.shinkansen-route { display: flex; align-items: center; overflow-x: auto; padding-bottom: 8px; }
.shin-stop { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.shin-dot { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent); z-index: 1; }
.shin-name { font-size: 11px; font-weight: 600; margin-top: 8px; text-align: center; white-space: nowrap; }
.shin-line { height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); flex: 1; min-width: 36px; margin-top: -5px; position: relative; top: -11px; }

/* ============================================================
   ACCOMMODATION
   ============================================================ */
.acc-list { display: flex; flex-direction: column; gap: 12px; }
.acc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; display: flex; gap: 16px; align-items: flex-start; transition: all 0.2s; }
.acc-photo { width: 90px; height: 90px; border-radius: 10px; flex-shrink: 0; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.acc-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px var(--shadow); }
.acc-type-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; flex-shrink: 0; }
.type-hotel   { background: #e8f0fe; color: #1a56db; }
.type-ryokan  { background: #fde8e8; color: #c0392b; }
.type-hostel  { background: #e8f5e9; color: #2e7d32; }
.type-capsule { background: #f3e5f5; color: #6a1b9a; }
.type-airbnb  { background: #fff3e0; color: #e65100; }
.acc-details { flex: 1; min-width: 0; }
.acc-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.acc-city { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.acc-dates { font-size: 13px; color: var(--text-muted); }
.acc-address { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.acc-confirmation { font-size: 11px; color: var(--text-muted); background: var(--bg-2); padding: 3px 8px; border-radius: 6px; font-family: monospace; margin-top: 6px; display: inline-block; }
.acc-links { display: flex; gap: 6px; margin-top: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.link-btn-maps    { background: #e8f0fe; color: #1a56db; }
.link-btn-maps:hover { background: #1a56db; color: white; }
.link-btn-booking { background: #fff3e0; color: #e65100; }
.link-btn-booking:hover { background: #e65100; color: white; }
.acc-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ============================================================
   PHRASES
   ============================================================ */
.phrase-controls { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.phrase-search { flex: 1; min-width: 200px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: all 0.2s; }
.chip:hover, .chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.phrase-cat-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-light); }
.phrase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 32px; }
.phrase-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; transition: all 0.2s; }
.phrase-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px var(--shadow); }
.phrase-en { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.phrase-jp { font-size: 20px; color: var(--accent); margin-bottom: 3px; }
.phrase-romaji { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 3px; }
.phrase-tip { font-size: 11px; color: var(--text-muted); background: var(--bg-2); padding: 4px 8px; border-radius: 6px; margin-top: 6px; }

/* ============================================================
   FOOD
   ============================================================ */
.food-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.food-tab { padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; color: var(--text-muted); transition: all 0.2s; }
.food-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.food-tab:hover { color: var(--accent); }
.dishes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dish-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; }
.dish-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--shadow); }
.dish-banner { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 42px; background: linear-gradient(135deg, var(--accent-light), var(--bg-2)); }
.dish-body { padding: 14px; }
.dish-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.dish-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.dish-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.dish-price { color: var(--accent-gold); font-weight: 600; }
.dish-where { color: var(--text-muted); }
.diet-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.diet-tag { font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: 600; }
.tag-veg  { background: #d4edda; color: #155724; }
.tag-vegan { background: #d1ecf1; color: #0c5460; }
.tag-halal { background: #fff3cd; color: #856404; }
.tag-gf   { background: #f8d7da; color: #721c24; }
.rest-list { display: flex; flex-direction: column; gap: 10px; }
.rest-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.rest-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px var(--shadow); }
.rest-icon { font-size: 24px; width: 42px; height: 42px; background: var(--bg-2); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rest-info { flex: 1; min-width: 0; }
.rest-name { font-size: 14px; font-weight: 600; }
.rest-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rest-notes { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.rest-links { display: flex; gap: 6px; flex-shrink: 0; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; font-size: 13px; text-decoration: none; transition: all 0.2s; border: 1px solid var(--border); background: var(--surface); font-weight: 700; }
.icon-link:hover { transform: translateY(-2px); box-shadow: 0 4px 8px var(--shadow); }
.icon-link-google { color: #4285F4; }
.icon-link-google:hover { background: #4285F4; color: white; border-color: #4285F4; }
.icon-link-tabelog { color: #c0392b; font-family: serif; }
.icon-link-tabelog:hover { background: #c0392b; color: white; border-color: #c0392b; }
.rest-actions { display: flex; gap: 4px; }

/* ============================================================
   CURRENCY
   ============================================================ */
.currency-wrap { max-width: 580px; }
.currency-card-main { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; margin-bottom: 20px; box-shadow: 0 4px 20px var(--shadow); }
.currency-input-row { display: flex; gap: 10px; margin-bottom: 20px; }
.currency-amount { font-size: 26px; font-weight: 700; padding: 12px 14px; border-radius: 10px; font-family: var(--font-display); flex: 1; }
.currency-from { font-size: 15px; font-weight: 600; padding: 12px 14px; border-radius: 10px; width: auto; min-width: 90px; }
.currency-results { display: flex; flex-direction: column; gap: 8px; }
.cr-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border); }
.cr-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.cr-flag { font-size: 20px; }
.cr-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent); }
.quick-ref { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.quick-ref-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qr-item { background: var(--bg-2); border-radius: 10px; padding: 12px; text-align: center; }
.qr-jpy { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent); }
.qr-usd { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   WEATHER
   ============================================================ */
.weather-controls { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.weather-city-sel { width: auto; }
.month-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; }
.month-chip { padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: all 0.2s; }
.month-chip:hover, .month-chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.weather-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; max-width: 680px; }
.weather-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.weather-city { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.weather-month { font-size: 14px; color: var(--accent); font-weight: 500; margin-top: 2px; }
.weather-temps .high { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: #e74c3c; }
.weather-temps .low  { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #3498db; margin-left: 6px; }
.weather-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.weather-detail { text-align: center; background: var(--bg-2); border-radius: 10px; padding: 14px 10px; }
.wd-icon { font-size: 24px; margin-bottom: 6px; }
.wd-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.wd-value { font-size: 13px; font-weight: 600; }
.weather-wear { font-size: 13px; color: var(--text-2); background: var(--bg-2); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.weather-events-wrap { }
.weather-events-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.w-event-tag { display: inline-block; font-size: 12px; padding: 4px 10px; background: var(--accent-light); color: var(--accent); border-radius: 12px; margin: 2px 4px 2px 0; font-weight: 500; }

/* ============================================================
   PRE-DEPARTURE CHECKLIST
   ============================================================ */
.custom-checklist-block { margin-bottom: 40px; }
.custom-checklist-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.custom-checklist-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }
.predep-overview { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 24px; display: flex; align-items: center; gap: 20px; }
.predep-ring { width: 70px; height: 70px; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.predep-ring svg { transform: rotate(-90deg); }
.ring-bg   { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 188; transition: stroke-dashoffset 0.5s ease; }
.ring-pct { position: absolute; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent); }
.predep-text h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.predep-text p { font-size: 13px; color: var(--text-muted); }
.predep-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.predep-cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.predep-cat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.predep-cat-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.predep-items { padding: 6px 0; }
.predep-item { display: flex; align-items: center; gap: 10px; padding: 7px 16px; transition: background 0.15s; }
.predep-item:hover { background: var(--bg); }
.predep-item input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.predep-item-text { flex: 1; font-size: 13px; color: var(--text-2); cursor: pointer; }
.predep-item.checked .predep-item-text { text-decoration: line-through; color: var(--text-muted); }
.predep-item-del { opacity: 0; background: none; border: none; color: #e53e3e; cursor: pointer; font-size: 14px; transition: opacity 0.2s; padding: 0 4px; }
.predep-item:hover .predep-item-del { opacity: 1; }
.predep-add-row { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); }
.predep-add-row input { flex: 1; font-size: 13px; padding: 6px 10px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--surface); border-radius: 16px; padding: 28px; width: 90%; max-width: 520px; max-height: 88vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.2s; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; color: var(--text-muted); font-size: 18px; transition: all 0.2s; background: none; border: none; }
.modal-close:hover { background: var(--bg-2); color: var(--text); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-desc { font-size: 14px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    :root { --sidebar-width: 64px; }
    .nav-label, .sidebar-title, .sidebar-subtitle, .nav-divider { display: none; }
    .sidebar-header { justify-content: center; padding: 20px; }
    .sidebar-footer { padding: 12px 8px; }
    .theme-swatches { flex-direction: column; }
    .mode-toggle span { display: none; }
    .section { padding: 24px 20px; }
    .section-title { font-size: 26px; }
    .hero-title, .hero-title-input { font-size: 36px; }
    .budget-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    :root { --sidebar-width: 0px; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .section { padding: 20px 16px; }
    .hero-title, .hero-title-input { font-size: 28px; }
    .countdown-card { flex-wrap: wrap; }
    .budget-stats { grid-template-columns: 1fr; }
    .weather-details { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-accent { color: var(--accent); }
.font-display { font-family: var(--font-display); }
.w-full { width: 100%; }
