/* Desktop iframe layout. Standalone windows retain the CDN stylesheet. */
html.kr-embedded .topbar .brand,
html.kr-embedded .topbar .edition,
html.kr-embedded .page-heading { display: none; }
html.kr-embedded .topbar { height: 44px; padding: 0 12px; flex: none; }
html.kr-embedded .topbar .campaign-button { min-height: 34px; padding: 4px 10px; gap: 8px; }
html.kr-embedded .topbar .campaign-button small { margin-left: 8px; }
html.kr-embedded .topbar .icon-button { width: 36px; height: 36px; }

@media (min-width: 900px) and (min-height: 480px) {
    html.kr-embedded,
    html.kr-embedded body { height: 100%; overflow: hidden; }
    html.kr-embedded body { display: flex; flex-direction: column; }
    html.kr-embedded main { width: 100%; max-width: none; padding: 10px 12px; flex: 1; min-height: 0; display: flex; }
    html.kr-embedded main > footer { display: none; }
    html.kr-embedded .game-layout {
        width: 100%; max-width: calc((100dvh - 240px) * 4 / 3 + 264px);
        min-height: 0; margin: 0 auto; flex: 1;
        grid-template-columns: minmax(0, 1fr) 250px; gap: 12px;
    }
    html.kr-embedded .battle-column { min-width: 0; }
    html.kr-embedded .battle-hud { height: 52px; padding: 0 12px; }
    html.kr-embedded .resources { gap: 12px; }
    html.kr-embedded .resource strong { font-size: 18px; }
    html.kr-embedded .mission-title strong { font-size: 11px; }
    html.kr-embedded .mission-title small { font-size: 8px; }
    html.kr-embedded .control-dock { min-height: 64px; padding: 8px 10px; gap: 8px; }
    html.kr-embedded .hero-control,
    html.kr-embedded .skill-control { min-height: 44px; gap: 6px; }
    html.kr-embedded .hero-control > span:nth-child(2) { display: none; }
    html.kr-embedded .hero-avatar,
    html.kr-embedded .skill-icon { width: 36px; height: 42px; }
    html.kr-embedded .skill-control strong { font-size: 10px; margin-bottom: 3px; }
    html.kr-embedded .skill-control small { font-size: 8px; }
    html.kr-embedded .playback { gap: 4px; }
    html.kr-embedded .playback button { width: 30px; }
    html.kr-embedded .battle-bottom { margin-top: 10px; align-items: center; }
    html.kr-embedded .battle-bottom > span { font-size: 9px; max-width: 50%; }
    html.kr-embedded .wave-button { min-height: 42px; padding: 8px 10px; font-size: 11px; }
    html.kr-embedded .command-panel { min-height: 0; max-height: 100%; padding: 14px; overflow-y: auto; }
    html.kr-embedded .panel-heading { display: none; }
    html.kr-embedded .command-panel h2 { font-size: 17px; margin: 0 0 8px; }
    html.kr-embedded .panel-description { min-height: 0; line-height: 1.6; margin-bottom: 12px; }
    html.kr-embedded .site-label { margin-bottom: 6px; }
    html.kr-embedded #site-select { min-height: 36px; }
    html.kr-embedded .tower-grid { gap: 8px; }
    html.kr-embedded .tower-card { min-height: 96px; padding: 6px; }
    html.kr-embedded .tower-card .tower-art { width: 74px; height: 45px; }
    html.kr-embedded .tower-detail { padding: 10px; }
    html.kr-embedded .tower-detail > .tower-art { height: 60px; margin-bottom: 8px; }
    html.kr-embedded .field-notes { margin-top: 12px; padding-top: 12px; }
    html.kr-embedded .chapter-progress { margin-top: 12px; }
    html.kr-embedded .range-toggle { min-height: 36px; margin-top: 12px; }
    html.kr-embedded .intro-card { padding: 16px 20px; max-width: 310px; }
    html.kr-embedded .intro-emblem { width: 30px; height: 34px; margin-bottom: 8px; }
    html.kr-embedded .intro-card h2 { font-size: 18px; margin: 8px 0; }
    html.kr-embedded .intro-card p { margin: 8px 0 12px; line-height: 1.6; }
    html.kr-embedded .intro-card > small { margin-top: 8px; }
}
@media (min-width: 900px) and (max-height: 760px) {
    html.kr-embedded .field-notes,
    html.kr-embedded .chapter-progress { display: none; }
}
@media (min-width: 900px) and (max-height: 560px) {
    html.kr-embedded .skill-control > span:nth-child(2),
    html.kr-embedded .battle-bottom > span { display: none; }
    html.kr-embedded .battle-bottom { justify-content: flex-end; }
    html.kr-embedded .intro-card p,
    html.kr-embedded .intro-card > small { display: none; }
}
