/* ===== Design tokens ===== */
:root {
  --bg: #16151d;
  --surface: #201f29;
  --surface-2: #2a2934;
  --border: #38374420;
  --border-strong: #4a4956;
  --text-primary: #f4f2ec;
  --text-secondary: #a6a4b3;
  --text-muted: #6f6d7c;
  --accent: #ffb238;
  --accent-dark: #cf8f22;
  --accent-2: #57c7b6;
  --danger: #e2574c;
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
}

p { line-height: 1.6; color: var(--text-secondary); }

a { color: var(--accent); text-decoration: none; }

/* ===== Layout shell ===== */
.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-strong);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand .dot { color: var(--accent); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #241a04; }
.btn-primary:hover { background: #ffbf5c; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
}

/* ===== Form controls ===== */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

select, input[type="text"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

/* ===== Step indicator ===== */
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.steps span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-strong);
}

.steps span.active { background: var(--accent); }
.steps span.done { background: var(--accent-2); }

/* ===== Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.thumb {
  aspect-ratio: 3/4;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.thumb.selected { border-color: var(--accent); border-width: 2px; }

.thumb img, .thumb video, .thumb canvas {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ===== Print ===== */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea {
    position: absolute; top: 0; left: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .shell { padding: 20px 16px 48px; }
}
