:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fff7f7;
  --surface-strong: #171014;
  --text: #241a1d;
  --muted: #796c70;
  --muted-light: #a9989d;
  --line: #eadfe1;
  --line-strong: #dcc8cc;
  --red: #d71920;
  --red-deep: #8f0f1d;
  --red-dark: #5d0a15;
  --red-soft: #fff0f1;
  --gold: #bb842e;
  --blue: #2874d0;
  --green: #178b63;
  --shadow-sm: 0 8px 24px rgba(61, 18, 27, 0.06);
  --shadow-md: 0 20px 50px rgba(61, 18, 27, 0.1);
  --shadow-lg: 0 34px 80px rgba(48, 9, 18, 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --page: 1320px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% 4%, rgba(215, 25, 32, 0.08), transparent 24rem),
    linear-gradient(180deg, #fff 0, var(--bg) 42rem);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
}

.ambient-a {
  top: -15rem;
  right: -10rem;
  background: var(--red);
}

.ambient-b {
  bottom: -20rem;
  left: -15rem;
  background: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 68px);
  border-bottom: 1px solid rgba(143, 15, 29, 0.09);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 5px 24px rgba(54, 15, 23, 0.035);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand strong {
  overflow: hidden;
  color: #2b171c;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 2px;
  color: #9a777f;
  font-size: 8px;
  letter-spacing: 0.17em;
  white-space: nowrap;
}

.brand-mark {
  display: grid !important;
  flex: none;
  width: 34px;
  height: 34px;
  grid-template-columns: repeat(3, 6px);
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  box-shadow: 0 8px 20px rgba(215, 25, 32, 0.24);
}

.brand-mark i {
  display: block;
  border-radius: 3px 3px 1px 1px;
  background: #fff;
}

.brand-mark i:nth-child(1) {
  height: 7px;
  opacity: 0.7;
}

.brand-mark i:nth-child(2) {
  height: 16px;
}

.brand-mark i:nth-child(3) {
  height: 11px;
  opacity: 0.85;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #77676b;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--red-soft);
  color: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.beta-pill {
  color: #867277;
  font-size: 12px;
  white-space: nowrap;
}

.beta-pill i,
.live-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 139, 99, 0.09);
}

.account-btn {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--red);
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(215, 25, 32, 0.16);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  max-width: calc(var(--page) + 80px);
  min-height: 610px;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
  margin: 24px auto 0;
  padding: 72px clamp(36px, 5vw, 78px);
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.1), transparent 18rem),
    linear-gradient(132deg, #7d0c19 0%, #b31220 52%, #e2262d 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 85%);
}

.eyebrow {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.eyebrow span {
  display: inline-block;
  margin-right: 9px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: #fff0c8;
  font-style: normal;
}

.hero-copy > p {
  max-width: 650px;
  margin: 28px 0 32px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 23px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  border: 0;
  background: #fff;
  color: var(--red-deep);
  box-shadow: 0 16px 30px rgba(63, 6, 14, 0.2);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 36px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-row b {
  color: #ffd88a;
  font-size: 10px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.radar-card {
  position: relative;
  width: min(500px, 100%);
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: rgba(73, 5, 15, 0.46);
  box-shadow: 0 30px 70px rgba(65, 5, 15, 0.28);
  backdrop-filter: blur(16px);
}

.radar-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.08), transparent 65%);
  content: "";
  transform: translateX(-100%);
  animation: glint 6s infinite;
}

.radar-head {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.radar-head b {
  color: #fff0c8;
}

.radar-head b i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd474;
  box-shadow: 0 0 10px #ffd474;
}

.radar {
  position: relative;
  height: 310px;
  display: grid;
  place-items: center;
}

.radar-grid {
  width: 265px;
  height: 265px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 43px, rgba(255, 255, 255, 0.12) 44px 45px),
    linear-gradient(90deg, transparent 49.7%, rgba(255, 255, 255, 0.12) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(255, 255, 255, 0.12) 50%, transparent 50.3%);
}

.scan {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 133px;
  height: 133px;
  background: conic-gradient(from 270deg, rgba(255, 217, 140, 0.24), transparent 35%);
  transform-origin: bottom left;
  animation: scan 5s linear infinite;
}

