:root {
            --bg: #e0e5ec;
            --light: #ffffff;
            --shadow: #a3b1c6;
            --accent: #4b6cb7;
            --text-main: #31344b;
            --text-dim: #777e91;
        }

        body { background: var(--bg); color: var(--text-main); font-family: 'Inter', sans-serif; margin: 0; display: flex; justify-content: center; line-height: 1.5; }
        .app-shell { width: 100%; max-width: 500px; min-height: 100vh; padding: 20px; box-sizing: border-box; }

        header { text-align: center; margin-bottom: 30px; }
        header h1 { margin: 0; font-size: 1.8rem; letter-spacing: -1px; }
        header p { color: var(--text-dim); font-size: 0.9rem; }

        /* Navigation */
        nav { display: flex; gap: 10px; margin-bottom: 25px; overflow-x: auto; padding: 5px; }
        .nav-btn { flex: 1; border: none; padding: 12px 8px; border-radius: 12px; background: var(--bg);
                   box-shadow: 6px 6px 12px var(--shadow), -6px -6px 12px var(--light);
                   cursor: pointer; font-weight: 600; color: var(--text-dim); transition: 0.2s; white-space: nowrap; }
        .nav-btn.active { box-shadow: inset 4px 4px 8px var(--shadow), inset -4px -4px 8px var(--light); color: var(--accent); }

        /* Cards & Content */
        .card { background: var(--bg); border-radius: 20px; padding: 20px;
                box-shadow: 9px 9px 16px var(--shadow), -9px -9px 16px var(--light); margin-bottom: 20px; }

        .section-header { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin: 25px 0 10px 5px; font-weight: 800; }

        /* Structured Row UX (Left/Right) */
        .info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.03); }
        .info-row:last-child { border-bottom: none; }
        .label-group { display: flex; flex-direction: column; }
        .label-group .sub { font-size: 0.75rem; color: var(--text-dim); }

        .action-btn { background: var(--bg); padding: 8px 16px; border-radius: 10px; text-decoration: none;
                      color: var(--accent); font-weight: bold; font-size: 0.85rem;
                      box-shadow: 4px 4px 8px var(--shadow), -4px -4px 8px var(--light); }
        .action-btn:active { box-shadow: inset 2px 2px 5px var(--shadow), inset -2px -2px 5px var(--light); }

        /* Travel Card UX */
        .route-block { border-left: 3px solid var(--accent); padding-left: 15px; margin-bottom: 20px; }
        .route-title { font-weight: 800; margin-bottom: 4px; display: block; }
        .quirk-box { background: rgba(255,255,255,0.4); padding: 10px; border-radius: 10px; font-size: 0.8rem; margin-top: 10px; border: 1px solid rgba(255,255,255,0.2); }

/* Node Selection Tabs */
.node-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-node {
    flex: 1;
    border: none;
    background: var(--bg);
    padding: 15px 5px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-dim);
    box-shadow: 5px 5px 10px var(--shadow), -5px -5px 10px var(--light);
    cursor: pointer;
}

.tab-node.active {
    box-shadow: inset 4px 4px 8px var(--shadow), inset -4px -4px 8px var(--light);
    color: var(--accent);
}

/* Tree Structure */
.tree {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.node.root {
    background: var(--bg);
    padding: 15px 20px;
    border-radius: 15px;
    font-weight: 800;
    color: var(--text);
    box-shadow: 6px 6px 12px var(--shadow), -6px -6px 12px var(--light);
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
}

.branch-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-left: 15px;
    border-left: 2px dashed var(--shadow);
}

.branch {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Individual Node Step */
.node-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connector-symbol {
    font-weight: bold;
    color: var(--accent);
    font-size: 1.2rem;
}

.node-box {
    background: var(--bg);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-width: 240px;
    box-shadow: 4px 4px 8px var(--shadow), -4px -4px 8px var(--light);
}

.node-box.final {
    border: 2px solid #2e7d32;
    background: #f0fdf4;
}

.node-box .label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.node-box .price {
    font-size: 0.75rem;
    font-weight: 800;
    color: #2e7d32;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 5px;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Departure */
/* Sub-branching logic */
.sub-branch-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    padding-left: 20px; /* Indent the final destinations */
    border-left: 2px solid var(--accent); /* Solid line for final choices */
}

/* Specific styling for the starting point tabs in Departure */
.node-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.tab-node {
    flex: 1;
    background: var(--bg);
    border: none;
    padding: 15px 10px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-dim);
    box-shadow: 6px 6px 12px var(--shadow), -6px -6px 12px var(--light);
    cursor: pointer;
    transition: 0.3s ease;
}

.tab-node.active {
    box-shadow: inset 4px 4px 8px var(--shadow), inset -4px -4px 8px var(--light);
    color: var(--accent);
    transform: scale(0.98);
}

/* Ensure the final nodes look like destinations */
.node-box.final {
    border-right: 5px solid #2e7d32; /* Green bar to indicate arrival */
    background: linear-gradient(145deg, #f0fdf4, #ffffff);
}

.node.root {
    border-bottom: 3px solid var(--accent);
}


/* Dual Action Layout */
.dual-action {
    flex-direction: column; /* Stack on very small screens */
    align-items: flex-start;
    gap: 15px;
}

/* Row-based layout for tablets and desktops */
@media (min-width: 400px) {
    .dual-action {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

@media (min-width: 400px) {
    .button-group {
        width: auto;
    }
}

.neu-btn-action.call-btn {
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;

    color: var(--accent);
    font-weight: bold;
    font-size: 0.85rem;

    box-shadow: 4px 4px 8px var(--shadow), -4px -4px 8px var(--light);
}


.neu-btn-action.call-btn:active { ox-shadow: inset 2px 2px 5px var(--shadow), inset -2px -2px 5px var(--light);}

.neu-btn-action.map-btn {
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;

    color: var(--accent);
    font-weight: bold;
    font-size: 0.85rem;

    box-shadow: 4px 4px 8px var(--shadow), -4px -4px 8px var(--light);
}

.neu-btn-action.map-btn:active { ox-shadow: inset 2px 2px 5px var(--shadow), inset -2px -2px 5px var(--light);}

/* Refined label group for places */
.label-group {
    margin-bottom: 5px;
}

.main-label {
    display: block;
    font-size: 1rem;
    letter-spacing: -0.5px;
}



        .fade-in { animation: fadeIn 0.4s ease-out; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

