/* =========================================
   diplomatic.quest — Inflated 3D Diplomatic
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1B1B3A;
    color: #D4D0C8;
    font-family: 'Fira Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    font-feature-settings: "liga" 0;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
.heading-primary {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(48px, 6vw, 72px);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #C6426E;
    text-shadow: 0 2px 8px rgba(198, 66, 110, 0.3);
    line-height: 1.1;
    margin-bottom: 24px;
}

.heading-secondary {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: clamp(24px, 3.5vw, 36px);
    letter-spacing: 0.06em;
    color: #E6B422;
    margin-bottom: 20px;
    line-height: 1.2;
}

.body-text {
    font-family: 'Fira Mono', monospace;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.75;
    color: #D4D0C8;
    max-width: 55ch;
    margin-bottom: 16px;
}

.room-alt .body-text {
    color: #2C2C54;
}

.accent-label {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #E6B422;
    opacity: 0.7;
    display: block;
    margin-top: 24px;
}

/* --- Horizontal Container --- */
#horizontal-container {
    display: flex;
    width: 500vw;
    height: 100vh;
    overflow: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

/* --- Rooms --- */
.room {
    position: relative;
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    scroll-snap-align: start;
    overflow: hidden;
    background: #1B1B3A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-alt {
    background: #0F3460;
}

/* Leather grain background overlay */
.room-bg-layer {
    position: absolute;
    inset: 0;
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.05) 0px, transparent 1px),
        radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.03) 100%);
    background-size: 6px 6px, 60px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Spine binding on left edge */
.room-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 100%;
    background: #8B4513;
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 0px, transparent 1px),
        radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
    background-size: 6px 6px, 60px 40px;
    border-right: 1px solid rgba(139, 69, 19, 0.5);
    z-index: 5;
}

.room-spine::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    width: 0;
    height: 100%;
    border-left: 1px dashed rgba(230, 180, 34, 0.3);
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 18px,
        rgba(230, 180, 34, 0.15) 18px,
        rgba(230, 180, 34, 0.15) 20px
    );
    width: 8px;
}

/* --- Room Content Layout --- */
.room-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
    gap: 60px;
}

.room-main-object {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
}

.room-main-object-large {
    flex: 0 0 55%;
    max-width: 600px;
}

/* --- Floating Panel (Text Containers) --- */
.floating-panel {
    position: relative;
    background: rgba(240, 230, 211, 0.08);
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 480px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 -4px 20px rgba(255, 255, 255, 0.05),
        inset 0 4px 12px rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(230, 180, 34, 0.15);
    backdrop-filter: blur(4px);
}

.room-alt .floating-panel {
    background: rgba(240, 230, 211, 0.92);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        inset 0 -4px 20px rgba(255, 255, 255, 0.15),
        inset 0 4px 12px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(230, 180, 34, 0.3);
}

.room-alt .heading-secondary {
    color: #1B1B3A;
}

.panel-right {
    order: -1;
}

/* --- Page Turn Corner --- */
.page-turn-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    overflow: hidden;
}

.page-turn-corner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent #1B1B3A transparent transparent;
}

.page-turn-corner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, rgba(139, 69, 19, 0.3) 50%);
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
}

.room-alt .page-turn-corner::before {
    border-color: transparent #0F3460 transparent transparent;
}

/* --- Bookplate Crests --- */
.bookplate {
    margin-bottom: 20px;
}

.bookplate-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border: 2px solid #E6B422;
    border-radius: 4px;
    position: relative;
}

.bookplate-shield {
    width: 16px;
    height: 20px;
    background: #C6426E;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
}

.bookplate-quill {
    width: 2px;
    height: 18px;
    background: #E6B422;
    border-radius: 1px;
}

.quill-left {
    transform: rotate(-20deg);
}

.quill-right {
    transform: rotate(20deg);
}

.bookplate-star {
    width: 10px;
    height: 10px;
    background: #E6B422;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    position: absolute;
    top: -5px;
    right: -5px;
}

