:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #647789;
  background: #f7f7f7;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f7f7f7;
}

body.login-page { min-height: 100vh; background: #f4f4f4; }

button, input { font: inherit; }

.page-shell {
  width: 100%;
  padding: 45px 8px 12px;
  background: #f7f7f7;
}

.service-nav {
  display: grid;
  grid-template-columns: repeat(8, minmax(78px, 1fr));
  max-width: 920px;
  margin: 0 auto;
}

.service-button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  border: 0;
  border-radius: 12px;
  color: #647789;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease, background-color .18s ease;
}

.service-button:hover,
.service-button:focus-visible {
  color: #24a8df;
  background: #fff;
  outline: none;
  transform: translateY(-3px);
}

.service-button:focus-visible { box-shadow: 0 0 0 3px rgb(36 168 223 / 25%); }

.icon-wrap {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
}

.icon-wrap svg {
  width: 54px;
  height: 54px;
  overflow: visible;
  fill: #fff;
  stroke: #647684;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.icon-wrap svg text { fill: #fff; stroke: none; font-size: 10px; font-weight: 800; text-anchor: middle; }
.icon-wrap .fill-blue { fill: #50bce8; }
.icon-wrap .logo-text { fill: #49b7df; font-size: 12px; }
.icon-wrap .logo-p { fill: #f04c88; font-size: 12px; }

.event-icon strong {
  color: #f5b400;
  font-family: Georgia, serif;
  font-size: 48px;
  line-height: 1;
  text-shadow: 1px 1px 0 #b96800;
}

.event-icon strong::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 13px;
  margin: -1px 0 0 4px;
  background: #f23f7c;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 13px; }
.pager i { width: 10px; height: 10px; border-radius: 50%; background: #e1e5e8; }
.pager i:first-child { background: #58bceb; }

.account-dialog {
  width: min(94vw, 884px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #333;
  background: #f4f4f4;
  box-shadow: 0 24px 70px rgb(24 49 66 / 28%);
}

.account-dialog::backdrop { background: rgb(28 47 60 / 55%); backdrop-filter: blur(3px); }
.account-dialog[open] { animation: dialog-in .2s ease-out; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.login-stage { min-height: 630px; padding: 48px 68px 54px; }
.brand-logo { display: block; margin: 0 auto 56px; max-width: 200px; height: auto; }
.login-alert { display: flex; min-height: 48px; align-items: center; gap: 12px; margin-bottom: 30px; padding: 8px 18px; border: 1px solid #f4c13e; border-radius: 5px; color: #ed5c2d; background: #fff0c5; font-size: 13px; }
.login-alert p { flex: 1; margin: 0; }
.bulb { font-size: 20px; }
.close-button { width: 28px; height: 28px; padding: 0; border: 0; color: #e5785c; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; }
.login-columns { display: grid; grid-template-columns: 1.58fr 1fr; gap: 17px; align-items: stretch; }
.login-card { min-width: 0; padding: 28px 30px; border-radius: 10px; background: #fff; box-shadow: 0 15px 38px rgb(35 46 54 / 10%); }
.card-title-row { display: flex; align-items: center; justify-content: center; gap: 7px; }
.card-title-row h1, .card-title-row h2 { margin: 0; color: #292929; font-size: 18px; }
.help-dot { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #c7c9cb; font-size: 12px; font-weight: 800; }
.service-context { margin: 10px 0 5px; color: #ed563d; text-align: right; font-size: 13px; }
label { display: block; margin: 9px 0 5px; color: #555; font-size: 13px; font-weight: 700; }
.input-shell { position: relative; display: flex; height: 45px; align-items: center; border: 1px solid #dfdfdf; background: #fff; }
.input-shell > span { width: 46px; color: #111; text-align: center; font-size: 17px; }
.field-icon-box { display: grid; flex: 0 0 46px; height: 100%; place-items: center; }
.field-icon { display: block; width: 21px; height: 21px; }
.user-icon { fill: #050505; }
.lock-icon { fill: none; stroke: #8c8c8c; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.15; }
input { min-width: 0; width: 100%; height: 43px; padding: 0 12px 0 4px; border: 0; color: #333; background: transparent; outline: none; }
.input-shell:focus-within { border-color: #42a9df; box-shadow: 0 0 0 2px rgb(66 169 223 / 12%); }
input.invalid { border-color: #df5367; }
.input-shell:has(input.invalid) { border-color: #df5367; }
.password-field input { padding-right: 56px; }
.toggle-password { position: absolute; top: 5px; right: 5px; height: 36px; padding: 0 9px; border: 0; color: #348bad; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.field-error { min-height: 14px; margin: 2px 0 0; color: #d63b55; font-size: 11px; }
.privacy-note { margin: 7px 0 10px; color: #788791; font-size: 11px; text-align: center; }
.form-error { margin: 8px 0 4px; padding: 9px 12px; border: 1px solid #f2c3cb; border-radius: 6px; color: #c33b52; background: #fdf1f3; font-size: 12px; font-weight: 700; line-height: 1.5; }
.submit-button, .register-button { width: 100%; height: 45px; border: 0; color: #fff; font-size: 16px; cursor: pointer; transition: filter .18s ease, transform .18s ease; }
.submit-button { margin-bottom: 9px; background: linear-gradient(#cacaca, #aaa); }
.submit-button[disabled] { color: #8a8a8a; background: #e3e3e3; cursor: not-allowed; }
.register-button { background: #42a8e2; }
.submit-button:hover, .register-button:hover { filter: brightness(.94); }
.submit-button:active { transform: scale(.99); }
.daily-gift { margin: 14px 0 0; color: #ef4e33; text-align: center; font-size: 13px; }
.scan-card { display: flex; flex-direction: column; align-items: center; }
.scan-card > p { margin: 14px 0; font-size: 14px; }
.qr-code { width: 138px; height: 138px; padding: 12px; border: 1px solid #e0e0e0; border-radius: 10px; background-color: #fff; background-image: repeating-conic-gradient(#111 0 25%, transparent 0 50%); background-position: 0 0; background-size: 8px 8px; box-shadow: inset 0 0 0 10px #fff; }
.qr-code::after { content: ""; display: block; width: 30px; height: 30px; margin: 40px; border: 7px solid #111; background: #fff; box-shadow: -38px -38px 0 -6px #fff, -38px -38px 0 0 #111, 38px -38px 0 -6px #fff, 38px -38px 0 0 #111; }
.mascots { display: flex; width: 100%; justify-content: space-around; margin: 8px 0 -13px; color: #fff; font-size: 53px; line-height: 1; filter: drop-shadow(0 5px 0 #3caee7); }
.store-badges { position: relative; z-index: 1; display: flex; gap: 9px; }
.store-badges span { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: 11px 17px; width: 110px; height: 35px; padding: 3px 5px; border-radius: 4px; color: #fff; background: #050505; font-size: 13px; line-height: 1; }
.store-badges b { grid-row: 1 / 3; align-self: center; font-size: 18px; }
.store-badges small { font-size: 7px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 20; padding: 12px 20px; border-radius: 999px; color: #fff; background: #32495a; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.standalone-login { min-height: 100vh; background: #f4f4f4; }
.standalone-login .login-stage { width: min(100%, 884px); min-height: 100vh; margin: 0 auto; }
.standalone-card { width: min(100%, 500px); margin: 0 auto; }

@media (max-width: 760px) {
  .page-shell { padding-top: 24px; overflow-x: auto; }
  .service-nav { width: 760px; }
  .service-button { font-size: 15px; }
  .login-stage { padding: 30px 18px; }
  .brand-logo { margin-bottom: 30px; }
  .login-columns { grid-template-columns: 1fr; }
  .login-card { padding: 24px 20px; }
  .scan-card { display: none; }
}
