* { box-sizing:border-box; }
html { color-scheme:light; background:#dce9db; }
body { margin:0; min-height:100vh; min-height:100dvh; display:grid; place-items:center; color:#173f33; font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif; }
main { width:min(100%, 460px); height:min(100vh, 900px); height:min(100dvh, 900px); overflow:hidden; background:#e8f3e5; box-shadow:0 18px 90px #1c473127; }
canvas { display:block; width:100%; height:100%; touch-action:none; }
dialog { border:0; border-radius:24px; width:min(calc(100% - 32px), 372px); padding:25px; color:#173f33; background:#fffdf6; box-shadow:0 22px 85px #162d2670; }
dialog::backdrop { background:#163b31a8; }
dialog h1 { font-size:23px; margin:0 32px 16px 0; }
dialog p { font-size:13px; line-height:1.6; color:#4e6b5c; }
dialog label { display:block; font-size:13px; font-weight:700; margin:14px 0 7px; }
button, input { font:inherit; }
dialog button { cursor:pointer; min-height:42px; border:0; border-radius:13px; font-weight:700; }
dialog input { width:100%; padding:11px 12px; color:#153d30; background:#f4f8ef; border:1px solid #c5daca; border-radius:11px; font-size:16px; }
dialog input:focus-visible, dialog button:focus-visible { outline:2px solid #3b9a6c; outline-offset:2px; }
.primary { width:100%; margin-top:14px; color:#fffdf6; background:#24724e; }
.primary:disabled { opacity:.7; }
.close { position:absolute; top:16px; right:16px; width:42px; font-size:22px; background:#e8f2e7; color:#275641; }
.tabs { display:flex; gap:7px; }
.tabs button { flex:1; padding:0 8px; background:#f0f3ea; color:#4f6a5b; font-size:13px; }
.tabs [aria-pressed="true"] { background:#dbf0df; color:#1e6848; }
dialog .error { color:#a4344e; margin:8px 0 0; }
dialog .error:empty { display:none; }
