:root {
  --bg: #edf4f6;
  --paper: #fbfdff;
  --ink: #111817;
  --text: #273332;
  --muted: #657473;
  --line: #d9e5e8;
  --soft: #eef5f7;
  --accent: #f0523d;
  --green: #168a7a;
  --shadow: 0 18px 44px rgba(16, 39, 42, 0.11);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Noto Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(rgba(17, 24, 23, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 23, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(22, 138, 122, 0.16), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(240, 82, 61, 0.12), transparent 22%),
    linear-gradient(180deg, #edf4f6 0, #f8fbfc 460px, #eef5f2 100%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(240, 82, 61, 0.24);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 229, 232, 0.88);
  background: rgba(251, 253, 255, 0.92);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  width: min(620px, 100%);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 12px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-weight: 950;
  overflow: hidden;
  padding: 3px;
}

.icon-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.brand-link {
  justify-self: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.engine-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d49622;
  box-shadow: 0 0 0 4px rgba(212, 150, 34, 0.16);
}

.engine-state.is-ready .state-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 138, 122, 0.15);
}

.engine-state.is-error .state-dot {
  background: #f0523d;
  box-shadow: 0 0 0 4px rgba(240, 82, 61, 0.15);
}

.legal-chip {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.fortune-shell {
  width: min(620px, 100%);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(217, 229, 232, 0.86);
}

.fortune-hero {
  position: relative;
  min-height: 392px;
  overflow: hidden;
  background: #eef6f7;
}

.fortune-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(251, 253, 255, 0.98) 0%, rgba(251, 253, 255, 0.88) 38%, rgba(251, 253, 255, 0.2) 68%),
    url("assets/fortune-crosscheck-hero.png") center / cover no-repeat;
}

.fortune-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  content: "";
  background: linear-gradient(180deg, transparent, var(--paper));
}

.fortune-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 392px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 30px 22px;
}

.fortune-hero__date {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(22, 138, 122, 0.2);
  border-radius: 999px;
  background: rgba(251, 253, 255, 0.76);
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
  padding: 4px 11px;
}

.fortune-hero h1 {
  margin-top: 13px;
  color: var(--ink);
  font-size: 37px;
}

.fortune-hero p {
  width: min(380px, 100%);
  margin-top: 10px;
  color: #354442;
  font-size: 16px;
  font-weight: 850;
  word-break: keep-all;
}

.hero-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  gap: 8px;
  padding: 0 18px;
  box-shadow: 0 12px 24px rgba(240, 82, 61, 0.22);
}

.hero-action {
  margin-top: 22px;
}

.hero-action span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.17);
  font-size: 12px;
}

.fortune-feed,
.mix-screen,
.reading-screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 18px 44px;
}

.search-strip {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  gap: 10px;
  padding: 0 14px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(16, 39, 42, 0.06);
}

.search-strip span:first-child {
  color: var(--accent);
  font-size: 19px;
}

.fortune-block {
  display: grid;
  gap: 13px;
}

.block-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.block-heading h2 {
  font-size: 21px;
}

.block-heading span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.fortune-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 2px 0 4px;
}

.fortune-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-width: 0;
  min-height: 106px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 0 4px;
  text-align: center;
  box-shadow: none;
  transition: transform 160ms ease;
}

.fortune-tile:hover,
.fortune-tile:focus-visible {
  transform: translateY(-1px);
}

.fortune-tile:hover .menu-icon,
.fortune-tile:focus-visible .menu-icon {
  color: color-mix(in srgb, var(--tile-accent, var(--accent)) 86%, var(--ink));
}

.tile-icon {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
}

.form-head__icon,
.api-reading__mark,
.oracle-loading__emblem {
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 34%, #fff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 9%, #fff);
  color: var(--tile-accent, var(--accent));
  font-weight: 950;
}

.menu-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 30%, #fff);
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--tile-accent, var(--accent)) 18%, #fff), #fff),
    #fff;
  color: var(--tile-accent, var(--accent));
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, var(--tile-accent, var(--accent)) 6%, transparent),
    0 4px 10px color-mix(in srgb, var(--tile-accent, var(--accent)) 11%, transparent);
}

.menu-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.fortune-tile__body {
  display: grid;
  min-width: 0;
  width: 100%;
  justify-items: center;
  gap: 0;
}

.fortune-tile__title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: keep-all;
}

.fortune-tile__subtitle {
  display: none;
}

.fortune-tile__arrow {
  display: none;
}

