:root {
  color-scheme: dark;
  --page: #e8e9ec;
  --bg: #111214;
  --surface: #1d1e22;
  --line: #2b2c30;
  --text: #f5f4f0;
  --muted: #a0a1aa;
  --accent: #f0522c;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid #ffb29c;
  outline-offset: 5px;
}

.phone-shell {
  max-width: 520px;
  min-height: 100svh;
  margin: auto;
  padding: max(28px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  background: var(--bg);
  box-shadow: 0 0 60px #0000000b;
}

.notice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 24px;
  color: #d7d3ce;
  font-size: 16px;
  line-height: 1.6;
}
.notice[hidden] { display: none; }
.notice-speaker {
  flex: none;
  color: #74747e;
  font-size: 22px;
  line-height: 1.3;
}
.notice-marquee {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.notice-track {
  --notice-gap: 60px;
  width: max-content;
  display: flex;
  will-change: transform;
  animation: notice-scroll 22s linear infinite;
}
.notice-copy {
  flex: none;
  padding-right: var(--notice-gap);
  white-space: nowrap;
}
.notice:hover .notice-track,
.notice:focus-within .notice-track {
  animation-play-state: paused;
}
@keyframes notice-scroll {
  to { transform: translateX(-50%); }
}

.ad-carousel { margin: 0 0 28px; }
.ad-window {
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
}
.ad-track {
  display: flex;
  transition: transform .45s ease;
}
.ad-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  aspect-ratio: 2.35;
  overflow: hidden;
  padding: 18px 20px;
  color: #fff;
}
.ad-orange { background: #b83920; }
.ad-blue { background: #234ca1; }
.ad-green { background: #216557; }
.ad-label {
  position: relative;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 1px;
  opacity: .9;
}
.ad-slide strong {
  position: relative;
  z-index: 2;
  display: block;
  margin: 10px 0;
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 850;
  line-height: 1.25;
}
.ad-caption {
  position: relative;
  z-index: 2;
  font-size: 10px;
  opacity: .85;
}
.ad-art {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #fff3;
  font-size: 110px;
  line-height: 1;
  transform: translateY(-50%) rotate(-12deg);
}
.ad-slide.has-image {
  display: block;
  padding: 0;
  background: #25262b;
}
.ad-slide.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ad-slide.has-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, #000b 100%);
  content: "";
  pointer-events: none;
}
.ad-slide-title {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px #000;
  white-space: nowrap;
}
.ad-slide-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 999px;
  background: #0009;
  color: #fff;
  font-size: 9px;
  letter-spacing: .5px;
}

.sticky-controls {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 1px 0 28px;
  background: var(--bg);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 25px;
  background: #eeede9;
  color: #252426;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, color .15s, transform .15s;
}
.tabs button[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
}
.tabs button:hover { filter: brightness(1.09); }
.tabs button:active { transform: scale(.96); }

.site-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 34px;
}
.site {
  display: block;
  min-width: 0;
  border-radius: 15px;
  text-align: center;
}
.site[hidden] { display: none; }
.site-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20%;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px #ffffff14, 0 3px 8px #0002;
  color: var(--ink, #fff);
  transition: transform .16s;
}
.site-icon::after {
  position: absolute;
  inset: 0;
  border: 1px solid #ffffff12;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.site-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.icon-glyph {
  position: relative;
  font-size: clamp(23px, 6.6vw, 35px);
  font-weight: 850;
  letter-spacing: -1px;
  line-height: 1;
}
.icon-glyph.small {
  font-size: clamp(17px, 4.5vw, 25px);
  letter-spacing: -1.5px;
}
.icon-glyph.wide {
  font-size: clamp(15px, 3.6vw, 20px);
  letter-spacing: -1px;
}
.icon-foot {
  position: absolute;
  bottom: 7px;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 1.4px;
  opacity: .72;
}
.has-foot .icon-glyph { transform: translateY(-4px); }
.site-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  padding: 2px 4px;
  border-radius: 5px;
  background: #000b;
  color: #fff;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .4px;
}
.site-name {
  display: block;
  overflow: hidden;
  margin-top: 12px;
  color: #e6e4e2;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site:hover .site-icon { transform: translateY(-3px); }
.site:active .site-icon { transform: scale(.94); }

.public-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #28282e;
  color: #93939c;
  font-size: 10px;
}
.public-footer strong { color: #c8c5c3; font-weight: 550; }
.public-footer i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  z-index: 9;
  padding: 12px;
  border-radius: 8px;
  background: var(--accent);
}
.skip-link:focus { top: 12px; }
.no-script {
  font-size: 14px;
  line-height: 1.8;
}
.no-script a { text-decoration: underline; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 600px) {
  .phone-shell {
    min-height: calc(100svh - 56px);
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 28px 24px 22px;
    border-radius: 24px;
  }
  .site-name { font-size: 13px; }
}

@media (max-width: 359px) {
  .phone-shell { padding-right: 14px; padding-left: 14px; }
  .site-grid { column-gap: 12px; row-gap: 30px; }
  .tabs { gap: 6px; }
  .tabs button { font-size: 13px; }
  .site-name { font-size: 11px; }
  .icon-foot { bottom: 5px; font-size: 6px; letter-spacing: .5px; }
  .ad-slide { padding: 14px 16px; }
  .ad-slide strong { margin: 8px 0; font-size: 22px; }
  .ad-art { font-size: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .notice-track {
    width: 100%;
    animation: none;
    transform: none;
    will-change: auto;
  }
  .notice-copy {
    max-width: 100%;
    overflow: hidden;
    padding-right: 0;
    text-overflow: ellipsis;
  }
  .notice-copy + .notice-copy { display: none; }
}
html.template-loading body {
  visibility: hidden;
}

html[data-navigation-template="blank"],
html[data-navigation-template="blank"] body {
  min-height: 100%;
  background: #fff;
}

html[data-navigation-template="blank"] body > * {
  display: none !important;
}
