/* ============================================================
   irikos — LIVE (elevated). Playful, animated take on the Live
   landing + setup + lobby + join, on the same system tokens
   (dark, single teal accent, shape-coded motif, Helvetica).
   Energy from scale + spring + shape glyphs — never loud colour.
   Namespaced .lf-*  ·  reuses tokens from styles.css.
   Folded in from the Claude Design "Live - Landing & Setup" handoff.
   ============================================================ */

.lf { --shape-tri:#19b39f; --shape-dia:#5aa6e6; --shape-cir:#e6b24c; --shape-sqr:#a98fe0; }
.lf *, .lf *::before, .lf *::after { box-sizing: border-box; }
.lf button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- per-screen stage: fills the live overlay, faint teal aurora + drift ---- */
.lf-screen-stage {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(130% 90% at 50% -25%, color-mix(in oklab, var(--accent) 20%, var(--bg)) 0%, transparent 52%),
    radial-gradient(90% 70% at 85% 115%, color-mix(in oklab, var(--shape-dia) 10%, var(--bg)) 0%, transparent 50%),
    var(--bg);
  color: var(--ink); font-family: var(--sans);
}
.lf-scroll { width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 28px 72px; }

/* ---- drifting background shape glyphs (very faint) ---- */
.lf-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lf-bg-shape { position: absolute; opacity: 0.06; will-change: transform; animation: lf-drift linear infinite; }
.lf-bg-shape.s0 { color: var(--shape-tri); }
.lf-bg-shape.s1 { color: var(--shape-dia); }
.lf-bg-shape.s2 { color: var(--shape-cir); }
.lf-bg-shape.s3 { color: var(--shape-sqr); }
@keyframes lf-drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  100% { transform: translate3d(var(--dx,40px), var(--dy,-60px), 0) rotate(var(--dr,90deg)); }
}

/* ---- shared content column ---- */
.lf-wrap { position: relative; z-index: 1; width: 100%; }
.lf-wrap.is-landing { max-width: 1040px; }
.lf-wrap.is-setup   { max-width: 720px; }
.lf-wrap.is-lobby   { max-width: 940px; }
.lf-wrap.is-join    { max-width: 440px; }

.lf-screen { animation: lf-screen-in 520ms var(--ease) both; }
@keyframes lf-screen-in { from { transform: translateY(12px) scale(0.992); } to { transform: none; } }

/* ---- brand lockup ---- */
.lf-brand { display: inline-flex; align-items: baseline; gap: 10px; }
.lf-brand .mk { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.lf-brand .mk .a { color: var(--accent); }
.lf-brand .live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: 0.22em; color: var(--ink-3); }
.lf-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--no); position: relative; }
.lf-live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--no); animation: lf-ping 1.8s ease-out infinite; }
@keyframes lf-ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3); opacity: 0; } }

.lf-rise { animation: lf-rise 620ms var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms + 90ms); }
@keyframes lf-rise { from { transform: translateY(18px); } to { transform: none; } }

