:root {
  color-scheme: dark;

  --night: #11182c;
  --night-soft: #1c2946;
  --velvet-blue: #24395d;
  --deep-blue: #17223c;
  --gold: #cba44f;
  --gold-deep: #8f6729;
  --gold-light: #ecd99b;
  --ivory: #fff8e9;
  --paper: #f3ead8;
  --ink: #2c2a2d;
  --ink-soft: #625d65;
  --plum: #5c3d5d;
  --teal: #406c70;
  --rose: #a85d6c;
  --panel: rgba(255, 248, 233, 0.93);
  --panel-soft: rgba(255, 250, 239, 0.75);
  --border: rgba(237, 217, 155, 0.66);
  --focus: #3a7ca5;

  --radius-small: 14px;
  --radius-medium: 24px;
  --radius-large: 38px;

  --shadow:
    0 35px 100px rgba(4, 8, 20, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);

  --shadow-small:
    0 15px 38px rgba(13, 19, 36, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);

  --font-sans:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;

  --font-serif:
    "Iowan Old Style",
    "Palatino Linotype",
    "Noto Serif TC",
    "Songti TC",
    serif;

  --transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.72;
  background: var(--night);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.art-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(
      rgba(14, 20, 37, 0.18),
      rgba(14, 20, 37, 0.48)
    ),
    url("assets/backgrounds/startup-wings-gallery-background.webp")
      center / cover no-repeat;
}

.gold-orbit {
  position: absolute;
  border: 2px solid rgba(236, 217, 155, 0.24);
  border-radius: 50%;
  box-shadow:
    0 0 45px rgba(203, 164, 79, 0.12),
    inset 0 0 35px rgba(255, 255, 255, 0.05);
}

.orbit-one {
  top: -13rem;
  left: 50%;
  width: min(90vw, 62rem);
  height: min(90vw, 62rem);
  transform: translateX(-50%);
}

.orbit-two {
  right: -16rem;
  bottom: -17rem;
  width: 38rem;
  height: 38rem;
}

.mosaic-cloud {
  position: absolute;
  width: 20rem;
  height: 11rem;
  border-radius: 48% 52% 44% 56%;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(236, 217, 155, 0.13) 0 10px,
      rgba(203, 164, 79, 0.04) 10px 20px
    ),
    radial-gradient(
      circle at 35% 40%,
      rgba(255, 248, 233, 0.25),
      transparent 60%
    );
  filter: blur(1px);
}

.cloud-one {
  top: 14%;
  left: -8rem;
  transform: rotate(-12deg);
}

.cloud-two {
  right: -7rem;
  top: 47%;
  transform: rotate(16deg);
}

.floral-line {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(236, 217, 155, 0.18);
  border-radius: 45% 55% 60% 40%;
}

.floral-one {
  top: 35%;
  left: 4%;
  transform: rotate(35deg);
}

.floral-two {
  right: 7%;
  bottom: 5%;
  transform: rotate(-28deg);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 60rem);
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    1rem
    max(3.5rem, env(safe-area-inset-bottom));
}

.brand-header {
  margin-bottom: 1.2rem;
  text-align: center;
  color: var(--ivory);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.38);
}

.brand-name {
  margin: 0;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.brand-location {
  margin: 0.2rem 0 0;
  color: rgba(255, 248, 233, 0.7);
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.gold-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.gold-panel::before {
  position: absolute;
  inset: 0.55rem;
  z-index: -1;
  content: "";
  border: 1px solid rgba(143, 103, 41, 0.24);
  border-radius: calc(var(--radius-large) - 0.55rem);
  pointer-events: none;
}

.gold-panel::after {
  position: absolute;
  top: -7rem;
  right: -7rem;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  content: "";
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(203, 164, 79, 0.15) 0 8deg,
      transparent 8deg 16deg
    );
  opacity: 0.7;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  line-height: 1.32;
}

h1,
h2 {
  font-family: var(--font-serif);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.55rem);
}

h1 span {
  display: block;
  margin-top: 0.35rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.4rem);
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.04rem;
}

