:root {
  color: #14233a;
  background: #eef3f8;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 12%, rgb(36 116 180 / 16%), transparent 30rem),
    linear-gradient(145deg, #f8fbfd 0%, #e7eef5 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.assistant-card {
  width: min(100%, 640px);
  overflow: hidden;
  border: 1px solid rgb(29 67 103 / 12%);
  border-radius: 24px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 24px 70px rgb(24 56 88 / 15%);
}

.card-header,
.token-form,
.status,
.operation-card {
  margin-right: 40px;
  margin-left: 40px;
}

.card-header {
  padding-top: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #1d6fa5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  color: #112238;
  font-size: clamp(1.85rem, 6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 35rem;
  margin: 16px 0 0;
  color: #596a7c;
  line-height: 1.7;
}

.token-form {
  margin-top: 32px;
}

.token-form label,
.operation-label {
  display: block;
  margin-bottom: 8px;
  color: #405367;
  font-size: 0.84rem;
  font-weight: 700;
}

.token-row {
  display: flex;
  gap: 10px;
}

.token-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid #b9c7d4;
  border-radius: 12px;
  outline: none;
  padding: 12px 14px;
  color: #132a43;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.token-row input:focus {
  border-color: #2478ad;
  box-shadow: 0 0 0 4px rgb(36 120 173 / 13%);
}

button,
.invite-link {
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:active,
.invite-link:active {
  transform: translateY(1px);
}

.primary-button {
  border: 0;
  padding: 0 20px;
  color: #fff;
  background: #176b9e;
  box-shadow: 0 8px 20px rgb(23 107 158 / 22%);
}

.primary-button:hover {
  background: #105f91;
}

.field-help {
  margin: 9px 0 0;
  color: #718193;
  font-size: 0.78rem;
  line-height: 1.5;
}

.status {
  min-height: 24px;
  margin-top: 26px;
  margin-bottom: 30px;
  color: #56687a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status[data-kind="success"] {
  color: #176845;
}

.status[data-kind="error"] {
  color: #a43e32;
}

.operation-card {
  margin-bottom: 40px;
  border: 1px solid #d7e0e8;
  border-radius: 18px;
  padding: 24px;
  background: #f8fafc;
}

.operation-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 16px;
}

.operation-block .operation-label {
  grid-column: 1 / -1;
  margin: 0;
}

.device-id {
  overflow-wrap: anywhere;
  color: #102b45;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  letter-spacing: 0.06em;
}

.secondary-button {
  border: 1px solid #adbecd;
  padding: 10px 14px;
  color: #1f587c;
  background: #fff;
}

.secondary-button:hover {
  border-color: #7d9aae;
  background: #f4f8fb;
}

.invite-link {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding: 14px 18px;
  color: #fff;
  background: #176b9e;
  box-shadow: 0 10px 24px rgb(23 107 158 / 20%);
}

.invite-link:hover {
  background: #105f91;
}

.clipboard-fallback {
  position: fixed;
  inset: -9999px auto auto -9999px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .page-shell {
    align-items: start;
    padding: 16px 12px;
  }

  .assistant-card {
    border-radius: 18px;
  }

  .card-header,
  .token-form,
  .status,
  .operation-card {
    margin-right: 22px;
    margin-left: 22px;
  }

  .card-header {
    padding-top: 30px;
  }

  .token-row,
  .operation-block {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    min-height: 46px;
  }

  .operation-card {
    margin-bottom: 22px;
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
