*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-yes: #16a34a;
  --color-no: #dc2626;
  --color-text: #0a0a0a;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: #fff;
  color: var(--color-text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 20vh 2rem;
}

#app {
  width: 100%;
  max-width: 640px;
}

/* ── Screens ── */

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fadeIn 0.35s ease;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Home ── */

#home h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
}

#question-form {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}

#question-input {
  flex: 1;
  border: none;
  border-bottom: 2px solid var(--color-text);
  padding: 0.75rem 0;
  font-size: 1.125rem;
  font-family: var(--font);
  color: var(--color-text);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

#question-input::placeholder {
  color: var(--color-muted);
}

#question-input:focus {
  border-color: #555;
}

#question-form button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 0 0.25rem;
  transition: opacity 0.2s;
}

#question-form button:hover {
  opacity: 0.5;
}

/* ── Loading ── */

.dots {
  display: flex;
  gap: 0.5rem;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text);
  animation: bounce 1.2s infinite;
}

.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

/* ── Result ── */

#answer-label {
  font-size: clamp(5rem, 20vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

#answer-label.yes { color: var(--color-yes); }
#answer-label.no  { color: var(--color-no); }

#question-echo {
  font-size: 1rem;
  color: var(--color-muted);
  text-align: center;
  font-style: italic;
}

/* ── Details ── */

#details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
}

.detail-item:first-child {
  border-top: 1px solid var(--color-border);
}

.detail-item .label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  padding-top: 0.1rem;
}

.detail-item .value {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* ── Services ── */

.service-entry {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.service-entry a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--color-text);
  line-height: 1.3;
}

.service-entry a:hover {
  opacity: 0.5;
}

.service-price {
  font-size: 0.8rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ── Reset button ── */

#reset-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color 0.2s;
  margin-top: 0.5rem;
}

#reset-btn:hover {
  color: var(--color-text);
}

/* ── Mobile ── */

@media (max-width: 480px) {
  .detail-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
