:root {
  --accent: #0f7aed;
  --page-bg: #172733;
  --ink: #f5f8fb;
  --muted: #a9b7c3;
  --panel: #ffffff;
  --panel-soft: #f4f7fb;
  --line: #d7e0ea;
  --admin-ink: #17202b;
  --danger: #b91c1c;
  --success: #087f5b;
  --glyph-size: clamp(78px, 8vw, 132px);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

.entry-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--page-bg);
}

.entry-shell {
  width: min(680px, calc(100vw - 32px));
  text-align: center;
}

.entry-shell h1 {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 800;
}

.entry-shell p {
  color: var(--muted);
}

.stage-page {
  min-height: 100vh;
  color: var(--ink);
  background-image: var(--stage-bg-desktop, none);
  background-color: var(--page-bg);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}

.stage-viewport {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
}

.stage-viewport::after {
  content: none;
}

.stage-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 36px));
  min-height: 312px;
  padding: 46px 22px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.glyph-wheel {
  min-height: calc(var(--glyph-size) + 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
  line-height: 1;
}

.glyph-svg {
  height: calc(var(--glyph-size) + 40px);
  width: auto;
  max-width: 100%;
  overflow: visible;
  display: block;
}

.glyph-svg-shadow,
.glyph-svg-face {
  font-family: "Microsoft YaHei", "SimHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 82px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: alphabetic;
  letter-spacing: 0;
  paint-order: stroke fill;
}

.glyph-svg-shadow {
  fill: rgba(0, 0, 0, .72);
  stroke: rgba(4, 9, 13, .85);
  stroke-width: 8;
}

.glyph-svg-face {
  fill: #f7fbff;
  stroke: #071017;
  stroke-width: 6;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .82));
}

.glyph-column {
  width: var(--glyph-size);
  height: var(--glyph-size);
  overflow: hidden;
  display: inline-block;
}

.glyph-reel {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  filter: blur(5px);
  transition:
    transform 1250ms cubic-bezier(.12, .72, .14, 1),
    filter 520ms ease;
}

.glyph-reel.settled {
  transform: translateY(calc(var(--target-index) * var(--glyph-size) * -1));
  filter: blur(0);
}

.glyph-reel b {
  display: block;
  width: var(--glyph-size);
  height: var(--glyph-size);
  line-height: var(--glyph-size);
  text-align: center;
  font-size: calc(var(--glyph-size) * .72);
  font-weight: 950;
  color: #f7fbff;
  letter-spacing: 0;
  -webkit-text-stroke: 2px #0b1218;
  text-shadow:
    0 3px 0 #0b1218,
    4px 4px 0 rgba(0, 0, 0, .55);
}

.stage-slogan {
  min-height: 30px;
  margin: 22px 0 56px;
  font-size: 18px;
  color: #ecf3f8;
  letter-spacing: .18em;
  text-align: center;
}

.primary-cta {
  min-width: 188px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 12px 28px rgba(15, 122, 237, .24);
}

body.legacy-mobile-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  background-color: var(--page-bg);
  background-image: var(--stage-bg-mobile, var(--stage-bg-desktop, none));
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.legacy-mobile-stage .mobile-stage-main {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legacy-mobile-stage .mobile-stage-content {
  width: min(calc(350 / 1046 * 100vh), calc(100vw - 40px));
  display: flex;
  justify-content: center;
  padding-top: 50px;
}

.legacy-mobile-stage .mobile-stage-cta {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  border-radius: 10px;
  background: #0068dc;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 104, 220, .24);
}

.portal-page {
  min-height: 100vh;
  color: #101820;
}

.portal-redesign {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .9) 0 38%, rgba(255, 255, 255, .72) 38% 100%),
    var(--portal-bg-image);
  background-color: #e9f0fb;
  background-size: cover;
  background-position: center top;
  overflow-x: hidden;
}

.portal-header {
  width: min(1680px, calc(100vw - 64px));
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
  margin: 0 auto;
  padding: 30px 0 18px;
}

.portal-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.portal-logo {
  width: min(400px, 100%);
  max-height: 104px;
  object-fit: contain;
  object-position: left center;
}

.portal-logo-text {
  font-size: 28px;
  color: #101820;
}

.portal-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(16px, 2vw, 38px);
}

.portal-nav-item {
  min-width: 110px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #121b25;
  font-weight: 900;
  white-space: nowrap;
}

.portal-nav-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.portal-nav-item b {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f4cff;
  color: #fff;
  font-size: 11px;
}

.portal-nav-item span {
  font-size: 18px;
}

.portal-nav-item:hover {
  color: #2f4cff;
}

.portal-lang {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  max-width: 230px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lang-pill {
  min-width: 40px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(47, 76, 255, .22);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  color: #415062;
  background: rgba(255, 255, 255, .72);
}

.lang-pill.active {
  background: #2f4cff;
  border-color: #2f4cff;
  color: #fff;
}

.portal-showcase {
  width: min(1680px, calc(100vw - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 37.5% 62.5%;
  grid-template-rows: minmax(460px, calc(100vh - 445px)) 280px auto auto;
  align-items: stretch;
}

.portal-hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 52px 38px 0;
}

.portal-title-image {
  width: min(600px, 100%);
  height: auto;
  display: block;
}

.portal-hero-copy h1 {
  margin: 0;
  color: #101820;
  font-size: clamp(34px, 4vw, 72px);
  line-height: 1.04;
}

.hero-line-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-line-chips a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  text-decoration: none;
  background: #ff8d1b;
  color: #fff;
  font-weight: 900;
}

.portal-hero-art {
  position: relative;
  min-width: 0;
  overflow: visible;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.portal-hero-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
}

.portal-character-overlay,
.portal-mobile-brand-strip {
  display: none;
}

.portal-copyright-strip {
  position: absolute;
  right: clamp(16px, 4vw, 58px);
  bottom: 58px;
  width: 14px;
  height: auto;
}

.portal-info-band {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  padding: 34px 120px 34px 52px;
  background: #2f4cff;
  color: #fff;
}

.portal-info-text {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.portal-info-text h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.16;
}

.portal-info-text p {
  margin: 0;
  font-size: 15px;
  line-height: 2.05;
  text-align: justify;
}

.portal-phone-art {
  position: absolute;
  right: -74px;
  top: -90px;
  width: 147px;
  height: 300px;
  object-fit: contain;
  z-index: 2;
}

.portal-brand-strip {
  position: absolute;
  right: -160px;
  top: 0;
  width: 160px;
  height: 280px;
  object-fit: contain;
}

.portal-lines-panel,
.browser-panel {
  grid-column: 1 / -1;
  width: min(1180px, 100%);
  margin: 28px auto 0;
  border: 1px solid #d4dce8;
  background: rgba(255, 255, 255, .94);
  color: #17202b;
}

.portal-lines-panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading h2,
.browser-panel h2 {
  margin: 0;
  font-size: 20px;
}

.panel-heading span {
  color: #2f4cff;
  font-size: 13px;
  font-weight: 900;
}

.line-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.line-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 76px 34px 56px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: #f7f9fc;
  border: 1px solid #dce4ee;
}

.line-icon {
  width: 30px;
  height: 15px;
  object-fit: contain;
}

.latency {
  min-width: 66px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf1f6;
  color: #13755b;
  font-size: 13px;
  font-weight: 900;
}

.probe-timeout .latency {
  color: #a33a21;
}

.line-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff3df;
  color: #c46100;
  font-size: 12px;
  font-weight: 900;
}

.line-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #17202b;
  font-weight: 800;
}

.line-link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #2f4cff;
  color: #fff;
  font-weight: 900;
}

.browser-panel {
  padding: 18px;
}

.browser-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.browser-link {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #17202b;
  text-decoration: none;
  background: #f7f9fc;
  border: 1px solid #dce4ee;
}

.browser-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.browser-link .browser-hot {
  width: 46px;
  height: 20px;
  margin-left: auto;
}

.portal-footer {
  padding: 20px 16px 32px;
  color: #1f2d3a;
  text-align: center;
  font-size: 13px;
}

.tracking-pixel {
  display: none;
  width: 1px;
  height: 1px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #edf2f7;
  color: var(--admin-ink);
}

.login-box {
  width: min(420px, calc(100vw - 32px));
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(23, 32, 43, .12);
}

.login-box h1 {
  margin: 0 0 4px;
}

.login-box p,
.login-box small {
  color: #627184;
}

.login-box label {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  font-weight: 700;
}

.login-box input,
.field input,
.field textarea,
.field select,
.admin-table select,
.admin-table input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--admin-ink);
  background: #fff;
}

.field input[type="file"] {
  padding: 7px 10px;
}

.login-box button,
.admin-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: #1457d9;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  color: var(--danger);
}

