:root {
  color-scheme: dark;
  --bg: #0b100e;
  --panel: #121a17;
  --panel-2: #17221e;
  --line: rgba(238, 255, 246, 0.1);
  --muted: #92a29c;
  --text: #f3f8f6;
  --accent: #62f6ab;
  --accent-deep: #112c20;
  --danger: #ff6d76;
  --app-height: 100dvh;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

.app {
  position: relative;
  width: 100%;
  height: var(--app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% -6%, rgba(98, 246, 171, 0.14), transparent 22rem),
    linear-gradient(180deg, #0d1411 0%, #080c0b 100%);
}

.connect-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  box-shadow: 0 12px 32px rgba(98, 246, 171, 0.2);
}

.brand-mark span {
  position: absolute;
  width: 18px;
  height: 5px;
  border-radius: 99px;
  background: #07110c;
  transform: translateY(-4px);
}

.brand-mark span:last-child {
  width: 12px;
  transform: translate(3px, 5px);
}

.eyebrow {
  margin: 0 0 3px;
  color: #718079;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.17em;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.hero-copy {
  margin-top: clamp(54px, 10vh, 92px);
}

.hero-copy h2 {
  max-width: 330px;
  margin: 0;
  font-size: clamp(32px, 9vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-copy p {
  max-width: 350px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.connect-card {
  margin-top: 34px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 26, 23, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.connect-card label {
  display: block;
  margin: 0 0 8px;
  color: #b7c4bf;
  font-size: 12px;
  font-weight: 650;
}

.connect-card label:not(:first-child) {
  margin-top: 16px;
}

.connect-card input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #0c1210;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.055em;
  transition: border-color 160ms, box-shadow 160ms;
}

.connect-card input:focus,
#textInput:focus {
  border-color: rgba(98, 246, 171, 0.62);
  box-shadow: 0 0 0 3px rgba(98, 246, 171, 0.09);
}

.access-code-group {
  margin-top: 16px;
}

.access-code-group > label {
  margin-top: 0 !important;
}

.saved-pairing-bar {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(98, 246, 171, 0.2);
  border-radius: 14px;
  background: rgba(17, 44, 32, 0.48);
}

.saved-pairing-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pairing-check {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #07110c;
  font-size: 13px;
  font-weight: 900;
}

.saved-pairing-bar p {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.saved-pairing-bar strong {
  color: #dffbec;
  font-size: 12px;
}

.saved-pairing-bar small {
  overflow: hidden;
  color: #7f9b8f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pairing-bar-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.pairing-bar-actions button {
  height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(98, 246, 171, 0.15);
  border-radius: 9px;
  background: rgba(7, 17, 12, 0.5);
  color: #9ac1ad;
  font-size: 10px;
  font-weight: 700;
}

.pairing-bar-actions button:last-child {
  margin-left: auto;
  border-color: rgba(255, 109, 118, 0.16);
  color: #d7999d;
}

.pairing-confirm {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(98, 246, 171, 0.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(98, 246, 171, 0.12), transparent 52%),
    #10221a;
}

.pairing-confirm-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(98, 246, 171, 0.12);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pairing-confirm h3 {
  margin: 10px 0 5px;
  color: #effbf5;
  font-size: 16px;
}

.pairing-confirm p {
  margin: 0;
  color: #96aaa1;
  font-size: 11px;
  line-height: 1.6;
}

.pairing-confirm p strong {
  color: #d6eee2;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.04em;
}

.pairing-confirm > div {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
  margin-top: 13px;
}

.pairing-confirm button {
  height: 38px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 760;
}

.pairing-cancel-button {
  border: 1px solid var(--line);
  background: #0c1511;
  color: #92a29c;
}

.pairing-confirm-button {
  border: 0;
  background: var(--accent);
  color: #06100b;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.icon-button {
  width: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: #b7c4bf;
  font-size: 12px;
}

.primary-button {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  background: var(--accent);
  color: #06100b;
  font-weight: 780;
}

.primary-button:disabled {
  opacity: 0.55;
}

.message {
  min-height: 18px;
  margin: 12px 2px -3px;
  color: var(--danger);
  font-size: 12px;
}

.apk-download {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid rgba(98, 246, 171, 0.2);
  border-radius: 15px;
  background: rgba(17, 44, 32, 0.58);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
}

.apk-download small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.trust-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  color: #718079;
  font-size: 11px;
}

.trust-note p {
  margin: 0;
}

.trust-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(98, 246, 171, 0.08);
}

.remote-view {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(80px, 1fr) auto auto auto;
  gap: 9px;
  padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.remote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.remote-header strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.round-button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 19px;
}

.round-button.danger {
  color: var(--danger);
}

.surface-switch {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(14, 21, 18, 0.82);
}

.surface-switch button {
  position: relative;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #84958e;
  font-size: 12px;
  font-weight: 760;
  transition: color 140ms, background 140ms, box-shadow 140ms;
}

.surface-switch button span {
  margin-right: 4px;
  color: #65746e;
}

.surface-switch button.active {
  background: var(--panel-2);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.surface-switch button.active span {
  color: var(--accent);
}

.chat-unread-dot {
  position: absolute;
  top: 7px;
  right: 14px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--panel-2);
  border-radius: 50%;
  background: var(--accent);
  box-sizing: content-box;
}

.chat-stage {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% -30%, rgba(98, 246, 171, 0.08), transparent 45%),
    #090e0c;
}

.chat-thread-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 20, 17, 0.94);
}

