:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: #081113;
  color: #f7f2e7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #081113;
}

button {
  font: inherit;
}

.screen {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: url("./assets/hero-fishing.png") 64% center / cover no-repeat;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 13, 14, 0.22), rgba(6, 13, 14, 0.02) 42%, rgba(6, 13, 14, 0.72)),
    linear-gradient(90deg, rgba(6, 13, 14, 0.58), rgba(6, 13, 14, 0.02) 72%);
  content: "";
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 16px;
  color: #ffd48c;
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.hero h1,
.result h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.hero h1 span {
  display: block;
}

.lead {
  margin: 18px 0 0;
  color: rgba(247, 242, 231, 0.88);
  font-size: 16px;
  line-height: 1.72;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
}

.chip {
  border: 1px solid rgba(255, 212, 140, 0.32);
  border-radius: 999px;
  background: rgba(8, 17, 19, 0.42);
  padding: 8px 10px;
  color: #ffe6b7;
  font-size: 13px;
}

.primary,
.secondary,
.ghost {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  border: 0;
  background: #ffb23f;
  color: #15100a;
}

.secondary {
  border: 1px solid rgba(255, 210, 140, 0.52);
  background: rgba(8, 17, 19, 0.42);
  color: #ffe3ad;
}

.ghost {
  border: 0;
  background: transparent;
  color: rgba(247, 242, 231, 0.72);
}

.notice {
  margin: 12px 0 0;
  color: rgba(247, 242, 231, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(8, 17, 19, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -22px -18px 18px;
  padding: 16px 18px 12px;
  background: rgba(8, 17, 19, 0.9);
  backdrop-filter: blur(14px);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: rgba(247, 242, 231, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress div {
  height: 100%;
  border-radius: inherit;
  background: #ffb23f;
  transition: width 180ms ease;
}

.question h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.35;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 14px;
  color: #f7f2e7;
  text-align: left;
  cursor: pointer;
}

.option b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 178, 63, 0.18);
  color: #ffca76;
  font-size: 13px;
}

.option span {
  align-self: center;
  font-size: 16px;
  line-height: 1.5;
}

.question-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.question-actions button {
  flex: 1;
}

.loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  text-align: center;
}

.loader {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  border-top-color: #ffb23f;
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result h1 {
  font-size: 34px;
}

.result-type {
  margin: 0 0 10px;
  color: #ffd48c;
  font-size: 14px;
  font-weight: 900;
}

.score-grid {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.score {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 12px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(247, 242, 231, 0.88);
  font-size: 13px;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.bar div {
  height: 100%;
  border-radius: inherit;
  background: #ffb23f;
}

.section {
  margin: 16px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 16px;
}

.section h3 {
  margin: 0 0 10px;
  color: #ffe0a2;
  font-size: 17px;
}

.section p,
.section li {
  color: rgba(247, 242, 231, 0.84);
  font-size: 15px;
  line-height: 1.72;
}

.section p {
  margin: 0;
}

.section ul {
  margin: 0;
  padding-left: 20px;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  width: max-content;
  max-width: calc(100% - 36px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(247, 242, 231, 0.94);
  padding: 10px 14px;
  color: #15100a;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.toast.show {
  opacity: 1;
}

@media (min-width: 640px) {
  body {
    background: #0c1517;
  }

  .screen {
    min-height: auto;
    margin-top: 28px;
    margin-bottom: 28px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  }

  .hero,
  .loading {
    min-height: 760px;
  }
}