/* --- Marginalia --- */
.marginalia {
    position: relative;
    margin-top: 16px;
    padding-left: 16px;
    border-left: 2px solid rgba(230, 180, 34, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.marginalia.visible {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
}

.marginalia-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #E6B422;
    opacity: 0.6;
    line-height: 1.6;
    display: block;
}

.room-alt .marginalia-text {
    color: #8B4513;
}

.marginalia-1 {
    transform: rotate(-2deg);
}

.marginalia-2 {
    transform: rotate(1.5deg);
}

.marginalia-3 {
    transform: rotate(-1deg);
}

/* --- Inflated Globe --- */
.inflated-globe {
    position: relative;
    width: 280px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.globe-sphere {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3D8EB9, #0F3460 60%, #1B1B3A);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 -15px 40px rgba(0, 0, 0, 0.3),
        inset 0 15px 30px rgba(255, 255, 255, 0.15),
        0 0 80px rgba(61, 142, 185, 0.15);
    overflow: hidden;
    animation: globe-rotate 8s linear infinite;
    transform-style: preserve-3d;
}

.globe-continent {
    position: absolute;
    border-radius: 40%;
    opacity: 0.7;
}

.continent-americas {
    width: 50px;
    height: 90px;
    background: #2D6A4F;
    top: 50px;
    left: 40px;
    border-radius: 30% 50% 40% 60%;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.1);
}

.continent-europe {
    width: 35px;
    height: 40px;
    background: #C6426E;
    top: 55px;
    left: 120px;
    border-radius: 40% 60% 30% 50%;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.1);
}

.continent-asia {
    width: 70px;
    height: 55px;
    background: #E6B422;
    top: 45px;
    left: 150px;
    border-radius: 50% 30% 60% 40%;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.1);
}

.continent-africa {
    width: 40px;
    height: 60px;
    background: #8B4513;
    top: 85px;
    left: 105px;
    border-radius: 45% 55% 50% 40%;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.2), inset 0 3px 6px rgba(255, 255, 255, 0.1);
}