.login-note {
  color: var(--success);
}

.admin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  color: var(--admin-ink);
  background: #eef3f8;
}

.admin-side {
  min-height: 100vh;
  padding: 22px 16px;
  color: #f7fbff;
  background: #14202b;
  position: sticky;
  top: 0;
}

.admin-side strong {
  display: block;
  font-size: 22px;
}

.admin-side span {
  display: block;
  margin-top: 4px;
  color: #9fb0bc;
  font-size: 13px;
}

.admin-side nav {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.admin-side a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #dce7ef;
}

.admin-side a.active,
.admin-side a:hover {
  background: #223445;
  color: #fff;
}

.admin-logout {
  margin-top: 24px;
  color: #f6c3c3 !important;
}

.admin-main {
  padding: 28px;
  overflow-x: auto;
}

.admin-panel {
  max-width: 1180px;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.admin-panel h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.admin-panel h2 {
  margin: 28px 0 12px;
  font-size: 18px;
}

.admin-panel p {
  color: #5d6c7d;
}

.admin-flash {
  max-width: 1180px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: flash-in .25s ease-out;
}
.admin-flash.flash-success { background: #e5f7ef; border: 1px solid #bfead5; color: #116642; }
.admin-flash.flash-warning { background: #fff8e1; border: 1px solid #ffe082; color: #795600; }
/* Highlight the initial-password warning without changing other warning flashes. */
.admin-flash.flash-default-pw { border-left: 4px solid #e67700; }
.admin-flash.flash-error   { background: #fdecea; border: 1px solid #f5c6cb; color: #9b1c1c; }
.flash-close {
  background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1;
  color: inherit; opacity: .5; padding: 0 2px;
}
.flash-close:hover { opacity: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.field small {
  color: #6d7c8c;
  font-weight: 500;
}

.field-wide {
  margin-top: 16px;
}

.compact-field {
  max-width: 360px;
  margin: 0 0 14px;
}

.form-grid .field-wide {
  grid-column: 1 / -1;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.check-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 1px solid var(--line);
}

.admin-table th,
.admin-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e9f1;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: #f3f7fb;
  color: #526274;
  font-size: 13px;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1),
.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
  width: 72px;
}

.admin-table th:last-child,
.admin-table td:last-child {
  width: 86px;
}

.domain-table th:nth-child(3),
.domain-table td:nth-child(3) {
  width: 148px;
}

.line-admin-table th:nth-child(5),
.line-admin-table td:nth-child(5),
.line-admin-table th:nth-child(6),
.line-admin-table td:nth-child(6) {
  width: 25%;
}

.feature-card-table {
  min-width: 1120px;
}

.asset-table th:nth-child(2),
.asset-table td:nth-child(2) {
  width: 92px;
}

.asset-thumb {
  width: 66px;
  height: 46px;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #d7e0ea;
  background: #f4f7fb;
}

.slot-table th:first-child,
.slot-table td:first-child {
  width: 260px;
}

.table-textarea {
  width: 100%;
  min-height: 58px;
  margin-top: 6px;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  padding: 8px 10px;
  resize: vertical;
  font: inherit;
  color: var(--admin-ink);
  background: #fff;
}

.delete-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-weight: 800;
}

.protected-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  background: #edf2f7;
  color: #526274;
  font-size: 12px;
  font-weight: 800;
}

.slot-table small,
.asset-table small {
  color: #6d7c8c;
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.preview-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cbd6e2;
  border-radius: 6px;
  color: #1457d9;
  text-decoration: none;
  background: #fff;
}

.password-form {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Admin console — grouped nav, compact topbar, clean panels. */
.admin-page {
  --admin-bg: #f4f6f8;
  --admin-ink: #17202b;
  --admin-muted: #64748b;
  --admin-soft: #eef2f7;
  --admin-line: #e2e8f0;
  --admin-blue: #1d4ed8;
  --admin-teal: #0f766e;
  --admin-amber: #b45309;
  --admin-green: #059669;
  --admin-red: #dc2626;
  --admin-accent: #2563eb;
  grid-template-columns: 268px minmax(0, 1fr);
  background: var(--admin-bg);
  color: var(--admin-ink);
}

/* ── Sidebar ── */
.admin-side {
  padding: 0;
  background: #111827;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 8px;
  background: #0f172a;
  color: #e0f2fe !important;
  font-size: 13px !important;
  font-weight: 900;
  letter-spacing: .04em;
}

.admin-brand strong {
  display: block;
  font-size: 17px;
  color: #fff;
  letter-spacing: .3px;
}

.admin-brand span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.admin-nav {
  flex: 1;
  padding: 12px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group h4 {
  margin: 0;
  padding: 4px 10px 0;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
}

.nav-group p {
  margin: 0;
  padding: 0 10px 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}

.nav-item:hover {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(255, 255, 255, .045);
  color: #e2e8f0;
}

.nav-item.active {
  border-color: rgba(96, 165, 250, .22);
  background: #1e293b;
  color: #fff;
}

.nav-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 7px;
  background: rgba(15, 23, 42, .72);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active .nav-index {
  border-color: rgba(125, 211, 252, .38);
  background: #0f766e;
  color: #ecfeff;
}

.nav-dot {
  width: 8px;
  height: 8px;
  display: block !important;
  margin: 0 !important;
  border-radius: 999px;
  background: #475569;
  box-shadow: 0 0 0 4px rgba(71, 85, 105, .2);
}

.nav-item.active .nav-dot {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, .16);
}

.nav-copy {
  min-width: 0;
  display: grid !important;
  gap: 2px;
  margin: 0 !important;
}

.nav-copy strong {
  color: inherit;
  font-size: 13px;
  line-height: 1.2;
}

.nav-copy em {
  overflow: hidden;
  color: #718096;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active .nav-copy em {
  color: #bfdbfe;
}

.side-platform-tools {
  display: grid;
  gap: 10px;
  margin: 4px 0 10px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 9px;
  background: rgba(15, 23, 42, .52);
}

.side-platform-section {
  display: grid;
  gap: 6px;
}

.admin-page .admin-side .side-platform-summary-card,
.admin-page .admin-side .side-platform-add,
.admin-page .admin-side .side-platform-link,
.admin-page .admin-side .side-platform-info-link,
.admin-page .admin-side .side-platform-row {
  border-radius: 7px;
  text-decoration: none;
}

.admin-page .admin-side .side-platform-summary-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 184, 166, .28);
  background: rgba(15, 118, 110, .18);
}

.admin-page .admin-side .side-platform-summary-card span,
.admin-page .admin-side .side-platform-summary-card em {
  margin: 0;
  color: #99f6e4;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.admin-page .admin-side .side-platform-summary-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #f8fafc;
  font-size: 30px;
  line-height: 1;
}

.admin-page .admin-side .side-platform-add {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(125, 211, 252, .3);
  background: rgba(30, 41, 59, .9);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.admin-page .admin-side .side-platform-link,
.admin-page .admin-side .side-platform-info-link {
  min-height: 40px;
  display: grid;
  gap: 3px;
  justify-content: stretch;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: rgba(255, 255, 255, .035);
  color: #cbd5e1;
}

.admin-page .admin-side .side-platform-link:hover,
.admin-page .admin-side .side-platform-info-link:hover {
  border-color: rgba(125, 211, 252, .28);
  background: rgba(30, 41, 59, .94);
  color: #f8fafc;
}

.admin-page .admin-side .side-platform-link strong,
.admin-page .admin-side .side-platform-info-link strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .admin-side .side-platform-link em,
.admin-page .admin-side .side-platform-info-link em {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .admin-side .side-platform-info-link {
  border-color: rgba(20, 184, 166, .24);
  background: rgba(15, 118, 110, .13);
}

.admin-page .admin-side .side-platform-info-link strong {
  color: #99f6e4;
}

.side-platform-list {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow-y: auto;
}

.side-platform-list-title {
  margin: 2px 0 0 !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800;
}

.admin-page .admin-side .side-platform-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 5px;
  align-items: stretch;
}

.admin-page .admin-side .side-platform-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .035);
  color: #cbd5e1;
}

.admin-page .admin-side .side-platform-row:hover,
.admin-page .admin-side .side-platform-row.active,
.admin-page .admin-side .side-platform-item.active .side-platform-row {
  border-color: rgba(125, 211, 252, .24);
  background: rgba(30, 41, 59, .92);
  color: #f8fafc;
}

.admin-page .admin-side .side-platform-row span,
.admin-page .admin-side .side-platform-row strong,
.admin-page .admin-side .side-platform-row em {
  min-width: 0;
  margin: 0;
}