/* ===================== LANDING ===================== */
.lf-landing { text-align: center; }
.lf-landing-head { margin-bottom: 40px; }
.lf-title { font-size: clamp(54px, 8vw, 104px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.96; margin: 22px 0 16px; }
.lf-title .em { color: var(--accent); }
.lf-lead { font-size: clamp(17px, 2vw, 21px); color: var(--ink-3); max-width: 30ch; margin: 0 auto; line-height: 1.5; }
.lf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lf-card {
  position: relative; overflow: hidden; text-align: left;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--card) 100%);
  border: 1px solid var(--rule-2); border-radius: 24px; padding: 34px 34px 30px; min-height: 280px;
  display: flex; flex-direction: column; box-shadow: 0 10px 30px -22px rgba(0,0,0,0.8);
  transition: transform 260ms var(--spring), border-color 220ms ease, box-shadow 260ms ease;
}
.lf-card::before { content: ""; position: absolute; inset: 0; border-radius: 24px; opacity: 0; background: radial-gradient(120% 90% at 50% -10%, color-mix(in oklab, var(--accent) 22%, transparent) 0%, transparent 60%); transition: opacity 280ms ease; pointer-events: none; }
.lf-card:hover { transform: translateY(-8px); border-color: color-mix(in oklab, var(--accent) 45%, var(--rule)); box-shadow: 0 26px 60px -28px rgba(0,0,0,0.7), 0 0 0 1px color-mix(in oklab, var(--accent) 24%, transparent); }
.lf-card:hover::before { opacity: 1; }
.lf-card:active { transform: translateY(-4px) scale(0.995); }
.lf-card-glyph { display: flex; align-items: center; gap: 12px; margin-bottom: auto; }
.lf-glyph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 64px; }
.lf-glyph-grid svg { transition: transform 360ms var(--spring); }
.lf-card:hover .lf-glyph-grid svg:nth-child(1) { transform: translateY(-3px) rotate(-8deg); }
.lf-card:hover .lf-glyph-grid svg:nth-child(2) { transform: translateY(-3px) rotate(8deg); transition-delay: 40ms; }
.lf-card:hover .lf-glyph-grid svg:nth-child(3) { transform: translateY(3px) rotate(8deg); transition-delay: 80ms; }
.lf-card:hover .lf-glyph-grid svg:nth-child(4) { transform: translateY(3px) rotate(-8deg); transition-delay: 120ms; }
.lf-glyph-solo { width: 56px; height: 56px; border-radius: 50%; background: #fff; position: relative; }
.lf-glyph-solo::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid #fff; opacity: 0.25; animation: lf-ping 2.4s ease-out infinite; }
.lf-card-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 28px 0 10px; }
.lf-card-sub { font-size: 15.5px; color: var(--ink-3); line-height: 1.55; max-width: 32ch; margin-bottom: 22px; }
.lf-card-go { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--accent-ink); }
.lf-card-go .arr { transition: transform 240ms var(--spring); display: inline-flex; }
.lf-card:hover .lf-card-go .arr { transform: translateX(6px); }

/* ===================== SETUP ===================== */
.lf-setup-head { margin-bottom: 30px; }
.lf-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 7px 13px 7px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--rule); margin-bottom: 22px; transition: color 160ms ease, background 160ms ease, transform 140ms ease; }
.lf-back:hover { color: var(--ink); background: var(--bg-3); transform: translateX(-2px); }
.lf-setup-title { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin: 16px 0 0; }
.lf-group { margin-top: 30px; }
.lf-group-label { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.lf-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lf-pill { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-size: 17px; font-weight: 700; line-height: 1; color: var(--ink-2); background: var(--bg-2); border: 1.5px solid var(--rule); transition: transform 180ms var(--spring), background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 220ms ease; }
.lf-pill:hover { transform: translateY(-2px); border-color: var(--rule-2); color: var(--ink); }
.lf-pill:active { transform: translateY(0) scale(0.95); }
.lf-pill.is-on { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 26px -12px color-mix(in oklab, var(--accent) 80%, transparent); animation: lf-pop 360ms var(--spring); }
.lf-pill.is-on:hover { transform: translateY(-2px); background: var(--accent); }
.lf-pill:disabled { opacity: 0.38; cursor: not-allowed; }
.lf-pill:disabled:hover { transform: none; color: var(--ink-2); border-color: var(--rule); }
@keyframes lf-pop { 0% { transform: scale(1); } 42% { transform: scale(1.11); } 100% { transform: scale(1); } }
.lf-pill .lf-check { width: 0; height: 18px; overflow: hidden; display: inline-flex; align-items: center; margin-left: -10px; transition: width 220ms var(--spring), margin 220ms var(--spring); }
.lf-pill.is-on .lf-check { width: 18px; margin-left: 0; }
.lf-pill .lf-check svg { flex-shrink: 0; }
.lf-circle { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); background: var(--bg-2); border: 1.5px solid var(--rule); transition: transform 180ms var(--spring), background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 220ms ease; }
.lf-circle:hover { transform: translateY(-3px); color: var(--ink); border-color: var(--rule-2); }
.lf-circle:active { transform: scale(0.92); }
.lf-circle.is-on { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 12px 26px -12px color-mix(in oklab, var(--accent) 80%, transparent); animation: lf-pop 360ms var(--spring); }
.lf-avail { font-size: 14px; color: var(--ink-3); margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lf-avail b { color: var(--accent-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.lf-avail .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }
.lf-create-bar { margin-top: 44px; display: flex; justify-content: flex-end; }
.lf-create { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 18px; padding: 16px 16px 16px 34px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; box-shadow: 0 16px 36px -16px color-mix(in oklab, var(--accent) 85%, transparent); transition: transform 200ms var(--spring), box-shadow 240ms ease, filter 160ms ease; }
.lf-create:disabled { opacity: 0.5; filter: saturate(0.6); box-shadow: none; cursor: not-allowed; }
.lf-create:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 22px 48px -16px color-mix(in oklab, var(--accent) 85%, transparent); }
.lf-create:not(:disabled):active { transform: translateY(-1px) scale(0.99); }
.lf-create:not(:disabled)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent); transform: skewX(-18deg); animation: lf-sheen 3.4s ease-in-out infinite; pointer-events: none; }
@keyframes lf-sheen { 0% { left: -60%; } 55% { left: 130%; } 100% { left: 130%; } }
.lf-create-count { display: inline-block; font-variant-numeric: tabular-nums; }
.lf-create-count .num { display: inline-block; animation: lf-pop 340ms var(--spring); }
.lf-create-arr { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--accent-ink); display: grid; place-items: center; transition: transform 240ms var(--spring); }
.lf-create:not(:disabled):hover .lf-create-arr { transform: translateX(4px); }

