:root {
  --bg: #fffaf3;
  --ink: #22172f;
  --ink-soft: #5d5170;
  --line: #eadfce;
  --card: #ffffff;
  --sun: #ffb703;
  --yanna: #ff5d8f;
  --kaya: #14b8a6;
  --bria: #8b5cf6;
  --shadow: 0 10px 30px rgba(34, 23, 47, 0.10);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17111f;
    --ink: #f7f1ff;
    --ink-soft: #c2b6d6;
    --line: #2f2540;
    --card: #211830;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, .brand { font-family: "Fredoka", "Nunito", sans-serif; letter-spacing: -0.01em; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 700; text-decoration: none; }
.brand .star { color: var(--sun); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-weight: 800; font-size: 15px; padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 480px) {
  .brand { font-size: 22px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 9px; font-size: 14px; }
}
.nav a.yanna:hover, .nav a.yanna[aria-current="page"] { color: var(--yanna); }
.nav a.kaya:hover, .nav a.kaya[aria-current="page"] { color: var(--kaya); }
.nav a.bria:hover, .nav a.bria[aria-current="page"] { color: var(--bria); }

/* ---------- home hero ---------- */
.hero { position: relative; text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(56px, 13vw, 120px); line-height: 1; font-weight: 700; }
.hero h1 .s1 { color: var(--yanna); }
.hero h1 .s2 { color: var(--kaya); }
.hero h1 .s3 { color: var(--bria); }
.hero p { font-size: clamp(17px, 3.6vw, 21px); color: var(--ink-soft); margin-top: 12px; }
.sparkle { position: absolute; color: var(--sun); pointer-events: none; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .sparkle { animation: none; } }

/* ---------- artist cards on the home page ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 12px 0 48px; }
.card { position: relative; display: block; text-decoration: none; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s ease; }
.card:hover { transform: translateY(-4px) rotate(-0.5deg); }
.card .cover { aspect-ratio: 4 / 3; background: var(--accent); display: grid; place-items: center; overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover .initial { font-family: "Fredoka", sans-serif; font-size: 96px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.card .label { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.card h2 { font-size: 26px; color: var(--accent); }
.card .count { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.yanna { --accent: var(--yanna); }
.kaya { --accent: var(--kaya); }
.bria { --accent: var(--bria); }

/* ---------- artist page ---------- */
.artist-head { padding: 32px 0 24px; text-align: center; }
.artist-head h1 { font-size: clamp(48px, 11vw, 88px); line-height: 1; color: var(--accent); }
.artist-head p { color: var(--ink-soft); font-size: 18px; margin-top: 8px; }
.artist-head .bio { max-width: 560px; margin-left: auto; margin-right: auto; white-space: pre-line; }
.card .card-bio { padding: 0 18px 16px; margin-top: -6px; font-size: 14px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.section-title { font-size: 28px; margin: 8px 0 16px; }

/* masonry via columns: keeps each piece's real shape */
.gallery { columns: 3 260px; column-gap: 16px; margin-bottom: 48px; }
.piece { break-inside: avoid; margin-bottom: 16px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; width: 100%; display: block; }
.piece .open { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.piece img { width: 100%; height: auto; background: var(--line); }
.piece .foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-right: 10px; }
.piece .foot .meta { flex: 1; min-width: 0; }
.piece .meta { padding: 10px 14px 12px; }
.piece .meta strong { display: block; font-size: 16px; }
.piece .meta span { font-size: 13px; color: var(--ink-soft); }
.piece .by { font-weight: 800; color: var(--accent); }

.empty { text-align: center; padding: 56px 16px; color: var(--ink-soft); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 48px; }
.empty .big { font-size: 44px; color: var(--sun); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(15, 10, 22, 0.92); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox figure { max-width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 160px); width: auto; border-radius: 12px; }
.lightbox figcaption { color: #f4eefc; text-align: center; margin-top: 12px; max-width: 640px; }
.lightbox figcaption strong { display: block; font-family: "Fredoka", sans-serif; font-size: 22px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 36px; text-align: center; font-size: 14px; color: var(--ink-soft); }
footer a { font-weight: 800; }

/* ---------- studio ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.login { max-width: 400px; margin: 40px auto; }
.login h1 { font-size: 34px; margin-bottom: 6px; }
label { display: block; font-weight: 800; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent, var(--bria)); }
textarea { min-height: 70px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 16px; border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer; background: var(--accent, var(--bria)); color: #fff; text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 2px solid var(--line); }
.btn.danger { background: transparent; color: #e11d48; border: 2px solid rgba(225, 29, 72, 0.35); padding: 8px 14px; font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.error { color: #e11d48; font-weight: 700; margin-top: 12px; }
.ok { color: var(--kaya); font-weight: 700; margin-top: 12px; }

.drop { border: 3px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop .big { font-size: 40px; }
.drop strong { display: block; font-size: 18px; }
.drop span { color: var(--ink-soft); font-size: 14px; }

.queue { display: grid; gap: 14px; margin-top: 18px; }
.qitem { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; background: var(--bg); border-radius: 16px; padding: 12px; }
.qitem img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.qitem .status { font-size: 14px; font-weight: 800; margin-top: 8px; }
@media (max-width: 480px) { .qitem { grid-template-columns: 1fr; } .qitem img { width: 100%; height: 200px; } }

.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mine .tile { background: var(--bg); border-radius: 14px; overflow: hidden; }
.mine .tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mine .tile .tmeta { padding: 8px 10px 10px; font-size: 13px; }
.mine .tile .tmeta strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- commissions & sales ---------- */
.chip { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.chip.open { background: color-mix(in srgb, var(--kaya) 16%, transparent); color: var(--kaya); }
.chip.closed { background: var(--line); color: var(--ink-soft); }
.card .chip.open { margin: 0 18px 16px; }
.commissions { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 0 auto 28px; max-width: 720px; border-top: 5px solid var(--accent); }
.comm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.comm-head h2 { font-size: 26px; color: var(--accent); }
.comm-info { color: var(--ink-soft); white-space: pre-line; margin-bottom: 12px; }
.prices { list-style: none; margin: 0 0 18px; display: grid; gap: 6px; }
.prices li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--bg); border-radius: 12px; }
.prices strong { color: var(--accent); white-space: nowrap; }
.piece { position: relative; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; font-size: 13px; font-weight: 800; padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.badge.sale { background: var(--sun); color: #2b1d00; }
.badge.sold { background: #22172f; color: #fff; }
.lightbox .btn.buy { position: static; width: auto; height: auto; border-radius: 999px; margin-top: 14px; background: var(--sun); color: #2b1d00; font-size: 16px; }
.lightbox .btn.buy:hover { background: #ffc933; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 10, 22, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal-panel { background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; text-align: left; }
.modal-panel h2 { font-size: 26px; color: var(--accent); }
.modal-panel .sub { color: var(--ink-soft); margin: 4px 0 6px; }
.modal-panel .fine { font-size: 13px; color: var(--ink-soft); margin: 14px 0; }
.modal-panel .big-star { font-size: 48px; color: var(--sun); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* studio: commissions + sale controls */
.switch { display: flex; align-items: center; gap: 10px; font-weight: 800; margin: 14px 0 4px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent, var(--bria)); }
.price-row { display: grid; grid-template-columns: 1fr auto 72px auto; gap: 6px; align-items: center; margin-top: 6px; }
.price-row .dollar { font-weight: 800; color: var(--ink-soft); }
.price-row .btn.ghost { padding: 8px 12px; }
.badge-inline { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.badge-inline.available { background: var(--sun); color: #2b1d00; }
.badge-inline.sold { background: var(--line); color: var(--ink-soft); }

/* studio: art details + recently removed */
.details-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.details-row input[type=month] { grid-column: 1 / -1; width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.removed-list { display: grid; gap: 8px; }
.removed-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.removed-row strong { display: block; }
.removed-row span { font-size: 13px; color: var(--ink-soft); }

/* ---------- favourites, avatars, hearts ---------- */
.badge.pin { left: auto; right: 10px; background: var(--sun); color: #2b1d00; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; font-size: 16px; }
.heart { flex-shrink: 0; margin-top: 8px; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 15px; color: var(--ink-soft); padding: 6px 8px; border-radius: 999px; cursor: pointer; }
.heart:hover { background: color-mix(in srgb, var(--accent, #ff5d8f) 12%, transparent); }
.heart.on { color: #ff3d7a; }
.box-heart { margin-top: 8px; }
.box-heart .heart { color: #f4eefc; font-size: 18px; background: rgba(255,255,255,0.1); padding: 8px 16px; }
.box-heart .heart.on { color: #ff6b98; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--line); border: 3px solid var(--accent); }
.avatar.lg { width: 116px; height: 116px; margin: 0 auto 14px; box-shadow: var(--shadow); }
.avatar.sm { width: 38px; height: 38px; border-width: 2px; }
.card .who { display: flex; align-items: center; gap: 10px; }
.artist-head { background: radial-gradient(600px 220px at 50% 0, color-mix(in srgb, var(--accent) 22%, transparent), transparent 75%); border-radius: var(--radius); }

/* studio: my page + pins */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.swatch.on { border-color: var(--ink); transform: scale(1.1); }
.tile-stats { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 800; color: #ff3d7a; }
.pin-btn { border: 0; background: var(--line); color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.pin-btn.on { background: var(--sun); color: #2b1d00; }

/* private pages */
.private-note { display: inline-block; margin-top: 12px !important; font-size: 14px !important; font-weight: 800; color: var(--ink) !important; background: var(--card); border: 2px dashed var(--accent); padding: 6px 14px; border-radius: 999px; }
.privacy-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.privacy-opts label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 800; }
.privacy-opts input { accent-color: var(--accent, var(--bria)); width: 18px; height: 18px; }
.privacy-opts label:has(input:checked) { border-color: var(--accent, var(--bria)); }
