/* Rumah Adat 3D — kiri: panggung 3D lebar; kanan: navigasi + keterangan (bertumpuk), scroll terpisah */

/* Halaman Rumah Adat: lebar kotak putih (.container) sama dengan panel (shell) */
body.page-rumah-adat .content-wrapper > .container {
    max-width: min(1380px, 100%);
    width: 100%;
}

.rumah-adat-breakout {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    overflow-x: clip;
}

/* Kontainer utama fitur — di tengah halaman, proporsional */
.rumah-adat-shell {
    width: 100%;
    max-width: min(1380px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

.rumah-adat-app {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(228px, min(268px, 26vw));
    grid-template-rows: 1fr;
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    box-sizing: border-box;
    min-height: clamp(560px, 84vh, 980px);
    height: clamp(560px, 84vh, 980px);
    overflow: hidden;
    border-radius: 12px;
    margin: 0 auto;
}

/* Kolom kiri: hanya panggung 3D */
.rumah-adat-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.rumah-adat-stage {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 260px;
    border-radius: 12px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rumah-adat-app.bg-black .rumah-adat-stage {
    background: radial-gradient(ellipse 80% 70% at 50% 45%, #2a2218 0%, #0d0c0a 75%);
}

.rumah-adat-app.bg-white .rumah-adat-stage {
    background: radial-gradient(ellipse 80% 70% at 50% 45%, #f5f5f5 0%, #d8d8d8 85%);
}

#scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Background modes */
.rumah-adat-app.bg-black {
    background: radial-gradient(circle at top left, #3a2c1a, #0d0d0d 55%);
    color: #fff;
}

.rumah-adat-app.bg-white {
    background: radial-gradient(circle at top left, #ffffff, #dddddd 60%);
    color: #000;
}

.rumah-adat-app.bg-white .panel,
.rumah-adat-app.bg-white .desc-panel,
.rumah-adat-app.bg-white .hierarchy-item {
    color: #000;
}

.rumah-adat-app * {
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

.glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.rumah-adat-app.bg-white .glass {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

/* Kolom kanan: navigasi (atas) + keterangan (bawah), masing-masing bisa scroll */
.ui-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    min-width: 0;
    height: 100%;
    align-self: stretch;
    z-index: 10;
}

.panel {
    width: 100%;
    padding: 0;
    border-radius: 20px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel--nav,
.panel--nav-full {
    flex: 1 1 58%;
    min-height: 0;
    max-height: 100%;
}

.ra-scroll-y {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 211, 106, 0.55) rgba(255, 255, 255, 0.08);
}

.rumah-adat-app.bg-white .ra-scroll-y {
    scrollbar-color: rgba(184, 120, 0, 0.6) rgba(0, 0, 0, 0.06);
}

.ra-scroll-y::-webkit-scrollbar {
    width: 6px;
}

.ra-scroll-y::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin: 4px 0;
}

.ra-scroll-y::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 211, 106, 0.75), rgba(200, 150, 40, 0.55));
    border-radius: 4px;
}

.rumah-adat-app.bg-white .ra-scroll-y::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
}

.rumah-adat-app.bg-white .ra-scroll-y::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(184, 120, 0, 0.8), rgba(140, 90, 0, 0.55));
}

.panel__head {
    flex: 0 0 auto;
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rumah-adat-app.bg-white .panel__head {
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

/* Area scroll: hierarki / info / tour — tidak bertumpu dengan tombol aksi */
.panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px 10px;
}

.panel__body.ra-scroll-y {
    flex: 1 1 auto;
}

.panel__head h3 {
    margin: 0 0 8px;
}

.panel h3 {
    color: #ffd36a;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
}

.rumah-adat-app select,
.rumah-adat-app button {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 0;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    outline: none;
}

.panel__head select {
    margin-bottom: 8px;
}

.rumah-adat-app .tab {
    margin-bottom: 0;
    width: auto;
}

.rumah-adat-app button.eye-btn {
    margin-bottom: 0;
    width: 28px;
    min-width: 28px;
    height: 28px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.rumah-adat-app button.eye-btn:hover {
    box-shadow: none;
    background: rgba(255, 211, 106, 0.3);
}

.rumah-adat-app.bg-white button.eye-btn {
    background: rgba(0, 0, 0, 0.06);
}


/* Dropdown nama rumah: teks gelap di atas latar terang (hindari inherit putih dari .bg-black) */
.rumah-adat-app select {
    color: #141414;
    background-color: #f2f2f2;
    border: 1px solid rgba(0, 0, 0, 0.14);
    font-weight: 500;
    padding-right: 30px;
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #333 50%),
        linear-gradient(135deg, #333 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.rumah-adat-app select option,
.rumah-adat-app select optgroup {
    color: #141414;
    background-color: #fff;
}

.rumah-adat-app.bg-white select {
    color: #0a0a0a;
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.18);
}

.rumah-adat-app.bg-white select option,
.rumah-adat-app.bg-white select optgroup {
    color: #0a0a0a;
    background-color: #fff;
}

.rumah-adat-app button {
    cursor: pointer;
    background: linear-gradient(135deg, #e0a92e, #b97700);
    color: #fff;
    font-weight: 500;
    transition: 0.25s ease;
}

.rumah-adat-app button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.rumah-adat-app button.outline {
    background: transparent;
    border: 1px solid #ffd36a;
    color: #ffd36a;
}

.rumah-adat-app.bg-white button.outline {
    border-color: #b97700;
    color: #8a5a00;
}

.rumah-adat-app button.primary {
    background: linear-gradient(135deg, #ffcc55, #d89b17);
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 6px;
    color: #f5f5f5;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 500;
}

.rumah-adat-app.bg-white .tab {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

.tab.active {
    background: #ffd36a;
    color: #000;
    font-weight: 600;
}

.tab-content {
    display: none;
    min-height: 0;
}

.tab-content.active {
    display: block;
}

#element-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: none;
    overflow: visible;
}

.hierarchy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rumah-adat-app.bg-white .hierarchy-item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.hierarchy-item span {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
    font-weight: 500;
}

.rumah-adat-app.bg-black .hierarchy-item span {
    color: #fafafa;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.rumah-adat-app.bg-white .hierarchy-item span {
    color: #111;
}

.eye-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    margin-right: 4px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rumah-adat-app.bg-white .eye-btn {
    background: rgba(0, 0, 0, 0.06);
}

.eye-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 211, 106, 0.25);
}

.toggle-switch {
    width: 38px;
    height: 18px;
    position: relative;
    flex-shrink: 0;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #777;
    border-radius: 20px;
}

.toggle-slider::before {
    content: "";
    width: 14px;
    height: 14px;
    background: #fff;
    position: absolute;
    left: 2px;
    bottom: 2px;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #ffd36a;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.desc-panel {
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
}

/* Keterangan di bawah panel navigasi (kolom kanan) */
.desc-panel--below-nav {
    position: relative;
    flex: 1 1 42%;
    min-height: 120px;
    max-height: none;
    width: 100%;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 211, 106, 0.2);
}

.desc-panel__inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

/* Keterangan: gambar di atas, teks di bawah */
.desc-panel--below-nav .desc-panel__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.desc-panel--below-nav .desc-panel__inner > img,
.desc-panel--below-nav #desc-img {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: min(168px, 30vh);
    min-height: 72px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    align-self: stretch;
}

.desc-panel--below-nav .desc-text {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    padding: 8px 12px 12px;
}

/* Panel keterangan: pojok kiri bawah (varian lama, jika dipakai di markup lain) */
.desc-panel--float {
    flex-direction: row;
    position: absolute;
    z-index: 5;
    left: 10px;
    right: auto;
    top: auto;
    bottom: 10px;
    width: min(248px, calc(100% - 20px));
    max-width: min(248px, calc(100% - 20px));
    min-height: 72px;
    max-height: min(156px, 30vh);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 211, 106, 0.22);
    pointer-events: auto;
}

.rumah-adat-app.bg-black .desc-panel--float {
    background: rgba(12, 10, 8, 0.25) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 211, 106, 0.28);
}

