/* Basic reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, #fef7c0 0%, #f7f1ff 40%, #f0f5ff 100%);
  color: #1f2937;
}

a { color: #4338ca; text-decoration: none; }
a:hover { text-decoration: underline; }

.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;
}

.wrap {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  gap: 18px;
  padding: 18px;
}

.top {
  width: min(840px, 96vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { font-weight: 800; font-size: 18px; color: #1f2937; }
.nav { display: flex; gap: 14px; font-size: 14px; }

.card {
  display: grid;
  place-items: center;
  gap: 14px;
  width: min(560px, 92vw);
  padding: clamp(18px, 4vw, 28px);
  background: white;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06), 0 2px 10px rgba(0,0,0,0.04);
  cursor: pointer;
  outline: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:active { transform: scale(0.99); }
.card:focus-visible { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35), 0 10px 30px rgba(0,0,0,0.06); }

.face { display: block; max-width: 100%; }
.skin { fill: #ffe177; }
.eye { fill: #1f2937; }

.mouth {
  fill: none;
  stroke: #1f2937;
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 1;
  transition: opacity 450ms ease, transform 450ms ease;
}
.mouth--happy { opacity: 0; transform-origin: 100px 145px; transform: scale(0.98); }
.card.happy .mouth--happy { opacity: 1; transform: scale(1); }
.card.happy .mouth--sad { opacity: 0; transform: translateY(6px) scale(0.98); }

.message { min-height: 28px; text-align: center; }
.msg {
  margin: 0;
  font-size: clamp(16px, 2.6vw, 18px);
  line-height: 1.4;
  transition: opacity 350ms ease, transform 350ms ease;
}
.msg--happy { opacity: 0; transform: translateY(-4px); }
.card.happy .msg--sad { opacity: 0; transform: translateY(4px); }
.card.happy .msg--happy { opacity: 1; transform: translateY(0); }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  appearance: none;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  box-shadow: 0 8px 20px rgba(79,70,229,0.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(79, 70, 229, 0.45); outline-offset: 3px; }

.btn--ghost { background: #eef2ff; color: #3730a3; box-shadow: none; }

.quote {
  margin: 6px 0 2px;
  font-size: clamp(14px, 2.2vw, 16px);
  opacity: 0.9;
  text-align: center;
  padding: 8px 12px;
}

.footer {
  margin-top: 10px;
  opacity: 0.75;
  font-size: 13px;
}