.admin-page .admin-side .side-platform-row strong {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .admin-side .side-platform-row em {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .admin-side .side-platform-row b {
  color: #7dd3fc;
  font-size: 11px;
  white-space: nowrap;
}

.admin-page .admin-side .side-platform-order {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0;
}

.admin-page .admin-side .side-platform-order button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 6px;
  background: rgba(15, 23, 42, .62);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.admin-page .admin-side .side-platform-order button:hover:not(:disabled) {
  border-color: rgba(125, 211, 252, .36);
  background: rgba(30, 41, 59, .95);
  color: #e0f2fe;
}

.admin-page .admin-side .side-platform-order button:disabled {
  cursor: not-allowed;
  opacity: .34;
}

.admin-side-footer {
  margin: 8px 12px 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  background: rgba(15, 23, 42, .7);
}

.admin-side-footer span {
  margin: 0 0 3px;
  color: #64748b;
  font-size: 11px;
}

.admin-side-footer strong {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 10px 0 0;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.admin-logout:hover {
  background: rgba(255, 255, 255, .06);
  color: #e2e8f0 !important;
}

/* ── Main area ── */
.admin-main {
  padding: 18px 22px 28px;
  overflow-x: auto;
}

/* ── Topbar ── */
.admin-topbar {
  max-width: 1400px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-line);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.topbar-platform {
  min-width: 0;
}

.topbar-platform strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-platform span {
  display: block;
  margin-top: 1px;
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-crumb {
  margin: 0 0 3px !important;
  color: var(--admin-teal) !important;
  font-weight: 800;
}

.platform-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-preview-group {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.admin-preview-group > span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

/* ── Form inputs ── */
.platform-switcher select,
.field input,
.field textarea,
.field select,
.admin-table select,
.admin-table input {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s;
}

.platform-switcher select:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--admin-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

/* ── Preview links ── */
.admin-preview-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-preview-bar a,
.preview-links a,
.table-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.admin-preview-bar a:hover,
.preview-links a:hover,
.table-link:hover {
  border-color: var(--admin-accent);
  background: #eff6ff;
}

/* ── Workflow strip (compact, non-platforms tabs) ── */
.workflow-strip {
  max-width: 1400px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
}

.wf-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--admin-ink);
  font-size: 12px;
  text-decoration: none;
  transition: background .15s;
}

.wf-stat:hover {
  background: #e2e8f0;
}

.wf-stat span {
  color: var(--admin-muted);
  font-weight: 500;
}

.wf-stat strong {
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Workflow cards (platforms tab) ── */
.platform-workflow {
  max-width: 1400px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
}

.workflow-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.workflow-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.workflow-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.workflow-group {
  display: grid;
  align-content: start;
  gap: 6px;
}

.workflow-group h3 {
  margin: 0;
  padding: 0 2px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.workflow-group .workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.workflow-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fafbfc;
  color: var(--admin-ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

.workflow-card:hover {
  border-color: var(--admin-accent);
  box-shadow: 0 1px 3px rgba(37, 99, 235, .1);
}

.workflow-card.active {
  border-color: var(--admin-accent);
  border-left: 3px solid var(--admin-accent);
  background: #eff6ff;
}

.workflow-card span {
  color: var(--admin-blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.workflow-card strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.workflow-card em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-accent);
}

/* ── Settings level grid ── */
.settings-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

.settings-command-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-flow-rail {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 16px;
}

.settings-flow-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #f8fafc;
}

.settings-flow-card span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.settings-flow-card strong {
  font-size: 13px;
  line-height: 1.2;
}

.settings-flow-card em {
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-flow-card.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.settings-editor-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.settings-level-section {
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
}

.settings-level-title {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-level-title span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eff6ff;
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 700;
}

.settings-level-title strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.settings-level-title em {
  color: var(--admin-muted);
  font-style: normal;
  font-size: 12px;
}

.compact-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.settings-check {
  align-self: end;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #f8fafc;
}

.settings-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--admin-line);
}

.settings-action-bar .preview-links {
  margin: 0;
}

/* ── Simple level jumps and platform URL matrix ── */
.platform-summary-hub {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(360px, 1.6fr) auto;
  gap: 16px;
  align-items: center;
  border-color: #bfdbfe;
}

.platform-summary-copy h1 {
  margin-bottom: 6px;
}

.platform-summary-copy p {
  margin-bottom: 0;
}

.platform-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
}

.platform-summary-metrics div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.platform-summary-metrics span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.platform-summary-metrics strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.platform-summary-metrics em {
  overflow: hidden;
  color: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.level-jump-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
  padding: 10px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #f8fafc;
}

.level-jump-bar a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.level-jump-bar a:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.platform-url-matrix-panel {
  border-color: #99d9cf;
}

.platform-info-group-panel {
  margin-top: 18px;
  background: #fbfefe;
}

.platform-info-group-panel .panel-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid #dbeafe;
}

.platform-info-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.platform-info-guide span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.platform-url-table {
  min-width: 1260px;
}

.platform-url-table th:nth-child(1),
.platform-url-table td:nth-child(1) {
  width: 190px;
}

.platform-url-table th:nth-child(6),
.platform-url-table td:nth-child(6) {
  width: 230px;
}

.platform-name-cell strong,
.url-cell .url-path {
  display: block;
}

.platform-name-cell small,
.url-cell small {
  display: block;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.url-cell {
  vertical-align: top;
}

.url-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.url-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.url-chip.muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: var(--admin-muted);
}

.url-path {
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.url-path:hover {
  color: #0f766e;
  text-decoration: underline;
}

.platform-simple-strip {
  border-color: #b6d7d0;
}

.level-three-heading {
  align-items: center;
}

/* ── Platform row actions ── */
.platform-row-actions {
  min-width: 320px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.platform-row-actions .table-link {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.platform-row-actions .primary-link {
  border-color: var(--admin-accent);
  background: #eff6ff;
}

.platform-inline-action-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.table-action-button {
  min-width: 58px;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.table-action-button:hover:not(:disabled) {
  border-color: var(--admin-blue);
  background: #eff6ff;
  color: var(--admin-blue);
}

.table-action-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.platform-current-panel {
  border-color: #bfdbfe;
}

.platform-scope-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.platform-scope-cards div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #f8fafc;
}

.platform-scope-cards span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-scope-cards strong {
  color: #0f172a;
  font-size: 18px;
}

.platform-current-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.platform-current-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--admin-line);
}

.platform-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.platform-create-panel {
  background: #fbfdff;
}

.platform-directory,
.shared-asset-library {
  display: block;
}

.platform-directory summary,
.shared-asset-library summary {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(160px, auto) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.platform-directory summary span,
.shared-asset-library summary span {
  font-weight: 800;
}

.platform-directory summary strong,
.shared-asset-library summary strong {
  color: var(--admin-blue);
}

.platform-directory summary em,
.shared-asset-library summary em {
  color: var(--admin-muted);
  font-size: 12px;
  font-style: normal;
}

.platform-directory[open] summary,
.shared-asset-library[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.platform-directory-table,
.shared-asset-table {
  margin-top: 0;
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.platform-directory-table small,
.shared-asset-table small {
  display: block;
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: 12px;
}

.current-platform-row td {
  background: #eff6ff !important;
}

.compact-actions {
  min-width: 0;
}

.platform-url-table .compact-actions {
  min-width: 190px;
}

.shared-asset-library {
  margin: 12px 0 0;
}

/* ── Quick panel ── */
.admin-quick-panel {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
}

.quick-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-panel .quick-panel-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.quick-url-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

/* ── Admin panel ── */
.admin-panel {
  max-width: 1400px;
  padding: 20px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  overflow-x: auto;
}

.admin-panel + .admin-panel {
  margin-top: 12px;
}

.admin-panel h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-panel h2 {
  margin: 20px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 15px;
  font-weight: 700;
}

.admin-panel p {
  max-width: 980px;
  margin: 4px 0 14px;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-flash {
  max-width: 1400px;
}

.admin-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--admin-accent);
  margin-bottom: 6px;
}

/* ── Form grid ── */
.form-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 12px;
}

.field {
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.field small {
  color: var(--admin-muted);
  font-weight: 400;
}

.check-field {
  min-height: 36px;
  align-items: center;
  color: #334155;
  font-size: 13px;
}

/* ── Buttons ── */
.admin-button {
  min-height: 38px;
  border-radius: 6px;
  background: var(--admin-blue);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, box-shadow .15s;
}

.admin-button:hover {
  background: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .2);
}

.admin-button.secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--admin-ink);
  text-decoration: none;
}

.admin-button.secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.admin-button.danger {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: var(--admin-red);
}

.admin-button.danger:hover {
  background: #fee2e2;
}

/* ── Tables ── */
.admin-table {
  width: 100%;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.admin-table tbody tr:hover td {
  background: #f1f5f9;
}

.admin-table textarea.table-textarea {
  min-height: 54px;
}

.admin-table input[type="checkbox"],
.admin-table input[type="radio"],
.check-field input[type="checkbox"],
.delete-check input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
}

.platform-table {
  min-width: 1180px;
}

.platform-table th:nth-child(4),
.platform-table td:nth-child(4),
.platform-table th:nth-child(5),
.platform-table td:nth-child(5),
.platform-table th:nth-child(6),
.platform-table td:nth-child(6) {
  width: 18%;
}

/* ── TLS summary ── */
.tls-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.tls-summary-grid div {
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fafbfc;
}

.tls-summary-grid span,
.cert-table small {
  display: block;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.4;
}

.tls-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--admin-ink);
  font-size: 14px;
}

