@charset "utf-8";
@import url("normalize.css");

/* ==========================================================================
   MEMBER LUCKY 8 DRAW — 幸运逢 8
   Theme carried over from the M88 CN landing pages: midnight navy ground,
   sandstone gold accents, Lato + system CJK.
   ========================================================================== */

/* -------------------------------------------------------------- fonts */

@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/Lato-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

/* -------------------------------------------------------------- tokens */

:root {
  --midnight: #192436;
  --midnight-2: #141d2c;
  --dark: #1a202c;
  --dark-2: #222939;
  --dark-3: #2d3443;
  --charcoal: #383e4d;
  --gunmetal: #4e5461;
  --steel: #7a7f88;
  --cool-grey: #90949c;
  --silver: #d3d4d7;
  --white: #fff;

  --gold: #caab72;
  --gold-light: #f7e7bb;
  --gold-mid: #e0be7c;
  --gold-deep: #b8883c;
  --gold-rgb: 202, 171, 114;

  --red: #b8323c;

  --radius: 12px;
  --radius-lg: 20px;
  --shell: 1360px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 320px;
  padding: 0;
  margin: 0;
}

body {
  background: var(--midnight);
  color: var(--white);
  font-family: "Lato", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
b, strong { font-weight: 700; }

.link, .copy a {
  color: var(--gold);
  text-decoration: underline;
}
.link:hover { color: var(--gold-light); }

.inner {
  max-width: var(--shell);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  padding: 14px 24px;
  border-radius: 24px;
  border: 1px solid transparent;
  outline: none;
  text-align: center;
  transition: all .2s var(--ease);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-mid) 45%, var(--gold-deep));
  border-color: var(--gold-mid);
  color: #24190a;
  box-shadow: 0 6px 18px rgba(var(--gold-rgb), .25);
}
.btn--gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(var(--gold-rgb), .4);
}

.btn--hollow {
  color: var(--white);
  border-color: rgba(255, 255, 255, .55);
  background: transparent;
}
.btn--hollow:hover { background: rgba(255, 255, 255, .1); }

.btn--lg { padding: 16px 48px; font-size: 16px; }

.btn:disabled,
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

/* Only ever visible while the admin panel is faking the clock. */
.testbar {
  position: relative;
  z-index: 6;
  padding: 9px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: repeating-linear-gradient(135deg, var(--red) 0 14px, #9c2932 14px 28px);
}
.testbar a { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------- header */

.header {
  padding: 20px 0;
  position: relative;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(20, 29, 44, 1) 0%, rgba(20, 29, 44, 0) 100%);
}
.header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header__logo img { height: 42px; width: auto; display: block; }
.header__logo .mobi-header { display: none; }

/* ------------------------------------------------------------ section head */

.section__head {
  text-align: center;
  margin-bottom: 32px;
}
.section__head h2 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .04em;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-mid) 60%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section__head h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section__head p {
  margin-top: 12px;
  color: var(--silver);
  font-size: 14px;
  line-height: 1.8;
}
.section__note {
  font-size: 13px;
  color: var(--gold);
}

/* ----------------------------------------------------------------- banner */

/* Key art behind the header and the hero. It sits under the page content
   (z-index -1) and fades out at the bottom into the page colour.
   Desktop art is 1920 x 1020, kept at 1920 wide and only scaled up on wider
   screens; the podium's top edge is about 450px down. */
.banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: -1;
  height: max(1020px, calc(100vw * 1020 / 1920));
  background: url("../images/banner-desktop.webp") center top / max(1920px, 100%) auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
  pointer-events: none;
}

/* ------------------------------------------------------------------- hero */

.hero { position: relative; }
/* Starts the title just under the podium: 450px into the art, less the 82px header. */
.hero .inner {
  text-align: center;
  padding: max(368px, calc(100vw * 450 / 1920 - 82px)) 24px 48px;
}

