:root {
    --app-background: #D9D9DB;
}
        html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
        body { display: flex; flex-direction: column; }
        #notice { flex: 0 0 auto; text-align: center; padding: 12px; background: #D9D9DB; box-sizing: border-box; }
        #stage { position: relative; flex: 1 1 0; min-height: 0; width: 100%; overflow: hidden; background: var(--app-background); }
        #mainIframe { display: block; width: 100%; height: 100%; border: 0; background: var(--app-background); }
        #chatOverlay { position: absolute; inset: 0; z-index: 10; display: flex; justify-content: center; background: var(--app-background); }
        #chatOverlay[hidden] { display: none !important; }
        #chatPanel { display: flex; flex-direction: column; width: 100%; max-width: 480px; min-height: 0; background: var(--app-background); }
        #chatHeader { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; box-sizing: border-box; background: #99C78E; }
        #backButton { position: relative; z-index: 1; padding: 8px 14px; border: 0; border-radius: 20px; background: #557C5B; color: #fff; cursor: pointer; font: inherit; }
        #chatTitle { position: absolute; left: 50%; transform: translateX(-50%); font-weight: bold; text-align: center; white-space: nowrap; }
        #chatBody { position: relative; flex: 1 1 0; min-height: 0; background: var(--app-background); }
        #chatIframe { display: block; width: 100%; height: 100%; border: 0; background: var(--app-background); }
        .loadingOverlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--app-background); color: #555; font-size: 14px; }
        .loadingOverlay[hidden] { display: none !important; }
        .loadingSpinner { width: 28px; height: 28px; border: 3px solid #d5d5d5; border-top-color: #557C5B; border-radius: 50%; animation: spin 0.8s linear infinite; }
        @keyframes spin { to { transform: rotate(360deg); } }
        @media (prefers-reduced-motion: reduce) { .loadingSpinner { animation: none; } }
        #footer { flex: 0 0 auto; text-align: center; padding: 8px 12px; background: #f5f5f5; color: #666; font-size: 11px; box-sizing: border-box; }
