/* CAST Games account UI. MASTER COPY: edit shared/cast-account/ in the 1000TRIES repo, then run tools/sync_shared.py.
   Self-contained (own colours, .ca- prefix) so it looks the same in every Cast game. */

.ca { --ca-gold: #f1c073; --ca-gold-rgb: 241, 192, 115; --ca-text: #f0f0f5; --ca-muted: #9a9ab0; --ca-line: #2a2a44; --ca-card: #16152a; --ca-bad: #f87171;
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center; font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--ca-text); }
.ca[hidden], [data-cast-account][hidden], [data-cast-results][hidden] { display: none !important; }
html.ca-open, html.ca-open body { overflow: hidden; }
.ca-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 10, .74); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.ca-panel {
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-sizing: border-box;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0;
  background: radial-gradient(120% 60% at 50% 0%, rgba(var(--ca-gold-rgb), .14), transparent 60%), linear-gradient(180deg, #1b1830, #0f0d1d);
  border: 2px solid var(--ca-gold); border-bottom: 0;
  box-shadow: 0 0 0 4px rgba(var(--ca-gold-rgb), .12), 0 -10px 40px rgba(var(--ca-gold-rgb), .18);
  animation: caUp .25s ease both;
}
@keyframes caUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) {
  .ca { align-items: center; padding: 24px; }
  .ca-panel { border-radius: 22px; border-bottom: 2px solid var(--ca-gold); padding: 26px 26px 22px; max-height: calc(100vh - 48px);
    box-shadow: 0 0 0 5px rgba(var(--ca-gold-rgb), .12), 0 0 50px rgba(var(--ca-gold-rgb), .2), 0 30px 70px rgba(0, 0, 0, .6);
    animation: caIn .3s cubic-bezier(.2, .9, .3, 1.15) both; }
}
@keyframes caIn { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.ca-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ca-line); background: rgba(255, 255, 255, .04); color: var(--ca-muted); font-size: 15px; cursor: pointer; }
@media (hover: hover) { .ca-x:hover { color: var(--ca-gold); border-color: var(--ca-gold); } }

.ca-head { display: flex; flex-direction: column; gap: 2px; margin: 0 44px 14px 0; }
.ca-logo { font: italic 900 24px/1 Inter, sans-serif; letter-spacing: -.4px; text-transform: uppercase; color: var(--ca-gold); }
.ca-who { font-size: 12px; color: var(--ca-muted); }
.ca-hello { font: italic 900 26px/1.1 Inter, sans-serif; letter-spacing: -.4px; color: #fff; text-transform: uppercase; }
.ca-logo-sm { font-size: 12px; font-style: normal; letter-spacing: 2px; order: -1; margin-bottom: 4px; }
.ca-fanchip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--t1); color: #fff; font: 800 12px/1 Inter, sans-serif; box-shadow: inset 0 0 0 1.5px var(--t2); }
.ca-fanchip b { padding: 4px 7px; border-radius: 999px; background: var(--t2); color: var(--t1); font-weight: 900; font-size: 11px; }

/* Team colours along the top of the panel */
.ca-panel.has-team { border-top-width: 0; }
.ca-panel.has-team::before { content: ""; position: sticky; top: -20px; display: block; height: 7px; margin: -20px -18px 16px; background: linear-gradient(90deg, var(--t1) 0 60%, var(--t2) 60% 100%); z-index: 3; }
@media (min-width: 720px) { .ca-panel.has-team::before { top: -26px; margin: -26px -26px 18px; border-radius: 20px 20px 0 0; } }

/* Daily streak + time played: three separate tiles */
.ca-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 8px; }
.ca-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 14px; text-align: center;
  background: var(--ca-card); border: 1px solid var(--ca-line); }
