:root { color-scheme: dark; --bg: #0b1017; --card: #121a24; --line: rgba(255,255,255,.1); --text: #eef3f8; --muted: #9fb0c3; --teal: #2dd9ca; --red: #ff8a80; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#home { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { border-radius: 13px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 19px; margin: 0 0 10px; }
.card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card p { margin: 0 0 12px; color: var(--muted); }
ol { margin: 0; padding-left: 22px; } li { margin: 8px 0; } li::marker { color: var(--teal); font-weight: 600; }
.small { font-size: 14px; margin: 14px 0 0 !important; }
.fp { font: 600 20px/1.4 ui-monospace, Menlo, monospace; color: var(--text) !important; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input { width: 100%; font: inherit; color: var(--text); background: #0b1119; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 14px; }
button { font: inherit; font-weight: 600; line-height: 1.2; color: var(--text); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-height: 44px; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--teal); border-color: transparent; color: #06231f; }
button.quiet { background: none; border-color: transparent; color: var(--muted); }
.card > button { width: 100%; }
.mac { display: flex; gap: 8px; margin-top: 10px; }
.mac .primary { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mac .quiet { font-weight: 500; font-size: 14px; padding: 12px 8px; }
.notice { max-width: 440px; width: 100%; margin: 0; padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.notice.error { color: var(--red); border-color: rgba(255,138,128,.35); }
.busy { text-align: center; } .busy p { color: var(--text); }
.spinner { width: 34px; height: 34px; margin: 6px auto 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { text-align: center; font-size: 14px; color: var(--muted); } footer p { margin: 0; } footer a { color: var(--teal); display: inline-block; padding: 8px; }
.touch .mouse-only, html:not(.touch) .touch-only { display: none; }

#session { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #000; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; }
#stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; padding-top: env(safe-area-inset-top); }
#video { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 0 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* Mac'ens markør er ikke i billedet: browserens egen skal blive stående. */
#bar, #keys { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--card); padding: 8px 12px; }
#bar { border-top: 1px solid var(--line); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
#bar button, #keys button { font-size: 14px; padding: 8px 12px; white-space: nowrap; }
#barText { flex: 1; font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#keys { gap: 5px; padding-bottom: 0; } #keys button { flex: 1; padding: 8px 0; min-width: 0; max-width: 64px; }
#keys button[aria-pressed="true"] { background: var(--teal); color: #06231f; }
/* Usynligt, men skal kunne få fokus, så telefonens tastatur kommer frem. 16px: ellers zoomer iOS. */
#typeBox { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; resize: none; font-size: 16px; pointer-events: none; }
#toast { position: absolute; z-index: 2; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 12px;
  background: rgba(18,26,36,.95); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
#toast button { font-size: 14px; padding: 8px 12px; }
@media (max-width: 560px) { #barText { display: none; } #bar button { flex: 1; padding: 8px 4px; min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