.hero__title {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .02em;
}
/* Each line carries its own gradient, so both lines get the full white-to-gold sweep. */
.hero__line {
  display: block;
  background: linear-gradient(180deg, #fff 0%, var(--gold-light) 40%, var(--gold-mid) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 30px rgba(var(--gold-rgb), .25);
}
.hero__eight {
  font-size: 1.26em;
  line-height: 1;
}

.hero__sub {
  margin: 18px auto 0;
  max-width: 760px;
  font-size: 17px;
  color: var(--silver);
}
.hero__sub strong { color: var(--gold-light); }

.hero__window {
  margin-top: 10px;
  font-size: 13px;
  color: var(--cool-grey);
}

.hero__cta { margin-top: 32px; }

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 600px;
  margin: 36px auto 0;
}
.stats__card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(var(--gold-rgb), .22);
  border-radius: var(--radius);
  padding: 18px 14px;
}
.stats__card--accent {
  border-color: rgba(var(--gold-rgb), .55);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .16), rgba(var(--gold-rgb), .04));
}
.stats__label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--cool-grey);
}
.stats__value {
  display: block;
  margin: 6px 0 4px;
  font-size: 28px;
  font-weight: 900;
  color: var(--gold-light);
}
.stats__value--count {
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.stats__foot {
  display: block;
  font-size: 12px;
  color: var(--steel);
}

/* ----------------------------------------------------------------- ticker */

/* Pinned to the bottom of the viewport on every screen. */
.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  background: rgba(16, 23, 35, .94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(var(--gold-rgb), .35);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.ticker__tag {
  flex: none;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #24190a;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
}
.ticker__viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;
  padding-left: 24px;
  will-change: transform;
  animation: ticker-scroll 42s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { font-size: 13px; color: var(--silver); }
.ticker__item b { color: var(--white); }
.ticker__item em { color: var(--gold-light); font-style: normal; font-weight: 700; }
.ticker__item--idle { color: var(--steel); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ------------------------------------------------------------------- draw */

.draw { padding: 64px 0; }

.draw__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

/* --- the cabinet --- */

.machine { position: relative; }

.machine__cabinet {
  background:
    linear-gradient(180deg, rgba(var(--gold-rgb), .14), rgba(0, 0, 0, .25)),
    var(--dark-2);
  border: 2px solid rgba(var(--gold-rgb), .45);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .4) inset,
    0 24px 60px rgba(0, 0, 0, .45);
}

.machine__marquee {
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .22em;
  padding: 10px 12px;
  margin-bottom: 18px;
  border-radius: 10px;
  color: var(--gold-light);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .22), rgba(var(--gold-rgb), .04));
  border: 1px solid rgba(var(--gold-rgb), .3);
  text-shadow: 0 0 18px rgba(var(--gold-rgb), .6);
}

.machine__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/*
 * Clockwise ring of 12 around a 4 x 4 board; the draw button fills the 2 x 2
 * middle. DOM order = data/prizes.json order = the order the lights run in.
 */
.cell:nth-child(1)  { grid-area: 1 / 1; }
.cell:nth-child(2)  { grid-area: 1 / 2; }
.cell:nth-child(3)  { grid-area: 1 / 3; }
.cell:nth-child(4)  { grid-area: 1 / 4; }
.cell:nth-child(5)  { grid-area: 2 / 4; }
.cell:nth-child(6)  { grid-area: 3 / 4; }
.cell:nth-child(7)  { grid-area: 4 / 4; }
.cell:nth-child(8)  { grid-area: 4 / 3; }
.cell:nth-child(9)  { grid-area: 4 / 2; }
.cell:nth-child(10) { grid-area: 4 / 1; }
.cell:nth-child(11) { grid-area: 3 / 1; }
.cell:nth-child(12) { grid-area: 2 / 1; }
.machine__center    { grid-area: 2 / 2 / 4 / 4; }

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 122px;
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--gold-rgb), .22);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .18));
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.cell--grand {
  border-color: rgba(var(--gold-rgb), .5);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .2), rgba(0, 0, 0, .2));
}
.cell--premium { border-color: rgba(var(--gold-rgb), .38); }
/* 好运就在下一次！ — not a prize, so it reads a little differently */
.cell--again {
  border-style: dashed;
  border-color: rgba(var(--gold-rgb), .4);
}
.cell--again .cell__name { color: var(--gold-light); }

