    :root {
      color-scheme: dark light;
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --space-1: 8px;
      --space-2: 12px;
      --space-3: 16px;
      --space-4: 20px;
      --space-5: 24px;
      --bento-gap: 16px;
      --bento-gap-compact: 12px;
      --bento-gutter: 16px;
      --bento-gutter-compact: 12px;
      --bento-stack-gap: 12px;
      --bento-stack-gap-compact: 10px;
      --bento-head-bottom: 12px;
      --bento-head-bottom-compact: 10px;
      --bento-tight-gap: 8px;
      --chat-gap: 10px;
      --chat-pad: 12px;
      --ios-nav-side-inset: 14px;
      --native-ios-top-min: 56px;
      /* iPhone Pro Max viewport class (iPhone 16/17): 440x956 pt (@3x). */
      --ios16pm-width: 440px;
      --ios16pm-height: 956px;
      --ios16pm-dpr: 3;
      --ios16pm-physical-width: 1320px;
      --ios16pm-physical-height: 2868px;
      --ios16pm-ppi: 460;
      --ios-preview-scale: 1;
      --ios-preview-top-offset: 0px;

      --brand-black: #0a0a0a;
      --brand-gold: #c8a84b;
      --brand-gold-light: #e2c06a;
      --brand-gold-dark: #9e7e2e;
      --brand-white: #f0ede8;
      --brand-grey-1: #1a1a1a;
      --brand-grey-2: #2a2a2a;
      --brand-grey-3: #444444;
      --brand-grey-4: #888888;

      --bg: var(--brand-black);
      --bg-elev: rgba(26, 26, 26, 0.84);
      --bg-card: #141414;
      --text: var(--brand-white);
      --text-muted: #b7b1a7;
      --line: rgba(240, 237, 232, 0.14);
      --line-strong: rgba(240, 237, 232, 0.28);
      --accent: var(--brand-gold);
      --accent-2: var(--brand-gold-light);
      --accent-ink: #171208;
      --warn: var(--brand-gold-light);
      --danger: #ff7b7b;
      --shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
      --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.26);
      --radius-xl: 32px;
      --radius-lg: 24px;
      --radius-md: 16px;
      --radius-sm: 12px;
      --font-step-0: 0.93rem;
      --font-step-1: 1.02rem;
      --font-step-2: clamp(1.55rem, 3.9vw, 2.3rem);

      --hero-grad:
        radial-gradient(circle at 10% 8%, rgba(200, 168, 75, 0.22), transparent 40%),
        radial-gradient(circle at 86% 0%, rgba(158, 126, 46, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(18, 18, 18, 0.97), rgba(10, 10, 10, 0.94));

      --glass:
        linear-gradient(145deg, rgba(40, 40, 40, 0.82), rgba(15, 15, 15, 0.74));

      --auth-shell-border: rgba(240, 237, 232, 0.15);
      --auth-shell-bg:
        linear-gradient(160deg, rgba(14, 14, 14, 0.95), rgba(9, 9, 9, 0.98)),
        radial-gradient(140% 120% at 0% 0%, rgba(200, 168, 75, 0.18), transparent 72%),
        radial-gradient(100% 120% at 100% 100%, rgba(158, 126, 46, 0.12), transparent 72%);
      --auth-shell-shadow:
        0 18px 34px rgba(0, 0, 0, 0.36),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
      --auth-intro-bg:
        radial-gradient(88% 130% at 0% 0%, rgba(226, 192, 106, 0.2), transparent 68%),
        radial-gradient(100% 130% at 100% 100%, rgba(158, 126, 46, 0.18), transparent 70%),
        rgba(18, 18, 18, 0.72);
      --auth-intro-text: rgba(236, 233, 224, 0.92);
      --auth-panel-bg: rgba(16, 16, 16, 0.7);
      --auth-label-color: rgba(230, 224, 209, 0.86);
      --auth-input-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
      --auth-input-border: rgba(240, 237, 232, 0.16);
      --auth-input-text: #f0ede8;
      --auth-back-border: rgba(240, 237, 232, 0.16);
      --auth-back-text: rgba(228, 221, 206, 0.82);
      --auth-secondary-border: rgba(240, 237, 232, 0.16);
      --auth-secondary-bg: rgba(255, 255, 255, 0.04);
      --auth-secondary-text: rgba(240, 237, 232, 0.92);

      --font-main: "Barlow", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
      --font-display: "Barlow Condensed", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
    }

    :root[data-theme="dark"] {
      color-scheme: dark;
      --bg: #090909;
      --bg-elev: rgba(22, 22, 22, 0.84);
      --bg-card: #121212;
      --text: #f0ede8;
      --text-muted: #bab2a6;
      --line: rgba(240, 237, 232, 0.14);
      --line-strong: rgba(240, 237, 232, 0.28);
      --accent: #c8a84b;
      --accent-2: #e2c06a;
      --warn: #e2c06a;
      --danger: #ff7b7b;
      --shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
      --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.24);

      --hero-grad:
        radial-gradient(circle at 10% 8%, rgba(200, 168, 75, 0.24), transparent 40%),
        radial-gradient(circle at 86% 0%, rgba(158, 126, 46, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(16, 16, 16, 0.98), rgba(8, 8, 8, 0.95));

      --glass:
        linear-gradient(145deg, rgba(40, 40, 40, 0.82), rgba(14, 14, 14, 0.72));

      --auth-shell-border: rgba(240, 237, 232, 0.15);
      --auth-shell-bg:
        linear-gradient(160deg, rgba(14, 14, 14, 0.95), rgba(9, 9, 9, 0.98)),
        radial-gradient(140% 120% at 0% 0%, rgba(200, 168, 75, 0.18), transparent 72%),
        radial-gradient(100% 120% at 100% 100%, rgba(158, 126, 46, 0.12), transparent 72%);
      --auth-shell-shadow:
        0 20px 38px rgba(0, 0, 0, 0.36),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
      --auth-intro-bg:
        radial-gradient(88% 130% at 0% 0%, rgba(226, 192, 106, 0.2), transparent 68%),
        radial-gradient(100% 130% at 100% 100%, rgba(158, 126, 46, 0.18), transparent 70%),
        rgba(18, 18, 18, 0.72);
      --auth-intro-text: rgba(236, 233, 224, 0.92);
      --auth-panel-bg: rgba(16, 16, 16, 0.7);
      --auth-label-color: rgba(230, 224, 209, 0.86);
      --auth-input-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
      --auth-input-border: rgba(240, 237, 232, 0.16);
      --auth-input-text: #f0ede8;
      --auth-back-border: rgba(240, 237, 232, 0.16);
      --auth-back-text: rgba(228, 221, 206, 0.82);
      --auth-secondary-border: rgba(240, 237, 232, 0.16);
      --auth-secondary-bg: rgba(255, 255, 255, 0.05);
      --auth-secondary-text: rgba(240, 237, 232, 0.92);
    }

    :root[data-theme="light"] {
      color-scheme: light;
      --bg: #f6f2e8;
      --bg-elev: rgba(255, 252, 245, 0.88);
      --bg-card: #fffaf2;
      --text: #1f170f;
      --text-muted: #665a49;
      --line: rgba(31, 23, 15, 0.14);
      --line-strong: rgba(31, 23, 15, 0.24);
      --accent: #b99035;
      --accent-2: #d3ac57;
      --warn: #a67d28;
      --danger: #b84e4e;
      --shadow: 0 18px 40px rgba(37, 24, 6, 0.14);
      --shadow-soft: 0 8px 24px rgba(37, 24, 6, 0.1);

      --hero-grad:
        radial-gradient(circle at 10% 8%, rgba(200, 168, 75, 0.28), transparent 40%),
        radial-gradient(circle at 86% 0%, rgba(158, 126, 46, 0.2), transparent 38%),
        linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(246, 240, 227, 0.95));

      --glass:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(248, 241, 228, 0.82));

      --auth-shell-border: rgba(31, 23, 15, 0.14);
      --auth-shell-bg:
        linear-gradient(160deg, rgba(255, 252, 246, 0.97), rgba(246, 239, 225, 0.98)),
        radial-gradient(140% 120% at 0% 0%, rgba(200, 168, 75, 0.2), transparent 72%),
        radial-gradient(100% 120% at 100% 100%, rgba(158, 126, 46, 0.14), transparent 72%);
      --auth-shell-shadow:
        0 20px 36px rgba(35, 22, 5, 0.13),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
      --auth-intro-bg:
        radial-gradient(88% 130% at 0% 0%, rgba(226, 192, 106, 0.26), transparent 68%),
        radial-gradient(100% 130% at 100% 100%, rgba(158, 126, 46, 0.22), transparent 70%),
        rgba(255, 248, 233, 0.72);
      --auth-intro-text: rgba(49, 37, 21, 0.88);
      --auth-panel-bg: rgba(255, 255, 255, 0.72);
      --auth-label-color: rgba(59, 46, 29, 0.9);
      --auth-input-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(251, 246, 236, 0.82));
      --auth-input-border: rgba(31, 23, 15, 0.18);
      --auth-input-text: #24190d;
      --auth-back-border: rgba(31, 23, 15, 0.18);
      --auth-back-text: rgba(68, 53, 33, 0.86);
      --auth-secondary-border: rgba(31, 23, 15, 0.16);
      --auth-secondary-bg: rgba(255, 255, 255, 0.54);
      --auth-secondary-text: rgba(41, 30, 18, 0.9);
    }

    @media (prefers-color-scheme: light) {
      :root:not([data-theme="dark"]) {
        color-scheme: light;
        --bg: #f6f2e8;
        --bg-elev: rgba(255, 252, 245, 0.88);
        --bg-card: #fffaf2;
        --text: #1f170f;
        --text-muted: #665a49;
        --line: rgba(31, 23, 15, 0.14);
        --line-strong: rgba(31, 23, 15, 0.24);
        --accent: #b99035;
        --accent-2: #d3ac57;
        --warn: #a67d28;
        --danger: #b84e4e;
        --shadow: 0 18px 40px rgba(37, 24, 6, 0.14);
        --shadow-soft: 0 8px 24px rgba(37, 24, 6, 0.1);

        --hero-grad:
          radial-gradient(circle at 10% 8%, rgba(200, 168, 75, 0.28), transparent 40%),
          radial-gradient(circle at 86% 0%, rgba(158, 126, 46, 0.2), transparent 38%),
          linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(246, 240, 227, 0.95));

        --glass:
          linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(248, 241, 228, 0.82));

        --auth-shell-border: rgba(31, 23, 15, 0.14);
        --auth-shell-bg:
          linear-gradient(160deg, rgba(255, 252, 246, 0.97), rgba(246, 239, 225, 0.98)),
          radial-gradient(140% 120% at 0% 0%, rgba(200, 168, 75, 0.2), transparent 72%),
          radial-gradient(100% 120% at 100% 100%, rgba(158, 126, 46, 0.14), transparent 72%);
        --auth-shell-shadow:
          0 20px 36px rgba(35, 22, 5, 0.13),
          inset 0 0 0 1px rgba(255, 255, 255, 0.4);
        --auth-intro-bg:
          radial-gradient(88% 130% at 0% 0%, rgba(226, 192, 106, 0.26), transparent 68%),
          radial-gradient(100% 130% at 100% 100%, rgba(158, 126, 46, 0.22), transparent 70%),
          rgba(255, 248, 233, 0.72);
        --auth-intro-text: rgba(49, 37, 21, 0.88);
        --auth-panel-bg: rgba(255, 255, 255, 0.72);
        --auth-label-color: rgba(59, 46, 29, 0.9);
        --auth-input-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(251, 246, 236, 0.82));
        --auth-input-border: rgba(31, 23, 15, 0.18);
        --auth-input-text: #24190d;
        --auth-back-border: rgba(31, 23, 15, 0.18);
        --auth-back-text: rgba(68, 53, 33, 0.86);
        --auth-secondary-border: rgba(31, 23, 15, 0.16);
        --auth-secondary-bg: rgba(255, 255, 255, 0.54);
        --auth-secondary-text: rgba(41, 30, 18, 0.9);
      }
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #090909;
        --bg-elev: rgba(22, 22, 22, 0.84);
        --bg-card: #121212;
        --text: #f0ede8;
        --text-muted: #bab2a6;
        --line: rgba(240, 237, 232, 0.14);
        --line-strong: rgba(240, 237, 232, 0.28);
        --accent: #c8a84b;
        --accent-2: #e2c06a;
        --warn: #e2c06a;
        --danger: #ff7b7b;
        --shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
        --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.24);

        --hero-grad:
          radial-gradient(circle at 10% 8%, rgba(200, 168, 75, 0.24), transparent 40%),
          radial-gradient(circle at 86% 0%, rgba(158, 126, 46, 0.18), transparent 38%),
          linear-gradient(180deg, rgba(16, 16, 16, 0.98), rgba(8, 8, 8, 0.95));

        --glass:
          linear-gradient(145deg, rgba(40, 40, 40, 0.82), rgba(14, 14, 14, 0.72));

        --auth-shell-border: rgba(240, 237, 232, 0.15);
        --auth-shell-bg:
          linear-gradient(160deg, rgba(14, 14, 14, 0.95), rgba(9, 9, 9, 0.98)),
          radial-gradient(140% 120% at 0% 0%, rgba(200, 168, 75, 0.18), transparent 72%),
          radial-gradient(100% 120% at 100% 100%, rgba(158, 126, 46, 0.12), transparent 72%);
        --auth-shell-shadow:
          0 20px 38px rgba(0, 0, 0, 0.36),
          inset 0 0 0 1px rgba(255, 255, 255, 0.06);
        --auth-intro-bg:
          radial-gradient(88% 130% at 0% 0%, rgba(226, 192, 106, 0.2), transparent 68%),
          radial-gradient(100% 130% at 100% 100%, rgba(158, 126, 46, 0.18), transparent 70%),
          rgba(18, 18, 18, 0.72);
        --auth-intro-text: rgba(236, 233, 224, 0.92);
        --auth-panel-bg: rgba(16, 16, 16, 0.7);
        --auth-label-color: rgba(230, 224, 209, 0.86);
        --auth-input-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
        --auth-input-border: rgba(240, 237, 232, 0.16);
        --auth-input-text: #f0ede8;
        --auth-back-border: rgba(240, 237, 232, 0.16);
        --auth-back-text: rgba(228, 221, 206, 0.82);
        --auth-secondary-border: rgba(240, 237, 232, 0.16);
        --auth-secondary-bg: rgba(255, 255, 255, 0.05);
        --auth-secondary-text: rgba(240, 237, 232, 0.92);
      }
    }

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

    body {
      font-family: var(--font-main);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      min-height: 100dvh;
      line-height: 1.42;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    html.modal-open,
    body.modal-open {
      overflow: hidden;
      overscroll-behavior: none;
    }

    .app-shell {
      width: min(1120px, 100%);
      margin: 0 auto;
      padding: calc(var(--safe-top) + 20px) 16px calc(122px + var(--safe-bottom));
      transition: max-width 220ms ease;
      position: relative;
    }

    .app-content {
      display: block;
      max-width: 100%;
      overflow-x: clip;
    }

    .app-shell.chat-static {
      min-height: 100vh;
      min-height: 100dvh;
      height: 100dvh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .app-shell.chat-static .app-content {
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    .app-shell::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -2;
      background: var(--hero-grad);
      pointer-events: none;
    }

    .app-shell::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        radial-gradient(75% 45% at 50% 110%, rgba(18, 26, 40, 0.1), transparent),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
    }

    .topbar {
      position: sticky;
      top: 10px;
      z-index: 55;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: var(--space-2);
      padding: 12px;
      border: 1px solid var(--line);
      background: var(--bg-elev);
      border-radius: var(--radius-lg);
      backdrop-filter: saturate(180%) blur(22px);
      box-shadow: var(--shadow-soft);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      text-decoration: none;
      color: var(--text);
    }

    .brand-mark {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px;
      background: var(--brand-black);
      border: 1px solid rgba(240, 237, 232, 0.16);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.24);
    }

    .brand-mark svg {
      width: 100%;
      height: auto;
      display: block;
    }

    .brand h1 {
      font-family: var(--font-display);
      font-size: 1.15rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      line-height: 1;
      text-transform: uppercase;
    }

    .brand span {
      display: block;
      font-size: 0.68rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--accent);
      font-weight: 600;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .account-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 36px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 0.73rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.08);
      max-width: 220px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .account-chip strong {
      color: var(--text);
      font-weight: 640;
    }

    .marketing-landing {
      width: min(860px, calc(100% - 28px));
      max-width: 100%;
      margin: calc(var(--safe-top) + 24px) auto 24px;
    }

    .landing-shell {
      border: 1px solid var(--line);
      border-radius: 26px;
      background: var(--auth-shell-bg);
      backdrop-filter: saturate(170%) blur(20px);
      box-shadow: var(--auth-shell-shadow);
      padding: clamp(24px, 5vw, 40px);
      display: grid;
      gap: 14px;
      position: relative;
      overflow: hidden;
    }

    .landing-shell::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(84% 108% at 0% 0%, rgba(226, 192, 106, 0.16), transparent 68%),
        radial-gradient(70% 90% at 100% 100%, rgba(158, 126, 46, 0.12), transparent 70%);
    }

    .landing-kicker {
      position: relative;
      z-index: 1;
      font-size: 0.69rem;
      letter-spacing: 0.23em;
      text-transform: uppercase;
      color: var(--accent);
      font-weight: 650;
    }

    .landing-shell h2 {
      position: relative;
      z-index: 1;
      font-family: var(--font-display);
      font-size: clamp(2rem, 5vw, 3.3rem);
      line-height: 0.95;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      max-width: 11ch;
    }

    .landing-copy {
      position: relative;
      z-index: 1;
      max-width: 48ch;
      color: var(--text-muted);
      font-size: 0.96rem;
      line-height: 1.45;
    }

    .landing-actions {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 6px;
    }

    .landing-actions .auth-submit,
    .landing-actions .auth-secondary {
      min-width: 170px;
    }

    .auth-landing {
      width: min(860px, calc(100% - 28px));
      max-width: 100%;
      margin: calc(var(--safe-top) + 24px) auto 24px;
      border: 1px solid var(--line);
      border-radius: 26px;
      background: var(--auth-shell-bg);
      backdrop-filter: saturate(170%) blur(20px);
      box-shadow: var(--auth-shell-shadow);
      overflow: hidden;
    }

    .app-shell.auth-screen .topbar,
    .app-shell.auth-screen .webapp-nav,
    .app-shell.auth-screen .app-content,
    .app-shell.auth-screen .liquid-nav-wrap {
      display: none;
    }

    body[data-session-state="auth"] .webapp-nav,
    body[data-session-state="auth"] .liquid-nav-wrap {
      display: none !important;
    }

    .app-shell.auth-screen .auth-landing {
      margin: 0;
      width: 100%;
      min-height: 100%;
      max-width: none;
      border-radius: 26px;
      border: 1px solid var(--line);
      box-shadow: none;
    }

    .auth-grid {
      display: grid;
      grid-template-columns: 1.1fr 1fr;
      gap: 0;
    }

    .auth-landing[data-auth-view="login"] .auth-grid,
    .auth-landing[data-auth-view="signup"] .auth-grid {
      grid-template-columns: 1fr;
    }

    .auth-landing[data-auth-view="login"] .auth-intro,
    .auth-landing[data-auth-view="signup"] .auth-intro {
      display: none;
    }

    .auth-intro {
      padding: 26px;
      border-right: 1px solid var(--line);
      background: var(--auth-intro-bg);
    }

    .auth-eyebrow {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.24em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 10px;
    }

    .auth-intro h2 {
      font-family: var(--font-display);
      font-size: clamp(2rem, 4.6vw, 3.2rem);
      font-weight: 800;
      letter-spacing: 0.04em;
      line-height: 0.9;
      text-transform: uppercase;
      margin-bottom: 14px;
      max-width: 10ch;
    }

    .auth-hero-media {
      display: grid;
      gap: 10px;
      margin-bottom: 16px;
    }

    .auth-hero-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .auth-media-shape {
      border-radius: 16px;
      border: 1px solid rgba(240, 237, 232, 0.14);
      min-height: 56px;
      background:
        radial-gradient(100% 140% at 0% 0%, rgba(226, 192, 106, 0.24), transparent 70%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    }

    .auth-media-shape::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(110deg, rgba(255, 255, 255, 0.2), transparent 44%);
      opacity: 0.52;
      pointer-events: none;
    }

    .auth-media-shape::after {
      content: attr(data-image-slot);
      position: absolute;
      left: 12px;
      bottom: 10px;
      font-size: 0.62rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(224, 235, 249, 0.84);
      font-weight: 600;
    }

    .auth-media-shape.main {
      min-height: 96px;
      border-radius: 20px;
    }

    .auth-intro p {
      color: var(--auth-intro-text);
      font-size: clamp(0.98rem, 1.5vw, 1.08rem);
      line-height: 1.4;
      margin-bottom: 14px;
      max-width: 30ch;
    }

    .auth-tagline {
      font-size: 0.7rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--accent);
      opacity: 0.9;
    }

    .auth-panel {
      padding: 18px;
      display: grid;
      gap: 12px;
    }

    .auth-landing[data-auth-view="login"] .auth-panel,
    .auth-landing[data-auth-view="signup"] .auth-panel {
      width: min(560px, 100%);
      max-width: 100%;
      margin: 0 auto;
      min-height: min(82vh, 760px);
      align-content: center;
      padding: 24px;
    }

    .auth-step[hidden] {
      display: none;
    }

    .auth-step {
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 16px;
      background: rgba(255, 255, 255, 0.05);
    }

    .auth-title {
      font-size: 1.04rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 4px;
    }

    .auth-subtitle {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-bottom: 12px;
    }

    .auth-cta-group {
      display: grid;
      gap: 8px;
    }

    .auth-form {
      display: grid;
      gap: 9px;
      min-width: 0;
    }

    .auth-form[hidden] {
      display: none;
    }

    .auth-form label {
      font-size: 0.72rem;
      color: var(--text-muted);
      font-weight: 620;
    }

    .auth-form input,
    .auth-form select {
      width: 100%;
      max-width: 100%;
      min-height: 40px;
      border-radius: 11px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      padding: 0 11px;
      font-size: 0.82rem;
    }

    .auth-form input:focus-visible,
    .auth-form select:focus-visible,
    .auth-secondary:focus-visible,
    .auth-back:focus-visible,
    .auth-submit:focus-visible {
      outline: 2px solid rgba(226, 192, 106, 0.58);
      outline-offset: 2px;
    }

    .auth-form .form-row {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .auth-back {
      border: 1px solid var(--line);
      background: transparent;
      color: var(--text-muted);
      border-radius: 999px;
      min-height: 30px;
      padding: 0 10px;
      font-size: 0.72rem;
      font-weight: 600;
      margin-bottom: 8px;
      cursor: pointer;
      width: fit-content;
    }

    .auth-submit {
      min-height: 40px;
      border-radius: 999px;
      border: 0;
      font-size: 0.8rem;
      font-weight: 680;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      margin-top: 4px;
    }

    .auth-secondary {
      min-height: 40px;
      border-radius: 999px;
      border: 1px solid var(--line);
      font-size: 0.8rem;
      font-weight: 650;
      cursor: pointer;
      color: var(--text);
      background: rgba(255, 255, 255, 0.04);
    }

    .auth-hint {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .auth-switch {
      margin-top: 10px;
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 34px;
      padding: 0 12px;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-muted);
      font-size: 0.73rem;
      font-weight: 620;
      cursor: pointer;
      width: fit-content;
    }

    .auth-link {
      margin-top: 8px;
      border: 0;
      padding: 0;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.73rem;
      font-weight: 600;
      text-decoration: underline;
      text-underline-offset: 0.12em;
      cursor: pointer;
      width: fit-content;
    }

    .auth-feedback {
      min-height: 18px;
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .auth-feedback.error {
      color: #ff9b9b;
    }

    .auth-feedback.success {
      color: #e6ca80;
    }

    .signup-extra[hidden] {
      display: none;
    }

    .consent-row {
      display: grid;
      grid-template-columns: 14px 1fr;
      align-items: center;
      justify-items: start;
      gap: 8px;
      font-size: 0.72rem;
      color: var(--text-muted);
      line-height: 1.35;
    }

    .consent-row input[type="checkbox"] {
      margin: 0;
      inline-size: 14px;
      block-size: 14px;
      accent-color: var(--accent);
      align-self: center;
    }

    .consent-row a {
      color: var(--accent);
      text-decoration: none;
    }

    .webapp-nav {
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: var(--bg-elev);
      backdrop-filter: saturate(165%) blur(14px);
      box-shadow: var(--shadow-soft);
      padding: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .webapp-tabs {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      flex: 1;
    }

    .webapp-tab {
      border: 1px solid transparent;
      border-radius: 11px;
      min-height: 36px;
      padding: 0 13px;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.8rem;
      font-weight: 620;
      cursor: pointer;
      transition: all 160ms ease;
      position: relative;
    }

    .webapp-tab[data-unread="true"]::after {
      content: "";
      position: absolute;
      top: 5px;
      right: 6px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(5, 11, 18, 0.45);
    }

    .webapp-tab.active {
      color: var(--text);
      border-color: var(--line);
      background: rgba(255, 255, 255, 0.08);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    .webapp-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .webapp-action {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 36px;
      padding: 0 14px;
      font-size: 0.77rem;
      font-weight: 640;
      cursor: pointer;
      color: var(--text);
      background: transparent;
    }

    .webapp-action[disabled] {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .webapp-action.primary {
      border-color: transparent;
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      box-shadow: 0 8px 18px rgba(200, 168, 75, 0.22);
    }

    .webapp-action.active {
      border-color: rgba(226, 192, 106, 0.48);
      color: var(--text);
      background: rgba(226, 192, 106, 0.12);
      box-shadow: inset 0 0 0 1px rgba(226, 192, 106, 0.22);
    }

    .ghost-btn {
      width: 40px;
      height: 40px;
      border-radius: 13px;
      border: 1px solid var(--line);
      background: transparent;
      color: var(--text);
      display: grid;
      place-content: center;
      cursor: pointer;
    }

    .ghost-btn svg {
      width: 20px;
      height: 20px;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 1.9;
    }

    .profile-icon-btn {
      width: 40px;
      height: 40px;
      border-radius: 13px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.08);
      display: grid;
      place-content: center;
      color: var(--text);
      font-size: 0.78rem;
      font-weight: 700;
      cursor: pointer;
      position: relative;
      background-size: cover;
      background-position: center;
      overflow: hidden;
    }

    .profile-icon-btn.has-photo {
      color: transparent;
      text-shadow: none;
    }

    .profile-icon-btn::after {
      content: "";
      position: absolute;
      right: 6px;
      bottom: 6px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
    }

    .band-mode-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-right: 4px;
      font-size: 0.9em;
    }

    .hero {
      margin-top: var(--space-3);
      border-radius: var(--radius-xl);
      border: 1px solid var(--line);
      overflow: hidden;
      background: var(--bg-card);
      box-shadow: var(--shadow-soft);
      position: relative;
      isolation: isolate;
    }

    .app-shell:not([data-active-mode="jam"]) .hero {
      display: none !important;
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(40% 88% at 8% 8%, rgba(200, 168, 75, 0.24), transparent),
        radial-gradient(45% 70% at 90% 0, rgba(158, 126, 46, 0.2), transparent);
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 1;
      padding: 34px 24px;
    }

    .hero-kicker {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.24em;
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 12px;
    }

    .hero h2 {
      font-family: var(--font-display);
      font-size: var(--font-step-2);
      font-weight: 800;
      letter-spacing: 0.04em;
      line-height: 0.95;
      text-transform: uppercase;
      max-width: 17ch;
      margin-bottom: 12px;
    }

    .hero p {
      max-width: 52ch;
      color: var(--text-muted);
      margin-bottom: var(--space-4);
      font-size: var(--font-step-0);
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-2);
    }

    .btn {
      border: 0;
      border-radius: 999px;
      height: 44px;
      padding: 0 20px;
      font-size: 0.9rem;
      font-weight: 640;
      cursor: pointer;
      font-family: var(--font-main);
      letter-spacing: -0.01em;
    }

    .btn-primary {
      color: var(--accent-ink);
      background: linear-gradient(130deg, var(--accent), var(--accent-2));
      box-shadow: 0 10px 22px rgba(200, 168, 75, 0.26);
    }

    .btn-subtle {
      color: var(--text);
      background: transparent;
      border: 1px solid var(--line-strong);
    }

    .content-grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: var(--bento-gap);
      margin-top: var(--bento-gap);
      max-width: 100%;
      min-width: 0;
    }

    .app-page {
      max-width: 100%;
      min-width: 0;
    }

    .app-page[hidden] {
      display: none !important;
    }

    .match-page {
      margin-top: var(--bento-gap);
      display: grid;
      gap: 12px;
    }

    .chat-page {
      margin-top: var(--bento-gap);
    }

    .match-page-header {
      padding: 0;
      display: grid;
      gap: 6px;
    }

    .match-page-content {
      display: grid;
      gap: 10px;
      width: 100%;
      max-width: 100%;
      padding: 0;
      margin: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .match-page-header h3 {
      font-size: var(--font-step-2);
      letter-spacing: -0.02em;
    }

    .match-page-header p {
      color: var(--text-muted);
      font-size: 0.8rem;
      line-height: 1.45;
      max-width: 62ch;
    }

    .section-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      background: var(--bg-card);
      box-shadow: var(--shadow-soft);
      overflow: hidden;
      min-width: 0;
      grid-column: span 12;
    }

    .section-card[data-bento="primary"] {
      grid-column: span 8;
    }

    .section-card[data-bento="secondary"] {
      grid-column: span 4;
    }

    .section-card.wide {
      grid-column: span 12;
    }

    .card-head {
      padding: var(--bento-gutter) var(--bento-gutter) var(--bento-head-bottom);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .card-head h3 {
      font-size: var(--font-step-1);
      letter-spacing: -0.02em;
      font-weight: 650;
    }

    .card-head a {
      color: var(--text-muted);
      text-decoration: none;
      font-size: 0.8rem;
      font-weight: 600;
    }

    .chip-row {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 0 var(--bento-gutter) var(--bento-stack-gap);
      scrollbar-width: none;
    }

    .chip-row::-webkit-scrollbar { display: none; }

    .chip {
      border-radius: 999px;
      border: 1px solid var(--line);
      min-height: 34px;
      padding: 8px 13px;
      font-size: 0.77rem;
      font-weight: 560;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.08);
      white-space: nowrap;
    }

    .chip.active {
      color: var(--accent-ink);
      background: linear-gradient(130deg, var(--accent), var(--accent-2));
      border-color: transparent;
      font-weight: 650;
    }

    .jam-list {
      display: grid;
      gap: 12px;
      padding: 0;
    }

    .section-card > .jam-list {
      padding: 0 var(--bento-gutter) var(--bento-gutter);
    }

    .jam-item {
      display: grid;
      grid-template-columns: 64px 1fr;
      align-items: start;
      gap: 13px;
      padding: 12px;
      border-radius: 16px;
      border: 1px solid var(--line);
      color: inherit;
      background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.02));
      transition: transform 180ms ease, border-color 180ms ease;
      cursor: pointer;
      width: 100%;
    }

    .jam-item.has-cover-image {
      background-image:
        linear-gradient(145deg, rgba(9, 9, 9, 0.82), rgba(16, 16, 16, 0.58)),
        var(--jam-card-image);
      background-size: cover;
      background-position: center;
      border-color: rgba(240, 237, 232, 0.24);
    }

    .jam-item.has-cover-image .jam-main h4 {
      color: rgba(249, 246, 239, 0.98);
    }

    .jam-item.has-cover-image .jam-main p,
    .jam-item.has-cover-image .jam-main-meta,
    .jam-item.has-cover-image .jam-tag {
      color: rgba(240, 237, 232, 0.86);
    }

    .jam-item.has-cover-image .jam-cover {
      background: rgba(20, 20, 20, 0.45);
      border-color: rgba(240, 237, 232, 0.26);
    }

    .jam-item.has-cover-image .jam-tag {
      background: rgba(255, 210, 77, 0.2);
      border-color: rgba(255, 210, 77, 0.34);
    }

    .jam-item:hover {
      transform: translateY(-2px);
      border-color: var(--line-strong);
    }

    .jam-item:focus-visible {
      outline: none;
      border-color: rgba(226, 192, 106, 0.58);
      box-shadow: 0 0 0 3px rgba(226, 192, 106, 0.12);
    }

    .jam-cover {
      width: 64px;
      height: 64px;
      border-radius: 12px;
      display: grid;
      place-content: center;
      font-size: 1.3rem;
      border: 1px solid var(--line);
      background:
        linear-gradient(130deg, rgba(200, 168, 75, 0.18), rgba(158, 126, 46, 0.16));
    }

    .jam-main h4 {
      font-size: 0.95rem;
      letter-spacing: -0.01em;
      margin-bottom: 4px;
      font-weight: 640;
    }

    .jam-main p {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .jam-item-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 4px;
    }

    .jam-main-meta {
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-top: 6px;
    }

    .jam-register-btn {
      border: 1px solid rgba(226, 192, 106, 0.46);
      border-radius: 999px;
      min-height: 32px;
      padding: 0 12px;
      font-size: 0.72rem;
      font-weight: 650;
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      cursor: pointer;
      white-space: nowrap;
    }

    .jam-register-btn.is-registered {
      border-color: var(--line);
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.06);
    }

    .jam-tag {
      font-size: 0.69rem;
      border-radius: 999px;
      padding: 6px 9px;
      background: rgba(255, 210, 77, 0.16);
      color: var(--warn);
      border: 1px solid rgba(255, 210, 77, 0.24);
      white-space: nowrap;
    }

    .jam-actions-row {
      margin-top: 2px;
    }

    .modes {
      display: none;
      padding: 0 var(--bento-gutter) var(--bento-gutter);
    }

    .modes.active {
      display: grid;
      gap: var(--bento-stack-gap);
      animation: rise 280ms ease;
    }

    @keyframes rise {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .band-grid,
    .pro-grid {
      display: grid;
      gap: var(--bento-stack-gap);
      margin-top: 0;
    }

    .band-mode-list {
      display: grid;
      gap: 7px;
      margin-top: 8px;
    }

    .band-mode-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px 10px;
      font-size: 0.75rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .band-mode-links {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 8px;
    }

    .band-mode-link {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 10px;
      font-size: 0.68rem;
      color: var(--text-muted);
      text-decoration: none;
      background: rgba(255, 255, 255, 0.04);
    }

    .band-mode-empty {
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-top: 6px;
    }

    .mini-panel {
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
      background: var(--bg-card);
    }

    .mini-panel h4 {
      font-size: 0.9rem;
      margin-bottom: 4px;
    }

    .mini-panel p {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .status-banner {
      margin-top: var(--space-3);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 11px 13px;
      font-size: 0.82rem;
      color: var(--text-muted);
      background: var(--bg-elev);
    }

    .status-banner strong {
      color: var(--text);
    }

    .profile-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .profile-banner p {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .profile-banner strong {
      font-size: 0.86rem;
      color: var(--text);
    }

    .profile-btn {
      border: 1px solid var(--line-strong);
      background: rgba(255, 255, 255, 0.08);
      color: var(--text);
      border-radius: 999px;
      min-height: 34px;
      padding: 0 13px;
      font-size: 0.74rem;
      font-weight: 650;
      cursor: pointer;
      white-space: nowrap;
    }

    .profile-gate {
      border: 1px dashed var(--line-strong);
      border-radius: 16px;
      padding: 14px;
      background: rgba(255, 255, 255, 0.04);
      display: grid;
      gap: 8px;
    }

    .profile-gate h4 {
      font-size: 0.95rem;
      letter-spacing: -0.01em;
    }

    .profile-gate p {
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .profile-gate[hidden] {
      display: none;
    }

    .jam-access[hidden] {
      display: none;
    }

    .match-head {
      display: grid;
      gap: 10px;
      margin-bottom: 10px;
    }

    .match-search {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      border-radius: 999px;
      height: 34px;
      padding: 0 12px;
      font-size: 0.76rem;
      width: 100%;
    }

    .match-filters {
      display: grid;
      gap: 6px;
      margin-bottom: 0;
    }

    .match-filter-label {
      font-size: 0.72rem;
      color: var(--text-muted);
      letter-spacing: 0.02em;
      font-weight: 620;
    }

    .match-genre-select {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 34px;
      padding: 0 12px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      font-size: 0.76rem;
      font-weight: 620;
      white-space: nowrap;
      width: min(320px, 100%);
    }

    .match-list {
      display: grid;
      gap: var(--bento-stack-gap);
      width: 100%;
    }

    .match-card {
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
      background: rgba(255, 255, 255, 0.04);
      display: grid;
      gap: var(--bento-stack-gap);
      width: 100%;
    }

    .match-card[hidden] {
      display: none;
    }

    .match-band {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .match-avatar {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: grid;
      place-content: center;
      font-size: 1.1rem;
      border: 1px solid var(--line);
      background: linear-gradient(145deg, rgba(226, 192, 106, 0.22), rgba(158, 126, 46, 0.14));
    }

    .match-meta h5 {
      font-size: 0.94rem;
      margin-bottom: 3px;
      letter-spacing: -0.01em;
    }

    .match-meta p {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .match-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .match-pill {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 28px;
      padding: 0 10px;
      font-size: 0.68rem;
      font-weight: 640;
      cursor: default;
      color: var(--text);
      background: rgba(255, 255, 255, 0.06);
    }

    .match-pill.genre {
      color: var(--accent-ink);
      border-color: transparent;
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
    }

    .match-pill.seek {
      color: var(--warn);
      background: rgba(255, 210, 77, 0.1);
    }

    .match-desc {
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .match-summary {
      margin-bottom: var(--bento-stack-gap);
      font-size: 0.74rem;
      color: var(--text-muted);
    }

    .match-empty {
      border: 1px dashed var(--line);
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 0.74rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
      margin-top: var(--bento-stack-gap);
    }

    .match-pill.connect {
      color: var(--accent);
      border-color: rgba(74, 222, 128, 0.34);
      background: rgba(74, 222, 128, 0.12);
      cursor: pointer;
    }

    .match-detail-modal {
      position: fixed;
      inset: 0;
      z-index: 288;
      display: grid;
      place-content: center;
      padding: 16px;
      background: rgba(4, 8, 12, 0.56);
      backdrop-filter: blur(8px);
    }

    .match-detail-modal[hidden] {
      display: none;
    }

    .match-detail-card {
      width: min(760px, calc(100vw - 24px));
      max-width: 100%;
      max-height: min(90vh, 900px);
      overflow: auto;
      border-radius: 20px;
      border: 1px solid var(--line-strong);
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(74, 222, 128, 0.12), transparent 72%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
      box-shadow: var(--shadow);
      padding: 14px;
      display: grid;
      gap: 11px;
    }

    .match-detail-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .match-detail-head h3 {
      font-size: 1.02rem;
      letter-spacing: -0.01em;
    }

    .match-detail-meta {
      font-size: 0.76rem;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .match-detail-close {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 30px;
      padding: 0 11px;
      font-size: 0.72rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.04);
      cursor: pointer;
      white-space: nowrap;
    }

    .match-detail-description {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px;
      font-size: 0.79rem;
      color: var(--text-muted);
      line-height: 1.5;
      background: rgba(255, 255, 255, 0.03);
    }

    .match-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }

    .match-detail-panel {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.03);
      display: grid;
      gap: 7px;
      align-content: start;
    }

    .match-detail-panel h4 {
      font-size: 0.8rem;
      letter-spacing: -0.01em;
    }

    .match-detail-list {
      display: grid;
      gap: 6px;
    }

    .match-detail-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 6px 8px;
      font-size: 0.74rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .match-detail-links {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .match-detail-link {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 0.68rem;
      color: var(--text-muted);
      text-decoration: none;
      background: rgba(255, 255, 255, 0.04);
    }

    .match-detail-actions {
      display: flex;
      justify-content: flex-end;
      gap: 7px;
    }

    .chat-modal {
      position: fixed;
      inset: 0;
      z-index: 108;
      display: grid;
      place-content: center;
      padding: 14px;
      background: rgba(4, 8, 12, 0.54);
      backdrop-filter: blur(6px);
    }

    body[data-platform="web"] .chat-modal {
      align-items: start;
      place-content: start center;
      padding-top: calc(var(--safe-top) + 18px);
      padding-bottom: calc(var(--safe-bottom) + 18px);
    }

    body[data-platform="ios"] .chat-modal {
      inset: 0 0 calc(var(--safe-bottom) + 110px) 0;
      padding: 8px 10px 0;
      align-items: start;
      justify-items: center;
      background: rgba(4, 8, 12, 0.62);
    }

    .chat-modal[hidden] {
      display: none;
    }

    .chat-modal-card {
      width: min(1080px, calc(100vw - 24px));
      max-width: 100%;
      height: min(84vh, 780px);
      border-radius: 22px;
      border: 1px solid var(--line-strong);
      background:
        radial-gradient(120% 120% at 0% 0%, rgba(226, 192, 106, 0.09), transparent 64%),
        linear-gradient(175deg, rgba(16, 20, 26, 0.97), rgba(11, 15, 20, 0.96));
      box-shadow: var(--shadow);
      overflow: hidden;
      display: grid;
      grid-template-rows: auto 1fr;
      container-type: inline-size;
    }

    body[data-platform="ios"] .chat-modal-card {
      width: min(calc(var(--ios16pm-width) * var(--ios-preview-scale)), calc(100vw - 16px));
      height: min(calc(var(--ios16pm-height) * var(--ios-preview-scale) - 12px), calc(100vh - 18px));
      border-radius: 24px;
      backdrop-filter: saturate(145%) blur(12px);
    }

    .chat-head {
      min-height: 56px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.03);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    body[data-platform="ios"] .chat-head {
      padding-top: max(10px, calc(var(--safe-top) * 0.36));
    }

    .chat-head h3 {
      font-size: 0.95rem;
      letter-spacing: 0.01em;
      text-transform: uppercase;
      color: var(--text);
    }

    .chat-close {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-muted);
      min-height: 32px;
      padding: 0 12px;
      font-size: 0.72rem;
      font-weight: 600;
      cursor: pointer;
    }

    .chat-layout {
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(300px, 360px) 1fr;
      max-width: 100%;
      min-width: 0;
    }

    .chat-threads {
      border-right: 1px solid var(--line);
      padding: var(--chat-pad);
      overflow-y: auto;
      overflow-x: hidden;
      display: grid;
      align-content: start;
      gap: var(--chat-gap);
      background: rgba(255, 255, 255, 0.015);
      max-width: 100%;
      min-width: 0;
    }

    .chat-tools {
      display: grid;
      gap: var(--chat-gap);
      margin-bottom: 4px;
      max-width: 100%;
      min-width: 0;
      overflow-x: hidden;
    }

    .chat-search {
      width: 100%;
      min-height: 36px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      padding: 0 11px;
      font-size: 0.74rem;
    }

    .chat-search::placeholder {
      color: var(--text-dim);
    }

    .chat-filters {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 4px;
      background: rgba(255, 255, 255, 0.02);
    }

    .chat-filter-btn {
      border: 1px solid transparent;
      border-radius: 10px;
      min-height: 30px;
      padding: 0 8px;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.66rem;
      font-weight: 620;
      cursor: pointer;
    }

    .chat-filter-btn.active {
      color: var(--accent-ink);
      border-color: rgba(226, 192, 106, 0.56);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
    }

    .chat-create-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }

    .chat-mini-btn {
      border: 1px solid var(--line);
      border-radius: 10px;
      min-height: 32px;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-muted);
      font-size: 0.69rem;
      font-weight: 620;
      cursor: pointer;
    }

    .chat-create-form {
      border: 1px solid var(--line);
      border-radius: 11px;
      padding: 8px;
      display: grid;
      gap: 6px;
      background: rgba(255, 255, 255, 0.02);
      max-width: 100%;
      min-width: 0;
      overflow-x: hidden;
    }

    .chat-create-form[hidden] {
      display: none;
    }

    .chat-create-form label {
      font-size: 0.65rem;
      color: var(--text-dim);
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .chat-create-form input {
      border: 1px solid var(--line);
      border-radius: 9px;
      min-height: 33px;
      padding: 0 10px;
      font-size: 0.72rem;
      color: var(--text);
      background: rgba(255, 255, 255, 0.04);
      max-width: 100%;
      min-width: 0;
    }

    .chat-create-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }

    .chat-create-actions button {
      border-radius: 9px;
      min-height: 31px;
      font-size: 0.68rem;
      cursor: pointer;
    }

    .chat-create-actions .ghost {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-muted);
    }

    .chat-create-actions .solid {
      border: 1px solid rgba(226, 192, 106, 0.52);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      color: var(--accent-ink);
      font-weight: 640;
    }

    .chat-thread-list {
      display: grid;
      gap: var(--chat-gap);
      max-width: 100%;
      min-width: 0;
      overflow-x: hidden;
    }

    .chat-thread-item {
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 9px;
      background: rgba(255, 255, 255, 0.01);
      color: inherit;
      text-align: left;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-width: 0;
      transition: border-color 140ms ease, background-color 140ms ease;
    }

    .chat-thread-item:hover {
      background: rgba(255, 255, 255, 0.04);
    }

    .chat-thread-item.active {
      border-color: rgba(226, 192, 106, 0.38);
      background: rgba(226, 192, 106, 0.08);
    }

    .chat-thread-item.unread .chat-thread-title {
      color: var(--text);
      font-weight: 700;
    }

    .chat-thread-item.unread .chat-thread-preview {
      color: rgba(233, 228, 216, 0.86);
      font-weight: 560;
    }

    .chat-thread-avatar {
      width: 34px;
      height: 34px;
      border-radius: 11px;
      border: 1px solid rgba(226, 192, 106, 0.34);
      display: grid;
      place-content: center;
      font-size: 0.66rem;
      font-weight: 700;
      color: #f3e7c5;
      background: rgba(226, 192, 106, 0.14);
      flex: 0 0 auto;
    }

    .chat-thread-main {
      min-width: 0;
      flex: 1;
      display: grid;
      gap: 3px;
    }

    .chat-thread-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }

    .chat-thread-title {
      font-size: 0.77rem;
      letter-spacing: -0.01em;
      font-weight: 630;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-thread-preview {
      font-size: 0.69rem;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-thread-time {
      font-size: 0.62rem;
      color: var(--text-dim);
      white-space: nowrap;
    }

    .chat-thread-unread-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(10, 14, 18, 0.64);
      flex: 0 0 auto;
    }

    .chat-conversation {
      min-height: 0;
      display: grid;
      grid-template-rows: auto 1fr auto;
      max-width: 100%;
      min-width: 0;
      background: rgba(255, 255, 255, 0.01);
    }

    .chat-conversation-head {
      border-bottom: 1px solid var(--line);
      padding: 11px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      background: rgba(255, 255, 255, 0.02);
    }

    .chat-conversation-avatar {
      width: 34px;
      height: 34px;
      border-radius: 11px;
      border: 1px solid rgba(226, 192, 106, 0.34);
      display: grid;
      place-content: center;
      font-size: 0.66rem;
      font-weight: 700;
      color: #f3e7c5;
      background: rgba(226, 192, 106, 0.14);
      flex: 0 0 auto;
    }

    .chat-conversation-meta {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .chat-conversation-meta h4,
    .chat-conversation-meta p {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-conversation-head h4 {
      font-size: 0.87rem;
      letter-spacing: -0.01em;
    }

    .chat-conversation-head p {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .chat-messages {
      padding: var(--chat-pad) 14px;
      overflow-y: auto;
      overflow-x: hidden;
      display: grid;
      align-content: start;
      gap: var(--chat-gap);
      max-width: 100%;
      min-width: 0;
    }

    .chat-modal-card,
    .chat-layout,
    .chat-threads,
    .chat-tools,
    .chat-thread-list,
    .chat-conversation,
    .chat-messages,
    .chat-form {
      max-width: 100%;
      min-width: 0;
    }

    .chat-msg {
      max-width: min(480px, 82%);
      border-radius: 14px;
      padding: 8px 11px;
      font-size: 0.75rem;
      line-height: 1.45;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      word-break: break-word;
    }

    .chat-msg.me {
      margin-left: auto;
      border-color: rgba(226, 192, 106, 0.56);
      background: linear-gradient(132deg, rgba(226, 192, 106, 0.96), rgba(176, 143, 58, 0.95));
      color: #1d1605;
    }

    .chat-msg.system {
      margin-inline: auto;
      text-align: center;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.02);
      border-style: dashed;
    }

    .chat-msg-meta {
      margin-top: 5px;
      font-size: 0.62rem;
      color: var(--text-dim);
    }

    .chat-empty {
      font-size: 0.74rem;
      color: var(--text-muted);
      border: 1px dashed var(--line);
      border-radius: 12px;
      padding: 11px 12px;
      background: rgba(255, 255, 255, 0.02);
    }

    .chat-form {
      border-top: 1px solid var(--line);
      padding: var(--chat-pad);
      display: grid;
      grid-template-columns: 1fr auto;
      gap: var(--chat-gap);
      max-width: 100%;
      min-width: 0;
      background: rgba(255, 255, 255, 0.02);
    }

    body[data-platform="ios"] .chat-form {
      padding-bottom: max(10px, calc(var(--safe-bottom) * 0.45));
      padding-left: 10px;
      padding-right: 10px;
    }

    .chat-form input {
      border: 1px solid var(--line);
      border-radius: 12px;
      min-height: 38px;
      padding: 0 12px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      font-size: 0.75rem;
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }

    .chat-form input::placeholder {
      color: var(--text-dim);
    }

    .chat-form button {
      border: 1px solid rgba(226, 192, 106, 0.58);
      border-radius: 12px;
      min-height: 38px;
      padding: 0 14px;
      font-size: 0.74rem;
      font-weight: 640;
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      cursor: pointer;
    }

    body[data-platform="ios"] .chat-layout {
      grid-template-columns: 1fr;
      grid-template-rows: minmax(208px, 40%) 1fr;
    }

    body[data-platform="ios"] .chat-threads {
      border-right: 0;
      border-bottom: 1px solid var(--line);
      padding: 10px 10px 8px;
    }

    body[data-platform="ios"] .chat-tools {
      position: sticky;
      top: 0;
      z-index: 2;
      padding-top: 2px;
      background: linear-gradient(180deg, rgba(12, 16, 21, 0.95), rgba(12, 16, 21, 0.84) 76%, rgba(12, 16, 21, 0));
    }

    body[data-platform="ios"] .chat-msg {
      max-width: min(430px, 86%);
      font-size: 0.78rem;
    }

    @media (max-width: 840px) {
      .chat-modal-card {
        height: min(86vh, 780px);
      }

      .chat-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(160px, 38%) 1fr;
      }

      .chat-threads {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

      body[data-platform="ios"] .chat-modal {
        padding: 6px;
      }

      body[data-platform="ios"] .chat-modal-card {
        width: calc(100vw - 12px);
        height: calc(100vh - 108px);
        border-radius: 22px;
      }
    }

    @media (max-width: 560px) {
      .chat-modal {
        padding: 8px;
      }

      .chat-modal-card {
        width: calc(100vw - 12px);
        height: calc(100dvh - 12px);
        border-radius: 18px;
      }

      body[data-platform="ios"] .chat-modal-card {
        height: calc(100dvh - 108px);
      }

      .chat-layout,
      body[data-platform="ios"] .chat-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, 44%) 1fr;
      }

      .chat-create-row,
      .chat-create-actions {
        grid-template-columns: 1fr 1fr;
      }
    }

    @container (max-width: 840px) {
      .chat-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, 44%) 1fr;
      }

      .chat-threads {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }
    }

    .chat-page .chat-module {
      width: 100%;
      max-width: 100%;
      min-height: min(80vh, 860px);
      height: auto;
      border-radius: 0;
      border: 0;
      box-shadow: none;
      background: transparent;
    }

    .chat-page .chat-head {
      padding: 12px 14px;
    }

    .chat-page .chat-layout {
      height: 100%;
    }

    .app-shell.chat-static .chat-page {
      margin-top: 0;
      height: 100%;
      min-height: 0;
    }

    .app-shell.chat-static .chat-page .chat-module {
      min-height: 0;
      height: 100%;
    }

    .app-shell.chat-static {
      padding: calc(var(--safe-top) + 2px) 0 calc(var(--safe-bottom) + 96px);
    }

    .app-shell.chat-static .topbar,
    .app-shell.chat-static .webapp-nav {
      display: none;
    }

    .app-shell.chat-static .app-content {
      padding: 0;
    }

    .app-shell.chat-static .chat-page,
    .app-shell.chat-static .chat-page .chat-module,
    .app-shell.chat-static .chat-layout,
    .app-shell.chat-static .chat-threads,
    .app-shell.chat-static .chat-conversation {
      height: 100%;
      min-height: 0;
      overflow: hidden;
    }

    .chat-page .chat-module {
      background: #000;
      color: #f4f6fb;
    }

    .chat-page .chat-head {
      min-height: 54px;
      padding: 6px 14px 10px;
      border-bottom: 0;
      background: transparent;
    }

    .chat-page .chat-head h3 {
      font-size: 2.05rem;
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: lowercase;
    }

    .chat-page .chat-close {
      min-height: 38px;
      min-width: 38px;
      padding: 0;
      border-radius: 999px;
      font-size: 1.1rem;
      color: #d7dce7;
      border-color: rgba(255, 255, 255, 0.2);
      background: rgba(255, 255, 255, 0.08);
    }

    .chat-page .chat-layout {
      grid-template-columns: 1fr;
      grid-template-rows: 1fr;
      height: 100%;
    }

    .chat-page .chat-threads {
      border: 0;
      padding: 0 10px 10px;
      display: grid;
      grid-template-rows: auto 1fr;
      gap: 8px;
      background: transparent;
      overflow: hidden;
    }

    .chat-page .chat-tools {
      gap: 8px;
      margin-bottom: 0;
    }

    .chat-page .chat-search {
      min-height: 52px;
      border-radius: 26px;
      padding: 0 16px;
      font-size: 1.02rem;
      border-color: rgba(255, 255, 255, 0.14);
      background: #24262b;
    }

    .chat-stories {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding: 2px 2px 6px;
      scrollbar-width: none;
    }

    .chat-stories::-webkit-scrollbar {
      display: none;
    }

    .chat-story-item {
      border: 0;
      background: transparent;
      color: #d9dde7;
      width: 72px;
      min-width: 72px;
      display: grid;
      justify-items: center;
      gap: 6px;
      cursor: pointer;
      position: relative;
    }

    .chat-story-avatar {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.12);
      display: grid;
      place-content: center;
      background: #1d1f25;
      font-size: 0.9rem;
      font-weight: 760;
      color: #eff2fb;
    }

    .chat-story-item.unread .chat-story-avatar {
      border-color: rgba(89, 171, 255, 0.86);
    }

    .chat-story-online {
      position: absolute;
      right: 8px;
      top: 42px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #3fd05d;
      border: 2px solid #000;
    }

    .chat-story-label {
      width: 100%;
      font-size: 0.8rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: #ccd1db;
    }

    .chat-page .chat-filters {
      margin-top: 2px;
    }

    .chat-page .chat-create-row {
      display: none;
    }

    .chat-page .chat-thread-list {
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: none;
      padding-bottom: 8px;
      gap: 2px;
    }

    .chat-page .chat-thread-list::-webkit-scrollbar {
      display: none;
    }

    .chat-page .chat-thread-item {
      border: 0;
      border-radius: 14px;
      background: transparent;
      padding: 10px 8px;
      gap: 10px;
    }

    .chat-page .chat-thread-item:hover {
      background: rgba(255, 255, 255, 0.06);
    }

    .chat-page .chat-thread-item.active {
      border-color: transparent;
      background: rgba(255, 255, 255, 0.12);
    }

    .chat-page .chat-thread-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: #1f2127;
      font-size: 0.9rem;
    }

    .chat-page .chat-thread-title {
      font-size: 1.02rem;
      font-weight: 700;
      color: #f3f6ff;
    }

    .chat-page .chat-thread-time {
      font-size: 0.86rem;
      color: #c7ccd8;
    }

    .chat-thread-state {
      border-radius: 999px;
      padding: 2px 7px;
      font-size: 0.63rem;
      letter-spacing: 0.01em;
      background: rgba(89, 171, 255, 0.2);
      color: #8dc3ff;
      border: 1px solid rgba(89, 171, 255, 0.42);
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .chat-thread-state.pending {
      background: rgba(247, 191, 79, 0.16);
      color: #f6cb73;
      border-color: rgba(247, 191, 79, 0.4);
    }

    .chat-page .chat-thread-preview {
      font-size: 0.96rem;
      color: #b1b7c4;
    }

    .chat-page[data-chat-view="list"] .chat-conversation {
      display: none;
    }

    .chat-page[data-chat-view="conversation"] .chat-threads {
      display: none;
    }

    .chat-page[data-chat-view="conversation"] .chat-conversation {
      display: grid;
      grid-template-rows: auto 1fr auto;
      border: 0;
      background: transparent;
    }

    .chat-page .chat-conversation-head {
      padding: 8px 10px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
      background: transparent;
    }

    .chat-back-list {
      border: 0;
      background: transparent;
      color: #cfd5e1;
      width: 34px;
      height: 34px;
      border-radius: 50%;
      font-size: 1.15rem;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .chat-approve-btn {
      border: 1px solid rgba(247, 191, 79, 0.45);
      background: rgba(247, 191, 79, 0.14);
      color: #f6cb73;
      min-height: 30px;
      border-radius: 999px;
      padding: 0 12px;
      font-size: 0.72rem;
      font-weight: 650;
      cursor: pointer;
      margin-left: auto;
      flex: 0 0 auto;
    }

    .chat-approve-btn[disabled] {
      opacity: 0.62;
      cursor: default;
    }

    .chat-page .chat-messages {
      padding: 10px 12px;
      overflow-y: auto;
      scrollbar-width: none;
      background: transparent;
    }

    .chat-page .chat-messages::-webkit-scrollbar {
      display: none;
    }

    .chat-page .chat-form {
      border-top: 1px solid rgba(255, 255, 255, 0.12);
      background: transparent;
      padding: 10px 12px;
    }

    .jam-modal {
      position: fixed;
      inset: 0;
      z-index: 290;
      display: grid;
      place-content: center;
      padding: 16px;
      overflow: hidden;
      background: rgba(4, 8, 12, 0.56);
      backdrop-filter: blur(8px);
    }

    .jam-modal[hidden] {
      display: none;
    }

    .jam-modal-card {
      width: min(760px, calc(100vw - 24px));
      max-width: 100%;
      max-height: min(90vh, 920px);
      overflow: auto;
      border-radius: 20px;
      border: 1px solid var(--line-strong);
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.12), transparent 72%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
      box-shadow: var(--shadow);
      padding: 14px;
      display: grid;
      gap: 11px;
    }

    .jam-modal-head {
      display: grid;
      gap: 5px;
    }

    .jam-modal-kicker {
      justify-self: start;
      font-size: 0.66rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      border: 1px solid rgba(226, 192, 106, 0.38);
      border-radius: 999px;
      padding: 3px 9px;
      color: #f0dfb6;
      background: rgba(226, 192, 106, 0.12);
    }

    .jam-modal-head-main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .jam-modal-head-main h3 {
      font-size: 1.02rem;
      letter-spacing: -0.01em;
    }

    .jam-modal-close {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 30px;
      padding: 0 11px;
      font-size: 0.72rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.04);
      cursor: pointer;
    }

    .jam-detail-grid {
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: 10px;
    }

    .jam-detail-summary,
    .jam-detail-participants,
    .jam-register-form {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.035);
      display: grid;
      gap: 8px;
    }

    .jam-detail-description {
      font-size: 0.8rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .jam-detail-meta-list {
      display: grid;
      gap: 6px;
    }

    .jam-detail-meta-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 7px 9px;
      font-size: 0.74rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .jam-detail-subhead {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .jam-detail-subhead h4,
    .jam-register-form h4 {
      font-size: 0.82rem;
      letter-spacing: -0.01em;
    }

    .jam-detail-subhead span {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .jam-participant-list {
      display: grid;
      gap: 6px;
      max-height: 220px;
      overflow: auto;
    }

    .jam-participant-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 7px 9px;
      font-size: 0.74rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
      display: grid;
      gap: 2px;
    }

    .jam-participant-item strong {
      color: var(--text);
    }

    .jam-register-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .jam-register-grid .profile-field.wide {
      grid-column: 1 / -1;
    }

    .jam-register-actions {
      display: flex;
      justify-content: flex-end;
      gap: 7px;
    }

    .jam-create-card {
      width: min(680px, calc(100vw - 24px));
    }

    .jam-create-form {
      display: grid;
      gap: 10px;
    }

    .jam-empty {
      border: 1px dashed var(--line);
      border-radius: 12px;
      padding: 11px;
      font-size: 0.76rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
    }

    .profile-modal {
      position: fixed;
      inset: 0;
      z-index: 280;
      display: grid;
      place-content: center;
      padding: 18px;
      background: rgba(4, 8, 12, 0.56);
      backdrop-filter: blur(8px);
    }

    .profile-modal[hidden] {
      display: none;
    }

    .profile-modal-card {
      width: min(760px, calc(100vw - 28px));
      max-width: 100%;
      max-height: min(88vh, 920px);
      overflow: auto;
      border-radius: 22px;
      border: 1px solid var(--line-strong);
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.16), transparent 72%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        var(--bg-card);
      box-shadow: var(--shadow);
      padding: 16px;
      display: grid;
      gap: 12px;
    }

    .profile-modal-head {
      display: grid;
      gap: 6px;
      padding: 2px 2px 4px;
    }

    .profile-modal-kicker {
      justify-self: start;
      border: 1px solid rgba(226, 192, 106, 0.4);
      border-radius: 999px;
      padding: 3px 9px;
      font-size: 0.66rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--accent-ink);
      background: rgba(226, 192, 106, 0.18);
    }

    .profile-modal-card h3 {
      font-size: 1.08rem;
      letter-spacing: -0.01em;
    }

    .profile-modal-card p {
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .profile-form {
      display: grid;
      gap: 11px;
    }

    .profile-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

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

    .profile-field {
      display: grid;
      gap: 6px;
    }

    .profile-form label {
      font-size: 0.7rem;
      color: var(--text-dim);
      font-weight: 620;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .profile-form input,
    .profile-form select,
    .profile-form textarea {
      width: 100%;
      border-radius: 12px;
      border: 1px solid var(--line-strong);
      background: var(--bg-elev);
      color: var(--text);
      min-height: 40px;
      padding: 0 11px;
      font-size: 0.8rem;
      transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
    }

    .profile-form input:focus,
    .profile-form select:focus,
    .profile-form textarea:focus {
      outline: none;
      border-color: rgba(226, 192, 106, 0.62);
      box-shadow: 0 0 0 3px rgba(226, 192, 106, 0.16);
      background: var(--bg-card);
    }

    .profile-form textarea {
      min-height: 72px;
      padding: 9px 11px;
      resize: vertical;
    }

    .profile-section {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 11px;
      background: var(--bg-elev);
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }

    .profile-section[hidden] {
      display: none;
    }

    .profile-section h4 {
      font-size: 0.83rem;
      letter-spacing: -0.01em;
      grid-column: 1 / -1;
    }

    .profile-section > .profile-field {
      margin-top: 1px;
    }

    .profile-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 2px;
      position: sticky;
      bottom: -16px;
      padding-top: 10px;
      background: linear-gradient(180deg, rgba(10, 15, 22, 0), rgba(10, 15, 22, 0.86) 38%);
    }

    .profile-hub-modal {
      position: fixed;
      inset: 0;
      z-index: 285;
      display: grid;
      place-content: center;
      padding: 18px;
      background: rgba(4, 8, 12, 0.56);
      backdrop-filter: blur(8px);
    }

    .profile-hub-modal[hidden] {
      display: none;
    }

    .profile-hub-card {
      width: min(760px, calc(100vw - 28px));
      max-width: 100%;
      max-height: min(88vh, 900px);
      overflow: hidden;
      border-radius: 22px;
      border: 1px solid var(--line-strong);
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.14), transparent 72%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        var(--bg-card);
      box-shadow: var(--shadow);
      padding: 16px;
      display: grid;
      gap: 12px;
      grid-template-rows: auto auto minmax(0, 1fr);
    }

    .profile-hub-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      position: sticky;
      top: 0;
      z-index: 2;
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.14), transparent 72%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        var(--bg-card);
      padding-bottom: 4px;
    }

    .profile-hub-head h3 {
      font-size: 1.06rem;
      letter-spacing: -0.01em;
    }

    .profile-hub-tabs {
      display: flex;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 13px;
      padding: 4px;
      background: rgba(255, 255, 255, 0.05);
      position: sticky;
      top: 38px;
      z-index: 2;
    }

    .profile-hub-tab {
      border: 0;
      border-radius: 9px;
      min-height: 34px;
      flex: 1 1 0;
      background: transparent;
      color: var(--text-muted);
      font-size: 0.75rem;
      font-weight: 640;
      cursor: pointer;
    }

    .profile-hub-tab.active {
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      color: var(--text);
    }

    .profile-hub-pane[hidden] {
      display: none;
    }

    .profile-hub-pane {
      display: grid;
      gap: 10px;
      min-height: 0;
      overflow: auto;
      align-content: start;
      padding-right: 2px;
      scrollbar-width: thin;
    }

    #hubOverviewPane {
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 10px;
    }

    .profile-bento-card {
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--bg-elev);
    }

    .profile-identity {
      padding: 11px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 10px;
      align-items: center;
      grid-column: span 7;
    }

    .profile-avatar-preview {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      border: 1px solid rgba(226, 192, 106, 0.44);
      background:
        linear-gradient(140deg, rgba(226, 192, 106, 0.34), rgba(158, 126, 46, 0.16));
      display: grid;
      place-content: center;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--accent-ink);
      background-size: cover;
      background-position: center;
    }

    .profile-identity-meta {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .profile-identity-meta h4 {
      font-size: 0.9rem;
      letter-spacing: -0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .profile-identity-meta p {
      font-size: 0.74rem;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .profile-context-badge {
      justify-self: end;
      border: 1px solid rgba(226, 192, 106, 0.4);
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 0.68rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--accent-ink);
      background: rgba(226, 192, 106, 0.16);
      white-space: nowrap;
    }

    .profile-avatar-actions {
      display: grid;
      gap: 6px;
      justify-items: end;
    }

    .profile-upload-label {
      border: 1px solid rgba(226, 192, 106, 0.44);
      border-radius: 999px;
      min-height: 30px;
      padding: 0 11px;
      background: rgba(226, 192, 106, 0.18);
      color: var(--accent-ink);
      font-size: 0.72rem;
      font-weight: 640;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
    }

    .profile-avatar-remove {
      border: 1px solid var(--line);
      border-radius: 999px;
      min-height: 28px;
      padding: 0 10px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-muted);
      font-size: 0.69rem;
      cursor: pointer;
      white-space: nowrap;
    }

    .profile-media-panel {
      padding: 11px;
      display: grid;
      gap: 10px;
      grid-column: span 5;
      align-content: start;
    }

    .profile-media-head {
      display: grid;
      gap: 3px;
    }

    .profile-media-head h4 {
      font-size: 0.84rem;
      letter-spacing: -0.01em;
    }

    .profile-media-head p {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .profile-media-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }

    .profile-gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .profile-gallery-item {
      position: relative;
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: var(--bg-card);
      aspect-ratio: 1 / 1;
    }

    .profile-gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .profile-gallery-remove {
      position: absolute;
      top: 5px;
      right: 5px;
      width: 22px;
      height: 22px;
      border: 1px solid var(--line-strong);
      border-radius: 50%;
      background: rgba(4, 8, 12, 0.68);
      color: var(--text);
      font-size: 0.86rem;
      line-height: 1;
      display: grid;
      place-content: center;
      cursor: pointer;
    }

    .profile-gallery-empty {
      border: 1px dashed var(--line);
      border-radius: 11px;
      padding: 10px;
      font-size: 0.72rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.03);
      grid-column: 1 / -1;
    }

    .profile-band-logo {
      display: grid;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 13px;
      padding: 9px;
      background: var(--bg-card);
    }

    .profile-band-logo[hidden] {
      display: none;
    }

    .profile-band-logo-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }

    .profile-band-logo-head h5 {
      font-size: 0.76rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-dim);
    }

    .profile-band-logo-preview {
      border: 1px dashed var(--line);
      border-radius: 11px;
      min-height: 96px;
      display: grid;
      place-content: center;
      background: rgba(255, 255, 255, 0.02);
      overflow: hidden;
      font-size: 0.72rem;
      color: var(--text-muted);
      text-align: center;
      padding: 8px;
    }

    .profile-band-logo-preview img {
      max-width: 100%;
      max-height: 120px;
      object-fit: contain;
      display: block;
    }

    .profile-summary {
      padding: 12px;
      display: grid;
      gap: 8px;
      grid-column: span 8;
    }

    .profile-summary p {
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.45;
    }

    .profile-summary .summary-kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 7px;
    }

    .profile-summary .summary-kpi {
      border: 1px solid var(--line);
      border-radius: 11px;
      padding: 8px 9px;
      background: var(--bg-card);
      display: grid;
      gap: 3px;
    }

    .profile-summary .summary-kpi span {
      font-size: 0.66rem;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text-dim);
    }

    .profile-summary .summary-kpi strong {
      font-size: 0.8rem;
      color: var(--text);
      line-height: 1.3;
    }

    .profile-summary strong {
      color: var(--text);
    }

    .profile-summary .summary-section {
      border-top: 1px solid var(--line);
      padding-top: 8px;
      margin-top: 4px;
      display: grid;
      gap: 6px;
    }

    .profile-summary .summary-title {
      font-size: 0.72rem;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: var(--text);
      font-weight: 700;
    }

    .profile-summary .summary-list {
      display: grid;
      gap: 6px;
    }

    .profile-summary .summary-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 7px 9px;
      font-size: 0.74rem;
      color: var(--text-muted);
      background: var(--bg-card);
    }

    .profile-summary .summary-links {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .profile-summary .summary-link {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 9px;
      font-size: 0.68rem;
      color: var(--text-muted);
      text-decoration: none;
      background: var(--bg-card);
    }

    .profile-upgrade-card {
      padding: 12px;
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.16), transparent 72%),
        var(--bg-elev);
      display: grid;
      gap: 8px;
      grid-column: span 4;
    }

    .profile-upgrade-card[hidden] {
      display: none;
    }

    .profile-upgrade-card h4 {
      font-size: 0.86rem;
      letter-spacing: -0.01em;
    }

    .profile-upgrade-card p {
      font-size: 0.76rem;
      color: var(--text-muted);
    }

    .pro-upgrade-btn {
      justify-self: start;
      border: 1px solid rgba(226, 192, 106, 0.4);
      border-radius: 999px;
      min-height: 30px;
      padding: 0 11px;
      background: rgba(226, 192, 106, 0.12);
      color: var(--accent-ink);
      font-size: 0.74rem;
      font-weight: 640;
      cursor: pointer;
    }

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

    .hub-item {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 11px;
      display: grid;
      gap: 5px;
      background: var(--bg-elev);
    }

    .hub-item h5 {
      font-size: 0.83rem;
    }

    .hub-item p {
      font-size: 0.74rem;
      color: var(--text-muted);
    }

    .hub-item span {
      justify-self: start;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 0.66rem;
      color: var(--text-muted);
    }

    .hub-settings {
      display: grid;
      gap: 10px;
    }

    .hub-dev-toolbox-slot {
      display: grid;
      gap: 8px;
    }

    .hub-dev-toolbox-slot[hidden] {
      display: none;
    }

    .hub-dev-toolbox-slot .dev-toolbox {
      position: static;
      right: auto;
      left: auto;
      top: auto;
      transform: none;
      z-index: auto;
      width: 100%;
      max-width: 100%;
      border-radius: 16px;
      box-shadow: none;
      backdrop-filter: saturate(155%) blur(14px);
    }

    .hub-dev-admin-panel {
      display: grid;
      gap: 10px;
    }

    .hub-dev-admin-panel[hidden] {
      display: none;
    }

    .hub-dev-card {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--bg-elev);
      padding: 12px;
      display: grid;
      gap: 8px;
    }

    .hub-dev-card h4 {
      font-size: 0.86rem;
      letter-spacing: -0.01em;
    }

    .hub-dev-card p {
      font-size: 0.74rem;
      color: var(--text-muted);
      line-height: 1.38;
    }

    .hub-dev-snapshot {
      margin: 0;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(0, 0, 0, 0.22);
      color: var(--text);
      font-size: 0.68rem;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      line-height: 1.4;
      white-space: pre-wrap;
      max-height: 240px;
      overflow: auto;
    }

    .hub-dev-log-list {
      display: grid;
      gap: 6px;
      max-height: 240px;
      overflow: auto;
      padding-right: 2px;
    }

    .hub-dev-log-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px;
      background: rgba(255, 255, 255, 0.03);
      display: grid;
      gap: 4px;
    }

    .hub-dev-log-item strong {
      font-size: 0.67rem;
      letter-spacing: 0.03em;
      color: var(--text-muted);
      text-transform: uppercase;
    }

    .hub-dev-log-item p {
      margin: 0;
      font-size: 0.72rem;
      line-height: 1.35;
      color: var(--text);
      word-break: break-word;
    }

    .hub-dev-log-empty {
      border: 1px dashed var(--line);
      border-radius: 10px;
      padding: 10px;
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    .hub-dev-toolbox-slot .dev-body {
      padding: 10px 11px 12px;
    }

    .hub-band-ad {
      padding: 12px;
      display: grid;
      gap: 9px;
      grid-column: 1 / -1;
    }

    .hub-band-ad[hidden] {
      display: none;
    }

    .hub-band-ad h4 {
      font-size: 0.84rem;
      letter-spacing: -0.01em;
    }

    .hub-band-ad p {
      font-size: 0.74rem;
      color: var(--text-muted);
    }

    .hub-band-ad label {
      font-size: 0.7rem;
      color: var(--text-dim);
      font-weight: 620;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .hub-band-ad input,
    .hub-band-ad select,
    .hub-band-ad textarea {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--line-strong);
      background: var(--bg-card);
      color: var(--text);
      min-height: 36px;
      padding: 0 9px;
      font-size: 0.78rem;
    }

    .hub-band-ad textarea {
      min-height: 70px;
      padding: 8px 9px;
      resize: vertical;
    }

    .hub-setting-row {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 11px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      background: var(--bg-elev);
    }

    .hub-setting-row label {
      font-size: 0.78rem;
      color: var(--text-muted);
      font-weight: 620;
    }

    .hub-setting-row select {
      min-height: 34px;
      border-radius: 10px;
      border: 1px solid var(--line-strong);
      background: var(--bg-card);
      color: var(--text);
      padding: 0 10px;
      font-size: 0.76rem;
    }

    :root[data-theme="light"] .profile-modal,
    :root[data-theme="light"] .profile-hub-modal {
      background: rgba(44, 31, 11, 0.22);
    }

    :root[data-theme="light"] .profile-modal-card,
    :root[data-theme="light"] .profile-hub-card {
      box-shadow: 0 18px 34px rgba(42, 30, 10, 0.16);
    }

    :root[data-theme="light"] .profile-actions {
      background: linear-gradient(180deg, rgba(255, 249, 239, 0), rgba(255, 249, 239, 0.92) 40%);
    }

    :root[data-theme="light"] .profile-hub-head {
      background:
        radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.14), transparent 72%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
        var(--bg-card);
    }

    @media (prefers-color-scheme: light) {
      :root:not([data-theme="dark"]) .profile-modal,
      :root:not([data-theme="dark"]) .profile-hub-modal {
        background: rgba(44, 31, 11, 0.22);
      }

      :root:not([data-theme="dark"]) .profile-modal-card,
      :root:not([data-theme="dark"]) .profile-hub-card {
        box-shadow: 0 18px 34px rgba(42, 30, 10, 0.16);
      }

      :root:not([data-theme="dark"]) .profile-actions {
        background: linear-gradient(180deg, rgba(255, 249, 239, 0), rgba(255, 249, 239, 0.92) 40%);
      }

      :root:not([data-theme="dark"]) .profile-hub-head {
        background:
          radial-gradient(120% 140% at 0% 0%, rgba(226, 192, 106, 0.14), transparent 72%),
          linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
          var(--bg-card);
      }
    }

    @media (max-width: 760px) {
      .profile-grid {
        grid-template-columns: 1fr;
      }

      .profile-section {
        grid-template-columns: 1fr;
      }

      .profile-modal-card,
      .profile-hub-card {
        width: min(560px, calc(100vw - 18px));
        border-radius: 18px;
        padding: 13px;
      }

      .profile-actions {
        bottom: -13px;
      }

      .profile-hub-modal {
        padding: 8px;
      }

      .profile-hub-card {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 20px;
        padding: 10px;
        gap: 8px;
      }

      .profile-hub-head h3 {
        font-size: 0.98rem;
      }

      .profile-hub-tabs {
        top: 34px;
        display: flex;
        overflow-x: hidden;
        scrollbar-width: none;
      }

      .profile-hub-tabs::-webkit-scrollbar {
        display: none;
      }

      .profile-hub-tab {
        min-width: 0;
        flex: 1 1 0;
        padding: 0 8px;
      }

      #hubOverviewPane {
        grid-template-columns: 1fr;
      }

      .profile-identity {
        grid-template-columns: auto 1fr;
        grid-column: 1 / -1;
      }

      .profile-context-badge {
        grid-column: 1 / -1;
        justify-self: start;
      }

      .profile-media-panel,
      .profile-summary,
      .profile-upgrade-card,
      .hub-band-ad {
        grid-column: 1 / -1;
      }

      .profile-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

      .profile-summary {
        padding: 10px;
      }

      .profile-summary p {
        font-size: 0.75rem;
      }

      .jam-modal {
        padding: 8px;
      }

      .jam-modal-card {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
        padding: 10px;
      }

      .jam-detail-grid {
        grid-template-columns: 1fr;
      }

      .jam-register-grid {
        grid-template-columns: 1fr;
      }

      .match-detail-modal {
        padding: 8px;
      }

      .match-detail-card {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
        padding: 10px;
      }

      .match-detail-grid {
        grid-template-columns: 1fr;
      }
    }
    .stat-row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .stat-pill {
      font-size: 0.72rem;
      padding: 5px 9px;
      border-radius: 999px;
      border: 1px solid var(--line);
      color: var(--text-muted);
    }

    .dev-toolbox {
      position: fixed;
      right: 16px;
      top: calc(var(--safe-top) + 16px);
      z-index: 140;
      width: min(310px, calc(100vw - 32px));
      border-radius: 20px;
      border: 1px solid var(--line);
      background: var(--glass);
      backdrop-filter: saturate(175%) blur(22px);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    body[data-platform="ios"][data-dev-layout="stacked"] .dev-toolbox {
      right: auto;
      left: 50%;
      transform: translateX(-50%);
      top: calc(var(--safe-top) + 10px);
      width: min(420px, calc(100vw - 22px));
      z-index: 200;
    }

    .dev-toolbox[hidden] {
      display: none;
    }

    .dev-head {
      padding: 11px 12px;
      border-bottom: 1px solid var(--line);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    .dev-title {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .collapse-btn {
      border: 0;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.78rem;
    }

    .dev-body {
      padding: 10px 12px 12px;
      display: grid;
      gap: 9px;
    }

    .dev-toolbox.collapsed .dev-body {
      display: none;
    }

    .seg {
      background: rgba(127, 127, 127, 0.11);
      border-radius: 11px;
      padding: 3px;
      display: grid;
      gap: 4px;
      grid-template-columns: repeat(2, 1fr);
    }

    .seg.triple {
      grid-template-columns: repeat(3, 1fr);
    }

    .seg button {
      border: 0;
      background: transparent;
      border-radius: 9px;
      height: 30px;
      font-size: 0.74rem;
      color: var(--text-muted);
      cursor: pointer;
      font-weight: 600;
    }

    .seg button.active {
      color: var(--text);
      background: rgba(255, 255, 255, 0.14);
      box-shadow: inset 0 0 0 1px var(--line);
    }

    .dev-note {
      font-size: 0.72rem;
      color: var(--text-muted);
      padding: 0 2px;
    }

    .dev-admin-btn {
      border: 1px solid rgba(226, 192, 106, 0.42);
      border-radius: 999px;
      min-height: 32px;
      padding: 0 12px;
      font-size: 0.74rem;
      font-weight: 650;
      color: #f0e2be;
      background: linear-gradient(140deg, rgba(200, 168, 75, 0.2), rgba(158, 126, 46, 0.08));
      cursor: pointer;
    }

    .dev-admin-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    .liquid-nav-wrap {
      position: fixed;
      left: 50%;
      bottom: calc(var(--safe-bottom) + 14px);
      transform: translateX(-50%);
      width: min(620px, calc(100% - 24px));
      z-index: 120;
      box-sizing: border-box;
    }

    body[data-platform="web"] .liquid-nav-wrap {
      display: none;
    }

    .liquid-nav {
      border-radius: 30px;
      border: 1px solid var(--line-strong);
      background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.18)),
        radial-gradient(90% 120% at 10% 0%, rgba(255, 255, 255, 0.24), transparent 70%);
      backdrop-filter: saturate(185%) blur(28px);
      box-shadow: var(--shadow);
      padding: 9px;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 6px;
      position: relative;
      overflow: hidden;
      isolation: isolate;
      box-sizing: border-box;
    }

    .liquid-nav::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      border-top: 1px solid rgba(255, 255, 255, 0.42);
      border-left: 1px solid rgba(255, 255, 255, 0.14);
      opacity: 0.95;
      z-index: 1;
    }

    .liquid-nav::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      background: repeating-linear-gradient(
        105deg,
        rgba(255, 255, 255, 0.026) 0px,
        rgba(255, 255, 255, 0.026) 1px,
        transparent 1px,
        transparent 4px
      );
      mix-blend-mode: soft-light;
      opacity: 0.55;
      z-index: 1;
    }

    .nav-fx {
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: 30px;
      background:
        radial-gradient(58% 110% at 12% 0%, rgba(255, 255, 255, 0.24), transparent),
        radial-gradient(54% 130% at 88% 100%, rgba(255, 255, 255, 0.15), transparent);
      mix-blend-mode: screen;
      opacity: 0.8;
      z-index: 2;
    }

    .nav-active-pill {
      position: absolute;
      left: 8px;
      top: 8px;
      width: 90px;
      height: calc(100% - 16px);
      border-radius: 20px;
      pointer-events: none;
      opacity: 0;
      background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22)),
        radial-gradient(80% 120% at 50% -10%, rgba(255, 255, 255, 0.32), transparent 70%);
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.34),
        0 8px 18px rgba(9, 12, 18, 0.18);
      transform: translate3d(0, 0, 0);
      transition:
        left 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 160ms ease;
      z-index: 3;
    }

    .nav-btn {
      border: 0;
      min-height: 60px;
      border-radius: 21px;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      display: grid;
      place-content: center;
      gap: 3px;
      font-size: 0.65rem;
      font-weight: 620;
      letter-spacing: 0.02em;
      transition: color 170ms ease, background-color 170ms ease;
      position: relative;
      z-index: 4;
    }

    .nav-btn[data-unread="true"]::after {
      content: "";
      position: absolute;
      top: 8px;
      right: 15px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(6, 12, 20, 0.48);
    }

    .nav-btn svg {
      width: 20px;
      height: 20px;
      margin: 0 auto;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .nav-btn.active {
      color: var(--text);
      background: transparent;
      box-shadow: none;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .nav-btn.cta {
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      box-shadow: 0 8px 20px rgba(200, 168, 75, 0.24);
      z-index: 5;
    }

    .nav-btn[disabled] {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .policy-list {
      display: grid;
      gap: var(--bento-stack-gap);
      margin-top: 0;
    }

    .policy-item {
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px;
      font-size: 0.78rem;
      color: var(--text-muted);
      background: rgba(255, 255, 255, 0.06);
    }

    .policy-item strong {
      color: var(--text);
      display: block;
      margin-bottom: 3px;
      font-size: 0.8rem;
    }

    .action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: var(--bento-stack-gap);
    }

    .action-btn {
      border: 1px solid var(--line-strong);
      background: transparent;
      color: var(--text);
      border-radius: 999px;
      height: 34px;
      padding: 0 12px;
      font-size: 0.75rem;
      font-weight: 600;
      cursor: pointer;
    }

    @media (max-width: 850px) {
      .dev-toolbox {
        width: calc(100vw - 24px);
        left: 12px;
        right: 12px;
        top: calc(var(--safe-top) + 10px);
      }

      .app-shell {
        padding-top: calc(var(--safe-top) + 20px);
      }

      .marketing-landing {
        width: calc(100% - 22px);
        margin-top: calc(var(--safe-top) + 14px);
      }

      .landing-shell {
        padding: 22px 18px;
      }

      .landing-shell h2 {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
        max-width: 100%;
      }

      .landing-actions {
        flex-direction: column;
      }

      .landing-actions .auth-submit,
      .landing-actions .auth-secondary {
        width: 100%;
      }

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

      .auth-intro {
        border-right: 0;
        border-bottom: 0;
      }
    }

    @media (max-width: 920px) {
      .content-grid {
        grid-template-columns: 1fr;
      }

      .section-card,
      .section-card[data-bento="primary"],
      .section-card[data-bento="secondary"],
      .section-card.wide {
        grid-column: 1 / -1;
      }
    }

    body[data-runtime="native-ios"][data-platform="ios"] .app-shell {
      width: 100%;
      max-width: 100%;
      min-height: 100dvh;
      height: auto;
      margin: 0;
      padding: max(calc(var(--safe-top) + 8px), var(--native-ios-top-min)) 12px calc(var(--safe-bottom) + 126px);
      border: 0;
      border-radius: 0;
      box-shadow: none;
      transform: none;
      transform-origin: center;
      background: var(--bg);
      overflow: visible;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .app-content {
      padding-bottom: calc(var(--safe-bottom) + 118px);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .ios-dynamic-island {
      display: none !important;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .topbar {
      top: 0;
      margin-bottom: 8px;
      border-radius: 18px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .webapp-nav {
      display: none;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .liquid-nav-wrap {
      position: fixed;
      display: block;
      left: max(var(--ios-nav-side-inset), calc(env(safe-area-inset-left) + 8px));
      right: max(var(--ios-nav-side-inset), calc(env(safe-area-inset-right) + 8px));
      width: auto;
      bottom: calc(var(--safe-bottom) + 8px);
      transform: none;
      z-index: 180;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .liquid-nav {
      min-height: 74px;
      border-radius: 24px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .content-grid {
      grid-template-columns: 1fr;
      gap: var(--bento-gap-compact);
      margin-top: var(--bento-gap-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card,
    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="primary"],
    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"],
    body[data-runtime="native-ios"][data-platform="ios"] .section-card.wide {
      grid-column: 1 / -1;
      border-radius: 20px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .hero {
      border-radius: 22px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .hero-content {
      padding: 24px 18px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .match-page {
      margin-top: var(--bento-gap-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .chat-page {
      margin-top: var(--bento-gap-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .match-page-header {
      padding: 0;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .card-head {
      padding: var(--bento-gutter-compact) var(--bento-gutter-compact) var(--bento-head-bottom-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .chip-row {
      padding: 0 var(--bento-gutter-compact) var(--bento-stack-gap-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .modes {
      padding: 0 var(--bento-gutter-compact) var(--bento-gutter-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-list {
      gap: var(--bento-stack-gap-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card > .jam-list {
      padding: 0 var(--bento-gutter-compact) var(--bento-gutter-compact);
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-item {
      grid-template-columns: 56px 1fr;
      gap: 10px;
      align-items: start;
      padding: 10px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-cover {
      width: 56px;
      height: 56px;
      border-radius: 11px;
      font-size: 1.1rem;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-main h4 {
      font-size: 1.02rem;
      line-height: 1.2;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-main p {
      font-size: 0.82rem;
      line-height: 1.3;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .jam-tag {
      grid-column: 2;
      justify-self: start;
      margin-top: 2px;
      padding: 4px 9px;
      font-size: 0.67rem;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"] .modes.active {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--bento-tight-gap);
      align-items: stretch;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"] .modes.active .mini-panel {
      margin-top: 0 !important;
      min-height: 96px;
      padding: 12px;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"] .modes.active .mini-panel:first-child {
      grid-column: 1 / -1;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"] .modes.active .mini-panel h4 {
      font-size: 0.86rem;
      line-height: 1.2;
    }

    body[data-runtime="native-ios"][data-platform="ios"] .section-card[data-bento="secondary"] .modes.active .mini-panel p {
      font-size: 0.76rem;
      line-height: 1.32;
    }

    body[data-platform="ios"] .app-shell {
      width: var(--ios16pm-width);
      height: var(--ios16pm-height);
      padding-left: 12px;
      padding-right: 12px;
      padding-top: 32px;
      padding-bottom: calc(124px + var(--safe-bottom));
      border-radius: 54px;
      border: 10px solid #0e1116;
      overflow: hidden;
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 40px 70px rgba(0, 0, 0, 0.45),
        0 10px 24px rgba(0, 0, 0, 0.35);
      background: var(--bg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      overscroll-behavior: contain;
      transform: scale(var(--ios-preview-scale));
      transform-origin: top center;
      margin-top: var(--ios-preview-top-offset);
    }

    body[data-platform="ios"] .app-content {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: none;
      padding-bottom: calc(110px + var(--safe-bottom));
    }

    body[data-platform="ios"] .app-content::-webkit-scrollbar {
      display: none;
    }

    body[data-platform="ios"] .topbar {
      border-radius: 22px;
      padding: 10px 10px;
      top: 10px;
      gap: 8px;
    }

    body[data-platform="ios"] .hero-content {
      padding: 24px 18px;
    }

    body[data-platform="ios"] .content-grid {
      grid-template-columns: 1fr !important;
      gap: var(--bento-gap-compact);
      margin-top: var(--bento-gap-compact);
    }

    body[data-platform="ios"] .match-page {
      margin-top: var(--bento-gap-compact);
    }

    body[data-platform="ios"] .chat-page {
      margin-top: var(--bento-gap-compact);
    }

    body[data-platform="ios"] .match-page-header {
      padding: 0;
    }

    body[data-platform="ios"] .chat-page .chat-module {
      width: 100%;
      min-height: min(78vh, 760px);
      border-radius: 0;
    }

    body[data-platform="ios"] .chat-page .chat-head {
      padding-top: 10px;
    }

    body[data-platform="ios"] .dev-toolbox {
      display: none !important;
    }

    body[data-platform="ios"] .hub-dev-toolbox-slot .dev-toolbox {
      display: block !important;
    }

    body[data-platform="ios"] .section-card,
    body[data-platform="ios"] .section-card.wide {
      grid-column: auto;
      width: 100%;
    }

    body[data-platform="ios"] .brand {
      gap: 9px;
    }

    body[data-platform="ios"] .brand-mark {
      width: 38px;
      height: 38px;
      border-radius: 12px;
    }

    body[data-platform="ios"] .brand h1 {
      font-size: 0.96rem;
    }

    body[data-platform="ios"] .brand span {
      font-size: 0.72rem;
      line-height: 1.1;
    }

    body[data-platform="ios"] .top-actions {
      gap: 6px;
    }

    body[data-platform="ios"] .account-chip {
      min-height: 34px;
      max-width: 102px;
      padding: 0 9px;
      font-size: 0.67rem;
    }

    body[data-platform="ios"] .account-chip span {
      display: none;
    }

    body[data-platform="ios"] .account-chip strong {
      font-size: 0.73rem;
      max-width: 76px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    body[data-platform="ios"] .profile-icon-btn,
    body[data-platform="ios"] .ghost-btn {
      width: 36px;
      height: 36px;
      border-radius: 11px;
    }

    body[data-platform="ios"] .profile-icon-btn::after {
      right: 5px;
      bottom: 5px;
    }

    body[data-platform="ios"] .profile-hub-modal {
      padding: 6px;
      align-items: center;
      justify-items: center;
    }

    body[data-platform="ios"] .profile-hub-card {
      width: calc(100vw - 12px);
      max-height: calc(100vh - 12px);
      border-radius: 22px;
      padding: 10px;
      gap: 8px;
    }

    body[data-platform="ios"] .profile-hub-head {
      top: 0;
    }

    body[data-platform="ios"] .profile-hub-tabs {
      top: 34px;
    }

    body[data-platform="ios"] .profile-hub-pane {
      padding-bottom: max(10px, calc(var(--safe-bottom) * 0.4));
    }

    body[data-platform="ios"] .hero h2 {
      font-size: clamp(2rem, 7.5vw, 2.55rem);
      max-width: 12ch;
    }

    body[data-platform="ios"] .hero p {
      font-size: 0.93rem;
      line-height: 1.34;
      margin-bottom: 14px;
    }

    body[data-platform="ios"] .status-banner {
      padding: 10px 12px;
    }

    body[data-platform="ios"] .profile-banner {
      align-items: flex-start;
      flex-direction: column;
      gap: 9px;
    }

    body[data-platform="ios"] .profile-btn {
      align-self: flex-start;
    }

    body[data-platform="ios"] .modes {
      padding: 0 var(--bento-gutter-compact) var(--bento-gutter-compact);
    }

    body[data-platform="ios"] .card-head {
      padding: var(--bento-gutter-compact) var(--bento-gutter-compact) var(--bento-head-bottom-compact);
    }

    body[data-platform="ios"] .chip-row {
      padding: 0 var(--bento-gutter-compact) var(--bento-stack-gap-compact);
    }

    body[data-platform="ios"] .jam-list {
      gap: var(--bento-stack-gap-compact);
    }

    body[data-platform="ios"] .section-card > .jam-list {
      padding: 0 var(--bento-gutter-compact) var(--bento-gutter-compact);
    }

    body[data-platform="ios"] .jam-item {
      grid-template-columns: 56px 1fr;
      gap: 10px;
      align-items: start;
      padding: 10px;
    }

    body[data-platform="ios"] .jam-cover {
      width: 56px;
      height: 56px;
      border-radius: 11px;
      font-size: 1.1rem;
    }

    body[data-platform="ios"] .jam-main h4 {
      font-size: 1.02rem;
      line-height: 1.2;
    }

    body[data-platform="ios"] .jam-main p {
      font-size: 0.82rem;
      line-height: 1.3;
    }

    body[data-platform="ios"] .jam-tag {
      grid-column: 2;
      justify-self: start;
      margin-top: 2px;
      padding: 4px 9px;
      font-size: 0.67rem;
    }

    body[data-platform="ios"] .mini-panel {
      padding: 12px;
    }

    body[data-platform="ios"] .app-shell.auth-screen {
      position: relative;
      display: flex;
      flex-direction: column;
      padding-left: 0;
      padding-right: 0;
      padding-top: 0;
      padding-bottom: 0;
      overflow: hidden;
      scrollbar-width: none;
    }

    body[data-platform="ios"] .app-shell.auth-screen::-webkit-scrollbar {
      display: none;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-landing {
      border-radius: 0;
      min-height: 100%;
      height: 100%;
      border: 0;
      display: flex;
      flex-direction: column;
      background:
        radial-gradient(80% 75% at 14% 0%, rgba(226, 192, 106, 0.22), transparent 68%),
        radial-gradient(75% 85% at 100% 24%, rgba(158, 126, 46, 0.18), transparent 72%),
        var(--auth-shell-bg);
      box-shadow: none;
      padding: calc(var(--safe-top) + 60px) 22px max(22px, calc(var(--safe-bottom) + 20px));
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-grid {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 100%;
      gap: 14px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-landing[data-auth-view="login"] .auth-intro,
    body[data-platform="ios"] .app-shell.auth-screen .auth-landing[data-auth-view="signup"] .auth-intro {
      display: block;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-intro {
      border: 0;
      padding: 0;
      background: transparent;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-hero-media {
      display: none;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-hero-row {
      gap: 11px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-intro h2 {
      font-size: clamp(2rem, 8.4vw, 3rem);
      line-height: 0.94;
      letter-spacing: 0.04em;
      margin-bottom: 10px;
      max-width: 9ch;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-intro p {
      font-size: 0.9rem;
      margin-bottom: 8px;
      max-width: 30ch;
      line-height: 1.4;
      color: var(--auth-intro-text);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-tagline {
      font-size: 0.67rem;
      opacity: 0.85;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-panel {
      margin-top: auto;
      padding: 0;
      background: transparent;
      width: 100%;
      max-width: min(520px, 100%);
      min-width: 0;
      min-height: 0;
      align-self: center;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-step {
      border: 1px solid rgba(240, 237, 232, 0.14);
      border-radius: 18px;
      background: linear-gradient(155deg, rgba(19, 22, 28, 0.76), rgba(11, 14, 19, 0.72));
      backdrop-filter: saturate(150%) blur(10px);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
      padding: 18px 16px 14px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-landing,
    body[data-platform="ios"] .app-shell.auth-screen .auth-grid,
    body[data-platform="ios"] .app-shell.auth-screen .auth-form,
    body[data-platform="ios"] .app-shell.auth-screen .auth-form .form-row {
      width: 100%;
      max-width: 100%;
      min-width: 0;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-title {
      font-size: 1.14rem;
      margin-bottom: 4px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-subtitle {
      font-size: 0.79rem;
      margin-bottom: 13px;
      color: rgba(222, 214, 196, 0.76);
    }

    body[data-platform="ios"] .app-shell.auth-screen .ios-dynamic-island {
      position: absolute;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      margin: 0;
      z-index: 240;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-form label {
      font-size: 0.76rem;
      font-weight: 640;
      color: var(--auth-label-color);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-form input,
    body[data-platform="ios"] .app-shell.auth-screen .auth-form select {
      min-height: 47px;
      border-radius: 13px;
      background: var(--auth-input-bg);
      border-color: var(--auth-input-border);
      color: var(--auth-input-text);
      font-size: 0.87rem;
      padding: 0 13px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-media-shape {
      border-color: rgba(255, 255, 255, 0.16);
      background:
        radial-gradient(95% 140% at 0% 0%, rgba(226, 192, 106, 0.24), transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-media-shape::after {
      color: rgba(233, 224, 209, 0.82);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-media-shape.main {
      min-height: 122px;
      border-radius: 20px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-submit {
      min-height: 50px;
      font-size: 0.92rem;
      font-weight: 700;
      margin-top: 8px;
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
      box-shadow: 0 10px 24px rgba(200, 168, 75, 0.3);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-hint {
      font-size: 0.74rem;
      color: rgba(221, 210, 192, 0.64);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-feedback {
      font-size: 0.76rem;
      margin-top: 4px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-back {
      min-height: 34px;
      font-size: 0.74rem;
      border-color: var(--auth-back-border);
      color: var(--auth-back-text);
      margin-bottom: 10px;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-secondary {
      min-height: 46px;
      font-size: 0.86rem;
      border-color: var(--auth-secondary-border);
      background: var(--auth-secondary-bg);
      color: var(--auth-secondary-text);
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-switch {
      min-height: 42px;
      width: 100%;
      margin-top: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.78rem;
    }

    body[data-platform="ios"] .app-shell.auth-screen .auth-link {
      min-height: 34px;
      width: 100%;
      margin-top: 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.76rem;
    }

    .ios-dynamic-island {
      display: none;
    }

    body[data-platform="ios"] .ios-dynamic-island {
      display: block;
      position: sticky;
      top: 0;
      z-index: 120;
      width: 132px;
      height: 36px;
      margin: 2px auto 10px;
      border-radius: 999px;
      background: #050608;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    body[data-platform="ios"] .liquid-nav-wrap {
      position: absolute;
      left: var(--ios-nav-side-inset);
      right: var(--ios-nav-side-inset);
      transform: none;
      bottom: calc(var(--safe-bottom) + 10px);
      width: auto;
      max-width: none;
      padding: 0;
      margin-top: 0;
      z-index: 100;
    }

    body[data-platform="ios"] .liquid-nav {
      border-radius: 26px;
      min-height: 78px;
      border-color: rgba(255, 255, 255, 0.16);
      background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.14)),
        radial-gradient(90% 140% at 50% -10%, rgba(255, 255, 255, 0.22), transparent 72%);
      backdrop-filter: saturate(195%) blur(30px);
      box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    body[data-platform="ios"] .webapp-nav {
      display: none;
    }

    body[data-platform="web"] .webapp-nav {
      display: flex;
    }

    body[data-platform="ios"] .nav-active-pill {
      border-radius: 18px;
      background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.16)),
        radial-gradient(90% 120% at 50% -10%, rgba(255, 255, 255, 0.3), transparent 70%);
      box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.24),
        0 12px 24px rgba(0, 0, 0, 0.2);
    }

    body[data-platform="web"] .liquid-nav {
      backdrop-filter: saturate(165%) blur(20px);
    }

    body[data-platform="web"] .nav-active-pill {
      background:
        linear-gradient(160deg, rgba(226, 192, 106, 0.24), rgba(158, 126, 46, 0.12)),
        radial-gradient(80% 120% at 50% 0%, rgba(226, 192, 106, 0.2), transparent 70%);
    }

    @media (max-width: 460px) {
      body[data-platform="ios"] .liquid-nav-wrap {
        width: auto;
        padding: 0;
      }
    }

    @media (max-width: 400px) {
      body[data-platform="ios"] .liquid-nav-wrap {
        left: 10px;
        right: 10px;
      }

      body[data-platform="ios"] .liquid-nav {
        min-height: 72px;
        border-radius: 22px;
        padding: 7px;
        gap: 4px;
      }

      body[data-platform="ios"] .nav-btn {
        min-height: 54px;
        border-radius: 16px;
        font-size: 0.6rem;
        gap: 2px;
      }

      body[data-platform="ios"] .nav-btn svg {
        width: 18px;
        height: 18px;
      }
    }

    @media (max-width: 920px) {
      html, body {
        overflow-x: hidden;
      }

      .app-shell,
      .auth-landing,
      .auth-grid,
      .auth-panel,
      .auth-step,
      .content-grid,
      .chat-modal-card,
      .profile-modal-card,
      .profile-hub-card {
        max-width: 100%;
        min-width: 0;
      }
    }

    /* 2026 spacing refresh: calmer rhythm, clearer hierarchy, lower visual density */
    :root {
      --layout-max-width: 1180px;
      --surface-radius: 24px;
      --surface-radius-tight: 18px;
      --surface-gap: 20px;
      --surface-gap-tight: 14px;
      --content-pad: 20px;
      --content-pad-tight: 14px;
      --font-body: 0.96rem;
      --font-body-compact: 0.9rem;
      --font-meta: 0.84rem;
      --font-caption: 0.8rem;
      --font-micro: 0.76rem;
    }

    body {
      line-height: 1.5;
      letter-spacing: 0.002em;
    }

    .app-shell {
      width: min(var(--layout-max-width), 100%);
      padding: calc(var(--safe-top) + 24px) 20px calc(136px + var(--safe-bottom));
    }

    .app-content {
      display: grid;
      gap: 18px;
    }

    .topbar {
      border-radius: 22px;
      padding: 14px 16px;
      min-height: 70px;
    }

    .brand h1 {
      font-size: 1.22rem;
    }

    .brand span {
      font-size: var(--font-micro);
    }

    .webapp-nav {
      margin-top: 14px;
      border-radius: 20px;
      padding: 10px;
      gap: 10px;
    }

    .webapp-tab {
      font-size: var(--font-caption);
    }

    .webapp-action {
      font-size: var(--font-caption);
    }

    .hero {
      margin-top: 20px;
      border-radius: 30px;
    }

    .hero-content {
      padding: 42px 34px;
    }

    .hero p {
      font-size: 1rem;
      line-height: 1.6;
      max-width: 60ch;
      margin-bottom: 22px;
    }

    .content-grid {
      gap: var(--surface-gap);
      margin-top: var(--surface-gap);
    }

    .section-card {
      border-radius: var(--surface-radius);
    }

    .card-head {
      padding: var(--content-pad) var(--content-pad) 14px;
    }

    .card-head h3 {
      font-size: 1.08rem;
    }

    .card-head a {
      font-size: var(--font-caption);
    }

    .chip-row {
      gap: 10px;
      padding: 0 var(--content-pad) 14px;
    }

    .chip {
      min-height: 36px;
      padding: 8px 14px;
      font-size: var(--font-caption);
    }

    .modes {
      padding: 0 var(--content-pad) var(--content-pad);
    }

    .section-card > .jam-list {
      padding: 0 var(--content-pad) var(--content-pad);
    }

    .jam-list {
      gap: 14px;
    }

    .jam-item {
      grid-template-columns: 68px 1fr;
      gap: 15px;
      padding: 15px;
      border-radius: var(--surface-radius-tight);
    }

    .jam-cover {
      width: 68px;
      height: 68px;
      border-radius: 14px;
    }

    .jam-main h4 {
      font-size: 1rem;
      margin-bottom: 6px;
    }

    .jam-main p {
      font-size: var(--font-body-compact);
      line-height: 1.52;
    }

    .jam-main-meta {
      margin-top: 7px;
      font-size: var(--font-meta);
    }

    .mini-panel {
      border-radius: var(--surface-radius-tight);
      padding: 16px;
    }

    .mini-panel h4 {
      font-size: 0.98rem;
      margin-bottom: 6px;
    }

    .mini-panel p {
      font-size: var(--font-body-compact);
      line-height: 1.55;
    }

    .action-row {
      gap: 10px;
    }

    .action-btn {
      height: 38px;
      padding: 0 15px;
      font-size: var(--font-caption);
    }

    .match-page {
      gap: 14px;
    }

    .match-page-header {
      gap: 8px;
    }

    .match-page-header p {
      font-size: var(--font-body);
      line-height: 1.58;
    }

    .match-page-content {
      gap: 14px;
    }

    .match-head {
      gap: 10px;
      margin-bottom: 12px;
    }

    .match-search {
      height: 40px;
      padding: 0 14px;
      font-size: var(--font-caption);
      width: 100%;
    }

    .match-filters {
      gap: 8px;
      margin-bottom: 0;
    }

    .match-filter-label {
      font-size: var(--font-meta);
    }

    .match-genre-select {
      min-height: 40px;
      padding: 0 14px;
      font-size: var(--font-caption);
    }

    .match-list {
      gap: 12px;
    }

    .match-card {
      border-radius: var(--surface-radius-tight);
      padding: 15px;
      gap: 10px;
    }

    .match-desc {
      font-size: var(--font-body-compact);
      line-height: 1.56;
    }

    .match-summary {
      font-size: var(--font-meta);
      margin-bottom: 10px;
    }

    .match-meta p {
      font-size: var(--font-meta);
    }

    .match-pill {
      font-size: var(--font-micro);
    }

    .profile-modal-card {
      padding: 20px;
      gap: 16px;
    }

    .profile-section {
      padding: 14px;
      gap: 11px;
    }

    .profile-form label,
    .hub-band-ad label {
      font-size: var(--font-micro);
    }

    .profile-form input,
    .profile-form select,
    .profile-form textarea,
    .hub-band-ad input,
    .hub-band-ad select,
    .hub-band-ad textarea {
      font-size: var(--font-caption);
    }

    .profile-hub-card {
      width: min(860px, calc(100vw - 28px));
      padding: 18px;
      gap: 14px;
    }

    .profile-hub-tabs {
      gap: 8px;
      padding: 5px;
      border-radius: 14px;
    }

    .profile-hub-tab {
      min-height: 36px;
    }

    .profile-hub-pane {
      gap: 12px;
      padding-right: 4px;
    }

    #hubOverviewPane {
      gap: 12px;
    }

    .profile-bento-card {
      border-radius: var(--surface-radius-tight);
    }

    .profile-identity,
    .profile-media-panel,
    .profile-summary,
    .profile-upgrade-card,
    .hub-band-ad {
      padding: 14px;
    }

    .profile-summary .summary-kpis {
      gap: 9px;
    }

    .profile-summary .summary-kpi {
      padding: 10px 11px;
      gap: 4px;
    }

    .profile-summary .summary-section {
      padding-top: 10px;
      margin-top: 6px;
      gap: 8px;
    }

    .profile-summary .summary-item {
      padding: 8px 10px;
      font-size: var(--font-caption);
    }

    .hub-item {
      border-radius: 16px;
      padding: 13px;
      gap: 7px;
    }

    .hub-item h5 {
      font-size: var(--font-body-compact);
    }

    .hub-item p {
      font-size: var(--font-caption);
    }

    .hub-settings {
      gap: 12px;
    }

    .chat-page .chat-head {
      padding: 12px 18px;
    }

    .chat-page .chat-threads {
      padding: 4px 16px 16px;
      gap: 12px;
    }

    .chat-page .chat-tools {
      gap: 10px;
    }

    .chat-page .chat-search {
      min-height: 50px;
      border-radius: 22px;
      padding: 0 18px;
      font-size: 1.06rem;
    }

    .chat-page .chat-filters {
      gap: 7px;
      padding: 5px;
      border-radius: 14px;
    }

    .chat-page .chat-filter-btn {
      min-height: 34px;
      font-size: var(--font-caption);
    }

    .chat-page .chat-thread-list {
      gap: 6px;
      padding-bottom: 14px;
    }

    .chat-page .chat-thread-item {
      padding: 12px 8px;
    }

    .chat-page .chat-thread-avatar {
      width: 60px;
      height: 60px;
    }

    .chat-page .chat-thread-title {
      font-size: 1.08rem;
    }

    .chat-page .chat-thread-preview {
      font-size: 0.98rem;
    }

    .chat-page .chat-conversation-head {
      padding: 12px 16px;
    }

    .chat-page .chat-messages {
      padding: 14px 16px;
      gap: 12px;
    }

    .chat-page .chat-msg {
      border-radius: 16px;
      padding: 10px 13px;
      line-height: 1.5;
      font-size: 0.88rem;
    }

    .chat-page .chat-form {
      padding: 12px 16px 16px;
      gap: 10px;
    }

    .chat-page .chat-form input,
    .chat-page .chat-form button {
      min-height: 42px;
      border-radius: 14px;
      font-size: var(--font-caption);
    }

    .chat-thread-time {
      font-size: var(--font-micro);
    }

    .chat-thread-preview {
      font-size: var(--font-caption);
    }

    .chat-msg-meta {
      font-size: var(--font-micro);
    }

    .chat-empty {
      font-size: var(--font-caption);
    }

    @media (max-width: 920px) {
      .app-shell {
        padding: calc(var(--safe-top) + 18px) 14px calc(126px + var(--safe-bottom));
      }

      .app-content {
        gap: 14px;
      }

      .hero-content {
        padding: 30px 20px;
      }

      .content-grid {
        gap: 14px;
        margin-top: 14px;
      }

      .card-head,
      .modes,
      .section-card > .jam-list,
      .chip-row {
        padding-left: var(--content-pad-tight);
        padding-right: var(--content-pad-tight);
      }

      .card-head {
        padding-top: var(--content-pad-tight);
      }

      .modes,
      .section-card > .jam-list {
        padding-bottom: var(--content-pad-tight);
      }

      .jam-item {
        grid-template-columns: 60px 1fr;
        gap: 12px;
        padding: 12px;
      }

      .jam-cover {
        width: 60px;
        height: 60px;
      }

      .chat-page .chat-threads {
        padding: 2px 12px 14px;
      }

      .chat-page .chat-search {
        min-height: 46px;
      }

      .chat-page .chat-thread-avatar {
        width: 54px;
        height: 54px;
      }

      .profile-hub-card {
        width: calc(100vw - 16px);
        padding: 12px;
        gap: 10px;
      }
    }

    body[data-platform="ios"] .app-shell {
      padding-left: 14px;
      padding-right: 14px;
      padding-bottom: calc(132px + var(--safe-bottom));
    }

    body[data-platform="ios"] {
      --font-body: 1.02rem;
      --font-body-compact: 0.96rem;
      --font-meta: 0.9rem;
      --font-caption: 0.86rem;
      --font-micro: 0.82rem;
    }

    body[data-platform="ios"] .topbar {
      padding: 12px;
      border-radius: 20px;
    }

    body[data-platform="ios"] .hero-content {
      padding: 28px 20px;
    }

    body[data-platform="ios"] .content-grid {
      gap: 14px;
      margin-top: 14px;
    }

    body[data-platform="ios"] .card-head {
      padding: 14px 14px 10px;
    }

    body[data-platform="ios"] .chip-row {
      padding: 0 14px 10px;
    }

    body[data-platform="ios"] .modes,
    body[data-platform="ios"] .section-card > .jam-list {
      padding: 0 14px 14px;
    }

    body[data-platform="ios"] .jam-item {
      grid-template-columns: 60px 1fr;
      gap: 12px;
      padding: 12px;
    }

    body[data-platform="ios"] .jam-cover {
      width: 60px;
      height: 60px;
    }

    body[data-platform="ios"] .chat-page .chat-threads {
      padding: 2px 12px 14px;
      gap: 10px;
    }

    body[data-platform="ios"] .chat-page .chat-thread-list {
      gap: 4px;
    }

    /* Mobile polish: jam create modal as clean sheet with clear spacing and controls. */
    .jam-create-form .profile-field {
      gap: 7px;
    }

    .jam-create-form .profile-field label {
      font-size: var(--font-caption);
      font-weight: 620;
      letter-spacing: 0.01em;
      text-transform: none;
      color: var(--text);
    }

    .jam-create-form input,
    .jam-create-form select,
    .jam-create-form textarea {
      width: 100%;
      border-radius: 13px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.05);
      color: var(--text);
      min-height: 44px;
      padding: 0 12px;
      font-size: 0.94rem;
      transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
    }

    .jam-create-form input::placeholder,
    .jam-create-form textarea::placeholder {
      color: var(--text-muted);
      opacity: 0.9;
    }

    .jam-create-form input:focus,
    .jam-create-form select:focus,
    .jam-create-form textarea:focus {
      outline: none;
      border-color: rgba(226, 192, 106, 0.62);
      box-shadow: 0 0 0 3px rgba(226, 192, 106, 0.16);
      background: rgba(255, 255, 255, 0.08);
    }

    .jam-create-form textarea {
      min-height: 116px;
      padding: 11px 12px;
      resize: vertical;
    }

    .jam-create-form input[type="file"] {
      min-height: 42px;
      padding: 8px 10px;
      border-style: dashed;
      background: rgba(255, 255, 255, 0.03);
    }

    .jam-create-form .jam-register-actions .action-btn {
      min-width: 138px;
      height: 42px;
      padding: 0 16px;
      font-size: 0.9rem;
      font-weight: 620;
    }

    .jam-create-form .jam-register-actions .action-btn[type="submit"] {
      border-color: transparent;
      color: var(--accent-ink);
      background: linear-gradient(132deg, var(--accent), var(--accent-2));
    }

    @media (max-width: 780px) {
      .jam-modal {
        place-content: end center;
        padding: 0;
        background: rgba(6, 10, 16, 0.64);
        backdrop-filter: blur(10px);
      }

      .jam-modal-card.jam-create-card {
        width: 100%;
        max-width: 100%;
        max-height: min(94dvh, 980px);
        overflow: hidden;
        border-radius: 26px 26px 0 0;
        border-bottom: 0;
        border-left: 0;
        border-right: 0;
        padding: 0;
        gap: 0;
        display: grid;
        grid-template-rows: auto 1fr;
      }

      .jam-create-card .jam-modal-head {
        padding: 14px 16px 10px;
        gap: 6px;
        border-bottom: 1px solid var(--line);
        background:
          linear-gradient(180deg, rgba(18, 22, 30, 0.96), rgba(18, 22, 30, 0.88) 75%, rgba(18, 22, 30, 0.6));
      }

      .jam-create-card .jam-modal-kicker {
        display: none;
      }

      .jam-create-card .jam-modal-head-main h3 {
        font-size: 1.36rem;
        letter-spacing: -0.02em;
      }

      .jam-create-card .jam-modal-close {
        min-height: 38px;
        padding: 0 14px;
        font-size: 0.98rem;
      }

      .jam-create-card .jam-create-form {
        min-height: 0;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0;
      }

      .jam-create-card .jam-register-grid {
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px 16px 24px;
        align-content: start;
      }

      .jam-create-card .jam-register-grid .profile-field {
        grid-column: 1 / -1;
      }

      .jam-create-form .profile-field label {
        font-size: 1.02rem;
      }

      .jam-create-form input,
      .jam-create-form select,
      .jam-create-form textarea {
        min-height: 50px;
        border-radius: 14px;
        font-size: 1.02rem;
      }

      .jam-create-form textarea {
        min-height: 128px;
      }

      .jam-create-card .jam-register-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        justify-content: stretch;
        gap: 10px;
        padding: 12px 16px calc(12px + var(--safe-bottom));
        border-top: 1px solid var(--line);
        background:
          linear-gradient(180deg, rgba(16, 20, 28, 0.9), rgba(16, 20, 28, 0.98));
      }

      .jam-create-form .jam-register-actions .action-btn {
        flex: 1 1 0;
        width: 100%;
        height: 48px;
        font-size: 1.04rem;
        border-radius: 15px;
      }

      .jam-create-card #jamCreateVenueHint {
        font-size: 0.96rem;
        line-height: 1.52;
      }

      :root[data-theme="light"] .jam-create-card .jam-modal-head,
      :root:not([data-theme="dark"]) .jam-create-card .jam-modal-head {
        background:
          linear-gradient(180deg, rgba(246, 241, 230, 0.97), rgba(246, 241, 230, 0.92));
      }
    }

    /* Design QA pass: lock in consistent spacing, title rhythm, and bento behavior. */
    :root {
      --rhythm-page-gap: clamp(14px, 2.1vw, 20px);
      --rhythm-head-gap: clamp(8px, 1.2vw, 12px);
      --title-line-height: 1.08;
      --subtitle-line-height: 1.52;
      --font-body: 1rem;
      --font-body-compact: 0.94rem;
      --font-meta: 0.88rem;
      --font-caption: 0.86rem;
      --font-micro: 0.82rem;
    }

    .app-content {
      gap: var(--rhythm-page-gap);
    }

    .content-grid {
      grid-auto-flow: row dense;
      align-items: start;
      gap: var(--rhythm-page-gap);
      margin-top: var(--rhythm-page-gap);
    }

    .match-page,
    .chat-page {
      margin-top: var(--rhythm-page-gap);
    }

    .section-card {
      display: grid;
      align-content: start;
    }

    .card-head,
    .match-page-header,
    .chat-page .chat-head,
    .profile-hub-head,
    .profile-modal-head,
    .jam-modal-head,
    .match-detail-head {
      min-height: 0;
      gap: var(--rhythm-head-gap);
    }

    .card-head h3,
    .match-page-header h3,
    .chat-page .chat-head h3,
    .profile-modal-card h3,
    .profile-hub-head h3,
    .jam-modal-head-main h3,
    .match-detail-head h3 {
      line-height: var(--title-line-height);
      letter-spacing: -0.02em;
      margin: 0;
    }

    .match-page-header p,
    .hero p,
    .jam-main p,
    .match-desc,
    .profile-summary p,
    .profile-identity-meta p,
    .chat-thread-preview,
    .chat-page .chat-thread-preview {
      line-height: var(--subtitle-line-height);
    }

    .profile-hub-pane {
      gap: 14px;
    }

    #hubOverviewPane {
      gap: 14px;
    }

    .profile-bento-card {
      border-radius: 18px;
    }

    .profile-identity,
    .profile-media-panel,
    .profile-summary,
    .profile-upgrade-card,
    .hub-band-ad {
      padding: 16px;
    }

    .profile-identity-meta h4 {
      font-size: 1rem;
    }

    .profile-identity-meta p {
      font-size: var(--font-caption);
    }

    .profile-media-head h4 {
      font-size: 0.95rem;
    }

    .profile-media-head p {
      font-size: var(--font-caption);
    }

    .profile-summary .summary-kpi strong {
      font-size: 0.92rem;
    }

    .chat-page .chat-thread-item {
      padding: 12px 10px;
      border-radius: 15px;
    }

    .chat-filter-btn {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .chat-page .chat-head h3 {
      text-transform: none;
    }

    .chat-page .chat-thread-title {
      font-size: 1.06rem;
      line-height: 1.22;
    }

    .chat-page .chat-thread-time {
      font-size: var(--font-caption);
    }

    .chat-page .chat-thread-preview {
      font-size: var(--font-body-compact);
    }

    .match-card {
      padding: 16px;
    }

    .match-meta h5 {
      line-height: 1.14;
      letter-spacing: -0.01em;
    }

    .match-meta p {
      font-size: var(--font-meta);
    }

    .jam-main h4 {
      line-height: 1.14;
      letter-spacing: -0.01em;
    }

    @media (max-width: 920px) {
      :root {
        --rhythm-page-gap: 14px;
      }

      .app-shell {
        padding: calc(var(--safe-top) + 18px) 14px calc(128px + var(--safe-bottom));
      }

      .card-head,
      .chip-row,
      .modes,
      .section-card > .jam-list {
        padding-left: 14px;
        padding-right: 14px;
      }

      .profile-hub-pane {
        gap: 12px;
      }

      #hubOverviewPane {
        gap: 12px;
      }

      .profile-identity,
      .profile-media-panel,
      .profile-summary,
      .profile-upgrade-card,
      .hub-band-ad {
        padding: 14px;
      }
    }

    body[data-platform="ios"] {
      --font-body: 1.04rem;
      --font-body-compact: 0.98rem;
      --font-meta: 0.92rem;
      --font-caption: 0.9rem;
      --font-micro: 0.86rem;
    }

    body[data-platform="ios"] .card-head,
    body[data-platform="ios"] .chip-row,
    body[data-platform="ios"] .modes,
    body[data-platform="ios"] .section-card > .jam-list,
    body[data-platform="ios"] .chat-page .chat-head,
    body[data-platform="ios"] .match-page-header {
      padding-left: 14px;
      padding-right: 14px;
    }

    body[data-platform="ios"] .chat-page .chat-head h3 {
      font-size: 1.98rem;
    }

    body[data-platform="ios"] .chat-page .chat-filters {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    body[data-platform="ios"] .chat-page .chat-filters::-webkit-scrollbar {
      display: none;
    }

    body[data-platform="ios"] .chat-page .chat-filter-btn {
      flex: 0 0 auto;
      min-width: max-content;
      padding: 0 10px;
      font-size: clamp(0.74rem, 2.35vw, 0.84rem);
      letter-spacing: 0;
      text-overflow: clip;
    }

/* Premium Design System Foundation (Prompt 1-3 pass) */
:root {
  --type-xxs: 12px;
  --type-xs: 15px;
  --type-sm: 18px;
  --type-md: 24px;
  --type-lg: 30px;
  --type-xl: 37px;
  --type-xxl: 46px;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-semibold: 600;
  --weight-bold: 700;

  --lh-heading: 1.2;
  --lh-body: 1.5;
  --lh-ui: 1.4;

  --ls-display: -0.02em;
  --ls-body: 0;
  --ls-smallcaps: 0.05em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-2: 2px;
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;

  --icon-16: 16px;
  --icon-20: 20px;
  --icon-24: 24px;
  --icon-32: 32px;

  --primary-50: #f8f2e1;
  --primary-100: #f2e6c6;
  --primary-200: #e7d196;
  --primary-300: #dcb95f;
  --primary-400: #c9a24a;
  --primary-500: #ad8534;
  --primary-600: #936d29;
  --primary-700: #765620;
  --primary-800: #5a4119;
  --primary-900: #3f2d11;

  --secondary-50: #e9f5fb;
  --secondary-100: #d2eaf7;
  --secondary-200: #a5d6ef;
  --secondary-300: #74bfe5;
  --secondary-400: #42a6d7;
  --secondary-500: #2f89b3;
  --secondary-600: #256f91;
  --secondary-700: #1d5671;
  --secondary-800: #173f52;
  --secondary-900: #0f2935;

  --success-500: #1c9c63;
  --warning-500: #b47614;
  --danger-500: #c73d4d;

  --surface-0: #0c1017;
  --surface-1: #111722;
  --surface-2: #181f2c;
  --text-strong: #f4f7fc;
  --text-muted-strong: #b8c0ce;
  --border-soft: rgba(209, 219, 235, 0.18);
  --border-strong: rgba(209, 219, 235, 0.32);
  --focus-ring: #6ac1ff;
  --on-primary: #1e1509;

  --elevation-0: 0 1px 2px rgba(6, 10, 18, 0.18);
  --elevation-1: 0 6px 18px rgba(4, 8, 14, 0.24), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --elevation-2: 0 14px 30px rgba(3, 7, 12, 0.32), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --elevation-3: 0 24px 44px rgba(3, 7, 12, 0.42), 0 2px 0 rgba(255, 255, 255, 0.08) inset;

  --bg: var(--surface-0);
  --bg-card: var(--surface-1);
  --bg-elev: rgba(22, 29, 42, 0.82);
  --text: var(--text-strong);
  --text-muted: var(--text-muted-strong);
  --line: var(--border-soft);
  --line-strong: var(--border-strong);
  --accent: var(--primary-500);
  --accent-2: var(--primary-400);
  --warn: var(--warning-500);
  --danger: var(--danger-500);
  --shadow-soft: var(--elevation-1);
  --shadow: var(--elevation-3);
}

:root[data-theme="light"] {
  --surface-0: #f6f7fb;
  --surface-1: #ffffff;
  --surface-2: #eef1f7;
  --text-strong: #1f2430;
  --text-muted-strong: #4b5568;
  --border-soft: rgba(31, 44, 72, 0.14);
  --border-strong: rgba(31, 44, 72, 0.24);
  --focus-ring: #0f7fd1;
  --on-primary: #1e1509;

  --bg: var(--surface-0);
  --bg-card: var(--surface-1);
  --bg-elev: rgba(255, 255, 255, 0.92);
  --text: var(--text-strong);
  --text-muted: var(--text-muted-strong);
  --line: var(--border-soft);
  --line-strong: var(--border-strong);
  --shadow-soft: 0 8px 24px rgba(21, 34, 58, 0.12);
  --shadow: 0 26px 42px rgba(21, 34, 58, 0.18);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --surface-0: #f6f7fb;
    --surface-1: #ffffff;
    --surface-2: #eef1f7;
    --text-strong: #1f2430;
    --text-muted-strong: #4b5568;
    --border-soft: rgba(31, 44, 72, 0.14);
    --border-strong: rgba(31, 44, 72, 0.24);
    --focus-ring: #0f7fd1;
    --on-primary: #1e1509;

    --bg: var(--surface-0);
    --bg-card: var(--surface-1);
    --bg-elev: rgba(255, 255, 255, 0.92);
    --text: var(--text-strong);
    --text-muted: var(--text-muted-strong);
    --line: var(--border-soft);
    --line-strong: var(--border-strong);
    --shadow-soft: 0 8px 24px rgba(21, 34, 58, 0.12);
    --shadow: 0 26px 42px rgba(21, 34, 58, 0.18);
  }
}

body {
  font-size: var(--type-sm);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero h2,
.auth-intro h2,
.match-page-header h3,
.chat-page .chat-head h3 {
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
}

.hero-kicker,
.auth-eyebrow,
.match-filter-label,
.profile-form label,
.hub-band-ad label,
.profile-summary .summary-title,
.profile-summary .summary-kpi span {
  letter-spacing: var(--ls-smallcaps);
}

.app-shell {
  max-width: var(--layout-max-width);
}

.app-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-1);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--type-xxs);
  line-height: var(--lh-ui);
}

.crumb {
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
}

.crumb.active {
  color: var(--text);
}

.crumb-sep {
  color: var(--text-muted);
  opacity: 0.65;
}

.sync-indicator {
  border: 1px solid var(--line);
  border-radius: var(--radius-12);
  min-height: 32px;
  padding: 0 var(--space-3);
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: var(--type-xxs);
  font-weight: var(--weight-semibold);
}

.sync-indicator[data-state="offline"] {
  color: #ffd2d9;
  border-color: rgba(199, 61, 77, 0.54);
  background: rgba(199, 61, 77, 0.14);
}

.hero::before {
  transform: translateY(var(--hero-parallax, 0px));
  transition: transform 120ms linear;
}

.section-card,
.mini-panel,
.match-card,
.hub-item,
.profile-bento-card,
.jam-detail-summary,
.jam-detail-participants,
.jam-register-form,
.match-detail-panel,
.policy-item,
.profile-section {
  border-radius: var(--radius-16);
  box-shadow: var(--elevation-1);
}

.topbar,
.webapp-nav,
.liquid-nav,
.profile-modal-card,
.profile-hub-card,
.jam-modal-card,
.match-detail-card,
.chat-modal-card,
.chat-page .chat-module {
  backdrop-filter: saturate(165%) blur(18px);
}

.section-card,
.profile-bento-card,
.match-card,
.hub-item {
  position: relative;
}

.section-card::after,
.profile-bento-card::after,
.match-card::after,
.hub-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 6px
  );
  mix-blend-mode: soft-light;
  opacity: 0.22;
}

button,
a,
input,
select,
textarea,
.chip,
.webapp-tab,
.webapp-action,
.nav-btn,
.match-card,
.chat-thread-item,
.match-pill {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button:active,
.action-btn:active,
.btn:active,
.webapp-action:active,
.chat-mini-btn:active {
  transform: translateY(1px) scale(0.99);
}

*:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus-ring) 26%, transparent);
}

.btn,
.action-btn,
.webapp-action,
.auth-submit,
.auth-switch,
.auth-back,
.chat-form button,
.chat-mini-btn,
.jam-modal-close,
.match-detail-close,
.profile-upload-label,
.profile-avatar-remove,
.profile-hub-tab,
.dev-admin-btn {
  min-height: 40px;
  border-radius: var(--radius-12);
  padding: 0 var(--space-4);
  font-size: var(--type-xs);
  font-weight: var(--weight-semibold);
  line-height: var(--lh-ui);
}

.action-btn,
.match-pill,
.chat-filter-btn,
.stat-pill,
.profile-btn,
.jam-register-btn {
  min-height: 32px;
  border-radius: var(--radius-8);
  font-size: var(--type-xxs);
}

.action-btn.lg,
.auth-submit,
.jam-create-form .jam-register-actions .action-btn {
  min-height: 48px;
  border-radius: var(--radius-12);
}

.action-btn.danger,
#deleteAccountBtn,
#hubDeleteBtn,
#confirmApproveBtn {
  color: #ffe9ec;
  border-color: rgba(199, 61, 77, 0.52);
  background: linear-gradient(140deg, rgba(199, 61, 77, 0.82), rgba(143, 30, 44, 0.82));
}

.btn-primary,
.webapp-action.primary,
.auth-submit,
.nav-btn.cta,
.chat-create-actions .solid,
.jam-create-form .jam-register-actions .action-btn[type="submit"],
#saveProfileBtn,
#hubBandAdSaveBtn {
  color: var(--on-primary);
  background: linear-gradient(132deg, var(--primary-400), var(--primary-600));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(173, 133, 52, 0.28);
}

.auth-form input,
.auth-form select,
.profile-form input,
.profile-form select,
.profile-form textarea,
.hub-band-ad input,
.hub-band-ad select,
.hub-band-ad textarea,
.match-search,
.match-genre-select,
.chat-search,
.chat-form input,
.chat-create-form input,
.jam-create-form input,
.jam-create-form select,
.jam-create-form textarea,
.jam-register-form input,
.jam-register-form select,
.jam-register-form textarea,
.hub-setting-row select {
  min-height: 40px;
  border-radius: var(--radius-8);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-card) 72%, transparent);
  color: var(--text);
  font-size: var(--type-xs);
  line-height: var(--lh-ui);
}

textarea,
.profile-form textarea,
.jam-create-form textarea,
.jam-register-form textarea,
.hub-band-ad textarea {
  min-height: 96px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.match-search-helper {
  margin-top: 0;
  font-size: var(--type-xxs);
  color: var(--text-muted);
}

.match-list.is-loading .match-card {
  position: relative;
  overflow: hidden;
}

.match-list.is-loading .match-card > * {
  opacity: 0.52;
}

.match-list.is-loading .match-card::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  animation: skeleton-shimmer 1.1s ease infinite;
}

@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

.app-page {
  opacity: 0;
  transform: translateY(10px);
}

.app-page.is-active {
  opacity: 1;
  transform: translateY(0);
}

.app-page.page-enter {
  opacity: 0;
}

.signup-progress {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.signup-progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-4);
  background: color-mix(in srgb, var(--text-muted) 24%, transparent);
  overflow: hidden;
}

.signup-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary-400), var(--secondary-600));
  transition: width 0.2s ease;
}

.signup-progress-text {
  font-size: var(--type-xxs);
  color: var(--text-muted);
}

.style-guide-card .style-guide-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.style-guide-card .mini-panel {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.type-sample-xxs { font-size: var(--type-xxs); }
.type-sample-xs { font-size: var(--type-xs); }
.type-sample-sm { font-size: var(--type-sm); }
.type-sample-md { font-size: var(--type-md); }
.type-sample-lg { font-size: var(--type-lg); }
.type-sample-xl { font-size: var(--type-xl); }
.type-sample-xxl { font-size: var(--type-xxl); }

.palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.palette-chip {
  border: 1px solid transparent;
  border-radius: var(--radius-8);
  padding: 5px 8px;
  font-size: var(--type-xxs);
  font-weight: var(--weight-semibold);
}

.palette-chip.primary { background: var(--primary-300); color: #281c0a; }
.palette-chip.secondary { background: var(--secondary-300); color: #072736; }
.palette-chip.success { background: color-mix(in srgb, var(--success-500) 82%, white); color: #032a1a; }
.palette-chip.warning { background: color-mix(in srgb, var(--warning-500) 84%, white); color: #301f06; }
.palette-chip.danger { background: color-mix(in srgb, var(--danger-500) 84%, white); color: #3b0810; }

.style-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.sync-banner {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 12px);
  transform: translateX(-50%);
  z-index: 320;
  max-width: min(680px, calc(100vw - 20px));
  min-height: 44px;
  border-radius: var(--radius-12);
  border: 1px solid rgba(199, 61, 77, 0.6);
  background: rgba(57, 14, 18, 0.92);
  color: #ffe8ea;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  box-shadow: var(--elevation-2);
}

.sync-banner[hidden] {
  display: none;
}

.sync-banner .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6f80;
  box-shadow: 0 0 0 4px rgba(255, 111, 128, 0.2);
}

.toast-stack {
  position: fixed;
  right: 16px;
  top: calc(var(--safe-top) + 14px);
  z-index: 330;
  display: grid;
  gap: var(--space-2);
  width: min(360px, calc(100vw - 24px));
}

.toast {
  position: relative;
  border-radius: var(--radius-12);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--bg-card) 88%, #08101e);
  color: var(--text);
  box-shadow: var(--elevation-2);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(-6px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast .toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary-400);
}

.toast.success .toast-icon { background: var(--success-500); }
.toast.error .toast-icon { background: var(--danger-500); }

.toast.success::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  border-radius: inherit;
  border: 1px dashed rgba(110, 214, 162, 0.45);
  animation: toast-celebrate 0.8s ease;
}

@keyframes toast-celebrate {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 0; transform: scale(1.08); }
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 325;
  display: grid;
  place-content: center;
  background: rgba(7, 10, 16, 0.58);
  backdrop-filter: blur(10px);
  padding: 16px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-card {
  width: min(480px, calc(100vw - 24px));
  border-radius: var(--radius-16);
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), var(--bg-card);
  box-shadow: var(--elevation-3);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
}

.confirm-card h3 {
  font-size: var(--type-md);
}

.confirm-card p {
  color: var(--text-muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  border-radius: var(--radius-8);
  background: rgba(6, 10, 16, 0.95);
  color: #f0f4fb;
  border: 1px solid rgba(192, 208, 233, 0.34);
  padding: 6px 8px;
  font-size: var(--type-xxs);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.3s, transform 0.2s ease 0.3s;
  z-index: 220;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ghost-btn svg,
.nav-btn svg,
.webapp-tab svg,
.webapp-action svg,
.match-pill svg {
  width: var(--icon-20);
  height: var(--icon-20);
}

.match-avatar,
.chat-thread-avatar,
.chat-conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-12);
}

.match-empty,
.jam-empty,
.chat-empty,
.profile-gallery-empty,
.hub-dev-log-empty {
  border-style: dashed;
  border-radius: var(--radius-12);
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  color: var(--text-muted);
  line-height: var(--lh-body);
}

@media (max-width: 960px) {
  .style-guide-card .style-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-utility-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .sync-indicator,
  .btn,
  .action-btn,
  .webapp-action,
  .auth-submit,
  .auth-switch,
  .auth-back,
  .chat-form button,
  .chat-mini-btn,
  .jam-modal-close,
  .match-detail-close,
  .profile-upload-label,
  .profile-avatar-remove,
  .profile-hub-tab,
  .dev-admin-btn,
  .webapp-tab,
  .ghost-btn,
  .profile-icon-btn {
    min-height: 44px;
  }

  .sync-banner {
    top: auto;
    bottom: calc(var(--safe-bottom) + 108px);
  }

  .toast-stack {
    right: 10px;
    left: 10px;
    width: auto;
    top: calc(var(--safe-top) + 10px);
  }
}

@media (min-width: 1280px) {
  :root {
    --layout-max-width: 1360px;
    --surface-gap: 24px;
    --content-pad: 24px;
  }

  .marketing-landing,
  .auth-landing {
    width: min(1240px, calc(100% - 64px));
  }

  .landing-shell {
    padding: clamp(44px, 4vw, 64px);
    gap: 22px;
  }

  .landing-shell h2 {
    max-width: 13ch;
    font-size: clamp(2.4rem, 4.2vw, 4rem);
  }

  .landing-copy {
    max-width: 62ch;
    font-size: 1.02rem;
  }

  .auth-landing[data-auth-view="login"] .auth-grid,
  .auth-landing[data-auth-view="signup"] .auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(500px, 560px);
  }

  .auth-landing[data-auth-view="login"] .auth-intro,
  .auth-landing[data-auth-view="signup"] .auth-intro {
    display: block;
    padding: 34px 30px;
  }

  .auth-landing[data-auth-view="login"] .auth-panel,
  .auth-landing[data-auth-view="signup"] .auth-panel {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: min(82vh, 860px);
    padding: 30px;
  }
}

@media (min-width: 1600px) {
  :root {
    --layout-max-width: 1440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