.rumah-adat-app.bg-white .desc-panel--float {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 120, 0, 0.3);
    color: #1a1a1a;
}

.desc-panel--float.glass {
    background: rgba(12, 10, 8, 0.25);
}

.desc-panel--float img {
    width: 68px;
    min-width: 68px;
    max-width: 34%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Area teks + scrollbar samping (keterangan panjang) */
.desc-panel--float .desc-text--scroll {
    flex: 1;
    min-width: 0;
    padding: 8px 6px 8px 8px;
    max-height: min(156px, 30vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 211, 106, 0.65) rgba(255, 255, 255, 0.08);
}

.desc-panel--float .desc-text--scroll::-webkit-scrollbar {
    width: 5px;
}

.desc-panel--float .desc-text--scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 4px 0;
}

.desc-panel--float .desc-text--scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 211, 106, 0.85), rgba(200, 150, 40, 0.65));
    border-radius: 4px;
}

.rumah-adat-app.bg-white .desc-panel--float .desc-text--scroll {
    scrollbar-color: rgba(184, 120, 0, 0.7) rgba(0, 0, 0, 0.06);
}

.rumah-adat-app.bg-white .desc-panel--float .desc-text--scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
}

.rumah-adat-app.bg-white .desc-panel--float .desc-text--scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(184, 120, 0, 0.85), rgba(140, 90, 0, 0.6));
}