.cell__icon {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
}
.cell__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

/* running highlight */
.cell.is-lit {
  border-color: var(--gold-light);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .55), rgba(var(--gold-rgb), .18));
  box-shadow: 0 0 0 2px rgba(var(--gold-rgb), .5), 0 0 26px rgba(var(--gold-rgb), .6);
  transform: translateY(-2px);
}

.cell.is-won {
  animation: cell-win 1s var(--ease) 3;
}
@keyframes cell-win {
  0%, 100% { box-shadow: 0 0 0 2px rgba(var(--gold-rgb), .6), 0 0 26px rgba(var(--gold-rgb), .55); }
  50%      { box-shadow: 0 0 0 4px var(--gold-light), 0 0 46px rgba(var(--gold-rgb), .95); }
}

/* --- the draw button --- */

.machine__center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.machine__btn {
  width: 100%;
  height: 100%;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  border: 2px solid var(--gold-mid);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid) 45%, var(--gold-deep));
  color: #24190a;
  box-shadow: 0 10px 30px rgba(var(--gold-rgb), .35);
  transition: all .2s var(--ease);
}
.machine__btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(var(--gold-rgb), .5);
}
.machine__btn:disabled {
  cursor: not-allowed;
  background: linear-gradient(160deg, var(--charcoal), var(--dark-3));
  border-color: var(--gunmetal);
  color: var(--cool-grey);
  box-shadow: none;
}
.machine__btn__main {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .14em;
}
.machine__btn__sub {
  font-size: 12px;
  font-weight: 700;
  opacity: .8;
}
.machine__btn.is-spinning { pointer-events: none; }

.machine__base {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.machine__base__lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--gold-rgb), .35);
  animation: lamp 1.8s ease-in-out infinite;
}
.machine__base__lamp:nth-child(2) { animation-delay: .3s; }
.machine__base__lamp:nth-child(3) { animation-delay: .6s; }
@keyframes lamp {
  0%, 100% { background: rgba(var(--gold-rgb), .25); box-shadow: none; }
  50%      { background: var(--gold-light); box-shadow: 0 0 12px var(--gold-mid); }
}

/* --- COMING SOON veil --- */

.veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(16, 23, 35, .88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(var(--gold-rgb), .4);
}
.veil[hidden] { display: none; }
.veil__title {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold-light);
}
.veil__text { color: var(--silver); font-size: 14px; }
.veil__text b { color: var(--white); }
.veil__count {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  padding: 8px 22px;
  border-radius: 10px;
  background: rgba(var(--gold-rgb), .14);
  border: 1px solid rgba(var(--gold-rgb), .35);
}

/* ---------------------------------------------------------------- account */

.account {
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.account__head {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 18px;
}
.account__label {
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--cool-grey);
  margin-bottom: 8px;
}
.account__field {
  display: flex;
  gap: 8px;
}
.account__input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--white);
  background: var(--midnight-2);
  border: 1px solid var(--gunmetal);
  border-radius: 24px;
  padding: 13px 18px;
  outline: none;
  transition: border-color .2s var(--ease);
}
.account__input::placeholder { color: var(--steel); }
.account__input:focus { border-color: var(--gold); }