.cert-table {
  min-width: 1120px;
  table-layout: fixed;
}

.cert-table th:nth-child(1),
.cert-table td:nth-child(1) {
  width: 17%;
}

.cert-table th:nth-child(2),
.cert-table td:nth-child(2),
.cert-table th:nth-child(3),
.cert-table td:nth-child(3),
.cert-table th:nth-child(4),
.cert-table td:nth-child(4) {
  width: 22%;
}

.cert-table th:nth-child(5),
.cert-table td:nth-child(5) {
  width: 170px;
}

.cert-table td:first-child strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
}

.status-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #059669;
}

.status-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #d97706;
}

.status-bad {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #dc2626;
}

/* ── Cert forms ── */
.inline-cert-form {
  margin: 0;
}

.cert-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.inline-cert-form .admin-button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
  white-space: normal;
}

.inline-cert-form .admin-button:disabled {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.cert-note {
  margin-top: 12px;
}

.cloudflare-config-grid {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

/* ── Delete / misc ── */
.delete-check {
  color: var(--admin-red);
}

.row-delete-button {
  min-width: 58px;
  min-height: 30px;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  background: #fef2f2;
  color: var(--admin-red);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.row-delete-button:hover {
  border-color: var(--admin-red);
  background: #fee2e2;
}

.protected-note {
  border-radius: 999px;
  background: #eff6ff;
  color: var(--admin-blue);
}

.asset-thumb {
  border-radius: 6px;
}

/* ── Responsive ── */
@media (max-width: 1180px) {
  .admin-page {
    grid-template-columns: 1fr;
  }

  .admin-side {
    min-height: auto;
    position: static;
  }

  .admin-page .admin-side .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    overflow: visible;
  }

  .nav-group {
    display: contents;
  }

  .nav-group h4,
  .nav-group p {
    display: none;
  }

  .nav-item {
    border-left: 0;
    border-radius: 6px;
    min-height: 40px;
    padding: 6px 10px;
  }

  .nav-copy em,
  .admin-side-footer {
    display: none;
  }

  .admin-topbar {
    flex-wrap: wrap;
  }

  .workflow-groups,
  .settings-level-grid,
  .platform-summary-hub,
  .platform-scope-cards,
  .platform-current-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .platform-summary-copy,
  .platform-summary-actions {
    grid-column: 1 / -1;
  }

  .platform-summary-actions {
    justify-content: flex-start;
  }

  .settings-command-panel {
    grid-template-columns: 1fr;
  }

  .settings-flow-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-url-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .tls-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-main {
    padding: 12px;
  }

  .workflow-groups,
  .settings-level-grid,
  .quick-url-grid,
  .form-grid,
  .platform-scope-cards,
  .platform-current-grid {
    grid-template-columns: 1fr;
  }

  .platform-directory summary,
  .shared-asset-library summary {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .workflow-strip {
    flex-direction: column;
  }

  .settings-flow-rail,
  .compact-form-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel-heading,
  .workflow-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .admin-preview-group {
    grid-template-columns: 1fr;
  }

  .cert-table {
    min-width: 980px;
  }
}

/* Admin shell repair layer.
   Older admin rules live earlier in this file; these scoped selectors keep the
   redesigned console from inheriting stale sidebar/table layout behavior. */
.admin-page .admin-side {
  min-height: 100vh;
  padding: 0;
  background: #111827;
  position: sticky;
  top: 0;
}

.admin-page .admin-side .admin-brand {
  margin: 0;
}

.admin-page .admin-side .admin-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 12px 10px 8px;
  overflow-y: auto;
}

.admin-page .admin-side .nav-group {
  display: grid;
  gap: 4px;
  margin: 0;
}

.admin-page .admin-side .nav-group h4,
.admin-page .admin-side .nav-group p {
  display: block;
}

.admin-page .admin-side .nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
}

.admin-page .admin-side .nav-item:hover {
  border-color: rgba(148, 163, 184, .18);
  background: rgba(255, 255, 255, .045);
  color: #e2e8f0;
}

.admin-page .admin-side .nav-item.active {
  border-color: rgba(96, 165, 250, .22);
  background: #1e293b;
  color: #fff;
}

.admin-page .admin-side .nav-copy strong {
  color: inherit;
  font-size: 13px;
}

.admin-page .admin-side .nav-copy em {
  display: block;
}

.admin-page .admin-panel,
.admin-page .admin-topbar,
.admin-page .workflow-strip,
.admin-page .platform-workflow,
.admin-page .admin-flash {
  width: 100%;
  max-width: none;
}

.admin-page .admin-main {
  min-width: 0;
  overflow-x: hidden;
}

.admin-page .admin-panel {
  overflow-x: auto;
}

.admin-page .asset-table,
.admin-page .slot-table,
.admin-page .feature-card-table,
.admin-page .line-admin-table,
.admin-page .domain-table,
.admin-page .platform-table,
.admin-page .platform-directory-table,
.admin-page .platform-url-table,
.admin-page .shared-asset-table {
  min-width: 1080px;
}

.admin-page .platform-url-table {
  min-width: 1260px;
}

.portal-redesign.mobile {
  background: #dfe9f7;
}

.portal-redesign.mobile .portal-header {
  width: min(750px, 100vw);
  min-height: 0;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 24px 0 8px;
  background: #fff;
}

.portal-redesign.mobile .portal-brand {
  justify-content: center;
}

.portal-redesign.mobile .portal-logo {
  width: min(400px, 68vw);
  max-height: none;
  object-position: center;
}

.portal-redesign.mobile .portal-logo-text {
  font-size: 22px;
  text-align: center;
}

.portal-redesign.mobile .portal-lang {
  justify-content: center;
  max-width: 100%;
  padding: 0 10px 4px;
}

.portal-redesign.mobile .portal-showcase {
  width: min(750px, 100vw);
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: 0 8px 34px;
  background: #fff;
}

.portal-redesign.mobile .portal-hero-copy {
  position: relative;
  z-index: 2;
  align-items: center;
  padding: 0;
  margin: 0 0 clamp(-286px, -38vw, -150px);
  pointer-events: none;
}

.portal-redesign.mobile .portal-title-image {
  width: min(600px, 86vw);
  margin: 0 auto;
}

.portal-redesign.mobile .hero-line-chips {
  display: none;
}

.portal-redesign.mobile .portal-hero-art {
  order: 2;
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  aspect-ratio: 750 / 864;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.portal-redesign.mobile .portal-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.portal-redesign.mobile .portal-character-overlay {
  position: absolute;
  inset: auto 0 0;
  display: block;
  width: 100%;
  height: auto;
}

.portal-redesign.mobile .portal-mobile-brand-strip {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 21.4%;
  max-width: 160px;
  height: auto;
}

.portal-redesign.mobile .portal-copyright-strip {
  display: none;
}

.portal-mobile-nav {
  order: 3;
  margin: 8px 0 0;
}

.portal-redesign.mobile .portal-mobile-nav .portal-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.portal-redesign.mobile .portal-nav-item {
  min-width: 0;
  min-height: 100px;
  grid-column: span 2;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border: 1px solid #1e2c37;
  margin: 0 -1px -1px 0;
  background: #fff;
  color: #07101a;
}

.portal-redesign.mobile .portal-nav-item:nth-child(1),
.portal-redesign.mobile .portal-nav-item:nth-child(2) {
  grid-column: span 3;
}

.portal-redesign.mobile .portal-nav-item img,
.portal-redesign.mobile .portal-nav-item b {
  width: 28px;
  height: 28px;
}

.portal-redesign.mobile .portal-nav-item span {
  font-size: 15px;
}

.portal-redesign.mobile .portal-lines-panel {
  order: 4;
}

.portal-redesign.mobile .portal-info-band {
  order: 5;
  min-height: 0;
  margin-top: 12px;
  padding: 14px;
  background: #f5f8ff;
  color: #17202b;
}

.portal-redesign.mobile .portal-info-text {
  max-width: none;
}

.portal-redesign.mobile .portal-info-text h2 {
  margin-bottom: 8px;
  color: #2f4cff;
  font-size: 18px;
}

.portal-redesign.mobile .portal-info-text p {
  font-size: 13px;
  line-height: 1.7;
}

.portal-redesign.mobile .portal-phone-art,
.portal-redesign.mobile .portal-brand-strip {
  display: none;
}

.portal-redesign.mobile .portal-lines-panel,
.portal-redesign.mobile .browser-panel {
  width: 100%;
  margin: 12px 0 0;
}

.portal-redesign.mobile .line-row {
  grid-template-columns: 62px 30px minmax(0, 1fr);
  gap: 8px;
}

.portal-redesign.mobile .line-badge {
  display: none;
}

.portal-redesign.mobile .line-link {
  grid-column: 1 / -1;
}

.portal-redesign.mobile .browser-list {
  grid-template-columns: 1fr;
}

.portal-redesign.mobile .browser-panel {
  order: 6;
}

.portal-redesign.mobile + .portal-footer,
.portal-redesign.mobile .portal-footer {
  width: min(750px, 100vw);
  margin: 0 auto;
  background: #fff;
  color: #000;
}

@media (max-width: 820px) {
  .portal-header {
    width: min(100vw - 28px, 100%);
    grid-template-columns: 1fr;
  }

  .portal-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-showcase {
    width: min(100vw - 28px, 100%);
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .portal-hero-copy,
  .portal-hero-art,
  .portal-info-band,
  .portal-lines-panel,
  .browser-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .portal-hero-copy {
    padding: 18px 0;
  }

  .portal-hero-art {
    min-height: 420px;
  }

  .portal-info-band {
    padding: 24px;
  }

  .portal-phone-art,
  .portal-brand-strip,
  .portal-copyright-strip {
    display: none;
  }

  .line-row {
    grid-template-columns: 70px 34px minmax(0, 1fr);
  }

  .line-link {
    grid-column: 1 / -1;
  }

  .admin-page {
    grid-template-columns: 1fr;
  }

  .admin-side {
    min-height: auto;
    position: relative;
  }

  .admin-side nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .platform-summary-hub {
    grid-template-columns: 1fr;
  }

  .platform-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-summary-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  :root {
    --glyph-size: 84px;
  }

  .stage-page {
    background-image: var(--stage-bg-mobile, var(--stage-bg-desktop, none));
  }

  .stage-card {
    min-height: 292px;
    padding-top: 36px;
  }

  .stage-slogan {
    font-size: 15px;
    letter-spacing: .1em;
    margin-bottom: 38px;
  }

  .primary-cta {
    font-size: 17px;
  }

  .admin-main {
    padding: 16px;
  }
}

/* Admin design consolidation layer.
   Keeps the console dense and operational while removing the mismatched
   button, badge, sidebar, and certificate-page styles accumulated above. */
.admin-page {
  --admin-bg: #f5f7fa;
  --admin-ink: #111827;
  --admin-muted: #64748b;
  --admin-soft: #f3f6fa;
  --admin-line: #d9e1ea;
  --admin-blue: #174ea6;
  --admin-teal: #0f766e;
  --admin-green: #15803d;
  --admin-amber: #a16207;
  --admin-red: #b42318;
  --admin-accent: #174ea6;
  grid-template-columns: 268px minmax(0, 1fr);
  background: var(--admin-bg);
}

.admin-page * {
  letter-spacing: 0;
}

.admin-page *:focus-visible {
  outline: 2px solid rgba(23, 78, 166, .5);
  outline-offset: 2px;
}

.admin-page .admin-side {
  background: #151b24;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
}

.admin-page .admin-brand {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-bottom-color: rgba(226, 232, 240, .1);
}

.admin-page .brand-mark {
  width: 40px;
  height: 40px;
  border-color: rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc !important;
}

.admin-page .admin-brand strong {
  overflow: hidden;
  font-size: 17px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .admin-brand span {
  color: #93a4b7;
}

.admin-page .admin-side .nav-group h4 {
  color: #8cc7ff;
  font-size: 11px;
}

.admin-page .admin-side .nav-group p {
  color: #75869b;
}

.admin-page .admin-side .nav-item {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  min-height: 48px;
  border-radius: 8px;
  color: #a7b3c2;
}

.admin-page .admin-side .nav-item:hover {
  border-color: rgba(140, 199, 255, .18);
  background: rgba(255, 255, 255, .045);
}

.admin-page .admin-side .nav-item.active {
  border-color: rgba(140, 199, 255, .28);
  background: #202b3a;
}

.admin-page .nav-index {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 7px;
  background: rgba(15, 23, 42, .64);
  color: #a7b3c2;
  font-size: 11px;
}

.admin-page .nav-item.active .nav-index {
  border-color: rgba(45, 212, 191, .45);
  background: #0f766e;
  color: #f0fdfa;
}

.admin-page .nav-copy strong {
  font-size: 13px;
}

.admin-page .nav-copy em {
  color: #7f8fa2;
  white-space: normal;
}

.admin-page .side-platform-tools {
  margin: 8px 0 10px;
  padding: 8px;
  border-color: rgba(148, 163, 184, .14);
  border-radius: 8px;
  background: rgba(15, 23, 42, .45);
}

.admin-page .admin-side .side-platform-summary-card {
  min-height: 64px;
  border-color: rgba(45, 212, 191, .2);
  background: rgba(15, 118, 110, .12);
}

.admin-page .admin-side .side-platform-add {
  min-height: 34px;
  border-color: rgba(140, 199, 255, .24);
  background: #1f2937;
  color: #dbeafe;
}

.admin-page .admin-side .side-platform-row {
  min-height: 40px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
}

.admin-page .admin-side .side-platform-order button {
  min-height: 40px;
}

.admin-page .admin-main {
  padding: 16px 20px 26px;
  overflow-x: hidden;
}

.admin-page .admin-topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) auto;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.admin-page .topbar-platform strong {
  max-width: 420px;
  font-size: 16px;
}

.admin-page .admin-crumb {
  margin-bottom: 2px !important;
  color: var(--admin-teal) !important;
  font-size: 12px;
}

.admin-page .platform-switcher {
  justify-self: start;
}

.admin-page .platform-switcher select {
  min-width: 172px;
  max-width: 260px;
}

.admin-page .topbar-actions {
  justify-self: end;
  margin-left: 0;
}

.admin-page .admin-preview-group {
  grid-template-columns: auto minmax(0, auto);
}

.admin-page .admin-preview-group > span {
  color: var(--admin-muted);
}

.admin-page .admin-preview-bar a,
.admin-page .preview-links a,
.admin-page .table-link {
  min-height: 30px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 700;
}

.admin-page .admin-preview-bar a:hover,
.admin-page .preview-links a:hover,
.admin-page .table-link:hover {
  border-color: #9fb4d0;
  background: #f3f6fa;
}

.admin-page .workflow-strip {
  margin-bottom: 14px;
  padding: 9px 12px;
  border-color: var(--admin-line);
  border-radius: 8px;
  background: #fff;
}

.admin-page .wf-stat {
  min-height: 30px;
  border: 1px solid #dde5ee;
  border-radius: 6px;
  background: #f7f9fc;
}

.admin-page .admin-panel {
  padding: 20px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.admin-page .admin-panel + .admin-panel {
  margin-top: 12px;
}

.admin-page .panel-heading {
  align-items: center;
  min-height: 42px;
  margin-bottom: 14px;
}

.admin-page .admin-panel h1 {
  color: var(--admin-ink);
  font-size: 21px;
  line-height: 1.25;
}

.admin-page .admin-panel h2 {
  color: var(--admin-ink);
}

.admin-page .admin-panel p {
  max-width: 1040px;
  margin-top: 5px;
  color: #4b617c;
  font-size: 13px;
  line-height: 1.55;
}

.admin-page .admin-kicker {
  margin-bottom: 6px;
  color: var(--admin-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.admin-page .admin-button,
.admin-page button.admin-button,
.admin-page a.admin-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #174ea6;
  border-radius: 6px;
  background: #174ea6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
}

.admin-page .admin-button:hover {
  border-color: #123d82;
  background: #123d82;
  box-shadow: none;
}

.admin-page .admin-button.secondary,
.admin-page a.admin-button.secondary {
  border-color: #c8d2df;
  background: #fff;
  color: #174ea6;
}

.admin-page .admin-button.secondary:hover,
.admin-page a.admin-button.secondary:hover {
  border-color: #9fb4d0;
  background: #f3f6fa;
}

.admin-page .admin-button.danger {
  border-color: #f3c3bf;
  background: #fff;
  color: var(--admin-red);
}

.admin-page .admin-button.danger:hover {
  border-color: #e8a09a;
  background: #fff7f6;
}

.admin-page .platform-summary-hub,
.admin-page .platform-current-panel,
.admin-page .platform-url-matrix-panel {
  border-color: var(--admin-line);
}

.admin-page .platform-summary-metrics div,
.admin-page .platform-scope-cards div,
.admin-page .tls-summary-grid div {
  border-color: #dce4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-page .platform-summary-metrics strong,
.admin-page .platform-scope-cards strong,
.admin-page .tls-summary-grid strong {
  color: #101827;
}

.admin-page .url-chip {
  border-color: #c8ded7;
  background: #f2faf7;
  color: #0f766e;
}

.admin-page .url-chip.muted {
  border-color: #dce4ee;
  background: #f8fafc;
  color: var(--admin-muted);
}

.admin-page .admin-table {
  border-color: #dce4ee;
  border-radius: 8px;
}

.admin-page .admin-table th {
  height: 40px;
  background: #f4f7fb;
  color: #43536a;
  font-weight: 700;
}

.admin-page .admin-table td {
  padding: 10px 12px;
}

.admin-page .admin-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.admin-page .admin-table tbody tr:hover td {
  background: #f5f8fc;
}

.admin-page .status-badge {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.admin-page .status-ok {
  border-color: #b7dec5;
  background: #f3fbf6;
  color: var(--admin-green);
}

.admin-page .status-warn {
  border-color: #ead8a2;
  background: #fffaf0;
  color: var(--admin-amber);
}

.admin-page .status-bad {
  border-color: #efc2bd;
  background: #fff7f6;
  color: var(--admin-red);
}

.admin-page .status-neutral {
  border-color: #d7e0ea;
  background: #f7f9fc;
  color: #53657d;
}

.admin-page .line-health-panel {
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-page .line-health-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-page .line-health-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-page .line-health-head p {
  margin: 4px 0 0;
}

.admin-page .line-health-grid {
  display: grid;
  gap: 8px;
}

.admin-page .line-health-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 90px 96px 76px 64px;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #fff;
}

.admin-page .line-health-row.is-disabled {
  background: #f5f7fa;
}

.admin-page .line-health-main {
  min-width: 0;
}

.admin-page .line-health-main strong,
.admin-page .line-health-main span,
.admin-page .line-health-main code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-page .line-health-main strong {
  color: var(--admin-ink);
  font-size: 14px;
}

.admin-page .line-health-main span {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-page .line-health-main code {
  margin-top: 3px;
  color: #51627a;
  font-size: 12px;
}

.admin-page .line-health-latency,
.admin-page .line-health-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  background: #f7f9fc;
  color: #53657d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-page .line-health-status {
  justify-content: flex-start;
  padding: 0 10px;
  border-radius: 6px;
  font-weight: 700;
}

.admin-page .probe-running .line-health-latency {
  border-color: #b8cce9;
  background: #eef5ff;
  color: var(--admin-blue);
}

.admin-page .probe-done .line-health-latency {
  border-color: #b7dec5;
  background: #f3fbf6;
  color: var(--admin-green);
}

.admin-page .probe-timeout .line-health-latency,
.admin-page .probe-invalid .line-health-latency {
  border-color: #efc2bd;
  background: #fff7f6;
  color: var(--admin-red);
}

.admin-page .line-refresh-button {
  width: 76px;
  min-width: 0;
}

.admin-page .line-refresh-button:disabled {
  border-color: #d9e1ea;
  background: #f3f6fa;
  color: #94a3b8;
}

.admin-page .line-health-muted {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-page .cert-table {
  table-layout: fixed;
  min-width: 1120px;
}

.admin-page .cert-table th:nth-child(1),
.admin-page .cert-table td:nth-child(1) {
  width: 18%;
}

.admin-page .cert-table th:nth-child(2),
.admin-page .cert-table td:nth-child(2),
.admin-page .cert-table th:nth-child(3),
.admin-page .cert-table td:nth-child(3),
.admin-page .cert-table th:nth-child(4),
.admin-page .cert-table td:nth-child(4) {
  width: 23%;
}

.admin-page .cert-table th:nth-child(5),
.admin-page .cert-table td:nth-child(5) {
  width: 13%;
}

.admin-page .cert-table small {
  display: block;
  margin-top: 6px;
  color: #53657d;
  line-height: 1.35;
}

.admin-page .cert-actions {
  align-items: stretch;
  gap: 7px;
}

.admin-page .inline-cert-form .admin-button {
  min-height: 34px;
  width: 100%;
}

.admin-page .inline-cert-form .admin-button:disabled {
  border-color: #d9e1ea;
  background: #f3f6fa;
  color: #94a3b8;
}

.admin-page .cert-note {
  padding: 10px 12px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-page .cloudflare-config-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.admin-page .field input,
.admin-page .field textarea,
.admin-page .field select,
.admin-page .platform-switcher select,
.admin-page .admin-table select,
.admin-page .admin-table input {
  border-color: #c8d2df;
  border-radius: 6px;
  background: #fff;
}

.admin-page .field input:focus,
.admin-page .field textarea:focus,
.admin-page .field select:focus,
.admin-page .platform-switcher select:focus {
  border-color: #174ea6;
  box-shadow: 0 0 0 3px rgba(23, 78, 166, .12);
}

@media (max-width: 1180px) {
  .admin-page .admin-topbar {
    grid-template-columns: 1fr;
  }

  .admin-page .platform-switcher,
  .admin-page .topbar-actions {
    justify-self: stretch;
  }

  .admin-page .topbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-page .cloudflare-config-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }

  .admin-page .line-health-row {
    grid-template-columns: minmax(220px, 1fr) 90px 96px;
  }

  .admin-page .line-health-row .table-link {
    grid-column: 2 / 3;
  }
}

@media (max-width: 720px) {
  .admin-page .admin-main {
    padding: 12px;
  }

  .admin-page .cloudflare-config-grid,
  .admin-page .platform-summary-metrics {
    grid-template-columns: 1fr;
  }

  .admin-page .line-health-head,
  .admin-page .line-health-row {
    grid-template-columns: 1fr;
  }

  .admin-page .line-health-row .table-link {
    grid-column: auto;
  }

  .admin-page .line-health-status,
  .admin-page .line-refresh-button {
    width: 100%;
  }
}

/* Legacy tertiary page: scoped copy of the old ssgj desktop/mobile layout. */
.legacy-portal-page,
.legacy-portal-page div,
.legacy-portal-page ul,
.legacy-portal-page li,
.legacy-portal-page p,
.legacy-portal-page span,
.legacy-portal-page em,
.legacy-portal-page a {
  margin: 0;
  padding: 0;
}

.legacy-portal-page *,
.legacy-portal-page *::before,
.legacy-portal-page *::after {
  box-sizing: content-box;
}

.legacy-portal-page {
  color: #fff;
  font: 14px/1.6 "Microsoft Yahei", Arial, sans-serif;
}

.legacy-portal-page a {
  color: #fff;
  text-decoration: none;
}

.legacy-portal-page a:hover {
  text-decoration: none;
}

.legacy-portal-page ul,
.legacy-portal-page li {
  list-style: none;
}

.legacy-portal-page img {
  border: 0;
  vertical-align: top;
}

.legacy-portal-page .clearfix::after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

body.legacy-desktop {
  min-width: 1200px;
  background: var(--portal-bg-image, none) no-repeat center top;
}

body.legacy-desktop,
body.legacy-desktop #container {
  height: 100vh;
}

.legacy-desktop #container {
  margin: 0 auto;
  max-width: 1920px;
  position: relative;
}

.legacy-desktop .header {
  width: 100%;
  padding: 43px 0;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.legacy-desktop .header .logo {
  width: 37.5%;
  padding-left: 120px;
  float: left;
  box-sizing: border-box;
}

.legacy-desktop .header .logo img {
  width: auto;
  max-width: 400px;
}

.legacy-desktop .header .navi {
  width: 62.5%;
  margin-top: 9px;
  padding-right: 120px;
  float: left;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
}

.legacy-desktop .header .navi > li {
  position: relative;
}

.legacy-desktop .header .navi > li > a {
  display: block;
  overflow: hidden;
  zoom: 1;
}

.legacy-desktop .header .navi > li > a img {
  width: 24px;
  margin: 4px 20px 0 0;
  display: block;
  float: left;
}

.legacy-desktop .header .navi > li > a .txt {
  display: block;
  float: left;
  color: #a1a1a1;
  font-size: 14px;
}

.legacy-desktop .header .navi > li > a .txt span {
  margin-bottom: 3px;
  display: block;
  color: #000;
  font-size: 20px;
  font-weight: bold;
}

.legacy-desktop .header .navi > li:hover > a .txt,
.legacy-desktop .header .navi > li:hover > a .txt span {
  color: #2f4cff;
}

.legacy-desktop .header .navi .jsBox {
  margin-left: -269px;
  padding-top: 25px;
  width: 578px;
  position: absolute;
  left: 50%;
  top: 100%;
  display: none;
  box-sizing: border-box;
}

.legacy-desktop .header .navi > li:hover .jsBox {
  display: block;
}

.legacy-desktop .header .navi .jsBox .arrow,
.legacy-desktop .header .navi .jsBox02 .arrow {
  width: 0;
  height: 0;
  display: block;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #2f4cff;
  position: absolute;
  left: 50%;
}

.legacy-desktop .header .navi .jsBox .arrow {
  margin-left: -9px;
  top: 17px;
}

.legacy-desktop .header .navi .jsBox ul {
  padding: 25px 25px 16px;
  border: 2px solid #2f4cff;
  border-radius: 5px;
  background: #fff;
}

.legacy-desktop .header .navi .jsBox li {
  margin-bottom: 10px;
  overflow: hidden;
  zoom: 1;
  color: #313131;
  font-size: 16px;
  line-height: 40px;
  text-align: center;
  display: block;
  min-height: 0;
}

.legacy-desktop .header .navi .jsBox li .ms {
  margin-right: 11px;
  width: 72px;
  height: auto;
  display: block;
  float: left;
  color: #313131;
  border: 1px solid #c8c8c8;
  background: #f0f0f0;
}

.legacy-desktop .header .navi .jsBox li img {
  margin: 14px 10px 0 0;
  width: auto;
  display: block;
  float: left;
}

.legacy-desktop .header .navi .jsBox li .url {
  width: 253px;
  float: left;
  display: block;
  color: #313131;
  border: 1px solid #c8c8c8;
  background: #f0f0f0;
  box-sizing: border-box;
}

.legacy-desktop .header .navi .jsBox li a {
  display: block;
  float: right;
  width: 136px;
  color: #fff;
  border: 1px solid #2f4cff;
  background: #2f4cff;
  box-sizing: border-box;
}

.legacy-desktop .header .navi .jsBox li a:hover {
  border-color: #d4a14e;
  background: #d4a14e;
}

.legacy-desktop .header .navi .jsBox02 {
  margin-left: -96px;
  padding-top: 23px;
  width: 198px;
  position: absolute;
  left: 50%;
  top: 100%;
  display: none;
  box-sizing: border-box;
}

.legacy-desktop .header .navi > li:hover .jsBox02 {
  display: block;
}

.legacy-desktop .header .navi .jsBox02 .arrow {
  margin-left: -9px;
  top: 15px;
}

.legacy-desktop .header .navi .jsBox02 ul {
  padding: 38px 0 12px 40px;
  border: 2px solid #2f4cff;
  border-radius: 5px;
  background: #fff;
}

.legacy-desktop .header .navi .jsBox02 li {
  margin-bottom: 26px;
  position: relative;
}

.legacy-desktop .header .navi .jsBox02 li a {
  color: #282828;
  font-size: 14px;
}

.legacy-desktop .header .navi .jsBox02 li a:hover {
  color: #2f4cff;
}

.legacy-desktop .header .navi .jsBox02 li a img {
  margin: -2px 8px 0 0;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.legacy-desktop .header .navi .jsBox02 .hot img {
  width: 46px;
  height: auto;
  margin-top: 4px;
}

.legacy-desktop #main {
  padding-top: 165px;
  height: 100%;
  box-sizing: border-box;
}

.legacy-desktop #main .lBox {
  width: 37.5%;
  height: 100%;
  float: left;
  position: relative;
  z-index: 10;
}

.legacy-desktop #main .lBox .ttl {
  padding: 0 0 280px 120px;
  height: 100%;
  box-sizing: border-box;
}

.legacy-desktop #main .lBox .ttl span {
  height: 100%;
  position: relative;
  display: block;
}

.legacy-desktop #main .lBox .ttl img {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.legacy-desktop #main .lBox .txtBox {
  padding: 0 120px;
  width: 100%;
  height: 280px;
  position: absolute;
  left: 0;
  bottom: 0;
  background: #2f4cff;
  box-sizing: border-box;
}

.legacy-desktop #main .lBox .txtBox p {
  padding: 0 130px 12px 120px;
  width: 100%;
  position: absolute;
  left: 0;
  top: 50%;
  color: #fff;
  font-size: 14px;
  line-height: 2.15;
  text-align: justify;
  text-justify: inter-ideograph;
  transform: translateY(-50%);
  box-sizing: border-box;
}

.legacy-desktop #main .lBox .txtBox p span {
  margin-bottom: 12px;
  display: block;
  color: #fff;
  font-size: 30px;
}

.legacy-desktop #main .lBox .txtBox .img01 {
  position: absolute;
  right: -73px;
  top: -90px;
  z-index: 1;
}