.globe-seam {
    position: absolute;
    border: 1px solid rgba(230, 180, 34, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.seam-equator {
    width: 100%;
    height: 30px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    border-radius: 50% / 15px;
}

.seam-meridian {
    width: 40px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px / 50%;
}

.seam-tropic-n {
    width: 90%;
    height: 20px;
    top: 30%;
    left: 5%;
    border-radius: 50% / 10px;
}

.seam-tropic-s {
    width: 90%;
    height: 20px;
    top: 65%;
    left: 5%;
    border-radius: 50% / 10px;
}

.globe-highlight {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 25px;
    left: 35px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.globe-stand {
    width: 30px;
    height: 40px;
    background: linear-gradient(to bottom, #E6B422, #8B4513);
    border-radius: 4px 4px 15px 15px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 -5px 10px rgba(0, 0, 0, 0.2),
        inset 0 5px 8px rgba(255, 255, 255, 0.15);
    margin-top: -5px;
}

.globe-shadow {
    width: 180px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: 8px;
}

@keyframes globe-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* --- Inflated Treaty Scroll --- */
.inflated-scroll {
    position: relative;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-body {
    position: relative;
    width: 100%;
}

.scroll-roll {
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, #F0E6D3, #D4D0C8);
    border-radius: 50px;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 -8px 20px rgba(0, 0, 0, 0.15),
        inset 0 8px 15px rgba(255, 255, 255, 0.3);
}

.scroll-roll-top {
    position: relative;
    z-index: 2;
}

.scroll-roll-bottom {
    position: relative;
    z-index: 2;
}

.scroll-parchment {
    background: linear-gradient(to right, #e8dcc8, #F0E6D3 10%, #F0E6D3 90%, #e8dcc8);
    padding: 24px 20px;
    margin: -6px 15px;
    border-left: 2px solid rgba(139, 69, 19, 0.2);
    border-right: 2px solid rgba(139, 69, 19, 0.2);
    box-shadow: inset 0 0 20px rgba(139, 69, 19, 0.08);
    transition: max-height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    max-height: 180px;
}

.inflated-scroll:hover .scroll-parchment {
    max-height: 300px;
}

.scroll-text {
    font-family: 'Fira Mono', monospace;
    font-size: 11px;
    color: #2C2C54;
    line-height: 1.8;
    margin-bottom: 8px;
    opacity: 0.8;
}

.scroll-seal {
    position: absolute;
    bottom: -30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.seal-ribbon {
    width: 3px;
    height: 25px;
    background: linear-gradient(to bottom, #C6426E, #8B4513);
}

.seal-disc {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d94e7a, #C6426E 50%, #8B2252);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 -5px 12px rgba(0, 0, 0, 0.3),
        inset 0 5px 10px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(139, 69, 19, 0.3);
}

.scroll-shadow {
    width: 240px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: 40px;
}

/* --- Inflated Briefcase --- */
.inflated-briefcase {
    position: relative;
    width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.briefcase-body {
    position: relative;
    width: 340px;
    height: 220px;
    background: #8B4513;
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 0px, transparent 1px),
        radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
    background-size: 6px 6px, 60px 40px;
    border-radius: 40px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.4),
        inset 0 -15px 40px rgba(0, 0, 0, 0.25),
        inset 0 15px 30px rgba(255, 255, 255, 0.12),
        0 0 0 3px rgba(230, 180, 34, 0.2);
}

.briefcase-clasp {
    position: absolute;
    top: 12px;
    width: 40px;
    height: 18px;
    background: linear-gradient(to bottom, #f0d060, #E6B422, #c49a1e);
    border-radius: 6px;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 3px rgba(255, 255, 255, 0.3);
}

.clasp-left {
    left: 90px;
}

.clasp-right {
    right: 90px;
}

.briefcase-keyhole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 28px;
    background: radial-gradient(circle at 50% 35%, #2C2C54, #1B1B3A);
    border-radius: 50% 50% 30% 30%;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(230, 180, 34, 0.4);
}

.briefcase-handle {
    position: relative;
    z-index: 2;
    margin-top: -8px;
}

.handle-grip {
    width: 80px;
    height: 30px;
    background: linear-gradient(to bottom, #a0632a, #8B4513);
    border-radius: 15px 15px 0 0;
    box-shadow:
        0 -5px 15px rgba(0, 0, 0, 0.2),
        inset 0 5px 10px rgba(255, 255, 255, 0.1),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2);
    animation: handle-bounce 2s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

@keyframes handle-bounce {
    0% { transform: translateY(-30px); }
    40% { transform: translateY(5px); }
    60% { transform: translateY(-3px); }
    80% { transform: translateY(1px); }
    100% { transform: translateY(0); }
}

.briefcase-shadow {
    width: 280px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: 15px;
}

/* --- Inflated Quill --- */
.inflated-quill {
    position: relative;
    width: 250px;
    height: 350px;
}

.quill-shaft {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    width: 12px;
    height: 260px;
    background: linear-gradient(to bottom, #F0E6D3, #D4D0C8, #E6B422);
    border-radius: 6px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset -2px 0 4px rgba(0, 0, 0, 0.1),
        inset 2px 0 4px rgba(255, 255, 255, 0.2);
    transform-origin: bottom center;
}

.quill-barb {
    position: absolute;
    background: linear-gradient(135deg, #F0E6D3, #D4D0C8);
    border-radius: 50% 50% 50% 10px;
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.1),
        inset 0 3px 6px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.barb-1 {
    width: 55px;
    height: 30px;
    top: 20px;
    left: 60px;
    transform: rotate(25deg);
}

.barb-2 {
    width: 60px;
    height: 35px;
    top: 50px;
    left: 55px;
    transform: rotate(20deg);
}

.barb-3 {
    width: 65px;
    height: 32px;
    top: 85px;
    left: 50px;
    transform: rotate(15deg);
}

.barb-4 {
    width: 55px;
    height: 30px;
    top: 25px;
    right: 70px;
    transform: rotate(-25deg);
    border-radius: 50% 50% 10px 50%;
}

.barb-5 {
    width: 60px;
    height: 33px;
    top: 55px;
    right: 65px;
    transform: rotate(-20deg);
    border-radius: 50% 50% 10px 50%;
}

.barb-6 {
    width: 65px;
    height: 30px;
    top: 90px;
    right: 60px;
    transform: rotate(-15deg);
    border-radius: 50% 50% 10px 50%;
}

.quill-nib {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    width: 10px;
    height: 40px;
    background: linear-gradient(to bottom, #E6B422, #8B4513);
    clip-path: polygon(20% 0, 80% 0, 60% 100%, 40% 100%);
    transform-origin: top center;
}

.quill-ink-drop {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-55%);
    width: 14px;
    height: 14px;
    border-radius: 50% 50% 50% 0;
    background: radial-gradient(circle at 40% 35%, #d94e7a, #C6426E);
    box-shadow: 0 4px 12px rgba(198, 66, 110, 0.4);
    transform: translateX(-55%) rotate(-45deg);
    animation: ink-drop 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

@keyframes ink-drop {
    0% { opacity: 0; transform: translateX(-55%) rotate(-45deg) translateY(-20px); }
    15% { opacity: 1; }
    50% { transform: translateX(-55%) rotate(-45deg) translateY(0px); }
    65% { transform: translateX(-55%) rotate(-45deg) translateY(-4px); }
    80% { transform: translateX(-55%) rotate(-45deg) translateY(0px); }
    95% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-55%) rotate(-45deg) translateY(0px); }
}

.quill-shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
}

/* --- Inflated Wax Seal --- */
.inflated-seal {
    position: relative;
    width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.seal-body {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e05580, #C6426E 40%, #8B2252 80%, #6b1a3e);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.4),
        inset 0 -15px 40px rgba(0, 0, 0, 0.3),
        inset 0 15px 30px rgba(255, 255, 255, 0.15),
        inset 0 0 0 8px rgba(139, 69, 19, 0.3),
        0 0 0 4px rgba(198, 66, 110, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.inflated-seal:active .seal-body,
.inflated-seal.pressed .seal-body {
    transform: scale(0.92);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 -5px 20px rgba(0, 0, 0, 0.4),
        inset 0 10px 25px rgba(255, 255, 255, 0.1),
        inset 0 0 0 8px rgba(139, 69, 19, 0.4),
        0 0 0 4px rgba(198, 66, 110, 0.5);
}

.seal-crest {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crest-shield {
    width: 50px;
    height: 60px;
    background: rgba(240, 230, 211, 0.15);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
    box-shadow: inset 0 0 10px rgba(230, 180, 34, 0.2);
}

.crest-star {
    position: absolute;
    top: 15px;
    width: 24px;
    height: 24px;
    background: rgba(230, 180, 34, 0.4);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.crest-banner {
    position: absolute;
    bottom: 5px;
    width: 70px;
    height: 12px;
    background: rgba(230, 180, 34, 0.2);
    border-radius: 3px;
}

.seal-stamp-shadow {
    width: 180px;
    height: 18px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: 20px;
    transition: width 0.3s ease;
}

.inflated-seal:active .seal-stamp-shadow,
.inflated-seal.pressed .seal-stamp-shadow {
    width: 200px;
}

/* --- Foreground Floating Motifs --- */
.foreground-motifs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.floating-seal,
.floating-feather,
.floating-ribbon {
    position: absolute;
    opacity: 0.25;
}

.floating-seal {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #d94e7a, #C6426E);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-feather {
    width: 6px;
    height: 35px;
    background: linear-gradient(to bottom, #F0E6D3, #D4D0C8);
    border-radius: 3px 3px 1px 1px;
    transform: rotate(15deg);
}

.floating-ribbon {
    width: 40px;
    height: 6px;
    background: linear-gradient(to right, #E6B422, #C6426E);
    border-radius: 3px;
    transform: rotate(-8deg);
}

/* Position floating motifs */
.seal-1 { top: 12%; right: 8%; animation: float-drift 8s ease-in-out infinite; }
.seal-2 { bottom: 18%; left: 12%; animation: float-drift 7s ease-in-out infinite 1s; }
.seal-3 { top: 20%; left: 6%; animation: float-drift 9s ease-in-out infinite 0.5s; }
.seal-4 { bottom: 25%; right: 10%; animation: float-drift 7.5s ease-in-out infinite 2s; }

.feather-1 { top: 25%; left: 15%; animation: float-drift 10s ease-in-out infinite 0.3s; }
.feather-2 { top: 15%; right: 20%; animation: float-drift 9s ease-in-out infinite 1.5s; }
.feather-3 { bottom: 20%; right: 15%; animation: float-drift 8.5s ease-in-out infinite 0.8s; }
.feather-4 { top: 30%; left: 10%; animation: float-drift 9.5s ease-in-out infinite 1.2s; }
.feather-5 { bottom: 15%; left: 20%; animation: float-drift 8s ease-in-out infinite 2.5s; }

.ribbon-1 { bottom: 30%; right: 18%; animation: float-drift 7s ease-in-out infinite 0.7s; }
.ribbon-2 { top: 18%; right: 12%; animation: float-drift 8.5s ease-in-out infinite 1.8s; }
.ribbon-3 { top: 22%; right: 25%; animation: float-drift 9s ease-in-out infinite 0.4s; }

@keyframes float-drift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -8px); }
    50% { transform: translate(-3px, -5px); }
    75% { transform: translate(4px, 6px); }
}

/* --- Index Tabs (Right Edge) --- */
#index-tabs {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.index-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #8B4513;
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 0px, transparent 1px);
    background-size: 6px 6px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transform: translateX(calc(100% - 36px));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
    box-shadow:
        -4px 2px 12px rgba(0, 0, 0, 0.3),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(255, 255, 255, 0.1);
}

.index-tab:hover {
    transform: translateX(0);
    background: #a0632a;
}

.index-tab.active {
    background: #C6426E;
}

.tab-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #E6B422;
    min-width: 24px;
    text-align: center;
}

.tab-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #F0E6D3;
    white-space: nowrap;
    text-transform: uppercase;
}

/* --- Progress Ribbon --- */
#progress-ribbon {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(139, 69, 19, 0.3);
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.05) 0px, transparent 1px);
    background-size: 6px 6px;
    z-index: 100;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E6B422, #C6426E);
    transition: width 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.room-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 101;
}

.marker-shield {
    width: 14px;
    height: 16px;
    background: #E6B422;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.room-marker:hover .marker-shield {
    transform: scale(1.3);
}

.room-marker.active .marker-shield {
    background: #C6426E;
}

.marker-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #F0E6D3;
    background: rgba(27, 27, 58, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.room-marker:hover .marker-tooltip {
    opacity: 1;
}

/* --- Vertical Scroll Indicator --- */
#vertical-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    transition: opacity 0.3s ease;
}

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

.vi-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #E6B422;
    border-bottom: 2px solid #E6B422;
    transform: rotate(45deg);
    animation: arrow-bounce 1.5s ease-in-out infinite;
}

@keyframes arrow-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
    50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* --- Colophon --- */
.colophon {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(230, 180, 34, 0.2);
}

.colophon-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #D4D0C8;
    opacity: 0.5;
    line-height: 1.6;
    max-width: 45ch;
    margin-top: 8px;
}

/* --- Ripple Interaction --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 180, 34, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: ripple-expand 0.8s ease-out forwards;
    z-index: 10;
}

@keyframes ripple-expand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; margin-top: -100px; margin-left: -100px; }
}

/* --- Room Transition Leather Doors --- */
.room-transition {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    display: flex;
}

.transition-door {
    width: 50%;
    height: 100%;
    background: #8B4513;
    background-image:
        repeating-radial-gradient(circle at 3px 3px, rgba(0,0,0,0.08) 0px, transparent 1px),
        radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
    background-size: 6px 6px, 60px 40px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.transition-door-left {
    justify-content: flex-end;
    transform: translateX(-100%);
}

.transition-door-right {
    justify-content: flex-start;
    transform: translateX(100%);
}

.door-insignia {
    width: 60px;
    height: 72px;
    background: rgba(230, 180, 34, 0.2);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
    margin: 0 30px;
}

/* --- Responsive adjustments --- */
@media (max-width: 900px) {
    .room-content {
        flex-direction: column;
        padding: 40px 30px;
        gap: 30px;
    }

    .room-main-object,
    .room-main-object-large {
        flex: 0 0 auto;
        max-width: 280px;
    }

    .floating-panel {
        max-width: 100%;
        padding: 28px 24px;
    }

    .panel-right {
        order: 0;
    }

    .inflated-globe {
        width: 200px;
        height: 240px;
    }

    .globe-sphere {
        width: 180px;
        height: 180px;
    }

    .inflated-briefcase {
        width: 260px;
    }

    .briefcase-body {
        width: 240px;
        height: 160px;
    }

    #index-tabs {
        display: none;
    }
}

@media (max-width: 600px) {
    .heading-primary {
        font-size: 36px;
    }

    .heading-secondary {
        font-size: 22px;
    }

    .body-text {
        font-size: 14px;
    }

    .room-content {
        padding: 30px 20px;
    }
}