/* Kontras teks di atas model 3D */
.rumah-adat-app.bg-black .desc-panel--float #desc-title,
.rumah-adat-app.bg-black .desc-panel--float #desc-desc {
    color: #fff;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(0, 0, 0, 0.45);
}

.rumah-adat-app.bg-black .desc-panel--float #desc-desc {
    opacity: 1;
}

.desc-panel--float #desc-title {
    font-size: 12px;
}

.desc-panel--float #desc-desc {
    font-size: 11px;
    line-height: 1.45;
    margin-top: 6px;
}

.desc-text {
    padding: 14px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.desc-panel--below-nav .desc-panel__inner.ra-scroll-y .desc-text {
    overflow: visible;
    -webkit-overflow-scrolling: auto;
}

.desc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#desc-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 32px);
}

#desc-desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.95;
}

#speak-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 50%;
    color: transparent;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

#speak-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.rumah-adat-app.bg-white #speak-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

#speak-btn:not(.muted)::after {
    content: "🔊";
    color: #ffd36a;
}

#speak-btn.muted::after {
    content: "🔇";
    color: #aaa;
}

.rumah-adat-app.bg-white #speak-btn:not(.muted)::after {
    color: #b97700;
}

.desc-panel--float #speak-btn {
    width: 22px;
    height: 22px;
}

.qr-card {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 6;
}

.qr-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    position: relative;
}

/* Ikon QR kecil — selalu tampil */
.qr-card .qr-icon-svg {
    width: 36px;
    height: 36px;
    color: #C9A84C;
    background: rgba(26,14,0,0.75);
    border: 1px solid rgba(201,168,76,0.4);
    border-radius: 8px;
    padding: 5px;
    display: block;
    transition: background .2s, border-color .2s;
}
.qr-card a:hover .qr-icon-svg {
    background: rgba(201,168,76,0.2);
    border-color: rgba(201,168,76,0.7);
}

/* Label kecil di bawah ikon */
.qr-card .qr-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(201,168,76,0.8);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* QR image — tersembunyi, muncul saat hover */
.qr-card .qr-popup-img {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    border: 2px solid rgba(201,168,76,0.5);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    background: #fff;
    z-index: 10;
}
.qr-card a:hover .qr-popup-img {
    display: block;
}

/* ——— Virtual tour HUD (di atas canvas) ——— */
.ra-tour-hud {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    max-width: min(92%, 420px);
    pointer-events: none;
}

.ra-tour-hud__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px 12px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(18, 16, 12, 0.88), rgba(8, 8, 8, 0.92));
    border: 1px solid rgba(255, 211, 106, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.rumah-adat-app.bg-white .ra-tour-hud__inner {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 242, 235, 0.96));
    border-color: rgba(184, 120, 0, 0.35);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
}

.ra-tour-hud__badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffd36a;
    opacity: 0.95;
}

.rumah-adat-app.bg-white .ra-tour-hud__badge {
    color: #8a5a00;
}

.ra-tour-hud__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: #fff;
}

.rumah-adat-app.bg-white .ra-tour-hud__title {
    color: #1a1a1a;
}

.ra-tour-hud__step {
    font-size: 10px;
    opacity: 0.75;
    color: rgba(255, 255, 255, 0.85);
}

.rumah-adat-app.bg-white .ra-tour-hud__step {
    color: rgba(0, 0, 0, 0.55);
}

/* Tab Tour */
.ra-tour-lead {
    margin: 0 0 12px;
    font-size: 11px;
    line-height: 1.45;
    opacity: 0.9;
}

.rumah-adat-app.bg-black .ra-tour-lead {
    color: #f0f0f0;
}

.rumah-adat-app.bg-white .ra-tour-lead {
    color: #222;
}

.ra-tour-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ra-tour-actions .outline {
    margin-bottom: 0 !important;
}

.ra-tour-progress-wrap {
    margin-top: 12px;
}

.ra-tour-progress-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.rumah-adat-app.bg-white .ra-tour-progress-track {
    background: rgba(0, 0, 0, 0.08);
}

.ra-tour-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e0a92e, #ffd36a);
    transition: width 0.35s ease;
}