.legacy-desktop #main .lBox .txtBox .img02 {
  position: absolute;
  right: -160px;
  top: 0;
}

.legacy-desktop #main .rBox {
  padding-right: 120px;
  width: 62.5%;
  height: 100%;
  float: right;
  position: relative;
  box-sizing: border-box;
}

.legacy-desktop #main .rBox .photo {
  width: 100%;
  height: 100%;
  background: var(--portal-photo-image, none) no-repeat center center;
  background-size: auto 100%;
}

.legacy-desktop #main .rBox .copyright {
  position: absolute;
  right: 53px;
  bottom: 58px;
}

@media all and (max-width: 1620px) {
  .legacy-desktop .header .logo,
  .legacy-desktop #main .lBox .ttl {
    padding-left: 60px;
  }

  .legacy-desktop .header .navi,
  .legacy-desktop #main .rBox {
    padding-right: 60px;
  }

  .legacy-desktop #main .lBox .ttl span img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
  }

  .legacy-desktop #main .lBox .txtBox {
    padding: 0 60px;
  }

  .legacy-desktop #main .lBox .txtBox p {
    padding: 0 90px 0 60px;
  }

  .legacy-desktop #main .rBox .copyright {
    right: 23px;
  }
}

@media all and (max-width: 1320px) {
  .legacy-desktop .header {
    padding: 30px 0;
  }

  .legacy-desktop .header .logo,
  .legacy-desktop #main .lBox .ttl {
    padding-left: 40px;
  }

  .legacy-desktop .header .navi,
  .legacy-desktop #main .rBox {
    padding-right: 40px;
  }

  .legacy-desktop .header .navi > li > a .txt {
    font-size: 13px;
  }

  .legacy-desktop #main {
    padding-top: 130px;
  }

  .legacy-desktop #main .lBox .ttl span img {
    max-width: 70%;
    max-height: 70%;
  }

  .legacy-desktop #main .lBox .txtBox {
    padding: 0 40px;
  }

  .legacy-desktop #main .lBox .txtBox p {
    padding: 0 90px 0 40px;
    font-size: 13px;
  }

  .legacy-desktop #main .lBox .txtBox p span {
    font-size: 28px;
  }

  .legacy-desktop #main .rBox .copyright {
    right: 13px;
  }
}

