:root {
  color-scheme: dark;
  --bg: #050308;
  --surface: #0c0714;
  --surface-2: #130d22;
  --surface-3: #1b1230;
  --line: rgba(213, 199, 255, 0.18);
  --text: #fbf7ff;
  --muted: rgba(251, 247, 255, 0.66);
  --purple: #8f63ff;
  --purple-2: #c9a8ff;
  --cream: #fff7df;
  --green: var(--purple);
  --lime: var(--purple-2);
  --gold: #f2c764;
  --blue: #79c9ff;
  --danger: #ff8594;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
  --main: "Space Grotesk", system-ui, sans-serif;
  --display: "Audiowide", "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--main);
  background:
    radial-gradient(circle at 12% 0%, rgba(143, 99, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(201, 168, 255, 0.1), transparent 24rem),
    linear-gradient(180deg, #090511 0%, #050308 48%, #000 100%);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.locker-shell {
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 18px;
}

.public-locker-view .locker-shell {
  display: flex;
  flex-direction: column;
}

.public-locker-view .locker-topbar { order: 1; }
.public-locker-view .locker-app { order: 2; }
.public-locker-view .auth-gate { order: 3; }

.locker-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.locker-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 1000;
  text-decoration: none;
}

.locker-brand img {
  width: 40px;
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #e9dcff);
  border: 1px solid rgba(213, 199, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(143, 99, 255, 0.14), 0 14px 30px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.wallet-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.wallet-menu a,
.wallet-menu button,
.tiny-link,
.ghost-button,
.address-button {
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(213, 199, 255, 0.2);
  border-radius: 8px;
  color: rgba(251, 247, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(213, 199, 255, 0.1), rgba(255, 255, 255, 0.018)),
    rgba(14, 8, 24, 0.82);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.wallet-menu button {
  font-family: inherit;
  cursor: pointer;
}

.wallet-menu a.wallet-menu-auth {
  color: #fff;
  border-color: rgba(201, 168, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #6b47ff, #9a6cff);
  box-shadow: 0 12px 28px rgba(143, 99, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.wallet-menu .wallet-menu-logout {
  color: #fff;
  border-color: rgba(255, 124, 124, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #b3213c, #f04f5e);
  box-shadow: 0 12px 28px rgba(240, 79, 94, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.locker-ready:not(.public-locker-view) .wallet-menu-auth {
  display: none;
}

.auth-gate {
  min-height: calc(100vh - 94px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  padding: 30px 0;
}

.auth-copy {
  display: grid;
  gap: 16px;
  align-content: center;
}

.auth-copy img {
  width: 96px;
  height: 96px;
  padding: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #e9dcff);
  border: 1px solid rgba(213, 199, 255, 0.42);
  box-shadow: var(--shadow);
}

.auth-copy h1 {
  margin: 0;
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 54%, #d7c4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.84;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
}

.auth-card,
.account-strip,
.tab-panel,
.data-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(213, 199, 255, 0.08), rgba(255, 255, 255, 0.012)),
    linear-gradient(135deg, rgba(143, 99, 255, 0.08), transparent 58%),
    rgba(12, 7, 20, 0.88);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 16px;
}

.auth-tabs,
.locker-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(213, 199, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.auth-tabs button,
.locker-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.auth-tabs button {
  flex: 1;
}

.auth-tabs button.active,
.locker-tabs button.active {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.02) 46%, rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #6b47ff 0%, #9a6cff 48%, #d9b7ff 100%);
  box-shadow: 0 12px 30px rgba(143, 99, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.stack-form,
.surface-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.surface-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(213, 199, 255, 0.17);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 3, 9, 0.9);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(201, 168, 255, 0.76);
  box-shadow: 0 0 0 3px rgba(143, 99, 255, 0.16);
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.02) 46%, rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #6b47ff 0%, #9a6cff 48%, #d9b7ff 100%);
  box-shadow: 0 18px 46px rgba(143, 99, 255, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-weight: 1000;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.danger-button {
  border-color: rgba(255, 117, 139, 0.38);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, #c51f42, #ff4f6d);
  box-shadow: 0 14px 32px rgba(255, 79, 109, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: rgba(255, 169, 184, 0.62);
  outline: none;
}

.surface-form .primary-button {
  align-self: end;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.status-line.good { color: var(--purple-2); }
.status-line.bad { color: var(--danger); }

.locker-app {
  display: grid;
  gap: 14px;
  padding: 14px 0 32px;
}

.account-strip {
  display: none;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.account-strip > div:first-child,
.wallet-account-copy,
.public-view-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.account-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.address-button {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(201, 168, 255, 0.13), rgba(255, 255, 255, 0.018)),
    rgba(15, 9, 26, 0.88);
}

.balance-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.balance-pills span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(143, 99, 255, 0.12);
}

.balance-pills b {
  color: var(--text);
  font-size: 0.95rem;
}

.public-view-copy {
  display: none;
}

.public-view-copy b {
  color: var(--text);
  font-size: 1rem;
}

.public-locker-view .account-strip {
  grid-template-columns: minmax(0, 1fr);
}

.public-locker-view .wallet-account-copy,
.public-locker-view .balance-pills,
.public-locker-view #refreshButton,
.public-locker-view #logoutButton,
.public-locker-view .locker-tabs [data-tab]:not([data-tab="all-locks"]) {
  display: none;
}

.public-locker-view .public-view-copy {
  display: grid;
}

.public-locker-view .auth-gate {
  display: none;
}

.public-locker-view .auth-copy {
  display: none;
}

.locker-tabs {
  overflow-x: auto;
}

.locker-tabs button {
  min-width: max-content;
  padding: 0 12px;
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.active {
  display: grid;
  gap: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head span,
.data-card > span {
  color: var(--purple-2);
  font-size: 0.74rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  grid-column: span 3;
}

.check-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(213, 199, 255, 0.16);
  border-radius: 8px;
  background: rgba(213, 199, 255, 0.055);
  color: var(--text);
}

.check-grid input {
  width: 18px;
  min-height: 18px;
}

.card-grid,
.campaign-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  box-shadow: none;
}

.data-card h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.data-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.public-market-row span,
.public-lock-amount span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.public-lock-groups {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.public-lock-groups button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(213, 199, 255, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.24);
  font-weight: 1000;
  white-space: nowrap;
}

.public-lock-groups button.active {
  color: #fff;
  border-color: rgba(201, 168, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(107, 71, 255, 0.92), rgba(154, 108, 255, 0.82));
}

.public-lock-groups b {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
}

.public-locks-grid {
  grid-template-columns: 1fr;
}

.public-lock-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.public-lock-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-lock-card {
  position: relative;
  overflow: hidden;
}

.public-lock-card.is-focused {
  border-color: rgba(201, 168, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(143, 99, 255, 0.18), 0 24px 66px rgba(0, 0, 0, 0.34);
}

.public-lock-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #6b47ff, #d9b7ff 52%, #79c9ff);
}

.public-lock-hero {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(112px, auto);
  align-items: center;
  gap: 12px;
}

.public-lock-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(213, 199, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(143, 99, 255, 0.18);
  color: #fff;
  font-weight: 1000;
}

.public-lock-logo img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
}

.public-lock-logo span {
  max-width: calc(100% - 10px);
  overflow: hidden;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
}

.public-lock-main {
  min-width: 0;
}

.public-lock-main > span {
  color: var(--purple-2);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.public-lock-main h3 {
  margin-top: 2px;
  font-size: 1.22rem;
}

.public-lock-amount {
  min-width: 0;
  justify-self: end;
  text-align: right;
}

.public-lock-amount b {
  display: block;
  max-width: 180px;
  margin-top: 3px;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  text-overflow: ellipsis;
}

.public-market-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.public-market-row div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(143, 99, 255, 0.2);
  border-radius: 8px;
  background: rgba(143, 99, 255, 0.09);
}

.public-market-row b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
}

.public-lock-links,
.public-lock-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-lock-card-actions {
  padding-top: 2px;
}

.public-lock-links a,
.public-lock-card-actions button {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(213, 199, 255, 0.16);
  border-radius: 8px;
  color: var(--purple-2);
  background: rgba(213, 199, 255, 0.055);
  font-size: 0.78rem;
  font-weight: 1000;
  text-decoration: none;
}

.public-lock-card-actions button {
  color: #fff;
  border-color: rgba(201, 168, 255, 0.3);
  background: rgba(143, 99, 255, 0.16);
}

.public-lock-card-actions .proof-card-button {
  border-color: rgba(201, 168, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(107, 71, 255, 0.95), rgba(154, 108, 255, 0.88));
  box-shadow: 0 10px 24px rgba(143, 99, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.public-lock-links a:hover,
.public-lock-links a:focus-visible,
.public-lock-card-actions button:hover,
.public-lock-card-actions button:focus-visible,
.wallet-menu a.wallet-menu-auth:hover,
.wallet-menu a.wallet-menu-auth:focus-visible {
  border-color: rgba(201, 168, 255, 0.6);
  outline: none;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.meta-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-grid b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.inline-actions form {
  display: flex;
  gap: 8px;
  min-width: min(100%, 260px);
}

.inline-actions input,
.inline-actions select {
  min-width: 0;
}

.inline-actions button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #6b47ff, #9a6cff);
  font-weight: 1000;
  white-space: nowrap;
}

.inline-actions button.secondary {
  color: var(--text);
  background: rgba(121, 201, 255, 0.14);
  border: 1px solid rgba(121, 201, 255, 0.24);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-row span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(143, 99, 255, 0.14);
  font-size: 0.76rem;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed rgba(213, 199, 255, 0.24);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

@media (max-width: 900px) {
  .locker-shell { padding: 12px; }
  .locker-topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .wallet-menu { justify-content: flex-start; }
  .auth-gate {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .auth-copy h1 { font-size: clamp(3rem, 20vw, 6.5rem); }
  .account-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .balance-pills { justify-content: flex-start; }
  .surface-form,
  .card-grid,
  .campaign-list,
  .compact-grid,
  .public-market-row,
  .public-lock-section-grid {
    grid-template-columns: 1fr;
  }
  .public-lock-hero {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .public-lock-logo {
    width: 52px;
    height: 52px;
  }
  .public-lock-amount {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: left;
  }
  .public-lock-amount b {
    max-width: 100%;
  }
  .check-grid {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .inline-actions form {
    width: 100%;
  }
}
