/* Mugaba Palace tour skin - "Ankole" (bright).
   Motifs are drawn from objects in the palace collection:
   - the white-on-black interlocking pattern of the milk-pot stands (Queen Mother's House)
   - the black diamonds woven into the straw bases of the milk-pot displays
   - the lyre-horned Ankole cattle at the centre of Nkore life
   Panels are light so the panoramas are never darkened. */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Jost:wght@400;500;600&display=swap");

:root {
  --cream: #fbf6ec;
  --cream-2: #f4ead6;
  --straw: #e6d0a1;
  --straw-d: #c7a96c;
  --ink: #1b130d;
  --ink-2: #4a3a2c;
  --hide: #8a4b2a;
  --gold: #a87a23;
  --shadow: 0 6px 22px rgba(40, 25, 10, .22);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  /* milk-pot stand pattern: white interlocking forms on black */
  --pot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Crect width='40' height='20' fill='%231b130d'/%3E%3Cpath d='M4 3h12v3h-4.5v6c0 2.5 2 4 4.5 4v2H4v-2c2.5 0 4.5-1.5 4.5-4V6H4z' fill='%23fbf6ec'/%3E%3Cpath d='M24 17h12v-3h-4.5V8c0-2.5 2-4 4.5-4V2H24v2c2.5 0 4.5 1.5 4.5 4v6H24z' fill='%23fbf6ec'/%3E%3C/svg%3E");
  /* woven straw with black diamonds */
  --weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14' viewBox='0 0 22 14'%3E%3Crect width='22' height='14' fill='%23e6d0a1'/%3E%3Cpath d='M0 3.5h22M0 7h22M0 10.5h22' stroke='%23c7a96c' stroke-width='.6'/%3E%3Cpath d='M11 2l5 5-5 5-5-5z' fill='%231b130d'/%3E%3C/svg%3E");
}

#preloadContainer { background-color: var(--cream) !important; }

.mg, .mg * { box-sizing: border-box; }
.mg { position: fixed; z-index: 50; font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }
.mg button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mg button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mg-pot { height: 14px; background: var(--pot) repeat-x center / auto 14px; }
.mg-weave { height: 12px; background: var(--weave) repeat-x center / auto 12px; }
.mg-cow { display: block; }

/* ---------- welcome screen ---------- */
.mg-splash { inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; transition: opacity .6s ease; }
.mg-splash.hide { opacity: 0; pointer-events: none; }
.mg-splash .card { width: min(560px, 100%); background: var(--cream); box-shadow: 0 20px 60px rgba(40, 25, 10, .35); text-align: center; overflow: hidden; border-radius: 6px; }
.mg-splash .body { padding: 26px 28px 30px; }
.mg-splash .mg-cow { width: 92px; margin: 0 auto 8px; }
.mg-splash h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 7vw, 54px); letter-spacing: .12em; margin: 0; line-height: 1.05; }
.mg-splash .kicker { color: var(--hide); font-weight: 600; letter-spacing: .28em; font-size: 12px; margin: 10px 0 14px; text-transform: uppercase; }
.mg-splash p { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.4vw, 22px); color: var(--ink-2); margin: 0 0 22px; }
.mg-splash .enter { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 360px; margin: 0 auto; }
.mg-btn { padding: 13px 22px; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; font-weight: 600; border-radius: 40px;
  background: var(--ink) !important; color: var(--cream) !important; transition: transform .15s, background .2s; }
.mg-btn:hover { background: var(--hide) !important; transform: translateY(-1px); }
.mg-btn.ghost { background: transparent !important; color: var(--ink) !important; border: 1.5px solid var(--ink) !important; }
.mg-btn.ghost:hover { background: var(--straw) !important; }

/* ---------- welcome video ---------- */
.mg-video { inset: 0; z-index: 85; display: none; place-items: center; padding: 16px; background: rgba(251, 246, 236, .35); backdrop-filter: blur(2px); }
.mg-video.open { display: grid; }
.mg-video .frame { width: min(960px, 100%); background: var(--cream); box-shadow: 0 20px 60px rgba(40, 25, 10, .35); border-radius: 6px; overflow: hidden; }
.mg-video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.mg-video .bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.mg-video .bar .t { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.mg-video .bar .s { font-size: 12px; color: var(--ink-2); letter-spacing: .06em; }
.mg-video .bar .mg-btn { margin-left: auto; padding: 9px 18px; }

/* ---------- brand / location ---------- */
.mg-brand { top: 14px; left: 14px; max-width: min(380px, calc(100vw - 28px)); background: var(--cream); box-shadow: var(--shadow); border-radius: 6px; overflow: hidden; pointer-events: none; }
.mg-brand .row { display: flex; align-items: center; gap: 10px; padding: 9px 14px 10px; }
.mg-brand .mg-cow { width: 38px; flex: none; }
.mg-brand .name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .14em; line-height: 1.1; }
.mg-brand .where { margin-top: 2px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--hide); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-brand .where span { color: var(--ink-2); font-weight: 500; }

