:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: rgba(255, 252, 246, 0.92);
  --panel-strong: #fff9f1;
  --ink: #1b1a17;
  --muted: #615a4f;
  --line: rgba(58, 42, 22, 0.14);
  --accent: #d96c18;
  --accent-deep: #9f4314;
  --ok: #216b46;
  --error: #a33c24;
  --pending: #8a6414;
  --shadow: 0 24px 60px rgba(72, 44, 15, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 108, 24, 0.16), transparent 30%),
    linear-gradient(180deg, #f8f4ed 0%, var(--bg) 100%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  padding: 24px 0 32px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 0.96;
  max-width: 9ch;
}

.lede {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 26px;
  backdrop-filter: blur(12px);
}

.panel + .panel {
  margin-top: 22px;
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.published-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.auth-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.published-list.empty {
  color: var(--muted);
}

.published-pack {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.published-pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.published-pack strong {
  display: block;
}

.danger-link {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  background: rgba(163, 60, 36, 0.12);
  color: var(--error);
  font-weight: 700;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 22px;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 28px;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

input,
button {
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="file"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

input:focus {
  outline: 2px solid rgba(217, 108, 24, 0.22);
  border-color: var(--accent);
}

.sticker-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.sticker-list {
  display: grid;
  gap: 14px;
}

.sticker-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.sticker-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wide {
  grid-column: 1 / -1;
}

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

.primary-button,
.ghost-button,
.remove-link {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  padding: 13px 18px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, #e58d3a 100%);
  color: white;
}

.ghost-button,
.remove-link {
  background: rgba(27, 26, 23, 0.06);
  color: var(--ink);
}

.remove-link {
  padding: 8px 12px;
}

.status {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  line-height: 1.5;
}

.status.pending {
  color: var(--pending);
  background: rgba(214, 168, 52, 0.12);
  border-color: rgba(214, 168, 52, 0.24);
}

.status.success {
  color: var(--ok);
  background: rgba(33, 107, 70, 0.12);
  border-color: rgba(33, 107, 70, 0.24);
}

.status.error {
  color: var(--error);
  background: rgba(163, 60, 36, 0.12);
  border-color: rgba(163, 60, 36, 0.24);
}

code {
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.92em;
}

.debug-log {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: #171511;
  color: #f7f0e4;
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 28px;
  }

  .panel-grid,
  .form-grid,
  .sticker-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 20px;
    border-radius: 22px;
  }

  .panel-head,
  .sticker-header {
    align-items: start;
    flex-direction: column;
  }
}
