:root {
  color-scheme: light;
  --bg: #eef3f8;
  --ink: #16202a;
  --muted: #687385;
  --line: #c7d2df;
  --surface: #ffffff;
  --accent: #1173d4;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --ok: #146c43;
  font-family: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(17, 115, 212, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(26, 94, 76, 0.12), transparent 38%),
    var(--bg);
  color: var(--ink);
}

body[data-connected="true"] {
  background: #07111d;
}

.shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

body[data-connected="true"] .shell {
  display: block;
  padding: 0;
}

body[data-connected="true"] .connect-panel {
  display: none;
}

.connect-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(22, 32, 42, 0.14);
  padding: 24px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #f7fbff;
  font-size: 28px;
  font-weight: 800;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1;
}

.brand-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.connect-form {
  display: grid;
  gap: 12px;
}

label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fbfdff;
}

input:focus {
  outline: 2px solid rgba(17, 115, 212, 0.28);
  border-color: var(--accent);
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

#paste-button {
  border: 1px solid var(--line);
  background: #f7fafc;
  color: var(--ink);
}

#connect-button {
  background: var(--accent);
  color: var(--accent-ink);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status {
  min-height: 20px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.status[data-kind="error"] {
  color: var(--danger);
}

.status[data-kind="ok"] {
  color: var(--ok);
}

.relay-stage {
  width: 100vw;
  height: 100svh;
  background: #07111d;
}

.relay-stage[hidden] {
  display: none;
}

.relay-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #07111d;
}

@media (max-width: 440px) {
  .shell {
    place-items: stretch;
    align-content: center;
    padding: 16px;
  }

  .connect-panel {
    padding: 18px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }
}
