:root{
    --btn-gradient: linear-gradient(90deg, #caa469 0%, #e1c491 24%, #f3e5c5 50%, #dec08a 76%, #c79e5c 100%);
    --panel-bg: rgba(10, 14, 24, 0.95);
    --card-bg: rgba(255, 255, 255, 0.06);
    --text-main: #ffffff;
    --text-sub: rgba(255,255,255,0.82);
    --border-soft: rgba(255,255,255,0.12);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --app-height: 100vh;
    --viewport-width: 100vw;
    --btn-text: #6e5328;
    --space-balance-desktop: 22px;
    --space-balance-mobile: 22px;

    --crown-gradient: linear-gradient(90deg, #d78b44 0%, #ebb06b 22%, #ffd8a9 50%, #e8a55d 78%, #ca7835 100%);
    --member-gradient: linear-gradient(90deg, #597db4 0%, #81a8dc 22%, #d8e9ff 50%, #7399cf 78%, #46699d 100%);
    --agent-gradient: linear-gradient(90deg, #468b6f 0%, #6cb494 22%, #d8f3e7 50%, #5fa888 78%, #37765d 100%);

    --crown-text: #6c3815;
    --member-text: #29486f;
    --agent-text: #215340;

    --app-download-gradient: linear-gradient(
      90deg,
      rgba(200, 200, 200, 0.7) 0%,
      rgba(228, 228, 228, 0.7) 24%,
      rgba(251, 251, 251, 0.7) 50%,
      rgba(231, 231, 231, 0.7) 76%,
      rgba(190, 190, 190, 0.7) 100%
    );
    --app-download-text: #4f4f4f;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  html, body {
    width: 100%;
    min-height: 100%;
    background: #000;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
  }

  html {
    height: 100%;
    overscroll-behavior-y: none;
  }

  body {
    position: relative;
    color: var(--text-main);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.modal-open {
    overflow: hidden;
  }

  .site-main {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    min-height: var(--app-height);
    display: flex;
    flex-direction: column;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
  }

  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  #bgv {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #000;
    z-index: 1;
    opacity: 0;
    transition: opacity .6s ease;
  }

  #bgv.play {
    opacity: 1;
  }

  .mobile-bg {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #000 url("/static/images/mobile-bg.jpg") center center / cover no-repeat;
  }

  .video-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 2;
    pointer-events: none;
  }

  .top-action-bar {
    position: fixed;
    top: max(24px, calc(var(--safe-top) + 12px));
    right: max(20px, calc(var(--safe-right) + 12px));
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: min(560px, calc(100% - 28px - var(--safe-left) - var(--safe-right)));
  }

  .top-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 142px;
    padding: 13px 22px;
    border-radius: 999px;
    text-decoration: none;
    border: 0;
    outline: none;
    color: var(--btn-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    background: var(--btn-gradient);
    background-size: 320% 100%;
    animation: flowGradient 5.8s linear infinite;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
    transition: transform .15s ease-in-out, box-shadow .15s ease-in-out;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255,255,255,0.28);
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }

  .top-mini-btn::before,
  .menu-btn::before,
  .modal-btn::before,
  .yx-modal-title::before,
  .modal-close::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.16) 35%, rgba(255,255,255,0.28) 50%, transparent 70%);
    transform: translateX(-130%);
    animation: glossySweep 3.8s ease-in-out infinite;
    pointer-events: none;
  }

  .top-mini-btn .btn-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    font-size: 17px;
    line-height: 1;
    transform: translateY(-1px);
    position: relative;
    z-index: 1;
  }

  .top-mini-btn .btn-text-inner {
    position: relative;
    z-index: 1;
  }

  .top-btn-crown {
    background: var(--crown-gradient);
    color: var(--crown-text);
    box-shadow: 0 8px 22px rgba(195, 115, 44, 0.28);
  }

  .top-btn-member {
    background: var(--member-gradient);
    color: var(--member-text);
    box-shadow: 0 8px 22px rgba(77, 111, 167, 0.26);
  }

  .top-btn-agent {
    background: var(--agent-gradient);
    color: var(--agent-text);
    box-shadow: 0 8px 22px rgba(59, 117, 93, 0.25);
  }

  .top-mini-btn:hover {
    transform: translateY(-2px);
  }

  .top-mini-btn:active {
    transform: translateY(0);
  }

  .page-content {
    position: relative;
    z-index: 3;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 56px 20px 0;
  }

  .center-menu {
    width: 100%;
    max-width: 980px;
    padding: 0 10px;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-38px);
  }

  .logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-balance-desktop);
    transform: none;
  }

  .logo-wrap img {
    height: 208px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
  }

  .menu-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 430px;
  }

  .qrcode-box {
    position: absolute;
    left: -30px;
    top: 60%;
    transform: translateY(-50%);
    width: 220px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(250, 250, 250, 0.8);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    text-align: center;
  }

  .qrcode-title {
    margin-bottom: 12px;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 700;
    color: #fff;
  }

  .qrcode-box img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
  }

  .menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .menu-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    padding: 8px 0 10px;
    text-decoration: none;
    outline: none;
    border: 0;
    color: var(--btn-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    background: var(--btn-gradient);
    background-size: 320% 100%;
    border-radius: 3px;
    transition: .1s ease-in-out;
    animation: flowGradient 5.8s linear infinite;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    user-select: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-shadow: 0 1px 0 rgba(255,255,255,0.28);
    position: relative;
    overflow: hidden;
  }

  .menu-btn > * {
    position: relative;
    z-index: 1;
  }

  .menu-btn:hover {
    transform: scale(1.05);
  }

  .menu-btn:active {
    transform: scale(1);
  }

  .mobile-only {
    display: none;
  }

  .app-download-btn {
    background: var(--btn-gradient);
    color: var(--btn-text);
    gap: 8px;
  }

  .app-download-btn .app-os-icons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    line-height: 1;
    position: relative;
    z-index: 1;
  }

  .app-download-btn .app-text {
    position: relative;
    z-index: 1;
  }

  .copyright-bar {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 7;
    width: min(96%, 820px);
    margin: var(--space-balance-desktop) auto max(12px, calc(var(--safe-bottom) + 8px));
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.90);
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  }

  .yx-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(20px, calc(var(--safe-top) + 8px)) max(20px, calc(var(--safe-right) + 8px)) max(20px, calc(var(--safe-bottom) + 8px)) max(20px, calc(var(--safe-left) + 8px));
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .yx-modal.show {
    display: flex;
  }

  .yx-modal-dialog {
    position: relative;
    width: min(100%, 760px);
    max-height: min(88vh, calc(var(--app-height) - 40px));
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background:
      linear-gradient(var(--panel-bg), var(--panel-bg)) padding-box,
      var(--btn-gradient) border-box;
    border: 2px solid transparent;
    box-shadow: 0 18px 40px rgba(0,0,0,.42);
  }

  .yx-modal-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 58px 12px 58px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--border-soft);
  }

  .yx-modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    max-width: 100%;
    padding: 6px 0 8px;
    border-radius: 3px;
    color: var(--btn-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    background: var(--btn-gradient);
    background-size: 320% 100%;
    animation: flowGradient 5.8s linear infinite;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    text-shadow: 0 1px 0 rgba(255,255,255,0.28);
    position: relative;
    overflow: hidden;
  }

  .modal-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 3px;
    border: 0;
    outline: none;
    font-size: 22px;
    line-height: 1;
    color: var(--btn-text);
    cursor: pointer;
    background: var(--btn-gradient);
    background-size: 320% 100%;
    animation: flowGradient 5.8s linear infinite;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    text-shadow: 0 1px 0 rgba(255,255,255,0.28);
    overflow: hidden;
  }

  .yx-modal-body {
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .yx-section-card {
    padding: 14px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .yx-section-card + .yx-section-card {
    margin-top: 12px;
  }

  .yx-section-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #fff;
  }

  .yx-section-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-sub);
    word-break: break-word;
  }

  .yx-note-list {
    display: grid;
    gap: 8px;
  }

  .yx-note-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-sub);
  }

  .yx-note-bullet {
    flex: 0 0 auto;
    color: #fff;
    font-weight: 700;
    transform: translateY(1px);
  }

  .yx-kv-grid {
    display: grid;
    gap: 10px;
  }

  .yx-kv-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.8;
  }

  .yx-kv-item b {
    display: block;
    color: #fff;
    margin-bottom: 4px;
    font-size: 15px;
  }

  .yx-table-wrap {
    margin-top: 10px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
  }

  .yx-data-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: rgba(255,255,255,0.03);
  }

  .yx-data-table th,
  .yx-data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-sub);
    white-space: normal;
    word-break: break-word;
  }

  .yx-data-table th {
    color: #fff;
    font-weight: 700;
    background: rgba(255,255,255,0.06);
  }

  .yx-data-table strong {
    color: #fff;
  }

  .yx-modal-actions {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.03);
  }

  .modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 3px;
    text-decoration: none;
    border: 0;
    outline: none;
    color: var(--btn-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    background: var(--btn-gradient);
    background-size: 320% 100%;
    animation: flowGradient 5.8s linear infinite;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transition: .1s ease-in-out;
    text-shadow: 0 1px 0 rgba(255,255,255,0.28);
    position: relative;
    overflow: hidden;
  }

  .modal-btn:hover {
    transform: scale(1.02);
  }

  .modal-btn:active {
    transform: scale(0.99);
  }

  @keyframes flowGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 320% 50%; }
  }

  @keyframes glossySweep {
    0% { transform: translateX(-130%); }
    55% { transform: translateX(130%); }
    100% { transform: translateX(130%); }
  }

  @media screen and (max-width: 900px) {
    .qrcode-box {
      left: 6px;
      width: 190px;
    }

    .center-menu {
      max-width: 920px;
    }
  }

  @media screen and (max-width: 768px) {
    #bgv {
      display: none;
    }

    .mobile-bg {
      display: block;
    }

    .video-mask {
      background: rgba(0, 0, 0, 0.22);
    }

    .site-main {
      justify-content: flex-start;
    }

    .top-action-bar {
      position: relative;
      top: auto;
      right: auto;
      left: auto;
      width: min(100%, 540px);
      max-width: none;
      margin: max(16px, calc(var(--safe-top) + 10px)) auto 0;
      padding: 0 12px;
      display: flex;
      flex-wrap: nowrap;
      gap: 8px;
      justify-content: center;
      align-items: stretch;
    }

    .top-btn-crown {
      grid-column: auto;
    }

    .top-mini-btn {
      flex: 1 1 0;
      width: auto;
      min-width: 0;
      min-height: 46px;
      padding: 10px 8px;
      font-size: clamp(11px, 3.1vw, 13px);
      gap: 4px;
      white-space: nowrap;
      line-height: 1;
      text-align: center;
    }

    .top-mini-btn .btn-mark {
      font-size: 15px;
      width: 16px;
      min-width: 16px;
      align-self: center;
    }

    .top-mini-btn .btn-text-inner {
      display: inline-block;
      min-width: 0;
    }

    .page-content {
      align-items: flex-start;
      padding: 18px 12px 0;
    }

    .center-menu {
      max-width: 100%;
      padding: 0 4px;
      border-radius: 12px;
      transform: none;
    }

    .logo-wrap {
      margin-bottom: 20px;
      transform: none;
    }

    .logo-wrap img {
      height: clamp(132px, 28vw, 184px);
      max-width: min(100%, 320px);
    }

    .menu-stage {
      min-height: auto;
      flex-direction: column;
      gap: 12px;
      width: 100%;
    }

    .qrcode-box {
      display: none;
    }

    .menu-grid {
      gap: 12px;
      width: min(100%, 360px);
    }

    .menu-btn {
      width: 100%;
      min-height: 50px;
      font-size: clamp(18px, 4.8vw, 20px);
      padding: 10px 12px 11px;
    }

    .menu-btn:hover {
      transform: scale(1);
    }

    .menu-btn:active {
      transform: scale(.98);
    }

    .mobile-only {
      display: inline-flex;
    }

    .app-download-btn {
      background: var(--app-download-gradient);
      color: var(--app-download-text);
      text-shadow: 0 1px 0 rgba(255,255,255,0.55);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
      background-size: 320% 100%;
      animation: flowGradient 5.8s linear infinite;
    }

    .app-download-btn .app-os-icons {
      font-size: 16px;
      gap: 5px;
    }

    .copyright-bar {
      width: calc(100% - 24px);
      font-size: 12px;
      line-height: 1.6;
      margin: 18px auto max(12px, calc(var(--safe-bottom) + 8px));
    }

    .yx-modal {
      padding: max(10px, calc(var(--safe-top) + 6px)) max(10px, calc(var(--safe-right) + 6px)) max(10px, calc(var(--safe-bottom) + 6px)) max(10px, calc(var(--safe-left) + 6px));
    }

    .yx-modal-dialog {
      width: 100%;
      max-height: calc(var(--app-height) - 20px);
      border-radius: 14px;
    }

    .yx-modal-head {
      padding: 10px 48px 10px 48px;
    }

    .yx-modal-title {
      width: min(220px, calc(100% - 8px));
      font-size: 16px;
      padding: 5px 0 7px;
    }

    .modal-close {
      right: 10px;
      width: 34px;
      height: 34px;
      flex-basis: 34px;
      font-size: 20px;
    }

    .yx-modal-body {
      padding: 10px;
    }

    .yx-section-card {
      padding: 10px;
    }

    .yx-section-title {
      font-size: 15px;
    }

    .yx-section-desc,
    .yx-note-item,
    .yx-kv-item {
      font-size: 13px;
      line-height: 1.72;
    }

    .yx-table-wrap,
    #modal-activity .yx-table-wrap {
      overflow-x: hidden;
    }

    .yx-data-table,
    #modal-activity .yx-data-table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }

    .yx-data-table th,
    .yx-data-table td,
    #modal-activity .yx-data-table th,
    #modal-activity .yx-data-table td {
      padding: 6px 4px;
      font-size: 11px;
      line-height: 1.45;
      text-align: center;
      white-space: normal;
      word-break: break-word;
    }

    #modal-activity .yx-data-table td::before {
      content: none !important;
    }

    .yx-modal-actions {
      padding: 10px;
    }

    .modal-btn {
      min-height: 46px;
      font-size: 15px;
    }
  }

  @media screen and (max-width: 430px) {
    .top-action-bar {
      width: min(100%, 360px);
      padding: 0 10px;
      gap: 7px;
    }

    .top-mini-btn {
      min-height: 44px;
      font-size: 13px;
      padding: 9px 8px;
    }

    .page-content {
      padding-top: 14px;
    }

    .logo-wrap {
      margin-bottom: 18px;
    }

    .logo-wrap img {
      height: clamp(120px, 32vw, 168px);
      max-width: min(92vw, 300px);
    }

    .menu-grid {
      width: min(100%, 332px);
      gap: 10px;
    }

    .menu-btn {
      min-height: 48px;
      font-size: clamp(17px, 5vw, 19px);
      padding: 9px 10px 10px;
    }

    .app-download-btn .app-os-icons {
      font-size: 15px;
      gap: 4px;
    }

    .yx-modal-title {
      width: min(200px, calc(100% - 8px));
      font-size: 15px;
    }

    .yx-data-table th,
    .yx-data-table td,
    #modal-activity .yx-data-table th,
    #modal-activity .yx-data-table td {
      padding: 5px 3px;
      font-size: 10px;
      line-height: 1.35;
    }
  }

  @media screen and (max-width: 900px) and (orientation: landscape) {
    .top-action-bar {
      width: min(100%, 560px);
      margin-top: max(10px, calc(var(--safe-top) + 6px));
    }

    .page-content {
      padding-top: 12px;
    }

    .logo-wrap {
      margin-bottom: 12px;
    }

    .logo-wrap img {
      height: clamp(88px, 20vh, 132px);
    }

    .menu-grid {
      gap: 8px;
    }

    .menu-btn {
      min-height: 42px;
      font-size: clamp(15px, 2.8vw, 18px);
    }

    .copyright-bar {
      margin-top: 12px;
      line-height: 1.45;
    }
  }

  .yx-modal-dialog.crown-theme {
    background:
      linear-gradient(var(--panel-bg), var(--panel-bg)) padding-box,
      var(--crown-gradient) border-box;
    border: 2px solid transparent;
    box-shadow: 0 18px 40px rgba(202, 120, 53, 0.28), 0 18px 40px rgba(0,0,0,.42);
  }

  .yx-modal-dialog.crown-theme .yx-modal-head {
    background: linear-gradient(180deg, rgba(202, 120, 53, 0.12) 0%, rgba(255,255,255,0.04) 100%);
    border-bottom: 1px solid rgba(255, 216, 169, 0.18);
  }

  .yx-modal-dialog.crown-theme .yx-modal-title,
  .yx-modal-dialog.crown-theme .modal-close,
  .yx-modal-dialog.crown-theme .modal-btn {
    background: var(--crown-gradient);
    color: var(--crown-text);
  }

  .yx-modal-dialog.crown-theme .yx-section-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(202, 120, 53, 0.06) 100%);
    border: 1px solid rgba(255, 216, 169, 0.12);
  }

  .yx-modal-dialog.crown-theme .yx-section-title,
  .yx-modal-dialog.crown-theme .yx-note-bullet,
  .yx-modal-dialog.crown-theme .yx-kv-item b {
    color: #ffd8a9;
  }

  .yx-modal-dialog.crown-theme .yx-kv-item {
    background: rgba(255, 216, 169, 0.04);
    border: 1px solid rgba(255, 216, 169, 0.10);
  }

  .yx-modal-dialog.crown-theme .yx-modal-actions {
    background: rgba(202, 120, 53, 0.05);
    border-top: 1px solid rgba(255, 216, 169, 0.14);
  }