:root { color-scheme: light dark; --bg: #f6f6f4; --fg: #1d1d1b; --muted: #6b6b66; --line: #d9d9d3; --accent: #1f6feb; --card: #fff; }
@media (prefers-color-scheme: dark) { :root { --bg: #141413; --fg: #ecece8; --muted: #9a9a93; --line: #33332f; --accent: #6ea8fe; --card: #1e1e1c; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.4 system-ui, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 0 0 16px; }
ul { list-style: none; margin: 0; padding: 0; }
.tile { display: block; padding: 14px 16px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.tile b { display: block; font-weight: 600; }
.tile span { color: var(--muted); font-size: 14px; }
.button, button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; display: inline-block; }
#screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: 8px; padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
#back { font-size: 24px; color: inherit; text-decoration: none; padding: 0 6px; }
#where { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#site, #latency { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#site { font-size: 14px; }
#latency { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#chip { color: var(--muted); font-size: 13px; white-space: nowrap; }
#note { margin: 0; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 14px; }
iframe { flex: 1; width: 100%; border: 0; background: #000; }
body.login main { padding-top: 20vh; text-align: center; }
#sheet { position: fixed; left: 0; right: 0; bottom: 0; padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); will-change: transform; }
#sheet-where { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
#sheet-site { font-weight: 600; color: var(--fg); }
#sheet-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row { display: flex; gap: 8px; }
.row + .row { margin-top: 6px; }
#sheet-input { flex: 1; min-width: 0; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.keys button { flex: 1; background: transparent; color: var(--fg); border-color: var(--line); }
body.on-screen { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; }
html:has(body.on-screen) { overflow: hidden; overscroll-behavior: none; }
#sheet { touch-action: manipulation; }