body.legacy-mobile {
  --mrem: min(10vw, 75px);
  overflow-x: hidden;
  background: #fff;
  color: #1e2c37;
  font-family: "STHeiti", "Microsoft YaHei", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
}

.legacy-mobile #container {
  margin: 0 auto;
  max-width: 750px;
  background: #fff;
}

.legacy-mobile img {
  width: 100%;
  vertical-align: top;
}

.legacy-mobile .header {
  padding: calc(var(--mrem) * .24) 0;
  background: #fff;
}

.legacy-mobile .header .logo {
  margin: 0 auto;
  width: calc(var(--mrem) * 5);
}

.legacy-mobile #main .photo {
  position: relative;
}

.legacy-mobile #main .photo a {
  margin-left: calc(var(--mrem) * -4);
  width: calc(var(--mrem) * 8.12);
  display: block;
  position: absolute;
  left: 50%;
  top: calc(var(--mrem) * .28);
}

.legacy-mobile #main .navi {
  margin: calc(var(--mrem) * .2);
  position: relative;
  border: 1px solid #1e2c37;
}

.legacy-mobile #main .navi > li {
  width: 33.33%;
  float: left;
}

.legacy-mobile #main .navi > li.li01,
.legacy-mobile #main .navi > li.li022 {
  width: 50%;
}

