:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5f626a;
  --panel: #fffaf0;
  --paper: #ffffff;
  --line: #282828;
  --yellow: #f6c74f;
  --green: #1f9d73;
  --blue: #2878d6;
  --red: #ef6045;
  --shadow: 0 18px 40px rgba(23, 23, 23, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(246, 199, 79, 0.34), transparent 34%),
    linear-gradient(315deg, rgba(40, 120, 214, 0.16), transparent 28%),
    #f7f2e7;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
}

button {
  font: inherit;
}

.app {
  width: min(100%, 460px);
  min-height: min(760px, calc(100vh - 68px));
  display: grid;
}

.screen {
  grid-area: 1 / 1;
  display: none;
  width: 100%;
  min-height: 100%;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
}

.screen-home,
.screen-result {
  justify-content: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--yellow);
  display: grid;
  place-items: center;
  box-shadow: 3px 3px 0 var(--line);
}

.hero-art {
  position: relative;
  min-height: 156px;
  margin: 0 0 20px;
}

.desk {
  position: absolute;
  inset: 14px 0 0;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff7db 0%, #f1e0bd 100%);
  box-shadow: var(--shadow);
}

.desk::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 12px;
  border-radius: 8px;
  background: var(--line);
}

.monitor {
  position: absolute;
  left: 50%;
  top: 23px;
  width: 164px;
  height: 92px;
  transform: translateX(-50%);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #dff1ff;
  box-shadow: 5px 5px 0 var(--line);
  padding: 18px;
}

.monitor::after {
  content: "";
  position: absolute;
  left: 66px;
  bottom: -26px;
  width: 28px;
  height: 24px;
  background: var(--line);
}

.alert-dot,
.alert-line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
}

.alert-dot {
  width: 10px;
  margin-bottom: 10px;
}

.alert-line {
  width: 98px;
  background: var(--blue);
  margin-bottom: 8px;
}

.alert-line.short {
  width: 62px;
  background: var(--green);
}

.mug,
.paper {
  position: absolute;
  bottom: 37px;
  border: 3px solid var(--line);
  border-radius: 8px;
}

.mug {
  right: 32px;
  width: 44px;
  height: 44px;
  background: #ffffff;
}

.mug::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 8px;
  width: 14px;
  height: 20px;
  border: 3px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.paper {
  left: 28px;
  width: 52px;
  height: 38px;
  background: #ffffff;
  transform: rotate(-6deg);
}

.eyebrow,
.label {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 9px;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.65rem, 12vw, 4.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  margin: 0;
  max-width: 9ch;
}

.lede {
  margin: 18px 0 26px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.48;
}

.primary-button,
.secondary-button,
.option-button {
  min-height: 54px;
  width: 100%;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 4px 4px 0 var(--line);
  transition: transform 130ms ease, box-shadow 130ms ease, background-color 130ms ease;
}

.primary-button {
  background: var(--yellow);
  font-size: 1.04rem;
  font-weight: 900;
}

.secondary-button {
  background: var(--paper);
  font-weight: 900;
}

.primary-button:active,
.secondary-button:active,
.option-button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--line);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.mini-stats span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid rgba(23, 23, 23, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.screen-game {
  padding-top: 6px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.counter {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
}

.score-pill {
  min-width: 86px;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.progress-track {
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  width: 12.5%;
  height: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.question-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.scenario {
  min-height: 54px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.question-card h2 {
  margin: 0 0 20px;
  font-size: clamp(1.55rem, 8vw, 2.3rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.option-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: var(--paper);
  padding: 12px 12px;
  text-align: left;
}

.option-button strong {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e7f3ff;
  font-size: 0.9rem;
}

.option-button span {
  min-width: 0;
  font-weight: 800;
  line-height: 1.22;
}

.option-button:focus-visible {
  background: #fff2bf;
}

@media (hover: hover) and (pointer: fine) {
  .option-button:hover {
    background: #fff2bf;
  }
}

.option-button.is-picked {
  background: #dff6ec;
}

.option-button:disabled {
  cursor: default;
}

.screen-result {
  text-align: center;
}

.result-badge {
  width: min(220px, 72vw);
  min-height: 88px;
  margin: 0 auto 18px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--green);
  color: #ffffff;
  box-shadow: 5px 5px 0 var(--line);
  display: grid;
  place-items: center;
  padding: 12px;
  font-size: 1.7rem;
  font-weight: 950;
}

.screen-result h2 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.result-copy {
  margin: 16px auto 20px;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.48;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.result-stats div {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 12px;
}

.result-stats dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-stats dd {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.result-actions {
  display: grid;
  gap: 12px;
}

.share-note {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
}

.footer {
  width: min(100%, 460px);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.footer a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (max-width: 360px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .question-card {
    padding: 16px;
  }

  .option-button {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  body {
    justify-content: center;
  }

  .app {
    min-height: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
