:root { color-scheme: light; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; color:#203036; background:#f3f5f6; --accent:#28726d; --line:#e1e8e9; }
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none !important; }
button,input { font:inherit; }
button { cursor:pointer; color:inherit; }
button:focus-visible,input:focus-visible,canvas:focus-visible,a:focus-visible { outline:3px solid #84b7b2; outline-offset:3px; }
header { height:72px; padding:0 32px; display:flex; justify-content:space-between; align-items:center; background:#fff; border-bottom:1px solid var(--line); }
.brand { display:flex; gap:12px; align-items:center; text-decoration:none; color:inherit; font-size:16px; font-weight:600; letter-spacing:.04em; }
.brand svg { width:28px; height:28px; stroke:var(--accent); fill:none; stroke-width:1.4; stroke-linejoin:round; }
.text-button { border:0; background:none; font-size:12px; color:#63777c; padding:10px; }
.gate { min-height:calc(100svh - 72px); display:grid; place-items:center; padding:28px 24px; }
form { width:100%; max-width:360px; margin-top:-60px; }
h1 { font-size:29px; font-weight:600; letter-spacing:.02em; margin:0 0 12px; }
form p { font-size:14px; color:#7c898e; margin:0 0 38px; }
label { display:block; font-size:12px; margin-bottom:10px; color:#627278; }
input { display:block; width:100%; background:#fff; border:1px solid #ccd8d9; border-radius:6px; padding:16px; text-transform:uppercase; font-size:17px; letter-spacing:.12em; color:#203036; }
input::placeholder { color:#aeb9bc; font-size:15px; }
#submit { width:100%; border:0; border-radius:6px; background:var(--accent); color:#fff; padding:15px 18px; margin-top:16px; display:flex; justify-content:space-between; align-items:center; font-size:14px; }
#submit:disabled { opacity:.6; cursor:wait; }
#submit svg { width:19px; height:19px; stroke:currentColor; stroke-width:1.5; fill:none; }
.error { color:#b0493d; font-size:12px; line-height:1.7; margin-top:16px; min-height:22px; }
.viewer { position:relative; height:calc(100svh - 72px); min-height:420px; overflow:hidden; }
.hint { position:absolute; z-index:2; left:28px; top:23px; margin:0; font-size:12px; color:#7a898e; pointer-events:none; }
canvas { position:absolute; inset:0 0 90px; width:100%; height:calc(100% - 90px); touch-action:none; cursor:grab; }
canvas:active { cursor:grabbing; }
.status { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font-size:13px; color:#687b80; background:#ffffffee; border:1px solid var(--line); border-radius:6px; padding:12px 18px; max-width:90%; text-align:center; pointer-events:none; }
.toolbar { position:absolute; bottom:28px; left:16px; right:16px; display:flex; align-items:center; justify-content:center; gap:14px; }
.views,.tools { background:#fff; border:1px solid var(--line); border-radius:8px; padding:4px; display:flex; gap:4px; }
.toolbar button { background:none; border:0; border-radius:5px; height:40px; min-width:40px; padding:0 18px; font-size:13px; }
.tools button { padding:0 12px; display:grid; place-items:center; }
.toolbar button[aria-pressed="true"] { background:var(--accent); color:#fff; }
.toolbar button:hover:not([aria-pressed="true"]) { background:#edf3f2; }
.tools svg { width:18px; height:18px; stroke:currentColor; stroke-width:1.5; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.viewer.expanded,.viewer:fullscreen { position:fixed; inset:0; height:100svh; z-index:10; background:#f3f5f6; }
body.expanded { overflow:hidden; }
@media(max-width:600px) {
  header { height:60px; padding:0 20px; }
  .brand { font-size:14px; }
  .brand svg { width:24px; height:24px; }
  .gate { min-height:calc(100svh - 60px); }
  h1 { font-size:25px; }
  .viewer { height:calc(100svh - 60px); }
  .hint { left:20px; top:20px; font-size:11px; }
  canvas { bottom:130px; height:calc(100% - 130px); }
  .toolbar { flex-wrap:wrap; gap:8px; bottom:20px; }
  .views { justify-content:center; }
  .tools { justify-content:center; }
  .toolbar button { padding:0 15px; }
}