.legacy-mobile #main .navi > li > a {
  padding: calc(var(--mrem) * .76) 0 0;
  height: calc(var(--mrem) * 2.58);
  overflow: hidden;
  zoom: 1;
  color: #1e2c37;
  text-align: center;
  display: block;
  border-right: 1px solid #1e2c37;
  background: #fff;
  box-sizing: border-box;
}

.legacy-mobile #main .navi > li.li022 > a,
.legacy-mobile #main .navi > li.li05 > a {
  border-right: 0;
}

.legacy-mobile #main .navi > li > a .img {
  margin: calc(var(--mrem) * .1) 0 calc(var(--mrem) * .12);
  display: block;
}

.legacy-mobile #main .navi > li > a .img img {
  margin: 0 auto;
  width: auto;
  height: calc(var(--mrem) * .4);
  display: block;
}

.legacy-mobile #main .navi > li > a .txt {
  display: block;
  font-size: calc(var(--mrem) * .22);
  white-space: nowrap;
}

.legacy-mobile #main .navi > li > a .txt span {
  margin-bottom: calc(var(--mrem) * .08);
  display: block;
  color: #000;
  font-size: calc(var(--mrem) * .32);
  font-weight: bold;
}

.legacy-mobile #main .navi > li.on > a .txt,
.legacy-mobile #main .navi > li.on > a .txt span {
  color: #2f4cff;
}