.account__msg {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--cool-grey);
}
.account__msg.is-error { color: #ef9aa0; }
.account__msg.is-ok { color: #7ad2a6; }

.chances {
  margin: 20px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .14), rgba(var(--gold-rgb), .03));
  border: 1px solid rgba(var(--gold-rgb), .28);
  text-align: center;
}
.chances__label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--silver);
}
.chances__value {
  display: block;
  font-size: 46px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 24px rgba(var(--gold-rgb), .45);
}
.chances__bar {
  height: 6px;
  margin-top: 14px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .35);
  overflow: hidden;
}
.chances__bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  transition: width .4s var(--ease);
}

.account__notes {
  margin-bottom: 20px;
}
.account__notes li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--cool-grey);
}
.account__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.account__notes b { color: var(--silver); }

.account__cta { display: block; width: 100%; }

/* ---------------------------------------------------------------- records */

.records { padding: 64px 0; background: var(--midnight-2); }

.records__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.records__btn {
  cursor: pointer;
  min-width: 200px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  padding: 14px 28px;
  border-radius: 24px;
  border: 1px solid rgba(var(--gold-rgb), .55);
  background: rgba(var(--gold-rgb), .06);
  transition: all .2s var(--ease);
}
.records__btn:hover {
  color: #24190a;
  border-color: var(--gold-mid);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-mid) 50%, var(--gold-deep));
}

/* The records popup reuses .modal; it just needs room for a table. */
.modal__box--wide {
  max-width: 720px;
  padding: 32px 24px 24px;
}
.records-modal__title {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-light);
}
.modal__box--wide .table-wrap { max-height: 60vh; overflow-y: auto; }
.modal__box--wide .table { min-width: 0; }

.records__note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--steel);
  text-align: center;
}

/* ----------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--gunmetal);
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}
.table th,
.table td {
  border: 1px solid var(--gunmetal);
  padding: 13px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--white);
}
.table th {
  background: var(--charcoal);
  font-weight: 700;
  white-space: nowrap;
}
.table tbody tr:nth-child(odd)  { background: var(--dark-2); }
.table tbody tr:nth-child(even) { background: var(--dark-3); }
.table tbody tr.table__hero {
  background: linear-gradient(90deg, rgba(var(--gold-rgb), .22), rgba(var(--gold-rgb), .08));
}
.table tbody tr.table__hero td { color: var(--gold-light); font-weight: 700; }
.table__empty td {
  color: var(--steel);
  padding: 32px 14px;
}
.table .prize-cell { color: var(--gold-light); font-weight: 700; }
.table .prize-cell--grand { color: #ffd98a; }

/* ------------------------------------------------------------------ howto */

.howto { padding: 64px 0; }

.howto__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.panel {
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.panel__head {
  font-size: 17px;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.panel__note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--cool-grey);
}
.panel__note b { color: var(--gold-light); }

.howto__prizes-head {
  margin: 48px 0 20px;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-light);
}

/* Wrapping flex rather than grid, so an uneven last row stays centered. */
.prizes {
  --per-row: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.prizes__item {
  flex: 0 0 calc((100% - (var(--per-row) - 1) * 14px) / var(--per-row));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--gold-rgb), .2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .15));
}
.prizes__item img { width: 76px; height: 76px; object-fit: contain; }
.prizes__item strong { font-size: 13px; color: var(--white); }
.prizes__item--grand {
  border-color: rgba(var(--gold-rgb), .55);
  background: linear-gradient(180deg, rgba(var(--gold-rgb), .2), rgba(0, 0, 0, .18));
}
.prizes__item--grand strong { color: var(--gold-light); }

/* ----------------------------------------------------------------- footer */

.footer { background: var(--dark-2); }

