@font-face{font-family:NotoTC;src:url('./noto-sans-tc.woff2')}*{box-sizing:border-box}body{margin:0;background:#111217;color:#f4eee3;font-family:-apple-system,BlinkMacSystemFont,'PingFang TC',NotoTC,sans-serif}button,a{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid #ffe5a0;outline-offset:3px}.page{max-width:430px;margin:auto;min-height:100vh;background:#1b1d22}header{position:sticky;top:0;z-index:2;height:calc(48px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;text-align:center;background:#1f2228df;backdrop-filter:blur(24px)}header strong{font-size:17px}header a{font-size:36px;line-height:44px;color:#dfbd77;text-decoration:none}main{padding:0 12px 28px}.hero{height:190px;position:relative;overflow:hidden;border-radius:14px;background:radial-gradient(circle at 80% 25%,#a64f3a 0,transparent 34%),linear-gradient(120deg,#321f24,#54272a 55%,#241920);border:1px solid #815342}.hero-copy{position:relative;z-index:1;padding:18px 16px}.tag{font-size:12px;color:#f1cf9b;letter-spacing:.08em}.hero h1{font-size:30px;line-height:1.25;margin:10px 0;color:#fff6e9;letter-spacing:.04em}.hero h1 em{font-style:normal;color:#f7ce7b;font-size:26px}.hero p{font-size:12px;color:#f0ddc6}.hero-art{position:absolute;right:20px;bottom:12px;width:125px;height:134px;transform:rotate(10deg)}.gift{position:absolute;bottom:4px;right:4px;width:100px;height:106px;border-radius:9px;background:linear-gradient(140deg,#f7dfa8,#b87938 58%,#f1cb79);box-shadow:0 12px 22px #160b0a88,inset 0 0 0 5px #fbe7b655;display:grid;place-items:center;color:#fff3cf;font-size:39px}.ribbon{position:absolute;z-index:1;height:7px;background:#833731;width:105px;bottom:50px;right:2px}.hero-art i,.hero-art b{position:absolute;color:#fce3a7;font-size:24px;top:0}.hero-art b{right:-4px;top:12px}.disclaimer{font-size:11px;line-height:1.5;color:#b8a999;margin:10px 2px 14px}.panel{background:#25272d;border:1px solid #3a3a3d;border-radius:16px;padding:12px;margin-bottom:12px}.heading{display:flex;justify-content:space-between;align-items:start;gap:12px}h2{font-size:20px;margin:0;color:#f3d79e}.heading p,.sub{font-size:12px;color:#b4b2b0;margin:5px 0 14px}.text-btn{background:none;border:0;color:#ddc18d;font-size:13px;min-height:40px;padding:0 4px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.card{aspect-ratio:1/1;border-radius:10px;border:1px solid #b89558;background:linear-gradient(145deg,#734338,#3c2528);box-shadow:inset 0 0 0 4px #3c2528,inset 0 0 0 5px #bc945a;display:grid;place-items:center;color:#e9ca8b;font-size:30px}.card.revealed{background:linear-gradient(140deg,#f7e1af,#bf8846);color:#593c22;font-size:14px;text-align:center;font-weight:700;padding:10px}.remaining{text-align:center;color:#ccc3b6;font-size:14px;margin:14px 0}.remaining strong{font-size:27px;color:#f4d792;margin:0 4px}.draw,.ok{border:0;border-radius:10px;background:linear-gradient(110deg,#e5bd79,#fff0c4 45%,#d9aa60);color:#412d17;font-weight:800}.draw{width:100%;height:58px;display:flex;align-items:center;justify-content:space-around;font-size:20px;box-shadow:0 3px #94703e}.draw:disabled{opacity:.5}.hint{text-align:center;color:#aaa49b;font-size:12px;margin:12px 0 0}.prize,.task{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #ffffff12}.prize-icon,.task>span{color:#e3bd78;font-size:24px;width:32px;text-align:center}.prize div,.task div{flex:1}.prize strong,.task strong{font-size:15px}.prize p,.task p{margin:5px 0 0;font-size:12px;color:#b6b4b1}.prize b{color:#daba7c;font-size:11px;border:1px solid #806845;border-radius:5px;padding:3px 6px}.task small{font-size:12px;color:#eccb88}.task button{height:40px;padding:0 22px;border:0;border-radius:10px;background:linear-gradient(110deg,#f2d69a,#d2a256);color:#39260d;font-weight:600}.task button:disabled{background:#3b3b3b;color:#999}.history .heading p{margin-bottom:0}.footer{text-align:center;color:#a59075;font-size:12px;padding:12px}dialog{width:min(calc(100% - 32px),398px);border:1px solid #826b49;border-radius:16px;background:#292b31;color:#eee5d6;padding:16px}dialog::backdrop{background:#000b}dialog h2{padding-right:32px}dialog p,dialog li{font-size:14px;line-height:1.7;color:#d6cbb9}dialog ul{padding-left:20px}.close{float:right;border:0;background:none;color:#ccc;font-size:28px;line-height:1}.ok{height:44px;padding:0 24px;margin-top:8px}@media(max-width:350px){.hero-art{right:0;opacity:.72}.hero h1{font-size:26px}.hero h1 em{font-size:22px}}

/* 週年慶淺色介面 */
body{background:#e9e3df;color:#403633}.page{background:#f7f3ef;box-shadow:0 0 40px #705c4e12}header{background:#faf7f2e8;color:#493c36}header a{color:#a97942}.panel{background:#fffdf9;border-color:#ece3d8;box-shadow:0 4px 18px #74502a0a}h2{color:#594238}.heading p,.sub,.prize p,.task p{color:#776b65}.disclaimer{color:#776b65}.text-btn{color:#91653c}.remaining{color:#70615a}.remaining strong{color:#a86e32}.hint{color:#80726a}.prize,.task{border-color:#eee6de}.prize-icon,.task>span{color:#b68349}.prize b{color:#996c39;border-color:#d6bd9a}.footer{color:#9a8370}dialog{background:#fffdf9;border-color:#dec8aa;color:#493c36;box-shadow:0 12px 40px #3a261b33}dialog p,dialog li{color:#70615a}.close{color:#76675e}.task button:disabled{background:#eee9e3;color:#857a72}
.card:not(.revealed){position:relative;isolation:isolate;overflow:hidden;color:#f7dfac;font-size:26px;text-shadow:0 1px 2px #2b1015,0 0 15px #e8b35f88;border:1px solid #b88950;background:repeating-linear-gradient(45deg,transparent 0 9px,#e1b76b0a 10px 11px),radial-gradient(circle at 50% 42%,#a45d4a 0%,#713c38 42%,#41242b 100%);box-shadow:inset 0 1px #ffefc08a,inset 0 0 0 3px #592f31,inset 0 0 0 4px #e9c17d99,inset 0 -8px 14px #260f1777,0 3px 7px #6c4a3528}
.card:not(.revealed)::before{content:'';position:absolute;z-index:-1;width:43%;height:43%;border:1px solid #eac582ab;transform:rotate(45deg);box-shadow:0 0 0 3px #6e3936,0 0 0 4px #d9b06c77;background:radial-gradient(circle,#b9785c,#6f3835)}
.card:not(.revealed)::after{content:'';position:absolute;inset:8px;border:1px solid #f5d8a05c;border-radius:5px;background:linear-gradient(135deg,#fff4d120,transparent 32%,transparent 70%,#f8d99c10);pointer-events:none}
.card.revealed{box-shadow:inset 0 0 0 4px #f6dfac,inset 0 0 0 5px #bd8e50,0 3px 7px #6c4a3528}button:focus-visible,a:focus-visible{outline-color:#9a6328}
header{height:calc(56px + env(safe-area-inset-top))}header a{width:44px;height:44px;display:grid;place-items:center}header a svg{width:24px;height:24px;display:block}#rules{font-size:15px;font-weight:600}.card{width:100%;padding:0;font-family:inherit;cursor:pointer}.card:disabled{cursor:default}.card:focus-visible{outline:3px solid #9a6328;outline-offset:2px;z-index:1}.card.revealed{cursor:default}@media(prefers-reduced-motion:no-preference){.card.revealed{animation:card-flip .4s ease both}@keyframes card-flip{0%{transform:rotateY(90deg)}100%{transform:rotateY(0)}}}

/* 文字層級：最低 14px，並隨瀏覽器預設字級縮放 */
body{font-size:1rem;line-height:1.5}.tag,.hero p,.disclaimer,.heading p,.sub,.prize p,.task p,.hint,.footer,.prize b,.task small{font-size:.875rem;line-height:1.5}.disclaimer{color:#665951}.heading p,.sub,.prize p,.task p,.hint{color:#6d605a}.hero p{color:#fff0df}.prize strong,.task strong,#rules,.text-btn{font-size:1rem}.remaining{font-size:1rem}.remaining strong{font-size:1.75rem}.task button{font-size:1rem}.card.revealed{font-size:.875rem;line-height:1.35;overflow-wrap:anywhere}dialog p,dialog li{font-size:1rem;line-height:1.6}.hero{min-height:190px;height:auto}.hero-copy{min-height:190px}.task div,.prize div{min-width:0}.task button{flex-shrink:0}.prize b{white-space:nowrap}
header{grid-template-columns:80px minmax(0,1fr) 80px}header a{justify-self:start}.header-history{justify-self:end;border:0;background:transparent;color:#90623b;font-size:.875rem;font-weight:600;min-height:44px;padding:0 2px;white-space:nowrap}.hero{margin-bottom:12px}.draw{position:relative;overflow:hidden;isolation:isolate;justify-content:center;letter-spacing:.12em;border:2px solid #d5a65d;background:linear-gradient(160deg,#fff3c8 0%,#edc676 34%,#c89042 65%,#f5d897 100%);box-shadow:inset 0 2px #fff9df,inset 0 -2px #ae773a,0 3px #a87335,0 6px 15px #9d68342b;text-shadow:0 1px #fff1ca}.draw::after{content:'';position:absolute;inset:4px;border:1px solid #fff3c583;border-radius:6px;pointer-events:none}.draw::before{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 38%,#fff9d994 50%,transparent 62%);transform:translateX(-120%);animation:anniversary-shine 5s ease-in-out infinite;pointer-events:none;z-index:-1}@keyframes anniversary-shine{0%,65%{transform:translateX(-120%)}90%,100%{transform:translateX(120%)}}@media(prefers-reduced-motion:reduce){.draw::before{animation:none}}.card:not(.revealed){background:repeating-linear-gradient(45deg,transparent 0 9px,#ffd08a0b 10px 11px),radial-gradient(circle at 50% 42%,#c6524b 0%,#963338 45%,#5b1827 100%);box-shadow:inset 0 1px #ffefc08a,inset 0 0 0 3px #6b222c,inset 0 0 0 4px #e9c17d99,inset 0 -8px 14px #260f1777,0 3px 7px #6c4a3528}.card:not(.revealed)::before{background:radial-gradient(circle,#d46a5a,#922e36);box-shadow:0 0 0 3px #7c2931,0 0 0 4px #d9b06c77}dialog{max-height:calc(100dvh - 32px);overflow:auto}dialog h3{font-size:1rem;color:#594238;margin:18px 0 6px}dialog ul{margin:4px 0}

#rules{flex-shrink:0;white-space:nowrap}
/* 卡背維持柔和光澤，不使用斜線紋理。 */
.card:not(.revealed){background:radial-gradient(circle at 50% 42%,#c6524b 0%,#963338 45%,#5b1827 100%)}
.history .heading{align-items:center}
.hero{background:linear-gradient(90deg,#29090d80 0%,#29090d48 46%,transparent 75%),url('./anniversary-hero.png') center/cover no-repeat}.hero-art{display:none}.hero-copy{max-width:70%;text-shadow:0 1px 4px #26080c}

/* 抽卡結果依獎項切換視覺，沿用原生對話框操作。 */
dialog[data-tier]{--accent:#825637;--tint:#f4e3cd;--art:#68402c;text-align:center;padding:16px;border-color:var(--accent)}
dialog[data-tier="grand"]{--accent:#e6b568;--tint:#f5d389;--art:#702329;background:radial-gradient(ellipse at top,#7e2833,#3b141e 72%);color:#fff3dd}
dialog[data-tier="voucher"]{--accent:#9c6436;--tint:#f9df9f;--art:#75421c;background:#fff8e8}
dialog[data-tier="bonus"]{--accent:#376c5b;--tint:#cce5d4;--art:#295849;background:#f3faf4}
dialog[data-tier="miss"]{--accent:#875f51;--tint:#f2e1d8;--art:#785549;background:#fffbf7}
dialog[data-tier] .close{float:none;position:absolute;top:8px;right:8px;width:44px;height:44px;color:inherit}
dialog[data-tier] h2{padding:0;color:inherit}
.result-art{display:grid;place-items:center;width:76px;height:76px;margin:12px auto 16px;border:3px double var(--accent);border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff9e5,var(--tint));color:var(--art);font-size:2rem;box-shadow:0 6px 20px #3c1f1726}
[data-tier="grand"] .result-art{box-shadow:0 0 34px #f0b76075}
[data-tier="voucher"] .result-art{border-radius:14px;width:94px}
.result-reward{display:block;color:var(--accent);font-size:1.5rem;margin-top:8px}
dialog[data-tier="grand"] p{color:#f9e5ce}
dialog[data-tier] .ok{width:100%}
@media(prefers-reduced-motion:no-preference){dialog[data-tier][open]{animation:result-enter .24s ease-out}@keyframes result-enter{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}}
dialog[data-tier] .result-art{display:block;width:128px;height:128px;object-fit:contain;margin:0 auto 8px;border:0;border-radius:0;background:none;box-shadow:none}

dialog[data-tier="grand"]{--accent:#85521b;background:#fff;color:#422a23;border-color:#d8aa62;box-shadow:0 0 28px #ffc87080,0 0 56px #ffbe5533}
@media(prefers-reduced-motion:no-preference){
  dialog[data-tier="grand"][open]{animation:result-enter .24s ease-out,grand-halo 2.8s ease-in-out infinite}
  @keyframes grand-halo{50%{box-shadow:0 0 34px 5px #ffd487b0,0 0 68px 12px #ffbc5155}}
}
.task small{color:#853d38}
#reward-title{font-size:1.25rem;color:#594238;margin:0}
.header-back{display:grid;place-items:center;justify-self:start;width:44px;height:44px;padding:0;border:0;background:none;color:#a97942;cursor:default}
.header-back svg{display:block;width:24px;height:24px}


@media (prefers-reduced-motion: no-preference) {
  .card-sparkle { position:absolute; inset:0; z-index:1; pointer-events:none; }
  .card-sparkle > span {
    position:absolute; translate:-50% -50%; line-height:1;
    color:#fff7d1; font-size:1.55rem; text-shadow:0 0 12px #ffc450;
    animation:card-twinkle var(--sparkle-duration) ease-out both;
  }
  .card-sparkle > span:nth-child(2){font-size:1.05rem}
  .card-sparkle > span:nth-child(3){font-size:.8rem}
  .card.card-glowing { animation:card-center-glow 2.18s ease-in-out; }
  .card.card-glowing::after {
    border:1px solid transparent;
    background:linear-gradient(125deg,transparent,#ffe8a9,#d58834,transparent) border-box;
    mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);
    mask-composite:exclude;
    animation:card-twinkle 2.18s ease-out both;
  }
  @keyframes card-twinkle {
    0%,100%{opacity:0}
    16%,40%{opacity:1}
  }
  @keyframes card-center-glow {
    35%,55%{color:#fffbe2;text-shadow:0 0 5px #fff4bb,0 0 16px #ffbe51,0 0 26px #ff9f32}
  }
}

.header-back:not(:disabled){cursor:pointer}

#dialog-body input[readonly]{width:100%;height:48px;border:1px solid #dec8aa;border-radius:10px;padding:0 10px;font:inherit;color:inherit;background:#fff}
.share-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.share-actions a,.share-actions button{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border:1px solid #dec8aa;border-radius:10px;background:#fff7e8;color:#744620;font:inherit;text-decoration:none}
.share-actions [aria-disabled=true]{color:#776b65;background:#eee9e3}
#dialog:has(.share-link-row) .ok{width:100%}
.share-link-row{display:flex;gap:8px}
.share-link-row input{min-width:0;flex:1}
.share-link-row button{flex:none;padding:0 10px;border:1px solid #dec8aa;border-radius:10px;background:#fff7e8;color:#744620}
.share-actions .share-social{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;color:white;font:bold 24px system-ui}
.share-actions .share-ig{background:radial-gradient(circle at 25% 100%,#ffce59,#d52777 55%,#6544bf)}
.share-ig::before{content:'';width:20px;height:20px;border:2px solid white;border-radius:6px;background:radial-gradient(circle at 77% 23%,white 1px,transparent 1.5px)}
.share-ig::after{content:'';position:absolute;width:7px;height:7px;border:2px solid white;border-radius:50%}
.share-actions .share-fb{background:#0866ff}
.share-actions .share-threads{background:#161616}

/* 一般文字按鈕使用咖啡金邊框。 */
.ok, .task button, .text-btn, .header-history, .share-link-row button {
  border: 1px solid #a8753b;
}
.text-btn, .header-history { border-radius: 10px; padding-inline: 6px; }
.text-btn, .header-history, .share-link-row button { background: #fff7e8; }
.task button:disabled { border-color: #c0b4aa; }

.share-actions{justify-content:center;align-items:center}

#history{width:max-content;flex:0 0 auto;white-space:nowrap;font-size:.875rem;padding-inline:10px}

.draw:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: inset 0 1px #fff5ce, inset 0 -1px #ae773a, 0 1px #a87335;
}
@media (prefers-reduced-motion: no-preference) {
  .draw { transition: transform 110ms ease-out, box-shadow 110ms ease-out; }
}

dialog[data-tier="miss"]{
  background:#fff;
  border-color:#d8aa62;
  color:#422a23;
  box-shadow:0 0 24px #ffc87040,0 12px 36px #3a261b33;
}
dialog[data-tier="miss"] .result-art{
  filter:drop-shadow(0 7px 10px #b67a3b36);
}
@media (prefers-reduced-motion:no-preference){
  dialog[data-tier="miss"][open] .result-art{
    animation:thank-you-rise .65s cubic-bezier(.2,.7,.3,1) .08s both;
  }
  @keyframes thank-you-rise{
    from{opacity:0;transform:translateY(9px)}
    to{opacity:1;transform:translateY(0)}
  }
}

#reward-page .panel{padding:0;overflow:hidden}
#reward-title{padding:18px 16px;color:#ffe2a4;background:linear-gradient(105deg,#471823,#782931);border-bottom:1px solid #bd8b4e}
#reward-record{padding:12px}
.reward-list{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.reward-list li{display:flex;align-items:center;gap:12px;min-height:76px;padding:8px 12px;border:1px solid #e5d5c4;border-radius:12px;background:#fffbf4;color:#57352e}
.reward-list li[data-tier="grand"]{background:#fff4df;border-color:#d6a961}
.reward-list img{width:52px;height:52px;object-fit:contain;flex:none}
#reward-record p{font-size:.875rem;color:#6d605a;margin:12px 0 0}
#reward-record p:only-child{padding:18px 4px;margin:0;text-align:center}

.rules-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0;padding:8px;border:1px solid #e3cba8;border-radius:12px;background:#fff5e3;text-align:center}
.rules-summary div+div{border-inline-start:1px solid #e3cba8}
.rules-summary dt{font-size:.875rem;color:#705345}
.rules-summary dd{margin:4px 0 0;font-weight:750;color:#78343a;overflow-wrap:anywhere}
#dialog .rules-steps{list-style:none;margin:0;padding:0}
.rules-steps li{position:relative;padding:10px 0 10px 24px;border-bottom:1px solid #ede4d8}
.rules-steps li::before{content:'✦';position:absolute;left:2px;color:#966026}
.rules-steps strong{color:#633235}
.rules-steps p{margin:2px 0 0}
#dialog .rules-note{font-size:.875rem;margin:12px 0 0}
#dialog:has(.rules-summary) .ok{width:100%}

#rules{border:0;background:transparent}
#reward-title{background:#faf2e7;color:#65463b;border-bottom-color:#eadac6}

.page > main > .hero:first-child{margin-block-start:16px}
.voucher-use{margin-inline-start:auto;flex:none;min-height:44px;padding:0 9px;border:1px solid #a8753b;border-radius:10px;background:#fff0cf;color:#643b23;font-size:.875rem;font-weight:700}
#dialog:has(.voucher-qr){text-align:center;background:#fffaf1;border-color:#b78448}
#dialog:has(.voucher-qr) h2{color:#742e39}
.voucher-qr{display:block;width:min(200px,100%);margin:16px auto;border:1px solid #d8aa62;border-radius:12px}
#dialog:has(.voucher-qr) .ok{width:100%}
dialog[data-tier="checkin"]{background:#fffaf1;border-color:#b78448;color:#633235}
.checkin-mark{display:block;width:112px;height:112px;object-fit:contain;margin:10px auto 0}
dialog[data-tier="checkin"] #dialog-body p{font-weight:700;color:#754619}
