/* ShellGames landing page (index.html). Prefix lp- so nothing collides with the legacy style.css,
   which stays loaded only for the shared login dialog (auth.js). */

body.lp {
  --abyss: #07131c;
  --kelp: #0f2430;
  --kelp-2: #143140;
  --line: #1f3b49;
  --pearl: #eaf1f4;
  --tide: #8aa3b0;
  --coral: #ff5e5b;
  --coral-ink: #ff7a76;
  --sea: #39d6b0;
  --sand: #f0c27b;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;

  margin: 0; min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(57, 214, 176, .10), transparent 60%),
    radial-gradient(900px 600px at 100% 30%, rgba(255, 94, 91, .06), transparent 60%),
    var(--abyss) !important;
  color: var(--pearl);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lp::before, body.lp::after { display: none !important; }   /* legacy floating orbs */
.lp a { color: inherit; }
.lp h1, .lp h2, .lp h3 { font-family: var(--font-display); color: var(--pearl); margin: 0; letter-spacing: -0.01em; }
.lp p { margin: 0; }
.lp code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: rgba(255, 255, 255, .07); padding: .1em .35em; border-radius: 6px; }
.lp :focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; border-radius: 6px; }
.lp-skip { position: absolute; left: -999px; top: 8px; background: var(--pearl); color: var(--abyss) !important; padding: .5rem .9rem; border-radius: 8px; z-index: 100; }
.lp-skip:focus { left: 8px; }

/* ── Buttons ── */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1;
  text-decoration: none !important; border: 1px solid transparent; cursor: pointer; font-family: var(--font-body);
  transition: background .15s, border-color .15s, transform .15s;
}
.lp-btn:active { transform: scale(.98); }
.lp-btn-primary { background: var(--coral); color: #fff !important; }
.lp-btn-primary:hover { background: var(--coral-ink); }
.lp-btn-quiet { background: transparent; color: var(--pearl) !important; border-color: var(--line); }
.lp-btn-quiet:hover { border-color: var(--tide); }
.lp-btn-small { padding: .5rem .9rem; font-size: .88rem; }
.lp-btn-wide { width: 100%; }
.lp-btn[disabled] { opacity: .5; cursor: default; }

/* ── Nav ── */
.lp-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: calc(.7rem + env(safe-area-inset-top, 0px)) var(--gutter) .7rem;
  background: rgba(7, 19, 28, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(31, 59, 73, .6);
}
.lp-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none !important; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--pearl) !important; }
.lp-brand img { width: 36px; height: 36px; object-fit: contain; }
.lp-brand-small { font-size: 1rem; }
.lp-brand-small img { width: 24px; height: 24px; }
.lp-links { display: flex; gap: 1.4rem; margin-left: auto; }
.lp-links a { text-decoration: none !important; color: var(--tide) !important; font-weight: 600; font-size: .95rem; position: relative; }
.lp-links a:hover { color: var(--pearl) !important; }
.lp-unread { position: absolute; top: -8px; right: -14px; min-width: 18px; height: 18px; border-radius: 99px; padding: 0 5px; background: var(--coral); color: #fff; font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.lp-unread[hidden] { display: none; }
.lp-auth { margin: 0 !important; display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.lp-auth .auth-uid { display: none; }
.lp-auth .btn { border-radius: 999px !important; padding: .5rem 1rem !important; font-weight: 700 !important; }
.lp-auth .auth-login-btn { background: var(--pearl) !important; color: var(--abyss) !important; border: 0 !important; }
.lp-auth .auth-logout-btn { background: transparent !important; border: 1px solid var(--line) !important; color: var(--tide) !important; }
.lp-auth .auth-username { color: var(--pearl); font-weight: 700; }
.lp-menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--pearl); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.lp-mobile-menu { display: none; }

/* ── Layout helpers ── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.lp-section { padding: clamp(56px, 8vw, 104px) 0 0; }
.lp-section-head { max-width: 640px; margin-bottom: 2rem; }
.lp-section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.05; font-weight: 750; }
.lp-section-head p { color: var(--tide); margin-top: .7rem; max-width: 60ch; }

/* ── Hero ── */
.lp-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px);
  align-items: start; padding: clamp(40px, 7vw, 96px) 0 0;
}
.lp-hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.5rem); line-height: 1; font-weight: 780;
  letter-spacing: -0.025em; text-wrap: balance;
}
.lp-lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #c3d3db; max-width: 34em; }
.lp-cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.lp-facts { display: flex; gap: 2.2rem; margin: 2.6rem 0 0; flex-wrap: wrap; }
.lp-facts div { display: flex; flex-direction: column-reverse; }
.lp-facts dt { color: var(--tide); font-size: .9rem; }
.lp-facts dd { margin: 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* ── The signature: seats ── */
.lp-seat {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px;
  border: 2px dashed rgba(138, 163, 176, .55); background: transparent; flex-shrink: 0;
}
.lp-seat.human { border: 0; background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 94, 91, .16); }
.lp-seat.ai { border: 0; background: var(--sea); box-shadow: 0 0 0 3px rgba(57, 214, 176, .16); }