p {
  margin-top: 0;
}

.subtitle {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-weight: 650;
}

.lead,
.instructions,
.disclaimer,
.result-section p,
.balance-card p,
.oya-note p,
.content-notice p,
.quote-card,
.tagline-card p,
.nearby-result,
.cta-card p {
  white-space: pre-line;
}

.lead {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.instructions {
  margin: 1rem 0 0;
  color: var(--ink-soft);
}

.disclaimer {
  margin: 1rem 0 0;
  color: #756e76;
  font-size: 0.9rem;
}

.quote-card,
.tagline-card {
  margin: 1.1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(203, 164, 79, 0.38);
  border-radius: var(--radius-medium);
  background:
    linear-gradient(
      135deg,
      rgba(236, 217, 155, 0.43),
      rgba(255, 255, 255, 0.5)
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.quote-card:empty {
  display: none;
}

.tagline-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gold-deep);
}

.tagline-card p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

.navigation-row {
  justify-content: space-between;
}

.primary-button,
.secondary-button,
.text-button {
  appearance: none;
  min-height: 3rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.2rem;
  font-weight: 780;
}

.primary-button {
  border: 1px solid rgba(143, 103, 41, 0.32);
  color: #2d261c;
  background:
    linear-gradient(
      135deg,
      var(--gold-light),
      #f5df9f 50%,
      var(--gold)
    );
  box-shadow:
    0 14px 32px rgba(143, 103, 41, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.secondary-button {
  border: 1px solid rgba(44, 42, 45, 0.16);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow-small);
}

.text-button {
  min-height: 2.5rem;
  padding: 0.4rem 0;
  border: none;
  color: var(--ink-soft);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.28rem;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: translateY(0);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.answer-card:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(58, 124, 165, 0.42);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.progress-wrap {
  margin-bottom: 1.5rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.87rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 0.78rem;
  overflow: hidden;
  border: 1px solid rgba(44, 42, 45, 0.08);
  border-radius: 999px;
  background: rgba(44, 42, 45, 0.09);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      var(--velvet-blue),
      var(--gold-light) 52%,
      var(--rose)
    );
  box-shadow: 0 0 20px rgba(203, 164, 79, 0.34);
  transition: width 240ms ease;
}

.question-title {
  margin-bottom: 1.2rem;
}

.answer-list {
  display: grid;
  gap: 0.8rem;
}

.answer-card {
  appearance: none;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(44, 42, 45, 0.12);
  border-radius: var(--radius-medium);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-small);
  cursor: pointer;
  text-align: left;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background-color var(--transition),
    box-shadow var(--transition);
}

.answer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(203, 164, 79, 0.48);
}

.answer-card.is-selected {
  border-color: rgba(143, 103, 41, 0.64);
  background:
    linear-gradient(
      135deg,
      rgba(236, 217, 155, 0.52),
      rgba(255, 255, 255, 0.78)
    );
  box-shadow:
    0 16px 40px rgba(143, 103, 41, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.answer-card-inner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
}

.answer-key {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(203, 164, 79, 0.38);
  border-radius: 50%;
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.64);
  font-weight: 850;
}

.answer-text {
  padding-top: 0.12rem;
}

.tie-result-name {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--gold-deep);
  font-size: 0.84rem;
  font-weight: 850;
}

.wing-stage {
  position: relative;
  width: min(100%, 38rem);
  aspect-ratio: 1 / 1;
  margin: 0 auto 1.2rem;
}

.result-image,
.wing-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(203, 164, 79, 0.5);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-small);
}

.result-image {
  object-fit: contain;
  background: var(--paper);
}

.wing-placeholder {
  position: relative;
  display: grid;
  place-content: center;
  gap: 0.65rem;
  padding: 1rem;
  color: var(--ink-soft);
  text-align: center;
  background:
    repeating-conic-gradient(
      from 25deg,
      rgba(203, 164, 79, 0.16) 0 10deg,
      transparent 10deg 20deg
    ),
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 255, 255, 0.92),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #d7c281,
      #f8efd9 48%,
      #284166
    );
}

