/* AR museum guide, visitor side (prefix .mg-). Uses app.css tokens only; light and dark. */

/* ---------- Shared ---------- */
.mg-page { padding-bottom: 28px; }
.mg-i { width: 18px; height: 18px; flex: none; }
.mg-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
.mg-kicker .mg-i { width: 14px; height: 14px; }
@media (prefers-color-scheme: dark) { .mg-kicker { color: var(--accent); } }
.mg-back { margin: 6px 0 8px; }
.mg-code { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 10px; background: var(--navy); color: #f7efe3; font: 800 13px/1 var(--font); letter-spacing: -.01em; flex: none; }
@media (prefers-color-scheme: dark) { .mg-code { background: #24424c; } }
.mg-chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: background .15s; }
.mg-chip-btn:hover { background: var(--surface-3); }
.mg-chip-btn .mg-i { width: 15px; height: 15px; }
.mg-chip-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-deep); }
.mg-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.mg-tag .mg-i { width: 13px; height: 13px; }
.mg-tag.is-soft { background: var(--surface-2); color: var(--muted); }
.mg-tag.is-here { background: var(--accent); color: #fff; }
.mg-tag.is-link { background: var(--sea-soft); color: var(--sea); border: 0; cursor: pointer; }
.mg-link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; font-size: 13px; font-weight: 750; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .mg-link-btn { color: var(--accent); } }
.mg-link-btn .mg-i { width: 15px; height: 15px; }
.mg-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 18px 2px 0; color: var(--muted); font-size: 12.5px; }
.mg-privacy .mg-i { width: 16px; height: 16px; margin-top: 1px; }

/* Segmented control (Adulti / Bambini, leaderboard period) */
.mg-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mg-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 750; color: var(--muted); transition: background .15s, color .15s; }
.mg-seg button .mg-i { width: 16px; height: 16px; }
.mg-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.mg-seg.is-wide { display: grid; width: 100%; margin: 4px 0 14px; }
.mg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 6px; }
.mg-lang { position: relative; display: inline-flex; align-items: center; }
.mg-lang .mg-i { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.mg-lang select { min-height: 44px; width: auto; padding-left: 36px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 750; background-color: var(--surface); }

/* ---------- Museums list ---------- */
.mg-museum-grid { display: grid; gap: 14px; }
.mg-museum-card { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s; }
.mg-museum-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mg-museum-cover { position: relative; aspect-ratio: 16 / 8; background: radial-gradient(110% 90% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45, #0f2831); display: grid; place-items: center; overflow: hidden; }
.mg-museum-cover img { width: 100%; height: 100%; object-fit: cover; }
.mg-museum-cover .mg-hero-art { width: 62%; height: auto; }
.mg-museum-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); color: var(--navy); font-size: 12px; font-weight: 800; }
.mg-museum-badge .mg-i { width: 15px; height: 15px; }
.mg-museum-copy { display: grid; gap: 6px; padding: 16px 18px 18px; }
.mg-museum-copy strong { font: 650 24px/1.12 var(--display); letter-spacing: -.015em; }
.mg-museum-copy small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.mg-museum-copy small .mg-i { width: 15px; height: 15px; }
.mg-museum-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mg-museum-stats span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--sea-soft); color: var(--sea); font-size: 12px; font-weight: 800; }
.mg-museum-stats span.is-kids { background: var(--warn-soft); color: var(--warn); }
.mg-museum-stats .mg-i { width: 14px; height: 14px; }
.mg-museum-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 800; font-size: 14px; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .mg-museum-cta { color: var(--accent); } }

