:root {
  --mobile-black: #242424;
  --mobile-red: #b7292f;
  --mobile-red-dark: #74191d;
  --mobile-gold: #c9983c;
  --mobile-cream: #fff9ec;
  --mobile-bg: #f4f4f4;
  --mobile-line: #ededed;
  --mobile-muted: #888888;
}

.mobile-app-home {
  display: none;
}

@media (max-width: 760px) {
  body {
    background: var(--mobile-bg);
  }

  body > .page {
    display: none;
  }

  .mobile-app-home {
    display: block;
    min-height: 100vh;
    padding-bottom: 80px;
    color: #252525;
    background: var(--mobile-bg);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  }

  .mobile-app-home * {
    box-sizing: border-box;
  }

  .mobile-app-home a {
    color: inherit;
    text-decoration: none;
  }

  .mobile-home-top {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 70px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--mobile-black);
  }

  .mobile-home-top strong {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .mobile-home-top > a {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
  }

  .mobile-home-main {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 14px 10px 18px;
  }

  .mobile-home-hero {
    min-height: 188px;
    padding: 25px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff8e9;
    background: linear-gradient(135deg, var(--mobile-red-dark), var(--mobile-red) 62%, var(--mobile-gold));
    box-shadow: 0 12px 28px rgba(116,25,29,.16);
  }

  .mobile-home-hero h1 {
    margin: 0;
    color: #fff8e9;
    font-size: 29px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0;
  }

  .mobile-home-hero p {
    margin: 12px 0 0;
    color: rgba(255,248,233,.92);
    font-size: 15px;
    line-height: 1.7;
  }

  .mobile-home-actions {
    display: flex;
    gap: 10px;
    margin-top: 17px;
  }

  .mobile-home-actions a {
    min-width: 108px;
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--mobile-red-dark);
    background: var(--mobile-cream);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-home-panel {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid #efefef;
    border-radius: 8px;
    background: #fff;
  }

  .mobile-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 12px 6px 8px;
  }

  .mobile-home-grid a {
    min-height: 78px;
    padding: 7px 2px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    text-align: center;
  }

  .mobile-home-grid b {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--mobile-gold);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--mobile-gold);
    background: #fffdf8;
    font-size: 17px;
    font-weight: 600;
  }

  .mobile-home-grid b.red {
    border-color: var(--mobile-red);
    color: var(--mobile-red);
  }

  .mobile-home-grid span {
    color: #2c2c2c;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .mobile-home-ticker {
    min-height: 48px;
    padding: 10px 12px;
    border-top: 1px solid var(--mobile-line);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-home-ticker > span {
    padding: 2px 6px;
    border: 1px solid var(--mobile-gold);
    border-radius: 4px;
    color: #9a6e1f;
    font-size: 12px;
  }

  .mobile-home-ticker strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #555;
    font-size: 12px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-home-ticker em,
  .mobile-home-heading a,
  .mobile-case-list em {
    color: var(--mobile-muted);
    font-size: 12px;
    font-style: normal;
  }

  .mobile-home-heading {
    min-height: 52px;
    padding: 0 14px;
    border-bottom: 1px solid var(--mobile-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-home-heading h2 {
    margin: 0;
    color: #252525;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .mobile-market-scroll {
    display: grid;
    grid-auto-columns: 47%;
    grid-auto-flow: column;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .mobile-market-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-market-card {
    min-width: 0;
    scroll-snap-align: start;
  }

  .mobile-market-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: #f3f3f3;
  }

  .mobile-market-card strong,
  .mobile-market-card span {
    display: block;
  }

  .mobile-market-card strong {
    margin-top: 8px;
    overflow: hidden;
    color: #242424;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-market-card span {
    margin-top: 3px;
    color: var(--mobile-muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .mobile-case-list {
    padding: 0 14px;
  }

  .mobile-case-list > a {
    min-height: 74px;
    border-bottom: 1px solid var(--mobile-line);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .mobile-case-list > a:last-child {
    border-bottom: 0;
  }

  .mobile-case-badge {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--mobile-red);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--mobile-red);
    font-size: 15px;
    font-weight: 600;
  }

  .mobile-case-badge.gold {
    border-color: var(--mobile-gold);
    color: #9d742a;
  }

  .mobile-case-list strong,
  .mobile-case-list small {
    display: block;
  }

  .mobile-case-list strong {
    color: #2b2b2b;
    font-size: 14px;
    font-weight: 600;
  }

  .mobile-case-list small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--mobile-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-home-safe {
    margin: 12px 2px 0;
    padding: 12px 14px;
    border-left: 3px solid var(--mobile-gold);
    color: #6f624e;
    background: #fffaf0;
    font-size: 12px;
    line-height: 1.65;
  }

  .mobile-home-safe strong,
  .mobile-home-safe span {
    display: block;
  }

  .mobile-home-bottom {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    height: 68px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #e4e4e4;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(255,255,255,.98);
  }

  .mobile-home-bottom a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #898989;
    font-size: 11px;
  }

  .mobile-home-bottom b {
    width: 24px;
    height: 24px;
    border: 1px solid currentColor;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 500;
  }

  .mobile-home-bottom a.active {
    color: #202020;
    font-weight: 600;
  }
}
