:root {
  --bg: #fffdf5;
  --card: #ffffff;
  --ink: #24233a;
  --muted: #62607a;
  --border: #e5e1d3;
  --accent: #ffd23a;
  --accent-dark: #e6b81d;
  --primary: #fe2c55;
  --primary-hover: #e02046;
  --ok-bg: #ecfdf5;
  --ok-ink: #065f46;
  --err-bg: #fef2f2;
  --err-ink: #991b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  padding: 14px 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.brand h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  margin: 0;
}

.subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.top-links {
  display: flex;
  gap: 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.top-links a {
  color: var(--ink);
  text-decoration: none;
}

.top-links a:hover { text-decoration: underline; }

.main {
  padding: 24px 16px 48px;
}

.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(36, 35, 58, 0.04);
}

.hidden { display: none !important; }

.badge {
  display: inline-block;
  background: #fff7d6;
  color: #7c5800;
  border: 1px solid #f4dc85;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.env-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.mode-switch select,
select,
textarea,
input[type="file"] {
  font-family: inherit;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
}

select,
textarea {
  width: 100%;
}

.scope-box {
  background: #faf8ef;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 18px;
  font-size: 0.92rem;
}

.scope-box ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f5f3ea;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.legal-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}

.creator-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.creator-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.creator-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-handle {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.creator-limits {
  font-size: 0.84rem;
  color: var(--muted);
}

.field {
  margin-bottom: 18px;
}

.field > label,
.fieldset legend {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.req { color: var(--primary); }

.hint {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 5px;
}

.video-preview {
  margin-top: 10px;
  max-height: 280px;
  border-radius: 12px;
  background: #000;
}

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

.radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
}

.fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  cursor: pointer;
  font-weight: 600;
}

.toggle-row.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sub-options {
  margin-left: 24px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

.legal-box {
  background: #faf8ef;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 700;
  background: var(--err-bg);
  color: var(--err-ink);
  border: 1px solid #fecaca;
}

.alert.ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: #a7f3d0;
}

.status-panel {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f5f3ea;
  border: 1px solid var(--border);
}

.doc-page h2 {
  font-family: 'Fredoka', sans-serif;
  margin-top: 22px;
}
