:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, "Noto Sans TC", sans-serif;
  --navy: #101b32;
  --panel: #071326;
  --line: #4b7895;
  --sky: #c5e7ff;
  --gold: #ffd13b;
  --muted: #aebbd0;
  --white: #f5f7fc;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: #030712; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(16, 27, 50, .96), rgba(7, 14, 29, .98) 68%, #030712),
    url("/assets/background.jpg") center top / 100% auto no-repeat,
    #030712;
}
.hero {
  position: relative;
  height: 276px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}
.hero-meta {
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 50%;
  width: min(100% - 40px, 1024px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}
.brand {
  color: #c5e7ff;
  font-size: 13px;
  letter-spacing: .09em;
}
.brand small { margin-left: 8px; color: #aebbd0; font-size: 10px; letter-spacing: .12em; }
.language-label select {
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  border: 1px solid #4b7895;
  border-radius: 8px;
  color: #fff;
  background: #14233c;
  font: inherit;
  font-size: 12px;
}
.hero-art {
  display: block;
  width: min(520px, 57vw);
  height: 276px;
  object-fit: contain;
}
.content-wrapper { width: min(100% - 40px, 1000px); margin: 0 auto; padding: 4px 0 46px; }
h1 {
  display: flex;
  flex-direction: column;
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.04;
}
h1 span:first-child { color: var(--gold); }
h1 span:last-child { color: #bcdcff; }
.metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.metric {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #071326;
  border-radius: 5px;
  color: var(--sky);
  background: rgba(4, 13, 28, .88);
  font-size: 12px;
  font-weight: 700;
}
.metric strong { color: #fff; font-size: 12px; }
.metric.current { border-color: #f4c52c; color: #090d15; background: #ffc928; }
.metric.current strong { color: #0b0d10; }
.metric i { margin: 0 5px; color: #89acd0; font-style: normal; }
.metric small { color: #fff; font-size: 11px; font-weight: 700; }
.vip-start { margin: 0 0 8px; color: #bcdcff; font-size: 11px; }
.vip-start strong { color: #fff; }
.status-row { display: flex; min-height: 17px; align-items: center; gap: 7px; margin: 0 0 9px; }
.status-indicator { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #73e2a2; box-shadow: 0 0 8px #73e2a2; }
.status-indicator.error { background: #ff8888; box-shadow: 0 0 8px #ff8888; }
.status { margin: 0; color: #9be7bb; font-size: 11px; }
.status.error { color: #ffaaaa; }
.reward-layout {
  display: grid;
  grid-template-columns: minmax(0, 39%) minmax(0, 61%);
  gap: 8px;
  margin-bottom: 9px;
}
.member-card, .bonus-card, .upgrade-card, .progress-panel, .tiers-section {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(5, 16, 33, .84);
}
.member-card {
  min-width: 0;
  min-height: 212px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.member-card-image { display: block; width: 100%; height: auto; max-height: 205px; object-fit: contain; }
.reward-stack { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bonus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bonus-card {
  position: relative;
  min-width: 0;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 11px 13px;
  overflow: hidden;
}
.bonus-card::after {
  position: absolute;
  right: 13px;
  top: 2px;
  content: "✦";
  color: #f9d344;
  font-size: 38px;
  opacity: .22;
}
.bonus-label { color: var(--sky); font-size: 15px; }
.bonus-card strong { color: var(--gold); font-size: 20px; line-height: 1.1; }
.bonus-card small { max-width: 84%; color: #aebbd0; font-size: 10px; line-height: 1.3; }
.birthday-action {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #ffd544;
  border-radius: 6px;
  color: #171209;
  background: #ffc928;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.upgrade-card {
  position: relative;
  min-height: 98px;
  display: flex;
  align-items: center;
  padding: 12px 155px 12px 13px;
  overflow: hidden;
}
.upgrade-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.upgrade-copy small { color: #dceaff; font-size: 10px; }
.upgrade-copy strong { color: var(--gold); font-size: 21px; }
.giftbox { position: absolute; right: 0; bottom: -19px; width: 130px; max-height: 126px; object-fit: contain; }
.birthday-form {
  padding: 11px 12px;
  border: 1px solid #4b7895;
  border-radius: 9px;
  background: rgba(5, 16, 33, .94);
}
.birthday-form label { display: block; margin-bottom: 6px; color: var(--sky); font-size: 11px; font-weight: 700; }
.birthday-entry { display: flex; gap: 7px; }
.birthday-entry input {
  min-width: 0;
  flex: 1;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #4b7895;
  border-radius: 6px;
  color: #fff;
  background: #090f1c;
  font: inherit;
}
.button { min-height: 36px; padding: 7px 12px; border: 1px solid #ffd544; border-radius: 6px; color: #14100a; background: #ffc928; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.button:disabled { opacity: .65; cursor: wait; }
.progress-panel { margin-top: 0; padding: 11px 11px 14px; overflow: hidden; }
.panel-heading { min-height: 24px; display: flex; align-items: center; justify-content: space-between; margin: 0 8px 2px; }
.panel-heading h2, .tiers-section h2 { margin: 0; color: var(--gold); font-size: 16px; }
.progress-label { color: var(--sky); font-size: 11px; font-weight: 800; }
.tier-map { position: relative; overflow-x: auto; scrollbar-color: #4b7895 transparent; scrollbar-width: thin; }
.tier-rail {
  position: absolute;
  z-index: 0;
  top: 34px;
  left: 0;
  width: 100%;
  height: 4px;
  background: #4d83a3;
}
.tier-rail span { display: block; width: 0; height: 100%; background: #e0c85c; box-shadow: 0 0 8px #e0c85c88; }
.tier-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--tier-count, 6), minmax(0, 1fr));
  min-width: 730px;
  padding: 5px 0 0;
  text-align: center;
}
.tier-node { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 0 5px 4px; }
.tier-badge {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border: 4px solid #4d83a3;
  border-radius: 50%;
  background: #101b32;
}
.tier-badge img { width: 42px; height: 42px; object-fit: contain; }
.tier-node.active .tier-badge { border-color: #b9ddff; box-shadow: 0 0 0 3px #243b58, 0 0 16px #aad9ffbb; }
.tier-node.complete .tier-badge { border-color: #80d6ef; }
.tier-node strong { margin-top: 2px; color: #fff; font-size: 12px; text-transform: uppercase; }
.tier-node .required-label { margin-top: 2px; color: #bcdcff; font-size: 10px; font-style: italic; }
.tier-node .required-amount { margin-top: 1px; color: #e1efff; font-size: 10px; font-style: italic; }
.tier-node .unlock { color: #73e2a2; font-size: 10px; font-style: italic; }
.tier-card-image { display: block; width: min(100%, 134px); height: auto; margin-top: 12px; border-radius: 6px; opacity: .66; }
.tier-node.active .tier-card-image { opacity: 1; box-shadow: 0 0 11px #c5e7ff77; }
.tiers-section { margin-top: 22px; padding: 0 9px 6px; overflow: hidden; }
.tiers-section h2 { margin: 0 0 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
thead { color: var(--gold); }
th, td { padding: 11px 8px; border-bottom: 1px solid #4b7895; text-align: center; }
th { color: var(--gold); font-size: 13px; font-weight: 800; }
td { color: var(--sky); font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.current-tier-row td { color: #fff; }
.tier-name-cell { display: flex; align-items: center; gap: 8px; text-align: left; }
.tier-table-badge { width: 38px; height: 38px; object-fit: contain; flex: 0 0 38px; }
.terms-section { margin-top: 30px; }
.terms-section h2 { margin: 0 0 8px; color: var(--gold); font-size: 25px; }
.terms-section ul { margin: 0; padding-left: 20px; color: #c3d6eb; font-size: 12px; line-height: 1.7; }
.terms-section li::marker { color: var(--gold); }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: #c3d6eb; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .hero { height: 220px; }
  .hero-meta { top: 12px; width: calc(100% - 26px); }
  .hero-art { width: min(92vw, 440px); height: 220px; }
  .brand { font-size: 11px; }
  .brand small { font-size: 8px; }
  .language-label select { min-height: 30px; font-size: 10px; }
  .content-wrapper { width: calc(100% - 24px); padding-top: 0; padding-bottom: 30px; }
  h1 { margin-bottom: 11px; font-size: 25px; }
  .metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
  .metric { min-width: 0; min-height: 37px; flex-wrap: wrap; gap: 3px; padding: 5px 7px; font-size: 9px; }
  .metric strong { font-size: 10px; }
  .metric small { font-size: 9px; }
  .vip-start { font-size: 9px; }
  .reward-layout { grid-template-columns: 1fr; gap: 7px; }
  .member-card { min-height: 0; padding: 8px; }
  .member-card-image { max-height: none; }
  .bonus-grid { gap: 6px; }
  .bonus-card { min-height: 88px; padding: 9px; }
  .bonus-label { font-size: 12px; }
  .bonus-card strong { font-size: 17px; }
  .bonus-card small { font-size: 8px; }
  .birthday-action { right: 6px; bottom: 6px; min-height: 26px; padding: 4px 7px; font-size: 8px; }
  .upgrade-card { min-height: 83px; padding-right: 110px; }
  .upgrade-copy strong { font-size: 18px; }
  .giftbox { width: 105px; max-height: 102px; }
  .progress-panel { padding: 9px 7px 11px; }
  .tiers-section { margin-top: 16px; padding: 0 6px 5px; }
  th { font-size: 10px; }
  td { font-size: 11px; }
  th, td { padding: 8px 5px; }
  .tier-table-badge { width: 30px; height: 30px; flex-basis: 30px; }
  .terms-section { margin-top: 23px; }
  .terms-section h2 { font-size: 20px; }
  .terms-section ul { font-size: 10px; }
  .page-footer { flex-direction: column; align-items: center; text-align: center; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
