:root {
  color-scheme: light dark;
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d1b19;
  --muted: #6b6560;
  --line: #e2ded8;
  --accent: #6b3fd1;
  --accent-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --card: #201f1d;
    --text: #ece9e4;
    --muted: #a39d96;
    --line: #34322f;
    --accent: #9b7bf0;
    --accent-text: #161514;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}

h1 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.6rem;
}

.description {
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.relay-url code {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--muted);
}

section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
}

.notice {
  text-align: center;
}

.price {
  font-size: 1.15rem;
  margin-top: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font:
    0.9rem ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

textarea {
  resize: none;
  word-break: break-all;
}

button,
.button {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

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

#status,
#invoice-status {
  margin: 0.75rem 0;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.pay-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.pay-panel textarea,
.pay-panel input {
  width: 100%;
}

.pay-panel img {
  width: 100%;
  max-width: 280px;
  image-rendering: pixelated;
  background: #fff;
  border-radius: 8px;
}

.for-key {
  margin-top: 0;
  color: var(--muted);
}

.for-key code {
  color: var(--text);
}

.next-step {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.next-step p {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a,
.languages a {
  color: inherit;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.languages [aria-current] {
  color: var(--text);
  font-weight: 600;
}

[hidden] {
  display: none !important;
}
