/* =====================================================================
 * TwibbonX — styles.css
 * Hand-written, no frameworks. Violet brand with a violet→magenta
 * gradient accent, Plus Jakarta Sans, soft layered shadows, and a
 * responsive layout (desktop / tablet / phone breakpoints).
 * Class names are kept stable: JS templates render against them.
 * ===================================================================== */

:root {
  --brand: #6c4cf0;
  --brand-strong: #5a38e0;
  --brand-dark: #4c2fb3;
  --brand-light: #f0ebff;
  --brand-soft: #f7f4ff;
  --grad: linear-gradient(120deg, #6c4cf0 0%, #9d4cf0 52%, #e34fb8 100%);
  --ink: #1c1930;
  --muted: #66617e;
  --line: #e6e2f2;
  --bg: #faf9fd;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 16px 40px rgba(76, 47, 179, 0.13);
  --shadow-sm: 0 3px 12px rgba(76, 47, 179, 0.07);
  --ring: 0 0 0 4px rgba(108, 76, 240, 0.16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: #fff; }

img { max-width: 100%; display: block; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 0.5em; font-weight: 800; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 720px; }

.section { padding: 76px 0; }
.section-alt { background: #fff; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.empty { color: var(--muted); text-align: center; padding: 56px 0; font-size: 1.02rem; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(108, 76, 240, 0.35); }
.btn-primary:hover { background: var(--grad); color: #fff; filter: brightness(1.06); box-shadow: 0 12px 28px rgba(108, 76, 240, 0.42); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

.btn-lg { padding: 15px 32px; font-size: 1.05rem; min-height: 54px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.copied { background: #16a34a; color: #fff; border-color: #16a34a; box-shadow: 0 8px 22px rgba(22, 163, 74, 0.3); }

.link { background: none; border: none; color: var(--brand-dark); font: inherit; cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
.link-more { font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(76, 47, 179, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.22rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(108, 76, 240, 0.4);
}

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }
.main-nav a.active { color: var(--brand-dark); background: var(--brand-light); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search { display: flex; }
.header-search input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: 0.9rem;
  width: 216px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.header-search input:focus { border-color: var(--brand); background: #fff; box-shadow: var(--ring); }

.nav-toggle {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1.15rem;
  line-height: 1;
  padding: 10px 13px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: 84px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(560px 340px at 12% -60px, rgba(108, 76, 240, 0.16), transparent 70%),
    radial-gradient(520px 320px at 88% -40px, rgba(227, 79, 184, 0.13), transparent 70%),
    radial-gradient(700px 420px at 55% 115%, rgba(157, 76, 240, 0.1), transparent 70%),
    linear-gradient(180deg, #f4f1ff 0%, var(--bg) 92%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-copy > p { font-size: 1.13rem; color: var(--muted); max-width: 34em; }

.hero-cta { display: flex; gap: 12px; margin: 30px 0; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 38px; margin-top: 10px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.55rem; letter-spacing: -0.02em; }
.hero-stats span { color: var(--muted); font-size: 0.88rem; }

.hero-art { position: relative; height: 430px; }
.hero-frame {
  position: absolute;
  width: 240px;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(76, 47, 179, 0.25);
  border: 6px solid #fff;
  animation: float 6s ease-in-out infinite;
}
.hero-frame.f1 { top: 0; left: 8%; transform: rotate(-6deg); }
.hero-frame.f2 { top: 92px; right: 4%; width: 262px; animation-delay: -2s; }
.hero-frame.f3 { bottom: 0; left: 30%; width: 222px; animation-delay: -4s; }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

/* ------------------------------------------------------------------ */
/* Sections, cards, grids                                              */
/* ------------------------------------------------------------------ */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; margin: 0; }

.grid { display: grid; gap: 26px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 1; overflow: hidden; background: var(--brand-light); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 1.03rem; margin: 0; line-height: 1.35; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand-dark); text-decoration: none; }
.card-meta { display: flex; align-items: center; gap: 10px; }
.creator-name { color: var(--muted); font-size: 0.9rem; }
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.supporters { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 0.72rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }

/* Steps */
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(108, 76, 240, 0.35);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

/* CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  border-radius: 28px;
  color: #fff;
  text-align: center;
  padding: 68px 32px;
  box-shadow: 0 24px 50px rgba(108, 76, 240, 0.35);
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 220px at 15% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    radial-gradient(460px 260px at 88% 110%, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 12px; letter-spacing: -0.02em; }
.cta-banner p { opacity: 0.92; margin-bottom: 30px; }
.cta-banner .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 26px rgba(28, 20, 70, 0.28); }
.cta-banner .btn-primary:hover { background: #fff; color: var(--brand-dark); filter: none; box-shadow: 0 14px 32px rgba(28, 20, 70, 0.32); }

/* ------------------------------------------------------------------ */
/* Explore                                                             */
/* ------------------------------------------------------------------ */
.page-head { padding: 54px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.2rem); letter-spacing: -0.025em; margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0 0 8px; font-size: 1.03rem; }

.toolbar {
  display: flex;
  gap: 12px;
  margin: 26px 0 30px;
  flex-wrap: wrap;
}
.toolbar input[type="search"] {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 18px;
  font: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.toolbar input[type="search"]:focus { border-color: var(--brand); box-shadow: var(--ring); }
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  font: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.toolbar select:focus { border-color: var(--brand); box-shadow: var(--ring); }

/* ------------------------------------------------------------------ */
/* Campaign page + studio                                              */
/* ------------------------------------------------------------------ */
.campaign-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  padding: 44px 0 68px;
  align-items: start;
}

.studio-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 96px;
}

.studio-canvas-wrap {
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, #ddd6f5 1px, transparent 1.6px) 0 0 / 22px 22px,
    var(--brand-soft);
  border: 1px solid var(--line);
}
#studioCanvas { width: 100%; height: auto; cursor: grab; display: block; touch-action: none; }
#studioCanvas:active { cursor: grabbing; }

.studio-controls { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

.zoom-row { display: flex; align-items: center; gap: 12px; }
.zoom-row input[type="range"] { flex: 1; accent-color: var(--brand); height: 28px; cursor: pointer; }
.zoom-row .zoom-label { min-width: 52px; text-align: right; font-weight: 700; font-size: 0.9rem; }

.control-row { display: flex; gap: 10px; flex-wrap: wrap; }
.control-row .btn { flex: 1; }

.btn-download {
  width: 100%;
  padding: 17px;
  font-size: 1.1rem;
  border-radius: 16px;
  min-height: 58px;
}

.gallery-cta {
  background: var(--brand-soft);
  border: 1.5px dashed var(--brand);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}
.gallery-cta p { margin: 0 0 12px; font-size: 0.95rem; }

.campaign-info h1 { font-size: clamp(1.6rem, 3.2vw, 2.05rem); letter-spacing: -0.025em; }
.creator-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.creator-row .who { display: flex; flex-direction: column; }
.creator-row .who b { font-size: 1rem; }
.creator-row .who span { color: var(--muted); font-size: 0.88rem; }

.supporter-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 19px;
  font-weight: 600;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.supporter-line b {
  font-size: 1.15rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.about-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.about-box h3 { font-size: 1rem; margin-bottom: 8px; }
.about-box p { margin: 0; color: var(--muted); }

.shortlink { display: flex; gap: 8px; margin-bottom: 30px; }
.shortlink input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 15px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--muted);
  outline: none;
}
.shortlink input:focus { border-color: var(--brand); box-shadow: var(--ring); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-sm); }
.gallery-empty { color: var(--muted); font-size: 0.92rem; }

/* ------------------------------------------------------------------ */
/* Create flow                                                         */
/* ------------------------------------------------------------------ */
.stepper {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 30px 0;
}
.stepper li {
  flex: 1;
  text-align: center;
  padding: 13px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.94rem;
}
.stepper li.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(108, 76, 240, 0.3); }
.stepper li.done { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.dropzone {
  border: 2px dashed #cfc6ee;
  border-radius: var(--radius);
  background: #fff;
  padding: 58px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--shadow-sm); }
.dropzone p { margin: 6px 0; }

.warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 14px;
  padding: 13px 18px;
  margin-top: 16px;
  font-size: 0.92rem;
}

.preview-row { margin-top: 24px; }
.preview-row canvas {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.form-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

form label { display: block; font-weight: 600; margin-bottom: 18px; }
form label input,
form label textarea,
form label select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 400;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form label input:focus,
form label textarea:focus,
form label select:focus { border-color: var(--brand); box-shadow: var(--ring); }
form label textarea { resize: vertical; }

.slug-row { display: flex; align-items: center; gap: 0; margin-top: 8px; }
.slug-row span {
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 13px 0 0 13px;
  padding: 13px 0 13px 16px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}
.slug-row input {
  border-radius: 0 13px 13px 0 !important;
  margin-top: 0 !important;
}

fieldset.visibility { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: #fff; }
fieldset.visibility legend { font-weight: 700; padding: 0 8px; }
fieldset.visibility label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 10px; cursor: pointer; }
fieldset.visibility label:last-child { margin-bottom: 0; }
fieldset.visibility small { display: block; color: var(--muted); }
fieldset.visibility input[type="radio"] { accent-color: var(--brand); margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* Leaderboard                                                         */
/* ------------------------------------------------------------------ */
.board-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 26px 0 68px;
}
table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { padding: 17px 22px; text-align: left; }
table.board th {
  background: var(--brand-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.board tbody tr { border-top: 1px solid var(--line); transition: background 0.12s ease; }
table.board tbody tr:hover { background: var(--brand-soft); }
.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  font-weight: 800;
  background: var(--bg);
  border: 1px solid var(--line);
}
.rank.r1 { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.rank.r2 { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.rank.r3 { background: #ffedd5; border-color: #fdba74; color: #9a3412; }
.board-creator { display: flex; align-items: center; gap: 12px; }
.board-creator b { display: block; }
.board-creator span { color: var(--muted); font-size: 0.88rem; }
td.num { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Pricing                                                             */
/* ------------------------------------------------------------------ */
.price-grid { margin: 36px 0 44px; }
.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 38px 34px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.featured {
  border: 2px solid var(--brand);
  box-shadow: 0 20px 46px rgba(108, 76, 240, 0.22);
}
.price-card .tier { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; color: var(--muted); }
.price-card.featured .tier { color: var(--brand-dark); }
.price { font-size: 3.1rem; font-weight: 800; letter-spacing: -0.03em; margin: 12px 0 4px; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 30px; flex: 1; }
.price-card li { padding: 8px 0 8px 30px; position: relative; color: var(--ink); }
.price-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 800;
}
.price-card li.off { color: var(--muted); text-decoration: line-through; }
.price-card li.off::before { content: "\2715"; color: #cbd5e1; }
.flag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 17px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 18px rgba(108, 76, 240, 0.35);
  white-space: nowrap;
}

.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 21px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq details:hover { border-color: #cfc6ee; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { font-weight: 700; cursor: pointer; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
  background: #17122b;
  color: #cfc9e6;
  padding: 60px 0 30px;
  margin-top: 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 42px;
}
.site-footer .logo { color: #fff; }
.footer-tag { font-size: 0.92rem; margin-top: 12px; max-width: 22em; color: #a79fd0; }
.site-footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 15px; letter-spacing: 0.02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #cfc9e6; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  font-size: 0.85rem;
  color: #9790bd;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ------------------------------------------------------------------ */
/* Auth (login / signup)                                               */
/* ------------------------------------------------------------------ */
.auth-card {
  max-width: 448px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 40px 36px;
}
.auth-card h1 { margin-bottom: 4px; letter-spacing: -0.02em; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; margin-top: 22px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.auth-card input {
  font: inherit;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-card input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.form-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 0.9rem;
  margin: 0;
}
.auth-switch { text-align: center; margin-top: 20px; }

/* ------------------------------------------------------------------ */
/* Header account menu                                                 */
/* ------------------------------------------------------------------ */
#authArea { display: inline-flex; align-items: center; }
.avatar-btn { border: none; cursor: pointer; padding: 0; }
.avatar-xl { width: 84px; height: 84px; font-size: 1.7rem; }
.avatar-menu { position: relative; }
.avatar-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 224px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 60;
}
.avatar-dropdown .dd-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.avatar-dropdown a,
.avatar-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  background: none;
  border: none;
  cursor: pointer;
}
.avatar-dropdown a:hover,
.avatar-dropdown button:hover { background: var(--brand-light); text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Dashboard                                                           */
/* ------------------------------------------------------------------ */
.dash-profile {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px;
  margin-bottom: 26px;
}
.dash-who h1 { margin: 0 0 4px; letter-spacing: -0.02em; }
.dash-who p { margin: 0 0 6px; }
.dash-bio { color: var(--muted); }
.profile-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-width: 420px; }
.profile-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.profile-form input {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.profile-form input:focus { border-color: var(--brand); box-shadow: var(--ring); }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card b {
  font-size: 2rem;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-card span { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab {
  font: inherit;
  font-weight: 700;
  padding: 11px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--muted);
  white-space: nowrap;
}
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

.dash-row {
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
  transition: box-shadow 0.15s ease;
}
.dash-row:hover { box-shadow: var(--shadow); }
.dash-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); flex-shrink: 0; }
.dash-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar { height: 8px; background: var(--brand-light); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.dash-row-actions { display: flex; gap: 8px; flex-shrink: 0; }

.dash-gallery figure { margin: 0; }
.dash-gallery figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small / danger buttons */
.btn-sm { padding: 8px 15px; font-size: 0.85rem; min-height: 38px; }
.btn-danger { color: #b91c1c; }
.btn-danger:hover { border-color: #b91c1c; color: #b91c1c; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #1c1930;
  color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

/* Small desktop / large tablet landscape */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .section { padding: 56px 0; }
  .hero { padding: 60px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { height: 340px; max-width: 540px; }
  .hero-copy > p { max-width: none; }
  .cards-3 { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .price-grid { max-width: 560px; }
  .campaign-layout { grid-template-columns: 1fr; gap: 34px; padding: 34px 0 56px; }
  .studio-panel { position: static; }
  .header-search { display: none; }
  .stat-cards { gap: 14px; }
  .stat-card { padding: 20px; }
  .stat-card b { font-size: 1.7rem; }
}

/* Phones */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 46px 0; }
  .cards-4, .cards-2 { grid-template-columns: 1fr; }
  .cards-3 { max-width: none; }
  .grid { gap: 20px; }

  .header-inner { height: 64px; gap: 12px; }
  .logo { font-size: 1.22rem; }
  .logo-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 1.05rem; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    background: #fff;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 9px 15px; font-size: 0.85rem; min-height: 40px; }
  #authArea .avatar-btn .avatar { width: 36px; height: 36px; }

  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: clamp(2rem, 9.5vw, 2.5rem); }
  .hero-copy > p { font-size: 1.03rem; }
  .hero-cta .btn { flex: 1; }
  .hero-stats { gap: 22px; }
  .hero-stats b { font-size: 1.3rem; }
  .hero-art { height: 290px; }
  .hero-frame { width: 168px; border-width: 5px; }
  .hero-frame.f2 { width: 185px; top: 74px; }
  .hero-frame.f3 { width: 158px; }

  .page-head { padding: 38px 0 4px; }
  .toolbar { margin: 20px 0 24px; }
  .toolbar input[type="search"] { min-width: 0; flex-basis: 100%; }
  .toolbar select { flex: 1; }

  .section-head { flex-wrap: wrap; margin-bottom: 22px; }

  .studio-panel { padding: 16px; border-radius: 20px; }
  .campaign-info h1 { font-size: 1.55rem; }
  .shortlink { flex-wrap: wrap; }
  .shortlink .btn { width: 100%; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  .stepper li { padding: 10px 6px; font-size: 0.82rem; }
  .dropzone { padding: 40px 18px; }
  .form-actions .btn { flex: 1; }
  .slug-row span { font-size: 0.85rem; padding-left: 12px; }

  .board-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.board { min-width: 540px; }
  table.board th, table.board td { padding: 14px 16px; }
  table.board th:nth-child(3), table.board td:nth-child(3) { display: none; }

  .price-card { padding: 32px 26px; }
  .price { font-size: 2.6rem; }

  .cta-banner { padding: 48px 22px; border-radius: 22px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-bottom { justify-content: center; text-align: center; }

  .stat-cards { grid-template-columns: 1fr; }
  .dash-profile { flex-direction: column; padding: 24px; }
  .dash-row { flex-wrap: wrap; padding: 16px; }
  .dash-row-actions { width: 100%; }
  .dash-row-actions .btn { flex: 1; text-align: center; }
  .auth-card { padding: 30px 22px; border-radius: 20px; }

  .toast { bottom: 18px; width: calc(100vw - 32px); }
}

/* Small phones */
@media (max-width: 400px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .btn-primary { display: none; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-frame { animation: none; }
  .card, .step, .price-card, .btn { transition: none; }
  .card:hover, .step:hover, .price-card:hover, .btn:hover { transform: none; }
}