/* ---------- Museum home ---------- */
.mg-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); padding: 22px 20px 20px; color: #f3efe8; background: radial-gradient(120% 90% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45 0%, #0f2831 100%); box-shadow: var(--shadow-2); }
.mg-hero .mg-kicker { color: var(--gold); }
.mg-hero h1 { font: 650 clamp(28px, 7.6vw, 40px)/1.05 var(--display); letter-spacing: -.02em; margin: 8px 0 8px; max-width: 16ch; }
.mg-hero-address { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; color: rgba(243,239,232,.8); font-size: 13.5px; font-weight: 600; max-width: 34ch; }
.mg-hero-address .mg-i { width: 16px; height: 16px; }
.mg-hero-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-hero-stats span { height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.88); }
.mg-hero-stats b { color: #fff; font-weight: 800; }
.mg-hero-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--gold); font-weight: 750; font-size: 13px; text-decoration: none; }
.mg-hero-link .mg-i { width: 15px; height: 15px; }
.mg-hero-visual { display: none; position: absolute; z-index: -1; pointer-events: none; }
.mg-hero-art { display: block; width: 100%; height: auto; }
.mg-disclaimer { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--r-md); background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-size: 12.5px; font-weight: 650; line-height: 1.45; }
.mg-disclaimer .mg-i { width: 16px; height: 16px; margin-top: 1px; }
.mg-cta-row { display: grid; gap: 10px; margin: 14px 0 18px; }
.mg-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px 12px 12px; border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--shadow-2); transition: transform .12s var(--ease); }
.mg-cta:active { transform: scale(.98); }
.mg-cta strong { display: block; font-size: 17px; letter-spacing: -.01em; }
.mg-cta small { display: block; font-size: 13px; font-weight: 600; opacity: .8; margin-top: 2px; }
.mg-cta-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.mg-cta-icon .mg-i { width: 26px; height: 26px; }
.mg-cta.is-ar { background: linear-gradient(135deg, var(--accent) 0%, #b94a2a 100%); color: #fff; }
.mg-cta.is-ar .mg-cta-icon { background: rgba(255,255,255,.18); }
.mg-cta.is-kids { background: linear-gradient(135deg, #ffe39a 0%, #f6c35a 100%); color: #3b2a07; }
.mg-cta.is-kids .mg-cta-icon { background: rgba(255,255,255,.55); }
.mg-cta.is-kids .mg-treasure-art { width: 40px; height: 40px; }

/* ---------- Plan ---------- */
.mg-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.mg-plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-1); padding: 12px; }
.mg-floor-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px; }
.mg-floor-tabs::-webkit-scrollbar { display: none; }
.mg-floor-tab { position: relative; flex: none; height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-weight: 750; font-size: 13px; }
.mg-floor-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.mg-floor-here { position: absolute; top: 3px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.mg-plan-wrap { position: relative; }
.mg-plan-north { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; pointer-events: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,.15)); }
.mg-plan-north svg { width: 100%; height: 100%; }
.mg-plan-north circle { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.mg-plan-north path { fill: var(--accent); }
.mg-plan-north text { font: 800 5.5px/1 var(--font); fill: #fff; }
.mg-plan-frame { position: relative; border-radius: var(--r-md); background: var(--bg); overflow: hidden; }
.mg-plan-frame.is-wide { overflow-x: auto; overscroll-behavior-x: contain; }
.mg-plan-frame.is-wide .mg-plan-svg { min-width: 900px; }
.mg-plan-svg { display: block; width: 100%; height: auto; max-height: 68vh; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.mg-plan-svg.is-tap-mode { cursor: crosshair; }
.mg-plan-svg.is-tap-mode .mg-room { cursor: crosshair; }
.mg-plan-floor { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mg-plan-gridline { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mg-room { cursor: pointer; outline: none; }
.mg-room-rect { fill: var(--surface); stroke: color-mix(in srgb, var(--ink) 30%, transparent); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: fill .2s; }
.mg-room:hover .mg-room-rect, .mg-room:focus-visible .mg-room-rect { fill: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.mg-room:focus-visible .mg-room-rect { stroke: var(--accent); stroke-width: 3; }
.mg-room.is-visited .mg-room-rect { fill: color-mix(in srgb, var(--sea-soft) 85%, var(--surface)); }
.mg-room.is-current .mg-room-rect { fill: color-mix(in srgb, var(--accent) 22%, var(--surface)); stroke: var(--accent); stroke-width: 2; }
.mg-room.is-highlight .mg-room-rect { stroke: var(--accent); stroke-width: 3; fill: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.mg-room-badge { fill: var(--navy); }
.mg-room.is-current .mg-room-badge, .mg-room.is-highlight .mg-room-badge { fill: var(--accent); }
.mg-room-code { fill: #fff; font-family: var(--font); font-weight: 800; pointer-events: none; }
.mg-item-dot { fill: color-mix(in srgb, var(--ink) 38%, transparent); }
.mg-item-dot.is-visited { fill: var(--sea); }
.mg-lift rect { fill: var(--surface); stroke: var(--ink-2); stroke-width: .28; }
.mg-lift path { fill: none; stroke: var(--ink-2); stroke-width: .28; stroke-linecap: round; stroke-linejoin: round; }
.mg-entrance circle { fill: var(--ok); }
.mg-entrance path { fill: none; stroke: #fff; stroke-width: .34; stroke-linecap: round; stroke-linejoin: round; }
.mg-me-halo { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; transition: r .3s; }
.mg-me-dot { fill: var(--accent); stroke: #fff; stroke-width: .35; }
.mg-me-pulse { fill: var(--accent); opacity: .35; transform-box: fill-box; transform-origin: center; animation: mg-pulse 1.8s ease-out infinite; }
.mg-me-cone { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.mg-me { transition: transform .35s var(--ease); }
@keyframes mg-pulse { from { transform: scale(.8); opacity: .5; } to { transform: scale(2.6); opacity: 0; } }
.mg-plan-label { min-height: 52px; margin-top: 10px; }
.mg-plan-hint { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 4px; color: var(--muted); font-size: 13px; font-weight: 650; }
.mg-plan-hint .mg-i { width: 16px; height: 16px; }
.mg-plan-hint.is-tap { color: var(--accent-deep); background: var(--accent-soft); border-radius: var(--r-sm); padding: 8px 12px; }
.mg-plan-hint .text-button { margin-left: auto; padding: 0; font-size: 13px; }
.mg-room-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.mg-room-pop-copy { flex: 1; min-width: 150px; }
.mg-room-pop-copy strong { display: block; font-size: 14.5px; line-height: 1.25; }
.mg-room-pop-copy small { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.mg-room-pop-actions { display: flex; gap: 6px; }
.mg-room-pop-actions .mg-chip-btn { background: var(--surface); }
.mg-plan-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 4px 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.mg-plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mg-plan-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.mg-plan-legend i.is-me { border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.mg-plan-legend i.is-visited { background: color-mix(in srgb, var(--sea-soft) 85%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }
.mg-plan-legend i.is-entrance { border-radius: 50%; background: var(--ok); }
.mg-plan-legend i.is-lift { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-2); }

/* Positioning panel */
.mg-locate { margin-top: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.mg-locate-head { display: flex; gap: 12px; align-items: flex-start; }
.mg-locate-head h3 { font-size: 16px; margin: 1px 0 4px; }
.mg-locate-head h3 small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 2px; }
@media (prefers-color-scheme: dark) { .mg-locate-head h3 small { color: var(--accent); } }
.mg-locate-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.mg-locate-icon { position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--accent-deep); flex: none; box-shadow: var(--shadow-1); }
.mg-locate-icon.is-running::after { content: ""; position: absolute; inset: -3px; border-radius: 16px; border: 2px solid var(--accent); opacity: .5; animation: mg-ring 1.8s ease-out infinite; }
@keyframes mg-ring { from { transform: scale(.92); opacity: .6; } to { transform: scale(1.18); opacity: 0; } }
.mg-locate-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 !important; }
.mg-locate-meta span + span::before { content: "·"; margin-right: 10px; color: var(--line-strong); }
.mg-locate-note { display: flex; gap: 8px; margin: 10px 0 0; padding: 9px 11px; border-radius: var(--r-sm); background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 70%, var(--ink)); font-size: 12.5px; font-weight: 650; }
.mg-locate-note .mg-i { width: 16px; height: 16px; }
.mg-locate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mg-locate-actions .button.ghost { background: var(--surface); }
.mg-locate-actions.is-compact { gap: 6px; }
.mg-locate-actions.is-compact .mg-chip-btn { background: var(--surface); box-shadow: var(--shadow-1); }
.mg-locate-source { margin: 2px 0 0 !important; font-size: 12px !important; }
.mg-switches { display: grid; gap: 2px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.mg-switch { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; }
.mg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mg-switch-ui { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong); flex: none; transition: background .2s; }
.mg-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.mg-switch input:checked + .mg-switch-ui { background: var(--accent); }
.mg-switch input:checked + .mg-switch-ui::after { transform: translateX(18px); }
.mg-switch input:focus-visible + .mg-switch-ui { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.mg-switch strong { display: block; font-size: 14px; }
.mg-switch small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.mg-switch.is-off { opacity: .55; cursor: not-allowed; }
.mg-step { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.mg-step summary { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13.5px; font-weight: 750; color: var(--ink-2); }
.mg-step summary output { margin-left: auto; font-weight: 800; color: var(--ink); }
.mg-step input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 0; padding: 0; border: 0; background: none; }

/* Room list */
.mg-rooms-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; margin: 4px 2px 12px; }
.mg-rooms-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.mg-room-card { scroll-margin-top: calc(var(--header-h) + 16px); margin-bottom: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: box-shadow .3s; }
.mg-room-card.is-current { box-shadow: 0 0 0 2px var(--accent), var(--shadow-1); }
.mg-room-card.is-flash { animation: mg-flash 1.6s var(--ease); }
@keyframes mg-flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: var(--shadow-1); } }
.mg-room-card-head { display: flex; gap: 12px; align-items: flex-start; }
.mg-room-card-head .mg-code { margin-top: 1px; }
.mg-room-title { flex: 1; min-width: 0; }
.mg-room-title h3 { font-size: 16.5px; line-height: 1.25; }
.mg-room-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.mg-room-sum { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mg-room-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mg-item-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 10px; overflow-x: auto; margin: 12px -14px -2px; padding: 2px 14px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.mg-item-row::-webkit-scrollbar { display: none; }
.mg-item-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); text-decoration: none; scroll-snap-align: start; transition: transform .12s var(--ease); }
.mg-item-card:active { transform: scale(.97); }
.mg-cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.mg-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-cover.is-fallback { display: grid; place-items: center; color: rgba(255,255,255,.85); background: radial-gradient(90% 80% at 85% 10%, hsl(var(--hue) 45% 62%) 0%, transparent 60%), linear-gradient(155deg, hsl(var(--hue) 42% 42%) 0%, hsl(var(--hue) 50% 24%) 100%); }
.mg-cover.is-fallback svg { width: 38%; height: auto; opacity: .9; }
.mg-cover-code { position: absolute; right: 8px; bottom: 2px; font: italic 600 34px/1 var(--display); color: rgba(255,255,255,.28); }
.mg-cover.is-mini { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 12px; flex: none; }
.mg-cover.is-mini .mg-cover-code { display: none; }
.mg-seen { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.mg-seen .mg-i { width: 14px; height: 14px; stroke-width: 2.6; }
.mg-item-treasure { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mg-item-treasure .mg-treasure-art { width: 26px; height: 26px; }
.mg-item-treasure:not(.is-found) { animation: mg-bob 2.4s ease-in-out infinite; }
.mg-item-copy { display: grid; gap: 2px; padding: 9px 10px 11px; }
.mg-item-copy strong { font-size: 13.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-item-copy small { color: var(--muted); font-size: 11.5px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Item page ---------- */
.mg-item-figure { position: relative; margin: 6px 0 0; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-2); }
.mg-item-figure > img, .mg-item-figure > .mg-cover { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mg-item-figure .mg-cover-code { font-size: 64px; right: 16px; }
.mg-item-figure figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); padding: 5px 12px 5px 5px; border-radius: var(--r-pill); background: rgba(10, 22, 27, .6); color: #fff; font-size: 12.5px; font-weight: 750; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mg-item-figure figcaption .mg-code { min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent); font-size: 12px; }
.mg-item-head { padding: 18px 0 2px; }
.mg-item-head h1 { font: 650 clamp(28px, 7.5vw, 40px)/1.06 var(--display); letter-spacing: -.02em; margin: 6px 0 6px; }
.mg-item-sub { color: var(--muted); font-size: 15px; font-weight: 650; margin: 0; }
.mg-item-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mg-item-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.mg-action-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px; padding: 10px 6px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); font-size: 12.5px; font-weight: 750; text-decoration: none; text-align: center; }
.mg-action-tile .mg-i { width: 22px; height: 22px; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .mg-action-tile .mg-i { color: var(--accent); } }
.mg-action-tile[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; }
.mg-item-text { font-size: 16px; line-height: 1.68; color: var(--ink-2); }
.mg-item-text p { margin: 0 0 1em; }
.mg-item-text.is-kids { font-size: 18px; line-height: 1.6; color: var(--ink); }
.mg-look { display: flex; gap: 12px; margin: 6px 0 18px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--sea-soft); color: var(--ink); }
.mg-look p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; }
.mg-look .mg-kicker { color: var(--sea); }
.mg-look-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--sea); flex: none; }
.mg-facts, .mg-sources { margin: 8px 0 18px; }
.mg-facts h2, .mg-sources h2 { font: 650 20px/1.2 var(--display); margin-bottom: 10px; }
.mg-facts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mg-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.mg-facts li .mg-i { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; }
.mg-sources ol { margin: 0; padding-left: 1.3em; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 6px; }
.mg-sources a { color: var(--sea); font-weight: 700; text-decoration: none; }
.mg-item-treasure-card { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(135deg, #fff1c4 0%, #ffe08a 100%); color: #3b2a07; box-shadow: var(--shadow-1); }
.mg-item-treasure-card h3 { font: 650 20px/1.15 var(--display); margin: 4px 0 4px; }
.mg-item-treasure-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.mg-item-treasure-card .mg-kicker { color: #8a5a00; }
.mg-item-treasure-art { width: 64px; height: 64px; flex: none; border-radius: 20px; background: rgba(255,255,255,.6); display: grid; place-items: center; }
.mg-item-treasure-art .mg-treasure-art { width: 48px; height: 48px; }
.mg-item-treasure-card:not(.is-found) .mg-item-treasure-art { animation: mg-bob 2.4s ease-in-out infinite; }
.mg-kids-btn { background: #3b2a07; color: #fff4d6; box-shadow: none; }

/* ---------- AR camera ---------- */
body[data-page="guide-ar"] .app-header, body[data-page="guide-ar"] .app-bottom-nav, body[data-page="guide-ar"] .app-footer { display: none; }
body[data-page="guide-ar"] main { animation: none; }
body[data-page="guide-ar"] .workspace { padding: 0; }
.mg-ar { --finder: min(78vw, 56vh, 420px); position: fixed; inset: 0; z-index: 60; overflow: hidden; background: #05090b; color: #fff; }
.mg-ar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.mg-ar.is-live .mg-ar-video { opacity: 1; }
.mg-ar-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent calc(var(--finder) * .62), rgba(0,0,0,.42) calc(var(--finder) * .95)), linear-gradient(to bottom, rgba(0,0,0,.55) 0, transparent 22%, transparent 62%, rgba(0,0,0,.6) 100%); }
.mg-ar-finder { position: absolute; left: 50%; top: 50%; width: var(--finder); height: var(--finder); transform: translate(-50%, -50%); pointer-events: none; transition: width .3s, height .3s; }
.mg-ar-finder i { position: absolute; width: 38px; height: 38px; border: 4px solid rgba(255,255,255,.95); filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); transition: border-color .25s, transform .25s var(--ease); }
.mg-ar-finder .c1 { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.mg-ar-finder .c2 { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.mg-ar-finder .c3 { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.mg-ar-finder .c4 { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }
.mg-ar-scanline { position: absolute; left: 8%; right: 8%; top: 10%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); box-shadow: 0 0 12px rgba(255,255,255,.6); animation: mg-scan 2.6s ease-in-out infinite; opacity: 0; }
.mg-ar.is-live .mg-ar-scanline { opacity: 1; }
@keyframes mg-scan { 0%, 100% { top: 10%; } 50% { top: 88%; } }
.mg-ar-finder.is-locking i { border-color: var(--gold); }
.mg-ar-finder.is-locking .c1 { transform: translate(6px, 6px); } .mg-ar-finder.is-locking .c2 { transform: translate(-6px, 6px); }
.mg-ar-finder.is-locking .c3 { transform: translate(6px, -6px); } .mg-ar-finder.is-locking .c4 { transform: translate(-6px, -6px); }
.mg-ar-finder.is-found i { border-color: var(--accent); }
.mg-ar-finder.is-found .mg-ar-scanline { opacity: 0; }
.mg-ar-target { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 0 14px color-mix(in srgb, var(--accent) 20%, transparent); opacity: 0; transform: scale(.4); transition: .3s var(--ease); }
.mg-ar-finder.is-found .mg-ar-target { opacity: 1; transform: none; }
.mg-ar-leader { position: absolute; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(to bottom, #fff, rgba(255,255,255,.35)); pointer-events: none; }
.mg-ar-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-top)) 14px 10px; }
.mg-ar-round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; text-decoration: none; background: rgba(10, 20, 24, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.18); }
.mg-ar-round .mg-i { width: 22px; height: 22px; }
.mg-ar-where { flex: 1; min-width: 0; display: grid; line-height: 1.2; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.mg-ar-where strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-ar-where small { font-size: 12.5px; font-weight: 650; color: rgba(255,255,255,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-ar-mode { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: rgba(10, 20, 24, .45); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; font-weight: 750; font-size: 13px; }
.mg-ar-mode .mg-i { width: 16px; height: 16px; }
.mg-ar[data-mode="kids"] .mg-ar-mode { background: #ffcf3f; color: #3b2a07; border-color: transparent; }
.mg-ar-kids-banner { position: absolute; left: 14px; right: 14px; top: calc(72px + var(--safe-top)); display: flex; justify-content: center; }
.mg-ar-kids-banner a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-pill); background: #ffcf3f; color: #3b2a07; font-weight: 800; font-size: 13px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.mg-ar-kids-banner .mg-i { width: 16px; height: 16px; }
.mg-ar-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(14px + var(--safe-bottom)); display: grid; gap: 10px; justify-items: center; }
.mg-ar-status { margin: 0; max-width: min(520px, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(10, 20, 24, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13.5px; font-weight: 700; text-align: center; }
.mg-ar-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mg-ar-tool { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border-radius: var(--r-pill); color: #fff; text-decoration: none; font-weight: 750; font-size: 13.5px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.mg-ar-tool .mg-i { width: 18px; height: 18px; }
.mg-ar-card-slot { position: absolute; left: 12px; right: 12px; bottom: calc(118px + var(--safe-bottom)); display: flex; justify-content: center; pointer-events: none; }
.mg-ar-card { pointer-events: auto; position: relative; width: 100%; max-width: 440px; padding: 16px 16px 14px; border-radius: 24px; color: #fff; background: linear-gradient(160deg, rgba(22, 44, 52, .72), rgba(10, 22, 27, .78)); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); animation: mg-card-in .42s var(--ease); }
@keyframes mg-card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.mg-ar-card::before { content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 60%, transparent); }
.mg-ar-card-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; }
.mg-ar-card-close .mg-i { width: 16px; height: 16px; }
.mg-ar-card-kicker { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding-right: 40px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.mg-ar-method { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--accent); color: #fff; }
.mg-ar-method .mg-i { width: 13px; height: 13px; }
.mg-ar-card h2 { font: 650 24px/1.12 var(--display); letter-spacing: -.015em; margin: 8px 0 2px; }
.mg-ar-card-sub { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 650; }
.mg-ar-card-teaser { margin: 8px 0 12px; font-size: 14.5px; line-height: 1.45; color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-ar-card-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mg-ar-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; padding: 8px 4px; border-radius: 16px; background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-weight: 750; text-decoration: none; text-align: center; transition: background .15s; }
.mg-ar-btn:hover { background: rgba(255,255,255,.2); }
.mg-ar-btn .mg-i { width: 20px; height: 20px; }
.mg-ar-btn.is-primary { background: #fff; color: var(--navy); }
.mg-ar-btn.is-primary[aria-pressed="true"] { background: var(--accent); color: #fff; }
.mg-ar[data-mode="kids"] .mg-ar-card { background: linear-gradient(160deg, rgba(58, 42, 110, .78), rgba(24, 40, 80, .82)); border-color: rgba(255, 207, 63, .55); }
.mg-ar[data-mode="kids"] .mg-ar-card h2 { font-family: var(--font); font-weight: 800; font-size: 23px; }
.mg-ar[data-mode="kids"] .mg-ar-card-teaser { font-size: 15.5px; -webkit-line-clamp: 3; }
.mg-ar[data-mode="kids"] .mg-ar-method { background: #ffcf3f; color: #3b2a07; }
.mg-ar-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(5, 9, 11, .35); }
.mg-ar-glass { width: min(360px, 100%); display: grid; justify-items: center; gap: 8px; padding: 22px 20px; border-radius: 24px; text-align: center; background: rgba(12, 26, 31, .72); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.mg-ar-glass strong { font-size: 16px; }
.mg-ar-glass p { margin: 0; color: rgba(255,255,255,.78); font-size: 13.5px; line-height: 1.45; }
.mg-ar-glass small { color: rgba(255,255,255,.6); font-weight: 700; font-variant-numeric: tabular-nums; }
.mg-ar-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold); animation: spin .9s linear infinite; }
.mg-ar-bar { position: relative; width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 4px; }
.mg-ar-bar span { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--accent)); animation: mg-indeterminate 1.4s ease-in-out infinite; }
@keyframes mg-indeterminate { from { left: -40%; } to { left: 100%; } }
.mg-ar-fallback { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(120% 70% at 100% 0%, #2a6f78 0%, transparent 60%), linear-gradient(160deg, #173a45, #0b1d23); padding: calc(76px + var(--safe-top)) 18px calc(24px + var(--safe-bottom)); }
.mg-ar-fallback-inner { max-width: 560px; margin: 0 auto; }
.mg-fb-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.12); margin-bottom: 14px; }
.mg-fb-icon .mg-i { width: 30px; height: 30px; }
.mg-ar-fallback h2 { font: 650 28px/1.1 var(--display); margin-bottom: 8px; }
.mg-ar-fallback p { color: rgba(255,255,255,.8); font-size: 15px; }
.mg-ar-fallback .button.secondary { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.mg-ar-fallback h3 { margin: 24px 0 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.mg-fb-list { display: grid; gap: 6px; }
.mg-fb-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.mg-fb-item:hover { background: rgba(255,255,255,.14); }
.mg-fb-item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.mg-fb-item strong { font-size: 14px; }
.mg-fb-item small { color: rgba(255,255,255,.65); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-fb-item .mg-code { background: rgba(255,255,255,.14); }
.mg-ar.has-fallback .mg-ar-bottom, .mg-ar.has-fallback .mg-ar-finder, .mg-ar.has-fallback .mg-ar-shade, .mg-ar.has-fallback .mg-ar-card-slot { display: none; }
@media (min-width: 960px) {
  .mg-ar-card-slot { bottom: calc(126px + var(--safe-bottom)); }
  .mg-ar-card { max-width: 460px; }
}

/* ---------- Treasures ---------- */
.mg-treasure-art { display: block; width: 100%; height: 100%; overflow: visible; }
.mg-treasure-art.is-locked { filter: grayscale(1) brightness(.35) contrast(.8); opacity: .45; }
.mg-ar-treasure-layer { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; z-index: 2; }
.mg-treasure { pointer-events: auto; position: relative; display: grid; place-items: center; width: 132px; height: 150px; border: 0; background: none; cursor: pointer; animation: mg-pop .6s cubic-bezier(.2, 1.6, .4, 1); -webkit-tap-highlight-color: transparent; }
.mg-treasure.is-small { width: 76px; height: 76px; animation: none; }
.mg-treasure-glow { position: absolute; left: 50%; top: 46%; width: 118px; height: 118px; margin: -59px 0 0 -59px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 233, 150, .95) 0%, rgba(255, 207, 63, .45) 45%, transparent 70%); animation: mg-glow 1.6s ease-in-out infinite; }
.mg-treasure.is-small .mg-treasure-glow { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.mg-treasure-bob { position: relative; width: 92px; height: 92px; margin-top: -14px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); animation: mg-bob 2.2s ease-in-out infinite; }
.mg-treasure.is-small .mg-treasure-bob { width: 52px; height: 52px; margin: 0; }
.mg-treasure-label { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: var(--r-pill); background: #ffcf3f; color: #3b2a07; font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.3); animation: mg-wiggle 1.8s ease-in-out infinite; }
.mg-spark { position: absolute; width: 16px; height: 16px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: mg-twinkle 1.6s ease-in-out infinite; }
.mg-spark.s1 { top: 8px; left: 16px; } .mg-spark.s2 { top: 20px; right: 10px; width: 12px; height: 12px; animation-delay: .4s; }
.mg-spark.s3 { bottom: 40px; left: 6px; width: 10px; height: 10px; animation-delay: .8s; } .mg-spark.s4 { bottom: 34px; right: 18px; animation-delay: 1.1s; background: #ffe39a; }
.mg-treasure.is-catching .mg-treasure-bob { animation: mg-catch .6s var(--ease) forwards; }
.mg-treasure.is-catching .mg-treasure-label { opacity: 0; }
@keyframes mg-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes mg-glow { 0%, 100% { transform: scale(.9); opacity: .75; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes mg-twinkle { 0%, 100% { transform: scale(.3) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes mg-wiggle { 0%, 100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-4deg); } 75% { transform: translateX(-50%) rotate(4deg); } }
@keyframes mg-pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mg-catch { to { transform: scale(1.6) translateY(-20px); opacity: 0; } }

.mg-celebrate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(8, 14, 30, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s; overflow: hidden; }
.mg-confetti { position: absolute; inset: 0; pointer-events: none; }
.mg-confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 16px; border-radius: 2px; background: var(--c); transform: rotate(var(--r)) scale(var(--s)); animation: mg-fall 2.6s cubic-bezier(.25, .6, .4, 1) var(--d) forwards; }
.mg-confetti i:nth-child(3n) { border-radius: 50%; width: 11px; height: 11px; }
@keyframes mg-fall { 0% { transform: translateY(0) rotate(var(--r)) scale(var(--s)); opacity: 1; } 100% { transform: translateY(105vh) rotate(calc(var(--r) + 540deg)) scale(var(--s)); opacity: .9; } }
.mg-cel-card { position: relative; width: min(400px, 100%); padding: 22px 20px 18px; border-radius: 28px; text-align: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); animation: mg-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
.mg-cel-art { width: 116px; height: 116px; margin: -78px auto 6px; padding: 12px; border-radius: 50%; background: radial-gradient(circle, #fff6cf 0%, #ffd66b 100%); box-shadow: 0 10px 30px rgba(255, 180, 40, .45), 0 0 0 6px var(--surface); animation: mg-bob 2.2s ease-in-out infinite; }
.mg-cel-card h2 { font: 800 26px/1.1 var(--font); letter-spacing: -.02em; margin: 6px 0 6px; }
.mg-cel-points { display: inline-block; margin: 2px 0 8px; padding: 6px 14px; border-radius: var(--r-pill); background: #ffcf3f; color: #3b2a07; font-weight: 800; font-size: 17px; }
.mg-cel-text { color: var(--ink-2); font-size: 15px; line-height: 1.55; text-align: left; max-height: 36vh; overflow-y: auto; }
.mg-cel-total { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.mg-cel-total .mg-avatar { width: 28px; height: 28px; }
.mg-cel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-treasure-sheet { display: grid; justify-items: center; margin: 4px 0 6px; }
.mg-treasure-sheet .mg-treasure-art { width: 110px; height: 110px; }

/* ---------- Kids hunt ---------- */
body[data-page="guide-kids"] main { max-width: 820px; }
.mg-kids-intro { padding: 10px 0 14px; }
.mg-kids-intro h1 { font: 800 clamp(28px, 7.4vw, 38px)/1.08 var(--font); letter-spacing: -.025em; margin: 6px 0 6px; }
.mg-kids-intro p { color: var(--muted); margin: 0; font-size: 15px; }
.mg-explorers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mg-explorer { position: relative; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.mg-explorer-main { width: 100%; display: grid; justify-items: center; gap: 6px; padding: 18px 10px 14px; border-radius: inherit; }
.mg-explorer-main strong { font-size: 16px; }
.mg-explorer-main small { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-deep); font-weight: 800; font-size: 12.5px; }
.mg-explorer-main small .mg-i { width: 14px; height: 14px; }
.mg-explorer-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.mg-explorer-tools button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.mg-explorer-tools button:hover { background: var(--surface-2); color: var(--ink); }
.mg-explorer-tools .mg-i { width: 16px; height: 16px; }
.mg-explorer-new { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 150px; padding: 16px; border: 2px dashed var(--line-strong); background: transparent; box-shadow: none; color: var(--ink-2); }
.mg-explorer-plus { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.mg-explorer-plus .mg-i { width: 26px; height: 26px; }
.mg-avatar { display: block; width: 44px; height: 44px; flex: none; border-radius: 50%; }
.mg-avatar.is-big { width: 76px; height: 76px; }
.mg-explorer-form { padding: 18px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.mg-explorer-form .field input { font-size: 17px; font-weight: 700; }
.mg-avatar-pick { margin: 14px 0 6px; }
.mg-avatar-pick legend { font-size: 13px; color: var(--ink-2); }
.mg-avatar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mg-avatar-opt { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 2px 6px; border-radius: var(--r-md); cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.mg-avatar-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mg-avatar-opt .mg-avatar { width: 100%; max-width: 60px; height: auto; aspect-ratio: 1; transition: transform .2s var(--ease); }
.mg-avatar-opt span { font-size: 11px; font-weight: 750; color: var(--muted); text-align: center; line-height: 1.15; }
.mg-avatar-opt:has(input:checked) { background: var(--accent-soft); }
.mg-avatar-opt:has(input:checked) .mg-avatar { transform: scale(1.08); box-shadow: 0 0 0 3px var(--accent); }
.mg-avatar-opt:has(input:checked) span { color: var(--accent-deep); }
.mg-avatar-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.mg-kids-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.mg-kids-privacy .mg-i { width: 16px; height: 16px; margin-top: 1px; }
.mg-kids-hero { position: relative; overflow: hidden; isolation: isolate; margin-top: 6px; padding: 18px; border-radius: var(--r-xl); color: #fff; background: radial-gradient(120% 100% at 100% 0%, #6d5bd0 0%, transparent 60%), linear-gradient(150deg, #2c3f9e 0%, #1a2463 100%); box-shadow: var(--shadow-2); }
.mg-kids-hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 63, .35), transparent 70%); z-index: -1; }
.mg-kids-hero .mg-kicker { color: #ffcf3f; }
.mg-kids-who { display: flex; align-items: center; gap: 14px; }
.mg-kids-who .mg-avatar { box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.mg-kids-who h1 { font: 800 clamp(24px, 6.6vw, 32px)/1.1 var(--font); letter-spacing: -.02em; margin: 4px 0 2px; }
.mg-kids-who .mg-link-btn { color: rgba(255,255,255,.8); }
.mg-kids-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.mg-kids-stats div { display: grid; justify-items: center; padding: 10px 4px; border-radius: 16px; background: rgba(255,255,255,.12); }
.mg-kids-stats strong { font-size: 24px; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.mg-kids-stats strong span { font-size: 15px; opacity: .7; }
.mg-kids-stats small { margin-top: 4px; font-size: 11.5px; font-weight: 750; color: rgba(255,255,255,.75); }
.mg-progress { height: 12px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; }
.mg-progress span { display: block; height: 100%; min-width: 12px; border-radius: 6px; background: linear-gradient(90deg, #ffcf3f, #ff9f45); transition: width .6s var(--ease); }
.mg-kids-camera { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; margin: 14px 0 10px; padding: 14px 16px 14px 14px; border-radius: var(--r-xl); text-align: left; background: linear-gradient(135deg, #ffe08a 0%, #ffb547 100%); color: #3b2a07; box-shadow: 0 10px 24px rgba(255, 170, 40, .35); transition: transform .12s var(--ease); }
.mg-kids-camera:active { transform: scale(.98); }
.mg-kids-camera strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.mg-kids-camera small { display: block; font-size: 13px; font-weight: 650; opacity: .8; }
.mg-kids-camera-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: #3b2a07; color: #ffe08a; }
.mg-kids-camera-icon .mg-i { width: 28px; height: 28px; }
.mg-kids-nearby:empty { display: none; }
.mg-nearby-card { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 12px 12px 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid #ffcf3f; box-shadow: var(--shadow-2); }
.mg-nearby-card > div { flex: 1; display: grid; gap: 2px; }
.mg-nearby-card small { color: var(--muted); font-size: 13px; }
.mg-tabs { position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 5; display: flex; gap: 4px; padding: 6px 0; margin: 4px 0 10px; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.mg-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: var(--r-pill); color: var(--muted); font-weight: 750; font-size: 13.5px; text-decoration: none; white-space: nowrap; background: var(--surface-2); }
.mg-tabs a .mg-i { width: 17px; height: 17px; }
.mg-tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.mg-clue-floor h2 { display: flex; align-items: baseline; justify-content: space-between; font: 650 20px/1.2 var(--display); margin: 18px 2px 10px; }
.mg-clue-floor h2 small { font: 800 13px/1 var(--font); color: var(--muted); }
.mg-clues { display: grid; gap: 10px; }
.mg-clue { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.mg-clue.is-found { background: linear-gradient(135deg, color-mix(in srgb, #ffe08a 35%, var(--surface)), var(--surface) 60%); border-color: color-mix(in srgb, #ffcf3f 50%, transparent); }
.mg-clue-icon { position: relative; width: 60px; height: 60px; padding: 6px; flex: none; border-radius: 18px; background: var(--surface-2); }
.mg-clue.is-found .mg-clue-icon { background: #fff6d6; }
.mg-clue-q { position: absolute; inset: 0; display: grid; place-items: center; font: 800 28px/1 var(--font); color: var(--ink-2); }
.mg-clue-ok { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; box-shadow: 0 0 0 3px var(--surface); }
.mg-clue-ok .mg-i { width: 14px; height: 14px; stroke-width: 2.6; }
.mg-clue-body { flex: 1; min-width: 0; }
.mg-clue-body h3 { font-size: 16px; margin: 4px 0 4px; }
.mg-clue-body p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.mg-clue-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mg-diff { height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; background: var(--ok-soft); color: var(--ok); }
.mg-diff.is-media, .mg-diff.is-medio { background: var(--warn-soft); color: var(--warn); }
.mg-diff.is-difficile { background: var(--danger-soft); color: var(--danger); }
.mg-pts { font-size: 12px; font-weight: 800; color: var(--muted); }
.mg-chest-head { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: linear-gradient(135deg, #fff1c4 0%, #ffe08a 100%); color: #3b2a07; margin-bottom: 12px; }
.mg-chest-head .mg-treasure-art { width: 48px; height: 48px; }
.mg-chest-head strong { display: block; font-size: 17px; }
.mg-chest-head small { font-weight: 700; opacity: .75; }
.mg-chest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mg-chest-item { display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-align: center; transition: transform .15s var(--ease); }
.mg-chest-item:hover { transform: translateY(-2px); }
.mg-chest-item .mg-treasure-art { width: 58px; height: 58px; }
.mg-chest-item strong { font-size: 12.5px; line-height: 1.2; }
.mg-chest-item small { font-weight: 800; color: var(--warn); font-size: 12px; }
.mg-chest-empty-art { display: block; width: 90px; height: 90px; margin: 0 auto 10px; opacity: .9; }
.mg-lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mg-lb-row { display: grid; grid-template-columns: 36px 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.mg-lb-row .mg-avatar { width: 40px; height: 40px; }
.mg-lb-rank { font: 800 16px/1 var(--font); text-align: center; color: var(--muted); }
.mg-lb-row.is-top .mg-lb-rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #3b2a07; font-size: 14px; }
.mg-lb-row.is-top1 .mg-lb-rank { background: #ffcf3f; }
.mg-lb-row.is-top2 .mg-lb-rank { background: #d6dde3; }
.mg-lb-row.is-top3 .mg-lb-rank { background: #e9b184; }
.mg-lb-name { font-weight: 750; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-lb-name small { margin-left: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 2px; }
.mg-lb-pts { display: grid; justify-items: end; line-height: 1.1; }
.mg-lb-pts b { font-size: 17px; font-weight: 800; }
.mg-lb-pts small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.mg-lb-row.is-mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mg-lb-mine { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-soft); font-weight: 750; font-size: 14px; }
.mg-lb-mine .mg-avatar { width: 32px; height: 32px; }

/* ---------- Automatic narration ---------- */
.mg-narration { position: fixed; left: 50%; top: calc(var(--header-h) + var(--safe-top) + 8px); z-index: 70; display: flex; align-items: center; gap: 10px; width: min(560px, calc(100vw - 24px)); padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-3); transform: translate(-50%, -24px); opacity: 0; pointer-events: none; transition: .3s var(--ease); }
.mg-narration.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
body[data-page="guide-ar"] .mg-narration { top: calc(70px + var(--safe-top)); background: rgba(12, 26, 31, .8); color: #fff; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
body[data-page="guide-ar"] .mg-narration.is-visible { transform: translate(-50%, 0); }
.mg-narration-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.mg-narration-copy { flex: 1; min-width: 0; display: grid; }
.mg-narration-copy small { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; opacity: .7; }
.mg-narration-copy strong { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mg-narration-listen { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 16%, transparent); color: inherit; font-weight: 800; font-size: 13px; flex: none; }
.mg-narration-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: inherit; opacity: .8; flex: none; }
.mg-narration-x .mg-i, .mg-narration-listen .mg-i { width: 16px; height: 16px; }
@media (max-width: 479px) { .mg-narration-listen { width: 38px; padding: 0; justify-content: center; } .mg-narration-listen .mg-speak-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (min-width: 960px) { .mg-narration { left: calc(50% + 48px); } body[data-page="guide-ar"] .mg-narration { left: 50%; } }

/* ---------- Entry points ---------- */
.mg-home { margin: 18px 0 4px; }
.mg-home-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 118px; align-items: center; gap: 8px; padding: 16px 12px 16px 18px; border-radius: var(--r-xl); overflow: hidden; isolation: isolate; text-decoration: none; color: #f3efe8; background: radial-gradient(120% 100% at 0% 100%, #b94a2a 0%, transparent 55%), linear-gradient(150deg, #173a45 0%, #0f2831 100%); box-shadow: var(--shadow-2); }
.mg-home-art { order: 2; }
.mg-home-art .mg-hero-art { width: 100%; }
.mg-home-copy { display: grid; gap: 4px; }
.mg-home-copy .mg-kicker { color: var(--gold); }
.mg-home-copy strong { font: 650 23px/1.1 var(--display); letter-spacing: -.015em; }
.mg-home-copy small { font-size: 13.5px; color: rgba(243,239,232,.82); line-height: 1.4; }
.mg-home-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; width: max-content; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: #fff; color: var(--navy); font-weight: 800; font-size: 13px; }
.mg-home-cta .mg-i { width: 15px; height: 15px; }
.mg-place-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 14px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.mg-place-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.mg-place-copy { flex: 1; min-width: 150px; display: grid; }
.mg-place-copy strong { font-size: 15px; }
.mg-place-copy small { color: var(--muted); font-size: 12.5px; font-weight: 650; }

/* ---------- Pick dialog ---------- */
.mg-pick-floor h3 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .mg-pick-floor h3 { color: var(--accent); } }
.mg-pick-room { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-weight: 750; font-size: 14px; }
.mg-pick-room .mg-code { min-width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
.mg-pick-items { display: grid; gap: 6px; }
.mg-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border-radius: 14px; text-align: left; background: var(--surface-2); }
.mg-pick:hover { background: var(--surface-3); }
.mg-pick > span:last-child { display: grid; min-width: 0; }
.mg-pick strong { font-size: 14px; line-height: 1.25; }
.mg-pick small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .mg-museum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-cta-row { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .mg-explorers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mg-chest-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mg-hero-visual { display: block; width: 250px; opacity: .9; right: 18px; bottom: 50%; transform: translateY(50%); }
  .mg-hero-copy { max-width: calc(100% - 270px); }
  .mg-hero { padding: 28px 28px 26px; }
  .mg-home-card { grid-template-columns: minmax(0, 1fr) 190px; padding: 20px 20px 20px 24px; }
}
@media (min-width: 960px) {
  body[data-page="guide"] main { max-width: 1400px; }
  body[data-page="guide-item"] main { max-width: 1120px; }
  .mg-layout { grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); gap: 22px; align-items: start; }
  .mg-plan-col { position: sticky; top: calc(var(--header-h) + var(--safe-top) + 12px); max-height: calc(100dvh - var(--header-h) - var(--safe-top) - 24px); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-xl); scrollbar-width: thin; }
  .mg-clues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-plan-svg { max-height: calc(100dvh - var(--header-h) - 280px); min-height: 300px; }
  .mg-list-col { max-height: none; }
  .mg-item-row { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; margin: 12px 0 0; padding: 0; }
  .mg-item-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
  .mg-item-figure { position: sticky; top: calc(var(--header-h) + 16px); }
  .mg-item-head { padding-top: 4px; }
  .mg-museum-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .mg-item-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .mg-treasure-bob, .mg-treasure-glow, .mg-spark, .mg-treasure-label, .mg-confetti i, .mg-cel-art, .mg-item-treasure, .mg-me-pulse, .mg-ar-scanline, .mg-locate-icon::after { animation: none !important; }
  .mg-confetti { display: none; }
  .mg-spark { opacity: .8; transform: none; }
}

/* ---------- Recognition: suggestion, treasure notes, diagnostics ---------- */
.mg-ar-suggest-slot { position: absolute; left: 12px; right: 12px; top: calc(50% + var(--finder, 260px) / 2 - 64px); display: flex; justify-content: center; pointer-events: none; z-index: 3; }
.mg-ar-suggest { pointer-events: auto; display: flex; align-items: stretch; max-width: min(420px, 100%); border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .94); color: var(--navy); box-shadow: 0 14px 36px rgba(0,0,0,.4); animation: mg-card-in .3s var(--ease); }
.mg-ar-suggest-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; text-align: left; color: inherit; background: none; }
.mg-ar-suggest-icon { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3b2a07; }
.mg-ar-suggest-icon .mg-i { width: 18px; height: 18px; }
.mg-ar-suggest-copy { min-width: 0; display: grid; line-height: 1.2; }
.mg-ar-suggest-copy small { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #5b6b70); }
.mg-ar-suggest-copy strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-ar-suggest-copy em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.mg-ar-suggest-no { width: 44px; flex: none; display: grid; place-items: center; color: var(--navy); background: rgba(0,0,0,.05); border-left: 1px solid rgba(0,0,0,.08); }
.mg-ar-suggest-no .mg-i { width: 16px; height: 16px; }
.mg-ar[data-mode="kids"] .mg-ar-suggest-icon { background: #c77ddc; color: #fff; }
.mg-ar-card-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 12px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 207, 63, .16); border: 1px solid rgba(255, 207, 63, .4); font-size: 13px; font-weight: 700; line-height: 1.3; }
.mg-ar-card-note > .mg-i { width: 18px; height: 18px; flex: none; color: #ffcf3f; }
.mg-ar-card-note > span { flex: 1; min-width: 140px; }
.mg-ar-note-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: #ffcf3f; color: #3b2a07; font-size: 12.5px; font-weight: 800; text-decoration: none; }
.mg-ar-note-btn .mg-i { width: 14px; height: 14px; }
.mg-ar-diag-btn[aria-pressed="true"] { background: var(--accent); }
.mg-ar-diag { position: absolute; left: 12px; top: calc(66px + var(--safe-top)); width: min(300px, calc(100% - 24px)); padding: 10px 12px; border-radius: 14px; background: rgba(5, 12, 15, .78); color: #fff; font: 600 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; pointer-events: none; z-index: 4; }
.mg-ar-diag p { margin: 4px 0 0; }
.mg-ar-diag ol { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.mg-ar-diag li { display: flex; justify-content: space-between; gap: 8px; }
.mg-ar-diag li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-ar-diag-head { display: flex; justify-content: space-between; gap: 8px; }
.mg-qr-only { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-2, inherit); }
.mg-qr-only .mg-i { width: 16px; height: 16px; flex: none; }

/* Museum introduction (natural voice when generated) */
.mg-hero-intro { margin: 12px 0 0; }
.mg-chip-btn.is-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- AR video (services/video.py) ---------- */
.mg-video { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: calc(16px + var(--safe-top, 0px)) 16px calc(16px + var(--safe-bottom, 0px)); background: rgba(6, 14, 18, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s ease; }
.mg-video.is-ar { position: absolute; background: radial-gradient(ellipse at center, rgba(6,14,18,.25), rgba(6,14,18,.7)); backdrop-filter: none; -webkit-backdrop-filter: none; }
.mg-video.is-open { opacity: 1; }
.mg-video-card { display: grid; gap: 12px; justify-items: center; width: min(420px, 100%); transform: translateY(18px) scale(.94); transition: transform .45s cubic-bezier(.2, .9, .25, 1.15); }
.mg-video.is-open .mg-video-card { transform: none; }
.mg-video-frame { position: relative; width: 100%; max-height: min(68vh, 640px); aspect-ratio: 784 / 1168; border-radius: 26px; overflow: hidden; background: #0b1a20; box-shadow: 0 0 0 2px rgba(255, 214, 120, .55), 0 0 40px rgba(255, 190, 80, .45), 0 24px 60px rgba(0, 0, 0, .55); animation: mg-video-float 5s ease-in-out infinite; }
.mg-video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-video-glow { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.22), transparent 38%); mix-blend-mode: screen; }
.mg-video-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; }
.mg-video-close svg, .mg-video-sound svg { width: 20px; height: 20px; }
.mg-video-sound { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: #fff; color: #13262c; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: mg-pulse 1.6s ease-in-out infinite; }
.mg-video-caption { display: grid; justify-items: center; gap: 2px; color: #fff; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.mg-video-caption strong { font-size: 17px; }
.mg-video-caption .mg-kicker { color: #ffd479; }
.mg-video-actions { display: flex; gap: 8px; }
.mg-video.is-ended .mg-video-frame { animation: none; }
.mg-ar-btn.is-video, .mg-action-tile.is-video { background: linear-gradient(135deg, #f0a13a, #e2552e); color: #fff; }
@keyframes mg-video-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes mg-pulse { 0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 0 rgba(255,255,255,.6); } 50% { box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 10px rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .mg-video-frame, .mg-video-sound { animation: none; } .mg-video-card { transition: none; } }
.mg-video-actions .mg-ar-btn { flex-direction: row; min-height: 44px; padding: 0 18px; background: rgba(255,255,255,.16); }
.mg-video-actions .mg-ar-btn.is-primary { background: #fff; color: #13262c; }
