:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #14171a;
  color: #f7f8fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: #14171a;
}

button, input { font: inherit; }

.shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #343a40;
}

.eyebrow {
  margin: 0 0 6px;
  color: #9a84ff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.subtitle {
  margin: 8px 0 0;
  color: #b8c0cc;
  line-height: 1.5;
}

.state {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 6px 10px;
  border: 1px solid #555e68;
  border-radius: 6px;
  color: #d8dde5;
  font-size: 13px;
  text-align: center;
}

.state[data-ready="true"] {
  border-color: #4fc39b;
  color: #72ddb8;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid #343a40;
  border-radius: 8px;
  background: #343a40;
}

.summary div {
  min-width: 0;
  padding: 16px;
  background: #1d2227;
}

.summary strong,
.summary span {
  display: block;
  overflow-wrap: anywhere;
}

.summary strong {
  margin-bottom: 6px;
  font-size: 20px;
}

.summary span {
  color: #aeb7c3;
  font-size: 13px;
}

.permission {
  padding: 18px;
  border: 1px solid #343a40;
  border-radius: 8px;
  background: #1d2227;
}

.pairing {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #343a40;
  border-radius: 8px;
  background: #171b20;
}

.pairing label,
.pairing span {
  display: block;
}

.pairing span {
  margin-bottom: 6px;
  color: #b8c0cc;
  font-size: 13px;
  font-weight: 700;
}

.pairing input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #4b5159;
  border-radius: 7px;
  background: #111418;
  color: #f7f8fb;
}

.pairing input:focus {
  outline: 2px solid #8068f5;
  outline-offset: 1px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.check-row input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #8068f5;
}

.check-row strong,
.check-row small { display: block; }

.check-row small {
  margin-top: 5px;
  color: #b8c0cc;
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 7px;
  border: 1px solid #6e5be0;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  border-color: #4b5159;
  background: #2b3035;
  color: #8f98a4;
  cursor: not-allowed;
}

.primary {
  flex: 1;
  background: #6f57da;
  color: #fff;
}

.secondary {
  background: transparent;
  color: #c9d0d9;
  border-color: #4b5159;
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: #b8c0cc;
  font-size: 14px;
  line-height: 1.5;
}

.proof-origin {
  margin: 6px 0 0;
  color: #8f98a4;
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .shell { padding: 18px; }
  .header { flex-direction: column; }
  .state { max-width: 100%; }
  .summary { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  button { width: 100%; }
}
