/*! VSC Remote · © 2026 Kotroczó Máté (matedon.eu) · Minden jog fenntartva / All rights reserved · info@matedon.eu */
:root {
  color-scheme: dark;
  --ground: #0e1116;
  --raised: #161c26;
  --line: #273142;
  --text: #e6edf6;
  --muted: #93a1b5;
  --accent: #5ee0c0;
  --accent-ink: #06251d;
  --danger: #ff8f8f;
  --radius: 12px;
  --tap: 44px;
  --mono: ui-monospace, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon--small { width: 16px; height: 16px; color: var(--muted); }

.app { position: fixed; inset: 0 0 auto; height: var(--app-height, 100dvh); display: flex; flex-direction: column; overflow: hidden; padding-top: env(safe-area-inset-top, 0px); }

.bar { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 2px calc(4px + var(--safe-right)) 2px calc(4px + var(--safe-left)); border-bottom: 1px solid var(--line); }
.bar__window { flex: 1 1 0; min-width: 0; min-height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 0; border-radius: var(--radius); background: none; text-align: left; }
.bar__text { min-width: 0; display: grid; line-height: 1.2; }
.bar__app { font-size: 11px; color: var(--muted); }
.bar__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.bar__dot[data-status-dot="ok"] { background: var(--accent); }
.bar__dot[data-status-dot="bad"] { background: var(--danger); }
.bar__icon, .bar__bell { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: var(--tap); min-height: var(--tap); border: 0; border-radius: var(--radius); background: none; }
.bar__bell { color: var(--accent); font-size: 13px; }

.switch { flex: none; display: inline-flex; padding: 2px; border-radius: 10px; background: var(--raised); }
.switch__item { min-height: 40px; min-width: var(--tap); padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.switch__item[aria-pressed="true"] { background: var(--line); color: var(--text); }

.panes { flex: none; display: flex; gap: 4px; padding: 0 calc(6px + var(--safe-right)) 0 calc(6px + var(--safe-left)); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.panes__item { flex: none; min-height: var(--tap); max-width: 60vw; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panes__item[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }

.stage { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; background: #0b0e13; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.stage__reset { position: absolute; right: 10px; bottom: 10px; min-width: var(--tap); min-height: var(--tap); border: 1px solid var(--line); border-radius: 22px; background: var(--raised); font-weight: 700; }
[data-app-mode="reader"] .stage__canvas, [data-app-mode="reader"] .stage__reset { visibility: hidden; }

.notice { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; background: var(--ground); text-align: center; overflow: auto; }
.notice__title { margin: 0; font-size: 20px; }
.notice__text { margin: 0; max-width: 36ch; color: var(--muted); }
.notice__actions { display: grid; gap: 8px; width: min(100%, 320px); }

.button { display: block; width: 100%; min-height: 48px; padding: 0 16px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.button--quiet { background: var(--raised); color: var(--text); }

.reader { position: absolute; inset: 0; overflow: hidden auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px calc(14px + var(--safe-right)) 28px calc(14px + var(--safe-left)); font-size: calc(16px * var(--reader-zoom, 1)); overflow-wrap: anywhere; }
.reader__more { display: block; width: 100%; min-height: var(--tap); margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: none; color: var(--muted); }
.reader__body { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); max-width: 78ch; margin-inline: auto; }
.reader__body p, .reader__body ul, .reader__body ol, .reader__body pre, .reader__body blockquote, .reader__body table { margin: 0 0 .6em; }
.reader__body h1, .reader__body h2, .reader__body h3, .reader__body h4, .reader__body h5, .reader__body h6 { margin: .5em 0 .35em; font-size: 1.1em; line-height: 1.25; }
.reader__body ul, .reader__body ol { padding-left: 1.35em; }
.reader__body pre, .reader__pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; font-family: var(--mono); font-size: .86em; line-height: 1.5; tab-size: 2; }
.reader__body pre { padding: 10px; border-radius: 8px; background: #0a0d12; }
.reader__body code, .reader__mono { font-family: var(--mono); font-size: .9em; }
.reader__body pre code { font-size: 1em; }
.reader__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.reader__body th, .reader__body td { padding: 4px 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.reader__body blockquote { padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.reader__body hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.reader__body a { color: var(--accent); }
.reader__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.reader__bold { font-weight: 650; }
.reader__keep { white-space: pre-wrap; }
.reader__fill { border-radius: 8px; padding: 6px 10px; }
span.reader__fill { padding: 0 4px; border-radius: 4px; }
.reader__button { min-height: var(--tap); min-width: var(--tap); padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); font: inherit; font-size: .9em; text-align: left; }
.reader__button--on { border-color: var(--accent); }
.reader__button:disabled { opacity: .5; }
.reader__tap { display: block; width: 100%; min-height: var(--tap); padding: 6px 8px; border: 0; border-left: 2px solid var(--line); background: none; text-align: left; font: inherit; }
.reader__input { display: block; width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); color: var(--muted); text-align: left; white-space: pre-wrap; }
.reader__file { font-family: var(--mono); font-size: .82em; line-height: 1.55; white-space: pre; overflow-x: auto; tab-size: 2; margin: 0; }
.reader__empty { color: var(--muted); text-align: center; padding-top: 20vh; }

.keys { flex: none; display: flex; gap: 6px; padding: 6px calc(6px + var(--safe-right)) 6px calc(6px + var(--safe-left)); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.keys__key { flex: none; min-width: var(--tap); min-height: var(--tap); padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); font-size: 14px; white-space: nowrap; user-select: none; -webkit-user-select: none; }
.keys__key--mod[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.composer { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 6px calc(6px + var(--safe-right)) 6px calc(6px + var(--safe-left)); border-top: 1px solid var(--line); }
.composer__text { flex: 1 1 0; min-width: 0; min-height: var(--tap); max-height: 34vh; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); line-height: 1.4; resize: none; }
.composer__text:focus { outline: none; border-color: var(--accent); }
.composer__live, .composer__send, .composer__insert { flex: none; min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius); background: var(--raised); }
.composer__insert { padding: 0 8px; font-size: 13px; }
.composer__live[aria-pressed="true"] { color: var(--accent); background: var(--line); }
.composer__send { background: var(--accent); color: var(--accent-ink); }

.dock { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); padding: 0 var(--safe-right) env(safe-area-inset-bottom, 0px) var(--safe-left); }
.dock__item { min-height: 52px; display: grid; justify-items: center; align-content: center; gap: 1px; border: 0; background: none; color: var(--muted); font-size: 11px; }
.dock__item[aria-pressed="true"] { color: var(--accent); }

.sheet { width: 100%; max-width: 100%; max-height: min(82dvh, 720px); margin: auto 0 0; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: var(--raised); color: var(--text); overflow: hidden; }
.sheet::backdrop { background: rgb(0 0 0 / .55); }
.sheet__box { display: flex; flex-direction: column; max-height: inherit; padding: 4px calc(10px + var(--safe-right)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(10px + var(--safe-left)); }
.sheet--tall .sheet__box { height: min(82dvh, 720px); }
.sheet__head { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.sheet__title { margin: 0 6px; font-size: 17px; }
.sheet__close { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); }
.sheet__list { flex: 1 1 auto; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; }
.sheet__group { margin: 12px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sheet__empty { margin: 12px 8px; color: var(--muted); }
.sheet__search { flex: none; min-height: 46px; margin: 0 4px 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground); }
.sheet__text { width: 100%; margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground); font: 13px/1.45 var(--mono); }

.line { display: flex; align-items: stretch; gap: 4px; }
.line__side { flex: none; min-width: var(--tap); padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); }
.row { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 48px; display: grid; align-content: center; gap: 1px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; text-align: left; }
.row[aria-current="true"] { background: var(--line); }
.row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__detail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__detail:empty { display: none; }
.row--danger { color: var(--danger); }

.field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 52px; padding: 4px 10px; }
.field__control { display: inline-flex; align-items: center; gap: 4px; }
.field__button { min-width: var(--tap); min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px; background: var(--ground); font-weight: 600; }
.field__value { min-width: 56px; text-align: center; }
.field .switch { background: var(--ground); }
.help { padding: 0 10px; color: var(--muted); font-size: 14px; }
.help__title { min-height: var(--tap); display: flex; align-items: center; }
.help__list { margin: 0 0 8px; padding-left: 18px; }

.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 6px; pointer-events: none; z-index: 10; }
.toast { margin: 0; max-width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); font-size: 14px; overflow-wrap: anywhere; animation: toast-in .18s ease-out; }
.toast--error { border-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; translate: 0 8px; } }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login__card { width: min(100%, 380px); display: grid; gap: 10px; padding: 26px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--raised); }
.login__icon { border-radius: 14px; }
.login__title { margin: 4px 0 0; font-size: 24px; }
.login__text { margin: 0 0 10px; color: var(--muted); }
.login__message { margin: 0; color: var(--danger); }
.login__message[data-message-state="empty"] { display: none; }

@media (min-width: 720px) {
  .sheet { width: min(560px, 92vw); margin: auto; border-radius: 18px; }
  .switch__item { padding: 0 16px; }
  .reader { padding-inline: 28px; }
}
@media (min-width: 720px) and (max-height: 520px) {
  .dock__item { min-height: var(--tap); grid-auto-flow: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
