:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-gray: #94a3b8;

    --radius: 12px;
    --radius-sm: 8px;
    --bottom-nav-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overscroll-behavior-y: none;
}

.hidden {
    display: none !important;
}

.text-gray {
    color: var(--text-gray);
}

/* ボタン */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    justify-content: center;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    padding: 12px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-small {
    padding: 8px 12px !important;
    font-size: 13px !important;
    width: 100%;
}

.btn-compact {
    padding: 4px 12px !important;
    width: auto !important;
    min-width: 0 !important;
    font-size: 13px !important;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 4px;
    border-radius: 4px;
}

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

/* 認証ページ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form .input-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    background: #fee2e2;
    border: 2px solid var(--danger);
    color: #991b1b;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ダッシュボード */
/* ===== DASHBOARD REDESIGN ===== */
.dashboard {
    min-height: 100vh;
    background: #f0f4ff;
}

.dashboard-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(67, 56, 202, 0.4);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: 12px;
}

.dashboard-header h1 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

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

.user-name {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.dashboard-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    padding: 40px 40px 72px;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-inner h2 {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.hero-inner p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #4338ca;
    border: none;
    border-radius: 50px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
}

.hero-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.hero-sort {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
}

.hero-sort option {
    color: #1e1b4b;
    background: #fff;
}

.dashboard-main {
    max-width: 1400px;
    margin: -36px auto 0;
    padding: 0 40px 60px;
    position: relative;
    z-index: 2;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 4px;
}

.page-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.dashboard-toolbar {
    display: none;
}

.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.trip-card {
    background: #fff;
    border: none;
    border-radius: 18px;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    position: relative;
}

.trip-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 16px 36px rgba(67, 56, 202, 0.14);
}

.trip-card::before {
    content: '';
    display: block;
    height: 5px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
}

.trip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 0;
    margin-bottom: 10px;
}

.trip-card-header h3 {
    font-size: 17px;
    font-weight: 800;
    flex: 1;
    color: #1e1b4b;
    letter-spacing: -0.3px;
    line-height: 1.3;
    padding-right: 8px;
}

.trip-card-header .material-icons-round {
    color: #6366f1;
    background: #eef2ff;
    border-radius: 50%;
    padding: 4px;
    font-size: 16px;
    flex-shrink: 0;
}

.trip-card-body {
    padding: 0 16px 14px;
}