.tnc { padding: 32px 0; }
.tnc__head {
  position: relative;
  padding: 20px 44px 20px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: var(--charcoal);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.tnc__head:hover { background: var(--gunmetal); }
.tnc__head::after {
  content: "";
  position: absolute;
  top: calc(50% - 3px);
  right: 16px;
  width: 8px;
  height: 6px;
  background: url("../images/icons/icon-arrow-down-white.svg") no-repeat center / contain;
  transition: transform .2s var(--ease);
}
.tnc__head.is-open {
  background: var(--gunmetal);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.tnc__head.is-open::after { transform: rotate(-180deg); opacity: .6; }

.tnc__content {
  display: none;
  padding: 20px 16px 4px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid var(--gunmetal);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}
.tnc__content.is-open { display: block; }
.tnc__content ol {
  counter-reset: tnc;
  max-width: 1000px;
  margin: 0 auto;
}
.tnc__content > ol > li {
  counter-increment: tnc;
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--silver);
}
.tnc__content > ol > li::before {
  content: counter(tnc) ".";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.tnc__table { margin: 14px auto; max-width: 620px; }
.tnc__table .table { margin: 0 auto; }
.tnc__note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--cool-grey);
}
.tnc__note b { color: var(--gold-light); }

.to-top { background: var(--dark-2); }
.to-top .btn {
  display: none;
  margin: 0 auto 24px;
  padding: 14px 74px;
}
.to-top.is-active { padding-bottom: 24px; }
.to-top.is-active .btn { display: block; }
.to-top hr {
  border: none;
  border-bottom: 1px solid var(--gunmetal);
  margin: 0;
}

.copy {
  /* extra bottom room so the pinned 消息 bar never covers the last lines */
  padding: 30px 0 100px;
  background: var(--dark);
}
.copy p {
  color: var(--cool-grey);
  margin-bottom: 12px;
  font-size: 12px;
}
.copy__responsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.copy__responsible > p { margin: 0; }
.copy__responsible__licenses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.copy__responsible__licenses > img { width: 32px; height: 32px; }
.copy__responsible__licenses p {
  font-weight: 700;
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, .82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  text-align: center;
  padding: 40px 28px 28px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(var(--gold-rgb), .55);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(var(--gold-rgb), .28), transparent 70%),
    var(--dark-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: modal-in .32s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* The rays are bigger than a short dialog; this layer clips them to the box so
   they never count as scrollable content. */
.modal__rays {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.modal__rays::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translateX(-50%);
  background: conic-gradient(from 0deg, rgba(var(--gold-rgb), .22) 0 6deg, transparent 6deg 30deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 20%, transparent 72%);
  animation: rays 18s linear infinite;
}
@keyframes rays { to { transform: translateX(-50%) rotate(360deg); } }

.modal__x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 7px;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  z-index: 2;
}
.modal__x:hover { background: rgba(255, 255, 255, .2); }
.modal__x img { width: 100%; height: 100%; display: block; }

.modal__badge,
.modal__icon,
.modal__title,
.modal__prize,
.modal__sub,
.modal__note,
.modal__left,
.modal__actions { position: relative; z-index: 1; }

.modal__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb), .5);
  border-radius: 20px;
  padding: 5px 16px;
}
.modal__icon {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin: 20px auto 14px;
  filter: drop-shadow(0 0 22px rgba(var(--gold-rgb), .55));
}
.modal__title { font-size: 16px; font-weight: 400; color: var(--silver); }
.modal__title b { color: var(--white); }
.modal__prize {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.25;
  background: linear-gradient(180deg, #fff, var(--gold-light) 45%, var(--gold-mid));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal__sub {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--steel);
  text-transform: uppercase;
}
.modal__note {
  margin: 20px 0 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--cool-grey);
}
.modal__left { font-size: 14px; color: var(--silver); }
.modal__left b { color: var(--gold-light); font-size: 18px; }
.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.modal__actions .btn { flex: 1; max-width: 170px; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .draw__layout { grid-template-columns: minmax(0, 1fr); }
  .account { max-width: 560px; margin: 0 auto; }
  .prizes { --per-row: 4; }
}

@media (max-width: 900px) {
  .hero__title { font-size: 40px; }
  .hero__sub { font-size: 15px; }
  .section__head h2 { font-size: 25px; }
  .howto__grid { grid-template-columns: minmax(0, 1fr); }
  .prizes { --per-row: 3; }
}