/* task checklist (My-tasks source) — reuse existing live list styles but keep it inside the lf flow */
.lf-group .lv-tasklist { margin-top: 2px; }

/* ===================== LOBBY ===================== */
.lf-lobby { text-align: center; }
.lf-lobby-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.lf-lobby-join { font-size: 18px; color: var(--ink-3); }
.lf-lobby-join b { color: var(--ink); font-weight: 700; }
.lf-pin { display: inline-flex; align-items: stretch; margin: 22px 0 8px; background: var(--card); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-pop); }
.lf-pin-label { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 18px 24px; background: var(--bg-2); border-right: 1px solid var(--rule); }
.lf-pin-label .l1 { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.lf-pin-label .l2 { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.lf-pin-digits { display: flex; align-items: center; gap: 4px; padding: 14px 28px; font-size: 56px; font-weight: 800; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; line-height: 1; }
.lf-pin-digits .d { display: inline-block; animation: lf-digit 540ms var(--spring) both; }
.lf-pin-digits .gap { width: 16px; }
@keyframes lf-digit { from { transform: translateY(-16px) scale(0.55); } to { transform: none; } }
.lf-lobby-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-top: 30px; text-align: left; }
.lf-roster { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 24px; min-height: 240px; }
.lf-roster-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lf-roster-top .t { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.lf-count-pill { font-size: 15px; font-weight: 800; color: #fff; background: var(--accent); padding: 4px 13px; border-radius: 999px; font-variant-numeric: tabular-nums; transition: transform 200ms var(--spring); }
.lf-count-pill.bump { animation: lf-pop 360ms var(--spring); }
.lf-players { display: flex; flex-wrap: wrap; gap: 10px; }
.lf-chip { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 8px; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 999px; font-size: 15px; font-weight: 700; animation: lf-chip-in 440ms var(--spring) both; }
@keyframes lf-chip-in { from { transform: scale(0.4) translateY(10px); } to { transform: none; } }
.lf-chip-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.lf-roster-empty { color: var(--ink-4); font-size: 15px; padding: 24px 0; }
.lf-qr-card { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.lf-qr { width: 150px; height: 150px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow-card); }
.lf-qr svg { display: block; width: 100%; height: 100%; }
.lf-qr-hint { font-size: 13px; color: var(--ink-3); text-align: center; }
.lf-lobby-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.lf-lobby-meta { font-size: 15px; color: var(--ink-3); }

/* ===================== JOIN (phone-first) ===================== */
.lf-join { position: relative; text-align: center; }
.lf-join-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); background: var(--bg-2); border: 1px solid var(--rule); transition: transform 160ms var(--spring), color 160ms ease, background 160ms ease; }
.lf-join-close:hover { color: var(--ink); background: var(--bg-3); transform: rotate(90deg); }
.lf-join-head { margin: 18px 0 30px; }
.lf-join-brand { display: inline-flex; justify-content: center; margin-bottom: 16px; }
.lf-join-lead { font-size: 16px; color: var(--ink-3); line-height: 1.5; max-width: 30ch; margin: 0 auto; }
.lf-field { position: relative; margin-bottom: 14px; }
.lf-input { -webkit-appearance: none; appearance: none; width: 100%; text-align: center; color: var(--ink); background: var(--bg-2); border: 1.5px solid var(--rule-2); border-radius: 18px; padding: 24px 20px; font-weight: 800; line-height: 1; font-family: var(--sans); transition: border-color 160ms ease, box-shadow 200ms ease, transform 200ms var(--spring), background 160ms ease; }
.lf-input::placeholder { color: var(--ink-4); font-weight: 800; opacity: 1; }
.lf-input:focus { outline: none; border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-2px); }
.lf-input.pin { font-size: 40px; letter-spacing: 0.14em; }
.lf-input.pin::placeholder { letter-spacing: -0.01em; }
.lf-input.nick { font-size: 26px; }
.lf-field.is-filled .lf-input { border-color: color-mix(in oklab, var(--accent) 40%, var(--rule-2)); }
.lf-join-btn { -webkit-appearance: none; appearance: none; position: relative; overflow: hidden; width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 14px 14px 28px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; box-shadow: 0 16px 36px -16px color-mix(in oklab, var(--accent) 85%, transparent); transition: transform 200ms var(--spring), box-shadow 240ms ease, opacity 200ms ease, filter 160ms ease; }
.lf-join-btn:disabled { opacity: 0.5; filter: saturate(0.6); cursor: not-allowed; box-shadow: none; }
.lf-join-btn:not(:disabled):hover { transform: translateY(-3px); box-shadow: 0 22px 48px -16px color-mix(in oklab, var(--accent) 85%, transparent); }
.lf-join-btn:not(:disabled):active { transform: translateY(-1px) scale(0.99); }
.lf-join-btn.is-ready { animation: lf-pop 360ms var(--spring); }
.lf-join-btn:not(:disabled)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent); transform: skewX(-18deg); animation: lf-sheen 3.4s ease-in-out infinite; pointer-events: none; }
.lf-join-arr { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--accent-ink); display: grid; place-items: center; transition: transform 240ms var(--spring); opacity: 0.5; }
.lf-join-btn:not(:disabled) .lf-join-arr { opacity: 1; }
.lf-join-btn:not(:disabled):hover .lf-join-arr { transform: translateX(4px); }
.lf-join-hint { margin-top: 18px; font-size: 13px; color: var(--ink-4); }

/* reduced motion */
:root[data-motion="reduced"] .lf-bg-shape,
:root[data-motion="reduced"] .lf-create::after,
:root[data-motion="reduced"] .lf-live-dot::after,
:root[data-motion="reduced"] .lf-glyph-solo::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .lf-bg-shape, .lf-create::after, .lf-live-dot::after, .lf-glyph-solo::after,
  .lf-join-btn::after, .lf-pin-digits .d, .lf-chip { animation: none !important; }
  .lf-screen, .lf-rise { animation-duration: 1ms; }
}

/* responsive */
@media (max-width: 720px) {
  .lf-scroll { padding: 40px 18px 64px; }
  .lf-cards { grid-template-columns: 1fr; }
  .lf-lobby-grid { grid-template-columns: 1fr; }
  .lf-create { width: 100%; justify-content: space-between; }
  .lf-create-bar { justify-content: stretch; }
  .lf-pin { width: 100%; }
  .lf-pin-digits { flex: 1; justify-content: center; font-size: clamp(34px, 11vw, 52px); }
}