.radar-core {
  position: absolute;
  width: 86px;
  height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(89, 5, 17, 0.92);
  color: #fff0c8;
  font-size: 27px;
  font-weight: 900;
  box-shadow: 0 0 40px rgba(255, 221, 152, 0.12);
}

.radar-core small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 500;
}

.signal {
  position: absolute;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
}

.signal::before {
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid #ffd980;
  border-radius: 50%;
  box-shadow: 0 0 14px #ffd980;
  content: "";
}

.signal span {
  position: absolute;
  white-space: nowrap;
}

.s1 {
  top: 29%;
  left: 25%;
}

.s1 span,
.s3 span {
  top: -2px;
  right: 14px;
}

.s2 {
  top: 44%;
  right: 19%;
}

.s2 span {
  top: -2px;
  left: 14px;
}

.s3 {
  bottom: 20%;
  left: 29%;
}

.signal-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.signal-bars span {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 13px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.signal-bars span::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: var(--v);
  height: 2px;
  background: #ffd474;
  content: "";
}

.signal-bars i {
  color: rgba(255, 255, 255, 0.62);
  font-style: normal;
}

.portal-wrap,
.workspace-shell {
  max-width: var(--page);
  margin: auto;
  padding: 72px clamp(20px, 4vw, 52px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading span,
.card-head > div > span {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.section-heading h2 {
  margin: 8px 0 0;
  color: #301c21;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portal {
  --portal: var(--red);
  position: relative;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--portal);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: 0.22s ease;
}

.portal::before {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  filter: blur(58px);
  opacity: 0.07;
}

.portal:hover,
.portal.active {
  border-color: color-mix(in srgb, var(--portal), #fff 55%);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.portal.welfare {
  --portal: var(--red);
}

.portal.sports {
  --portal: var(--blue);
}

.portal.worldcup {
  --portal: var(--gold);
}

.portal-number {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.6;
}

.portal-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--portal);
  color: #fff;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--portal), transparent 76%);
}

.portal-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.portal-copy strong {
  color: #321d22;
  font-size: 21px;
}

.portal-copy small {
  color: var(--muted);
}

.portal-arrow {
  font-size: 12px;
  font-weight: 800;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 20px;
  padding-top: 10px;
}

.game-sidebar,
.analysis-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.game-sidebar {
  position: sticky;
  top: 92px;
  height: max-content;
  padding: 18px;
}

.sidebar-title {
  display: flex;
  flex-direction: column;
  padding: 7px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-title span {
  color: #311d22;
  font-size: 18px;
  font-weight: 900;
}

.sidebar-title small {
  margin-top: 4px;
  color: var(--muted);
}

.game-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.game-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.game-item span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-item i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.game-item small {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 9px;
}

.game-item:hover,
.game-item.active {
  border-color: #f1c8cd;
  background: var(--red-soft);
  color: var(--red-deep);
}

.game-item[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.side-note {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #efdcb7;
  border-radius: 12px;
  background: #fffbf2;
}

.side-note i {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.side-note p {
  margin: 0;
  color: #8b7758;
  font-size: 10px;
  line-height: 1.7;
}

.analysis-panel {
  min-width: 0;
  padding: 24px;
}

.analysis-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.live-status {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.analysis-toolbar h2 {
  margin: 7px 0 0;
  color: #2e1a20;
  font-size: 25px;
}

.analysis-toolbar h2 small {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.toolbar-actions label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.toolbar-actions select,
.icon-btn {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: #38252a;
}

.icon-btn {
  width: 42px;
  font-size: 19px;
}

.loading-state {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.loader {
  display: flex;
  gap: 7px;
}

.loader i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.2s infinite;
}

.loader i:nth-child(2) {
  animation-delay: 0.15s;
}

.loader i:nth-child(3) {
  animation-delay: 0.3s;
}

.latest-strip {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 19px 20px;
  border: 1px solid #f1c9cd;
  border-radius: 17px;
  background: linear-gradient(100deg, var(--red-soft), #fff);
}

.latest-strip > div:first-child {
  display: flex;
  flex-direction: column;
}

.latest-strip span,
.metrics-grid span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.latest-strip strong {
  margin: 3px 0;
  color: #321c21;
  font-size: 18px;
}

.latest-strip small {
  color: var(--muted);
}

.ball-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ball {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ball), color-mix(in srgb, var(--ball), #000 24%));
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 7px 14px color-mix(in srgb, var(--ball), transparent 75%);
}

.ball.bonus {
  --ball: var(--blue) !important;
}

.source-badge {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.source-badge a {
  margin-top: 4px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.metrics-grid article {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.metrics-grid strong {
  overflow-wrap: anywhere;
  margin: 7px 0 2px;
  color: #2d1a1f;
  font-size: 25px;
}

.metrics-grid small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.metrics-grid .probability {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 14px;
}

.glass-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-head h3 {
  margin: 4px 0;
  color: #321e23;
  font-size: 17px;
}

.card-head p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.card-head > small,
.legend {
  color: var(--muted);
  font-size: 9px;
}

.legend i {
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 5px;
  background: var(--red);
  vertical-align: middle;
}

.chart-wrap {
  position: relative;
  height: 280px;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: absolute;
  display: none;
  padding: 7px 9px;
  border: 1px solid #e8b9be;
  border-radius: 7px;
  background: #fff;
  color: #321e23;
  font-size: 10px;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.position-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  overflow: auto;
  scrollbar-width: none;
}

.position-tabs::-webkit-scrollbar {
  display: none;
}

.position-tabs button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.position-tabs button.active {
  border-color: #ecb5bb;
  background: var(--red-soft);
  color: var(--red);
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.heat-cell {
  min-width: 0;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--red) calc(var(--heat) * 0.38), #f0dfe1);
  border-radius: 10px;
  background: color-mix(in srgb, var(--red) calc(var(--heat) * 0.8), #fff);
  color: #fff;
}

.heat-cell b {
  font-size: 15px;
}

.heat-cell small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-legend {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 8px;
}

.heat-legend i {
  width: 80px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fbe6e8, var(--red));
}

.candidate-card {
  margin-top: 14px;
}

.save-btn {
  min-height: 42px;
  flex: none;
  padding: 0 13px;
  border: 1px solid #e9b7bc;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

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

.candidate {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.candidate:first-child {
  border-color: #e8aab1;
  background: var(--red-soft);
}

.candidate > span {
  color: var(--muted);
  font-size: 8px;
}

.candidate strong {
  display: block;
  margin: 10px 0 8px;
  color: #351e24;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.candidate footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 9px;
}

.candidate footer b {
  color: var(--red);
}

.lower {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  margin-top: 14px;
}

.draw-table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 10px;
  overscroll-behavior: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 11px 9px;
  border-bottom: 1px solid #f1e9ea;
  color: #5f5054;
  white-space: nowrap;
}

.table-balls {
  display: flex;
  gap: 4px;
}

.table-ball {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.table-ball.bonus {
  background: #edf5ff;
  color: var(--blue);
}

.audit-card ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-card li {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid #f1e9ea;
}

.audit-card b {
  color: #3b272c;
  font-size: 11px;
}

.audit-card li span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.responsible {
  margin-top: 15px;
  padding: 12px;
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: #fffbf2;
  color: #887451;
  font-size: 9px;
  line-height: 1.8;
}

body > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(24px, 6vw, 90px);
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}

.footer-brand {
  transform: scale(0.9);
  transform-origin: left;
}

body > footer > div {
  display: flex;
  gap: 18px;
}

body > footer a {
  color: var(--red);
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 10, 17, 0.58);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 32px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(44, 9, 17, 0.3);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
}

.auth-card h2 {
  margin: 24px 0 6px;
  color: #301c21;
  font-size: 27px;
}

.auth-card > p {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 12px;
}

.auth-card form {
  display: grid;
  gap: 13px;
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.auth-card input {
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.auth-card input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.08);
}

.adult-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.adult-check input {
  width: 17px;
  height: 17px;
  flex: none;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  background: var(--red);
  color: #fff;
}

.auth-switch {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 11px;
}

.form-error {
  min-height: 15px;
  color: var(--red);
  font-size: 10px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: 30px;
  left: 50%;
  padding: 11px 18px;
  border-radius: 11px;
  background: #32181f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  box-shadow: var(--shadow-md);
  transform: translate(-50%, 30px);
  transition: 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: scale(0.5);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scan {
  to {
    transform: rotate(360deg);
  }
}

@keyframes glint {
  45%,
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    margin-inline: 18px;
  }

  .hero-visual {
    display: none;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .game-sidebar {
    position: static;
  }

  .game-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .side-note {
    display: none;
  }

  .dashboard-grid,
  .lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
    background: var(--bg);
  }

  .site-header {
    height: 64px;
    padding: 0 15px;
    backdrop-filter: none;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
    padding-block: 7px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    display: none;
  }

  .header-actions .beta-pill {
    display: none;
  }

  .account-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 11px;
  }

  .desktop-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(58, 15, 24, 0.08);
    backdrop-filter: blur(18px);
  }

  .nav-link {
    min-width: 0;
    min-height: 48px;
    padding: 0 4px;
    border-radius: 10px;
    font-size: 12px;
  }

  .hero {
    min-height: auto;
    margin: 12px 10px 0;
    padding: 42px 18px 36px;
    border-radius: 24px;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 10px;
  }

  .hero h1 {
    max-width: 22rem;
    font-size: clamp(33px, 9vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.05em;
  }

  .hero-copy > p {
    margin: 22px 0 24px;
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 48px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .trust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-top: 26px;
    font-size: 10px;
  }

  .portal-wrap,
  .workspace-shell {
    padding: 44px 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .section-heading p {
    font-size: 12px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .portal {
    min-height: 118px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    justify-content: initial;
    gap: 14px;
    padding: 18px;
    border-radius: 17px;
  }

  .portal-number {
    top: 12px;
    right: 14px;
  }

  .portal-copy strong {
    font-size: 18px;
  }

  .portal-copy small {
    font-size: 11px;
    line-height: 1.45;
  }

  .portal-arrow {
    max-width: 44px;
    font-size: 0;
    text-align: right;
  }

  .portal-arrow::after {
    font-size: 20px;
    content: "→";
  }

  .workspace-shell {
    padding-top: 0;
  }

  .game-sidebar,
  .analysis-panel {
    border-radius: 19px;
  }

  .game-sidebar {
    padding: 14px;
  }

  .sidebar-title {
    padding: 4px 5px 13px;
  }

  .game-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .game-item {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
  }

  .game-item span {
    min-width: 0;
    gap: 7px;
    font-size: 13px;
  }

  .game-item small {
    flex: none;
  }

  .analysis-panel {
    padding: 15px;
  }

  .analysis-toolbar {
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 17px;
  }

  .analysis-toolbar h2 {
    font-size: 22px;
  }

  .analysis-toolbar h2 small {
    display: block;
    margin: 3px 0 0;
  }

  .toolbar-actions {
    flex: none;
  }

  .toolbar-actions select {
    max-width: 88px;
  }

  .latest-strip {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 17px;
  }

  .source-badge {
    text-align: left;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .metrics-grid article {
    min-height: 112px;
    padding: 14px;
  }

  .metrics-grid article:last-child {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .metrics-grid strong {
    font-size: 23px;
  }

  .glass-card {
    padding: 16px;
  }

  .card-head {
    gap: 9px;
  }

  .chart-wrap {
    height: 225px;
  }

  .heat-grid {
    gap: 5px;
  }

  .heat-cell {
    border-radius: 8px;
  }

  .heat-cell b {
    font-size: 14px;
  }

  .candidate-card .card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .save-btn {
    width: 100%;
  }

  .candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .candidate {
    min-height: 116px;
    padding: 13px;
  }

  .candidate strong {
    font-size: 14px;
    line-height: 1.4;
  }

  .draw-table-wrap {
    position: relative;
    max-height: 370px;
    border: 1px solid var(--line);
  }

  table {
    min-width: 520px;
  }

  .audit-card li {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  body > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 28px 20px;
  }

  .footer-brand {
    display: none;
  }

  body > footer > div {
    flex-wrap: wrap;
  }

  .auth-card {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
    padding: 24px 20px;
    border-radius: 20px;
  }

  .toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
    max-width: calc(100% - 32px);
    text-align: center;
  }
}

@media (max-width: 350px) {
  .hero h1 {
    font-size: 34px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .candidate-grid {
    grid-template-columns: 1fr;
  }

  .analysis-toolbar {
    flex-direction: column;
  }

  .toolbar-actions,
  .toolbar-actions label,
  .toolbar-actions select {
    width: 100%;
  }

  .icon-btn {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