/* ---------- controls ---------- */
.mg-controls { top: 14px; right: 14px; display: flex; gap: 8px; }
.mg-ic { width: 44px; height: 44px; display: grid; place-items: center; background: var(--cream) !important; box-shadow: var(--shadow); border-radius: 50%; border: 2px solid transparent !important; transition: border-color .2s, transform .15s; }
.mg-ic:hover { transform: translateY(-1px); }
.mg-ic.on { border-color: var(--gold) !important; }
.mg-ic svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mg-ic.on svg { stroke: var(--gold); }

/* ---------- bottom dock: scene strip + house cards ---------- */
.mg-dock { left: 50%; bottom: 12px; transform: translateX(-50%); width: min(1040px, calc(100vw - 24px)); transition: transform .35s ease; }
.mg-dock.closed { transform: translate(-50%, calc(100% - 46px)); }
.mg-scenes { background: var(--cream); box-shadow: var(--shadow); border-radius: 8px 8px 0 0; padding: 10px 12px 8px; }
.mg-scenes .hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.mg-scenes .hd b { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.mg-scenes .hd span { font-size: 12px; color: var(--hide); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.mg-toggle { margin-left: auto; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink-2) !important; padding: 2px 6px !important; }
.mg-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--straw-d) transparent; }
.mg-thumb { flex: none; width: 112px; text-align: left; }
.mg-thumb .img { height: 64px; border-radius: 5px; background: #ccc center / cover no-repeat; border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.mg-thumb:hover .img { transform: translateY(-2px); }
.mg-thumb.on .img { border-color: var(--ink); }
.mg-thumb .t { margin-top: 4px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-thumb.on .t { color: var(--ink); font-weight: 600; }
.mg-thumb.hl { width: 132px; }
.mg-thumb.hl .img { height: 74px; }
.mg-thumb.hl .t { font-family: var(--serif); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.mg-more { flex: none; align-self: stretch; min-width: 108px; margin-bottom: 18px; padding: 0 12px !important; border-radius: 6px;
  background: var(--straw) !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mg-more span { font-size: 16px; }
.mg-dock.closed .mg-scenes { cursor: pointer; }
.mg-houses { display: flex; gap: 10px; overflow-x: auto; padding: 12px 12px 12px; background: var(--weave) repeat center / auto 14px; border-radius: 0 0 8px 8px; box-shadow: var(--shadow); scrollbar-width: none; }
.mg-houses::-webkit-scrollbar { display: none; }
.mg-house { flex: 1 0 140px; max-width: 200px; text-align: center; transition: transform .2s; }
.mg-house .ph { height: 86px; border-radius: 70px 70px 6px 6px; background: #ccc center / cover no-repeat; border: 3px solid var(--cream); box-shadow: 0 3px 10px rgba(40, 25, 10, .25); }
.mg-house .nm { margin-top: -2px; background: var(--cream); border-radius: 0 0 6px 6px; padding: 5px 6px 6px; }
.mg-house .nm b { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.1; }
.mg-house .nm span { font-size: 11px; color: var(--hide); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.mg-house:hover { transform: translateY(-3px); }
.mg-house.on { transform: translateY(-5px); }
.mg-house.on .ph { border-color: var(--ink); }
.mg-house.on .nm { background: var(--ink); color: var(--cream); }
.mg-house.on .nm span { color: var(--straw); }

/* ---------- map ---------- */
.mg-modal { inset: 0; z-index: 70; display: none; place-items: center; background: rgba(251, 246, 236, .35); backdrop-filter: blur(2px); padding: 16px; }
.mg-modal.open { display: grid; }
.mg-card { position: relative; width: min(1100px, 96vw); background: var(--cream); box-shadow: 0 20px 60px rgba(40, 25, 10, .35); border-radius: 6px; overflow: hidden; }
.mg-card .in { padding: 14px 18px 18px; }
.mg-card h2 { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: .12em; margin: 2px 0 12px; }
.mg-close { position: absolute; top: 20px; right: 14px; font-size: 28px; line-height: 1; color: var(--ink) !important; padding: 4px 8px !important; z-index: 2; }
.mg-map { position: relative; }
.mg-map img { display: block; width: 100%; height: auto; border-radius: 4px; }
.mg-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mg-pin .lbl { background: var(--cream); color: var(--ink); padding: 5px 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; white-space: nowrap; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.mg-pin .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 3px solid var(--ink); animation: mgpulse 2s infinite; }
.mg-pin.here .lbl { background: var(--ink); color: var(--cream); }
.mg-pin.below { flex-direction: column-reverse; transform: translate(-50%, 0); }
@keyframes mgpulse { 0% { box-shadow: 0 0 0 0 rgba(251,246,236,.9); } 70% { box-shadow: 0 0 0 12px rgba(251,246,236,0); } 100% { box-shadow: 0 0 0 0 rgba(251,246,236,0); } }

/* ---------- panels on the walls: gold outline + tag, drawn over the 360 view ---------- */
.mg-spots { inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.mg-spotsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mg-board { fill: rgba(251,246,236,0); stroke: rgba(222,190,120,.55); stroke-width: 1.3; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.mg-tag { position: absolute; width: 24px; height: 24px; transform: translate(-60%, -40%); pointer-events: auto; display: grid; place-items: center;
  background: rgba(251,246,236,.72) !important; border-radius: 50%; box-shadow: 0 1px 5px rgba(40,25,10,.25); opacity: .8; transition: opacity .2s, transform .2s; }
.mg-tag svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mg-tag:hover, .mg-tag:focus-visible { opacity: 1; transform: translate(-60%, -40%) scale(1.15); }
.mg-objarea { fill: none; stroke: none; }
.mg-otag.is3d { width: auto; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink) !important; opacity: .92; }
.mg-otag { transform: translate(-50%, -50%); width: 22px; height: 22px; background: rgba(251,246,236,.62) !important; box-shadow: 0 0 0 2px rgba(168,122,35,.35), 0 1px 5px rgba(40,25,10,.25); }
.mg-otag:hover, .mg-otag:focus-visible { transform: translate(-50%, -50%) scale(1.15); }

/* ---------- wall panels: grid + full-screen reader ---------- */
.mg-ptabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mg-ptabs button { padding: 7px 14px !important; border-radius: 20px; border: 1.5px solid var(--ink) !important; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.mg-ptabs button span { color: var(--hide); margin-left: 4px; }
.mg-ptabs button.on { background: var(--ink) !important; color: var(--cream) !important; }
.mg-ptabs button.on span { color: var(--straw); }
.mg-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: min(62vh, 640px); overflow-y: auto; padding: 2px; }
.mg-pthumb { position: relative; aspect-ratio: 3 / 4; border-radius: 5px; overflow: hidden; background: var(--cream-2) !important; box-shadow: 0 2px 8px rgba(40,25,10,.18); transition: transform .15s; }
.mg-pthumb:hover { transform: translateY(-2px); }
.mg-pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-pthumb span { position: absolute; left: 6px; bottom: 6px; background: var(--cream); border-radius: 12px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.mg-reader { inset: 0; z-index: 95; display: none; background: var(--cream); flex-direction: column; }
.mg-reader.open { display: flex; }
.mg-reader .top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--straw-d); }
.mg-reader .top b { font-family: var(--serif); font-size: 20px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-reader .zm { display: flex; gap: 6px; }
.mg-reader .mg-ic { font-size: 22px; font-weight: 600; line-height: 1; box-shadow: 0 1px 4px rgba(40,25,10,.2); }
.mg-reader .stage { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: grab; background: #f1e8d6; }
.mg-reader .stage:active { cursor: grabbing; }
.mg-reader .stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.mg-reader .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; border-radius: 8px; background: rgba(251,246,236,.92) !important; box-shadow: var(--shadow); font-size: 34px; line-height: 1; color: var(--ink) !important; }
.mg-reader .prev { left: 10px; } .mg-reader .next { right: 10px; }
.mg-pthumb em { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 26px; font-style: normal; font-family: var(--serif); font-weight: 700; font-size: 13px; line-height: 1.15; color: var(--cream); text-align: left;
  background: linear-gradient(to top, rgba(27,19,13,.85), rgba(27,19,13,0)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mg-reader .modes { display: flex; border: 1.5px solid var(--ink); border-radius: 20px; overflow: hidden; flex: none; }
.mg-reader .modes button { padding: 6px 12px !important; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.mg-reader .modes button.on { background: var(--ink) !important; color: var(--cream) !important; }
.mg-reader .textpane { display: none; flex: 1; overflow-y: auto; background: var(--cream); }
.mg-reader.text .textpane { display: block; }
.mg-reader.text .stage, .mg-reader.text .zm, .mg-reader.text .hint { display: none; }
.mg-reader .doc { max-width: 720px; margin: 0 auto; padding: 28px 22px 80px; }
.mg-reader .doc .k { color: var(--hide); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.mg-reader .doc h3 { font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.15; margin: 6px 0 18px; }
.mg-reader .doc p { font-family: var(--serif); font-size: 21px; line-height: 1.6; color: var(--ink); margin: 0 0 16px; }
.mg-reader .doc h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .16em; font-weight: 600; color: var(--hide); margin: 26px 0 8px; }
.mg-reader.text .nav { top: auto; bottom: 14px; transform: none; width: 52px; height: 46px; }
.mg-reader.text .doc { padding-bottom: 90px; }
.mg-reader .doc .note { background: var(--cream-2); border-left: 3px solid var(--gold); padding: 10px 14px; font-size: 14px; color: var(--ink-2); margin: 18px 0; }
.mg-reader .doc .src { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--straw-d); padding-top: 12px; margin-top: 24px; }
.mg-reader .mg-3dbtn { padding: 8px 14px; font-size: 11px; flex: none; }
.mg-3d { inset: 0; z-index: 97; display: none; background: var(--cream); flex-direction: column; }
.mg-3d.open { display: flex; }
.mg-3d .top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--straw-d); }
.mg-3d .top > div { flex: 1; min-width: 0; }
.mg-3d .top b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; }
.mg-3d .top small { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.mg-3dstage { position: relative; flex: 1; background: radial-gradient(circle at 50% 40%, #fffaf0, #eadcc2); }
.mg-3dstage model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.mg-3d .mg-ar { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); white-space: nowrap; box-shadow: var(--shadow); }
.mg-3dload { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--gold), var(--hide)); }
.mg-3d .hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(251,246,236,.92); border-radius: 20px; padding: 5px 14px; font-size: 12px; color: var(--ink-2); pointer-events: none; white-space: nowrap; }
.mg-reader .hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(251,246,236,.92); border-radius: 20px; padding: 5px 14px; font-size: 12px; color: var(--ink-2); pointer-events: none; white-space: nowrap; }

/* ---------- house story drawer ---------- */
.mg-drawer { top: 0; right: 0; bottom: 0; z-index: 65; width: min(420px, 100vw); background: var(--cream); box-shadow: -8px 0 30px rgba(40,25,10,.25);
  transform: translateX(105%); transition: transform .35s ease; overflow-y: auto; }
.mg-drawer.open { transform: none; }
.mg-drawer .in { padding: 22px 26px 26px; }
.mg-drawer .hero { height: 170px; background: #ccc center / cover no-repeat; }
.mg-drawer .kick { color: var(--hide); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; }
.mg-drawer h2 { font-family: var(--serif); font-size: 34px; font-weight: 700; margin: 4px 0 12px; }
.mg-drawer p { font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; }
.mg-listen { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; font-weight: 500; }
.mg-drawer .credits { border-top: 1px solid var(--straw-d); margin-top: 18px; padding-top: 12px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.mg-drawer .mg-close { top: 12px; color: var(--cream) !important; text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---------- navigation guide (no dark mask: a gold ring marks the control) ---------- */
.mg-guide { inset: 0; z-index: 90; display: none; pointer-events: none; }
.mg-guide.open { display: block; }
.mg-guide .ring { position: fixed; display: none; border: 3px solid var(--gold); border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(251,246,236,.85), 0 0 22px 6px rgba(168,122,35,.55); animation: mgring 1.6s ease-in-out infinite; transition: all .3s ease; }
@keyframes mgring { 50% { box-shadow: 0 0 0 7px rgba(251,246,236,.6), 0 0 30px 10px rgba(168,122,35,.4); } }
.mg-guide .tip { position: fixed; width: min(360px, calc(100vw - 16px)); background: var(--cream); border-radius: 8px; overflow: hidden;
  box-shadow: 0 16px 44px rgba(40,25,10,.35); pointer-events: auto; transition: left .3s, top .3s; }
.mg-guide .tip.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.mg-guide .in { padding: 14px 18px 14px; text-align: left; }
.mg-guide .ic { width: 64px; height: 64px; margin: 2px auto 6px; }
.mg-guide .ic svg { width: 64px; height: 64px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mg-guide .tip.center .in { text-align: center; }
.mg-guide .step { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--hide); }
.mg-guide h3 { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 2px 0 6px; }
.mg-guide p { font-size: 15px; line-height: 1.45; color: var(--ink-2); margin: 0 0 12px; }
.mg-guide .nav { display: flex; align-items: center; gap: 8px; }
.mg-guide .dots { display: flex; gap: 5px; margin-right: auto; }
.mg-guide .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--straw-d); }
.mg-guide .dots i.on { background: var(--ink); width: 18px; border-radius: 4px; }
.mg-guide .lnk { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink-2) !important; padding: 6px 4px !important; }
.mg-guide .mg-btn { padding: 9px 18px; font-size: 12px; }

/* ---------- house story "now playing" bar ---------- */
.mg-story { left: 50%; top: 84px; transform: translate(-50%, -8px); width: min(560px, calc(100vw - 28px)); z-index: 56;
  background: var(--cream); box-shadow: var(--shadow); border-radius: 6px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; }
.mg-story.open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.mg-story .in { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.mg-story .mg-ic { width: 38px; height: 38px; box-shadow: none; background: var(--straw) !important; }
.mg-story .txt { min-width: 0; flex: 1; }
.mg-story .k { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--hide); }
.mg-story b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-story .lnk { flex: none; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink) !important;
  border: 1.5px solid var(--ink) !important; border-radius: 20px; padding: 5px 10px !important; }
.mg-story #mgStoryAuto[aria-pressed="false"] { color: var(--ink-2) !important; border-color: var(--straw-d) !important; }

/* ---------- guided introduction captions ---------- */
.mg-caption { left: 50%; top: 84px; transform: translate(-50%, -8px); width: min(760px, calc(100vw - 28px)); z-index: 55;
  background: var(--cream); box-shadow: var(--shadow); border-radius: 6px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; }
.mg-caption.open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.mg-caption .in { padding: 12px 16px 10px; }
.mg-caption .txt { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink); min-height: 1.4em; }
.mg-caption .row { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--hide); font-weight: 600; }
.mg-src { color: var(--hide) !important; font-weight: 700 !important; text-decoration: underline; text-underline-offset: 3px; padding: 0 2px !important; }
.mg-caption .stop { margin-left: auto; color: var(--ink) !important; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border: 1.5px solid var(--ink) !important; border-radius: 20px; padding: 5px 12px !important; }

/* ---------- credits dropdown ---------- */
.mg-credits { top: 66px; right: 14px; z-index: 75; width: min(400px, calc(100vw - 28px)); max-height: calc(100vh - 330px); min-height: 200px;
  overflow-y: auto; background: var(--cream); box-shadow: 0 14px 40px rgba(40,25,10,.3); border-radius: 6px;
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.mg-credits.open { opacity: 1; transform: none; pointer-events: auto; }
.mg-credits .in { padding: 12px 18px 12px; }
.mg-credits .hd { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }
.mg-credits details { border-top: 1px solid var(--straw-d); padding: 8px 0; }
.mg-credits summary { cursor: pointer; list-style: none; color: var(--hide); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; display: flex; justify-content: space-between; }
.mg-credits summary::-webkit-details-marker { display: none; }
.mg-credits summary::after { content: "+"; font-size: 16px; line-height: 1; }
.mg-credits details[open] summary::after { content: "\2212"; }
.mg-credits ul, .mg-credits ol { margin: 8px 0 2px; padding-left: 18px; }
.mg-credits ul { list-style: none; padding-left: 0; }
.mg-credits li { font-size: 14px; line-height: 1.5; margin-bottom: 5px; }
.mg-credits ol li { font-size: 13px; color: var(--ink-2); }
.mg-credits li.hl { color: var(--hide); font-weight: 600; }

@media (max-width: 640px) {
  .mg-brand .name { font-size: 16px; }
  .mg-brand .mg-cow { width: 30px; }
  .mg-brand { max-width: calc(100vw - 28px); }
  .mg-controls { top: auto; bottom: 236px; right: 12px; flex-direction: column; }
  .mg-dock.closed ~ .mg-controls { bottom: 70px; }
  .mg-thumb { width: 92px; }
  .mg-thumb .img { height: 54px; }
  .mg-house { flex: 0 0 104px; }
  .mg-house .ph { height: 62px; }
  .mg-house .nm b { font-size: 13.5px; }
  .mg-caption { top: 72px; }
  .mg-story { top: 72px; }
  .mg-reader .top { flex-wrap: wrap; }
  .mg-reader .top b { flex-basis: calc(100% - 56px); order: 0; }
  .mg-reader .modes { order: 2; }
  .mg-reader .zm { order: 3; margin-left: auto; }
  .mg-reader .doc p { font-size: 19px; }
  .mg-story .in { flex-wrap: wrap; gap: 8px; }
  .mg-story .txt { flex-basis: calc(100% - 50px); }
  .mg-caption .txt { font-size: 17px; }
  .mg-credits { top: 72px; max-height: calc(100vh - 340px); }
}
