:root {
  color-scheme: dark;
  --ink: #f5efe3;
  --muted: #c6beb2;
  --dim: #89857f;
  --gold: #d4b36d;
  --gold-bright: #f0d68e;
  --panel: rgba(24, 27, 34, 0.92);
  --panel-2: rgba(37, 39, 46, 0.94);
  --edge: rgba(218, 187, 121, 0.38);
  --edge-cool: rgba(255, 255, 255, 0.15);
  --blue: #5f9ee6;
  --teal: #63d0c0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  background:
    linear-gradient(90deg, rgba(247, 246, 240, 0.94) 0%, rgba(247, 246, 240, 0.84) 38%, rgba(247, 246, 240, 0.3) 66%, rgba(247, 246, 240, 0.12) 100%),
    linear-gradient(0deg, rgba(238, 238, 232, 0.78), rgba(255, 255, 255, 0.08) 52%),
    url("https://static.web.sdo.com/jijiamobile/pic/ff14/wallpaper/20240927patch70/ffxiv_7.0patch_01_2560x1440.jpg"),
    linear-gradient(135deg, #f4f4f2 0%, #dfe3e8 52%, #eef0f2 100%);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center right, center;
  background-attachment: fixed;
  color: var(--ink);
  overflow-x: hidden;
}

#aether-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.2;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.hero,
.quiz,
.result,
.gallery {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
}

.hero {
  grid-template-columns: minmax(0, 720px) 1fr;
  gap: 40px;
}

.quiz,
.result,
.gallery {
  border: 1px solid var(--edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18)),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.64),
    0 18px 46px rgba(0, 0, 0, 0.32);
}

.hero-copy {
  max-width: 650px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(242, 241, 237, 0.76)),
    rgba(255, 255, 255, 0.78);
  color: #252932;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    0 20px 52px rgba(49, 55, 67, 0.18);
  backdrop-filter: blur(10px);
}

.hero-copy .lede {
  color: #5f6570;
}

.hero-copy .ghost {
  color: #252932;
  border-color: rgba(78, 83, 96, 0.3);
  background: rgba(255, 255, 255, 0.55);
}

.hero-copy .kicker {
  color: #9a6f22;
}

.kicker {
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7.2vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.lede,
.result-desc,
#result-role,
.disclaimer,
#share-hint {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
}

.disclaimer {
  margin: 24px 0 0;
  color: #7a766f;
  font-size: 0.86rem;
}

.actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

button {
  min-height: 46px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 0 18px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18)),
    rgba(36, 38, 45, 0.95);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 214, 142, 0.72);
}

.primary {
  background:
    linear-gradient(180deg, #f3d58a, #c58d45 48%, #8f5f2c),
    #c58d45;
  color: #24180b;
  border-color: #f3dfaa;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.5);
}

.ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.2)),
    rgba(38, 40, 47, 0.92);
}

.icon-btn {
  width: 46px;
  padding: 0;
  font-size: 1.25rem;
}

.quiz,
.result {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px);
}

.quiz {
  align-content: center;
}

.quiz-head,
.gallery-head,
.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.progress {
  overflow: hidden;
  height: 10px;
  margin: 22px 0 28px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.36);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82d6, #66c0dc, #e1c26b);
  transition: width 220ms ease;
}

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

.option {
  width: 100%;
  min-height: 68px;
  padding: 18px;
  border-color: var(--edge-cool);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18)),
    var(--panel);
  backdrop-filter: blur(16px);
  line-height: 1.45;
}

.option:hover {
  background:
    linear-gradient(180deg, rgba(215, 182, 106, 0.18), rgba(0, 0, 0, 0.1)),
    var(--panel-2);
  border-color: rgba(240, 212, 138, 0.62);
}

.result {
  align-content: center;
}

.result-top {
  justify-content: flex-start;
}

.job-sigil {
  display: grid;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 1px solid rgba(240, 212, 138, 0.62);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22)),
    rgba(20, 21, 25, 0.95);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.62),
    0 0 26px rgba(215, 182, 106, 0.2);
  overflow: hidden;
}

.job-icon,
.mini-sigil {
  position: relative;
  display: grid;
  place-items: center;
}

.job-icon {
  width: 76px;
  height: 76px;
}

.job-icon img,
.mini-sigil img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.job-icon span,
.mini-sigil span {
  position: absolute;
  color: var(--gold-bright);
  font-weight: 950;
  font-size: 1.6rem;
  opacity: 0;
}

.mini-sigil span {
  font-size: 1rem;
}

.meter-grid {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.meter {
  display: grid;
  grid-template-columns: 108px 1fr 42px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.meter-track {
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.34);
}

.meter-track span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--edge-cool);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18)),
    rgba(18, 20, 25, 0.72);
}

.share-box h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.share-box .kicker {
  margin-bottom: 6px;
}

#share-hint {
  margin: 0;
  font-size: 0.92rem;
}

.qr-wrap {
  display: grid;
  flex: 0 0 auto;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 1px solid rgba(240, 212, 138, 0.52);
  border-radius: 4px;
  background: #f7f2e8;
  color: #5c5040;
  overflow: hidden;
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder {
  text-align: center;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
}

.gallery {
  align-content: start;
  padding: clamp(18px, 4vw, 36px);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.job-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--edge-cool);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18)),
    var(--panel);
  backdrop-filter: blur(14px);
}

.job-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.12rem;
}

.job-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.mini-sigil {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(215, 182, 106, 0.38);
  border-radius: 4px;
  background: rgba(10, 11, 14, 0.72);
  overflow: hidden;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(247, 246, 240, 0.94) 0%, rgba(247, 246, 240, 0.84) 44%, rgba(247, 246, 240, 0.36) 100%),
      url("https://static.web.sdo.com/jijiamobile/pic/ff14/wallpaper/20240927patch70/ffxiv_7.0patch_01_1080x1920.jpg"),
      linear-gradient(135deg, #f4f4f2 0%, #dfe3e8 52%, #eef0f2 100%);
    background-size: cover, cover, cover;
    background-position: center, center top, center;
    background-attachment: scroll;
  }

  .shell {
    width: min(100% - 24px, 1080px);
    padding: 18px 0;
  }

  .hero,
  .quiz,
  .result,
  .gallery {
    min-height: calc(100vh - 36px);
  }

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

  .quiz-head,
  .gallery-head {
    align-items: flex-start;
  }

  .quiz-head {
    gap: 10px;
  }

  .quiz h2 {
    font-size: clamp(1.55rem, 7.2vw, 2.25rem);
    line-height: 1.14;
  }

  .option {
    min-height: 60px;
    padding: 15px;
  }

  .result-top {
    align-items: flex-start;
  }

  .job-sigil {
    width: 76px;
    height: 76px;
  }

  .job-icon {
    width: 60px;
    height: 60px;
  }

  .meter {
    grid-template-columns: 82px 1fr 34px;
    gap: 8px;
    font-size: 0.9rem;
  }

  .share-box {
    align-items: stretch;
    flex-direction: column;
  }

  .qr-wrap {
    width: 132px;
    height: 132px;
  }
}
