/* ─── NEWSPAPER STACK NAVIGATION ─── */

.paper-stack {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
}

.paper-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #6a6a58;
    position: relative;
    height: 40px;
    padding: 0 14px;
    background: #e8e3d8;
    border: 1px solid #c4bfb0;
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    width: 44px;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.05);
}

.paper-tab:hover {
    width: 200px;
    background: #f0ebe0;
    box-shadow: 3px 1px 10px rgba(0,0,0,0.1);
    z-index: 10;
    color: #1a1a18;
}

/* Current page */
.paper-tab.current {
    width: 200px;
    background: #1a1a18;
    border-color: #1a1a18;
    color: #f0ebe0;
    box-shadow: 3px 1px 12px rgba(0,0,0,0.15);
    z-index: 5;
}
.paper-tab.current:hover {
    background: #2a2a28;
}

/* Ancestor */
.paper-tab.ancestor {
    background: #f0ebe0;
    border-color: #999080;
    color: #4a4a3a;
    width: 44px;
}
.paper-tab.ancestor:hover {
    width: 200px;
}

/* Child tabs — indented */
.paper-tab.child {
    margin-left: 10px;
    width: 36px;
    height: 36px;
}
.paper-tab.child:hover {
    width: 200px;
}
.paper-tab.child.current {
    width: 190px;
}

/* Icon */
.paper-tab-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

/* Label — the readable title */
.paper-tab-label {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.paper-tab:hover .paper-tab-label,
.paper-tab.current .paper-tab-label {
    opacity: 1;
}

/* Section subtitle for children */
.paper-tab-section {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.2s;
    color: #8a8a78;
    flex-shrink: 0;
}
.paper-tab:hover .paper-tab-section { opacity: 0.7; }
.paper-tab.current .paper-tab-section { opacity: 0.6; color: #c4bfb0; }

/* Nudge newspaper right on desktop */
@media (min-width: 901px) {
    body { padding-left: 60px; }
}

/* ─── Mobile: bottom horizontal strip ─── */
@media (max-width: 900px) {
    .paper-stack {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
        padding: 0;
        background: #f0ebe0;
        border-top: 2px solid #1a1a18;
        z-index: 300;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0;
    }
    .paper-stack::-webkit-scrollbar { display: none; }
    
    body { padding-bottom: 50px; }
    
    .paper-tab {
        width: auto !important;
        height: 44px;
        padding: 6px 14px;
        border: none;
        border-right: 1px solid #c4bfb0;
        border-radius: 0;
        flex-shrink: 0;
        gap: 6px;
        flex-direction: column;
        justify-content: center;
    }
    .paper-tab:hover { box-shadow: none; }
    .paper-tab.child { margin-left: 0; height: 44px; }
    
    .paper-tab-label {
        font-size: 7px;
        font-family: 'JetBrains Mono', monospace;
        font-weight: 500;
        letter-spacing: 1px;
        text-transform: uppercase;
        opacity: 1;
    }
    .paper-tab-icon { font-size: 14px; }
    .paper-tab-section { display: none; }

    .paper-tab.current {
        width: auto !important;
        background: #1a1a18;
    }
    .paper-tab.current .paper-tab-label { color: #f0ebe0; }
    
    /* Shift chrono bar up above mobile nav */
    .chrono-bar { bottom: 50px; }
}