.tile-icon .menu-icon {
  width: 74px;
  height: 74px;
  border: 0;
  overflow: hidden;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.form-head__icon .menu-icon,
.api-reading__mark .menu-icon,
.oracle-loading__emblem .menu-icon {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.form-head__icon .menu-icon,
.api-reading__mark .menu-icon {
  font-size: 29px;
}

.back-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
}

.back-button span {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.form-card,
.api-reading,
.error-panel,
.oracle-loading {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.form-card {
  padding: 18px;
}

.form-head {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 18px;
}

.form-head__icon {
  width: 70px;
  height: 70px;
  color: var(--accent);
  padding: 0;
}

.form-head span {
  margin-top: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.form-head h2 {
  margin-top: 6px;
  font-size: 24px;
}

.form-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  word-break: keep-all;
}

.fortune-form {
  display: grid;
  gap: 16px;
}

.fortune-field {
  display: grid;
  gap: 8px;
}

.fortune-field > label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.fortune-field input,
.fortune-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  padding: 0 11px;
}

.segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  gap: 3px;
  padding: 3px;
}

.segment input {
  position: absolute;
  opacity: 0;
}

.segment span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
}

.segment input:checked + span {
  background: #fff;
  color: var(--ink);
}

.date-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 8px;
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.radio-row label {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  gap: 9px;
  padding: 0 12px;
}

.radio-row input {
  position: absolute;
  opacity: 0;
}

.radio-dot {
  width: 13px;
  height: 13px;
  border: 2px solid #b5c6c9;
  border-radius: 50%;
}

.radio-row input:checked + .radio-dot,
.radio-row label:has(input:checked) .radio-dot {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 42%, transparent 46%);
}

.primary-action {
  width: 100%;
}

.primary-action--dark {
  background: var(--ink);
  box-shadow: none;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.oracle-loading {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 18px;
  text-align: center;
}

.oracle-loading__emblem {
  width: 78px;
  height: 78px;
  color: var(--tile-accent, var(--accent));
  padding: 0;
}

.oracle-loading__emblem .menu-icon {
  font-size: 32px;
}

.oracle-loading__copy span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.oracle-loading__copy h2 {
  margin-top: 6px;
  font-size: 24px;
}

.oracle-loading__copy p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.oracle-loading__bar {
  width: min(310px, 100%);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfecef;
}

.oracle-loading__bar span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loading-slide 0.9s ease-in-out infinite alternate;
}

@keyframes loading-slide {
  from {
    transform: translateX(-16%);
  }
  to {
    transform: translateX(132%);
  }
}

.api-reading {
  overflow: hidden;
}

.api-reading__head {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 250px;
  align-content: center;
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--tile-accent, var(--accent)) 18%, transparent), transparent 24%),
    linear-gradient(135deg, #fbfdff 0%, color-mix(in srgb, var(--tile-accent, var(--accent)) 8%, #eef5f7) 100%);
  color: var(--ink);
  padding: 24px 18px;
  text-align: center;
}

