/* The gold frame stays inside the existing full-height play layout. */
body[data-mini=merge] { --accent: #f4cf83; --surface: #142b40; }
body[data-mini=merge] .mini-stage { border-color: #b79a63; background: #142b40; box-shadow: 0 0 0 1px #0008, inset 0 0 0 2px #f2d49a12; }
body[data-mini=merge] .mini-hud { background: linear-gradient(180deg, #0d1b2cf5, #0d1b2ce8 70%, #0d1b2c00); }
body[data-mini=merge] .mini-hud > span:first-child { border-color: #d8ba725c; background: linear-gradient(135deg, #3c382a, #15273a); }
body[data-mini=merge] .mini-buddy { border-color: #b79a63; border-top-color: #c7dce82b; background: linear-gradient(115deg, #20394d, #101d30 88%); }
body[data-mini=merge] .buddy-portrait { filter: drop-shadow(0 0 7px #e6bc5c35); }
body[data-mini=merge] .mini-panel { background: radial-gradient(ellipse at 50% 0, #30465a, #0c1b2b 78%); }
body[data-mini=merge] .mini-play { background: linear-gradient(145deg, #fff1bb, #e4bb66); }
@media(prefers-reduced-motion:reduce) { body[data-mini=merge] .buddy-portrait { filter: none; } }

/* Pass 1: compact chrome, a clear primary action and generous touch targets. */
/* Keep the portrait and its reaction below the evolution track. */
body[data-mini=merge] .mini-buddy { height: 46px; gap: 5px; padding: 0 6px; overflow: hidden; }
body[data-mini=merge] .buddy-portrait { align-self: center; width: 44px; height: 44px; margin-top: 0; }
body[data-mini=merge] .buddy-talk { padding: 4px 6px; }
body[data-mini=merge] .buddy-badge { flex-shrink: 0; max-width: 30%; overflow: hidden; text-overflow: ellipsis; padding: 4px; }
body[data-mini=merge] .mini-hud { padding: 1px 6px; }
body[data-mini=merge] .mini-hud button { width: 44px; height: 40px; border-color: #adcad75c; }
body[data-mini=merge] .mini-panel { border-radius: 20px; border-color: #d9bb7a; }
body[data-mini=merge] .mini-play { width: 156px; min-height: 52px; grid-auto-flow: column; gap: 10px; justify-content: center; font-weight: 800; }
body[data-mini=merge] .mini-play svg { width: 19px; height: 19px; }
body[data-mini=merge] .cast-choice { min-width: 46px; min-height: 46px; }
body[data-mini=merge] .mini-next { min-height: 44px; }
@media(max-height:650px) {
    body[data-mini=merge] .mini-buddy { height: 42px; }
    body[data-mini=merge] .buddy-portrait { width: 40px; height: 40px; }
}

/* Pass 5: outcome hierarchy stays inside the dismissible panel. */
body[data-mini=merge] .result-caption { margin: 0; color: #b9cedf; font-size: 12px; letter-spacing: .08em; }
body[data-mini=merge] [data-record=true] .result-caption { color: #ffe0a0; }
body[data-mini=merge] [data-record=true] .mini-message { text-shadow: 0 0 16px #efbc4d45; }
body[data-mini=merge] [data-mode=result] .mini-message::after { content: ' pt'; font-size: 13px; color: #b9cedf; letter-spacing: 0; }
body[data-mini=merge] [data-mode=result] .mini-hint { color: #e0cfaa; }
body[data-mini=merge] [data-mode=pause] .mini-hero { height: 100px; }
body[data-mini=merge] [data-mode=pause] .panel-portrait { width: 100px; height: 100px; }

/* Upcoming piece is readable without adding height or covering the drop row. */
body[data-mini=merge] .merge-next { margin-left: auto; gap: 5px; min-width: 88px; font-size: 11px; color: #b4c8d8; }
body[data-mini=merge] .merge-next img { width: 32px; height: 32px; object-fit: cover; border: 2px solid var(--tier-color, #f4cf83); border-radius: 50%; background: #102239; }
body[data-mini=merge] .merge-next strong { font-size: 12px; color: #fff1cf; }
body[data-mini=merge] .merge-next[data-level="0"] { --tier-color: #ff88b7; }
body[data-mini=merge] .merge-next[data-level="1"] { --tier-color: #62d8ff; }
body[data-mini=merge] .merge-next[data-level="2"] { --tier-color: #8fe3a1; }
