:root {
  color-scheme: dark;
  --bg: #141218;
  --surface: #1e1b23;
  --raised: #28232e;
  --line: #39303e;
  --text: #f9f3fa;
  --muted: #b5a9bb;
  --pink: #ff47b7;
  --pink-light: #ff9ada;
  --green: #a7edc0;
  --radius: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 6% 0%, #5b214039, transparent 43%),
    radial-gradient(ellipse at 98% 90%, #35284b42, transparent 44%), var(--bg);
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button,
a,
input,
canvas {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible,
input:focus-visible {
  outline: 3px solid var(--pink-light);
  outline-offset: 5px;
}
button {
  touch-action: manipulation;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
button svg {
  pointer-events: none;
}
button {
  transition:
    background 0.18s,
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.shell {
  width: min(1160px, calc(100% - 64px));
  margin: auto;
}
.profile-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 38px 0 32px;
}
.profile-brand {
  display: flex;
  gap: 17px;
  align-items: center;
  min-width: 0;
}
.brand-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 4px 14px #ff149329);
}
h1 {
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: -1.1px;
  line-height: 1.22;
  margin: 0 0 6px;
  font-weight: 800;
}
.brand-accent {
  color: var(--pink-light);
}
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.local-badge {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  color: var(--green);
  padding: 9px 12px;
  border: 1px solid #385141;
  border-radius: 100px;
  background: #1e2a224d;
}
.local-badge svg {
  width: 14px;
  height: 14px;
}
.profile-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.preview-card,
.editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 24px 80px #00000020;
}
.card-top {
  padding: 23px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}
.live {
  white-space: nowrap;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--pink-light);
  border: 1px solid #6d3556;
  border-radius: 20px;
  padding: 4px 9px;
  background: #48253a50;
}
.live:before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink);
}
.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 410px;
  padding: 0 38px 20px;
  background: radial-gradient(ellipse at 50% 45%, #5d254c32, transparent 70%);
}
.preview-stage:before {
  content: '';
  position: absolute;
  inset: 4% 5% 0;
  background-image: radial-gradient(#6a536b55 0.6px, transparent 0.6px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse, #000 35%, transparent 72%);
  pointer-events: none;
}
.canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1;
  filter: drop-shadow(0 14px 24px #0006);
}
#preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#preview.dragging {
  cursor: grabbing;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}
