/* PC condition entry only. The mobile/WebView shell never receives this class. */
#app.desktop-form {
  --desktop-ink: var(--ink);
  --desktop-accent: var(--accent);
  --desktop-muted: var(--muted);
  --desktop-rule: var(--line);
  --desktop-input: #f8faf7;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  color: var(--desktop-ink);
  background: #fff;
  box-shadow: none;
  font-family: Pretendard, system-ui, sans-serif;
}

#app.desktop-form .desktop-form-screen {
  min-height: 100dvh;
}

#app.desktop-form .desktop-form-screen > .bar {
  padding: 20px 44px 14px;
  min-height: 76px;
}

#app.desktop-form .desktop-form-screen > .bar h1 {
  font: 650 21px/1.4 Pretendard, system-ui, sans-serif;
}

#app.desktop-form .desktop-form-screen > .subbar {
  min-width: 0;
  gap: 20px;
  margin-inline: 44px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--desktop-rule);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-form-screen > .subbar button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 0 8px 12px;
}

#app.desktop-form .desktop-form-page {
  min-width: 0;
  padding: 26px 44px 32px;
}

#app.desktop-form .desktop-form-intro {
  max-width: 740px;
  margin-bottom: 24px;
}

#app.desktop-form .desktop-form-intro h2 {
  margin: 0 0 8px;
  font: 700 30px/1.3 Pretendard, system-ui, sans-serif;
  letter-spacing: -.025em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-form-intro p {
  margin: 0;
  color: var(--desktop-muted);
  font-size: 14px;
  line-height: 1.6;
}

#app.desktop-form .desktop-conditions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 40px;
  min-width: 0;
}

#app.desktop-form .desktop-condition-column {
  display: grid;
  align-content: start;
  gap: 24px;
  min-width: 0;
}

#app.desktop-form .desktop-condition-section {
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--desktop-rule);
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-condition-section h2 {
  margin: 0 0 18px;
  font: 650 19px/1.4 Pretendard, system-ui, sans-serif;
  word-break: keep-all;
}

#app.desktop-form .desktop-composition-section {
  margin-top: 32px;
  padding-top: 24px;
}

#app.desktop-form .desktop-composition-section .choice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#app.desktop-form .desktop-composition-section input[type="text"] {
  max-width: 680px;
}

#app.desktop-form .desktop-condition-section h3 {
  margin: 20px 0 10px;
  font-size: 15px;
  line-height: 1.5;
  word-break: keep-all;
}

#app.desktop-form .desktop-condition-section h2 + h3 {
  margin-top: 0;
}

#app.desktop-form .desktop-condition-section h3 small,
#app.desktop-form .desktop-condition-section .label small {
  margin-left: 4px;
  color: var(--desktop-muted);
  font-size: 12px;
  font-weight: 400;
}

#app.desktop-form .desktop-condition-section .label {
  margin: 16px 0 8px;
  font-size: 14px;
  line-height: 1.5;
}

#app.desktop-form .desktop-budget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

#app.desktop-form .desktop-budget-grid > * {
  min-width: 0;
}

#app.desktop-form .desktop-budget-grid .label {
  margin-top: 0;
}

#app.desktop-form .desktop-condition-section input,
#app.desktop-form .desktop-condition-section textarea,
#app.desktop-form .desktop-condition-section .field {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cfdfd3;
  border-radius: 12px;
  background: var(--desktop-input);
  color: var(--desktop-ink);
  font-size: 15px;
  line-height: 1.5;
}

#app.desktop-form .desktop-condition-section textarea {
  resize: vertical;
}

#app.desktop-form .desktop-condition-section input::placeholder,
#app.desktop-form .desktop-condition-section textarea::placeholder {
  color: #65776b;
  opacity: 1;
}

#app.desktop-form .desktop-condition-section .choice-grid {
  gap: 10px;
  min-width: 0;
}

#app.desktop-form .desktop-condition-section .chip {
  min-width: 0;
  min-height: 48px;
  height: auto;
  padding: 11px 12px;
  border: 1px solid var(--desktop-rule);
  border-radius: 12px;
  background: #fff;
  color: var(--desktop-ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-condition-section .chip.selected {
  border-color: var(--desktop-accent);
  background: #e7f4e8;
  color: #185e3e;
  box-shadow: inset 0 0 0 1px var(--desktop-accent);
  font-weight: 700;
}

#app.desktop-form .desktop-condition-section .appetite-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app.desktop-form .desktop-condition-section .appetite-chip {
  min-height: 76px;
  padding: 12px 6px;
  font-size: 15px;
}

#app.desktop-form .desktop-condition-section .appetite-chip small {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

#app.desktop-form .desktop-condition-section .muted {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-condition-section .choice-grid + input {
  margin-top: 12px;
}

#app.desktop-form .desktop-form-page .error {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #b34a3e;
  background: #fff5f2;
  color: #943b30;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-form-screen .desktop-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 44px 28px;
  border-top: 1px solid var(--desktop-rule);
  background: #fff;
  align-items: center;
  flex-wrap: wrap;
}

#app.desktop-form #desktop-form-error {
  flex: 1;
  min-width: 0;
}

#app.desktop-form #desktop-form-error:empty {
  display: none;
}

#app.desktop-form .desktop-form-footer .primary {
  width: min(100%, 300px);
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--desktop-accent);
  color: #fff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app.desktop-form .desktop-form-footer .primary:disabled {
  background: #dbe8de;
  color: #617568;
  cursor: not-allowed;
}

#app.desktop-form button:focus-visible,
#app.desktop-form input:focus-visible,
#app.desktop-form textarea:focus-visible {
  outline: 3px solid var(--desktop-accent);
  outline-offset: 3px;
}

#app.desktop-form input[aria-invalid="true"],
#app.desktop-form textarea[aria-invalid="true"] {
  border-color: #b34a3e;
}

@media (hover: hover) {
  #app.desktop-form .desktop-condition-section .chip:not(.selected):not(:disabled):hover {
    background: #f1f7f1;
    border-color: #adc6b5;
  }

  #app.desktop-form .desktop-form-footer .primary:not(:disabled):hover {
    background: #216f4d;
  }
}

/* Defensive fallback if the desktop class survives a resize or browser zoom. */
@media (max-width: 959px) {
  #app.desktop-form .desktop-form-screen > .bar {
    padding-inline: 24px;
  }

  #app.desktop-form .desktop-form-screen > .subbar {
    margin-inline: 24px;
  }

  #app.desktop-form .desktop-form-page {
    padding-inline: 24px;
  }

  #app.desktop-form .desktop-conditions-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  #app.desktop-form .desktop-composition-section .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app.desktop-form .desktop-form-screen .desktop-form-footer {
    padding-inline: 24px;
  }

  #app.desktop-form .desktop-form-footer .primary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #app.desktop-form .desktop-budget-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  #app.desktop-form button,
  #app.desktop-form input,
  #app.desktop-form textarea {
    transition: none;
  }
}
