:root {
  color-scheme: dark;
  --bg: #020202;
  --bg-soft: #090909;
  --ink: #f3f3f3;
  --muted: #9a9a9a;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(12, 12, 12, 0.9);
  --panel-strong: rgba(18, 18, 18, 0.98);
  --accent: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.03), transparent 18%),
    linear-gradient(180deg, #000 0%, #070707 48%, #000 100%);
  color: var(--ink);
}

body {
  min-height: 100vh;
  padding: 20px;
}

a {
  color: inherit;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.96), rgba(10, 10, 10, 0.9));
  box-shadow: var(--shadow);
}

.masthead img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: none;
}

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.sub {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 42rem;
  font-size: 0.98rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.button,
button.button,
button.ghost,
.button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.96);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav a:hover,
.button:hover,
button.button:hover,
button.ghost:hover,
.card-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(28, 28, 28, 0.98);
}

.button.primary,
button.button.primary {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: #050505;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
  padding: 18px;
}

.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-link,
.share-row {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(12, 12, 12, 0.94));
}

.card-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 800;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-copy,
.share-detail,
.footer-note,
.meta-line,
.muted {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.mono,
code,
input,
.hash,
.qr {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.lookup {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 8, 0.95);
  color: var(--ink);
  font-size: 1rem;
}

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

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 14, 0.96);
  color: var(--muted);
  line-height: 1.45;
}

.notice.error {
  border-color: rgba(255, 113, 113, 0.28);
  color: #ffb8b8;
}

.notice[hidden],
.share-empty[hidden] {
  display: none;
}

.share-list {
  display: grid;
  gap: 12px;
}

.share-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.share-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.share-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.share-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.redirect-target {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: #060606;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qr {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  color: #fff;
  white-space: pre;
  overflow-x: auto;
  line-height: 0.72;
  font-size: 9px;
}

@media (max-width: 760px) {
  body {
    padding: 14px;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
  }

  .masthead img {
    width: 60px;
    height: 60px;
  }

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

  .share-actions {
    justify-content: flex-start;
  }
}
