:root { color-scheme: light dark; }
html, body { overscroll-behavior-y: none; background: #f7f9fb; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
#stop-ncd-resource-viewer { position: fixed; inset: 0; z-index: 2147483646; display: none; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: rgba(5, 18, 31, .7); backdrop-filter: blur(10px); box-sizing: border-box; }
#stop-ncd-resource-viewer.visible { display: grid; place-items: center; }
.sncd-viewer-shell { width: min(1100px, 100%); height: min(900px, 100%); display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 20px; background: #f7f9fb; color: #17212b; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.sncd-viewer-header { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #dce3e9; background: #fff; }
.sncd-viewer-close, .sncd-viewer-share, .sncd-no-preview button { min-height: 44px; border: 0; border-radius: 999px; font: 600 15px system-ui, sans-serif; cursor: pointer; }
.sncd-viewer-close { width: 44px; background: #e8eef3; color: #17212b; }
.sncd-viewer-title-wrap { min-width: 0; flex: 1; display: grid; }
.sncd-viewer-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 16px system-ui, sans-serif; }
.sncd-viewer-subtitle { color: #597080; font: 13px system-ui, sans-serif; }
.sncd-viewer-share, .sncd-no-preview button { padding: 0 18px; background: #0077be; color: #fff; }
.sncd-viewer-content { min-height: 0; display: grid; place-items: center; overflow: auto; background: #e8edf1; }
.sncd-preview { max-width: 100%; max-height: 100%; box-sizing: border-box; }
iframe.sncd-preview { width: 100%; height: 100%; border: 0; background: #fff; }
img.sncd-preview, video.sncd-preview { object-fit: contain; }
audio.sncd-preview { width: min(560px, calc(100% - 32px)); }
pre.sncd-preview { align-self: stretch; justify-self: stretch; overflow: auto; margin: 0; padding: 24px; white-space: pre-wrap; background: #fff; color: #17212b; }
.sncd-no-preview { padding: 32px; text-align: center; font-family: system-ui, sans-serif; }
.sncd-file-symbol { font-size: 64px; }
#stop-ncd-install { position: fixed; z-index: 2147483645; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; max-width: 620px; margin: auto; padding: 12px; border: 1px solid #cbd9e3; border-radius: 18px; background: rgba(255,255,255,.96); color: #17212b; box-shadow: 0 12px 40px rgba(5,18,31,.22); font-family: system-ui, sans-serif; backdrop-filter: blur(16px); }
.sncd-install-close { align-self: flex-start; border: 0; background: transparent; color: #597080; font-size: 16px; }
.sncd-install-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; background: #d9effc; color: #00649f; font-size: 24px; }
.sncd-install-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.sncd-install-copy span { color: #526876; font-size: 13px; }
.sncd-install-action { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #0077be; color: #fff; font-weight: 700; }
.sncd-install-help { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: end center; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); box-sizing: border-box; background: rgba(5,18,31,.65); font-family: system-ui, sans-serif; }
.sncd-install-help-card { position: relative; width: min(500px, 100%); padding: 28px; box-sizing: border-box; border-radius: 24px; background: #fff; color: #17212b; }
.sncd-install-help-card > button { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #e8eef3; }
.sncd-install-help-icon { font-size: 44px; color: #0077be; }
.sncd-install-help-card h2 { margin: 12px 0; }
.sncd-install-help-card li { margin: 12px 0; }
.sncd-install-help-card p { color: #526876; }
@media (max-width: 520px) { .sncd-viewer-shell { border-radius: 14px; } .sncd-viewer-share { padding: 0 12px; } .sncd-viewer-subtitle { display: none; } .sncd-install-icon { display: none; } }
@media (prefers-color-scheme: dark) { html, body { background: #101418; } .sncd-viewer-shell, .sncd-no-preview { background: #151b20; color: #edf3f7; } .sncd-viewer-header { background: #1b2329; border-color: #34434d; } .sncd-viewer-close { background: #2b3841; color: #edf3f7; } .sncd-viewer-content { background: #0d1216; } #stop-ncd-install { background: rgba(27,35,41,.96); border-color: #34434d; color: #edf3f7; } .sncd-install-copy span { color: #b4c3cc; } }
