:root {
  --ivory: #f4ece3;
  --mist-purple: #c7bcc8;
  --sea-light: #a7afc2;
  --sea: #616d88;
  --ink: #5e536c;
  --coral: #cc9173;
  --cream: #edca95;
  --old-gold: #b58f5e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
button { font: inherit; }
html { min-width: 320px; background: var(--ivory); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 26px 18px 96px;
  background:
    radial-gradient(circle at 82% 10%, rgb(237 202 149 / 0.2), transparent 29%),
    radial-gradient(circle at 8% 40%, rgb(199 188 200 / 0.28), transparent 36%),
    linear-gradient(148deg, #fbf7f1 0%, #f4ece3 52%, #eef0f4 100%);
}

.site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  pointer-events: none;
}

.experience {
  width: min(100%, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(20px, 4svh, 38px);
}

.brand-logo {
  width: 76px;
  height: 64px;
  object-fit: cover;
  object-position: top;
  margin-bottom: 7px;
}

.brand-name {
  margin: 0;
  display: flex;
  align-items: baseline;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgb(94 83 108 / 0.82);
}

.brand-name span[lang="en"] {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-weight: 500;
}

.intro-state, .result-state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 0;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(40px, 12vw, 58px);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.24;
  color: var(--ink);
  text-indent: 0.12em;
}

.intro-copy {
  margin: 22px 0 18px;
  text-align: center;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.045em;
  color: rgb(94 83 108 / 0.78);
}

.intro-guidance {
  margin: 0 0 26px;
  text-align: center;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.055em;
  color: rgb(94 83 108 / 0.72);
}

.intro-draw-button { margin-top: 0; }

.intro-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: 0.045em;
  color: rgb(94 83 108 / 0.54);
}

.draw-button {
  min-width: 168px;
  min-height: 58px;
  padding-inline: 30px;
  border: 1px solid rgb(181 143 94 / 0.42);
  border-radius: 999px;
  background: var(--sea);
  box-shadow: 0 10px 30px rgb(97 109 136 / 0.18);
  color: #fffaf5;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.draw-button:hover { background: #56627e; box-shadow: 0 12px 32px rgb(97 109 136 / 0.26); transform: translateY(-1px); }
.draw-button:active { transform: translateY(1px) scale(0.98); }
.draw-button:focus-visible { outline: 3px solid rgb(204 145 115 / 0.44); outline-offset: 4px; }

.line-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding-inline: 12px;
  color: rgb(94 83 108 / 0.72);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.8;
  text-align: center;
  text-decoration-color: rgb(181 143 94 / 0.55);
  text-underline-offset: 5px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.line-link:hover {
  color: var(--sea);
  text-decoration-color: var(--coral);
}

.line-link:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgb(204 145 115 / 0.34);
  outline-offset: 2px;
}

.result-state { animation: reveal 420ms cubic-bezier(0.22, 0.8, 0.3, 1) both; }

.card {
  position: relative;
  width: min(100%, 520px);
  min-height: clamp(300px, 44svh, 390px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: clamp(66px, 12vw, 82px) clamp(32px, 9vw, 62px) 56px;
  margin-bottom: 34px;
  border: 1px solid rgb(97 109 136 / 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(237 202 149 / 0.14), transparent 36%),
    rgb(251 247 241 / 0.94);
  box-shadow: 0 18px 48px rgb(94 83 108 / 0.09);
}

.card::before {
  content: "";
  position: absolute;
  top: 30px;
  left: clamp(32px, 9vw, 62px);
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--sea), var(--coral), var(--cream));
  opacity: 0.72;
  pointer-events: none;
}

.card p {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: left;
  overflow-wrap: anywhere;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: clamp(23px, 5.5vw, 29px);
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.045em;
  color: #534961;
}

.card p span {
  display: block;
}

.card p span + span {
  margin-top: 0.72em;
}

.card-signature {
  position: absolute;
  right: clamp(32px, 9vw, 62px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgb(94 83 108 / 0.5);
}

.card-signature span {
  width: 24px;
  height: 1px;
  background: var(--old-gold);
  opacity: 0.6;
}

.card-signature i {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-size: 11px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.08em;
}

.mist {
  position: absolute;
  z-index: -2;
  width: 52vw;
  height: 52vw;
  min-width: 280px;
  min-height: 280px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.26;
  pointer-events: none;
}
.mist-one { top: -26vw; right: -18vw; background: var(--cream); }
.mist-two { bottom: -30vw; left: -20vw; background: var(--sea-light); }

.sea-lines {
  position: absolute;
  z-index: -1;
  bottom: 24px;
  left: 50%;
  width: min(820px, 128vw);
  height: 72px;
  transform: translateX(-50%);
  opacity: 0.34;
}
.sea-lines span { position: absolute; left: 0; width: 100%; height: 34px; border-top: 1px solid var(--sea); border-radius: 50%; }
.sea-lines span:nth-child(2) { top: 18px; left: 8%; width: 84%; border-color: var(--coral); }
.sea-lines span:nth-child(3) { top: 36px; left: 16%; width: 68%; border-color: var(--old-gold); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(9px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 380px) {
  .site-shell { padding-inline: 14px; padding-top: 22px; }
  .brand-header { margin-bottom: 28px; }
  .brand-name { font-size: 12px; letter-spacing: 0.11em; }
  .intro-copy { font-size: 15px; }
  .intro-guidance { font-size: 14px; }
  .card { min-height: 300px; padding-inline: 28px; }
  .card::before { left: 28px; }
  .card-signature { right: 28px; }
  .card p { font-size: 22px; line-height: 1.68; }
}

@media (min-width: 760px) {
  .site-shell { padding-top: 46px; }
  .brand-logo { width: 88px; height: 74px; }
}

@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;
  }
}
