@font-face {
  font-family: "MochiyPopOne";
  src: url("./MochiyPopOne-Regular.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "KeiFont";
  src: url("./keifont.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink-900: #4b0d1f;
  --pink-700: #8a1d43;
  --pink-500: #d6456d;
  --mint-200: #b7f0e0;
  --cream-50: #fff6f0;
  --shadow: 0 20px 40px rgba(18, 8, 24, 0.18);
  --dash-blue: #b7d9f4;
  --dash-orange: #f7c9a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "MochiyPopOne", sans-serif;
  color: var(--pink-900);
  background-color: var(--dash-blue);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6), transparent 48%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 196, 0.7), transparent 48%),
    url("./pattern.svg");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: 480px 480px, 560px 560px, auto;
  background-position: -120px -120px, 75% 80%, 0 0;
}

.creator-theme {
  background-color: var(--dash-orange);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--dash-blue);
  opacity: 1;
  pointer-events: none;
  animation: bg-fade 0.7s ease forwards;
  z-index: -1;
}

.creator-theme::before {
  background: var(--dash-orange);
}

@keyframes bg-fade {
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
    opacity: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  padding: 32px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.header {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.prefs {
  position: relative;
}

.prefs-trigger {
  list-style: none;
  border: 2px dashed rgba(75, 13, 31, 0.5);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.prefs-trigger::-webkit-details-marker {
  display: none;
}

.prefs-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
  font-size: 12px;
  z-index: 10;
}

.header-title {
  display: grid;
  gap: 4px;
}

.header-title strong {
  font-family: "KeiFont", sans-serif;
  font-size: 24px;
}

.header-sub {
  font-size: 12px;
  color: var(--pink-700);
}

.role-switch {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(214, 69, 109, 0.2);
}

.role-switch a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.role-switch .active {
  background: var(--pink-700);
  color: #fff;
}

.creator-theme .role-switch .active {
  background: var(--mint-200);
  color: #1d1b1f;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stack {
  display: grid;
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.card-loading {
  position: absolute;
  inset: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  text-align: center;
  z-index: 2;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(214, 69, 109, 0.2);
  border-top-color: rgba(214, 69, 109, 0.8);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--pink-700);
}

.card p {
  margin: 0 0 10px;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(214, 69, 109, 0.15);
  font-size: 12px;
}

.btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--pink-900);
  background: #fff;
  color: var(--pink-900);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.btn.primary {
  background: var(--pink-700);
  border-color: var(--pink-700);
  color: #fff;
}

.btn.mint {
  background: var(--mint-200);
  border-color: var(--mint-200);
  color: #1d1b1f;
}

.btn.ghost {
  background: transparent;
  border-style: dashed;
}

.bid-back {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1;
  z-index: 2;
}

.bid-toggle-placeholder {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--pink-700);
  text-align: center;
  pointer-events: none;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(75, 13, 31, 0.2);
  font-size: 13px;
  background: #fff;
  font-family: inherit;
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

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

.row > * {
  flex: 1 1 160px;
}

.list {
  display: grid;
  gap: 10px;
}

#job-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

#job-list .list-item {
  padding: 10px;
  gap: 6px;
}

#job-list .muted {
  font-size: 12px;
}

.list-item {
  border-radius: 16px;
  border: 1px dashed rgba(214, 69, 109, 0.4);
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.list-item.is-selected {
  border: 2px solid rgba(214, 69, 109, 0.6);
  background: rgba(255, 255, 255, 0.95);
}

.list-item.is-recent {
  border: 2px solid rgba(214, 69, 109, 0.35);
  background: rgba(255, 255, 255, 0.8);
}

.map-panel {
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
}

.map-panel .map {
  min-height: 320px;
  height: 100%;
  border-radius: 20px;
  position: relative;
}

.map-panel .map-canvas {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  z-index: 1;
}

.map-overlay {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  font-size: 12px;
  display: grid;
  gap: 4px;
  z-index: 2;
}

.map-overlay-title {
  font-family: "KeiFont", sans-serif;
  font-size: 13px;
  color: var(--pink-700);
}

.map-overlay-meta {
  color: var(--pink-900);
}

.list-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.list-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill {
  font-size: 11px;
  background: var(--cream-50);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(214, 69, 109, 0.3);
}

.map {
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 240, 0.9));
  border: 1px solid rgba(214, 69, 109, 0.2);
  height: 240px;
  position: relative;
  overflow: hidden;
}

.pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink-500);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(214, 69, 109, 0.4);
}

.muted {
  color: rgba(75, 13, 31, 0.7);
  font-size: 12px;
}

.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.thumb {
  border-radius: 12px;
  border: 1px solid rgba(214, 69, 109, 0.3);
  background: #fff;
  padding: 6px;
  display: grid;
  gap: 6px;
  text-align: center;
  font-size: 11px;
}

.thumb img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.notice {
  border-radius: 14px;
  background: rgba(183, 240, 224, 0.4);
  padding: 10px 12px;
  font-size: 12px;
}

.danger {
  color: #8a1d43;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(140deg, #ffd3c4, #b7d9f4);
  display: grid;
  place-items: center;
  color: var(--pink-900);
  font-size: 12px;
  border: 1px solid rgba(214, 69, 109, 0.2);
}

.profile-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(214, 69, 109, 0.4);
  font-size: 12px;
}

.profile-meta {
  display: grid;
  gap: 6px;
}

.profile-consent {
  font-size: 11px;
  color: rgba(75, 13, 31, 0.7);
}

@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
}
