:root {
  color-scheme: light;
  --bg: #f7f3ff;
  --bg-soft: #fff9f0;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #1f1f3d;
  --muted: #5f6083;
  --line: rgba(99, 71, 191, 0.14);
  --primary: #6c46ff;
  --primary-dark: #4d2fc5;
  --accent: #f5c85d;
  --success: #12895f;
  --warning: #c96e14;
  --error: #be324a;
  --shadow: 0 20px 60px rgba(55, 40, 122, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(108, 70, 255, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(245, 200, 93, 0.2), transparent 24%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 56%, #ffffff 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 84px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(33, 42, 92, 0.18);
}

.brand-word span:first-child {
  color: var(--primary);
}

.brand-word span:last-child {
  color: var(--accent);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.hero,
.workspace,
.result-section {
  margin-top: 22px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.hero-copy,
.hero-note,
.panel,
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy,
.hero-note,
.panel,
.result-card {
  padding: 28px;
}

.eyebrow,
.section-label,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow {
  padding: 8px 14px;
  background: rgba(108, 70, 255, 0.11);
  color: var(--primary-dark);
  font-size: 0.86rem;
}

.hero-copy h1,
.hero-note h2,
.panel h2,
.result-head h2 {
  margin: 16px 0 12px;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.04;
}

.hero-copy p,
.hero-note p,
.hero-note li,
.panel p,
.field-hint,
.status-box,
.placeholder-box,
.result-note {
  color: var(--muted);
  line-height: 1.68;
}

.hero-note ul {
  margin: 16px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 12px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.pill {
  padding: 10px 14px;
  background: rgba(108, 70, 255, 0.1);
  color: var(--primary-dark);
  font-size: 0.88rem;
}

.pill-muted {
  background: rgba(31, 31, 61, 0.08);
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-header,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header.compact {
  margin-bottom: 16px;
}

.section-label {
  padding: 7px 12px;
  background: rgba(245, 200, 93, 0.18);
  color: #7b5a0b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghost-button,
.primary-button,
.secondary-button {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  min-height: 46px;
  padding: 0 16px;
  background: rgba(31, 31, 61, 0.06);
  color: var(--text);
}

.primary-button {
  min-height: 54px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--success), #19b879);
  color: #fff;
  box-shadow: 0 16px 28px rgba(18, 137, 95, 0.18);
}

.secondary-button {
  min-height: 46px;
  padding: 0 16px;
  background: rgba(108, 70, 255, 0.1);
  color: var(--primary-dark);
}

.listing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group-full {
  grid-column: 1 / -1;
}

.field-group label {
  font-weight: 700;
}

.field-group input[type="text"],
.field-group textarea,
.field-group input[type="file"] {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(99, 71, 191, 0.14);
  background: #fff;
  color: var(--text);
  padding: 14px 16px;
}

.field-group textarea {
  resize: vertical;
}

.inline-toggle {
  margin-top: -4px;
}

.toggle-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(108, 70, 255, 0.06);
  border: 1px solid rgba(108, 70, 255, 0.08);
  font-weight: 700;
}

.details-panel {
  border: 1px solid rgba(99, 71, 191, 0.12);
  border-radius: 20px;
  background: rgba(108, 70, 255, 0.05);
  padding: 8px 14px 16px;
}

.details-panel summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  padding: 10px 4px;
}

.details-panel summary::-webkit-details-marker {
  display: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 10px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-grid-platform {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(99, 71, 191, 0.12);
  background: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  font-weight: 800;
  display: flex;
  justify-content: center;
  text-align: center;
  color: var(--text);
}

.choice-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: rgba(108, 70, 255, 0.35);
  background: rgba(108, 70, 255, 0.12);
  color: var(--primary-dark);
}

.choice-card:has(input:disabled) {
  opacity: 0.48;
  cursor: not-allowed;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
}

.photo-tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(108, 70, 255, 0.08);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(108, 70, 255, 0.12);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-index {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 31, 61, 0.72);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.side-card + .side-card {
  margin-top: 18px;
}

.auth-pills,
.auth-actions,
.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-pills {
  margin-top: 12px;
}

.auth-actions {
  margin-top: 14px;
}

.auth-tabs {
  margin-bottom: 14px;
}

.auth-tab {
  border: 1px solid rgba(99, 71, 191, 0.12);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.is-active {
  background: rgba(108, 70, 255, 0.1);
  color: var(--primary-dark);
  border-color: rgba(108, 70, 255, 0.28);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.placeholder-box,
.status-box {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(31, 31, 61, 0.05);
  border: 1px dashed rgba(99, 71, 191, 0.18);
}

.status-box.is-success {
  border-style: solid;
  background: rgba(18, 137, 95, 0.09);
  color: #116745;
}

.status-box.is-warning {
  border-style: solid;
  background: rgba(201, 110, 20, 0.08);
  color: #9d5613;
}

.status-box.is-error {
  border-style: solid;
  background: rgba(190, 50, 74, 0.08);
  color: #983348;
}

.question-form {
  display: grid;
  gap: 16px;
}

.question-block {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(99, 71, 191, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.question-block legend,
.question-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-chip {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(99, 71, 191, 0.14);
  background: #fff;
  padding: 11px 14px;
  font-weight: 700;
}

.option-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.option-chip:has(input:checked) {
  background: rgba(108, 70, 255, 0.1);
  color: var(--primary-dark);
  border-color: rgba(108, 70, 255, 0.28);
}

.result-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-top: 20px;
}

.result-card-main h3 {
  margin: 16px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.tag-row,
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 8px 12px;
  background: rgba(108, 70, 255, 0.1);
  color: var(--primary-dark);
  font-size: 0.84rem;
}

.result-description {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.result-description p {
  margin: 0;
  line-height: 1.74;
  color: var(--text);
}

.result-card h3 {
  margin: 0 0 10px;
}

.result-card h3 + p,
.result-card h3 + .keyword-list {
  margin-bottom: 18px;
}

.result-price {
  font-size: 1.56rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--success);
}

.keyword-item {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 31, 61, 0.06);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero,
  .workspace,
  .result-grid {
    grid-template-columns: 1fr;
  }
}

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

  .listing-form {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .choice-grid-platform,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .result-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