.chat-thread-bar select,
.chat-thread-bar button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #0a100e;
  color: #bdcac5;
  font-size: 10px;
}

.chat-thread-bar select {
  min-width: 0;
  padding: 0 28px 0 9px;
  text-overflow: ellipsis;
}

.chat-thread-bar button {
  padding: 0;
  color: var(--accent);
  font-size: 16px;
}

.chat-scroll {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  padding: 15px 12px 12px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.chat-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px 24px;
  color: var(--muted);
  text-align: center;
}

.chat-empty-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid rgba(98, 246, 171, 0.18);
  border-radius: 14px;
  background: var(--accent-deep);
  color: var(--accent);
  font-size: 19px;
}

.chat-empty strong {
  color: #dce6e2;
  font-size: 15px;
}

.chat-empty p {
  max-width: 270px;
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.65;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-message {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.chat-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(98, 246, 171, 0.2);
  border-radius: 9px;
  background: var(--accent-deep);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.chat-message-body {
  min-width: 0;
  max-width: calc(100% - 37px);
}

.chat-role {
  margin-bottom: 5px;
  color: #7f9089;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.03em;
}

.chat-copy {
  overflow-wrap: anywhere;
  color: #e8efec;
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-wrap;
  user-select: text;
}

.chat-message.streaming .chat-copy::after {
  content: "";
  width: 5px;
  height: 1em;
  display: inline-block;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: -0.16em;
  animation: chat-caret 0.9s steps(1) infinite;
}

@keyframes chat-caret {
  50% { opacity: 0; }
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.user .chat-avatar {
  display: none;
}

.chat-message.user .chat-message-body {
  max-width: 86%;
  padding: 10px 13px;
  border: 1px solid rgba(98, 246, 171, 0.14);
  border-radius: 16px 16px 4px 16px;
  background: var(--accent-deep);
}

.chat-message.user .chat-role {
  display: none;
}

.chat-message.user .chat-copy {
  color: #eafff4;
}

.chat-message.system,
.chat-message.tool {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.chat-message.system .chat-avatar,
.chat-message.tool .chat-avatar {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
  border-color: var(--line);
  background: #151d1a;
  color: #91a099;
}

.chat-message.system .chat-copy,
.chat-message.tool .chat-copy {
  color: #b2c0ba;
  font-size: 12px;
  line-height: 1.55;
}

.chat-jump-button {
  position: sticky;
  z-index: 2;
  bottom: 4px;
  height: 32px;
  display: block;
  margin: 10px auto 0;
  padding: 0 12px;
  border: 1px solid rgba(98, 246, 171, 0.24);
  border-radius: 999px;
  background: rgba(17, 44, 32, 0.94);
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.chat-status {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-top: 1px solid var(--line);
  background: rgba(13, 20, 17, 0.94);
  color: #7f9089;
  font-size: 10px;
}

.chat-status > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status button {
  height: 24px;
  flex: none;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid rgba(255, 109, 118, 0.22);
  border-radius: 7px;
  background: rgba(255, 109, 118, 0.08);
  color: #ffadb2;
  font-size: 9px;
  font-weight: 760;
}

.chat-approval {
  margin: 0 9px 8px;
  padding: 12px;
  border: 1px solid rgba(255, 196, 100, 0.25);
  border-radius: 13px;
  background: #211b10;
  color: #eadfc8;
}

.chat-approval > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-approval > div:first-child span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 196, 100, 0.12);
  color: #ffd48d;
  font-size: 8px;
  font-weight: 800;
}

.chat-approval strong {
  font-size: 11px;
}

.chat-approval p {
  margin: 8px 0 0;
  color: #baa98b;
  font-size: 10px;
  line-height: 1.5;
}

.chat-approval pre {
  max-height: 74px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: #e5d8c0;
  font: 9px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.chat-approval label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #a99778;
  font-size: 9px;
}

.chat-approval label input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.chat-approval-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}

.chat-approval-actions button {
  height: 32px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 780;
}

.chat-approval-actions button:first-child {
  border: 1px solid rgba(255, 109, 118, 0.18);
  background: rgba(255, 109, 118, 0.07);
  color: #f1aaae;
}

.chat-approval-actions button:last-child {
  border: 0;
  background: var(--accent);
  color: #06100b;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #58645f;
}

.chat-status[data-state="thinking"] .chat-status-dot,
.chat-status[data-state="streaming"] .chat-status-dot,
.chat-status[data-state="tool"] .chat-status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(98, 246, 171, 0.08);
  animation: chat-status-pulse 1.2s ease-in-out infinite;
}

.chat-status[data-state="error"] {
  color: #ffc0c4;
}

.chat-status[data-state="error"] .chat-status-dot,
.chat-status[data-state="offline"] .chat-status-dot {
  background: var(--danger);
}

@keyframes chat-status-pulse {
  50% { opacity: 0.35; transform: scale(0.72); }
}

.remote-view.chat-surface .key-row {
  display: none;
}

.remote-view.chat-surface .composer {
  margin-top: 0;
}

.remote-view.chat-surface #textInput {
  min-height: 58px;
  max-height: 120px;
}

