* {
  box-sizing: border-box;
}

:root {
  --text: #f4ead6;
  --muted: #d9c9ac;
  --gold: #b98a3f;
  --gold-2: #d8a44b;
  --line: rgba(255, 236, 202, 0.15);
  --panel: rgba(19, 12, 8, 0.86);
  --panel-soft: rgba(28, 18, 12, 0.78);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: #130d0a;
}

body {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.62)),
    url("background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.overlay {
  min-height: 100vh;
  padding: 18px;
  background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}

.app-shell {
  max-width: 1050px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 24px 18px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.intro {
  max-width: 760px;
  margin: 14px auto 0;
  line-height: 1.65;
  color: var(--muted);
  font-size: 1.02rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  margin-bottom: 18px;
}

.panel-tip {
  background: var(--panel-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label span {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

input::placeholder {
  color: #c7b89d;
}

select option {
  color: #111;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  flex: 2;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #20150e;
  font-weight: 700;
}

.secondary {
  flex: 1;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.result.hidden {
  display: none;
}

.result {
  display: block;
}

.result-top {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.summary-card,
.mike-card,
.emotion-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.summary-card,
.mike-card {
  padding: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stat {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 12px;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.core-blurb {
  margin: 14px 0 0;
  line-height: 1.65;
  color: var(--muted);
}

.mike-quote {
  margin: 10px 0 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  line-height: 1.65;
}

.emotion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.emotion-card {
  padding: 18px;
}

.emotion-card h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.emotion-list {
  display: grid;
  gap: 10px;
}

.line-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 11px 12px;
}

.line-item strong {
  display: block;
  margin-bottom: 6px;
  color: #f9d69b;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-note {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .result-top,
  .emotion-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .overlay {
    padding: 12px;
  }

  .panel,
  .summary-card,
  .mike-card,
  .emotion-card {
    border-radius: 16px;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .secondary,
  .primary {
    width: 100%;
  }
}