.ca-tile.is-live { background: linear-gradient(160deg, rgba(251, 146, 60, .22), rgba(239, 68, 68, .08)); border-color: rgba(251, 146, 60, .6); }
.ca-tile-ico { font-size: 20px; line-height: 1; }
.ca-tile.is-live .ca-tile-ico { animation: caFlame 1.6s ease-in-out infinite; }
@keyframes caFlame { 0%, 100% { transform: scale(1) rotate(-5deg); } 50% { transform: scale(1.18) rotate(5deg); } }
.ca-tile b { font-size: 24px; font-weight: 900; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-tile.is-live b { color: #fdba74; }
.ca-tile span:last-child { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--ca-muted); }
.ca-streak-msg { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; text-align: center; font-size: 12.5px; color: #d6d6e4; background: rgba(255, 255, 255, .03); }
.ca-streak-msg.is-done { color: #bbf7d0; background: rgba(74, 222, 128, .08); }
@media (max-width: 380px) { .ca-tile b { font-size: 20px; } }
.ca-streak-note { margin: -4px 0 12px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #fdba74; background: rgba(251, 146, 60, .12); border: 1px solid rgba(251, 146, 60, .4); }
.ca-head-streak { margin-left: 2px; padding: 3px 6px; border-radius: 999px; background: #111; color: #fdba74; font-size: 11px; font-weight: 900; letter-spacing: 0; }
@media (max-width: 560px) { .ca-btn-head { position: relative; } .ca-head-streak { position: absolute; top: -8px; right: -10px; padding: 2px 5px; font-size: 10px; border: 1px solid rgba(251, 146, 60, .6); } }

/* Tabs */
.ca-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; margin: 4px 0 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--ca-line); }
.ca-tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--ca-muted); font: 900 13px/1 Inter, sans-serif; letter-spacing: .3px; cursor: pointer; }
.ca-tab.is-on { background: var(--ca-gold); color: #111; }

/* Chips (game switcher and fan profile answers) */
.ca-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.ca-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ca-line); background: rgba(255, 255, 255, .03); color: #d6d6e4; font: 800 13px/1 Inter, sans-serif; cursor: pointer; }
.ca-chip.is-on { background: var(--ca-gold); border-color: var(--ca-gold); color: #111; }
@media (hover: hover) { .ca-chip:hover:not(.is-on) { border-color: var(--ca-gold); color: var(--ca-gold); } }
.ca-game-chips { margin-bottom: 14px; }
.ca-chips-one { margin-top: 8px; }
.ca-chips-states { margin-top: 2px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.ca-chips-states .ca-chip { min-width: 58px; }
.ca-teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 440px) { .ca-teams { grid-template-columns: repeat(4, 1fr); } }
.ca-team { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 4px; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; background: var(--t1); color: #fff; font: 800 11px/1.1 Inter, sans-serif; box-shadow: inset 0 -4px 0 var(--t2); opacity: .82; transition: transform .12s, opacity .12s; }
.ca-team b { font-size: 14px; font-weight: 900; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.ca-team span { text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.ca-team.is-on { opacity: 1; border-color: var(--ca-gold); transform: scale(1.04); box-shadow: inset 0 -4px 0 var(--t2), 0 0 0 3px rgba(var(--ca-gold-rgb), .35), 0 0 18px rgba(var(--ca-gold-rgb), .45); }
@media (hover: hover) { .ca-team:hover { opacity: 1; } }

/* Text field (first name) */
.ca-field { width: 100%; box-sizing: border-box; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--ca-line); background: #0f0e1c; color: #fff; font: 800 16px Inter, sans-serif; }
.ca-field:focus { outline: none; border-color: var(--ca-gold); }

/* Stats overview (one tile per game, scales as more games are added) */
.ca-overview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ca-ov { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; text-align: left; cursor: pointer;
  background: var(--ca-card); border: 1px solid var(--ca-line); color: var(--ca-text); font-family: Inter, sans-serif; }
@media (hover: hover) { .ca-ov:hover { border-color: var(--ca-gold); } }
.ca-ov-name { font: italic 900 15px/1 Inter, sans-serif; color: #fff; margin-bottom: 6px; }
.ca-ov-big { font-size: 30px; font-weight: 900; line-height: 1; color: var(--ca-gold); font-variant-numeric: tabular-nums; }
.ca-ov-lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--ca-muted); }
.ca-ov-best { font-size: 12px; color: #c9c9da; margin-top: 6px; }

/* Fan profile prompt and detail lists */
.ca-prompt { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(var(--ca-gold-rgb), .16), rgba(var(--ca-gold-rgb), .05)); border: 1.5px solid rgba(var(--ca-gold-rgb), .6); }
.ca-prompt-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ca-prompt-txt b { font-size: 15px; font-weight: 900; color: #fff; }
.ca-prompt-txt small { font-size: 12px; color: #b8b8cc; }
.ca-progress { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ca-progress i { display: block; height: 100%; background: var(--ca-gold); border-radius: 3px; }
.ca-dl { margin: 0 0 10px; display: grid; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--ca-line); }
.ca-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: rgba(255, 255, 255, .02); }
.ca-dl div + div { border-top: 1px solid var(--ca-line); }
.ca-dl dt { font-size: 12px; font-weight: 800; color: var(--ca-muted); text-transform: uppercase; letter-spacing: .4px; }
.ca-dl dd { margin: 0; font-size: 13.5px; font-weight: 800; color: #fff; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.ca-btn:disabled.ca-btn-primary { opacity: .4; cursor: not-allowed; }
.ca-kicker { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--ca-gold); margin-bottom: 6px; }
.ca-title { font: italic 900 24px/1.12 Inter, sans-serif; text-transform: uppercase; letter-spacing: -.3px; margin: 0 0 8px; color: #fff; }
.ca-text { font-size: 14px; line-height: 1.5; color: #c9c9da; margin: 0 0 14px; }
.ca-muted { color: var(--ca-muted); font-size: 13px; margin: 6px 0; }
.ca-small { font-size: 11.5px; line-height: 1.5; color: var(--ca-muted); margin: 12px 0 0; }
.ca-small a { color: var(--ca-gold); font-weight: 800; text-decoration: none; }
.ca-foot { margin-top: 18px; }
.ca-center { text-align: center; }
.ca-h3 { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ca-gold); margin: 18px 0 8px; }
.ca-badge { width: 60px; height: 60px; margin: 4px auto 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 50%;
  border: 2px solid var(--ca-gold); background: rgba(var(--ca-gold-rgb), .12); box-shadow: 0 0 0 5px rgba(var(--ca-gold-rgb), .1), 0 0 24px rgba(var(--ca-gold-rgb), .4); }
.ca-badge-bad { border-color: var(--ca-bad); background: rgba(248, 113, 113, .12); box-shadow: 0 0 0 5px rgba(248, 113, 113, .1); }
.ca-flash { margin: 0 44px 12px 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .5); color: #fecaca; }

/* Buttons */
.ca-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 10px; padding: 12px 16px; box-sizing: border-box;
  border-radius: 12px; font: 800 15px/1.1 Inter, sans-serif; cursor: pointer; border: 2px solid transparent; text-decoration: none; }
.ca-btn:disabled { opacity: .55; cursor: wait; }
.ca-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.ca-btn-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.ca-btn-apple { background: #000; color: #fff; border-color: #444; }
.ca-btn-primary { background: var(--ca-gold); color: #111; border-color: var(--ca-gold); text-transform: uppercase; letter-spacing: .4px; font-weight: 900; }
.ca-btn-ghost { background: transparent; color: var(--ca-gold); border-color: var(--ca-gold); }
.ca-btn-danger { background: var(--ca-bad); color: #1a0505; border-color: var(--ca-bad); font-weight: 900; }
.ca-btn-sm { min-height: 42px; font-size: 13px; margin-top: 0; }
@media (hover: hover) {
  .ca-btn-google:hover:not(:disabled) { background: #f1f1f1; }
  .ca-btn-ghost:hover { background: var(--ca-gold); color: #111; }
  .ca-btn-primary:hover { filter: brightness(1.08); }
}
.ca-btn-quiet { background: rgba(255, 255, 255, .04); color: #c9c9da; border-color: var(--ca-line); font-weight: 800; }
.ca-btn-danger-ghost { background: transparent; color: #fca5a5; border-color: rgba(248, 113, 113, .6); }
@media (hover: hover) { .ca-btn-quiet:hover { border-color: var(--ca-gold); color: var(--ca-gold); } .ca-btn-danger-ghost:hover { background: rgba(248, 113, 113, .12); } }
.ca-gap { margin-top: 14px; }
.ca-kicker-bad { color: #fca5a5; }
.ca-lose { list-style: none; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; text-align: left; background: rgba(248, 113, 113, .07); border: 1px solid rgba(248, 113, 113, .3); display: grid; gap: 6px; font-size: 13.5px; color: #e8e8f0; }
.ca-lose li::before { content: "\2715"; color: #f87171; font-weight: 900; margin-right: 8px; }
.ca-lose b { color: #fff; }
.ca-input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 2px solid rgba(248, 113, 113, .5); background: #0f0e1c; color: #fff;
  font: 900 20px/1 Inter, sans-serif; letter-spacing: 4px; text-align: center; text-transform: uppercase; }
.ca-input:focus { outline: none; border-color: var(--ca-bad); box-shadow: 0 0 0 3px rgba(248, 113, 113, .2); }
.ca-btn-danger:disabled { opacity: .35; cursor: not-allowed; }
.ca-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ca-check, .ca-toggle { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: #d6d6e4; cursor: pointer; margin: 4px 0 8px; }
.ca-check input, .ca-toggle input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--ca-gold); }

/* Birth month and year */
.ca-dob { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 8px; margin: 4px 0 12px; text-align: left; }
.ca-dob-err { color: #fca5a5; margin: -4px 0 10px; }
.ca-dob label { display: flex; flex-direction: column; gap: 4px; }
.ca-dob span { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ca-muted); }
.ca-dob select { width: 100%; min-width: 0; min-height: 48px; padding: 0 8px; border-radius: 12px; border: 1.5px solid var(--ca-line); background: #0f0e1c; color: #fff; font: 700 15px Inter, sans-serif; }
.ca-dob select:focus { outline: none; border-color: var(--ca-gold); }
.ca-partner { text-align: left; }

/* Stat cards */
.ca-cards { display: grid; gap: 10px; }
.ca-card { padding: 12px 14px; border-radius: 14px; background: var(--ca-card); border: 1px solid var(--ca-line); }
.ca-card-empty { opacity: .8; }
.ca-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ca-card-name { font: italic 900 16px/1 Inter, sans-serif; color: #fff; }
.ca-card-play { font-size: 12px; font-weight: 800; color: var(--ca-gold); text-decoration: none; }
.ca-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ca-stats div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, .04); text-align: center; }
.ca-stats b { font-size: 20px; font-weight: 900; color: var(--ca-gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ca-stats span { font-size: 10px; font-weight: 700; color: var(--ca-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.ca-fav { margin-top: 10px; border-top: 1px solid var(--ca-line); padding-top: 8px; }
.ca-fav summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 32px; }
.ca-fav summary::-webkit-details-marker { display: none; }
.ca-fav-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--ca-muted); }
.ca-fav-top { flex: 1; font-size: 13px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-fav[open] .ca-fav-top { visibility: hidden; }
.ca-fav-chev { width: 8px; height: 8px; border-right: 2px solid var(--ca-gold); border-bottom: 2px solid var(--ca-gold); transform: rotate(45deg); margin: -4px 4px 0; transition: transform .15s; }
.ca-fav[open] .ca-fav-chev { transform: rotate(-135deg); margin-top: 4px; }
.ca-fav-list { list-style: none; counter-reset: fav; margin: 6px 0 2px; padding: 0; display: grid; gap: 6px; }
.ca-fav-list li { counter-increment: fav; display: grid; grid-template-columns: 22px minmax(0, 1.4fr) 1fr 34px; align-items: center; gap: 8px; font-size: 13px; }
.ca-fav-list li::before { content: counter(fav); font-size: 11px; font-weight: 900; color: var(--ca-muted); text-align: right; }
.ca-fav-list li:first-child::before { color: var(--ca-gold); }
.ca-fav-name { font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-fav-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.ca-fav-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c8882a, var(--ca-gold)); }
.ca-fav-n { font-size: 12px; font-weight: 800; color: var(--ca-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Daily line on the 27-0 Daily card */
.ca-daily-line { margin: 10px 0 0; font-size: 12.5px; color: #d6d6e4; }
.ca-daily-line b { color: var(--ca-gold); }

/* Recent games */
.ca-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ca-recent li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "game score" "mode res"; gap: 1px 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--ca-line); }
.ca-r-game { grid-area: game; font-weight: 900; font-size: 13px; }
.ca-r-mode { grid-area: mode; font-size: 11.5px; color: var(--ca-muted); }
.ca-r-score { grid-area: score; text-align: right; font-weight: 900; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
.ca-r-score small { font-size: 10px; color: var(--ca-muted); font-weight: 700; }
.ca-r-res { grid-area: res; text-align: right; font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--ca-gold); }
.ca-r-res.is-win { color: #4ade80; }
.ca-r-res.is-fail { color: #f87171; }

.ca-settings { margin-top: 6px; }
.ca-spin { width: 34px; height: 34px; margin: 18px auto 12px; border-radius: 50%; border: 3px solid rgba(var(--ca-gold-rgb), .25); border-top-color: var(--ca-gold); animation: caSpin .8s linear infinite; }
@keyframes caSpin { to { transform: rotate(360deg); } }

/* Header button (host adds <button data-cast-account>) */
.ca-btn-head { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px 0 10px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(241, 192, 115, .55); background: rgba(241, 192, 115, .08); color: #f1c073; font: 900 11px/1 Inter, sans-serif; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.ca-btn-head svg { width: 18px; height: 18px; flex-shrink: 0; }
.ca-btn-head.is-in { background: #f1c073; color: #111; border-color: #f1c073; }
@media (hover: hover) { .ca-btn-head:hover { border-color: #f1c073; background: rgba(241, 192, 115, .18); } .ca-btn-head.is-in:hover { background: #f7d49a; } }
@media (max-width: 560px) { .ca-btn-head { width: 38px; padding: 0; justify-content: center; } .ca-head-lbl { display: none; } }

/* Results prompt (host adds <div data-cast-results>) */
.ca-cta { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 12px 12px 12px 14px; border-radius: 14px; text-align: left;
  background: linear-gradient(135deg, rgba(241, 192, 115, .16), rgba(241, 192, 115, .05)); border: 1.5px solid rgba(241, 192, 115, .6); font-family: Inter, system-ui, sans-serif; }
.ca-cta.is-in { background: linear-gradient(135deg, rgba(74, 222, 128, .14), rgba(74, 222, 128, .04)); border-color: rgba(74, 222, 128, .55); }
.ca-cta-ico { font-size: 24px; flex-shrink: 0; }
.ca-cta-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ca-cta-txt b { font-size: 15px; font-weight: 900; color: #fff; }
.ca-cta-txt small { font-size: 12px; color: #b8b8cc; line-height: 1.35; }
.ca-cta-btn { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: #f1c073; color: #111; font: 900 12px/1 Inter, sans-serif; text-transform: uppercase; letter-spacing: .4px; cursor: pointer; }
.ca-cta.is-in .ca-cta-btn { background: transparent; color: #86efac; border: 1.5px solid rgba(74, 222, 128, .6); }

@media (prefers-reduced-motion: reduce) { .ca-panel, .ca-spin, .ca-tile-ico { animation: none !important; } }

/* ---- Leaderboards ---- */
.ca-tab-ico { font-style: normal; }
@media (max-width: 420px) { .ca-tab { font-size: 12.5px; letter-spacing: 0; } .ca-tab-ico { display: none; } }
.ca-lb-boards { margin: 14px 0 10px; }
.ca-lb-boards .ca-chip { min-height: 36px; font-size: 12.5px; padding: 0 12px; }
.ca-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; margin: 0 0 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--ca-line); }
.ca-seg-btn { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ca-muted); font: 800 12.5px/1 Inter, sans-serif; cursor: pointer; }
.ca-seg-btn.is-on { background: rgba(241, 192, 115, .18); color: var(--ca-gold); }
.ca-lb-note { font-size: 12px; margin: 0 0 10px; }
.ca-lb-rank { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(241, 192, 115, .12); border: 1px solid rgba(241, 192, 115, .5); font: 700 14px/1.3 Inter, sans-serif; color: #fff; text-align: center; }
.ca-lb-rank b { color: var(--ca-gold); font-size: 17px; }
.ca-lb-rank.is-off { background: rgba(255, 255, 255, .04); border-color: var(--ca-line); color: var(--ca-muted); font-size: 13px; }
.ca-lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ca-lb-row { display: grid; grid-template-columns: 28px 38px 1fr auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.ca-lb-row.is-me { background: rgba(241, 192, 115, .14); border-color: var(--ca-gold); }
.ca-lb-pos { font: italic 900 15px/1 Inter, sans-serif; color: var(--ca-muted); text-align: center; }
.ca-lb-row.is-top1 .ca-lb-pos { color: #f1c073; font-size: 18px; }
.ca-lb-row.is-top2 .ca-lb-pos { color: #d7dbe3; font-size: 17px; }
.ca-lb-row.is-top3 .ca-lb-pos { color: #d99a6c; font-size: 16px; }
.ca-lb-club { display: inline-grid; place-items: center; height: 24px; border-radius: 6px; background: var(--t1); color: var(--t2); font: 900 10px/1 Inter, sans-serif; letter-spacing: .4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ca-lb-club.is-none { background: rgba(255, 255, 255, .06); box-shadow: none; }
.ca-lb-n { font: 800 14px/1.2 Inter, sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-lb-n em { font-style: normal; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; color: #111; background: var(--ca-gold); padding: 2px 5px; border-radius: 4px; vertical-align: 2px; }
.ca-lb-s { font: 900 14px/1.1 Inter, sans-serif; color: #fff; text-align: right; white-space: nowrap; }
.ca-lb-s small { font-size: 11px; font-weight: 700; color: var(--ca-muted); }
.ca-lb-empty { padding: 18px 0; }
.ca-lb-name { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--ca-line); }
.ca-lb-name label b { font-size: 14px; color: #fff; }
.ca-lb-name small { font-size: 11.5px; color: var(--ca-muted); line-height: 1.4; }
.ca-lb-name-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ca-lb-name input { min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--ca-line); background: #0d0d16; color: #fff; font: 700 15px Inter, sans-serif; min-width: 0; }
.ca-lb-name input:focus { outline: none; border-color: var(--ca-gold); }
.ca-lb-name-row .ca-btn { margin: 0; min-height: 42px; }
.ca-lb-err { margin: 0; font-size: 12.5px; color: #fca5a5; font-weight: 700; }
.ca-lb-me { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--ca-line); }
.ca-lb-me-txt { font-size: 13.5px; color: #d6d6e4; }
.ca-lb-me-txt b { color: var(--ca-gold); font-size: 15px; }
.ca-lb-me .ca-row { margin: 0; }
.ca-lb-me .ca-row { display: flex; flex-wrap: nowrap; gap: 8px; }
.ca-lb-me .ca-btn-sm { width: auto; flex: 0 0 auto; min-height: 32px; padding: 6px 14px; font-size: 12.5px; border-radius: 999px; white-space: nowrap; border-width: 1.5px; }

/* ---- Trophies ---- */
.ca-trophies { margin: 16px 0 8px; }
.ca-trophies-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; }
.ca-trophies-h b { font: 900 13px/1 Inter, sans-serif; letter-spacing: .8px; text-transform: uppercase; color: var(--ca-gold); }
.ca-trophies-h span { font: 800 12px/1 Inter, sans-serif; color: var(--ca-muted); }
.ca-trophy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ca-trophy { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 6px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--ca-line); text-align: center; opacity: .55; min-width: 0; }
.ca-trophy.is-on { opacity: 1; background: rgba(241, 192, 115, .1); border-color: rgba(241, 192, 115, .55); }
.ca-trophy .ca-trophy-ico { font-size: 22px; line-height: 1.1; }
.ca-trophy b { font: 900 11.5px/1.2 Inter, sans-serif; color: #fff; }
.ca-trophy small { font-size: 10px; line-height: 1.3; color: var(--ca-muted); }
.ca-trophy-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 10090; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 14px;
  background: #16162a; border: 2px solid var(--ca-gold, #f1c073); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); color: #fff; font-family: Inter, sans-serif;
  transform: translate(-50%, 30px); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .35s; max-width: calc(100vw - 32px); }
.ca-trophy-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.ca-trophy-toast .ca-trophy-ico { font-size: 28px; }
.ca-trophy-toast small { display: block; font: 900 10px/1 Inter, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ca-gold, #f1c073); margin-bottom: 3px; }
.ca-trophy-toast b { font: 900 15px/1.2 Inter, sans-serif; }
.ca-trophy-toast .ca-cta-btn { margin-left: 4px; }

/* ---- Bonus reroll ---- */
.ca-bonus .ca-body { text-align: center; }
.ca-bonus-ico { font-size: 44px; line-height: 1; margin: 4px 0 8px; }
.ca-h2 { font: italic 900 24px/1.1 Inter, sans-serif; text-transform: uppercase; color: #fff; margin: 0 0 8px; }
.ca-follow-yt, .ca-follow-ig { width: 100%; margin: 0 0 8px; color: #fff !important; border: 0 !important; font-weight: 900; }
.ca-follow-yt { background: #ff0000 !important; }
.ca-follow-ig { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888) !important; }
.ca-follow-yt:disabled, .ca-follow-ig:disabled { opacity: .45; }
.ca-lb-club-row { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.ca-lb-club-row label { font: 800 12px/1 Inter, sans-serif; color: var(--ca-muted); text-transform: uppercase; letter-spacing: .6px; }
.ca-lb-club-row select, .ca-lb-name select { flex: 1; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--ca-line); background: #0d0d16; color: #fff; font: 700 14px Inter, sans-serif; min-width: 0; }
.ca-lb-report { display: block; margin: 12px auto 0; }

/* ---- "Want another reroll?" nudge ---- */
.ca-nudge { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10085; display: flex; align-items: center; gap: 10px; width: min(420px, calc(100vw - 24px));
  padding: 10px 10px 10px 12px; border-radius: 14px; background: #16162a; border: 2px solid var(--ca-gold, #f1c073); box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  color: #fff; font-family: Inter, sans-serif; transform: translate(-50%, 30px); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .35s; }
.ca-nudge.is-on { transform: translate(-50%, 0); opacity: 1; }
.ca-nudge-ico { font-size: 26px; }
.ca-nudge-txt { flex: 1; min-width: 0; line-height: 1.25; }
.ca-nudge-txt b { display: block; font: 900 14px/1.2 Inter, sans-serif; }
.ca-nudge-txt small { font-size: 12px; color: #c9c9da; }
.ca-nudge-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #9a9ab0; font-size: 14px; cursor: pointer; }
/* Long boards scroll inside the panel; your own row pinned underneath when outside the list */
.ca-lb { max-height: min(56vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.ca-lb-pinned { margin-top: 6px; }
/* Trophy tiles are all one size: one-line names, two-line descriptions */
.ca-trophy-grid { grid-auto-rows: 1fr; }
.ca-trophy { height: 100%; min-height: 104px; justify-content: flex-start; padding: 10px 6px 8px; }
.ca-trophy b { width: 100%; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-trophy small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }

/* How much you play: Today / This week / All time */
.ca-play { margin: 0 0 14px; padding: 14px; border-radius: 16px; background: var(--ca-card); border: 1px solid var(--ca-line); }
.ca-play-h { font: 900 12px/1 Inter, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ca-gold); margin-bottom: 12px; }
.ca-play-h span { color: var(--ca-muted); font-weight: 800; letter-spacing: .6px; margin-left: 4px; }
.ca-play-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ca-play-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--ca-line); text-align: center; }
.ca-play-lbl { font: 800 11px/1 Inter, sans-serif; color: var(--ca-muted); text-transform: uppercase; letter-spacing: .6px; }
.ca-play-big { font: 900 28px/1.05 Inter, sans-serif; color: var(--ca-text); font-variant-numeric: tabular-nums; }
.ca-play-cell small { font-size: 11px; color: var(--ca-muted); }
/* Your Games panel and per-game stats use the same compact tiles as Lifetime Stats */
.ca-play-h-row { display: flex; align-items: center; justify-content: space-between; }
.ca-play-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ca-play-grid-auto { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.ca-play-btn { font: inherit; color: inherit; cursor: pointer; }
@media (hover: hover) { .ca-play-btn:hover { border-color: var(--ca-gold); } }
.ca-play-grid-4 .ca-play-big { font-size: 22px; }
.ca-play-lbl { line-height: 1.2; }
.ca-play + .ca-daily-line, .ca-play .ca-daily-line { margin-top: 10px; }