.loading[hidden] {
  display: none;
}
.preview-hint {
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  padding: 0 20px 24px;
}
.preview-hint svg {
  width: 15px;
  height: 15px;
}
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 25px;
  background: #18151c66;
}
.preview-caption {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-caption:before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--pink);
  border-radius: 50%;
}
.preview-spec {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2px;
}
.editor {
  padding: 25px 26px 22px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.step {
  font-size: 10px;
  color: var(--pink-light);
  font-weight: 750;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #63314f;
  border-radius: 8px;
  background: #4d273e55;
}
h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 0;
}
.section-heading .aside-label {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.preset {
  position: relative;
  isolation: isolate;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  background: var(--raised);
  text-align: left;
  box-shadow: 0 0 0 1px #ffffff08;
}
.preset img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition:
    transform 0.24s,
    filter 0.2s;
}
.preset:after {
  content: '';
  position: absolute;
  inset: 65% 0 0;
  background: linear-gradient(transparent, #100a14b8);
  z-index: 1;
  pointer-events: none;
}
.preset:hover {
  border-color: #a16590;
}
.preset:hover img {
  transform: scale(1.06);
  filter: brightness(1);
}
.preset[aria-pressed='true'] {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px #ff47b720;
}
.preset[aria-pressed='true'] img {
  filter: brightness(1);
}
.preset-name {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  z-index: 2;
  text-shadow: 0 1px 6px #000;
}
.preset-check {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 2;
  display: none;
  background: var(--pink);
  color: #25091c;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  place-items: center;
}
.preset-check svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}
.preset[aria-pressed='true'] .preset-check {
  display: grid;
}
.upload {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px dashed #695368;
  border-radius: 12px;
  background: #252029;
  margin-top: 13px;
  text-align: left;
}
.upload:hover {
  background: #302533;
  border-color: var(--pink-light);
}
.upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #3b293b;
  color: var(--pink-light);
  flex: none;
}
.upload-main {
  font-size: 12px;
  font-weight: 650;
  display: block;
}
.upload-sub {
  color: var(--muted);
  font-size: 10px;
  display: block;
  margin-top: 1px;
}
.upload > svg {
  margin-left: auto;
  width: 15px;
  color: var(--muted);
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0 20px;
}
.crop-heading {
  margin-bottom: 15px;
}
.subtle-button {
  margin-left: auto;
  background: none;
  border: none;
  padding: 3px 0;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.subtle-button:hover {
  color: var(--pink-light);
}
.subtle-button svg {
  width: 13px;
  height: 13px;
}
.zoom-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}
.zoom-value {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 11px;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 11px;
}
.slider-row > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
input[type='range'] {
  --progress: 0%;
  appearance: none;
  width: 100%;
  height: 28px;
  background: linear-gradient(to right, var(--pink) var(--progress), #493c4a var(--progress))
    center/100% 5px no-repeat;
  border-radius: 5px;
  cursor: pointer;
  margin: 0;
  accent-color: var(--pink);
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 3px solid #ffe0f4;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #ff47b71a;
}
input[type='range']::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid #ffe0f4;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #ff47b71a;
}
.adjustments {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.tool-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #4a3b4b;
  border-radius: 9px;
  padding: 8px 13px;
  background: #2b242e;
  font-size: 11px;
  flex: 1;
}
.tool-button svg {
  width: 15px;
  height: 15px;
}
.tool-button:hover {
  border-color: #aa7195;
  background: #392a3a;
}
.tool-button[aria-pressed='true'] {
  border-color: var(--pink);
  color: var(--pink-light);
  background: #49243c;
}
.export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #ff7acc;
  border-radius: 12px;
  background: var(--pink);
  color: #2a0c20;
  width: 100%;
  font-size: 13px;
  font-weight: 800;
  padding: 14px 10px;
  min-height: 52px;
  box-shadow: 0 6px 25px #ff47b71b;
}
.download:hover:not(:disabled) {
  background: #ff70c8;
  box-shadow: 0 6px 30px #ff47b72d;
}
.download svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
  flex-shrink: 0;
}
.download-sticker {
  background: var(--raised);
  border-color: #a75c92;
  color: var(--text);
  box-shadow: none;
}
.download-sticker:hover:not(:disabled) {
  background: #3b293b;
  border-color: var(--pink-light);
  box-shadow: none;
}
.download-note {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  margin: 10px 0 0;
  letter-spacing: 0.2px;
}
.status {
  min-height: 19px;
  margin: 14px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--green);
}
.status:empty {
  display: none;
}
.status.error {
  color: #ffb8be;
}
.privacy {
  display: flex;
  align-items: center;
  gap: 7px;
}
.privacy svg {
  width: 13px;
  height: 13px;
}
.signature {
  color: #bd89ad;
}
.drop-overlay {
  position: fixed;
  inset: 16px;
  border: 2px dashed var(--pink);
  border-radius: 28px;
  background: #1d1029ed;
  z-index: 50;
  display: none;
  place-items: center;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(9px);
}
.drop-overlay.visible {
  display: grid;
}
.drop-overlay svg {
  width: 48px;
  height: 48px;
  color: var(--pink-light);
  margin-bottom: 15px;
}
.drop-overlay h2 {
  font-size: 30px;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.drop-overlay p {
  color: var(--muted);
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-dock {
  display: none;
}
@media (min-width: 1300px) {
  .profile-heading {
    padding-top: 45px;
    padding-bottom: 36px;
  }
}
@media (max-width: 900px) {
  .shell {
    width: calc(100% - 40px);
  }
  .profile-editor-grid {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .editor {
    padding: 22px 20px;
  }
  .preview-stage {
    min-height: 340px;
    padding: 0 23px 18px;
  }
  .card-top {
    padding: 21px;
  }
  .preview-footer {
    padding: 17px 20px;
    flex-wrap: wrap;
    gap: 3px;
  }
  .local-badge {
    font-size: 0;
    padding: 10px;
  }
  .local-badge svg {
    width: 17px;
    height: 17px;
  }
  .brand-logo {
    width: 57px;
    height: 57px;
  }
  .tagline {
    font-size: 12px;
  }
  .preset {
    height: auto;
  }
}
@media (max-width: 700px) {
  .shell {
    width: calc(100% - 32px);
    max-width: 480px;
    padding-bottom: 120px;
  }
  .profile-heading {
    padding: 25px 0 23px;
    gap: 10px;
  }
  .profile-brand {
    gap: 12px;
  }
  .brand-logo {
    width: 52px;
    height: 52px;
  }
  h1 {
    font-size: 22px;
    letter-spacing: -0.65px;
    max-width: 285px;
  }
  .tagline {
    font-size: 11px;
    max-width: 270px;
  }
  .local-badge {
    display: none;
  }
  .profile-editor-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .preview-card,
  .editor {
    border-radius: 20px;
  }
  .card-top {
    padding: 18px 21px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.3px;
  }
  .preview-stage {
    min-height: 0;
    padding: 0 34px 12px;
  }
  .canvas-wrap {
    max-width: 340px;
  }
  .preview-hint {
    padding-bottom: 19px;
    font-size: 11px;
  }
  .preview-footer {
    padding: 14px 21px;
    flex-wrap: nowrap;
  }
  .preview-spec {
    font-size: 10px;
  }
  .editor {
    padding: 22px;
  }
  .preset {
    height: auto;
  }
  .signature {
    font-size: 10px;
  }
  .drop-overlay {
    inset: 8px;
  }
  .download {
    padding: 16px;
  }
  .upload {
    padding: 14px;
  }
  .slider-row {
    min-height: 36px;
  }
  .tool-button {
    min-height: 44px;
  }
  .step {
    display: none;
  }
  .preview-card .crop-controls {
    padding: 0 22px 20px;
  }
  .preview-card .divider {
    margin: 0 0 18px;
  }
  .preview-card .preview-footer {
    padding-top: 13px;
    padding-bottom: 13px;
  }
  .mobile-dock {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px max(16px, env(safe-area-inset-bottom));
    z-index: 15;
    background: linear-gradient(transparent, #141218 24%);
  }
  .mobile-dock #export-controls {
    max-width: 432px;
    margin: auto;
  }
  .mobile-dock .download {
    margin: 0;
    padding: 12px 8px;
    gap: 6px;
    font-size: 12px;
  }
  .mobile-dock .download svg {
    width: 16px;
    height: 16px;
  }
  .mobile-dock .export-actions {
    margin-top: 0;
  }
  .mobile-dock .download-note {
    display: none;
  }
  .mobile-dock .status {
    margin-top: 8px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) {
  .shell {
    padding-bottom: 32px;
  }
  body[data-tool='profile'] .bunz-footer {
    padding-bottom: calc(130px + env(safe-area-inset-bottom));
  }
}

[hidden] {
  display: none !important;
}
.collection-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #141117;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
}
.collection-tabs button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  font-weight: 700;
}
.collection-tabs button[aria-selected='true'] {
  color: #26101f;
  background: var(--pink);
  box-shadow: 0 3px 12px #ff47b721;
}
.collection-tabs button:hover:not([aria-selected='true']) {
  color: var(--text);
  background: var(--raised);
}
.palette-controls {
  margin-bottom: 14px;
}
.palette-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.palette-heading output {
  color: var(--pink-light);
}
.palettes {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}
.palette {
  display: grid;
  place-items: center;
  height: 38px;
  min-width: 0;
  padding: 3px;
  background: none;
  border: 0;
  border-radius: 7px;
}
.palette-swatch {
  width: 25px;
  height: 25px;
  border: 2px solid #ffffff35;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 50%, var(--secondary) 50%);
  box-shadow: 0 2px 6px #0005;
}
.palette[aria-pressed='true'] .palette-swatch {
  outline: 2px solid var(--pink-light);
  outline-offset: 3px;
}
.palette:hover {
  background: var(--raised);
}
.background-controls {
  margin-top: 20px;
}
.background-swatch {
  position: relative;
}
.transparent-swatch {
  background: repeating-conic-gradient(#625868 0% 25%, #302a35 0% 50%) 0 0 / 10px 10px;
}
.transparent-swatch::after {
  content: '';
  position: absolute;
  inset: -3px auto;
  left: 50%;
  width: 3px;
  background: #ff98bc;
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 1px #241823;
}
.collection-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.crop-sliders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.crop-slider {
  min-width: 0;
}
.preset {
  background: radial-gradient(ellipse at 50% 36%, #533951, #28212e 75%);
}
.preset img {
  padding: 3px 0 0;
}
.preset-name {
  left: 5px;
  right: 3px;
  bottom: 4px;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset:disabled {
  opacity: 1;
}
@media (min-width: 701px) {
  .preview-card {
    position: sticky;
    top: 100px;
  }
}
@media (max-width: 900px) and (min-width: 701px) {
  .editor {
    padding: 20px 15px;
  }
  .presets {
    gap: 6px;
  }
}
@media (max-width: 700px) {
  .palette {
    height: 44px;
  }
  .crop-sliders {
    gap: 12px;
  }
}
@media (max-width: 360px) {
  .editor {
    padding: 18px 14px;
  }
  .presets {
    gap: 6px;
  }
  .preset-name {
    font-size: 8px;
  }
  .palette-swatch {
    width: 22px;
    height: 22px;
  }
}