.rumah-adat-app.bg-white .ra-tour-progress-bar {
    background: linear-gradient(90deg, #b97700, #e0a92e);
}

.ra-tour-progress-label {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.8;
}

.rumah-adat-app.bg-black .ra-tour-progress-label {
    color: #eee;
}

.rumah-adat-app.bg-white .ra-tour-progress-label {
    color: #333;
}

.panel-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px 12px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
}

.rumah-adat-app.bg-white .panel-actions {
    border-top-color: rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, transparent 100%);
}

.panel-actions button {
    margin-bottom: 0 !important;
}

/* Tab Info — kartu ke halaman ebook Rumah Bolon */
.ra-info-ebook {
    padding: 2px 0 8px;
}

.ra-info-ebook__title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.ra-info-ebook__text {
    margin: 0 0 12px;
    font-size: 11px;
    line-height: 1.45;
    opacity: 0.92;
}

.ra-info-ebook__card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rumah-adat-app.bg-white .ra-info-ebook__card {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.ra-info-ebook__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 211, 106, 0.45);
}

.rumah-adat-app.bg-white .ra-info-ebook__card:hover {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    border-color: rgba(184, 120, 0, 0.35);
}

.ra-info-ebook__thumb-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: rgba(0, 0, 0, 0.25);
}

.rumah-adat-app.bg-white .ra-info-ebook__thumb-wrap {
    background: rgba(0, 0, 0, 0.06);
}

.ra-info-ebook__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.ra-info-ebook__cta {
    display: block;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, rgba(224, 169, 46, 0.35), rgba(185, 119, 0, 0.25));
    color: #ffd36a;
}

.rumah-adat-app.bg-white .ra-info-ebook__cta {
    background: linear-gradient(135deg, rgba(224, 169, 46, 0.2), rgba(185, 119, 0, 0.15));
    color: #7a5200;
}

.rumah-adat-app.bg-black .ra-info-ebook__title,
.rumah-adat-app.bg-black .ra-info-ebook__text {
    color: #f5f5f5;
}

.rumah-adat-app.bg-white .ra-info-ebook__title,
.rumah-adat-app.bg-white .ra-info-ebook__text {
    color: #111;
}

/* ——— Mobile / portrait: kiri (panggung + keterangan), lalu panel navigasi ——— */
@media (max-width: 768px) {
    .rumah-adat-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .rumah-adat-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: 0;
        padding: 12px;
        gap: 12px;
    }

    .rumah-adat-left {
        height: auto;
        flex: 0 1 auto;
    }

    .rumah-adat-stage {
        flex: 0 0 auto;
        min-height: min(48vh, 420px);
        height: min(48vh, 420px);
    }

    .ui-wrapper {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: min(88vh, 720px);
        overflow: hidden;
    }

    .panel--nav,
    .panel--nav-full {
        flex: 1 1 50%;
        min-height: 200px;
        max-height: min(48vh, 420px);
        height: auto;
    }

    .panel__body {
        max-height: none;
    }

    .desc-panel--below-nav {
        flex: 1 1 50%;
        min-height: 160px;
        max-height: min(42vh, 380px);
    }

    .desc-panel--below-nav .desc-panel__inner > img,
    .desc-panel--below-nav #desc-img {
        max-height: min(140px, 26vh);
    }

    .desc-panel--float {
        left: 8px;
        right: auto;
        bottom: 8px;
        width: min(260px, calc(100% - 16px));
        max-width: min(260px, calc(100% - 16px));
        flex-direction: row;
        max-height: min(148px, 34vh);
    }

    .desc-panel--float img {
        width: 72px;
        min-width: 72px;
        max-width: 35%;
        height: auto;
        min-height: 0;
    }

    .desc-panel--float .desc-text--scroll {
        max-height: min(148px, 34vh);
    }

    .qr-card {
        top: 10px;
        left: 10px;
    }

    .qr-card .qr-icon-svg {
        width: 30px;
        height: 30px;
    }

    .ra-tour-hud {
        bottom: 10px;
        max-width: 94%;
    }

    .ra-tour-hud__inner {
        padding: 8px 12px 10px;
    }

    .ra-tour-hud__title {
        font-size: 12px;
    }
}

@media (orientation: portrait) and (max-width: 768px) {
    .rumah-adat-stage {
        min-height: min(46svh, 400px);
        height: min(46svh, 400px);
    }
}

@media (min-width: 769px) and (max-width: 960px) {
    .desc-panel--float {
        max-height: min(150px, 32vh);
        width: min(236px, calc(100% - 20px));
    }

    .desc-panel--float img {
        width: 64px;
        min-width: 64px;
    }
}