.wing-placeholder::before {
  position: absolute;
  inset: 1rem;
  content: "";
  border: 1px solid rgba(143, 103, 41, 0.46);
  border-radius: calc(var(--radius-large) - 0.75rem);
}

.placeholder-symbol {
  font-size: clamp(3rem, 12vw, 6rem);
}

.result-name {
  margin-bottom: 0.2rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.english-name {
  margin-bottom: 0.3rem;
  color: var(--gold-deep);
  font-family: var(--font-serif);
  font-style: italic;
}

.result-symbols {
  margin-bottom: 0.55rem;
  font-size: 1.12rem;
}

.role-line {
  color: var(--ink-soft);
  font-weight: 680;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.keyword-chip {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(143, 103, 41, 0.26);
  border-radius: 999px;
  color: #694d26;
  background: rgba(236, 217, 155, 0.36);
  font-size: 0.84rem;
  font-weight: 700;
}

.result-section,
.balance-card,
.oya-note,
.nearby-result,
.content-notice,
.service-list,
.cta-card {
  margin-bottom: 1rem;
  padding: 1.1rem;
  border: 1px solid rgba(44, 42, 45, 0.1);
  border-radius: var(--radius-medium);
  background: var(--panel-soft);
  box-shadow: var(--shadow-small);
}

.result-section p,
.balance-card p,
.oya-note p,
.content-notice p {
  margin-bottom: 0;
}

.balance-card {
  border-color: rgba(64, 108, 112, 0.28);
  background:
    linear-gradient(
      135deg,
      rgba(219, 237, 231, 0.62),
      rgba(255, 255, 255, 0.58)
    );
}

.balance-card h3:not(:first-child) {
  margin-top: 1.1rem;
}

.oya-note {
  border-color: rgba(168, 93, 108, 0.28);
  background:
    linear-gradient(
      135deg,
      rgba(242, 218, 221, 0.62),
      rgba(255, 255, 255, 0.56)
    );
}

.strength-list {
  margin: 0;
  padding-left: 1.2rem;
}

.strength-list li + li {
  margin-top: 0.38rem;
}

.nearby-result {
  color: var(--ink-soft);
}

.nearby-result strong {
  color: var(--ink);
}

.cta-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}

.cta-card p {
  color: var(--ink-soft);
}

.cta-card .primary-button,
.cta-card .secondary-button {
  width: 100%;
  margin-top: 0.55rem;
}

.service-list p {
  margin-bottom: 0.4rem;
  font-weight: 780;
}

.service-list ul {
  margin: 0;
  padding-left: 1.2rem;
}

.content-notice {
  color: var(--ink-soft);
}

.site-footer {
  padding: 1.3rem 0 0;
  color: rgba(255, 248, 233, 0.82);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.48);
}

