:root {
  color-scheme: dark;
  --ink: #e8e2d5;
  --muted: #9f9b91;
  --field: rgb(243 242 237 / 7%);
  --paper-a: #fbfaf6;
  --paper-b: #eee7d7;
  --paper-c: #fffdf8;
  --control-ink: #141414;
  --line: rgb(232 226 213 / 18%);
  --line-strong: rgb(232 226 213 / 34%);
  --surface: rgb(243 242 237 / 6%);
  --surface-strong: rgb(243 242 237 / 10%);
  --ok: #b8e3c2;
  --warn: #f0c785;
  --brand-font: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, #030303 0%, #080807 44%, #050505 100%),
    #050505;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgb(243 242 237 / 42%);
  outline-offset: 3px;
}

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

.claim-shell.account-mode {
  place-items: start stretch;
  padding: clamp(22px, 4vw, 52px);
}

.panel {
  width: min(360px, 100%);
}

.panel.wide {
  width: min(760px, 100%);
}

.claim-shell.account-mode .panel.wide {
  width: 100%;
}

.panel.wide h1 {
  font-size: clamp(2.15rem, 6vw, 3.6rem);
}

header {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--brand-font);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0;
  line-height: 1.15;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 520;
  letter-spacing: 0;
}

.form-stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 520;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: var(--field);
}

input[readonly] {
  color: var(--muted);
}

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.copy-url {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  min-height: 32px;
  min-width: 66px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 580;
}

.primary-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--control-ink);
  background: linear-gradient(135deg, var(--paper-a), var(--paper-b) 52%, var(--paper-c));
  font-weight: 650;
}

.secondary-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: rgb(0 0 0 / 26%);
  font-weight: 580;
}

.text-button {
  min-height: 28px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 560;
  text-align: left;
}

.passkey-upgrade {
  margin-top: 14px;
}

.account-settings {
  display: grid;
  gap: 26px;
}

.account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.account-label,
.account-item span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 520;
}

.account-name,
.account-item strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.account-name {
  font-family: var(--brand-font);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 400;
  line-height: 0.98;
}

.account-status {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 560;
}

.status-pill.is-verified {
  border-color: rgb(184 227 194 / 34%);
  color: var(--ok);
  background: rgb(184 227 194 / 8%);
}

.status-pill.is-unverified {
  border-color: rgb(240 199 133 / 38%);
  color: var(--warn);
  background: rgb(240 199 133 / 8%);
}

.settings-section {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-section-wide {
  padding-top: 0;
  border-top: 0;
}

.settings-section-header {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-item strong {
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 520;
}

.account-item span {
  margin-top: 4px;
  line-height: 1.35;
}

.account-item button {
  min-height: 32px;
  padding: 0 10px;
}

.compact-button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.account-settings .copy-line {
  min-height: 48px;
  margin-top: 0;
  padding: 7px 7px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-settings .copy-url {
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration-color: rgb(232 226 213 / 42%);
}

.account-settings .form-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.account-settings .primary-button {
  min-width: 148px;
}

.account-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
}

.account-footer .message {
  margin: 0;
}

#passkey-upgrade-button {
  width: 100%;
  margin-top: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 450;
}

.message.tight {
  margin-top: 0;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .claim-shell {
    align-items: start;
  }

  .claim-shell.account-mode {
    padding: 20px;
  }

  .panel.wide {
    width: 100%;
  }

  .account-summary,
  .settings-grid,
  .account-item {
    grid-template-columns: 1fr;
  }

  .account-status {
    justify-items: start;
  }

  .account-settings .form-stack {
    grid-template-columns: 1fr;
  }

  .account-footer {
    display: grid;
  }
}