@media (max-width: 767px) {
  .inner { padding: 0 16px; }

  .header { padding: 14px 0; }
  .header__logo img { height: 32px; }
  .header__logo .desk-header { display: none; }
  .header__logo .mobi-header { display: block; }
  .btn { padding: 12px 18px; font-size: 13px; }
  .btn--lg { padding: 15px 36px; font-size: 15px; }

  /* Mobile art is 750 x 400, shown full width; the title starts on its lower
     band, 80% of the way down, less the 60px header. */
  .banner {
    height: calc(100vw * 400 / 750);
    background-image: url("../images/banner-mobile.webp");
    background-size: 100% auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
    mask-image: linear-gradient(to bottom, #000 75%, transparent);
  }
  .hero .inner { padding: calc(100vw * 320 / 750 - 60px) 16px 40px; }
  .hero__title { font-size: 34px; }
  .hero__sub { font-size: 14px; }

  .stats { grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 420px; }
  .stats__card { padding: 14px 16px; }
  .stats__value { font-size: 22px; }

  .ticker__tag { padding: 10px 14px; font-size: 12px; }

  .draw, .records, .howto { padding: 44px 0; }

  /* 3 x 5 board on a phone: still one clockwise ring of 12, button in the middle column */
  .machine__cabinet { padding: 12px; }
  .machine__marquee { font-size: 13px; letter-spacing: .14em; margin-bottom: 12px; }
  .machine__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .cell:nth-child(1)  { grid-area: 1 / 1; }
  .cell:nth-child(2)  { grid-area: 1 / 2; }
  .cell:nth-child(3)  { grid-area: 1 / 3; }
  .cell:nth-child(4)  { grid-area: 2 / 3; }
  .cell:nth-child(5)  { grid-area: 3 / 3; }
  .cell:nth-child(6)  { grid-area: 4 / 3; }
  .cell:nth-child(7)  { grid-area: 5 / 3; }
  .cell:nth-child(8)  { grid-area: 5 / 2; }
  .cell:nth-child(9)  { grid-area: 5 / 1; }
  .cell:nth-child(10) { grid-area: 4 / 1; }
  .cell:nth-child(11) { grid-area: 3 / 1; }
  .cell:nth-child(12) { grid-area: 2 / 1; }
  .machine__center    { grid-area: 2 / 2 / 5 / 3; }

  .cell { min-height: 100px; padding: 8px 4px; }
  .cell__icon { width: 46px; height: 46px; }
  .cell__name { font-size: 11px; }

  .machine__btn { min-height: 0; }
  .machine__btn__main { font-size: 24px; }
  .machine__btn__sub { font-size: 11px; padding: 0 6px; }

  .veil__title { font-size: 26px; }
  .veil__count { font-size: 20px; }
  .veil__text { font-size: 13px; }

  .account { padding: 20px 16px; }
  .account__field { flex-direction: column; }
  .account__field .btn { width: 100%; }

  .prizes { --per-row: 2; }

  .records__actions { flex-direction: column; }
  .records__btn { width: 100%; }
  .modal__box--wide { padding: 28px 12px 18px; }
  .modal__box--wide .table th,
  .modal__box--wide .table td { padding: 10px 6px; font-size: 12px; }

  .copy { padding-bottom: 80px; }
  .copy__responsible { flex-direction: column; align-items: flex-start; }
  .copy__responsible__licenses { justify-content: flex-start; flex-wrap: wrap; }

  .modal__box { padding: 32px 18px 22px; }
  .modal__prize { font-size: 24px; }
  .modal__actions { flex-direction: column; }
  .modal__actions .btn { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track,
  .modal__rays::before,
  .machine__base__lamp,
  .cell.is-won { animation: none; }
  * { transition-duration: .01ms !important; }
}