.site-footer p {
  margin: 0.25rem 0;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.72rem 1rem;
  border: 1px solid rgba(236, 217, 155, 0.28);
  border-radius: 999px;
  color: var(--ivory);
  background: rgba(17, 24, 44, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  text-align: center;
}

.noscript-message {
  position: relative;
  z-index: 40;
  margin: 1rem;
  padding: 1rem;
  border-radius: var(--radius-small);
  color: var(--ink);
  background: var(--ivory);
}

@media (min-width: 42rem) {
  .site-shell {
    padding-inline: 1.5rem;
  }

  .answer-card-inner {
    padding: 1.05rem 1.15rem;
  }
}

@media (min-width: 54rem) {
  .gold-panel {
    padding: 2.5rem;
  }

  .cta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cta-card {
    display: flex;
    flex-direction: column;
  }

  .cta-card p {
    flex-grow: 1;
  }
}

@media (max-width: 31rem) {
  .navigation-row {
    align-items: stretch;
  }

  .navigation-row .primary-button,
  .navigation-row .secondary-button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Release layout: gallery preview, direct-share helpers and compact quiz. */

.browser-reminder {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.result-preview {
  margin-top: 2rem;
  padding-top: 1.55rem;
  border-top: 1px solid rgba(143, 103, 41, 0.22);
}

.result-preview > h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.result-preview > p:not(.eyebrow) {
  margin: 0.6rem 0 1rem;
  color: var(--ink-soft);
}

.result-preview-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.48rem;
}

.result-preview-card {
  min-width: 0;
  margin: 0;
}

.result-preview-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(203, 164, 79, 0.48);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 50% 38%, #fff8e9, transparent 56%),
    linear-gradient(145deg, #d8bd72, #17223c);
  box-shadow: 0 8px 20px rgba(17, 24, 44, 0.18);
}

.result-preview-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-preview-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.result-preview-name {
  display: block;
  margin-top: 0.3rem;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-download-note {
  margin: 0.7rem 0 0 !important;
  color: var(--ink-soft) !important;
  font-size: 0.82rem !important;
  line-height: 1.55;
}

.nearby-result[hidden] {
  display: none !important;
}

.restart-button {
  min-width: min(100%, 18rem);
}

.site-footer {
  width: fit-content;
  max-width: 100%;
  margin: 1.2rem auto 0;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(236, 217, 155, 0.2);
  border-radius: 1.25rem;
  background: rgba(9, 14, 28, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 14px, 60rem);
    padding-inline: 0;
  }

  .gold-panel {
    padding: 1.3rem 1rem;
    border-radius: 1.55rem;
  }

  .result-preview-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .result-preview-name {
    font-size: 0.53rem;
  }

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

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .text-button {
    width: 100%;
  }

  body[data-page="quiz"] .site-shell {
    display: grid;
    place-items: center;
    width: min(100% - 10px, 60rem);
    min-height: 100dvh;
    padding:
      max(5px, env(safe-area-inset-top))
      0
      max(5px, env(safe-area-inset-bottom));
  }

  body[data-page="quiz"] .brand-header,
  body[data-page="quiz"] .site-footer,
  body[data-page="quiz"] .eyebrow {
    display: none;
  }

  body[data-page="quiz"] .gold-panel {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body[data-page="quiz"] .progress-wrap {
    margin-bottom: 8px;
  }

  body[data-page="quiz"] .progress-meta {
    margin-bottom: 4px;
    font-size: 0.72rem;
  }

  body[data-page="quiz"] .progress-track {
    height: 6px;
  }

  body[data-page="quiz"] .question-title {
    margin-bottom: 9px;
    font-size: clamp(1.2rem, 5.5vw, 1.48rem);
    line-height: 1.28;
  }

  body[data-page="quiz"] .answer-list {
    gap: 6px;
  }

  body[data-page="quiz"] .answer-card {
    min-height: 50px;
    border-radius: 15px;
  }

  body[data-page="quiz"] .answer-card-inner {
    gap: 9px;
    align-items: center;
    padding: 8px 10px;
  }

  body[data-page="quiz"] .answer-key {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.82rem;
  }

  body[data-page="quiz"] .answer-text {
    padding-top: 0;
    font-size: 0.92rem;
    line-height: 1.35;
  }

  body[data-page="quiz"] .navigation-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
  }

  body[data-page="quiz"] .navigation-row button {
    min-width: 0;
    min-height: 44px;
    padding: 7px 5px;
  }
}

@media (max-width: 520px) and (max-height: 650px) {
  body[data-page="quiz"] .gold-panel {
    padding: 9px 11px;
  }

  body[data-page="quiz"] .question-title {
    margin-bottom: 6px;
    font-size: 1.12rem;
  }

  body[data-page="quiz"] .answer-list {
    gap: 4px;
  }

  body[data-page="quiz"] .answer-card {
    min-height: 46px;
  }

  body[data-page="quiz"] .answer-card-inner {
    padding: 6px 8px;
  }

  body[data-page="quiz"] .answer-text {
    font-size: 0.84rem;
    line-height: 1.28;
  }

  body[data-page="quiz"] .navigation-row {
    margin-top: 6px;
  }
}

