.fortune-page {
  --fortune-ink: #172033;
  --fortune-muted: #627085;
  --fortune-line: #d9e3eb;
  --fortune-soft: #f4f8f8;
  --fortune-accent: #0f766e;
  --fortune-accent-dark: #0b5f59;
  --fortune-gold: #b7791f;
}

.fortune-heading {
  margin-bottom: 28px;
  text-align: left;
}

.fortune-eyebrow {
  margin: 0 0 8px;
  color: var(--fortune-accent);
  font-size: .78rem;
  font-weight: 800;
}

.fortune-heading h1 {
  margin: 0 0 12px;
  color: var(--fortune-ink);
  font-size: 2.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.fortune-heading > p:last-child,
.fortune-guide > header > p:last-child {
  max-width: 780px;
  margin: 0;
  color: var(--fortune-muted);
  line-height: 1.75;
}

.fortune-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(230px, .75fr);
  border: 1px solid var(--fortune-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.fortune-form {
  padding: 26px;
}

.fortune-form > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.fortune-form > header span {
  display: block;
  margin-bottom: 4px;
  color: var(--fortune-accent);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fortune-form h2,
.fortune-guide h2 {
  margin: 0;
  color: var(--fortune-ink);
  font-size: 1.4rem;
  letter-spacing: 0;
}

.fortune-form > header button {
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #bfd3d2;
  border-radius: 6px;
  background: #fff;
  color: var(--fortune-accent);
  font-size: .76rem;
  font-weight: 800;
  box-shadow: none;
}

.fortune-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fortune-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: #29364a;
  font-size: .82rem;
  font-weight: 800;
}

.fortune-fields input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfdbe5;
  border-radius: 7px;
  background: #fff;
  color: var(--fortune-ink);
  font-size: .9rem;
}

.fortune-fields small {
  display: block;
  margin-top: 6px;
  color: #7a8798;
  font-size: .68rem;
  line-height: 1.5;
}

.fortune-gender {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  border: 0;
}

.fortune-gender legend {
  width: 100%;
  margin-bottom: 7px;
  color: #29364a;
  font-size: .82rem;
  font-weight: 800;
}

.fortune-gender label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.fortune-gender input {
  position: absolute;
  opacity: 0;
}

.fortune-gender span {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  border: 1px solid #cfdbe5;
  border-radius: 6px;
  background: #fff;
  color: #425168;
  font-size: .76rem;
  font-weight: 800;
}

.fortune-gender input:checked + span {
  border-color: var(--fortune-accent);
  background: #e8f5f2;
  color: var(--fortune-accent-dark);
}

.fortune-gender input:focus-visible + span {
  outline: 2px solid #38b2ac;
  outline-offset: 2px;
}

.fortune-submit {
  width: 100%;
  min-height: 50px;
  margin: 0;
  border-radius: 7px;
  background: var(--fortune-accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  box-shadow: none;
}

.fortune-submit:hover {
  background: var(--fortune-accent-dark);
}

.fortune-status {
  min-height: 22px;
  margin: 11px 0 0;
  color: #6a788b;
  font-size: .74rem;
  line-height: 1.55;
}

.fortune-preview {
  display: flex;
  min-height: 350px;
  padding: 30px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid var(--fortune-line);
  background: #f2f7f6;
  text-align: center;
}

.fortune-orbit {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 22px;
  border: 1px solid #9fc4bf;
  border-radius: 50%;
}

.fortune-orbit::before,
.fortune-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid #b8d2cf;
  border-radius: 50%;
  inset: 15px;
}

.fortune-orbit::after {
  border-style: dashed;
  inset: 32px;
}

.fortune-orbit span,
.fortune-orbit i,
.fortune-orbit b {
  position: absolute;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fortune-accent);
}

.fortune-orbit span { top: 8px; left: 51px; }
.fortune-orbit i { right: 12px; bottom: 26px; }
.fortune-orbit b { bottom: 17px; left: 18px; background: var(--fortune-gold); }

.fortune-preview > strong {
  color: var(--fortune-ink);
  font-size: 1.05rem;
}

.fortune-preview > p {
  max-width: 260px;
  margin: 8px 0 0;
  color: var(--fortune-muted);
  font-size: .78rem;
  line-height: 1.65;
}

.fortune-result {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid var(--fortune-line);
  border-radius: 8px;
  background: #fff;
}

.fortune-period-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.fortune-period-tabs button {
  min-height: 42px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #cfdbe5;
  border-radius: 6px;
  background: #fff;
  color: #526177;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: none;
}

.fortune-period-tabs button[aria-selected="true"] {
  border-color: var(--fortune-accent);
  background: var(--fortune-accent);
  color: #fff;
}

.fortune-overview {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 8px;
  background: #eef7f5;
}

.fortune-score-ring {
  display: flex;
  width: 132px;
  height: 132px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 9px solid #b7ddd6;
  border-radius: 50%;
  background: #fff;
}

.fortune-score-ring span,
.fortune-score-ring small {
  color: #738195;
  font-size: .67rem;
  font-weight: 700;
}

.fortune-score-ring strong {
  color: var(--fortune-accent);
  font-size: 2rem;
  line-height: 1.1;
}

