:root {
  --blue: #0e53a4;
  --blue-bright: #1477eb;
  --blue-dark: #083d7d;
  --red: #e21f26;
  --yellow: #fff200;
  --green: #079b31;
  --line: #d8dee9;
  --text: #172033;
  --muted: #667085;
  --paper: #fff;
  --bg: #fff4e5;
  --shadow: 0 8px 26px rgba(30, 48, 75, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 18%, rgba(255,255,255,.85) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 38%, rgba(255,255,255,.75) 0 2px, transparent 3px),
    linear-gradient(135deg, #f68d79 0%, #ffd8a7 42%, #fff1d8 72%, #f7c96e 100%);
  background-attachment: fixed;
  font: 15px/1.65 Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
}

a { color: #075fc6; text-decoration: none; }
a:hover { color: var(--red); }
button, input, textarea, select { font: inherit; }
button, .primary { cursor: pointer; }

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  color: #fff;
  border-bottom: 2px solid #8bc5ff;
  background: linear-gradient(#1477eb, #126bd3 48%, #0e53a4);
  box-shadow: 0 3px 8px rgba(0,0,0,.26);
}
.topbar-inner {
  width: min(1000px, 100%);
  min-height: 80px;
  margin: auto;
  display: flex;
  align-items: stretch;
}
.logo {
  min-width: 214px;
  padding: 8px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffec31;
  background: linear-gradient(140deg, rgba(255,255,255,.25), rgba(255,255,255,0));
  text-shadow: 1px 1px #7b3600, 2px 2px 2px rgba(0,0,0,.35);
}
.logo:hover { color: #fff76a; }
.logo b { font-family: KaiTi, STKaiti, serif; font-size: 30px; line-height: 1.05; letter-spacing: 3px; }
.logo small { margin-top: 5px; color: #fff; font-size: 11px; letter-spacing: 2px; text-shadow: 1px 1px #173c70; }
.topbar nav { display: flex; }
.topbar nav a {
  min-width: 70px;
  padding: 0 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 2px 3px #002b61;
  border-left: 1px solid rgba(255,255,255,.14);
}
.topbar nav a:hover { color: #fffc00; background: #21a73d; }
.account {
  margin-left: auto;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.account a { color: #fff; font-weight: 700; white-space: nowrap; }
.account-button {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 5px;
  background: rgba(0,0,0,.12);
}

.site-shell, .page-shell {
  width: min(1000px, 100%);
  margin: 0 auto;
  background: rgba(255,255,255,.98);
  box-shadow: 0 0 12px rgba(55, 30, 0, .35);
}
.page-shell { min-height: calc(100vh - 220px); padding: 22px; }

.live-draw {
  min-height: 50px;
  display: grid;
  grid-template-columns: 74px 1fr 46px;
  color: #111;
  background: #fff;
  border-bottom: 2px solid #c8d0dc;
}
.live-period { display: grid; grid-template-rows: 1fr 1fr; text-align: center; border-right: 1px solid #ccd3dc; }
.live-period b { display: grid; place-items: center; font-size: 15px; }
.live-period b small { font-size: 10px; line-height: 1; opacity: .82; }
.live-period b span { line-height: 1.1; }
.live-period a { display: grid; place-items: center; color: red; background: #fff800; font-size: 12px; font-weight: 800; }
.live-period a:hover { color: #fff; background: red; }
.live-balls { display: grid; grid-template-columns: repeat(6, 1fr) 22px 1fr; }
.live-ball { display: grid; grid-template-rows: 25px 25px; text-align: center; border-right: 1px solid #ccd3dc; }
.live-ball b { display: grid; place-items: center; color: #fff; font-size: 16px; }
.live-ball span { display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.live-balls > i { display: grid; place-items: center; color: #666; font-size: 18px; font-style: normal; }
.live-state { display: grid; place-items: center; color: red; background: #fff800; font-size: 12px; font-weight: 800; line-height: 1.2; text-align: center; }
.live-draw .red, .mini-balls .red { background: #ef2929; }
.live-draw .blue, .mini-balls .blue { background: #2e54df; }
.live-draw .green, .mini-balls .green { background: #07952c; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 68px 30px 32px;
  text-align: center;
  border-bottom: 4px solid #e5af00;
  background:
    radial-gradient(circle at 90% 18%, rgba(255,255,255,.7), transparent 16%),
    radial-gradient(circle at 12% 85%, #6bcfff 0 7%, transparent 7.5%),
    repeating-radial-gradient(circle at 70% 30%, rgba(165,91,255,.15) 0 2px, transparent 2px 6px),
    linear-gradient(145deg, #e7f7ff 0%, #fff 45%, #fff2b8 100%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #e8f8ff 25%, #2ca4e9 26% 60%, #0758ae 61%);
  box-shadow: inset -6px -8px 10px rgba(0,0,0,.18), 0 8px 12px rgba(0,0,0,.18);
}
.hero::before { width: 86px; height: 86px; left: 30px; bottom: 24px; }
.hero::after { width: 62px; height: 62px; left: 112px; bottom: 50px; filter: hue-rotate(45deg); }
.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: STKaiti, KaiTi, serif;
  font-size: clamp(76px, 10vw, 132px);
  line-height: 1.05;
  letter-spacing: 8px;
  color: transparent;
  background: linear-gradient(#ffe867 5%, #f4ad00 50%, #d87800 80%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-stroke: 3px #fff;
  filter: drop-shadow(0 5px 0 #8b4100) drop-shadow(0 7px 3px rgba(0,0,0,.26));
}
.hero p {
  position: absolute;
  left: 0; right: 0; bottom: 73px;
  z-index: 3;
  margin: 0;
  color: #08a43e;
  font: 800 31px/1.2 STKaiti, KaiTi, serif;
  letter-spacing: 8px;
  text-shadow: 0 2px #fff;
}
.hero h2 {
  position: absolute;
  z-index: 3;
  bottom: 20px;
  left: 0; right: 0;
  margin: 0;
  color: #f111ae;
  font-size: 25px;
  letter-spacing: 12px;
  text-shadow: 1px 1px #fff;
}
.hero > div:not(.coin) { display: none; }
.coin {
  position: absolute;
  right: 65px;
  bottom: -25px;
  z-index: 1;
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  border: 18px solid #f2b616;
  border-radius: 50%;
  color: #8b4300;
  background: radial-gradient(circle, #fff173 0 40%, #f4af0a 42% 65%, #b76a00 67%);
  box-shadow: inset 0 0 0 6px #fff3a4, 0 12px 22px rgba(0,0,0,.24);
  font: 700 58px STKaiti, KaiTi, serif;
  transform: rotate(-12deg);
}

.draw-board { border: 1px solid #222; border-top: 0; }
.draw-board > h2 {
  margin: 0;
  padding: 3px 10px;
  color: red;
  background: #fff900;
  text-align: center;
  font-size: 24px;
  line-height: 1.4;
}
.draw-board > h2 a { color: red; }
.draw-board > h2 a:hover { color: #0e53a4; }
.draw-row {
  min-height: 42px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #444;
  font-weight: 700;
  color: #111;
}
.draw-row b { min-width: 50px; }
.draw-row em { color: red; font-style: normal; }
.draw-row.auto { justify-content: flex-start; gap: 14px; }
.draw-row.auto > b { width: 50px; text-align: right; }
.draw-date { width: 90px; color: #667085; font-size: 12px; font-weight: 400; }
.mini-balls { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr) 18px 1fr; gap: 5px; }
.mini-balls > span { display: flex; align-items: center; justify-content: center; gap: 4px; }
.mini-balls em { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; border-radius: 50%; font-size: 12px; font-style: normal; }
.mini-balls small { color: #2f3948; font-size: 12px; }
.mini-balls > i { display: grid; place-items: center; color: #777; font-style: normal; }
.draw-empty { padding: 24px; color: #667085; text-align: center; }
.draw-board > p {
  margin: 0;
  padding: 8px;
  color: red;
  background: #fff900;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}
.draw-board > p a { color: red; text-decoration: underline; }
.notice {
  margin: 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: red;
  background: #fff85b;
  border-radius: 22px;
  box-shadow: 0 3px 3px #f05050;
  font-size: 18px;
  font-weight: 700;
}
.notice b { padding: 9px 18px; color: #fff; background: red; }
.notice b { white-space: nowrap; }
.notice span { padding: 8px 14px; }

.forum-panel { margin: 10px; border: 1px solid #8ab5f7; }
.forum-panel > header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
  background: linear-gradient(#1477eb, #0e53a4);
}
.forum-panel header h2 { margin: 0; font-size: 25px; }
.forum-panel header small { letter-spacing: 2px; opacity: .8; }
.forum-panel header form { margin-left: auto; display: flex; }
.forum-panel header input { width: 230px; padding: 8px 10px; border: 0; border-radius: 4px 0 0 4px; }
.forum-panel header button { border: 0; padding: 8px 14px; color: #0752a0; background: #fff600; border-radius: 0 4px 4px 0; font-weight: 800; }
.post-row {
  min-height: 82px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #cfd8e6;
}
.post-row:nth-child(odd) { background: #f8fbff; }
.post-row:last-child { border-bottom: 0; }
.post-tag {
  display: inline-grid;
  place-items: center;
  height: 30px;
  color: #fff;
  background: #e42a2a;
  border-radius: 4px;
  font-weight: 800;
}
.post-row > div > a { color: #004fd4; font-size: 19px; font-weight: 800; }
.post-row p { margin: 3px 0; color: #4f5e73; }
.post-row small { color: #8490a1; }
.post-row > strong { color: #e21f26; white-space: nowrap; }
.empty { padding: 38px 20px; text-align: center; }

.quick {
  position: fixed;
  z-index: 30;
  top: 60%;
  right: max(10px, calc((100vw - 1200px) / 2));
  display: grid;
  gap: 7px;
  transform: translateY(-50%);
}
.quick a {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(#208cf0, #004490);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #24598d, 0 3px 6px rgba(0,0,0,.35);
  font-size: 25px;
  text-shadow: 0 2px 2px #001e44;
}
.quick a:hover { color: #ffff00; background: linear-gradient(#31b04a, #087320); }
.quick-support a { text-align: center; line-height: 1.18; }

.page-title { padding: 8px 3px 18px; border-bottom: 1px solid #e0e5ec; }
.page-title > a { font-weight: 700; }
.page-title h1 { margin: 6px 0 1px; color: #0b4d9c; font-size: 30px; }
.page-title p { margin: 0; color: var(--muted); }
.card {
  margin: 18px 0;
  padding: 22px;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(23,51,90,.07);
}
.card h2 { margin: 0 0 16px; color: #0e53a4; }
.narrow { width: min(520px, 100%); margin: 28px auto; }
.stack-form { display: grid; gap: 16px; }
.stack-form label, .inline-form label { display: grid; gap: 6px; font-weight: 700; color: #263852; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  color: #18283d;
  background: #fff;
  border: 1px solid #b8c6d8;
  border-radius: 5px;
  outline: 0;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #1477eb; box-shadow: 0 0 0 3px rgba(20,119,235,.14); }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 22px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(#1680ef, #0e53a4);
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(14,83,164,.25);
}
.primary:hover { color: #fff; background: linear-gradient(#2aa244, #087826); }
.primary.wide { width: 100%; }
.form-foot { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #e6eaf0; text-align: center; }
.form-error, .flash.error { color: #a8071a; background: #fff1f0; border: 1px solid #ffa39e; }
.form-error { margin-bottom: 16px; padding: 10px 13px; border-radius: 4px; }
.flash {
  position: fixed;
  z-index: 100;
  top: 92px;
  left: 50%;
  width: min(560px, calc(100% - 30px));
  padding: 11px 16px;
  border-radius: 5px;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 700;
}
.flash.success { color: #135200; background: #f6ffed; border: 1px solid #b7eb8f; }
.muted { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pending { margin: 15px 0; padding: 14px; color: #9b6100; background: #fff7d6; border: 1px solid #f4cd68; border-radius: 5px; }
.user-code { margin-top: 18px; padding: 18px; display: grid; text-align: center; background: #f4f9ff; border-radius: 6px; }
.user-code code { margin: 5px; color: var(--red); font-size: 32px; font-weight: 800; }
.profile-card { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 18px; }
.avatar { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #0e62bb; font-size: 30px; font-weight: 800; }
.profile-card h2, .profile-card p { margin: 0; }
.profile-card > strong { color: #e32020; font-size: 30px; text-align: right; }
.profile-card > strong span { display: block; color: var(--muted); font-size: 13px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-actions a { padding: 9px 15px; color: #0e53a4; background: #edf6ff; border: 1px solid #a7c9ef; border-radius: 5px; font-weight: 700; }
.record { padding: 12px 4px; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid #edf0f4; }
.record:last-child { border-bottom: 0; }
.record div { display: grid; }
.record span { color: var(--muted); font-size: 13px; }
.record .plus { color: #129145; }
.record .minus { color: #d62828; }

.article-meta { margin: -22px -22px 20px; padding: 10px 18px; display: flex; justify-content: space-between; background: #eff6ff; border-bottom: 1px solid #bfd4ed; }
.article-meta strong { color: #e21f26; }
.article-body { min-height: 220px; white-space: normal; font-size: 16px; line-height: 1.9; }
.locked { padding: 42px 20px; text-align: center; background: #fffdf0; border: 1px dashed #e8b30b; border-radius: 7px; }
.locked > div { font-size: 38px; }
.locked .primary { margin: 10px auto 0; }
.reply { padding: 14px 2px; border-bottom: 1px solid #e8edf3; }
.reply span { margin-left: 10px; color: var(--muted); font-size: 12px; }
.reply p { margin: 7px 0 0; }
.reply-form { margin-top: 22px; }
.prose h2 { margin-top: 20px; }
.rules-original { color: #29394d; font-size: 17px; line-height: 1.9; }
.rules-original h2 { margin: 30px 0 16px; color: #c51d27; text-align: center; }
.rules-original h2:first-child { margin-top: 0; }
.rules-original ol { margin: 0 0 22px; padding-left: 30px; }
.rules-original li { margin: 8px 0; }
.rules-highlight { padding: 14px 18px; color: #153f7a; background: #eef6ff; border-left: 4px solid #1768b2; border-radius: 6px; font-weight: 700; }
.rules-warning { color: #d51f2d; font-weight: 700; }
.rules-final { margin-top: 30px; padding: 22px; background: #fff8e8; border: 1px solid #edc05a; border-radius: 10px; }
.rules-final > strong { display: block; color: #555; font-size: 24px; text-align: center; }
.rules-final p { margin: 14px 0 0; color: #233cff; }

.draw-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.draw-history-heading h2 { margin: 0; }
.draw-history-heading small { display: block; margin-top: 4px; color: var(--muted); }
.draw-type-tabs { margin: 0 0 16px; padding: 5px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: #e8eef5; border-radius: 10px; }
.draw-type-tabs a { padding: 11px 14px; color: #36516d; text-align: center; border-radius: 7px; font-weight: 800; }
.draw-type-tabs a.active { color: #fff; background: linear-gradient(135deg,#0a3f75,#1768ad); box-shadow: 0 5px 14px rgba(15,75,130,.2); }
.history-draw { margin-top: 14px; border: 1px solid #d8e1ed; border-radius: 7px; overflow: hidden; }
.history-draw header { padding: 9px 14px; display: flex; justify-content: space-between; gap: 15px; color: #fff; background: linear-gradient(#1477eb, #0e53a4); }
.history-draw time { font-size: 13px; opacity: .9; }
.history-balls { padding: 18px; display: grid; grid-template-columns: repeat(6, 1fr) 30px 1fr; align-items: center; gap: 9px; }
.history-balls > div { display: grid; justify-items: center; gap: 5px; }
.history-balls strong { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; border-radius: 50%; font-size: 19px; box-shadow: inset 0 -4px 6px rgba(0,0,0,.2); }
.history-balls .red { background: #ef2929; }
.history-balls .blue { background: #2e54df; }
.history-balls .green { background: #07952c; }
.history-balls > i { color: #77818f; text-align: center; font-size: 25px; font-style: normal; }

.admin-nav { margin: 18px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-nav a { padding: 9px 15px; color: #0e53a4; background: #eaf4ff; border: 1px solid #9fc4ee; border-radius: 4px; font-weight: 700; }
.admin-nav a.active { color: #fff; background: #0e53a4; border-color: #0e53a4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats div { padding: 18px; display: grid; background: linear-gradient(145deg,#0f65bd,#0b4388); border-radius: 7px; color: #fff; }
.stats strong { font-size: 31px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.admin-list { display: grid; gap: 12px; }
.request-row, .user-row { padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: center; background: #f8fbff; border: 1px solid #d8e5f4; border-radius: 6px; }
.request-row p { margin: 3px 0; }
.request-row small, .user-row span { display: block; color: var(--muted); }
.request-row form { min-width: 250px; display: grid; grid-template-columns: 90px 1fr auto; gap: 7px; }
.user-row { grid-template-columns: 1fr auto minmax(360px, auto) auto; }
.user-row > strong { color: #e32222; }
.user-row form:not(.inline-mini) { display: grid; grid-template-columns: 90px 150px auto; gap: 7px; }
.inline-mini { display: inline-flex; gap: 5px; }
.inline-mini button, .user-row button, .search-admin button { padding: 8px 12px; border: 1px solid #8aabd2; color: #0e53a4; background: #fff; border-radius: 4px; }
.search-admin { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.heading-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid #dfe6ef; text-align: left; white-space: nowrap; }
th { color: #0e53a4; background: #eff6ff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

footer {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 25px 15px 90px;
  color: #6e573e;
  background: rgba(255,255,255,.9);
  text-align: center;
  box-shadow: 0 8px 12px rgba(55,30,0,.25);
}
footer p { margin: 3px; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .quick { right: 10px; }
  .quick a { width: 68px; height: 68px; font-size: 20px; }
}

@media (max-width: 795px) {
  html, body { width: 100%; max-width: 100vw; overflow-x: hidden; }
  body { padding-bottom: 66px; background: #f4f6f9; font-size: 14px; }
  .topbar-inner { min-height: 52px; justify-content: center; }
  .logo { min-width: 160px; padding: 4px 8px; text-align: center; }
  .logo b { font-size: 23px; }
  .logo small { display: none; }
  .topbar nav { display: none; }
  .account { position: absolute; inset: 0; padding: 0 10px; justify-content: space-between; pointer-events: none; }
  .account a { pointer-events: auto; font-size: 14px; }
  .account a:first-child { max-width: 82px; overflow: hidden; text-overflow: ellipsis; }
  .account-button { padding: 4px 8px; border: 0; background: transparent; }
  .site-shell, .page-shell { width: 100vw; max-width: 100vw; min-width: 0; box-shadow: none; }
  .page-shell { padding: 13px; }
  .live-draw { grid-template-columns: 49px 1fr 34px; min-height: 46px; }
  .live-balls { grid-template-columns: repeat(6, 1fr) 11px 1fr; }
  .live-ball { grid-template-rows: 23px 23px; min-width: 0; }
  .live-ball b { font-size: 12px; }
  .live-ball span { font-size: 10px; }
  .live-period b { font-size: 12px; }
  .live-period a, .live-state { font-size: 9px; }
  .hero { min-height: 210px; padding: 48px 8px 20px; }
  .hero h1 { font-size: clamp(48px, 15.5vw, 72px); letter-spacing: 0; -webkit-text-stroke-width: 2px; }
  .hero p { bottom: 53px; font-size: clamp(17px, 4.8vw, 26px); letter-spacing: 2px; }
  .hero h2 { bottom: 16px; font-size: 16px; letter-spacing: 3px; }
  .coin { width: 90px; height: 90px; right: 15px; bottom: -17px; border-width: 10px; font-size: 32px; opacity: .8; }
  .hero::before { width: 50px; height: 50px; left: 8px; bottom: 11px; }
  .hero::after { display: none; }
  .draw-board > h2 { font-size: 19px; }
  .draw-row { min-height: 37px; padding: 5px 1px; gap: 2px; font-size: 10px; }
  .draw-row b { min-width: 38px; }
  .draw-row span { white-space: nowrap; }
  .draw-row.auto { gap: 3px; }
  .draw-row.auto > b { width: 40px; min-width: 40px; }
  .draw-date { display: none; }
  .mini-balls { grid-template-columns: repeat(6, 1fr) 10px 1fr; gap: 1px; min-width: 0; }
  .mini-balls > span { display: grid; gap: 0; justify-items: center; }
  .mini-balls em { width: 24px; height: 24px; font-size: 10px; }
  .mini-balls small { font-size: 9px; line-height: 1.1; }
  .notice { margin: 7px 4px; font-size: 14px; border-radius: 6px; }
  .notice b { padding: 8px; }
  .notice span { padding: 7px; }
  .forum-panel { margin: 5px 3px; }
  .forum-panel > header { padding: 9px; flex-wrap: wrap; gap: 8px; }
  .forum-panel header h2 { font-size: 20px; }
  .forum-panel header form { width: 100%; }
  .forum-panel header input { width: auto; flex: 1; min-width: 0; }
  .post-row { grid-template-columns: 45px 1fr; padding: 10px 8px; gap: 8px; }
  .post-row > strong { grid-column: 2; }
  .post-row > div > a { font-size: 16px; }
  .quick { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 60;
    left: 0; right: 0; bottom: 0;
    height: 62px;
    width: 100vw;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fff;
    border-top: 1px solid #d7dce4;
    box-shadow: 0 -2px 10px rgba(0,0,0,.1);
  }
  .mobile-nav a { display: grid; place-items: center; align-content: center; color: #c42118; font-size: 20px; line-height: 1.1; }
  .mobile-nav span { font-size: 12px; }
  footer { padding-bottom: 18px; }
  .two-col, .stats, .form-grid { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 58px 1fr; }
  .profile-card > strong { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #e5e9ee; text-align: left; }
  .profile-card > strong span { display: inline; margin-left: 4px; }
  .inline-form { grid-template-columns: 1fr; }
  .request-row, .user-row { grid-template-columns: 1fr; }
  .request-row form, .user-row form:not(.inline-mini) { min-width: 0; grid-template-columns: 1fr; }
  .heading-actions { align-items: flex-start; flex-direction: column; }
  .history-draw header { align-items: flex-start; flex-direction: column; gap: 1px; }
  .history-balls { padding: 12px 4px; grid-template-columns: repeat(6, 1fr) 10px 1fr; gap: 2px; }
  .history-balls strong { width: 34px; height: 34px; font-size: 14px; }
  .history-balls span { font-size: 11px; }
  .flash { top: 62px; }
}

/* Reference-site layout */
body {
  background: #f4f7fb;
}
.topbar-inner { position: relative; }
.logo {
  width: 214px;
  min-width: 214px;
  height: 80px;
  padding: 0;
  display: block;
  overflow: hidden;
  background: #fff;
}
.logo img { width: 100%; height: 100%; display: block; object-fit: fill; }
.topbar nav { flex: 1; }
.topbar nav a { min-width: 62px; padding: 0 10px; font-size: 20px; }
.top-login {
  width: 340px;
  height: 80px;
  margin-left: auto;
  display: grid;
  grid-template-columns: 1fr 72px;
  align-items: stretch;
}
.top-login > input { display: none; }
.top-login > div { padding: 6px 8px; display: grid; align-content: center; gap: 4px; color: #37ef2c; font-size: 17px; font-weight: 800; text-shadow: 0 1px 2px #003a68; }
.top-login label { display: grid; grid-template-columns: 58px 1fr; align-items: center; }
.top-login input { height: 24px; padding: 1px 5px; border: 2px solid #31b821; border-radius: 3px; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
.top-login button { border: 0; color: #fff; background: #0e53a4; font-size: 20px; font-weight: 800; text-shadow: 0 2px 3px #00274e; }
.top-login button:hover { color: #ff0; background: #28a83f; }
.account.signed { padding: 7px; }
.account.signed > a:first-child { display: grid; text-align: center; }
.account.signed small { color: #ff0; }
.mobile-account { display: none; }

.reference-hero {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.reference-hero::before, .reference-hero::after { display: none; }
.reference-hero img { width: 100%; height: auto; display: block; }
.prediction-board { border-top: 1px solid #222; }
.prediction-board .draw-row { min-height: 42px; padding: 4px 8px; font-size: 13px; }
.prediction-board .draw-row b { min-width: auto; }
.prediction-board .prediction-pending { background: #fffde5; }
.prediction-board .prediction-pending em { color: #ff3300; }
.promo-banner { width: 100%; height: auto; display: block; }
.festival-notice {
  overflow: hidden;
  padding: 0 10px;
  color: #ffe9a3;
  background: linear-gradient(145deg, #be1713, #8f0806 82%);
  border: 1px solid #78100b;
  box-shadow: inset 0 0 30px rgba(255,82,35,.24);
}
.festival-notice header { padding: 16px 16px 13px; text-align: center; }
.festival-notice header i { width: 22px; height: 22px; display: block; margin: 0 auto 9px; border-radius: 50%; background: #ffd76a; box-shadow: inset -7px -2px 0 #a01009; }
.festival-notice h2 { margin: 0; color: #ffe27a; font-size: 23px; letter-spacing: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 0 12px rgba(255,200,90,.7); }
.festival-notice header small { color: #ffcc55; font-size: 12px; letter-spacing: 3px; }
.festival-letter { padding: 16px 14px 15px; color: #6b4a1e; background: linear-gradient(#fff9ec, #fdf0d6); border-radius: 9px; box-shadow: 0 3px 10px rgba(90,10,5,.35); }
.festival-letter article { text-align: center; }
.festival-letter article > b { width: 42px; height: 42px; margin: 0 auto; display: grid; place-items: center; color: #8c0a06; background: linear-gradient(135deg,#fbe6a8,#d9a83c); border-radius: 50%; box-shadow: 0 2px 6px rgba(180,130,40,.45); font-size: 20px; }
.festival-letter h3 { margin: 9px 0 0; color: #b81f18; font-size: 22px; letter-spacing: 1px; }
.festival-letter p { margin: 6px 0 0; font-size: 18px; line-height: 1.9; }
.festival-letter p small { color: #96805a; font-size: 16px; }
.festival-letter em, .festival-notice em { color: #b81f18; font-style: normal; font-weight: 800; }
.festival-letter hr { width: 68%; height: 1px; margin: 15px auto; border: 0; background: linear-gradient(90deg,transparent,#e0b84e,transparent); }
.festival-notice footer { width: auto; margin: 0; padding: 11px 12px 13px; color: #ffe9a3; background: transparent; box-shadow: none; font-size: 17px; letter-spacing: 2px; text-align: center; text-shadow: 0 0 8px rgba(255,210,100,.5); }
.yellow-notice { padding: 8px 7px; color: #0000f0; background: #ffff00; border: 1px solid #777; text-align: center; font-weight: 800; }
.yellow-notice p { margin: 0 0 7px; font-size: clamp(25px, 3.2vw, 38px); line-height: 1.35; }
.yellow-notice p:nth-child(3) { margin-top: 30px; }
.yellow-notice div { font-size: clamp(17px, 2vw, 24px); line-height: 1.55; }
.yellow-notice em { color: #f00; font-style: normal; }
.notice-strip { margin: 6px 12px; padding: 7px 10px; display: block; overflow: hidden; color: #001fea; background: linear-gradient(#fff,#f5f5f5); border: 1px solid #ddd; border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 27px; font-weight: 800; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.notice-strip:hover { color: #e60000; }
.notice-strip em { color: #f00; font-style: normal; }
.notice-admin-form .notice-editor textarea { min-height: 86px; line-height: 1.65; }
.notice-admin-form .notice-editor h2 { margin-bottom: 3px; }
.notice-admin-form .notice-editor p { margin: 0; color: var(--muted); }
.visibility-toggle { display: inline-flex; align-items: center; gap: 8px; color: #0e53a4; font-weight: 800; white-space: nowrap; }
.visibility-toggle input { width: 20px; height: 20px; margin: 0; }
.form-actions { margin: 18px 0; display: flex; gap: 10px; }
.notice-window { min-width: 0; overflow: hidden; white-space: nowrap; }
.notice-window span { display: inline-block; min-width: 100%; animation: notice-scroll 18s -9s linear infinite; }
@keyframes notice-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.captcha-row { display: grid; grid-template-columns: 1fr 132px; align-items: center; gap: 10px; }
.captcha-row img { width: 132px; height: 44px; cursor: pointer; border: 1px solid #b8c6d8; border-radius: 4px; }
.prediction-form fieldset { margin: 0; padding: 14px; border: 1px solid #cbd8e8; border-radius: 6px; }
.prediction-form legend { padding: 0 8px; color: #0e53a4; font-weight: 800; }
.animal-options { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.animal-options label { display: block; cursor: pointer; }
.animal-options input { position: absolute; opacity: 0; pointer-events: none; }
.animal-options span { height: 42px; display: grid; place-items: center; border: 1px solid #9fb5d0; border-radius: 5px; background: #f6f9fd; font-size: 18px; font-weight: 800; }
.animal-options input:checked + span { color: #fff; background: #0e62bb; border-color: #0e53a4; box-shadow: 0 0 0 2px rgba(14,83,164,.15); }
.prediction-status { padding: 3px 8px; border-radius: 4px; }
.prediction-status.status-hit { color: #087a28; background: #e9f9ed; }
.prediction-status.status-miss { color: #a61b1b; background: #ffeded; }
.prediction-status.status-pending { color: #9a6200; background: #fff3c4; }
.prediction-auto-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.prediction-auto-status span { padding: 12px; color: #53657a; background: #f6f9fd; border: 1px solid #d8e1ec; border-radius: 6px; text-align: center; }
.prediction-auto-status b { display: block; margin-top: 5px; color: #123b70; font-size: 18px; }

@media (max-width: 795px) {
  body { background: #fff; }
  .topbar-inner { min-height: 52px; height: 52px; }
  .logo { width: 160px; min-width: 160px; height: 52px; padding: 0; }
  .top-login { display: none; }
  .mobile-account { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; pointer-events: none; }
  .mobile-account a { color: #fff; font-weight: 800; pointer-events: auto; }
  .account.signed { position: absolute; inset: 0; padding: 0 8px; display: flex; justify-content: space-between; pointer-events: none; }
  .account.signed a { pointer-events: auto; }
  .reference-hero { min-height: 0; height: auto; padding: 0; }
  .reference-hero img { width: 100%; height: auto; }
  .prediction-board .draw-row { min-height: 41px; padding: 3px 1px; gap: 2px; font-size: 10px; }
  .prediction-board .draw-row b { min-width: 39px; }
  .prediction-board .draw-row span { white-space: nowrap; }
  .notice-window span { padding: 7px 5px; }
  .promo-banner { min-height: 70px; object-fit: cover; }
  .festival-notice { padding: 0 6px; }
  .festival-notice header { padding: 12px 8px 10px; }
  .festival-notice h2 { font-size: 19px; }
  .festival-letter { padding: 13px 8px; }
  .festival-letter article > b { width: 34px; height: 34px; font-size: 16px; }
  .festival-letter h3 { font-size: 17px; }
  .festival-letter p { font-size: 14px; }
  .festival-letter p small { font-size: 13px; }
  .festival-notice footer { font-size: 13px; }
  .yellow-notice p { font-size: clamp(17px, 5.2vw, 24px); }
  .yellow-notice p:nth-child(3) { margin-top: 20px; }
  .yellow-notice div { font-size: clamp(13px, 4vw, 18px); }
  .notice-strip { margin: 5px 7px; font-size: clamp(17px, 5vw, 23px); }
  .mobile-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); height: 64px; }
  .mobile-nav a { font-size: 12px; }
  .mobile-nav img { width: 27px; height: 27px; display: block; }
  .mobile-nav .mobile-symbol { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: #d92d25; border-radius: 50%; font-size: 15px; font-weight: 800; }
  .captcha-row { grid-template-columns: 1fr 112px; }
  .captcha-row img { width: 112px; height: 42px; }
  .animal-options { grid-template-columns: repeat(3, 1fr); }
  .prediction-auto-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 2026 visual refinement: preserve the existing layout and improve hierarchy. */
:root {
  --blue: #0b3768;
  --blue-bright: #1768b2;
  --blue-dark: #061d38;
  --red: #c81f32;
  --yellow: #f3c55b;
  --line: #dfe6ef;
  --text: #17243a;
  --muted: #68768a;
  --paper: #fff;
  --bg: #eef2f7;
  --shadow: 0 14px 36px rgba(20,43,72,.12);
}

body {
  color: var(--text);
  background:
    linear-gradient(140deg, rgba(244,247,251,.94), rgba(255,248,235,.92)),
    radial-gradient(ellipse at top right, #e8effa, #f4f7fb 65%);
}
a, button, input, textarea, select { transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }

.topbar {
  border-bottom: 2px solid #d9ad4a;
  background: linear-gradient(135deg, #061a32 0%, #0b3768 56%, #12598f 100%);
  box-shadow: 0 7px 24px rgba(3,22,43,.26);
}
.topbar-inner { width: min(1040px, 100%); }
.logo { border-right: 1px solid rgba(255,255,255,.14); }
.topbar nav a { position: relative; border-left: 0; color: #e8f1fb; font-size: 18px; text-shadow: none; }
.topbar nav a::after { content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px; background: #f2c459; border-radius: 3px 3px 0 0; transform: scaleX(0); transition: transform .2s ease; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a:hover::after { transform: scaleX(1); }
.top-login > div { color: #dce9f7; font-size: 15px; text-shadow: none; }
.top-login input { border: 1px solid rgba(255,255,255,.38); background: rgba(255,255,255,.96); box-shadow: none; }
.top-login input:focus { border-color: #f2c459; box-shadow: 0 0 0 3px rgba(242,196,89,.18); }
.top-login button { background: linear-gradient(180deg,#185f99,#0a315d); font-size: 18px; text-shadow: none; }
.top-login button:hover { color: #13253b; background: linear-gradient(180deg,#ffdd81,#dba83b); }

.site-shell, .page-shell { background: #f5f7fa; box-shadow: 0 0 0 1px rgba(18,48,78,.08), 0 22px 55px rgba(15,35,57,.16); }
.site-shell { padding: 12px 0 20px; }

.live-draw {
  min-height: 62px;
  margin: 0 12px 12px;
  overflow: hidden;
  grid-template-columns: 84px 1fr 58px;
  border: 1px solid #dbe4ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(23,53,85,.08);
}
.live-period { border-right: 1px solid #e1e7ef; }
.live-period b { color: #fff; background: linear-gradient(160deg,#102e50,#17619d); font-size: 16px; }
.live-draw-hk .live-period b { background: linear-gradient(160deg,#6d1620,#bd2632); }
.live-draw-hk .live-period a { color: #7c1620; }
.live-period a { color: #9c240d; background: #fff2c9; font-size: 12px; }
.live-period a:hover { color: #fff; background: #c92a36; }
.live-balls { padding: 6px 8px; gap: 3px; }
.live-ball { grid-template-rows: 34px 16px; border-right: 0; }
.live-ball b { width: 32px; height: 32px; margin: auto; border: 2px solid rgba(255,255,255,.92); border-radius: 50%; box-shadow: inset 0 -5px 8px rgba(0,0,0,.18), 0 2px 7px rgba(25,42,62,.22); font-size: 14px; }
.live-ball span { color: #46566b; font-size: 11px; }
.live-ball.special-ball { position: relative; margin: -2px 0; background: linear-gradient(180deg,#fffaf0,#fff0bc); border: 2px solid #dfaa2f; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.live-state { color: #9c240d; background: linear-gradient(180deg,#fff6d6,#ffe89f); border-left: 1px solid #ead18f; }

.reference-hero { margin: 0 12px 12px; overflow: hidden; border: 1px solid #d8e2ec; border-radius: 14px; box-shadow: 0 12px 28px rgba(23,53,85,.12); }

.prediction-board {
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(23,53,85,.09);
}
.prediction-board > h2 { padding: 11px 14px; color: #fff; background: linear-gradient(135deg,#0a294d,#125f9d); border-bottom: 3px solid #e4b84f; font-size: 22px; letter-spacing: 1px; }
.prediction-board .draw-row { min-height: 46px; padding: 6px 16px; display: grid; grid-template-columns: 72px 1fr 1fr 128px; gap: 10px; border-top: 1px solid #e8edf3; font-size: 14px; }
.prediction-board .draw-row:nth-child(odd) { background: #f7f9fc; }
.prediction-board .draw-row b { color: #153e69; text-align: right; }
.prediction-board .draw-row span { color: #34465c; }
.prediction-board .draw-row em { color: #d92332; font-weight: 800; }
.prediction-board .prediction-pending { background: linear-gradient(90deg,#fff9e9,#fffdf7); box-shadow: inset 4px 0 #e6b344; }
.prediction-board > p { padding: 9px 12px; color: #8b5c11; background: #fff8e6; border-top: 1px solid #eed69d; font-size: 14px; }

.notice { min-height: 46px; margin: 12px; color: #30445b; background: #fff; border: 1px solid #e1e7ef; border-radius: 12px; box-shadow: 0 7px 20px rgba(23,53,85,.08); font-size: 15px; }
.notice b { align-self: stretch; padding: 10px 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#dc3340,#a91328); }
.notice span { padding: 9px 14px; }

.promo-banner { width: calc(100% - 24px); margin: 0 12px 12px; overflow: hidden; border-radius: 14px; box-shadow: 0 10px 25px rgba(91,17,18,.16); }
.festival-notice { margin: 0 12px 12px; border: 0; border-radius: 15px; box-shadow: 0 14px 30px rgba(91,17,18,.22), inset 0 0 30px rgba(255,82,35,.24); }
.festival-letter { border: 1px solid rgba(224,184,78,.36); }
.yellow-notice { margin: 0 12px 10px; border: 1px solid #ead159; border-radius: 14px; background: linear-gradient(145deg,#fffbd8,#fff46c); box-shadow: 0 9px 22px rgba(113,89,5,.14); }
.notice-strip { margin: 8px 12px; padding: 11px 14px; color: #123f75; background: #fff; border: 1px solid #dfe6ef; border-left: 5px solid #d3a431; border-radius: 11px; box-shadow: 0 6px 17px rgba(23,53,85,.08); font-size: 23px; }

.forum-panel { margin: 14px 12px 0; overflow: hidden; border: 1px solid #dbe4ee; border-radius: 15px; background: #fff; box-shadow: 0 12px 28px rgba(23,53,85,.11); }
.forum-panel > header { padding: 15px 18px; background: linear-gradient(135deg,#082847,#0f5f9d); border-bottom: 3px solid #e4b84f; }
.forum-panel header h2 { font-size: 23px; }
.forum-panel header input { height: 38px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px 0 0 8px; }
.forum-panel header button { color: #573c04; background: linear-gradient(#ffe083,#eabb4e); border-radius: 0 8px 8px 0; }
.post-row { min-height: 88px; padding: 14px 18px; border-bottom-color: #e5eaf0; }
.post-row:nth-child(odd) { background: #f8fafc; }
.post-row:hover { background: #fff9eb; }
.post-tag { border-radius: 16px; background: linear-gradient(145deg,#dc3340,#b4152b); box-shadow: 0 3px 8px rgba(180,21,43,.2); font-size: 13px; }
.post-row > div > a { color: #124e88; }

.quick { gap: 9px; right: max(12px, calc((100vw - 1190px) / 2)); }
.quick a { width: 66px; height: 66px; background: linear-gradient(145deg,#155f9e,#082d57); border: 2px solid #f4d27b; box-shadow: 0 0 0 2px rgba(10,45,87,.8), 0 8px 18px rgba(5,25,48,.28); font-size: 19px; text-shadow: none; }
.quick a:hover { color: #13253b; background: linear-gradient(145deg,#ffe28e,#d8a434); transform: translateX(-3px); }

.page-shell { padding: 26px; }
.page-title { padding: 8px 4px 20px; border-bottom-color: #dce4ed; }
.page-title h1 { color: #103f70; font-size: 29px; }
.card { border: 1px solid #dfe6ee; border-radius: 13px; box-shadow: 0 8px 24px rgba(23,51,90,.08); }
.card h2 { color: #103f70; }
input, textarea, select { border-color: #c7d2df; border-radius: 8px; background: #fbfcfe; }
input:focus, textarea:focus, select:focus { border-color: #1768b2; box-shadow: 0 0 0 3px rgba(23,104,178,.13); background: #fff; }
.primary { border-radius: 8px; background: linear-gradient(145deg,#1768b2,#0b3768); box-shadow: 0 5px 13px rgba(11,55,104,.22); }
.primary:hover { background: linear-gradient(145deg,#dcae45,#b77e17); transform: translateY(-1px); }
.admin-nav { padding: 6px; gap: 5px; border: 1px solid #dce5ef; border-radius: 11px; background: #fff; }
.admin-nav a { border: 0; border-radius: 7px; background: transparent; }
.admin-nav a:hover { background: #eef5fc; }
.admin-nav a.active { background: linear-gradient(145deg,#1768b2,#0b3768); }
.stats div { border: 1px solid rgba(255,255,255,.18); background: linear-gradient(145deg,#155f9e,#082d57); box-shadow: 0 8px 18px rgba(8,45,87,.16); }
th { color: #103f70; background: #eef4fa; }
th, td { border-bottom-color: #e3e9f0; }
.history-balls .special-ball { padding: 8px 3px; background: linear-gradient(180deg,#fffaf0,#fff0bc); border: 1px solid #e4b74b; border-radius: 12px; box-shadow: 0 5px 14px rgba(163,103,0,.16); }

body > footer { color: #657489; background: rgba(247,249,252,.96); box-shadow: 0 12px 30px rgba(15,35,57,.14); }

.material-list { margin: 12px; display: grid; gap: 9px; }
.material-row { min-height: 64px; padding: 12px 18px; display: flex; align-items: center; justify-content: flex-start; gap: 18px; overflow: hidden; background: linear-gradient(180deg,#fff,#f7f9fc); border: 1px solid #dce3eb; border-radius: 11px; box-shadow: 0 5px 15px rgba(23,53,85,.09); font-size: clamp(20px,2.6vw,31px); font-weight: 800; line-height: 1.35; }
.material-row span { min-width: 0; }
.material-row b { flex: 0 0 auto; }
.material-row:hover { transform: translateY(-1px); border-color: #d2ad56; box-shadow: 0 8px 20px rgba(23,53,85,.14); }
.material-row.material-paid, .material-row.material-paid b { color: #e10c15; }
.material-row.material-free { color: #171717; }

.featured-board { margin: 16px 12px 0; overflow: hidden; border: 1px solid #dfbd32; border-radius: 14px; background: #fffde3; box-shadow: 0 12px 28px rgba(107,68,8,.14); }
.featured-issue { border-bottom: 5px solid #ffe500; }
.featured-issue:last-of-type { border-bottom: 0; }
.featured-issue h2 { margin: 0; padding: 8px 12px; color: #ffe900; background: linear-gradient(180deg,#ef1720,#cf0713); border: 3px double #ffe800; font-size: clamp(18px,2.3vw,25px); line-height: 1.25; text-align: center; text-shadow: 0 1px 1px rgba(95,0,0,.45); }
.featured-issue h2 span { margin-left: 12px; }
.featured-line { min-height: 56px; display: grid; grid-template-columns: 23% 1fr 23%; align-items: stretch; color: #e1131c; border-top: 1px solid rgba(255,255,255,.8); font-size: clamp(16px,2vw,22px); font-weight: 900; }
.featured-line > * { display: grid; place-items: center; padding: 8px 10px; text-align: center; }
.featured-line b { color: #86121a; background: linear-gradient(135deg,#c8ff9d,#a8ef78); }
.featured-line strong { background: linear-gradient(135deg,#fffde4,#fff9c8); letter-spacing: .18em; }
.featured-line em { color: #e71320; background: linear-gradient(135deg,#c8ff9d,#a8ef78); font-style: normal; }
.featured-line em.miss { color: #7d3740; }
.featured-issue.is-pending h2 { background: linear-gradient(180deg,#c8222c,#a50e1a); }
.featured-issue.is-pending .featured-line em { color: #8b5d10; background: linear-gradient(135deg,#fff0b6,#ffe083); }

.annual-chart { margin: 16px 12px 0; overflow: hidden; background: #fff; border: 1px solid #dbe4ee; border-radius: 14px; box-shadow: 0 12px 28px rgba(23,53,85,.11); }
.annual-chart > header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #fff; background: linear-gradient(135deg,#082847,#0f5f9d); border-bottom: 3px solid #e4b84f; }
.annual-chart header small { color: #e7c265; font-size: 11px; letter-spacing: 2px; }
.annual-chart header h2 { margin: 0; font-size: 22px; }
.annual-chart header > a { flex: 0 0 auto; padding: 7px 12px; color: #563a03; background: linear-gradient(#ffe28a,#dfac3e); border-radius: 7px; font-weight: 800; }
.annual-chart-scroll { padding: 8px; overflow-x: auto; background: #f4f6f8; scrollbar-color: #bd8b28 #e8edf2; }
.annual-chart-scroll a { display: block; }
.annual-chart img { width: 100%; height: auto; display: block; background: #fff; }
.annual-chart > p { margin: 0; padding: 8px 12px; color: #6b7788; background: #fff; text-align: center; font-size: 13px; }

.material-page { width: 100%; max-width: 1040px; overflow: hidden; }
.material-meta { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; padding: 0; overflow: hidden; }
.material-meta div { min-width: 0; padding: 15px; display: grid; gap: 4px; text-align: center; border-right: 1px solid #e2e7ed; }
.material-meta div:last-child { border-right: 0; }
.material-meta span { color: var(--muted); font-size: 13px; }
.material-meta b { min-width: 0; color: #163f6b; font-size: 17px; overflow-wrap: anywhere; }
.material-meta .text-red { color: #d71927; }
.material-paywall { padding: 30px 20px; text-align: center; background: linear-gradient(145deg,#fff,#fff8e9); border-color: #e7cb8d; }
.material-paywall .paywall-lock { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg,#d6a33b,#9b6710); border-radius: 50%; box-shadow: 0 8px 18px rgba(155,103,16,.25); font-size: 22px; font-weight: 900; }
.material-paywall h2 { margin: 0 0 8px; }
.material-paywall p { color: var(--muted); }
.material-paywall > strong { display: block; margin: 14px 0; color: #d71927; font-size: 28px; }
.material-paywall .primary { display: inline-flex; margin-top: 8px; }
.material-history { padding: 0; overflow: hidden; }
.material-history > h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 18px; color: #fff; background: linear-gradient(135deg,#092a4c,#125f9d); border-bottom: 3px solid #e1b54c; }
.material-history > h2 small { color: #ffe7a6; font-size: 14px; font-weight: 700; }
.material-answer { padding: 15px 18px; border-bottom: 1px solid #e4e9ef; box-shadow: inset 4px 0 #9ba9b8; }
.material-answer:last-child { border-bottom: 0; }
.material-answer header { display: flex; align-items: center; gap: 8px; color: #143e6a; }
.material-answer header span { color: #d21e2c; font-weight: 800; }
.material-answer .answer-value { margin: 12px 0 8px; padding: 13px; color: #171717; background: #f6f8fb; border-radius: 8px; font-size: clamp(20px,2.8vw,29px); font-weight: 900; line-height: 1.6; word-break: break-word; }
.material-answer footer { color: #5b6878; background: transparent; box-shadow: none; text-align: left; }
.material-answer footer b { margin-left: 7px; color: #18843a; }
.material-answer.answer-hit { box-shadow: inset 4px 0 #1c9b4e; }
.material-answer.answer-miss { box-shadow: inset 4px 0 #c7353e; opacity: .76; }
.material-answer.answer-miss footer b { color: #bd1f2d; }
.material-answer.answer-pending { box-shadow: inset 4px 0 #d6a536; }
.answer-locked { margin-top: 10px; padding: 13px; color: #856217; background: #fff7df; border: 1px dashed #d7b762; border-radius: 8px; text-align: center; }

.material-admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.material-admin-toolbar label { display: grid; gap: 6px; color: #41546a; font-weight: 700; }
.material-admin-toolbar select { min-width: 130px; }
.material-admin-toolbar > div { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.material-admin-toolbar > div span { padding: 10px 12px; color: #52657a; background: #f2f6fa; border-radius: 8px; }
.material-admin-toolbar button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.material-admin-list { display: grid; gap: 10px; }
.material-admin-row { margin: 0; }
.material-admin-row > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.material-admin-row > header b { color: #153f6b; font-size: 18px; }
.material-admin-row > header p { margin: 5px 0 0; color: var(--muted); }
.material-admin-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.material-admin-badges i { padding: 4px 8px; color: #465a70; background: #edf2f7; border-radius: 999px; font-size: 12px; font-style: normal; white-space: nowrap; }
.material-admin-badges .paid { color: #b41425; background: #fff0f1; }
.material-admin-badges .free { color: #17652e; background: #eaf8ef; }
.material-admin-row form { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.material-admin-row textarea { width: 100%; resize: vertical; }
.material-admin-row form small { color: var(--muted); }

@media (max-width: 795px) {
  body { padding-bottom: 72px; background: #eef2f6; }
  .topbar { border-bottom-width: 1px; }
  .site-shell, .page-shell { background: #f2f5f8; }
  .site-shell { padding: 8px 0 12px; }
  .logo { border: 0; }
  .mobile-account { padding: 0 13px; }
  .live-draw { min-height: 54px; margin: 0 7px 8px; grid-template-columns: 53px 1fr 38px; border-radius: 10px; }
  .live-balls { padding: 4px 2px; gap: 0; }
  .live-ball { grid-template-rows: 28px 15px; }
  .live-ball b { width: 26px; height: 26px; border-width: 1px; font-size: 11px; }
  .live-ball span { font-size: 9px; }
  .live-ball.special-ball { margin: -1px 0; border-radius: 7px; }
  .reference-hero { margin: 0 7px 8px; border-radius: 10px; }
  .prediction-board { margin: 0 7px 8px; border-radius: 10px; }
  .prediction-board > h2 { padding: 9px 4px; font-size: 17px; letter-spacing: 0; }
  .prediction-board .draw-row { min-height: 42px; padding: 5px 4px; grid-template-columns: 42px minmax(0,1fr) minmax(0,1fr) 67px; gap: 1px; font-size: 10px; }
  .prediction-board .draw-row b { min-width: 0; text-align: center; }
  .prediction-board .draw-row span { min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; }
  .prediction-board > p { font-size: 11px; }
  .notice { margin: 8px 7px; border-radius: 9px; font-size: 13px; box-shadow: 0 5px 14px rgba(23,53,85,.07); }
  .notice b { padding: 8px 10px; }
  .promo-banner { width: calc(100% - 14px); min-height: 0; margin: 0 7px 8px; border-radius: 10px; }
  .festival-notice { margin: 0 7px 8px; border-radius: 11px; }
  .yellow-notice { margin: 0 7px 7px; border-radius: 10px; }
  .notice-strip { margin: 6px 7px; padding: 9px 10px; border-left-width: 4px; border-radius: 9px; }
  .forum-panel { margin: 10px 7px 0; border-radius: 11px; }
  .forum-panel > header { padding: 11px; }
  .post-row { min-height: 76px; padding: 11px 9px; }
  .page-shell { padding: 12px; }
  .page-title { padding-bottom: 14px; }
  .page-title h1 { font-size: 24px; }
  .card { margin: 13px 0; padding: 16px; border-radius: 11px; }
  .admin-nav { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .mobile-nav { height: 66px; padding: 5px 4px max(5px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); border-top: 1px solid rgba(13,55,104,.12); box-shadow: 0 -8px 25px rgba(16,43,72,.12); backdrop-filter: blur(14px); }
  .mobile-nav a { color: #5c6e82; border-radius: 9px; }
  .mobile-nav a:first-child { color: #c51f31; background: #fff3f2; }
  .mobile-nav .mobile-symbol { background: linear-gradient(145deg,#d6323f,#a91429); box-shadow: 0 3px 8px rgba(169,20,41,.2); }
  body > footer { padding: 20px 14px 16px; font-size: 12px; }
  .material-list { margin: 8px 7px; gap: 7px; }
  .material-row { min-height: 52px; padding: 10px 9px; gap: 8px; border-radius: 9px; font-size: clamp(17px,5.2vw,22px); }
  .featured-board { margin: 10px 7px 0; border-radius: 10px; }
  .featured-issue { border-bottom-width: 4px; }
  .featured-issue h2 { padding: 7px 5px; font-size: 16px; }
  .featured-issue h2 span { display: inline; margin-left: 4px; }
  .featured-line { min-height: 47px; grid-template-columns: 24% 48% 28%; font-size: 13px; }
  .featured-line > * { padding: 6px 3px; }
  .featured-line strong { letter-spacing: .08em; }
  .annual-chart { margin: 10px 7px 0; border-radius: 10px; }
  .annual-chart > header { padding: 9px 10px; }
  .annual-chart header small { display: none; }
  .annual-chart header h2 { font-size: 17px; }
  .annual-chart header > a { padding: 6px 9px; font-size: 12px; }
  .annual-chart-scroll { padding: 5px; }
  .annual-chart img { width: 760px; max-width: none; }
  .annual-chart > p { padding: 7px 6px; font-size: 11px; }
  .material-meta { padding: 0; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .material-answer { padding: 13px 11px; }
  .material-answer header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .material-answer .answer-value { padding: 10px; font-size: 19px; }
  .material-admin-toolbar { align-items: stretch; }
  .material-admin-toolbar > div { flex-basis: 100%; }
  .material-admin-toolbar form { flex: 1; }
  .material-admin-toolbar form button { width: 100%; }
  .material-admin-row > header { flex-direction: column; }
  .material-admin-badges { justify-content: flex-start; }
  .material-admin-row form { grid-template-columns: 1fr; }
}

/* 2111777 original presentation assets */
.logo { background: #041936; }
.logo img { object-fit: contain; }
.brand-promo { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 14px 0; padding: 24px 30px; color: #fff0c5; background: radial-gradient(ellipse at top right, #1c5075, transparent 70%), #092746; border: 1px solid #d3b775; border-radius: 14px; box-shadow: 0 8px 22px rgba(13,43,75,.09); }
.brand-promo small { display: block; margin-bottom: 6px; color: #ddbf7d; font-size: 14px; letter-spacing: 3px; }
.brand-promo strong { font-size: clamp(18px, 2.8vw, 28px); }
.brand-promo > b { font-size: clamp(22px, 3.5vw, 34px); text-align: right; }
.brand-promo > b > span { display: block; margin-top: 7px; color: #dce7f1; font-size: 13px; font-weight: 400; }
.featured-issue h2, .featured-issue.is-pending h2 { color: #ffe6a8; background: linear-gradient(115deg, #0a2949, #195880); border-color: #d7b65d; text-shadow: none; }
.featured-issue h2 span { color: #e1eaf4; font-size: .8em; font-weight: 500; }
@media (max-width: 700px) {
  .brand-promo { padding: 16px 14px; gap: 8px; margin: 10px 0; }
  .brand-promo small { font-size: 11px; letter-spacing: 1px; }
  .brand-promo strong { font-size: 16px; }
  .brand-promo > b { font-size: 20px; }
  .brand-promo > b > span { max-width: 150px; font-size: 10px; }
  .mobile-nav a:first-child { color: #173e65; background: #edf2f8; }
  .featured-issue h2 span { display: block; margin: 4px 0 0; }
}

/* Decorative CSS motion: no JavaScript, no interaction or data changes. */
.logo, .brand-hero, .brand-promo, .prediction-board > h2,
.featured-issue:first-child > h2 { position: relative; overflow: hidden; isolation: isolate; }
.logo::after, .brand-hero::before, .brand-promo::after,
.prediction-board > h2::after, .featured-issue:first-child > h2::after {
  content: ""; position: absolute; z-index: 2; inset: -30% auto -30% -65%; width: 38%;
  background: linear-gradient(105deg, transparent 10%, rgba(255,226,152,.04) 35%, rgba(255,246,207,.3) 50%, rgba(255,226,152,.06) 65%, transparent 90%);
  pointer-events: none; transform: translateX(0) skewX(-12deg); animation: brand-sweep 8s ease-in-out infinite;
}
.logo::after { animation-duration: 10s; animation-delay: -3s; opacity: .7; }
.brand-promo::after { animation-delay: -4s; }
.prediction-board > h2::after, .featured-issue:first-child > h2::after { opacity: .45; animation-duration: 12s; animation-delay: -6s; }
.brand-hero::after {
  content: ""; position: absolute; z-index: 1; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse at 83% 30%, rgba(255,220,129,.16), transparent 28%), radial-gradient(ellipse at 22% 68%, rgba(255,228,164,.10), transparent 35%);
  box-shadow: inset 0 0 0 1px rgba(245,209,127,.55), inset 0 0 18px rgba(233,183,80,.13);
  animation: brand-glow 5s ease-in-out infinite alternate;
}
.brand-sparkles { position: absolute; z-index: 3; inset: 0; pointer-events: none; overflow: hidden; }
.brand-sparkles i {
  --delay: 0s; --duration: 6s; position: absolute; left: 8%; top: 74%; display: block; width: 5px; height: 5px;
  color: #fff0b7; background: currentColor; border-radius: 50%; box-shadow: 0 0 7px 2px rgba(255,215,126,.6);
  opacity: 0; animation: brand-float var(--duration) ease-in-out var(--delay) infinite;
}
.brand-sparkles i::before, .brand-sparkles i::after { content: ""; position: absolute; background: currentColor; border-radius: 50%; inset: -4px 2px; }
.brand-sparkles i::after { inset: 2px -4px; }
.brand-sparkles i:nth-child(2) { left: 20%; top: 35%; --delay: -2s; --duration: 7s; }
.brand-sparkles i:nth-child(3) { left: 39%; top: 55%; --delay: -4s; }
.brand-sparkles i:nth-child(4) { left: 58%; top: 26%; --delay: -1s; --duration: 8s; }
.brand-sparkles i:nth-child(5) { left: 72%; top: 68%; --delay: -3s; --duration: 7s; }
.brand-sparkles i:nth-child(6) { left: 85%; top: 38%; --delay: -5s; }
.brand-sparkles i:nth-child(7) { left: 93%; top: 78%; --delay: -2s; --duration: 8s; }
.brand-sparkles i:nth-child(8) { left: 64%; top: 88%; --delay: -6s; --duration: 9s; }
@keyframes brand-sweep { 0%, 55% { transform: translateX(0) skewX(-12deg); } 90%, 100% { transform: translateX(480%) skewX(-12deg); } }
@keyframes brand-glow { from { opacity: .35; } to { opacity: 1; } }
@keyframes brand-float { 0%, 100% { opacity: 0; transform: translateY(12px) scale(.4); } 25% { opacity: .8; } 55% { opacity: .3; } 75% { opacity: .9; } 90% { opacity: 0; transform: translateY(-30px) scale(1); } }
@media (max-width: 700px) { .brand-sparkles i { width: 3px; height: 3px; } .brand-sparkles i::before, .brand-sparkles i::after { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .logo::after, .brand-hero::before, .brand-hero::after, .brand-promo::after,
  .prediction-board > h2::after, .featured-issue:first-child > h2::after, .brand-sparkles i { animation: none; }
  .brand-sparkles, .logo::after, .brand-hero::before, .brand-promo::after,
  .prediction-board > h2::after, .featured-issue:first-child > h2::after { display: none; }
}
