/* SANTOKER 抽号 —— 红 / 黑 / 白，移动优先。黑底白字红号码，不用背景图。 */
:root {
  --red: #d81f26;
  --red-dark: #a3131a;
  --black: #0d0d0d;
  --grey: #8a8a8a;
  --white: #ffffff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC",
               "Noto Sans Thai", "Microsoft YaHei", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 18px 32px;
}
/* 测试模式角标，SANTOKER_MODE=test 时才渲染 */
.testflag {
  position: fixed; top: 0; right: 0; z-index: 20;
  background: var(--red); color: var(--white);
  font-size: 11px; font-weight: 800; letter-spacing: .18em;
  padding: 6px 12px; border-bottom-left-radius: 10px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
}
/* hidden 属性要能压过下面的 display 规则（logo 缺失时的降级切换靠它） */
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 480px; }
header { text-align: center; margin-bottom: 26px; }
/* 品牌 logo 底板：白色圆角牌子。主 logo 现在是白底图，放在黑底上会出现白方块，
   所以统一给它一块有意设计的白色牌子；将来换成透明底 PNG 也依然成立。 */
.logo-plate {
  display: inline-block; max-width: 100%;
  background: var(--white); border-radius: 18px;
  padding: 14px 20px; margin: 0 0 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  line-height: 0;
}
.logo { display: block; max-width: 100%; width: auto; height: auto; }
.logo-brand { max-height: 64px; }
@media (min-width: 480px) { .logo-brand { max-height: 84px; } }
.logo-partner { max-height: 26px; margin: 0 auto 6px; }
.brand {
  font-size: 34px; font-weight: 800; letter-spacing: 0.22em;
  color: var(--white); margin: 0 0 10px;
}
.brand span { color: var(--red); }
.event { font-size: 13px; letter-spacing: 0.12em; color: var(--white); opacity: .85; margin: 2px 0; }
.cup {
  display: inline-block; margin-top: 10px; padding: 5px 12px;
  border: 1px solid var(--red); color: var(--red);
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
}
.card {
  background: #151515; border: 1px solid #262626; border-radius: 14px;
  padding: 22px 18px; margin-bottom: 18px;
}
label { display: block; font-size: 13px; letter-spacing: .08em; color: var(--grey); margin-bottom: 8px; }
input[type=text], input[type=password] {
  width: 100%; padding: 15px 14px; font-size: 18px;
  background: var(--white); color: var(--black);
  border: 2px solid var(--white); border-radius: 10px;
}
input:focus { outline: none; border-color: var(--red); }
button {
  width: 100%; margin-top: 14px; padding: 16px;
  font-size: 18px; font-weight: 800; letter-spacing: .1em;
  color: var(--white); background: var(--red);
  border: none; border-radius: 10px; cursor: pointer;
}
button:active { background: var(--red-dark); }
button[disabled] { background: #4a4a4a; cursor: default; }
button.ghost { background: transparent; border: 1px solid var(--grey); color: var(--white); font-weight: 600; }
.hint { font-size: 12px; color: var(--grey); margin-top: 12px; line-height: 1.6; }
.number {
  font-size: 44vw; line-height: 1; font-weight: 900; color: var(--red);
  text-align: center; margin: 6px 0 10px; letter-spacing: -0.03em;
}
@media (min-width: 480px) { .number { font-size: 210px; } }
.result-name { text-align: center; font-size: 20px; font-weight: 700; word-break: break-word; }
.result-meta { text-align: center; font-size: 12px; color: var(--grey); margin-top: 8px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.badge-dup { background: var(--red); color: var(--white); }
.msg { margin-top: 14px; padding: 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.msg-err { background: #2a1113; border: 1px solid var(--red); color: #ffb3b6; }
.msg-ok { background: #10240f; border: 1px solid #2f7d32; color: #b9f0ba; }
footer { margin-top: 26px; text-align: center; font-size: 11px; color: var(--grey); letter-spacing: .1em; }
footer .partner { color: var(--white); font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 6px; text-align: left; border-bottom: 1px solid #262626; }
th { color: var(--grey); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
td.num { color: var(--red); font-weight: 800; font-size: 18px; width: 54px; }
.stats { display: flex; gap: 10px; margin-bottom: 14px; }
.stat { flex: 1; background: #151515; border: 1px solid #262626; border-radius: 10px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--red); }
.stat span { font-size: 11px; color: var(--grey); letter-spacing: .08em; }
.hidden { display: none; }