.api-reading__head::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(37, 45, 42, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 45, 42, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

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

.api-reading__mark {
  width: 68px;
  height: 68px;
  color: var(--tile-accent, var(--accent));
  padding: 0;
}

.api-reading__head span {
  margin-top: 13px;
  color: var(--tile-accent, var(--accent));
  font-size: 12px;
  font-weight: 950;
}

.api-reading__head h2 {
  max-width: 500px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 25px;
  word-break: keep-all;
}

.api-reading__head p {
  max-width: 430px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  word-break: keep-all;
}

.raw-panel,
.chart-grid,
.result-summary,
.result-actions {
  margin: 16px;
}

.raw-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.raw-panel h3,
.raw-panel summary,
.chart-box h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.raw-panel summary {
  cursor: pointer;
}

.raw-panel pre {
  overflow: auto;
  max-height: 520px;
  margin: 12px 0 0;
  border-radius: 8px;
  background: #101817;
  color: #e9f7f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: keep-all;
  padding: 14px;
}

.raw-panel--compact pre {
  max-height: 220px;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chart-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-card {
  display: grid;
  align-content: start;
  gap: 4px;
}

.system-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.system-card__head strong {
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 10%, #fff);
  color: var(--tile-accent, var(--accent));
  font-size: 12px;
  font-weight: 950;
  padding: 5px 8px;
  white-space: nowrap;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e6eef0;
  padding: 9px 0;
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.kv-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  text-align: right;
}

.evidence-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.evidence-list span {
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  padding: 8px 9px;
  word-break: keep-all;
}

.source-line {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

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

.summary-card {
  display: grid;
  gap: 7px;
  border: 1px solid #dfe9e7;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.summary-card--wide {
  grid-column: 1 / -1;
}

.summary-card span {
  color: var(--tile-accent, var(--accent));
  font-size: 12px;
  font-weight: 950;
}

.summary-card strong {
  color: var(--ink);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.summary-card p {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
  word-break: keep-all;
}

.summary-evidence {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-evidence li {
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  padding: 8px 9px;
  word-break: keep-all;
}

.result-score-strip {
  display: grid;
  gap: 10px;
  margin: 16px;
  border: 1px solid #dbe8e6;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.result-score-strip div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 8px;
}

.result-score-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.result-score-strip strong {
  color: var(--ink);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.result-score-strip em {
  color: var(--tile-accent, var(--accent));
  font-size: 18px;
  font-style: normal;
  font-weight: 950;
}

.result-score-strip p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  word-break: keep-all;
}

.ai-reading-panel {
  display: grid;
  gap: 14px;
  border-color: #d6e5e3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 252, 251, .98)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--tile-accent, var(--accent)) 16%, transparent), transparent 34%);
}

.ai-reading-panel--fallback {
  border-color: #ead9c8;
  background: #fffaf4;
}

.ai-reading-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-reading-panel__head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  word-break: break-word;
}

.reading-copy {
  display: grid;
  gap: 11px;
}

.reading-copy h4 {
  margin: 8px 0 0;
  color: var(--tile-accent, var(--accent));
  font-size: 14px;
  font-weight: 950;
}

.reading-copy h4:first-child {
  margin-top: 0;
}

.reading-copy p,
.reading-copy li {
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.75;
  word-break: keep-all;
}

.reading-copy p {
  margin: 0;
}

.reading-copy ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-copy li {
  border-radius: 8px;
  background: #f3f8f7;
  padding: 9px 10px;
}

.structured-report {
  display: grid;
  gap: 13px;
}

.report-summary {
  display: grid;
  gap: 8px;
  border: 1px solid #dfeae8;
  border-radius: 8px;
  background: #fbfefd;
  padding: 13px;
}

.report-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.report-summary p {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.65;
  word-break: keep-all;
}

.report-notices {
  display: grid;
  gap: 6px;
}

.report-notices span {
  border-radius: 8px;
  background: #f1f7f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
  padding: 8px 9px;
  word-break: keep-all;
}

.report-traditions {
  display: grid;
  gap: 10px;
}

.report-traditions h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.report-tradition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.report-tradition {
  display: grid;
  gap: 7px;
  border: 1px solid #dce9e6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.report-tradition span {
  width: fit-content;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 10%, #fff);
  color: var(--tile-accent, var(--accent));
  font-size: 11px;
  font-weight: 950;
  padding: 5px 8px;
}

.report-tradition strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.35;
  word-break: keep-all;
}

.report-tradition p,
.report-tradition small {
  color: var(--text);
  font-size: 12px;
  font-weight: 830;
  line-height: 1.55;
  word-break: keep-all;
}

.report-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-toc button {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #dce9e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  gap: 8px;
  padding: 8px 9px;
  text-align: left;
  word-break: keep-all;
}

.report-toc button span,
.report-section summary span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 11%, #fff);
  color: var(--tile-accent, var(--accent));
  font-size: 11px;
  font-weight: 950;
}

.report-section-list {
  display: grid;
  gap: 10px;
}

.report-section {
  scroll-margin-top: 76px;
  border: 1px solid #dce9e6;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.report-section summary {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.report-section summary::-webkit-details-marker {
  display: none;
}

.report-section summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  word-break: keep-all;
}

.report-section__lead {
  border-top: 1px solid #edf3f1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
  padding: 0 12px 12px;
  word-break: keep-all;
}

.report-subsection-list {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.report-subsection {
  display: grid;
  gap: 9px;
  border-radius: 8px;
  background: #f7fbfa;
  padding: 12px;
}

.report-subsection h5 {
  margin: 0;
  color: var(--tile-accent, var(--accent));
  font-size: 14px;
  font-weight: 950;
  line-height: 1.3;
  word-break: keep-all;
}

.report-subsection > p,
.report-note p,
.report-action-box li {
  color: var(--text);
  font-size: 13px;
  font-weight: 830;
  line-height: 1.68;
  word-break: keep-all;
}

.report-subsection > p,
.report-note p {
  margin: 0;
}

.report-note {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: start;
}

.report-note span {
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding: 7px 0;
  text-align: center;
}

.report-note--action span {
  color: var(--tile-accent, var(--accent));
}

.report-action-box {
  display: grid;
  gap: 9px;
  border: 1px solid #dce9e6;
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.report-action-box h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.report-action-box ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-action-box li {
  border-radius: 8px;
  background: #f3f8f7;
  padding: 9px 10px;
}

.user-month-panel {
  display: grid;
  gap: 12px;
}

.user-month-list {
  display: grid;
  gap: 8px;
}

.user-month-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: start;
  border-radius: 8px;
  background: #f6faf9;
  padding: 10px;
}

.user-month-item strong {
  color: var(--tile-accent, var(--accent));
  font-size: 14px;
  font-weight: 950;
}

.user-month-item p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  word-break: keep-all;
}

.detail-panel {
  display: grid;
  gap: 14px;
}

.mathfortune-score {
  display: grid;
  gap: 14px;
  border-color: #d9e4ee;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faf9 100%);
}

.mathfortune-score > p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.55;
  word-break: keep-all;
}