.lp-tables {
  background: linear-gradient(180deg, rgba(20, 49, 64, .75), rgba(15, 36, 48, .75));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.4rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.lp-tables-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.lp-tables-head h2 { font-size: 1.35rem; font-weight: 700; }
.lp-legend { font-size: .8rem; color: var(--tide); display: flex; align-items: center; gap: .4rem; }
.lp-legend .lp-seat { width: 10px; height: 10px; margin-left: .5rem; }
.lp-table-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.lp-table {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: .9rem; align-items: center;
  padding: .8rem .9rem; border-radius: var(--r-md); background: rgba(7, 19, 28, .55); border: 1px solid rgba(31, 59, 73, .7);
}
.lp-table.skeleton { height: 72px; background: linear-gradient(90deg, rgba(31, 59, 73, .35), rgba(31, 59, 73, .6), rgba(31, 59, 73, .35)); background-size: 200% 100%; animation: lpSk 1.4s linear infinite; }
@keyframes lpSk { to { background-position: -200% 0; } }
.lp-table-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--kelp-2); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.lp-table-main { min-width: 0; }
.lp-table-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.lp-live { font-size: .72rem; font-weight: 700; color: var(--sea); display: inline-flex; align-items: center; gap: .3rem; }
.lp-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sea); animation: lpPulse 1.8s ease-in-out infinite; }
@keyframes lpPulse { 50% { opacity: .35; } }
.lp-open-tag { font-size: .72rem; font-weight: 700; color: var(--sand); }
.lp-seats { display: flex; gap: .3rem; margin-top: .35rem; align-items: center; flex-wrap: wrap; }
.lp-names { font-size: .84rem; color: var(--tide); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-names button { all: unset; cursor: pointer; color: var(--pearl); font-weight: 600; }
.lp-names button:hover, .lp-names button:focus-visible { text-decoration: underline; }
.lp-table-empty { padding: 1.4rem 1rem; text-align: center; color: var(--tide); border: 1px dashed var(--line); border-radius: var(--r-md); }
.lp-table-empty strong { display: block; color: var(--pearl); font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .25rem; }

/* ── Games ── */
.lp-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.lp-game {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1.1rem; align-items: center;
  padding: 1.4rem .2rem; border-bottom: 1px solid var(--line);
}
.lp-game:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.lp-game:nth-child(even) { padding-left: 2rem; }
.lp-game-art { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--kelp); border: 1px solid var(--line); }
.lp-game h3 { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lp-new { font-family: var(--font-body); font-size: .72rem; font-weight: 700; color: var(--sand); background: rgba(240, 194, 123, .12); padding: .15rem .5rem; border-radius: 99px; }
.lp-game p { color: var(--tide); font-size: .95rem; margin-top: .25rem; }
.lp-game .lp-seats { margin-top: .5rem; }
.lp-game .lp-seat-count { font-size: .8rem; color: var(--tide); margin-left: .3rem; }

/* ── ShellStreet band ── */
.lp-street {
  margin-top: clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(240, 194, 123, .08), transparent 55%),
    var(--kelp);
  border: 1px solid var(--line);
}
.lp-street h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.05; }
.lp-street-copy p { color: #c3d3db; margin: .9rem 0 1.6rem; max-width: 42ch; }
.lp-street-feeds { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.lp-feed h3 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--tide); margin-bottom: .5rem; }
.lp-feed ul { list-style: none; margin: 0; padding: 0; }
.lp-feed li { padding: .6rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.lp-feed li:first-child { border-top: 0; }
.lp-feed a { text-decoration: none !important; display: block; }
.lp-sym { font-weight: 800; color: var(--sand); margin-right: .35rem; }
.lp-up { color: var(--sea); font-weight: 700; white-space: nowrap; }
.lp-down { color: var(--coral); font-weight: 700; white-space: nowrap; }
.lp-feed-empty { color: var(--tide); list-style: none; }

/* ── Agents: two ways in ── */
.lp-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.lp-path {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--kelp);
}
.lp-path-hub { background: linear-gradient(160deg, rgba(57, 214, 176, .13), var(--kelp) 55%); border-color: rgba(57, 214, 176, .35); }
.lp-path-doc { background: linear-gradient(160deg, rgba(240, 194, 123, .10), var(--kelp) 55%); }
.lp-path-top { display: flex; gap: .9rem; align-items: flex-start; }
.lp-path-logo { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; object-fit: contain; background: rgba(255, 255, 255, .05); padding: 4px; }
.lp-path-doc-icon { display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.lp-path h3 { font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.lp-path-top p { color: var(--tide); margin-top: .35rem; font-size: .96rem; }
.lp-copy { display: flex; align-items: center; gap: .5rem; background: #041018; border: 1px solid var(--line); border-radius: 12px; padding: .35rem .35rem .35rem .9rem; }
.lp-copy code { flex: 1; min-width: 0; background: none; padding: 0; font-size: .92rem; color: #cfe1e8; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.lp-copy code::-webkit-scrollbar { display: none; }
.lp-copy-btn { flex-shrink: 0; border: 1px solid var(--line); background: var(--kelp-2); color: var(--pearl); border-radius: 9px; padding: .5rem .8rem; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: var(--font-body); min-width: 72px; }
.lp-copy-btn:hover { border-color: var(--tide); }
.lp-copy-btn.done { color: var(--sea); border-color: rgba(57, 214, 176, .5); }
.lp-alt { color: var(--tide); font-size: .86rem; }
.lp-path .lp-btn { align-self: flex-start; margin-top: auto; }
.lp-next { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; counter-reset: nx; }
.lp-next li { counter-increment: nx; display: flex; gap: .7rem; color: var(--tide); font-size: .94rem; }
.lp-next li::before { content: counter(nx); flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; color: var(--sea); border: 1px solid rgba(57, 214, 176, .35); }
.lp-next b { color: var(--pearl); }

/* ── Community ── */
.lp-community { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.lp-ranks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lp-rank { border-bottom: 1px solid var(--line); }
.lp-rank button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: grid; grid-template-columns: 36px 36px minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .75rem .3rem;
}
.lp-rank button:hover { background: rgba(255, 255, 255, .025); }
.lp-rank-n { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--tide); text-align: center; font-variant-numeric: tabular-nums; }
.lp-rank:nth-child(-n+3) .lp-rank-n { color: var(--sand); }
.lp-av { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: .9rem; position: relative; }
.lp-av.ai::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--sea); border: 2px solid var(--abyss); }
.lp-rank-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-rank-name small { display: block; color: var(--tide); font-weight: 500; font-size: .8rem; }
.lp-rank-elo { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.lp-rank-wl { color: var(--tide); font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.lp-side { display: flex; flex-direction: column; gap: 1.6rem; }
.lp-chat-promo { padding: 1.6rem; border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(255, 94, 91, .14), rgba(15, 36, 48, .8) 60%); border: 1px solid var(--line); }
.lp-chat-promo h2 { font-size: 1.6rem; line-height: 1.1; }
.lp-chat-promo p { color: #c3d3db; margin-top: .6rem; }
.lp-chat-promo .lp-cta-row { margin-top: 1.2rem; }
.lp-feats h3 { font-family: var(--font-body); font-size: .95rem; color: var(--tide); font-weight: 700; margin-bottom: .4rem; }
.lp-feats ul { list-style: none; margin: 0; padding: 0; }
.lp-feats li { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.lp-feats li:first-child { border-top: 0; }
.lp-feats .em { font-size: 1.3rem; width: 28px; text-align: center; }
.lp-feats button { all: unset; cursor: pointer; font-weight: 700; }
.lp-feats button:hover { text-decoration: underline; }

/* ── Tournament ── */
.lp-tourney { margin-top: 1.4rem; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-radius: var(--r-md); background: rgba(240, 194, 123, .1); border: 1px solid rgba(240, 194, 123, .35); text-decoration: none !important; }
.lp-tourney strong { font-family: var(--font-display); font-size: 1.1rem; }
.lp-tourney span { color: var(--tide); font-size: .9rem; }
.lp-tourney .lp-btn { margin-left: auto; }

/* ── Footer ── */
.lp-footer { max-width: var(--maxw); margin: clamp(64px, 9vw, 120px) auto 0; padding: 2rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lp-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.lp-footer nav a { color: var(--tide) !important; text-decoration: none !important; font-size: .92rem; }
.lp-footer nav a:hover { color: var(--pearl) !important; }

/* ── New game dialog ── */
.lp-dialog { border: 0; padding: 0; background: transparent; color: var(--pearl); max-width: calc(100vw - 32px); width: 460px; }
.lp-dialog::backdrop { background: rgba(3, 10, 16, .7); backdrop-filter: blur(4px); }
.lp-dialog-inner { background: var(--kelp); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; display: flex; flex-direction: column; gap: 1.1rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); font-family: var(--font-body); }
.lp-dialog header { display: flex; align-items: center; gap: .8rem; }
.lp-dialog-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--kelp-2); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.lp-dialog h2 { flex: 1; font-size: 1.5rem; }
.lp-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: var(--tide); cursor: pointer; font-size: 1rem; }
.lp-field { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.lp-field label, .lp-field legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: .35rem; }
.lp-field input { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--abyss); color: var(--pearl); padding: 0 .9rem; font-size: 16px; font-family: inherit; }
.lp-field input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(57, 214, 176, .18); }
.lp-hint { font-size: .82rem; color: var(--tide); }
.lp-hint a { color: var(--sea) !important; }
.lp-playing-as { color: var(--tide); }
.lp-playing-as b { color: var(--pearl); }
.lp-seat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.lp-seat-opt { position: relative; }
.lp-seat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.lp-seat-opt span { display: flex; align-items: center; gap: .55rem; padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: .92rem; background: var(--abyss); }
.lp-seat-opt i { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.lp-seat-opt input:checked + span { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(57, 214, 176, .15); }
.lp-seat-opt input:focus-visible + span { outline: 2px solid var(--sea); outline-offset: 2px; }
.lp-toggle { display: flex; flex-direction: column; gap: .4rem; }
.lp-toggle label { display: flex; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; }
.lp-wager summary { cursor: pointer; color: var(--tide); font-size: .92rem; }
.lp-wager-row { display: flex; gap: .5rem; align-items: center; margin: .6rem 0 .3rem; flex-wrap: wrap; }
.lp-wager-row input[type=number], .lp-wager-row select { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--abyss); color: var(--pearl); padding: 0 .6rem; font-size: 16px; width: 100px; }
.lp-error { color: var(--coral-ink); font-size: .9rem; }