.legacy-mobile #main .navi > li .jsBox {
  width: 100%;
  position: absolute;
  left: 0;
  top: calc(var(--mrem) * -.22);
  display: none;
  border: 1px solid #2f4cff;
  background: rgba(255, 255, 255, .95);
  transform: translateY(-100%);
  box-sizing: border-box;
}

.legacy-mobile #main .navi > li.on .jsBox {
  display: block;
}

.legacy-mobile #main .navi > li .jsBox ul {
  padding: calc(var(--mrem) * .43) calc(var(--mrem) * .4) calc(var(--mrem) * .13);
}

.legacy-mobile #main .navi > li .jsBox li {
  margin-bottom: calc(var(--mrem) * .25);
  overflow: hidden;
  zoom: 1;
  display: block;
}

.legacy-mobile #main .navi > li .jsBox li span {
  display: block;
  float: left;
  color: #313131;
  font-size: calc(var(--mrem) * .3);
  line-height: calc(var(--mrem) * .7);
  text-align: center;
  border: 1px solid #c8c8c8;
  background: #f0f0f0;
  box-sizing: border-box;
}

.legacy-mobile #main .navi > li .jsBox li .ms {
  width: calc(var(--mrem) * 1.1);
}

.legacy-mobile #main .navi > li .jsBox li img {
  margin: calc(var(--mrem) * .25) calc(var(--mrem) * .28) 0 calc(var(--mrem) * .38);
  width: calc(var(--mrem) * .45);
  display: block;
  float: left;
}

.legacy-mobile #main .navi > li .jsBox li .url {
  width: calc(var(--mrem) * 4.14);
}

.legacy-mobile #main .navi > li .jsBox li a {
  width: calc(var(--mrem) * 2.15);
  display: block;
  float: right;
  color: #fff;
  font-size: calc(var(--mrem) * .3);
  font-weight: bold;
  line-height: calc(var(--mrem) * .7);
  text-align: center;
  border: 1px solid #2f4cff;
  background: #2f4cff;
  box-sizing: border-box;
}

.legacy-mobile #main .navi > li .jsBox .arrow,
.legacy-mobile #main .navi > li .jsBox02 .arrow {
  width: 0;
  height: 0;
  display: block;
  border-left: calc(var(--mrem) * .12) solid transparent;
  border-right: calc(var(--mrem) * .12) solid transparent;
  border-top: calc(var(--mrem) * .14) solid #2f4cff;
  position: absolute;
  bottom: calc(var(--mrem) * -.14);
}

.legacy-mobile #main .navi > li .jsBox .arrow {
  left: 25%;
  margin-left: calc(var(--mrem) * -.12);
}

.legacy-mobile #main .navi > li .jsBox02 {
  width: 33.33%;
  position: absolute;
  top: calc(var(--mrem) * 2.5);
  display: none;
  border: 1px solid #2f4cff;
  background: #fff;
  transform: translateY(-100%);
  box-sizing: border-box;
}

.legacy-mobile #main .navi > li.on .jsBox02 {
  display: block;
}

.legacy-mobile #main .navi > li .jsBox02 ul {
  padding: calc(var(--mrem) * .2) 0 calc(var(--mrem) * .6) calc(var(--mrem) * .2);
}

.legacy-mobile #main .navi > li .jsBox02 li {
  margin-top: calc(var(--mrem) * .35);
}

.legacy-mobile #main .navi > li .jsBox02 li a {
  color: #000;
  font-size: 13px;
}

.legacy-mobile #main .navi > li .jsBox02 li a img {
  width: 20px;
  height: 20px;
  display: inline-block;
  margin: calc(var(--mrem) * -.02) calc(var(--mrem) * .2) 0 0;
  vertical-align: middle;
}

.legacy-mobile #main .navi > li .jsBox02 .hot img {
  width: 46px;
  height: auto;
  margin: 4px 0 0 28px;
}

.legacy-mobile #main .navi > li .jsBox02 .arrow {
  left: 50%;
  margin-left: calc(var(--mrem) * -.12);
}

.legacy-mobile .li03,
.legacy-mobile .li04,
.legacy-mobile .li05 {
  border-top: 1px solid #1e2c37;
}

.legacy-mobile li.li01,
.legacy-mobile li.li022 {
  border-bottom: 1px solid #fff;
}

.legacy-mobile .footer {
  overflow: hidden;
  background: #fff;
}

.legacy-mobile .footer p {
  color: #000;
  font-size: calc(var(--mrem) * .25);
  line-height: calc(var(--mrem) * .76);
  text-align: center;
}

body.legacy-mobile-poster {
  background: #dfe8f6;
}

.legacy-mobile-poster #container {
  max-width: 430px;
  min-height: 100vh;
  box-shadow: 0 0 0 1px rgba(48, 66, 92, .08);
}

.legacy-mobile-poster .poster-hero {
  position: relative;
  overflow: hidden;
  padding: 24px 18px 0;
  background: #fff;
}

.legacy-mobile-poster .poster-logo {
  width: 76%;
  max-width: 320px;
  margin: 0 auto 12px;
  text-align: center;
}

.legacy-mobile-poster .poster-logo a,
.legacy-mobile-poster .poster-logo span {
  display: block;
}

.legacy-mobile-poster .poster-logo span {
  color: #1d2e44;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
}

.legacy-mobile-poster .poster-title-image {
  width: 86%;
  margin: 0 auto 8px;
}

.legacy-mobile-poster .poster-title-text {
  display: grid;
  gap: 6px;
  margin: 0 auto 10px;
  text-align: center;
}

.legacy-mobile-poster .poster-title-text strong {
  color: #f49b1f;
  font-size: 25px;
  line-height: 1.2;
}

.legacy-mobile-poster .poster-title-text span {
  color: #1d2e44;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}

.legacy-mobile-poster .poster-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 8px;
}

.legacy-mobile-poster .poster-line-chip {
  min-height: 36px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 4px;
  padding: 0 7px 0 10px;
  border: 1px solid #f0a326;
  border-radius: 2px;
  background: #fffaf0;
  color: #222;
  text-decoration: none;
}

.legacy-mobile-poster .poster-line-chip span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-mobile-poster .poster-line-chip em {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0a326;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.legacy-mobile-poster .poster-games {
  margin: 4px 0 0;
  color: #263951;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.legacy-mobile-poster .poster-visual {
  position: relative;
  width: calc(100% + 36px);
  min-height: 248px;
  margin: 4px -18px 0;
  background: var(--portal-photo-image, none) no-repeat center bottom / cover;
}

.legacy-mobile-poster .poster-visual img {
  display: block;
}

.legacy-mobile-poster .poster-blue {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 30px;
  background: #2f4cff;
  color: #fff;
  text-align: center;
}

.legacy-mobile-poster .poster-blue h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

.legacy-mobile-poster .poster-blue p {
  margin: 0 auto;
  max-width: 356px;
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.75;
  text-align: left;
}

.legacy-mobile-poster .poster-blue-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
}

.legacy-mobile-poster .poster-blue-media .poster-phone {
  max-width: 240px;
  margin: 0 auto;
}

.legacy-mobile-poster .poster-blue-media .poster-brand-mark {
  max-width: 46px;
  justify-self: end;
}

.legacy-mobile-poster .poster-blue-media .poster-brand-mark:first-child {
  grid-column: 2;
}

.legacy-mobile-poster .footer {
  background: #2f4cff;
}

.legacy-mobile-poster .footer p {
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  line-height: 34px;
}

@media (max-width: 380px) {
  .legacy-mobile-poster .poster-hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .legacy-mobile-poster .poster-visual {
    width: calc(100% + 28px);
    min-height: 220px;
    margin-right: -14px;
    margin-left: -14px;
  }

  .legacy-mobile-poster .poster-games {
    font-size: 22px;
  }
}