.score-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}

.score-hero span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.score-hero strong {
  grid-row: span 2;
  color: var(--ink);
  font-size: 46px;
  font-weight: 950;
  line-height: 1;
}

.score-hero em {
  color: var(--accent);
  font-size: 22px;
  font-style: normal;
  font-weight: 950;
}

.system-weight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-weight-list span {
  border: 1px solid #dfebe8;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.detail-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-score {
  display: grid;
  gap: 5px;
  border: 1px solid #e2ece9;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.detail-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-score strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
}

.detail-score em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
  word-break: keep-all;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal-list > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.signal-chip,
.signal-row {
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  padding: 9px 10px;
  word-break: keep-all;
}

.signal-row {
  display: grid;
  gap: 4px;
}

.extraction-panel {
  display: grid;
  gap: 12px;
}

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

.extraction-item {
  display: grid;
  gap: 6px;
  border: 1px solid #e2ece9;
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.extraction-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.extraction-item p {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
  word-break: keep-all;
}

.extraction-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.notice-panel h3 {
  color: #9f3c2e;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-actions .primary-action {
  width: 100%;
}

.secondary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  padding: 0 16px;
}

.signal-row b {
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.signal-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.error-panel {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.error-panel strong {
  color: var(--accent);
  font-size: 18px;
}

.error-panel p {
  color: var(--text);
  font-weight: 800;
}

.api-paused-panel {
  justify-items: center;
  text-align: center;
}

.api-paused-panel .oracle-loading__emblem {
  width: 72px;
  height: 72px;
  margin-bottom: 2px;
  color: var(--tile-accent, var(--accent));
  padding: 0;
}

.api-paused-panel strong {
  color: var(--ink);
}

.api-paused-panel p {
  max-width: 390px;
  color: var(--muted);
  line-height: 1.65;
  word-break: keep-all;
}

.legal-page {
  display: grid;
  gap: 18px;
  padding: 22px 18px 44px;
}

.legal-back {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
}

.legal-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 82, 61, 0.08), transparent 42%),
    #fff;
  padding: 22px 18px;
  text-align: left;
}

.legal-hero span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.legal-hero h1 {
  margin-top: 7px;
  font-size: 27px;
}

.legal-hero p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.legal-content {
  display: grid;
  gap: 18px;
}

.legal-section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.legal-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-size: 18px;
}

.legal-section p {
  margin-top: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.75;
  word-break: keep-all;
}

.legal-section a {
  color: var(--accent);
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  width: min(620px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: #fbfdff;
  color: var(--muted);
  padding: 22px 18px 30px;
  text-align: center;
}

.site-footer strong {
  color: var(--ink);
  font-weight: 950;
}

.site-footer p {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer small {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 620px) {
  .site-header__inner {
    grid-template-columns: 42px 1fr auto;
  }

  .engine-state {
    font-size: 11px;
  }

  .fortune-hero,
  .fortune-hero__copy {
    min-height: 360px;
  }

  .fortune-hero h1 {
    font-size: 31px;
  }

  .fortune-hero p {
    width: min(284px, 100%);
  }

  .fortune-hero::before {
    background:
      linear-gradient(90deg, rgba(251, 253, 255, 0.98) 0%, rgba(251, 253, 255, 0.9) 46%, rgba(251, 253, 255, 0.28) 78%),
      url("assets/fortune-crosscheck-hero.png") 66% center / auto 100% no-repeat;
  }

  .fortune-feed,
  .mix-screen,
  .reading-screen {
    padding: 18px 14px 38px;
  }

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

  .fortune-tile {
    min-height: 101px;
  }

  .tile-icon,
  .tile-icon .menu-icon {
    width: 68px;
    height: 68px;
  }

  .tile-icon .menu-icon {
    font-size: 31px;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .detail-score-grid {
    grid-template-columns: 1fr;
  }

  .result-summary,
  .extraction-grid,
  .report-toc,
  .report-tradition-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .date-grid {
    grid-template-columns: 1fr 1fr;
  }

  .date-grid select:first-child {
    grid-column: span 2;
  }
}
