.fortune-page {
  --fortune-navy: #102b55;
  --fortune-blue: #1d4ed8;
  --fortune-ivory: #fffaf0;
  --fortune-gold: #d8a83e;
  --fortune-line: rgba(23, 58, 118, 0.16);
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 168, 62, 0.08), transparent 25rem),
    var(--bg);
}

.fortune-page .site-header {
  background: rgba(247, 249, 252, 0.94);
}

.fortune-shell {
  width: min(1160px, calc(100% - 40px));
}

.fortune-image-hero {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--fortune-line);
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(16, 43, 85, 0.1);
}

.fortune-image-hero picture {
  display: block;
}

.fortune-banner-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.fortune-banner-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: end;
  padding: 24px 28px 18px;
}

.fortune-banner-copy h1 {
  margin-top: 5px;
  color: var(--fortune-navy);
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.fortune-banner-copy > div > p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
}

.fortune-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.fortune-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 58, 118, 0.12);
  border-radius: 999px;
  color: var(--fortune-navy);
  font-size: 12px;
  font-weight: 800;
}

.fortune-banner-note {
  margin: 0;
  padding: 0 28px 22px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.fortune-calculator {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  margin-top: 26px;
}

.fortune-form-card,
.fortune-result-card {
  border-color: var(--fortune-line);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(16, 43, 85, 0.08);
}

.fortune-form-card {
  position: sticky;
  top: 88px;
  padding: clamp(24px, 4vw, 34px);
  background:
    linear-gradient(160deg, rgba(255, 250, 240, 0.9), rgba(255, 255, 255, 0.98) 44%),
    var(--surface);
}

.fortune-form-card fieldset {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fortune-form-card legend {
  margin-bottom: 8px;
  color: var(--fortune-navy);
  font-size: 24px;
}

.fortune-form-intro,
.fortune-privacy {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.fortune-form-card .single-field,
.fortune-input-grid {
  grid-template-columns: 1fr;
}

.optional-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 4px;
  padding: 0 8px;
  background: #eef4ff;
  border-radius: 999px;
  color: var(--fortune-blue);
  font-size: 11px;
  font-weight: 850;
  vertical-align: middle;
}

.fortune-form-card input[type="date"],
.fortune-form-card input[type="time"] {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  color: var(--fortune-navy);
  font-size: 17px;
  font-weight: 800;
}

.fortune-form-card input[type="date"]:focus,
.fortune-form-card input[type="time"]:focus {
  border-color: var(--fortune-blue);
  outline: 3px solid rgba(37, 99, 235, 0.14);
  outline-offset: 1px;
}

.fortune-submit {
  min-height: 56px;
  border-radius: 10px;
  background: var(--fortune-navy);
  font-size: 16px;
}

.fortune-submit:hover {
  background: #173f7c;
}

.fortune-error {
  min-height: 20px;
  margin: -4px 0 -6px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 750;
}

.fortune-result-card {
  position: relative;
  top: auto;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.fortune-result-header {
  padding: clamp(24px, 4vw, 32px);
  background:
    linear-gradient(135deg, rgba(238, 244, 255, 0.96), rgba(255, 255, 255, 0.98) 58%, rgba(255, 250, 240, 0.72));
  border-bottom: 1px solid var(--fortune-line);
}

.fortune-result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fortune-result-topline time {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.fortune-headline {
  max-width: 760px;
  margin: 16px 0 8px;
  color: var(--fortune-navy);
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.035em;
  word-break: keep-all;
}

.fortune-headline:focus {
  outline: 0;
}

.fortune-summary {
  max-width: 720px;
  margin: 0;
  color: #526175;
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
}

.fortune-action-box {
  display: grid;
  gap: 7px;
  margin: 22px clamp(24px, 4vw, 32px) 0;
  padding: 18px 20px;
  background: var(--fortune-navy);
  border-radius: 12px;
}

.fortune-action-box span {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 850;
}

.fortune-action-box strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
}

.fortune-area-section {
  padding: 26px clamp(24px, 4vw, 32px) 22px;
}

.fortune-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.fortune-section-heading > div {
  display: grid;
  gap: 4px;
}

.fortune-section-heading span {
  color: var(--fortune-blue);
  font-size: 12px;
  font-weight: 850;
}

.fortune-section-heading h2 {
  margin: 0;
  color: var(--fortune-navy);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.fortune-section-heading p {
  margin: 0;
  color: #7a8798;
  font-size: 12px;
}

.fortune-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #dfe6ef;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
}

.fortune-areas article {
  min-width: 0;
  padding: 17px 18px;
  background: #ffffff;
}

.fortune-areas h3,
.fortune-time-details h3 {
  margin: 0;
  color: var(--fortune-blue);
  font-size: 13px;
  font-weight: 850;
}

.fortune-areas p,
.fortune-time-details p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.62;
  word-break: keep-all;
}

.fortune-detail-card {
  margin: 0 clamp(24px, 4vw, 32px) 12px;
  background: #ffffff;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
}

.fortune-detail-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 13px 17px;
  color: var(--fortune-navy);
  cursor: pointer;
  list-style: none;
}

.fortune-detail-card summary::-webkit-details-marker {
  display: none;
}

.fortune-detail-card summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.fortune-detail-card summary > span {
  display: grid;
  gap: 3px;
}

.fortune-detail-card summary strong {
  font-size: 15px;
}

.fortune-detail-card summary small {
  color: #7a8798;
  font-size: 12px;
  font-weight: 650;
}

.fortune-detail-card summary::after {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background: #eef4ff;
  border-radius: 50%;
  color: var(--fortune-blue);
  content: "+";
  font-size: 18px;
  font-weight: 700;
}

.fortune-detail-card[open] summary::after {
  content: "−";
}

.fortune-detail-card[open] summary {
  border-bottom: 1px solid #e7ecf2;
}

.fortune-time-details,
.fortune-technical-content {
  padding: 16px;
}

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

.fortune-time-details article {
  min-width: 0;
  padding: 15px;
  background: #f8fafc;
  border-radius: 10px;
}

.fortune-technical-content {
  display: grid;
  gap: 12px;
  background: #fbfcfe;
}

.fortune-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fortune-pillar {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 104px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(23, 58, 118, 0.1);
  border-radius: 10px;
  text-align: center;
}

.fortune-pillar span,
.fortune-pillar small {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.fortune-pillar strong {
  color: var(--fortune-navy);
  font-size: 20px;
  line-height: 1.3;
}

.fortune-time-pillar {
  background: #fffaf0;
  border-color: rgba(216, 168, 62, 0.32);
}

.fortune-relations {
  display: grid;
  gap: 8px;
  margin: 0;
}

.fortune-relations div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  background: rgba(16, 43, 85, 0.045);
  border-radius: 9px;
}

.fortune-relations dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.fortune-relations dd {
  margin: 0;
  color: var(--fortune-navy);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.fortune-result-footer {
  margin-top: 22px;
  padding: 20px clamp(24px, 4vw, 32px) 24px;
  background: #fbfcfe;
  border-top: 1px solid var(--fortune-line);
}

.fortune-share-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: center;
}

.fortune-share-actions > a {
  grid-column: 1 / -1;
}

.fortune-share-button {
  width: auto;
  min-width: 0;
  min-height: 42px;
  padding-inline: 9px;
  background: #ffffff;
  border-color: rgba(29, 78, 216, 0.24);
  color: var(--fortune-blue);
  font-size: 13px;
  font-weight: 850;
}

.fortune-share-button:disabled {
  background: #eef2f7;
  border-color: #d8e0eb;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 1;
}

.fortune-share-status {
  grid-column: 1 / -1;
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.fortune-result-disclaimer {
  margin: 12px 0 0;
  color: #7a8798;
  font-size: 11px;
  line-height: 1.55;
}

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

.fortune-method-grid article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--fortune-line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(16, 43, 85, 0.06);
}

.fortune-step {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #eef4ff;
  border-radius: 50%;
  color: var(--fortune-blue);
  font-size: 12px;
  font-weight: 900;
}

.fortune-method-grid h3,
.fortune-boundary h3 {
  margin: 16px 0 8px;
  color: var(--fortune-navy);
  font-size: 19px;
}

.fortune-method-grid p,
.fortune-boundary p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.fortune-boundary {
  margin-top: 14px;
  border-left: 4px solid var(--fortune-gold);
  box-shadow: none;
}

.fortune-boundary h3 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .fortune-banner-copy {
    grid-template-columns: 1fr;
  }

  .fortune-badges {
    justify-content: flex-start;
  }

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

  .fortune-form-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .fortune-shell {
    width: min(100% - 28px, 1160px);
    padding-top: 28px;
  }

  .fortune-image-hero {
    border-radius: 14px;
  }

  .fortune-banner-image {
    aspect-ratio: 3 / 1;
    object-position: center;
  }

  .fortune-banner-copy {
    padding: 20px 20px 14px;
  }

  .fortune-banner-note {
    padding: 0 20px 18px;
  }

  .fortune-form-card,
  .fortune-result-card {
    border-radius: 14px;
  }

  .fortune-pillars,
  .fortune-areas,
  .fortune-time-details,
  .fortune-method-grid {
    grid-template-columns: 1fr;
  }

  .fortune-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .fortune-relations div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .fortune-detail-card summary {
    min-height: 62px;
  }

  .fortune-result-header {
    padding: 22px 20px;
  }

  .fortune-action-box {
    margin: 18px 20px 0;
  }

  .fortune-area-section {
    padding: 22px 20px 18px;
  }

  .fortune-detail-card {
    margin-right: 20px;
    margin-left: 20px;
  }

  .fortune-result-footer {
    padding: 18px 20px 22px;
  }

  .fortune-result-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-page *,
  .fortune-page *::before,
  .fortune-page *::after {
    scroll-behavior: auto !important;
  }
}
