:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #102a43; background: #f2f6fa; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; min-height: 44px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 650; color: #102a43; background: #e9f0f7; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible { outline: 3px solid #10ac84; outline-offset: 3px; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: #102a43; color: white; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: block; width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; }
.brand strong { font-size: 18px; }
.brand small { display: block; font-size: 11px; color: #c3d3e2; margin-top: 3px; }
.icon-button { border: 1px solid #587084; background: transparent; color: white; padding: 8px 17px; }
main { flex: 1; min-height: 0; position: relative; overflow: auto; }
.welcome { max-width: 620px; margin: 0 auto; padding: 40px 24px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 800; color: #08795f; }
h1 { font-size: clamp(30px, 7vw, 46px); line-height: 1.1; margin: 20px 0; letter-spacing: -1.5px; }
p { line-height: 1.6; color: #526779; }
.steps { display: grid; gap: 12px; padding: 18px 0 28px; font-size: 15px; }
.steps span { background: #fff; border: 1px solid #dce5ed; border-radius: 12px; padding: 15px; }
.primary { color: #fff; background: #08795f; width: 100%; }
.hint { font-size: 12px; text-align: center; }
#workspace { height: 100%; display: flex; flex-direction: column; position: relative; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: white; padding: 6px 10px; border-bottom: 1px solid #dce5ed; font-size: 13px; }
.toolbar button { background: transparent; font-size: 12px; padding: 8px; }
#page-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: white; }
.bottom-nav { display: flex; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid #dce5ed; flex-shrink: 0; }
.bottom-nav button { display: grid; gap: 3px; justify-items: center; background: transparent; min-width: 88px; font-size: 12px; }
.bottom-nav span { font-size: 22px; line-height: 1; }
.bottom-nav [aria-current="page"] { background: #def5ed; color: #08795f; }
#connection { background: #fff0cc; color: #714e00; font-size: 13px; padding: 10px 16px; }
#install-banner { padding: 8px 16px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #def5ed; }
#install-banner button { color: white; background: #08795f; font-size: 12px; }
#loading { position: absolute; z-index: 2; top: 58px; left: 0; right: 0; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px; color: #102a43; background: #eef6ff; box-shadow: 0 2px 6px #102a431a; font-size: 13px; pointer-events: none; }
.spinner { width: 18px; height: 18px; border: 2px solid #b5c7d8; border-top-color: #08795f; border-radius: 50%; animation: spin 1s linear infinite; }
#load-error { padding: 16px; background: #fff0cc; font-size: 13px; }
#load-error p { margin-top: 0; color: #714e00; }
dialog { max-width: 460px; width: calc(100% - 32px); border: 0; border-radius: 20px; padding: 24px; box-shadow: 0 15px 60px #102a4350; }
dialog::backdrop { background: #102a4380; }
dialog h2 { margin-top: 0; }
dialog p { font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
