/* UI refresh: calmer surfaces, clearer hierarchy, stronger mobile layout. */
:root {
  --bg: #f4f7fb;
  --page-bg: #f4f7fb;
  --panel: #ffffff;
  --card: #ffffff;
  --primary: #2f6bff;
  --primary-strong: #2358d8;
  --accent: #68a4ff;
  --text: #101828;
  --muted: #667085;
  --line: #e4eaf2;
  --success: #12a06a;
  --warning: #dc7b14;
  --danger: #e54861;
  --shadow: 0 14px 36px rgba(16, 24, 40, 0.08);
  --soft-shadow: 0 7px 20px rgba(16, 24, 40, 0.06);
}

body {
  background: #f4f7fb;
}

body::before {
  opacity: 1;
  background:
    radial-gradient(760px 420px at 8% -8%, rgba(47, 107, 255, 0.12), transparent 66%),
    radial-gradient(620px 360px at 96% 0%, rgba(91, 181, 255, 0.1), transparent 64%),
    linear-gradient(180deg, #f7f9fc 0%, #f3f6fa 100%);
}

.page-shell canvas#bg-particles { opacity: 0.24; }
.page-shell .wm { opacity: 0.018; }

.page-shell header {
  width: min(1180px, calc(100% - 28px));
  margin: 14px auto 10px;
  border: 1px solid #e4eaf2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
  backdrop-filter: blur(18px);
}

.page-shell header::before { display: none; }
.page-shell .nav { min-height: 62px; padding: 9px 20px; }
.page-shell .brand-logo { max-width: 196px; height: 42px; filter: none; transition: opacity .18s ease; }
/* The compiled shell still creates a historical build-time image before the
   tenant configuration arrives. Never paint that placeholder. */
.page-shell .brand-logo[src*="/reference-assets/ng50-logo"] { visibility: hidden; opacity: 0; }
.page-shell .brand-logo.is-configured { visibility: visible; opacity: 1; }

.page-shell .carousel {
  max-width: 1180px;
  margin: 0 auto 10px;
  padding: 0;
}

.page-shell .carousel-wrap {
  border: 1px solid #e4eaf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.09);
  backdrop-filter: none;
}

.page-shell .carousel:has(.slides:empty) { display: none; }

.page-shell .slide {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  background-color: #e9eef5;
  background-position: center;
  background-size: 0 0;
  background-repeat: no-repeat;
}

.page-shell .slide::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  display: block;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(18px) saturate(.88);
  opacity: .46;
  transform: scale(1.04);
  pointer-events: none;
}

.page-shell .slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(10, 22, 42, .1), transparent 24% 76%, rgba(10, 22, 42, .1));
  pointer-events: none;
}

.page-shell .slide img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

/* Desktop banners use the standard 16:9 canvas and show the complete uploaded
   artwork. Images are never stretched or cropped. */
@media (min-width: 901px) {
  .page-shell .carousel-wrap { aspect-ratio: var(--ng-banner-ratio, 16 / 9); }
  .page-shell .slides { height: 100%; }
  .page-shell .slide { height: 100%; aspect-ratio: auto; }
  .page-shell .slide img { object-fit: contain; }
}

