/* ---------- Create Your Own Jabari ---------- */
.back-btn { text-decoration: none; background: var(--bg-2); animation: none; border: 1px solid rgba(255,255,255,.15); }
.create { max-width: 1280px; margin: 0 auto; padding: 50px clamp(16px, 4vw, 48px) 90px; }
.create-intro .sec-title { font-size: clamp(34px, 6vw, 64px); }
.local-note {
  display: inline-block; margin: 0 0 30px; padding: 10px 16px; border-radius: 12px;
  background: rgba(34,228,255,.1); border: 1px solid rgba(34,228,255,.35); color: #bff6ff;
}

.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 36px; align-items: start; }

/* EDITOR */
.editor fieldset {
  border: 1px solid rgba(255,255,255,.1); background: var(--bg-2); border-radius: var(--radius);
  padding: 20px 22px 22px; margin: 0 0 18px; min-width: 0;
}
.editor legend {
  font-family: var(--display); font-size: 20px; padding: 0 8px; margin-left: -8px;
  display: flex; align-items: center; gap: 10px;
}
.editor legend span {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--hot); font-size: 15px;
}
.editor label { display: block; font-weight: 600; color: var(--muted); margin-top: 12px; }
.editor label small { font-weight: 400; opacity: .8; }
.editor input:not([type=file]), .editor textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  border: 2px solid rgba(255,255,255,.12); background: #0b0917; color: var(--ink);
  font: 600 17px/1.4 var(--body); resize: vertical;
}
.editor input:focus, .editor textarea:focus { outline: none; border-color: var(--lime); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.three input { margin-top: 0 !important; }
.help { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }
.safety { background: rgba(255,225,77,.08); border: 1px solid rgba(255,225,77,.3); color: #ffeFA0; padding: 12px 14px; border-radius: 12px; }

.drop {
  display: grid !important; place-items: center; gap: 4px; margin: 0 !important; padding: 26px;
  border: 3px dashed rgba(255,255,255,.2); border-radius: 18px; cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.drop b { color: var(--ink); font-size: 20px; }
.drop:hover, .drop.over { border-color: var(--lime); background: rgba(198,255,0,.06); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 3px solid transparent; }
.thumb.hero { border-color: var(--yellow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; font-size: 13px; background: rgba(0,0,0,.7);
}
.thumb .star { left: 4px; top: 4px; }
.thumb.hero .star { background: var(--yellow); }
.thumb .del { right: 4px; top: 4px; }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.theme {
  border: 3px solid transparent; border-radius: 14px; padding: 10px; text-align: left;
  font-weight: 800; background: var(--t-bg);
}
.theme.on { border-color: var(--ink); }
.theme i { display: flex; gap: 4px; margin-bottom: 8px; }
.theme i b { width: 18px; height: 18px; border-radius: 50%; }

.editor-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.danger { border-color: #ff6b6b !important; color: #ff9b9b; box-shadow: 5px 5px 0 #ff6b6b !important; }
.saved { color: var(--lime); font-weight: 600; min-height: 1.5em; }

/* PREVIEW */
.preview-wrap { position: sticky; top: 90px; }
.preview-label { font-weight: 800; color: var(--muted); letter-spacing: .12em; margin: 0 0 10px; font-size: 13px; }
.preview {
  border-radius: 36px; border: 10px solid #26223d; overflow: hidden;
  height: min(780px, calc(100vh - 150px)); box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.preview .jb { height: 100%; overflow-y: auto; }
.exit-full { display: none; }
.preview.full {
  position: fixed; inset: 0; z-index: 90; border: 0; border-radius: 0; height: auto;
}
.preview.full .exit-full {
  display: grid; place-items: center; position: fixed; z-index: 2; top: calc(14px + env(safe-area-inset-top)); right: 14px;
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #111; font-weight: 800; font-size: 18px;
}
.preview.full .jb-hero { padding-top: 70px; }
.preview.full .jb-face-wrap { width: min(340px, 72%); }
.preview.full .jb > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.preview.full .jb-ticker { max-width: none; }

/* THE JABARI PAGE (themeable) */
.jb {
  --a: #ff2e88; --b: #22e4ff; --c: #c6ff00; --d: #ffe14d; --jbg: #0d0b1a;
  background: radial-gradient(600px 300px at 90% -5%, color-mix(in srgb, var(--a) 35%, transparent), transparent 70%), var(--jbg);
  color: #fff; font-family: var(--body);
}
.jb-hero { text-align: center; padding: 34px 20px 30px; }
.jb-title { font-family: var(--display); font-weight: 400; margin: 0; line-height: .92; font-size: clamp(44px, 11vw, 70px); word-break: break-word; }
.jb-title span { display: block; }
.jb-title .l1 { color: var(--d); text-shadow: 4px 4px 0 var(--a); animation: wob 3s ease-in-out infinite; }
.jb-title .l2 { color: transparent; -webkit-text-stroke: 2px var(--b); animation: wob 3s ease-in-out infinite reverse; }
.jb-tag { color: rgba(255,255,255,.75); margin: 14px 0 26px; font-size: 18px; }
.jb-face-wrap { position: relative; width: min(250px, 72%); margin: 0 auto 10px; }
.jb-face {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  background: #222; font-size: 90px;
  box-shadow: 0 0 0 6px var(--a), 0 0 0 12px var(--jbg), 0 0 0 15px var(--b), 0 0 60px color-mix(in srgb, var(--a) 50%, transparent);
}
.jb-face img { width: 100%; height: 100%; object-fit: cover; }
.jb-face.pop, .jb-bubble.pop { animation: pop .35s; }
.jb-bubble {
  position: absolute; top: -10px; right: -18px; background: #fff; color: #111; font-weight: 800; font-size: 15px;
  padding: 8px 12px; border-radius: 16px 16px 16px 4px; transform: rotate(6deg); box-shadow: 3px 3px 0 var(--a); max-width: 60%;
}
.jb-sticker {
  position: absolute; font-family: var(--display); font-size: 11px; padding: 5px 9px; border-radius: 7px; color: #111;
  box-shadow: 2px 2px 0 rgba(0,0,0,.5); white-space: nowrap; pointer-events: none;
}
.jb-sticker:empty { display: none; }
.jb-sticker.k0 { background: var(--d); left: -24px; top: 22%; transform: rotate(-12deg); }
.jb-sticker.k1 { background: var(--b); right: -24px; top: 60%; transform: rotate(9deg); }
.jb-sticker.k2 { background: var(--a); color: #fff; left: -10px; bottom: 12%; transform: rotate(7deg); }
.jb-count {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--c); color: #111; font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 999px; border: 3px solid var(--jbg);
}
.jb-ticker { background: var(--c); color: #111; overflow: hidden; border-block: 3px solid #111; transform: rotate(-1.5deg); margin: 16px -10px; }
.jb-ticker-track { display: flex; width: max-content; animation: scroll 30s linear infinite; }
.jb-ticker-track span { font-family: var(--display); font-size: 14px; padding: 9px 20px; white-space: nowrap; }
.jb-sec { padding: 30px 20px 0; }
.jb-sec h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0 0 16px; color: var(--a); }
.jb-roulette { text-align: center; background: color-mix(in srgb, var(--a) 14%, #111); border-radius: 22px; padding: 22px; }
.jb-slot { width: 170px; aspect-ratio: 1; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 5px solid var(--d); background: #222; display: grid; place-items: center; font-size: 70px; }
.jb-slot img { width: 100%; height: 100%; object-fit: cover; }
.jb-slot.spinning img { filter: blur(3px) saturate(1.6); }
.jb-mood { font-family: var(--display); font-size: 22px; line-height: 1.15; margin: 16px 0 18px; min-height: 2.3em; }
.jb .btn { box-shadow: 4px 4px 0 #fff; border-color: #fff; }
.jb .btn-hot { background: var(--a); }
.jb .btn-lime { background: var(--c); }
.jb-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.jb-wall button { padding: 0; border: 3px solid #fff; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: #222; transition: transform .15s; }
.jb-wall button:hover { transform: scale(1.08) rotate(var(--r, 3deg)); }
.jb-wall img { width: 100%; height: 100%; object-fit: cover; }
.jb-empty { grid-column: 1 / -1; color: rgba(255,255,255,.6); text-align: center; padding: 20px; border: 2px dashed rgba(255,255,255,.2); border-radius: 14px; }
.jb-gib { background: var(--d); color: #111; border-radius: 22px; padding: 22px; border: 3px solid #111; box-shadow: 8px 8px 0 var(--a); }
.jb-gib p { font-family: var(--display); font-size: 20px; line-height: 1.2; margin: 0 0 18px; }
.jb-gib .btn { box-shadow: 4px 4px 0 #111; border-color: #111; color: #fff; }
.jb-foot { text-align: center; color: rgba(255,255,255,.5); font-size: 13px; padding: 36px 20px calc(30px + env(safe-area-inset-bottom)); }

/* Promo section on Ari's page */
.cyo { padding-bottom: 0; }
.cyo-card {
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
  background: linear-gradient(120deg, var(--hot), var(--violet)); border-radius: 32px; padding: clamp(28px, 5vw, 50px);
  border: 4px solid var(--ink); box-shadow: 12px 12px 0 var(--lime); overflow: hidden; position: relative;
}
.cyo-card h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 5vw, 56px); line-height: 1; margin: 0 0 12px; }
.cyo-card p { margin: 0; font-size: 20px; max-width: 520px; }
.cyo-faces { display: flex; }
.cyo-faces span {
  width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--ink); margin-left: -22px;
  display: grid; place-items: center; font-size: 44px; background: var(--bg-2);
}
.cyo-faces span:nth-child(2) { background: var(--yellow); transform: rotate(-8deg); }
.cyo-faces span:nth-child(3) { background: var(--cyan); transform: rotate(6deg); }
.cyo-card .btn { margin-top: 24px; background: var(--ink); color: #111; }
.create-link { color: var(--lime) !important; }

@media (max-width: 960px) {
  .studio { grid-template-columns: 1fr; }
  .preview-wrap { position: static; }
  .preview { height: 640px; }
  .cyo-card { grid-template-columns: 1fr; text-align: center; }
  .cyo-card p { margin: 0 auto; }
  .cyo-faces { justify-content: center; order: -1; }
}
@media (max-width: 640px) {
  .three { grid-template-columns: 1fr; }
  .back-btn { margin-left: auto; }
}
body.pv-full .preview-wrap { position: static; }
body.pv-full { overflow: hidden; }
.studio > * { min-width: 0; }

/* Example pages open read-only, straight into full screen */
.pv-cta { display: none; text-align: center; padding: 34px 20px 0; }
.pv-cta p { margin: 0 0 14px; color: rgba(255,255,255,.7); }
body.example-mode .pv-cta { display: block; }
body.example-mode .create { visibility: hidden; }
body.example-mode .preview.full { visibility: visible; }

/* Jabari gallery (main page) */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.jcard {
  --a: #ff2e88; --b: #22e4ff; --c: #c6ff00; --d: #ffe14d; --jbg: #0d0b1a;
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 16px 20px; border-radius: var(--radius); text-decoration: none; color: #fff; min-height: 300px;
  background: radial-gradient(260px 140px at 80% 0%, color-mix(in srgb, var(--a) 40%, transparent), transparent 70%), var(--jbg);
  border: 2px solid rgba(255,255,255,.1); transition: transform .15s, border-color .15s;
}
a.jcard:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--a); }
.jc-badge { position: absolute; top: 12px; left: 12px; background: var(--c); color: #111; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 8px; letter-spacing: .05em; }
.jcard.mine { border-color: var(--d); box-shadow: 0 0 0 3px var(--d); }
.jcard.mine .jc-badge { background: var(--d); }
.jc-face {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 60px;
  margin: 10px 0 16px; background: #222; box-shadow: 0 0 0 5px var(--a), 0 0 0 9px var(--jbg), 0 0 0 12px var(--b);
}
.jc-face img { width: 100%; height: 100%; object-fit: cover; }
.jc-title { font-family: var(--display); line-height: .95; font-size: 30px; word-break: break-word; }
.jc-title b { display: block; font-weight: 400; }
.jc-title .l1 { color: var(--d); text-shadow: 3px 3px 0 var(--a); }
.jc-title .l2 { color: transparent; -webkit-text-stroke: 1.5px var(--b); }
.jc-tag { color: rgba(255,255,255,.7); font-size: 15px; margin-top: 10px; }
.jc-edit { margin-top: auto; padding-top: 14px; font-weight: 800; color: var(--d); }
.jcard.make, .jcard.soon { justify-content: center; background: var(--bg-2); border: 3px dashed rgba(255,255,255,.2); }
.jcard.make { border-color: var(--lime); }
.jcard.make .jc-title .l1 { color: var(--lime); text-shadow: 3px 3px 0 var(--hot); }
.jcard.make .jc-title .l2 { -webkit-text-stroke-color: var(--cyan); }
.jc-plus { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; font-size: 50px; margin-bottom: 16px; background: rgba(255,255,255,.06); }
.jcard.make .jc-plus { background: var(--lime); color: #111; font-weight: 800; }
.jcard.soon { opacity: .7; }
.jcard.soon .jc-title .l1 { color: var(--muted); text-shadow: none; }
.jcard.soon .jc-title .l2 { -webkit-text-stroke-color: var(--muted); }

/* ---------- Sign up ---------- */
.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 16px 80px; }
.auth-card {
  width: min(480px, 100%); background: var(--bg-2); border-radius: 28px; padding: clamp(24px, 6vw, 40px);
  border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--hot);
}
.auth-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.auth-steps i { flex: 1; height: 6px; border-radius: 9px; background: rgba(255,255,255,.12); }
.auth-steps i.on { background: var(--lime); }
.auth-title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 7vw, 42px); line-height: 1; margin: 0 0 12px; }
.auth-title span { color: var(--hot); }
.auth-sub { color: var(--muted); margin: 0 0 22px; }
.auth-sub b { color: var(--ink); word-break: break-all; }
.auth label { display: block; font-weight: 800; margin-bottom: 8px; }
.auth input {
  display: block; width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid rgba(255,255,255,.15);
  background: #0b0917; color: var(--ink); font: 600 18px var(--body);
}
.auth input:focus { outline: none; border-color: var(--lime); }
.code-input { font-family: var(--display) !important; font-size: 34px !important; letter-spacing: 12px; text-align: center; }
.btn.wide { width: 100%; justify-content: center; margin-top: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.auth-small { color: var(--muted); font-size: 15px; margin: 16px 0 0; text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); font-weight: 600; text-decoration: underline; }
.auth-error { background: rgba(255,80,80,.12); border: 1px solid rgba(255,80,80,.5); color: #ffb3b3; padding: 12px 14px; border-radius: 12px; margin: 18px 0 0; }
.handle-box { display: flex; align-items: center; border: 2px solid rgba(255,255,255,.15); border-radius: 14px; background: #0b0917; overflow: hidden; }
.handle-box:focus-within { border-color: var(--lime); }
.handle-box span { padding-left: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 16px; }
.handle-box input { border: 0 !important; padding-left: 2px; min-width: 0; }
.handle-status { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; color: var(--muted); }
.handle-status.good { color: var(--lime); }
.handle-status.bad { color: #ff9b9b; }
.done-burst { font-size: 64px; text-align: center; animation: pop .5s; }
[data-step="done"] { text-align: center; }
.claimed-link {
  font-family: var(--display); font-size: clamp(18px, 5vw, 24px); color: var(--lime); word-break: break-all;
  background: #0b0917; border-radius: 14px; padding: 14px; margin: 0 0 16px;
}

/* Account button in the nav */
.acct-btn {
  text-decoration: none; font-weight: 800; white-space: nowrap; border-radius: 999px; padding: 9px 16px;
  border: 2px solid var(--lime); color: var(--lime);
}
.acct-btn.in { border-color: rgba(255,255,255,.2); color: var(--ink); background: var(--bg-2); }
.acct-note a { color: var(--lime); font-weight: 800; }
@media (max-width: 640px) {
  .acct-btn { padding: 7px 12px; font-size: 14px; }
  .nav .sub-btn[data-subscribe] { display: none; }
  .nav nav + .app-btn:not([hidden]) ~ .acct-btn { display: none; }
}
@media (max-width: 640px) { .acct-btn ~ .back-btn { display: none; } .nav .acct-btn { margin-left: auto; } }
