:root {
  --gold: #caa86a;
  --gold-light: #f4d99e;
  --dark: #070705;
  --line: rgba(202,168,106,.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: #e9e0cf;
  background: #080806;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.download-topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw 0 3vw;
  border-bottom: 1px solid rgba(202,168,106,.2);
  background: rgba(5,5,4,.94);
}
.download-brand { display: flex; align-items: center; gap: 13px; }
.download-brand img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(229,195,125,.35)); }
.download-brand b { display: block; color: var(--gold-light); font-size: 15px; letter-spacing: .16em; }
.download-brand small { display: block; margin-top: 5px; color: #8d806a; font-size: 10px; letter-spacing: .16em; }
.back-link { padding: 10px 18px; border: 1px solid var(--line); color: #c8b58f; font-size: 12px; letter-spacing: .12em; }

.download-page {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 120px 24px 50px;
}
.download-bg, .download-overlay { position: absolute; inset: 0; }
.download-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.download-overlay {
  background:
    radial-gradient(circle at 50% 45%, rgba(107,73,28,.16), transparent 34%),
    linear-gradient(90deg, rgba(3,3,2,.9), rgba(3,3,2,.56) 50%, rgba(3,3,2,.9)),
    linear-gradient(180deg, rgba(3,3,2,.72), rgba(3,3,2,.15) 42%, rgba(3,3,2,.88));
}
.download-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: 54px 70px 58px;
  text-align: center;
  border: 1px solid rgba(202,168,106,.28);
  background: radial-gradient(circle, rgba(10,9,7,.94), rgba(8,8,6,.82) 68%, rgba(5,5,4,.5));
  box-shadow: 0 30px 100px rgba(0,0,0,.64), inset 0 0 60px rgba(202,168,106,.05);
}
.download-content::before, .download-content::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-color: var(--gold);
  opacity: .65;
}
.download-content::before { left: -1px; top: -1px; border-left: 2px solid; border-top: 2px solid; }
.download-content::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.opening-badge { margin: 0; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .26em; }
h1 { margin: 18px 0; color: #eadcc1; font-size: clamp(52px, 7vw, 86px); line-height: 1.05; letter-spacing: .08em; text-shadow: 0 5px 0 #40301b, 0 16px 40px #000; }
h1 span { color: var(--gold-light); }
.opening-time { color: #a89b86; font-size: 15px; letter-spacing: .12em; }
.countdown { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 34px auto 12px; }
.countdown div { width: 135px; padding: 18px 10px 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(41,32,19,.92), rgba(8,8,6,.94)); }
.countdown strong { display: block; color: var(--gold-light); font: 800 48px/1 Arial, sans-serif; letter-spacing: .05em; text-shadow: 0 0 22px rgba(244,217,158,.22); }
.countdown span { display: block; margin-top: 9px; color: #93846c; font-size: 11px; letter-spacing: .18em; }
.countdown > i { color: var(--gold); font: normal 42px/1 Arial; }
.countdown-status { color: #8f826f; font-size: 13px; letter-spacing: .12em; }
.download-button {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 78px;
  margin: 32px auto 0;
  border: 0;
  color: #1a140b;
  background: linear-gradient(135deg, #7d5a29, #f4d99e 48%, #9d7437);
  clip-path: polygon(9% 0, 91% 0, 100% 50%, 91% 100%, 9% 100%, 0 50%);
  cursor: pointer;
  transition: transform .2s, filter .2s;
}
.download-button:hover { transform: translateY(-3px); filter: brightness(1.12); }
.download-button span { font-size: 18px; font-weight: 900; letter-spacing: .2em; }
.download-button small { margin-top: 5px; font: 8px/1 Arial; letter-spacing: .22em; }
.download-note { color: #a09582; font-size: 13px; letter-spacing: .07em; }

.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); }
.modal-card {
  position: relative;
  width: min(530px, 100%);
  padding: 45px 45px 38px;
  text-align: center;
  border: 1px solid #9a763e;
  background: radial-gradient(circle at top, #272015, #0b0a08 65%);
  box-shadow: 0 24px 90px #000, inset 0 0 55px rgba(202,168,106,.08);
}
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; color: #8f8169; font-size: 30px; cursor: pointer; }
.modal-icon { color: var(--gold-light); font-size: 25px; text-shadow: 0 0 22px rgba(244,217,158,.35); }
.modal-card > p:first-of-type { color: var(--gold); font-size: 11px; letter-spacing: .24em; }
.modal-card h2 { margin: 12px 0; color: #eadcc1; font-size: 31px; letter-spacing: .08em; }
.modal-ornament { display: flex; align-items: center; gap: 9px; width: 220px; margin: 18px auto; color: var(--gold); }
.modal-ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.modal-ornament i:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.modal-copy { margin: 8px 0; color: #b3a692; font-size: 15px; line-height: 1.8; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.modal-actions a, .modal-actions button { display: grid; place-items: center; min-height: 48px; padding: 9px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.modal-line { color: #171109; font-weight: 800; background: linear-gradient(135deg, #8a6531, #e8ca87, #9a7138); }
.modal-actions button { color: #b8aa92; background: #0b0a08; }
.account-form { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.account-form label { color: #cdb98f; font-size: 13px; letter-spacing: .08em; }
.account-form input {
  width: 100%;
  height: 50px;
  margin-bottom: 5px;
  padding: 0 15px;
  border: 1px solid rgba(202,168,106,.42);
  outline: none;
  color: #f0e3ca;
  background: rgba(4,4,3,.72);
  font-size: 15px;
}
.account-form input:focus { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(202,168,106,.1); }
.account-form input::placeholder { color: #625a4d; }
.verify-button {
  min-height: 52px;
  margin-top: 8px;
  border: 1px solid #b18a4d;
  color: #171109;
  background: linear-gradient(135deg, #8a6531, #e8ca87, #9a7138);
  font-weight: 800;
  letter-spacing: .12em;
  cursor: pointer;
}
.form-error { min-height: 18px; margin: 0; color: #d59b7e; font-size: 12px; text-align: center; }
.verify-result { margin-top: 15px; }
.result-alert {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  border: 1px solid #b18a4d;
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 28px;
  background: rgba(202,168,106,.08);
}
.verify-result h3 { margin: 8px 0; color: #eadcc1; font-size: 23px; letter-spacing: .08em; }
.verify-result > p:not(.result-alert) { color: #b3a692; font-size: 15px; line-height: 1.8; }
.account-form[hidden], .verify-result[hidden] { display: none; }

@media (max-width: 680px) {
  .download-topbar { height: 64px; padding: 0 12px; }
  .download-brand { gap: 7px; }
  .download-brand img { width: 48px; height: 48px; }
  .download-brand b { font-size: 10px; letter-spacing: .08em; }
  .download-brand small { display: none; }
  .back-link { padding: 8px 10px; font-size: 9px; }
  .download-page { padding: 86px 14px 28px; align-items: center; }
  .download-content { padding: 38px 16px 42px; }
  .opening-badge { font-size: 10px; letter-spacing: .14em; }
  h1 { margin: 14px 0; font-size: clamp(42px, 13vw, 58px); }
  .opening-time { font-size: 12px; line-height: 1.6; letter-spacing: .05em; }
  .countdown { gap: 6px; margin-top: 25px; }
  .countdown div { width: 29%; padding: 14px 5px 11px; }
  .countdown strong { font-size: clamp(30px, 10vw, 42px); }
  .countdown > i { font-size: 28px; }
  .download-button { width: min(285px, 88vw); height: 70px; margin-top: 25px; }
  .download-note { font-size: 11px; line-height: 1.65; }
  .modal-card { padding: 39px 22px 25px; }
  .modal-card h2 { font-size: 25px; }
  .modal-copy { font-size: 14px; }
  .modal-actions { grid-template-columns: 1fr; }
}