.page-shell .dots { bottom: 14px; }
.page-shell .dot { width: 7px; height: 7px; border: 0; background: rgba(255, 255, 255, 0.7); }
.page-shell .dot.active { width: 24px; border-radius: 99px; background: #fff; box-shadow: none; transform: none; }

.page-shell .section,
.page-shell .site-footer { max-width: 1180px; }

.page-shell .notice-section { margin-top: 8px; }
.page-shell .marquee-wrap {
  position: relative;
  isolation: isolate;
  min-height: 40px;
  padding: 7px 14px 7px 82px;
  border: 1px solid #dce7fb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.page-shell .marquee-wrap::before {
  content: "公告";
  position: absolute;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #2358d8;
  font-size: 12px;
  font-weight: 800;
}

.page-shell .marquee {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-left: 0;
  white-space: nowrap;
  animation: none;
  transform: none;
}
.page-shell .marquee-text {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  overflow: visible;
  color: #475467;
  font-weight: 650;
  text-overflow: clip;
  text-shadow: none;
  white-space: nowrap;
  animation: noticeTextScroll 13s linear infinite;
  will-change: transform;
}
.page-shell .marquee-wrap:hover .marquee-text { animation-play-state: paused; }

@keyframes noticeTextScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.page-shell .nav-section { margin-top: 10px; }
.page-shell .category-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.page-shell .category-button {
  min-height: 44px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #344054;
  box-shadow: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.page-shell .category-button:hover { border-color: #9bb9ff; color: #2358d8; transform: translateY(-1px); }
.page-shell .category-button.active {
  border-color: #2f6bff;
  background: #2f6bff;
  color: #fff;
  box-shadow: 0 7px 18px rgba(47, 107, 255, 0.2);
}
.page-shell .category-button.fixed-primary-category,
.page-shell .category-button[data-fixed-category="trial"],
.page-shell .category-button[data-fixed-category="lottery"] { grid-column: span 2; min-height: 50px; font-size: 16px; }

.page-shell .pk16-category-title {
  justify-content: flex-start;
  margin: 28px 0 18px;
  padding: 0 0 0 15px;
  font-size: clamp(24px, 3vw, 30px);
  text-align: left;
}

.page-shell .pk16-category-title::before {
  top: 50%;
  left: 0;
  width: 4px;
  height: 30px;
  background: #2f6bff;
  box-shadow: none;
  transform: translateY(-50%);
}

.page-shell .pk16-category-title::after { display: none; }
.page-shell .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.page-shell .trial-featured,
.page-shell .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.page-shell .game-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-color: #e5eaf1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(16, 24, 40, 0.05);
  backdrop-filter: none;
}
.page-shell .game-card img { width: 58px; height: 58px; border-radius: 12px; }
.page-shell .game-card button { min-height: 34px; border-radius: 9px; box-shadow: none; }
.page-shell .card {
  grid-template-columns: 62px minmax(0, 1fr) 90px;
  grid-template-areas: "avatar meta cta";
  gap: 13px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px solid #e5eaf1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.055);
  backdrop-filter: none;
}

.page-shell .card:hover {
  border-color: #bed0ff;
  box-shadow: 0 14px 34px rgba(47, 107, 255, 0.11);
  transform: translateY(-3px);
}

.page-shell .avatar {
  width: 62px;
  height: 62px;
  border: 1px solid #e4eaf2;
  background: #f5f7fa;
  box-shadow: none;
}

.page-shell .title { font-size: 17px; font-weight: 800; }
.page-shell .desc { margin-top: 5px; color: #667085; font-size: 13px; }
.page-shell .rating { margin-top: 7px; }
.page-shell .stars { color: #f5a524; filter: none; }
.page-shell .score { color: #98a2b3; font-size: 12px; }
.page-shell .go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #b9ccff;
  border-radius: 10px;
  background: #f4f7ff;
  color: #2358d8;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}

.page-shell .go:hover { border-color: #2f6bff; background: #2f6bff; color: #fff; }
.page-shell .go:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.22);
  outline-offset: 2px;
}
.page-shell .card-rec-badge { top: 8px; right: 8px; border-radius: 999px; box-shadow: none; }
.page-shell .rec-type-1 { background: #f79009; }
.page-shell .rec-type-2 { background: #2f6bff; }
.page-shell .brand-footer { padding: 18px 0; color: #98a2b3; }

body.trial-direct-mode .trial-page-head { grid-template-columns: minmax(0, 1fr); }
body.trial-direct-mode .trial-category-grid { display: none !important; }
body.trial-direct-mode .trial-page-head .ghost-action { display: none; }

.page-shell .trial-vendor-shell {
  position: relative;
  margin: -2px 0 18px;
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .065);
}

.page-shell .trial-vendor-shell::after {
  display: none;
}

.page-shell .trial-vendor-nav {
  display: flex !important;
  justify-content: flex-start !important;
  gap: 6px;
  overflow-x: auto;
  padding: 9px 10px 10px;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.page-shell .trial-vendor-nav::-webkit-scrollbar { display: none; }

.page-shell .trial-vendor-tab {
  --vendor-tint: #2f6bff;
  --vendor-soft: #edf3ff;
  display: inline-flex;
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 6px 11px 6px 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #667085;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.page-shell .trial-vendor-tab:nth-child(5n + 2) { --vendor-tint: #7c5ce7; --vendor-soft: #f1edff; }
.page-shell .trial-vendor-tab:nth-child(5n + 3) { --vendor-tint: #1677c8; --vendor-soft: #eaf6ff; }
.page-shell .trial-vendor-tab:nth-child(5n + 4) { --vendor-tint: #0c9b74; --vendor-soft: #e8f8f2; }
.page-shell .trial-vendor-tab:nth-child(5n + 5) { --vendor-tint: #e48a18; --vendor-soft: #fff5e5; }

.page-shell .trial-vendor-tab:hover {
  color: var(--vendor-tint);
  background: var(--vendor-soft);
  transform: translateY(-1px);
}

.page-shell .trial-vendor-tab.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(125deg, var(--vendor-tint), color-mix(in srgb, var(--vendor-tint) 68%, #78a9ff));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--vendor-tint) 24%, transparent);
}

.page-shell .trial-vendor-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  color: var(--vendor-tint);
  background: var(--vendor-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}

.page-shell .trial-vendor-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-shell .trial-vendor-tab.active .trial-vendor-icon {
  border-color: rgba(255, 255, 255, .24);
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

html[data-theme="dark"] body .page-shell .trial-vendor-shell {
  border-color: #2a3f5e;
  background: linear-gradient(180deg, #14233a, #101d30);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}
html[data-theme="dark"] body .page-shell .trial-vendor-tab { color: #9cafc8; }
html[data-theme="dark"] body .page-shell .trial-vendor-tab:hover { color: #fff; background: #182b48; }
html[data-theme="dark"] body .page-shell .trial-vendor-tab.active {
  border-color: #294a72;
  color: #fff;
  background: #193354;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 7px 18px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] body .page-shell .trial-vendor-icon {
  border-color: color-mix(in srgb, var(--vendor-tint) 18%, #dce9ff);
  color: var(--vendor-tint);
  background: var(--vendor-soft);
}
html[data-theme="dark"] body .page-shell .trial-vendor-tab.active .trial-vendor-icon {
  color: #fff;
  background: rgba(255, 255, 255, .13);
}

body.trial-game-open { overflow: hidden !important; }
.trial-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  color: #fff;
  background: #07101f;
}

.trial-game-toolbar {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 14px 8px;
  border-bottom: 1px solid rgba(150, 181, 231, .2);
  background: linear-gradient(90deg, #0b172a, #122540 60%, #0b172a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.trial-game-title { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 9px; min-width: 0; }
.trial-game-title strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.trial-game-title small { grid-column: 2; color: #93a9c8; font-size: 11px; }
.trial-game-status {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #26d59a;
  box-shadow: 0 0 0 5px rgba(38, 213, 154, .12), 0 0 18px rgba(38, 213, 154, .7);
  animation: trial-status-pulse 1.9s ease-in-out infinite;
}

.trial-game-close {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin-left: 12px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font-size: 0;
  line-height: 0;
  transition: background .18s ease, transform .18s ease;
}
.trial-game-close::before, .trial-game-close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 17px; height: 2px; border-radius: 999px; background: currentColor; pointer-events: none; transform-origin: center; }
.trial-game-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.trial-game-close::after { transform: translate(-50%,-50%) rotate(-45deg); }

.trial-game-close:hover { background: #e54861; transform: scale(1.04); }
.trial-game-stage { position: relative; min-height: 0; overflow: hidden; background: #02060d; }
.trial-game-stage iframe { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; background: #02060d; opacity: 0; }
.trial-game-stage iframe.loaded { opacity: 1; transition: opacity .25s ease; }
.trial-game-loading {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: #dce8fa;
  background: radial-gradient(circle at 50% 42%, #152e52 0, #081426 42%, #02060d 78%);
}
.trial-game-loading[hidden] { display: none; }
.trial-game-loading span {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border: 4px solid rgba(115, 159, 225, .22);
  border-top-color: #4c88ff;
  border-radius: 50%;
  animation: trial-game-spin .85s linear infinite;
}
.trial-game-loading strong { font-size: 19px; }
.trial-game-loading small { color: #8da3c2; font-size: 13px; }

@keyframes trial-game-spin { to { transform: rotate(360deg); } }
@keyframes trial-status-pulse { 50% { opacity: .55; transform: scale(.82); } }

body.lottery-inline-mode #cardsScroll { display: none; }
body.lottery-inline-mode .page-shell > .site-footer { display: none; }
.page-shell .lottery-inline-panel { margin-top: 0; padding-top: 0; }
.page-shell .lottery-inline-panel[hidden] { display: none; }
.page-shell .lottery-inline-frame-shell {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid #e3e9f1;
  border-radius: 18px;
  background: #f7f9fc;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
}
.page-shell .lottery-inline-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
  background: #f7f9fc;
}
.page-shell .lottery-inline-loading[hidden] { display: none; }
.page-shell .lottery-inline-frame {
  display: block;
  width: 100%;
  min-height: 180px;
  border: 0;
  opacity: 0;
  background: transparent;
  transition: opacity 180ms ease;
}
.page-shell .lottery-inline-frame.is-ready { min-height: 0; opacity: 1; }

.page-shell .service-float-btn {
  right: 22px;
  bottom: 24px;
  display: flex;
  width: 112px;
  height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #2f6bff;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.26);
}

.page-shell .service-float-btn[hidden] { display: none !important; }

.page-shell .service-float-btn::after { content: "在线客服"; font-size: 13px; font-weight: 800; white-space: nowrap; }
.page-shell .service-float-btn span {
  position: relative;
  display: block;
  width: 23px;
  height: 19px;
  flex: 0 0 23px;
  overflow: visible;
  border: 2px solid currentColor;
  border-radius: 7px;
  color: #fff;
  font-size: 0;
  line-height: 0;
}

.page-shell .service-float-btn span::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor;
}

.page-shell .service-float-btn span::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 4px;
  width: 7px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 0 0 0 3px;
  transform: skewX(-30deg);
}

.page-shell .service-float-btn b {
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 6px;
  border: 2px solid #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(229, 72, 97, 0.3);
}

.page-shell .service-item {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.page-shell .service-action {
  display: inline-flex;
  min-width: 44px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid #b9ccff;
  border-radius: 9px;
  background: #fff;
  color: #2358d8;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.page-shell .service-item[data-contact-mode="copy"] .service-action {
  border-color: #b9e6d3;
  background: #f0faf6;
  color: #087a53;
}
.page-shell .service-presence {
  display: inline-flex;
  width: max-content;
  margin-top: 3px;
  color: #14a475;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}
.page-shell .service-presence.is-away { color: #d89118; }
.page-shell .service-presence.is-offline { color: #8290a6; }

.page-shell .service-action.is-done {
  border-color: #12a06a;
  background: #12a06a;
  color: #fff;
}

.page-shell button:focus-visible,
.page-shell a:focus-visible { outline: 3px solid rgba(47, 107, 255, 0.24); outline-offset: 3px; }

/* Lottery center */
.lottery-shell { width: min(1180px, 100%); padding-top: 14px; }
.lottery-shell .site-header {
  top: 10px;
  border: 1px solid #e3e9f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(18px);
}

.lottery-shell .site-header::before { display: none; }
.lottery-shell .brand-row { min-height: 64px; padding: 10px 16px; }
.lottery-shell .brand img { max-width: 138px; height: 36px; filter: none; }
.lottery-shell .source-badge,
.lottery-shell .back-link { border-color: #e2e8f0; background: #f8fafc; }
.lottery-shell .main-nav {
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid #edf0f4;
  background: linear-gradient(180deg, rgba(248,250,255,.96), rgba(255,255,255,.96));
  box-shadow: none;
}

.lottery-shell .main-nav a {
  --nav-tint: #2f6bff;
  --nav-soft: #edf3ff;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #667085;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.lottery-shell .main-nav a[data-route="robot"] { --nav-tint: #7c5ce7; --nav-soft: #f1edff; }
.lottery-shell .main-nav a[data-route="history"] { --nav-tint: #1677c8; --nav-soft: #eaf6ff; }
.lottery-shell .main-nav a[data-route="trend"] { --nav-tint: #0c9b74; --nav-soft: #e8f8f2; }
.lottery-shell .main-nav a[data-route="missing"] { --nav-tint: #e48a18; --nav-soft: #fff5e5; }
.lottery-shell .main-nav a[data-route="dragon"] { --nav-tint: #db5368; --nav-soft: #fff0f2; }
.lottery-shell .main-nav .nav-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: var(--nav-soft);
  color: var(--nav-tint);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-tint) 12%, transparent);
}
.lottery-shell .main-nav a:hover { color: var(--nav-tint); border-color: color-mix(in srgb, var(--nav-tint) 18%, transparent); background: var(--nav-soft); transform: translateY(-1px); }
.lottery-shell .main-nav a.active {
  color: #fff;
  border-color: transparent;
  background: var(--nav-tint);
  background: linear-gradient(125deg, var(--nav-tint), color-mix(in srgb, var(--nav-tint) 68%, #78a9ff));
  box-shadow: 0 8px 18px rgba(47,107,255,.2);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--nav-tint) 24%, transparent);
}
.lottery-shell .main-nav a.active .nav-icon { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }

@media (min-width: 721px) {
  .lottery-shell .main-nav { justify-content: space-between; gap: 7px; }
  .lottery-shell .main-nav > a { flex: 1 1 0; max-width: 150px; text-align: center; }
}
.lottery-shell .data-note {
  margin: 12px 0;
  border-color: #f5dfb5;
  background: #fffaf0;
  box-shadow: none;
}

.lottery-shell .page-head { align-items: center; margin: 24px 0 14px; }
.lottery-shell .eyebrow { margin-bottom: 6px; color: #2f6bff; }
.lottery-shell .page-head h1 { font-size: clamp(28px, 3.5vw, 38px); letter-spacing: -0.025em; }
.lottery-shell .button,
.lottery-shell .period-button,
.lottery-shell .segmented button { min-height: 40px; border-color: #dfe5ec; background: #fff; box-shadow: none; }
.lottery-shell .button.primary,
.lottery-shell .period-button.active,
.lottery-shell .segmented button.active { border-color: #2f6bff; background: #2f6bff; box-shadow: 0 7px 18px rgba(47, 107, 255, 0.18); }

.lottery-shell .panel,
.lottery-shell .draw-card,
.lottery-shell .stat-card,
.lottery-shell .prediction-card {
  border: 1px solid #e4e9f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(16, 24, 40, 0.055);
  backdrop-filter: none;
}

.lottery-shell .draw-card { padding: 20px 22px 22px; border-top: 4px solid #2f6bff; }
.lottery-shell .draw-main { gap: 26px; }
.lottery-shell .number-expression { min-height: 104px; }
.lottery-shell .draw-ball,
.lottery-shell .sum-ball {
  width: 62px;
  height: 62px;
  border: 4px solid #fff;
  font-size: 23px;
  box-shadow: 0 0 0 1px #dfe6ef, 0 8px 18px rgba(16, 24, 40, 0.12);
}

.lottery-shell .draw-ball.ball-a { background: #2f6bff; }
.lottery-shell .draw-ball.ball-b { background: #12a06a; }
.lottery-shell .draw-ball.ball-c { background: #f79009; }
.lottery-shell .sum-ball { background: #e54861; }
.lottery-shell .result-main { border-radius: 10px; background: #ecf8f3; color: #087a54; }
.lottery-shell .countdown { padding: 6px 12px; border-radius: 10px; background: #f2f4f7; color: #344054; font-size: 15px; }
.lottery-shell .meta-box { border-color: #e7ebf0; background: #f8fafc; }
.lottery-shell .stat-card { min-height: 104px; padding: 16px; }
.lottery-shell .stat-card strong { color: #101828; font-size: 26px; }
.lottery-shell .panel-head { min-height: 60px; border-bottom-color: #edf0f4; }
.lottery-shell thead { background: #f8fafc; }
.lottery-shell tbody tr:hover { background: #f7f9fc; }
.lottery-shell .prediction-card { border-top: 3px solid #a8c0ff; }
.lottery-shell .robot-lab-head,
.lottery-shell .robot-card { border-color: #e5eaf1; background: #fff; }
.lottery-shell .robot-lab-head,
.lottery-shell .robot-card { box-shadow: 0 7px 20px rgba(16, 24, 40, 0.05); }
.lottery-shell .error-banner { border-color: #f6d7dc; background: #fff7f8; }

@media (max-width: 900px) {
  .page-shell .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-shell .trial-featured,
  .page-shell .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lottery-shell .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .page-shell header {
    width: 100%;
    margin: 0 auto 8px;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .page-shell .nav { min-height: 54px; padding: 9px 14px; }
  .page-shell .brand-logo { max-width: 152px; height: 34px; }
  .page-shell .carousel { padding: 0 10px; }
  .page-shell .carousel-wrap { border-radius: 14px; }
  .page-shell .slide { height: clamp(160px, 42vw, 230px); min-height: 160px; max-height: 230px; aspect-ratio: auto; }
  .page-shell .nav-section {
    position: sticky;
    top: 0;
    z-index: 30;
    margin-top: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
    background: rgba(244, 247, 251, 0.9);
    backdrop-filter: blur(14px);
  }

  .page-shell .category-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    padding: 1px 0 4px;
  }

  .page-shell .category-button { min-width: 0; min-height: 42px; padding: 7px 4px; overflow: hidden; font-size: clamp(11px, 3vw, 13px); text-overflow: ellipsis; white-space: nowrap; }
  .page-shell .category-button.fixed-primary-category,
  .page-shell .category-button[data-fixed-category="trial"],
  .page-shell .category-button[data-fixed-category="lottery"] { min-height: 46px; font-size: 15px; }
  .page-shell .pk16-category-title { margin: 20px 0 14px; font-size: 23px; }
  .page-shell .trial-vendor-shell { margin-bottom: 13px; border-radius: 15px; }
  .page-shell .trial-vendor-nav { gap: 5px; padding: 7px 8px 8px; }
  .page-shell .trial-vendor-tab { gap: 5px; min-height: 40px; padding: 5px 9px 5px 5px; border-radius: 11px; font-size: 12px; }
  .page-shell .trial-vendor-icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; font-size: 9px; }
  .trial-game-toolbar { min-height: 56px; padding-right: 9px; padding-left: 11px; }
  .trial-game-close { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }

  .lottery-shell { padding: 0 10px 22px; }
  .lottery-shell .site-header { top: 0; margin: 0 -10px; border-width: 0 0 1px; border-radius: 0; }
  .lottery-shell .brand-row { min-height: 58px; padding: 8px 12px; }
  .lottery-shell .brand img { max-width: 102px; height: 30px; }
  .lottery-shell .brand small { display: none; }
  .lottery-shell .source-badge { display: none; }
  .lottery-shell .main-nav { padding: 6px 10px 9px; }
  .lottery-shell .main-nav a { min-height: 40px; padding: 6px 10px; }
  .lottery-shell .main-nav .nav-icon { width: 23px; height: 23px; border-radius: 7px; font-size: 13px; }
  .lottery-shell .data-note { align-items: flex-start; margin: 10px 0; padding: 9px 12px; }
  .lottery-shell .page-head { align-items: flex-start; margin-top: 18px; }
  .lottery-shell .draw-card { padding: 16px 14px 18px; }
  .lottery-shell .draw-main { grid-template-columns: 1fr; gap: 18px; }
  .lottery-shell .summary-grid { gap: 9px; }
}

@media (max-width: 600px) {
  .page-shell .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .page-shell .trial-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

  .page-shell .trial-featured,
  .page-shell .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }

  .page-shell .game-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "image" "text" "button";
    gap: 4px;
    min-width: 0;
    padding: 4px;
    border-radius: 10px;
  }
  .page-shell .game-card img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 8px; }
  .page-shell .game-card div { width: 100%; text-align: center; }
  .page-shell .game-card strong { display: block; overflow: hidden; font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .page-shell .game-card span { display: none; }
  .page-shell .game-card button { min-width: 0; min-height: 25px; padding: 2px; border-radius: 7px; font-size: 10px; }
  .page-shell .game-card button svg { display: none; }

  .page-shell .card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "avatar" "meta" "cta";
    justify-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 122px;
    padding: 8px 5px 6px;
    border-radius: 12px;
  }

  .page-shell .avatar { width: 44px; height: 44px; }
  .page-shell .meta { width: 100%; align-items: center; text-align: center; }
  .page-shell .title { width: 100%; font-size: 13px; white-space: nowrap; }
  .page-shell .desc,
  .page-shell .rating { display: none; }
  .page-shell .go { width: 100%; min-height: 28px; margin: 0; padding: 3px; border-radius: 8px; font-size: 10px; }
  .page-shell .card-rec-badge { top: 3px; right: 3px; padding: 1px 5px; font-size: 9px; }
  .page-shell .service-float-btn {
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
    padding: 0;
    box-shadow: 0 10px 24px rgba(47, 107, 255, 0.3);
  }
  .page-shell .service-float-btn::after { display: none; }

  .page-shell .lottery-inline-panel { padding-right: 8px; padding-left: 8px; }
  .page-shell .lottery-inline-frame-shell { min-height: 180px; border-radius: 12px; }
  .page-shell .lottery-inline-frame { min-height: 180px; }

  .lottery-shell .page-head { display: grid; }
  .lottery-shell .page-head h1 { font-size: 29px; }
  .lottery-shell .number-expression { gap: 6px; }
  .lottery-shell .draw-ball,
  .lottery-shell .sum-ball { width: 52px; height: 52px; font-size: 20px; }
  .lottery-shell .operator { font-size: 17px; }
  .lottery-shell .result-strip { flex-wrap: wrap; }
  .lottery-shell .summary-grid { grid-template-columns: 1fr 1fr; }
  .lottery-shell .stat-card { min-height: 96px; }
  .lottery-shell .filters { grid-template-columns: 1fr 1fr; }
  .lottery-shell .prediction-grid,
  .lottery-shell .distribution-grid,
  .lottery-shell .ball-groups { grid-template-columns: 1fr; }
}

html.lottery-embed,
html.lottery-embed body {
  min-width: 0;
  min-height: 0;
  background: transparent;
}
html.lottery-embed body::before { display: none; }
html.lottery-embed .lottery-shell {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}
html.lottery-embed .lottery-shell .site-header {
  position: static;
  top: auto;
  margin: 0 0 10px;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}
html.lottery-embed .lottery-shell .brand-row { display: none; }
html.lottery-embed .lottery-shell .data-note,
html.lottery-embed .lottery-shell .page-head { display: none; }
html.lottery-embed .lottery-shell .main-nav {
  gap: 6px;
  padding: 9px 10px 10px;
  border-top: 0;
  background: linear-gradient(180deg, #f9fbff, #fff);
}
html.lottery-embed .lottery-shell .main-nav a {
  min-height: 40px;
  padding: 6px 10px;
}
html.lottery-embed .lottery-shell .app-main { min-height: 0; padding: 12px; }
html.lottery-embed .lottery-shell > .site-footer {
  display: grid;
  margin-top: 4px;
  padding: 18px 12px 16px;
  border-top: 1px solid #e4eaf2;
  color: #98a2b3;
}
html.lottery-embed .lottery-shell > .site-footer strong { color: #667085; }
html.lottery-embed .toast { position: absolute; }

@media (max-width: 600px) {
  html.lottery-embed .lottery-shell .main-nav { padding: 7px 8px; }
  html.lottery-embed .lottery-shell .main-nav a { min-height: 38px; gap: 5px; padding: 5px 8px; font-size: 12px; }
  html.lottery-embed .lottery-shell .main-nav .nav-icon { width: 21px; height: 21px; font-size: 12px; }
  html.lottery-embed .lottery-shell .app-main { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell *, .lottery-shell * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .page-shell .marquee-text { padding-left: 0; animation: none; transform: none; }
}

.seo-only-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