.trip-destination {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.trip-destination .material-icons-round {
    font-size: 14px;
    color: #a78bfa;
}

.trip-dates {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f3ff;
    border-radius: 7px;
    padding: 5px 9px;
    color: #6366f1;
    font-weight: 600;
    font-size: 11px;
}

.trip-dates .material-icons-round {
    font-size: 13px;
    color: #8b5cf6;
}

.trip-card-footer {
    padding: 10px 16px 16px;
    border-top: 1px solid #f1f5f9;
}

.trip-share-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.trip-share-link .material-icons-round {
    font-size: 18px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
}

.empty-state .material-icons-round {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
}

/* 旅行詳細ページレイアウト */
.trip-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 32px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sidebar-header .trip-destination {
    color: var(--text-secondary);
    font-size: 14px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: var(--bg);
}

.tab-content {
    display: none;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.tab-content.active {
    display: block;
}

.main-content .page-header h1 {
    font-size: 32px;
    font-weight: 700;
}

/* 概要カード */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.summary-card .material-icons-round {
    font-size: 40px;
    color: var(--primary);
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 情報・収支セクション */
.info-section,
.balance-section {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.info-section h3,
.balance-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item p {
    font-size: 16px;
    color: var(--text);
}

/* メンバーグリッド */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.overview-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.member-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.member-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
}

.member-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.member-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.member-role.owner {
    background: #fee2e2;
    color: #991b1b;
}

.member-role.editor {
    background: #dbeafe;
    color: #1e40af;
}

.member-role.viewer {
    background: #e5e7eb;
    color: #374151;
}

/* 支出リスト */
.item-card {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.expense-item.estimate {
    border-style: dashed;
    background: #fdfbf7;
}

.expense-item.estimate .expense-amount {
    color: var(--text-secondary);
}

/* 支出タイプタブ */
.expense-type-tabs {
    display: flex;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.tab-switch {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-switch:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tab-switch.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tab-switch .material-icons-round {
    font-size: 18px;
}

/* メンバーチェックボックス */
.member-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.member-checkbox-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.member-checkbox-card.checked {
    background: #eef2ff;
    border-color: var(--primary);
}

.member-checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: white;
}

.member-checkbox-card.checked .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.checkbox-custom::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
    display: none;
}

.member-checkbox-card.checked .checkbox-custom::after {
    display: block;
}

.member-cb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ccc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.member-cb-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 収支バランスビジュアル */
.balance-visual-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.visual-transaction-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    width: 100%;
}

.v-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 70px;
    flex-shrink: 0;
}

.v-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.v-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.v-flow-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 12px;
    position: relative;
    min-width: 80px;
}

.v-amount-badge {
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

.v-arrow-line {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.v-arrow-head {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #e2e8f0;
    z-index: 1;
}

/* メンバー別支払額カード */
.member-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-payment-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.member-payment-card:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.mp-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.mp-name {
    font-weight: 600;
    color: var(--text);
}

.mp-total {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.mp-details {
    display: none;
    background: var(--bg);
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.mp-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.mp-detail-title {
    color: var(--text);
}

.mp-detail-amount {
    font-weight: 600;
    color: var(--text-secondary);
}

/* 清算済みリスト */
.settled-section {
    margin-top: 16px;
    padding: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
}

.settled-title {
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 8px;
}

.settled-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settled-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    border: 1px solid #dcfce7;
}

.settled-avatar-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ccc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* タイムライン表示 */
.timeline-container {
    position: relative;
}

.timeline-item {
    display: flex;
    position: relative;
    margin-bottom: 0;
}

.timeline-marker {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid white;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 8px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.timeline-content {
    margin-left: 40px;
    flex: 1;
    cursor: pointer;
    transition: all 0.2s;
    padding-bottom: 20px;
}

.timeline-content:hover .timeline-card {
    border-color: var(--primary);
    transform: translateX(4px);
}

.timeline-time {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 8px;
}

.timeline-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: all 0.2s;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-location {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.timeline-description {
    font-size: 14px;
    color: var(--text);
    margin-top: 8px;
}

.timeline-transport {
    position: relative;
    margin-left: 9px;
    padding-left: 31px;
    min-height: 60px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 50%, #e2e8f0 100%);
}

.transport-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.transport-badge:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.transport-icon {
    font-size: 18px;
}

.transport-label {
    font-weight: 600;
}

.transport-note {
    font-size: 12px;
    opacity: 0.9;
    margin-left: 4px;
}

.add-transport-inline-btn {
    background: none;
    border: 2px dashed var(--border);
    color: var(--text-gray);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.add-transport-inline-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.add-transport-inline-btn .material-icons-round {
    font-size: 16px;
}

.transport-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3) !important;
}

/* チェックリスト統合タブ */
.checklist-type-tabs {
    display: flex;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    gap: 4px;
}

.checklist-type-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.checklist-type-tab:hover {
    background: rgba(0, 0, 0, 0.05);
}

.checklist-type-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.checklist-type-tab .material-icons-round {
    font-size: 20px;
}

.checklist-section {
    display: none;
}

.checklist-section.active {
    display: block;
}

/* メンバーフィルターボタン */
/* =========================================
   📱 チェックリスト & フィルタータブ (スマホ対応)
   ========================================= */
.member-filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    /* 折り返しを禁止 */
    overflow-x: auto;
    /* 横スクロールを許可 */
    padding-bottom: 4px;
    /* スクロールバーのスペース */
    -webkit-overflow-scrolling: touch;
    /* iOSでの慣性スクロール */
    scrollbar-width: none;
    /* Firefoxでスクロールバー非表示 */
}

.member-filter-buttons::-webkit-scrollbar {
    display: none;
    /* Chrome/Safariでスクロールバー非表示 */
}

.member-filter-btn {
    flex: 0 0 auto;
    /* ボタンが潰れないように固定 */
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.member-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* 持ち物リスト */
.packing-list {
    display: grid;
    gap: 20px;
}

.packing-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.assigned-member {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 12px;
}

/* TODOリスト */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.todo-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    opacity: 0.6;
    background: #f8fafc;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: var(--text-gray);
}

.todo-item.overdue {
    border-color: #fca5a5;
    background: #fef2f2;
}

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

.todo-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.todo-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-left: 32px;
}

.todo-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 32px;
}

.todo-assignee {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.todo-due-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.overdue-text {
    color: var(--danger);
    font-weight: 600;
}

.clickable:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 行きたい場所のフィルタタブ */
.destination-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

#member-filter-tabs {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.filter-tab {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.proposer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-secondary);
    margin-top: 8px;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    padding: 0;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    margin: 0 auto;
}

@media (min-width: 600px) {
    .modal {
        align-items: center;
        padding: 20px;
    }

    .modal-content {
        border-radius: var(--radius);
        max-height: 90dvh;
        padding-bottom: 0;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: space-between;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.input-group input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    appearance: none;
    box-sizing: border-box;
}

.input-group input[type="color"] {
    width: 100%;
    height: 48px;
    padding: 4px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.badge {
    background: var(--danger);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* FAB */
.fab-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1500;
    transition: transform 0.2s, background-color 0.2s;
}

.fab-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.fab-btn:active {
    transform: scale(0.95);
}

.fab-btn .material-icons-round {
    font-size: 32px;
}

.fab-btn.hidden {
    display: none;
}

.fab-secondary {
    position: fixed;
    bottom: 110px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1499;
    transition: all 0.2s;
}

.fab-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* 行きたい場所 */




.sort-select {
    width: 100%;
}


.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* AIローディング用アニメーション */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* スマホ対応 */
@media (max-width: 768px) {
    .trip-page {
        flex-direction: column;
        height: 100vh;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--bottom-nav-height);
        flex-direction: row;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
        border-right: none;
        border-top: 1px solid var(--border);
        z-index: 2000;
        background: var(--surface);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .sidebar-header,
    .sidebar-footer {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        overflow: hidden;
    }

    .nav-item {
        flex-direction: column;
        justify-content: center;
        padding: 4px 0;
        margin: 0;
        gap: 2px;
        flex: 1;
        border-radius: 0;
        height: 100%;
        font-size: 10px;
        text-align: center;
        min-width: 0;
    }

    .nav-item .material-icons-round {
        font-size: 22px;
    }

    .nav-item:hover {
        background: none;
        color: var(--primary);
    }

    .nav-item.active {
        background: none;
        color: var(--primary);
    }

    .nav-item span:not(.material-icons-round) {
        white-space: nowrap;
        /* ★追加：改行を防止 */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-content {
        padding: 20px;
        padding-bottom: calc(var(--bottom-nav-height) + 40px + env(safe-area-inset-bottom));
        width: 100%;
    }

    .main-content .page-header {
        margin-bottom: 24px;
        flex-direction: row;
        align-items: center;
    }

    .main-content .page-header h1 {
        font-size: 22px;
    }

    .main-content .page-header h2 {
        font-size: 20px;
        white-space: nowrap;
    }

    .btn-primary {
        width: auto;
        padding: 8px 16px;
        font-size: 14px;
    }

    .info-grid,
    .input-row {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        padding: 0 16px;
    }

    .header-content {
        height: 54px;
    }

    .dashboard-header h1 {
        font-size: 17px;
    }

    .user-name {
        max-width: 120px;
        font-size: 11px;
    }

    .dashboard-hero {
        padding: 24px 16px 60px;
    }

    .hero-inner h2 {
        font-size: 26px;
    }

    .hero-inner p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .hero-create-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 15px;
    }

    .hero-sort {
        width: 100%;
        padding: 10px 16px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-main {
        margin-top: -28px;
        padding: 0 12px 40px;
    }

    .trips-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page-header h2 {
        font-size: 14px;
    }

    .fab-btn {
        bottom: calc(var(--bottom-nav-height) + 20px + env(safe-area-inset-bottom));
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .fab-secondary {
        bottom: calc(var(--bottom-nav-height) + 90px + env(safe-area-inset-bottom));
        right: 26px;
    }

    .summary-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 24px;
        overflow-x: visible;
    }

    .summary-card {
        padding: 16px;
        min-width: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .summary-card .material-icons-round {
        font-size: 28px;
    }

    .summary-value {
        font-size: 20px;
    }

    .summary-label {
        font-size: 11px;
    }

    .overview-members-grid {
        grid-template-columns: 1fr 1fr;
    }

    .v-person {
        width: 60px;
    }

    .v-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .v-name {
        font-size: 10px;
    }

    .v-amount-badge {
        font-size: 12px;
        padding: 3px 10px;
    }

    .v-flow-area {
        margin: 0 8px;
        min-width: 60px;
    }

    .timeline-marker {
        width: 16px;
        height: 16px;
        left: -2px;
    }

    .timeline-content {
        margin-left: 30px;
    }

    .timeline-transport {
        margin-left: 6px;
        padding-left: 24px;
    }
}

/* 宿泊先タイムライン表示 */
.accommodation-timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.accommodation-event {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.accommodation-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.accommodation-marker.checkin {
    background: #10b981;
}

.accommodation-marker.checkout {
    background: #ef4444;
}

.accommodation-event-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.accommodation-event-label .material-icons-round {
    font-size: 18px;
}

.accommodation-event-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.accommodation-card-timeline {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-left: 32px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.accommodation-card-timeline:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

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

.accommodation-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.accommodation-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 6px 0;
}

.accommodation-cost {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cost-label {
    font-size: 12px;
    color: var(--text-gray);
}

.cost-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.cost-value.primary {
    color: var(--primary);
}

.accommodation-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.accommodation-link:hover {
    text-decoration: underline;
}

.accommodation-notes {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
}

.accommodation-stay-line {
    position: relative;
    margin-left: 9px;
    padding-left: 23px;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.stay-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #10b981 0%, #3b82f6 50%, #ef4444 100%);
}

.stay-label {
    background: #f0f9ff;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .accommodation-card-timeline {
        margin-left: 24px;
        padding: 16px;
    }

    .accommodation-cost {
        flex-direction: column;
        gap: 12px;
    }

    .accommodation-event {
        font-size: 13px;
    }

    .accommodation-marker {
        width: 16px;
        height: 16px;
    }
}

/* 旅行カード削除ボタン */
/* 旅行カード削除ボタン（左側） */
.trip-card {
    position: relative;
}

.trip-delete-btn-left {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.trip-card:hover .trip-delete-btn-left {
    opacity: 1;
}

@media (max-width: 768px) {
    .trip-delete-btn-left {
        opacity: 1;
    }
}

.trip-delete-btn-left:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.1);
}

.trip-delete-btn-left .material-icons-round {
    font-size: 15px;
}

/* 行きたい場所リスト */
.destinations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    overflow-x: visible;
    /* 横スクロール無効化 */
    padding-bottom: 20px;
}

/* 個別のカード設定 */
.destination-card {
    flex: none;
    /* Flex設定解除 */
    min-width: 0;
    /* 幅制限解除 */
    scroll-snap-align: none;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    height: 100%;
    /* 高さを揃える */
    display: flex;
    flex-direction: column;
}

.destination-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.category-icon {
    margin-right: 8px;
    font-size: 18px;
}


/* モーダル内の警告メッセージ */
.modal-body strong {
    font-weight: 600;
}

/* 空状態のスタイル改善 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
}

.empty-state .material-icons-round {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px !important;
    color: var(--text-secondary) !important;
}

/* スケジュール日付ヘッダー */
.schedule-day-header {
    transition: all 0.3s;
}

.schedule-day-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.schedule-day-header .material-icons-round {
    transition: transform 0.3s;
}

/* 移動カード */
.transport-card {
    transition: all 0.2s;
}

.transport-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* タイムラインマーカーアニメーション */
.timeline-marker {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 現在時刻のマーカー（赤色） */
.timeline-marker[style*="ef4444"] {
    animation: pulse-red 1.5s infinite;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* =========================================
   ✨ しおりカード削除ボタン
   ========================================= */
.schedule-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    z-index: 20;
}

.timeline-card:hover .schedule-delete-btn,
.transport-card:hover .schedule-delete-btn {
    opacity: 1;
}

.schedule-delete-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: scale(1.1);
}

.schedule-delete-btn .material-icons-round {
    font-size: 16px;
}

/* =========================================
   🌏 現地時間・日本時間表示（しおりヘッダー）
   ========================================= */
.time-zone-display {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    margin-bottom: 16px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.time-zone-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-zone-label {
    font-size: 12px;
    opacity: 0.9;
}

.time-zone-value {
    font-size: 16px;
    font-weight: 700;
}

/* =========================================
   📅 旅行まであと○日カード
   ========================================= */
.countdown-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    text-align: center;
}

.countdown-card .material-icons-round {
    color: white;
}

.countdown-card .summary-value {
    color: white;
    font-size: 32px;
}

.countdown-card .summary-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 旅行中の表示 */
.countdown-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* =========================================
   ✈️ 海外旅行チェックボックス
   ========================================= */
.overseas-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f0f4ff;
    border: 2px solid #6366f1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.overseas-checkbox:hover {
    background: #e0e7ff;
}

.overseas-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.overseas-checkbox span {
    font-weight: 600;
    color: var(--primary);
}

/* 海外旅行時間入力フィールド */
.overseas-time-fields {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
}

.overseas-time-fields .input-group label {
    font-size: 13px;
    color: var(--text);
}

/* =========================================
   📍 スマホ対応（レスポンシブ）
   ========================================= */
@media (max-width: 768px) {
    .time-zone-display {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .time-zone-item {
        justify-content: center;
    }

    .countdown-card .summary-value {
        font-size: 24px;
    }
}

/* スケジュール削除ボタン */
.schedule-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 20;
}

.schedule-delete-btn .material-icons-round {
    font-size: 18px;
}

.timeline-item:hover .schedule-delete-btn {
    opacity: 1;
}

.schedule-delete-btn:hover {
    background: #dc2626;
}

/* スケジュールタイプタブ */
.schedule-type-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* 日程ヘッダーアイコン回転 */
.schedule-day-icon {
    transition: transform 0.2s;
}

/* style.css に追加 */

.schedule-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 20;
}

.timeline-item:hover .schedule-delete-btn {
    opacity: 1;
}

.schedule-delete-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.schedule-delete-btn .material-icons-round {
    font-size: 16px;
}

.add-transport-inline-btn {
    padding: 8px 16px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-transport-inline-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.add-transport-inline-btn .material-icons-round {
    font-size: 16px;
}

.schedule-type-tab.active {
    background: white !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ★★★ しおり時刻表示のレスポンシブ対応 ★★★ */
@media (max-width: 768px) {
    #schedule-current-time-display>div {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    #schedule-current-time-display [style*="font-size: 40px"] {
        font-size: 32px !important;
    }

    #schedule-domestic-time-display [style*="font-size: 48px"] {
        font-size: 36px !important;
    }
}

/* style.css の末尾に追加 */

@media (max-width: 640px) {
    .transport-card {
        padding: 16px !important;
    }

    .destinations-list {
        grid-template-columns: 1fr;
        /* スマホでは完全な1列 */
    }

    .transport-card>div:first-child span {
        font-size: 24px !important;
    }

    .transport-card>div:last-child {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .transport-card>div:last-child>div:nth-child(2) {
        display: none !important;
    }
}

/* 終了済み（グレー化＋フェード） */
.schedule-past .timeline-content,
.schedule-past .transport-card {
    filter: grayscale(1);
    opacity: 0.55;
    transition: all 0.4s ease;
}

/* 現在時刻マーカー */
.current-time-marker {
    position: relative;
    margin: 12px 0 24px 0;
    padding-left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-time-dot {
    position: absolute;
    left: 0;
    width: 14px;
    height: 14px;
    background: var(--danger);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 1.5s infinite;
}

.current-time-label {
    background: #fee2e2;
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.current-time-clock {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

/* フライトリストのグリッド表示 */
.flight-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* フライト情報カード（概要タブ内） */
#flight-info-display h3 {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* チェックリストのタブ切り替えボタン */
.checklist-type-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

/* スマホ表示時のフライトリスト微調整 */
@media (max-width: 640px) {
    .flight-list-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ✈️ フライトタイムライン表示 (追加スタイル)
   ========================================= */
.flight-timeline-group {
    margin-bottom: 32px;
}

.flight-date-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.flight-date-dot {
    width: 16px;
    height: 16px;
    background: var(--primary);
    /* または任意の色 */
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.flight-date-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.flight-cards-container {
    padding-left: 20px;
    /* ドットの下に線引くなら調整、今回はインデントのみ */
    border-left: 2px solid var(--border);
    margin-left: 7px;
    /* ドットの中心に合わせる */
    padding-top: 8px;
}

/* フライトカードの微調整（タイムライン内） */
.flight-cards-container .trip-card {
    margin-bottom: 20px;
    margin-left: 16px;
    /* 線の右側にスペース */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* スマホ表示時の調整 */
@media (max-width: 768px) {
    .dashboard-toolbar {
        flex-direction: column-reverse;
        /* 作成ボタンを上に、ソートを下に */
        align-items: stretch;
        /* 横幅いっぱいに */
        gap: 12px;
        margin-bottom: 20px;
    }

    .sort-select {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        background-color: var(--surface);
    }

    /* 「新しい旅行を作成」ボタンを大きく目立たせる */
    .dashboard-toolbar .btn-primary {
        width: 100% !important;
        padding: 14px !important;
        font-size: 16px !important;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header h2 {
        font-size: 24px;
        margin-bottom: 4px;
    }
}

/* =========================================
   👥 メンバーカード (クリック可能化)
   ========================================= */
.overview-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    border: 1px solid transparent;
    /* 枠線用スペース */
}

.overview-member-card.clickable {
    cursor: pointer;
}

.overview-member-card.clickable:active {
    background-color: #e0e7ff;
    /* タップ時のフィードバック */
    border-color: var(--primary);
}

/* =========================================
   ✈️ フライトカード (レスポンシブ対応版)
   ========================================= */
/* カード全体のレイアウト */
.f-card-container {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    background: var(--surface);
}

/* ヘッダー（航空会社・便名） */
.f-card-header {
    color: white;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.f-header-label {
    font-weight: 700;
    font-size: 14px;
}

.f-header-flight {
    font-size: 12px;
    opacity: 0.9;
}

/* メイン部分（時刻・空港） */
.f-card-body {
    padding: 24px;
    flex: 1;
}

.f-main-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.f-col-side {
    text-align: left;
    min-width: 0;
}

/* min-width:0 で縮小許容 */
.f-col-right {
    text-align: right;
    min-width: 0;
}

.f-airport-code {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
}

.f-time-large {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.f-date-sub {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 4px;
    white-space: nowrap;
}

/* 中央カラム（矢印・時間） */
.f-col-center {
    flex: 1;
    margin: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 12px;
    min-width: 60px;
    /* 最低限の幅確保 */
}

.f-duration {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
}

.f-line-graphic {
    width: 100%;
    height: 2px;
    background: var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f-plane-icon {
    background: white;
    color: var(--text-gray);
    font-size: 20px;
    padding: 0 8px;
}

.f-direction-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    white-space: nowrap;
}

/* フッター（ターミナル・ゲート） */
.f-footer-row {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
    /* スマホでは折り返し許容 */
}

/* === 📱 スマホ用調整 (600px以下) === */
@media (max-width: 600px) {
    .f-card-body {
        padding: 16px;
    }

    .f-main-row {
        gap: 8px;
        /* カラム間の隙間を狭く */
    }

    .f-col-center {
        margin: 0 8px;
        /* 中央余白を削減 */
        min-width: 40px;
    }

    .f-time-large {
        font-size: 24px !important;
    }

    /* 時刻を小さく */
    .f-airport-code {
        font-size: 14px;
    }

    .f-date-sub {
        font-size: 14px;
    }

    .f-duration {
        font-size: 11px;
    }

    .f-direction-label {
        font-size: 10px;
    }

    .f-plane-icon {
        font-size: 16px;
        padding: 0 4px;
    }

    /* 概要タブのフライト情報グリッド修正 */
    #flight-info-display>div {
        grid-template-columns: 1fr !important;
        /* 2列を1列に強制変更 */
        gap: 8px !important;
    }
}

/* =========================================
   🏨 宿泊先タイムライン表示 (追加)
   ========================================= */
.acc-timeline-group {
    margin-bottom: 0;
    /* 線を繋げるためにマージン調整 */
}

/* =========================================
   🏨 宿泊先タイムライン表示 (修正版)
   ========================================= */
.acc-timeline-item {
    margin-bottom: 32px;
}

.acc-date-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.acc-date-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    z-index: 2;
    flex-shrink: 0;
}

.acc-date-dot.checkin {
    background: #10b981;
    /* 緑 */
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.acc-date-dot.checkout {
    background: #ef4444;
    /* 赤 */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.acc-date-text {
    font-size: 18px;
    font-weight: 700;
}

.acc-date-text.checkin {
    color: #10b981;
}

.acc-date-text.checkout {
    color: #ef4444;
}

.acc-day {
    font-size: 0.8em;
    opacity: 0.8;
    font-weight: 600;
    margin: 0 4px;
}

.acc-label {
    font-size: 0.7em;
    color: var(--text-gray);
    margin-left: 4px;
    font-weight: 600;
}

/* タイムラインの線とコンテナ */
.acc-timeline-body {
    padding-left: 24px;
    /* 線からの距離 */
    border-left: 2px solid #e2e8f0;
    margin-left: 7px;
    /* ドットの中心(8px) - 線幅半分(1px) = 7px */
    padding-top: 8px;
    padding-bottom: 16px;
}

/* 宿泊カード本体 */
.acc-card-timeline-style {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    /* タイムライン内なのでマージン削除 */
    transition: all 0.2s;
}

.acc-card-timeline-style:hover {
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15);
}

/* ★ 追加: 支出画面の表示切り替えタブ */
.view-type-tabs {
    display: flex;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-sm);
    gap: 4px;
}

.view-type-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.view-type-tab:hover {
    background: rgba(0, 0, 0, 0.05);
}

.view-type-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.view-type-tab .material-icons-round {
    font-size: 18px;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.trip-page,
.main-content,
.tab-content,
.info-section,
.balance-section {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {

    .summary-cards,
    .overview-members-grid,
    .info-grid {
        width: 100%;
        overflow-x: hidden;
    }

    .overview-member-card {
        min-width: 0;
    }
}

.dashboard-trip-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 16px 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.dashboard-trip-tab {
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dashboard-trip-tab.active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

input[type="number"].allow-decimal-3 {
    ime-mode: disabled;
}

/* =========================
4) 末尾に追加
========================= */
.custom-split-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.custom-split-member {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.custom-split-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ===== 通貨 丸ボタン横並び式ピッカー（スマホ用） ===== */
.currency-custom-picker {
    width: 100%;
}

.currency-round-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.currency-round-buttons::-webkit-scrollbar {
    display: none;
}

.currency-round-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    gap: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.currency-round-btn:active {
    transform: scale(0.9);
}

.currency-round-btn.selected {
    border-color: var(--primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 12px rgba(99, 102, 241, 0.2);
    transform: scale(1.08);
}

.crb-flag {
    font-size: 24px;
    line-height: 1;
}

.crb-code {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.currency-round-btn.selected .crb-code {
    color: var(--primary);
}

@media (min-width: 769px) {
    .currency-custom-picker {
        display: none !important;
    }

    #expense-currency {
        display: block !important;
    }
}

/* ===== カテゴリー丸ボタン ===== */
.category-round-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-round-buttons::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    gap: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cat-btn:active {
    transform: scale(0.9);
}

.cat-btn.selected {
    border-color: var(--primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.cat-icon {
    font-size: 22px;
    line-height: 1;
}

.cat-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.cat-btn.selected .cat-label {
    color: var(--primary);
}

/* ===== 支払者丸ボタン ===== */
.payer-round-buttons {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.payer-round-buttons::-webkit-scrollbar {
    display: none;
}

.payer-round-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    gap: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prb-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 3px solid transparent;
    transition: all 0.18s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payer-round-btn.selected .prb-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.prb-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.payer-round-btn.selected .prb-name {
    color: var(--primary);
}

.payer-round-btn:active .prb-avatar {
    transform: scale(0.9);
}

/* =========================================
   💸 支出アイテムの立替対象アバター
   ========================================= */
.split-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid var(--surface);
    margin-left: -8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.split-avatar:first-child {
    margin-left: 0;
}

/* =========================================
   💸 UI改善: 支出入力の金額フィールド巨大化
   ========================================= */
.amount-input-large {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    text-align: right;
    padding: 16px 20px !important;
    background: #f8fafc;
    border: 2px solid var(--primary) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 12px !important;
    letter-spacing: 1px;
    height: auto !important;
}

.amount-input-large::placeholder {
    color: #cbd5e1;
}

/* =========================================
   💸 UI改善: 精算のお金移動アニメーション
   ========================================= */
.v-flow-area {
    position: relative;
    overflow: hidden;
    /* アニメーションがはみ出さないように */
}

.flow-dot {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: flowRight 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    box-shadow: 0 0 6px var(--primary);
}

@keyframes flowRight {
    0% {
        left: 15%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: 85%;
        opacity: 0;
    }
}

/* =========================================
   🌤️ 天気ウィジェット＆ナビボタン
   ========================================= */
.weather-forecast-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px;
    margin-top: 12px;
    color: var(--surface);
}

.weather-title {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 6px;
    text-align: center;
}

.weather-days {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.weather-day-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 6px;
    flex: 1;
}

.w-date {
    font-size: 10px;
    font-weight: bold;
}

.w-icon {
    font-size: 18px;
    margin: 2px 0;
}

.w-temp {
    font-size: 10px;
}

.w-high {
    color: #ff9f43;
    font-weight: bold;
}

.w-low {
    color: #54a0ff;
}

.weather-loading,
.weather-error {
    font-size: 12px;
    color: var(--surface);
    opacity: 0.8;
    text-align: center;
    margin-top: 10px;
}

.btn-route-search {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 4px 10px;
    background: var(--info);
    color: white !important;
    border-radius: 12px;
    text-decoration: none;
    margin-left: 8px;
    transition: background 0.2s;
}

.btn-route-search:hover {
    background: #2563eb;
}

/* =========================================
   📍 場所入力のオートコンプリート（サジェスト）
   ========================================= */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
}

.autocomplete-list li {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    transition: background 0.2s;
}

.autocomplete-list li:last-child {
    border-bottom: none;
}

.autocomplete-list li:hover {
    background: var(--bg);
}

.autocomplete-icon {
    color: var(--text-gray);
    font-size: 18px;
}

/* =========================================
   📅 しおり: 日付ごとのカードUI
   ========================================= */
.schedule-day-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.schedule-day-header {
    background: #f1f5f9;
    /* ヘッダーだけ少し色をつけて区別 */
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.schedule-day-header:hover {
    background: #e2e8f0;
}

.schedule-day-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.schedule-day-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    /* タイトルを目立たせる */
    margin: 0;
}

.schedule-day-content {
    padding: 16px;
}

/* 閉じている時は下の線を消す */
.schedule-day-container.closed .schedule-day-header {
    border-bottom: none;
}