.screen-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #050706;
  background-size: 24px 24px;
  touch-action: none;
  user-select: none;
}

#remoteScreen {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.screen-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.screen-placeholder p {
  margin: 0;
}

.screen-placeholder.connection-paused {
  padding: 24px;
  background: rgba(7, 13, 11, 0.76);
  color: var(--text);
  text-align: center;
  backdrop-filter: blur(3px);
}

.screen-placeholder.connection-paused p {
  max-width: 280px;
  line-height: 1.6;
}

.pulse-ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(98, 246, 171, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.latency-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(98, 246, 171, 0.2);
  border-radius: 999px;
  background: rgba(5, 12, 9, 0.72);
  color: var(--accent);
  font-size: 10px;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}

.mode-switch,
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.mode-switch button,
.zoom-controls button {
  min-width: 34px;
  height: 29px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #93a39c;
  font-size: 11px;
  font-weight: 700;
}

.mode-switch button.active {
  background: var(--accent-deep);
  color: var(--accent);
}

.zoom-controls button:first-child,
.zoom-controls button:nth-of-type(2) {
  width: 31px;
  min-width: 31px;
  padding: 0;
  font-size: 16px;
}

.zoom-controls span {
  min-width: 38px;
  color: #b7c4bf;
  font-size: 10px;
  text-align: center;
}

.gesture-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 13px;
  color: #718079;
  font-size: 10px;
}

.gesture-hint i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #42504a;
}

.control-dock {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overscroll-behavior: contain;
}

.key-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(35px, 1fr));
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.key-row button {
  min-width: 35px;
  height: 34px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0c1210;
  color: #b7c4bf;
  font-size: 11px;
}

.key-row button:active,
.view-toolbar button:active,
.composer-tools button:active,
.composer-actions button:active {
  transform: translateY(1px);
}

.composer {
  margin-top: 10px;
}

.composer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.composer-heading label {
  color: #c7d2ce;
  font-size: 12px;
  font-weight: 700;
}

.composer-heading span {
  color: #718079;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#textInput {
  width: 100%;
  min-height: 82px;
  max-height: 150px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #0c1210;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  caret-color: var(--accent);
}

#textInput::placeholder {
  color: #63716b;
  font-size: 13px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.composer-tools button {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0c1210;
  color: #b7c4bf;
  font-size: 11px;
  font-weight: 700;
}

.voice-button span {
  display: inline-block;
  margin-right: 3px;
  color: var(--accent);
  font-size: 8px;
}

.voice-button.listening {
  border-color: rgba(255, 109, 118, 0.42);
  color: #ffd5d8;
  background: rgba(255, 109, 118, 0.1);
}

.voice-button.listening span {
  color: var(--danger);
  animation: voice-pulse 1s ease-in-out infinite;
}

.voice-button:disabled {
  cursor: default;
  opacity: 0.48;
}

@keyframes voice-pulse {
  50% { opacity: 0.25; transform: scale(0.75); }
}

.clear-button {
  margin-left: auto;
}

.voice-status {
  min-height: 16px;
  margin: 6px 2px 0;
  color: #718079;
  font-size: 10px;
  line-height: 1.45;
}

.composer-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 7px;
  margin-top: 9px;
}

.composer-actions button {
  height: 42px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 760;
}

.send-text-button {
  border: 1px solid rgba(98, 246, 171, 0.2);
  background: var(--accent-deep);
  color: var(--accent);
}

.send-enter-button {
  border: 0;
  background: var(--accent);
  color: #06100b;
}

.composer-message {
  min-height: 15px;
  margin: 6px 2px -2px;
  color: #718079;
  font-size: 10px;
}

body.keyboard-open .remote-view {
  grid-template-rows: minmax(56px, 0.55fr) minmax(0, auto);
  gap: 6px;
  padding-top: 6px;
}

body.keyboard-open .remote-header,
body.keyboard-open .surface-switch,
body.keyboard-open .gesture-hint,
body.keyboard-open .view-toolbar {
  display: none;
}

body.keyboard-open .control-dock {
  max-height: calc(var(--app-height) - 90px);
}

body.keyboard-open .key-row {
  display: none;
}

body.keyboard-open .composer {
  margin-top: 0;
}

@media (max-width: 370px) {
  .remote-view {
    padding-left: 8px;
    padding-right: 8px;
  }

  .mode-switch button,
  .zoom-controls button {
    padding: 0 7px;
  }

  .zoom-controls span {
    min-width: 34px;
  }
}

@media (max-height: 700px) {
  .hero-copy {
    margin-top: 28px;
  }

  .hero-copy h2 {
    font-size: 30px;
  }

  .connect-card {
    margin-top: 20px;
  }

  .remote-header {
    min-height: 34px;
  }

  #textInput {
    min-height: 70px;
  }
}
