@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --bg: #fff6f8;
  --bg-soft: #fff0f4;
  --bg-warm: #fffaf3;
  --card: rgba(255, 255, 255, 0.86);
  --card-strong: #ffffff;
  --text: #4f2d39;
  --muted: #8f6572;
  --accent: #f06d98;
  --accent-dark: #dd4d7f;
  --accent-soft: #ffd4e3;
  --line: #f2cfda;
  --line-soft: #f8e2e9;
  --shadow: 0 22px 55px rgba(201, 105, 139, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, #ffd5e5 0, transparent 35%),
    radial-gradient(circle at 84% 22%, #ffdbe9 0, transparent 38%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-soft) 45%, var(--bg-warm) 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(6px);
}

body::before {
  top: -70px;
  left: -40px;
  background: radial-gradient(circle, rgba(255, 196, 215, 0.9) 0%, rgba(255, 196, 215, 0) 72%);
}

body::after {
  right: -70px;
  bottom: -65px;
  background: radial-gradient(circle, rgba(255, 218, 192, 0.8) 0%, rgba(255, 218, 192, 0) 72%);
}

.container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 22px;
}

.card {
  width: min(860px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  animation: lift-in 520ms ease;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 10px 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3.8vw, 2.85rem);
  line-height: 1.2;
  color: #613547;
}

h2 {
  font-family: "Playfair Display", Georgia, serif;
  color: #6b3f4f;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
}

.button-link {
  display: inline-block;
  margin-top: 14px;
  border-radius: 999px;
  padding: 12px 20px;
  background: linear-gradient(120deg, var(--accent) 0%, #ff8cb1 100%);
  color: #fff;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(240, 109, 152, 0.35);
  transition: transform 140ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(221, 77, 127, 0.34);
  filter: saturate(1.05);
}

.button-link:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #f48aad;
  outline-offset: 2px;
}

.nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-buttons .button-link {
  margin-top: 0;
}

.is-disabled {
  background: #e6c7d2;
  color: #fff5f8;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.disclaimer {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
  background: #fff8fb;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

.story-text {
  margin: 0 0 18px;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text);
}

.guess-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.guess-form label {
  grid-column: 1 / -1;
}

.guess-result {
  min-height: 1.4em;
  margin: 0 0 18px;
  font-weight: 700;
  color: #7a3f54;
}

.graph {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
}

.graph h2 {
  margin: 0 0 14px;
  font-size: 1.12rem;
}

.bar-row + .bar-row {
  margin-top: 14px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.bar-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #f7e6ed;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-total {
  background: linear-gradient(90deg, #f379a3 0%, #fa9fba 100%);
}

.bar-sidra {
  background: linear-gradient(90deg, #f3a5c2 0%, #f7b8cf 100%);
}

.bar-omair {
  background: linear-gradient(90deg, #f0608f 0%, #f68db0 100%);
}

.talk-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.person-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.person-picker legend {
  margin-bottom: 8px;
  font-weight: 700;
}

.person-option {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  cursor: pointer;
}

.person-option span {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.person-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.person-option input:checked + span {
  border-color: #f38aad;
  background: #ffeaf1;
  color: #853f59;
}

.word-counts {
  margin: 0 0 8px;
  color: var(--muted);
}

.pie-section {
  margin: 14px 0 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fff6fa 100%);
}

.pie-section h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.pie-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(#f06d98 0% 61.49%, #ffdbe8 61.49% 100%);
  border: 1px solid #f2cfda;
  box-shadow: inset 0 0 0 1px rgba(101, 58, 75, 0.08);
}

.pie-meta p {
  margin: 0 0 8px;
  color: var(--muted);
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
}

.swatch-omair {
  background: #f06d98;
  border: 1px solid #da4f7f;
}

.swatch-sidra {
  background: #ffdbe8;
  border: 1px solid #f0b4cc;
}

.messages-section + .messages-section {
  margin-top: 24px;
}

.messages-section h2 {
  margin: 0 0 12px;
  font-size: 1.24rem;
}

.message-list {
  margin: 0;
  padding-left: 22px;
}

.message-list li + li {
  margin-top: 14px;
}

.message-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff7fa 100%);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(176, 97, 125, 0.11);
}

.message-meta {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}

.message-card p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.message-card p:last-child {
  margin-bottom: 0;
}

.reveal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff9fc;
}

.reveal-progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stat-panel {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fff6fa 100%);
  box-shadow: 0 8px 20px rgba(171, 89, 120, 0.09);
}

.stat-panel h2 {
  margin: 0 0 10px;
  font-size: 1.14rem;
}

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

.ticket-card {
  position: relative;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #eab7ca;
  background: linear-gradient(145deg, #fff6fb 0%, #ffe8f1 100%);
}

.ticket-card::before,
.ticket-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card-strong);
  border: 1px solid var(--line-soft);
  transform: translateY(-50%);
}

.ticket-card::before {
  left: -7px;
}

.ticket-card::after {
  right: -7px;
}

.ticket-sidra {
  background: linear-gradient(145deg, #ffe7f2 0%, #ffd7e8 100%);
}

.ticket-omair {
  background: linear-gradient(145deg, #fff0f6 0%, #ffe0eb 100%);
}

.ticket-name {
  margin: 0 0 6px;
  font-weight: 700;
}

.ticket-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: #8b3f59;
}

.ticket-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pillar-grid {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  min-height: 220px;
}

.pillar-item {
  text-align: center;
  flex: 1;
}

.pillar-item p {
  margin: 0 0 6px;
  font-weight: 700;
}

.pillar-track {
  height: 150px;
  width: 72px;
  margin: 0 auto 8px;
  border-radius: 14px;
  border: 1px solid #e9bfd0;
  background: repeating-linear-gradient(
    to top,
    #fceaf1 0,
    #fceaf1 10px,
    #fff5f9 10px,
    #fff5f9 20px
  );
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.pillar-fill {
  width: 100%;
}

.pillar-sidra {
  background: linear-gradient(180deg, #f58ab0 0%, #e25d8f 100%);
}

.pillar-omair {
  background: linear-gradient(180deg, #f277a0 0%, #d74d80 100%);
}

.console-box {
  padding: 14px;
  border-radius: 12px;
  background: #34212a;
  color: #fff2f7;
}

.console-box p {
  margin: 0 0 8px;
}

.console-box p:last-child {
  margin-bottom: 0;
}

.console-note {
  color: #f3dce5;
  font-size: 0.92rem;
}

.reaction-table {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.reaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
}

.reaction-row + .reaction-row {
  border-top: 1px solid #f4dce5;
}

.reaction-person {
  font-weight: 700;
}

.reaction-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.raw-snippet {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.conversation-image {
  display: block;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  box-shadow: 0 14px 34px rgba(183, 96, 125, 0.21);
}

.form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.95rem;
  color: #6f4454;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  background: #fffdfd;
  color: var(--text);
}

button {
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(120deg, var(--accent) 0%, #ff8cb1 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(240, 109, 152, 0.31);
  transition: transform 140ms ease, box-shadow 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(218, 81, 131, 0.34);
  filter: saturate(1.05);
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .card {
    padding: 20px;
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }
}

@media (max-width: 560px) {
  .guess-form {
    grid-template-columns: 1fr;
  }

  .pie-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .reveal-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-visual {
    grid-template-columns: 1fr;
  }

  .pillar-grid {
    gap: 12px;
  }

  .pillar-track {
    width: 58px;
  }
}
