.referral-screen { color: var(--text); text-align: left; }
.referral-summary { padding: 4px 0 24px; border-bottom: 1px solid var(--m-accent-border); }
.referral-identity { display: flex; align-items: center; gap: 12px; }
.referral-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--m-accent-bg); color: var(--text); font-size: 15px; font-weight: 700; }
.referral-own-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; font-size: 17px; }
.referral-icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; }
.referral-icon-button svg { width: 19px; height: 19px; }
.referral-icon-button:hover:not(:disabled) { color: var(--accent); background: var(--m-accent-bg); }
.referral-icon-button:disabled { opacity: .5; cursor: wait; }
.referral-stats { display: flex; gap: 32px; margin-top: 16px; }
.referral-stats > span { display: flex; flex-direction: column; gap: 4px; }
.referral-stats strong { font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.referral-stats span span { color: var(--muted); font-size: 13px; }
.referral-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.referral-heading h2 { margin: 0; font-size: 18px; }
.referral-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.referral-table th, .referral-table td { padding: 12px 8px; border-bottom: 1px solid var(--m-accent-border); }
.referral-table thead th { color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; padding-top: 4px; }
.referral-table th:first-child { width: 48px; }
.referral-table th:last-child { width: 64px; }
.referral-table th:last-child, .referral-count { text-align: right; }
.referral-table tbody th { text-align: left; font-size: 15px; }
.referral-place { color: var(--muted); font-weight: 600; white-space: nowrap; vertical-align: middle; }
.referral-place span { vertical-align: middle; }
.referral-place svg { display: inline-block; vertical-align: middle; width: 16px; height: 16px; margin-right: 4px; }
.referral-place-1 svg { color: #bd8700; }
.referral-place-2 svg { color: var(--muted); }
.referral-place-3 svg { color: #a56536; }
.referral-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.referral-player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-player-name small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.referral-count { font-size: 17px; font-weight: 700; }
.referral-table .is-you { background: var(--m-accent-bg); }
.referral-outside-top { border-top: 8px solid var(--card-bg); }
.referral-empty { padding: 32px 8px; text-align: center; }
.referral-empty > svg { color: var(--accent); width: 32px; height: 32px; margin-bottom: 12px; }
.referral-empty p { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.referral-empty > span { color: var(--muted); font-size: 14px; }
.referral-invite-action { padding-top: 24px; }
.referral-invite-action > p { color: var(--muted); margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.referral-primary { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 14px; background: var(--accent-grad); color: white; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: filter .15s; }
.referral-primary:hover:not(:disabled) { filter: brightness(1.08); }
.referral-primary:disabled { opacity: .55; cursor: default; }
.referral-primary svg { width: 20px; height: 20px; }
.referral-invite-action .referral-counting-rule { margin: 12px 0 0; font-size: 13px; }
.referral-status { color: var(--muted); font-size: 14px; line-height: 1.5; }
.referral-name-form { text-align: left; }
.referral-name-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.referral-name-form input { display: block; width: 100%; min-height: 48px; box-sizing: border-box; border: 1px solid var(--m-accent-border); border-radius: 10px; padding: 12px; font: inherit; font-size: 16px; background: var(--card-bg); color: var(--text); caret-color: var(--accent); }
.referral-name-form small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
#referralNameStatus { color: var(--text); margin: 8px 0 16px; font-size: 14px; min-height: 20px; }
.referral-icon-button:focus-visible, .referral-primary:focus-visible, .referral-name-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.referral-name-form input[aria-invalid="true"] { border-color: var(--text); }
.referral-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.menu-auth-actions { display: flex; gap: 6px; align-items: center; }
.menu-auth-actions .menu-auth-action { min-height: 44px; }
@media (max-width: 420px) { .menu-auth-actions { flex-direction: column; align-items: stretch; } .referral-table th, .referral-table td { padding-left: 6px; padding-right: 6px; } }