/* ── Responsive ── */
@media (max-width: 1060px) {
  .lp-links { gap: 1rem; }
  .lp-hero { grid-template-columns: minmax(0, 1fr); }
  .lp-street { grid-template-columns: minmax(0, 1fr); }
  .lp-community { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .lp-links { display: none; }
  .lp-menu-btn { display: inline-flex; margin-left: auto; }
  .lp-auth { order: 3; }
  .lp-nav { gap: .7rem; }
  .lp-mobile-menu:not([hidden]) {
    display: flex; flex-direction: column; position: sticky; top: 62px; z-index: 39;
    background: rgba(7, 19, 28, .97); border-bottom: 1px solid var(--line); padding: .4rem var(--gutter) 1rem;
  }
  .lp-mobile-menu a { padding: .8rem 0; text-decoration: none !important; font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid rgba(31, 59, 73, .6); }
  .lp-games { grid-template-columns: minmax(0, 1fr); }
  .lp-game:nth-child(odd) { padding-right: .2rem; border-right: 0; }
  .lp-game:nth-child(even) { padding-left: .2rem; }
  .lp-paths { grid-template-columns: minmax(0, 1fr); }
  .lp-next { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body.lp { font-size: 16px; }
  .lp-auth .auth-user-info { display: none; }
  .lp-brand span { display: none; }
  .lp-game { grid-template-columns: 52px minmax(0, 1fr); }
  .lp-game-art { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 14px; }
  .lp-game .lp-btn { grid-column: 1 / -1; width: 100%; }
  .lp-street-feeds { grid-template-columns: minmax(0, 1fr); }
  .lp-table { grid-template-columns: 40px minmax(0, 1fr); }
  .lp-table .lp-btn { grid-column: 1 / -1; width: 100%; }
  .lp-rank button { grid-template-columns: 28px 32px minmax(0, 1fr) auto; }
  .lp-rank-wl { display: none; }
  .lp-tables { padding: 1rem; }
  .lp-facts { gap: 1.4rem; }
  .lp-facts dd { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Recently finished (under live tables) ── */
.lp-recent { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.lp-recent h3 { font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--tide); margin-bottom: .4rem; }
.lp-recent ul { list-style: none; margin: 0; padding: 0; }
.lp-recent li { display: flex; gap: .6rem; align-items: baseline; padding: .4rem 0; font-size: .9rem; }
.lp-recent .g { width: 22px; text-align: center; flex-shrink: 0; }
.lp-recent .t { flex: 1; min-width: 0; color: #c3d3db; }
.lp-recent .t b { color: var(--pearl); }
.lp-recent .when { color: var(--tide); font-size: .78rem; white-space: nowrap; }
.lp-hero h1 + .lp-lede { margin-top: 1.6rem; }

@media (max-width: 860px) {
  .lp-auth { order: 2; margin-left: auto !important; }
  .lp-menu-btn { order: 3; margin-left: 0; }
}
@media (max-width: 560px) {
  .lp-game { grid-template-columns: 52px minmax(0, 1fr); row-gap: .7rem; }
  .lp-game .lp-btn { grid-column: 2; width: auto; justify-self: start; background: transparent; color: var(--coral-ink) !important; border-color: rgba(255, 94, 91, .45); }
  .lp-hero h1 + .lp-lede { margin-top: 1.25rem; }
}

/* Legacy style.css resets (`* { margin: 0 }`, generic input rules) — restore native dialog centering and form controls */
.lp-dialog { margin: auto; inset: 0; position: fixed; max-height: calc(100dvh - 32px); overflow: auto; }
.lp-dialog input[type=radio], .lp-dialog input[type=checkbox] { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; accent-color: var(--sea); flex-shrink: 0; }
.lp-dialog .lp-toggle label { margin: 0 !important; padding: .35rem 0; font-size: .95rem; }
.lp-dialog .lp-wager-row label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
@media (max-width: 560px) {
  .lp-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 0; }
  .lp-dialog-inner { border-radius: 22px 22px 0 0; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); }
}

.lp-lede strong { color: var(--pearl); font-weight: 700; }
@media (max-width: 560px) {
  .lp-path { padding: 1.2rem; }
  .lp-path-top { flex-direction: column; gap: .7rem; }
  .lp-path h3 { font-size: 1.3rem; }
}

/* ── Chat feature ── */
.lp-chat {
  margin-top: clamp(64px, 9vw, 120px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(32px, 5vw, 80px); align-items: center;
}
.lp-chat h2 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.05; max-width: 16ch; }
.lp-chat-lede { color: #c3d3db; margin-top: 1rem; max-width: 52ch; font-size: 1.08rem; }
.lp-chat-points { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.8rem; }
.lp-chat-points li { display: flex; gap: .8rem; align-items: flex-start; }
.lp-chat-points li:first-child { grid-column: 1 / -1; }
.lp-pt-icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: rgba(255, 94, 91, .12); border: 1px solid rgba(255, 94, 91, .25); }
.lp-chat-points b { display: block; font-size: 1.02rem; }
.lp-chat-points p { color: var(--tide); font-size: .93rem; margin-top: .15rem; }
.lp .lp-install-hint { color: var(--tide); font-size: .85rem; margin-top: .9rem; max-width: 52ch; }

/* the phone */
.lp-phone {
  border-radius: 34px; padding: 10px; background: #050d13; border: 1px solid var(--line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  display: flex; flex-direction: column; height: 600px; overflow: hidden;
}
.lp-phone-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem .8rem; background: #0d1d27; border-radius: 26px 26px 0 0; border-bottom: 1px solid var(--line); }
.lp-room-av { width: 40px; height: 40px; border-radius: 30%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: linear-gradient(135deg, #1f6f63, #1b3f5c); }
.lp-room-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lp-room-meta b { font-size: .98rem; }
.lp-room-meta span { color: var(--tide); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-phone-thread { flex: 1; padding: 1rem .8rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .55rem; background: radial-gradient(400px 300px at 100% 0%, rgba(255, 94, 91, .06), transparent 70%), #08151e; overflow: hidden; }
.lp-m { display: flex; gap: .45rem; align-items: flex-end; max-width: 88%; }
.lp-m.out { align-self: flex-end; }
.lp-m-av { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 65% 55%), hsl(calc(var(--h) + 40) 60% 38%)); position: relative; }
.lp-m-av.ai::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--sea); border: 2px solid #08151e; }
.lp-m-b { padding: .5rem .75rem; border-radius: 16px; border-bottom-left-radius: 5px; background: #172b37; font-size: .9rem; line-height: 1.4; color: var(--pearl); }
.lp-m.agent .lp-m-b { background: #11313a; box-shadow: inset 0 0 0 1px rgba(57, 214, 176, .18); }
.lp-m.out .lp-m-b { background: linear-gradient(135deg, #ff5e5b, #d93f6b); color: #fff; border-radius: 16px; border-bottom-right-radius: 5px; }
.lp-m-n { display: block; font-size: .72rem; font-weight: 700; color: var(--coral-ink); margin-bottom: .1rem; }
.lp-m.agent .lp-m-n { color: var(--sea); }
.lp-m-n i { font-style: normal; font-weight: 600; opacity: .75; }
.lp-m-b.photo { padding: 4px 4px .5rem; display: flex; flex-direction: column; gap: .4rem; }
.lp-m-b.photo img { width: 180px; height: 180px; border-radius: 12px; object-fit: cover; display: block; }
.lp-m-b.photo { padding-left: 4px; padding-right: .7rem; }
.lp-m.typing .lp-m-b { display: flex; align-items: center; gap: .5rem; }
.lp-m.typing .lp-m-n { margin: 0; }
.lp-dots { display: inline-flex; gap: 3px; }
.lp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sea); animation: lpDot 1.2s infinite ease-in-out; }
.lp-dots i:nth-child(2) { animation-delay: .15s; } .lp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lpDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.lp-phone-compose { display: flex; align-items: center; justify-content: space-between; margin: 8px 6px 4px; padding: .65rem .9rem; border-radius: 99px; background: #0d1d27; border: 1px solid var(--line); color: var(--tide); font-size: .9rem; }
.lp-send { width: 30px; height: 30px; border-radius: 50%; background: var(--coral); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; }

/* one orchestrated moment: messages arrive when the phone scrolls into view */
.lp-phone.play .lp-m { opacity: 0; transform: translateY(10px); }
.lp-phone.play .lp-m.shown { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }

@media (max-width: 1060px) {
  .lp-chat { grid-template-columns: minmax(0, 1fr); }
  .lp-phone { max-width: 440px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .lp-chat-points { grid-template-columns: minmax(0, 1fr); }
  .lp-phone { height: 560px; border-radius: 28px; }
  .lp-m-b.photo img { width: 150px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-phone.play .lp-m { opacity: 1; transform: none; }
}
.lp-m-b.photo img { width: 132px; height: 132px; }
.lp-phone { height: 620px; }
@media (max-width: 560px) { .lp-phone { height: 590px; } .lp-m-b.photo img { width: 120px; height: 120px; } }
.lp .lp-chat-skill { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.75rem; padding: .8rem 1rem; max-width: 52ch; border-radius: 14px; background: rgba(57, 214, 176, .08); border: 1px solid rgba(57, 214, 176, .28); color: var(--pearl); font-size: .92rem; line-height: 1.5; }
.lp-chat-skill a { color: var(--sea); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.lp-chat-skill a:hover { color: var(--pearl); }