.fortune-overview-copy > p:first-child {
  margin: 0 0 5px;
  color: var(--fortune-accent);
  font-size: .76rem;
  font-weight: 800;
}

.fortune-overview-copy h2 {
  margin: 0 0 8px;
  color: var(--fortune-ink);
  font-size: 1.4rem;
}

.fortune-overview-copy > p {
  margin: 0;
  color: #536277;
  font-size: .86rem;
  line-height: 1.7;
}

.fortune-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.fortune-keyword-row span {
  padding: 5px 9px;
  border: 1px solid #c7ddd9;
  border-radius: 999px;
  background: #fff;
  color: #316b65;
  font-size: .68rem;
  font-weight: 800;
}

.fortune-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.fortune-category-card {
  margin: 0;
  padding: 18px;
  border: 1px solid #dae3eb;
  border-radius: 7px;
  background: #fff;
}

.fortune-category-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fortune-category-card h3 {
  margin: 0;
  color: #26354a;
  font-size: .92rem;
}

.fortune-category-card strong {
  color: var(--fortune-accent);
  font-size: 1rem;
}

.fortune-meter {
  height: 7px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: #e7edf2;
  overflow: hidden;
}

.fortune-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fortune-accent);
}

.fortune-category-detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fortune-category-detail-list li {
  position: relative;
  margin: 0;
  padding-left: 13px;
  color: #657286;
  font-size: .75rem;
  line-height: 1.6;
}

.fortune-category-detail-list li::before {
  position: absolute;
  top: .65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #84b8b0;
  content: "";
}

.fortune-details {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
  gap: 12px;
  margin-top: 12px;
}

.fortune-details > section {
  padding: 19px;
  border: 1px solid #dae3eb;
  border-radius: 7px;
  background: #f8fafb;
}

.fortune-details > section > span {
  display: block;
  margin-bottom: 6px;
  color: #778498;
  font-size: .68rem;
  font-weight: 800;
}

.fortune-details > section > strong {
  display: block;
  color: var(--fortune-ink);
  font-size: .95rem;
}

.fortune-details > section > p {
  margin: 7px 0 0;
  color: #657286;
  font-size: .76rem;
  line-height: 1.65;
}

.fortune-lucky dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.fortune-lucky dl > div {
  padding: 9px 10px;
  border: 1px solid #e0e7ed;
  border-radius: 6px;
  background: #fff;
}

.fortune-lucky dt {
  color: #8490a0;
  font-size: .63rem;
}

.fortune-lucky dd {
  margin: 3px 0 0;
  color: #26354a;
  font-size: .76rem;
  font-weight: 800;
}

.fortune-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.fortune-actions button {
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 800;
  box-shadow: none;
}

.fortune-actions button:first-child {
  background: var(--fortune-accent);
  color: #fff;
}

.fortune-actions button:last-child {
  border: 1px solid #cfdbe5;
  background: #fff;
  color: #425168;
}

.fortune-result-note {
  margin: 12px 0 0;
  color: #7c8898;
  font-size: .7rem;
}

.fortune-guide {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid #dde4ed;
}

.fortune-guide > header h2 {
  margin-bottom: 10px;
}

.fortune-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.fortune-guide-steps article {
  padding: 18px;
  border: 1px solid var(--fortune-line);
  border-radius: 7px;
  background: #fff;
}

.fortune-guide-steps span {
  color: var(--fortune-accent);
  font-size: .7rem;
  font-weight: 800;
}

.fortune-guide-steps h3,
.fortune-guide-grid h3 {
  margin: 7px 0;
  color: #26354a;
  font-size: .92rem;
}

.fortune-guide-steps p,
.fortune-guide-grid p {
  margin: 0;
  color: #657286;
  font-size: .78rem;
  line-height: 1.7;
}

.fortune-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin-top: 18px;
}

.fortune-guide-grid section {
  padding: 22px 0;
  border-bottom: 1px solid #e2e7ee;
}

.fortune-disclaimer {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid #ead7af;
  border-radius: 7px;
  background: #fffaf0;
}

.fortune-disclaimer strong {
  display: block;
  color: #7a5318;
  font-size: .88rem;
}

.fortune-disclaimer p {
  margin: 7px 0 0;
  color: #756649;
  font-size: .76rem;
  line-height: 1.7;
}

@media screen and (max-width: 980px) {
  .fortune-tool {
    grid-template-columns: 1fr;
  }

  .fortune-preview {
    min-height: 230px;
    border-top: 1px solid var(--fortune-line);
    border-left: 0;
  }
}

@media screen and (max-width: 620px) {
  .fortune-heading h1 {
    font-size: 1.72rem;
  }

  .fortune-form,
  .fortune-result {
    padding: 17px;
  }

  .fortune-form > header {
    display: grid;
  }

  .fortune-form > header button {
    width: 100%;
  }

  .fortune-fields,
  .fortune-category-grid,
  .fortune-details,
  .fortune-guide-steps,
  .fortune-guide-grid {
    grid-template-columns: 1fr;
  }

  .fortune-period-tabs {
    gap: 5px;
  }

  .fortune-period-tabs button {
    min-height: 40px;
    font-size: .72rem;
  }

  .fortune-overview {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .fortune-score-ring {
    width: 112px;
    height: 112px;
  }

  .fortune-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
