:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif; background: #111612; color: #eef3ec; }
* { box-sizing: border-box; }
body { margin: 0; }
.hidden { display: none !important; }
.screen { min-height: 100dvh; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
input { width: 100%; border: 1px solid #36463b; border-radius: 11px; padding: 13px 14px; color: #f4fff3; background: #1b251e; outline: none; }
input:focus { border-color: #9ae59f; }
label { display: block; color: #c0d0c1; font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
.error { color: #ffaaa5 !important; min-height: 20px; font-size: 13px; }
#login { display: grid; place-items: center; padding: 26px; }
.login-card { width: min(100%, 380px); }
.mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: #baf5ad; color: #19371d; font: 700 23px ui-monospace, monospace; }
.login-card h1 { font-size: 36px; letter-spacing: -.04em; margin: 24px 0 6px; }
.login-card p, .hint { color: #9fac9f; line-height: 1.5; }
.login-card button, .create-card button { margin-top: 22px; width: 100%; padding: 14px; background: #baf5ad; color: #17331c; border-radius: 11px; font-weight: 750; }
.home-head { display: flex; justify-content: space-between; align-items: center; padding: calc(30px + env(safe-area-inset-top)) 24px 18px; border-bottom: 1px solid #29372b; }
.eyebrow { color: #9ae59f; letter-spacing: .13em; font-weight: 700; font-size: 10px; }
.home-head h1 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.04em; }
.home-body { max-width: 800px; margin: 0 auto; padding: 20px 20px 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
h2 { font-size: 16px; margin: 12px 0; }
.text-button { background: transparent; color: #a7e7a5; padding: 8px; }
.session-list { display: grid; gap: 10px; }
.session-card { text-align: left; padding: 18px; width: 100%; background: #1e2921; color: #eef3ec; border: 1px solid #344338; border-radius: 15px; display: flex; align-items: center; gap: 13px; }
.session-card:hover { border-color: #93d996; }
.session-row { display: flex; gap: 8px; }
.session-close { flex: none; width: 48px; color: #c6d4c6; background: #1e2921; border: 1px solid #344338; border-radius: 15px; font-size: 22px; }
.session-icon { background: #314837; color: #a9eaa7; border-radius: 10px; padding: 11px; font: 700 18px ui-monospace, monospace; }
.session-info { flex: 1; min-width: 0; }
.session-info strong, .session-info small { display: block; }
.session-info strong { font-size: 16px; margin-bottom: 5px; }
.session-info small { color: #aab8aa; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.state { color: #a9eaa7; font-size: 12px; }
.state.exited { color: #9ca89e; }
.empty { color: #a7b3a7; background: #1b251e; border-radius: 14px; padding: 24px; }
.create-card { margin-top: 28px; background: #1a231c; padding: 18px; border: 1px solid #2c3b30; border-radius: 16px; }
.create-card h2 { margin: 0; }
.hint { padding: 6px 4px; font-size: 13px; }
#terminal-screen { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
.terminal-head { padding: env(safe-area-inset-top) 10px 0; height: calc(58px + env(safe-area-inset-top)); background: #1b251e; display: flex; align-items: center; border-bottom: 1px solid #324034; }
.terminal-head button { color: #c6e7c3; background: transparent; font-size: 28px; width: 44px; height: 44px; }
.terminal-title { flex: 1; min-width: 0; text-align: center; }
.terminal-title strong, .terminal-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminal-title strong { font-size: 14px; }
.terminal-title small { color: #9daf9f; font-size: 11px; margin-top: 2px; }
#terminal { flex: 1; min-height: 0; padding: 8px 4px; overflow: hidden; background: #101711; }
.keybar { flex: none; display: flex; gap: 4px; overflow-x: auto; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #1b251e; }
.keybar button { flex: 1 0 40px; color: #dbe9db; background: #344237; border-radius: 7px; min-height: 36px; font: 13px ui-monospace, monospace; }
.keybar button.active { background: #baf5ad; color: #17331c; }
.session-close.confirm { color: #ffb4a8; font-size: 13px; }
.qr:not(:empty) { display: inline-block; margin: 6px 0 14px; padding: 10px; background: #fff; border-radius: 12px; line-height: 0; }
@media (hover: hover) and (pointer: fine) { .keybar { display: none; } #keyboard { visibility: hidden; } } /* Mouse and physical keyboard. */
#terminal .xterm { transform-origin: 0 0; }
#terminal.mirrored::after { content: 'Sized for another device · tap to fit here'; position: fixed; right: 10px; bottom: calc(60px + env(safe-area-inset-bottom)); padding: 4px 8px; border-radius: 8px; font-size: 11px; color: #17331c; background: #baf5ad; pointer-events: none; }
.create-card .text-button { background: transparent; color: #a7e7a5; margin-top: 10px; padding: 8px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #2c3b30; font-size: 14px; }
.create-card .device button { width: auto; margin: 0; padding: 6px 12px; background: #3a2724; color: #ffb4a8; font-weight: 600; }
.relay-row { display: flex; gap: 8px; }
.create-card .relay-row button { width: auto; margin: 0; padding: 0 18px; }
