/* HEIGO UI foundation: shared tokens, typography, interaction states and accessibility. */
@font-face {
    font-family: "HEIGO UI CN";
    src: url("/static/font/heigo-ui-cn.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --font-ui: "HEIGO UI CN", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "微软雅黑", "Segoe UI", "Noto Sans SC", sans-serif;
    --font-cn-display: "HEIGO UI CN", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", sans-serif;
    --font-data: "HEIGO UI CN", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-md: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --control-height-sm: 36px;
    --control-height: 44px;
    --control-height-lg: 50px;
    --icon-sm: 16px;
    --icon-md: 20px;
    --icon-lg: 24px;

    --state-success: #16875b;
    --state-success-bg: rgba(22, 135, 91, 0.11);
    --state-warning: #a85f00;
    --state-warning-bg: rgba(168, 95, 0, 0.11);
    --state-danger: #c3354d;
    --state-danger-bg: rgba(195, 53, 77, 0.11);
    --state-info: #1e66f5;
    --state-info-bg: rgba(30, 102, 245, 0.1);

    --shadow-card: 0 8px 24px rgba(25, 38, 58, 0.065);
    --shadow-float: 0 14px 34px rgba(25, 38, 58, 0.1);
    --shadow-modal: 0 28px 72px rgba(25, 38, 58, 0.18);

    --duration-press: 120ms;
    --duration-fast: 160ms;
    --duration-normal: 220ms;
    --ui-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --z-sticky: 100;
    --z-navigation: 500;
    --z-popover: 1000;
    --z-modal: 2000;
    --z-toast: 3000;
}

body:not(.light-mode) {
    --state-success: #57d5a1;
    --state-success-bg: rgba(87, 213, 161, 0.12);
    --state-warning: #e8b86d;
    --state-warning-bg: rgba(232, 184, 109, 0.12);
    --state-danger: #f27d92;
    --state-danger-bg: rgba(242, 125, 146, 0.12);
    --state-info: #8cb4ff;
    --state-info-bg: rgba(140, 180, 255, 0.13);
    --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.18);
    --shadow-float: 0 16px 36px rgba(0, 0, 0, 0.24);
    --shadow-modal: 0 30px 78px rgba(0, 0, 0, 0.42);
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: calc(var(--z-toast) + 1);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--text-primary);
    color: var(--surface-strong);
    font-weight: 800;
    transform: translateY(calc(-100% - 20px));
    transition: transform var(--duration-fast) var(--ui-ease-out);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-main-content:focus {
    outline: none;
}

.tab-content:focus {
    outline: none;
}

.ui-confirm-copy {
    color: var(--text-secondary);
    font-size: var(--text-md);
    line-height: 1.65;
    white-space: pre-line;
}

.ui-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

/* Shared result/form dialog surface. Page modules may still own width and content layout. */
#resultModal {
    z-index: var(--z-modal);
    background: rgba(8, 12, 22, 0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#resultModal .modal-content {
    border-color: color-mix(in srgb, var(--border-color) 82%, transparent);
    border-radius: var(--radius-xl);
    background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
    box-shadow: var(--shadow-modal);
}

#resultModal .modal-header {
    min-height: var(--control-height);
    gap: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
}

#resultModal .modal-header h3 {
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 850;
    line-height: 1.3;
}

#resultModal.is-danger .modal-header h3 { color: var(--state-danger); }
#resultModal.is-warning .modal-header h3 { color: var(--state-warning); }

#resultModal .modal-close {
    width: var(--control-height);
    height: var(--control-height);
    flex: 0 0 var(--control-height);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface-muted) 88%, transparent);
    color: var(--text-secondary);
    transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, color var(--duration-fast) ease;
}

#resultModal .modal-close:hover,
#resultModal .modal-close:focus-visible {
    border-color: color-mix(in srgb, var(--accent-primary) 38%, var(--border-color));
    background: var(--accent-bg);
    color: var(--accent-primary);
}

#resultModal .modal-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: auto;
    font-synthesis: weight;
}

button,
input,
select,
textarea {
    line-height: 1.25;
    font-weight: 500;
}

:where(th, label, summary) {
    font-weight: 600;
}

::selection {
    background: color-mix(in srgb, var(--accent-primary) 24%, transparent);
    color: var(--text-primary);
}

::placeholder {
    color: color-mix(in srgb, var(--text-secondary) 76%, transparent);
    opacity: 1;
}

:where(button, a, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-primary) 24%, transparent);
    outline-offset: 2px;
}

:where(button, input, select, textarea):disabled,
[aria-disabled="true"] {
    cursor: not-allowed !important;
    opacity: 0.48;
    box-shadow: none !important;
    transform: none !important;
}

button[aria-busy="true"] {
    cursor: wait;
}

:where(button, [role="button"], a.btn) {
    touch-action: manipulation;
}

.ui-icon {
    width: var(--icon-md);
    height: var(--icon-md);
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ui-icon.is-small { width: var(--icon-sm); height: var(--icon-sm); }
.ui-icon.is-large { width: var(--icon-lg); height: var(--icon-lg); }

.home-promotion-media .home-promotion-icon {
    width: 22px;
    height: 22px;
}

.home-promotion-modal-signal .home-promotion-icon {
    width: 42px;
    height: 42px;
    position: relative;
    z-index: 1;
}

.ui-state-message {
    min-height: var(--control-height);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
}

.ui-state-message.is-success { border-color: color-mix(in srgb, var(--state-success) 30%, var(--border-color)); background: var(--state-success-bg); color: var(--state-success); }
.ui-state-message.is-warning { border-color: color-mix(in srgb, var(--state-warning) 30%, var(--border-color)); background: var(--state-warning-bg); color: var(--state-warning); }
.ui-state-message.is-danger { border-color: color-mix(in srgb, var(--state-danger) 30%, var(--border-color)); background: var(--state-danger-bg); color: var(--state-danger); }
.ui-state-message.is-info { border-color: color-mix(in srgb, var(--state-info) 30%, var(--border-color)); background: var(--state-info-bg); color: var(--state-info); }

.ui-state-panel {
    min-height: 112px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
    color: var(--text-secondary);
}

.ui-state-panel.is-compact {
    min-height: 72px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
}

.ui-state-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--state-info-bg);
    color: var(--state-info);
}

.ui-state-panel.is-compact .ui-state-icon { width: 34px; height: 34px; border-radius: 11px; }
.ui-state-panel.is-success .ui-state-icon { background: var(--state-success-bg); color: var(--state-success); }
.ui-state-panel.is-warning .ui-state-icon { background: var(--state-warning-bg); color: var(--state-warning); }
.ui-state-panel.is-danger .ui-state-icon { background: var(--state-danger-bg); color: var(--state-danger); }
.ui-state-panel.is-empty .ui-state-icon { background: color-mix(in srgb, var(--text-secondary) 10%, transparent); color: var(--text-secondary); }

.ui-state-panel.is-loading .ui-state-icon svg { animation: uiStateSpin 1.4s linear infinite; }
.ui-state-copy { min-width: 0; display: grid; gap: 4px; }
.ui-state-copy strong { color: var(--text-primary); font-size: var(--text-md); }
.ui-state-copy p { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.55; }
.ui-state-action { min-height: var(--control-height); white-space: nowrap; }

.ui-toast {
    position: fixed;
    left: 50%;
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
    z-index: var(--z-toast);
    min-width: min(280px, calc(100vw - 28px));
    max-width: min(520px, calc(100vw - 28px));
    min-height: var(--control-height-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 16px;
    border: 1px solid color-mix(in srgb, var(--state-info) 28%, var(--border-color));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    box-shadow: var(--shadow-float);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity var(--duration-fast) ease, transform var(--duration-normal) var(--ui-ease-out);
    backdrop-filter: blur(22px) saturate(1.18);
    -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.ui-toast.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ui-toast.is-success { border-color: color-mix(in srgb, var(--state-success) 34%, var(--border-color)); }
.ui-toast.is-warning { border-color: color-mix(in srgb, var(--state-warning) 34%, var(--border-color)); }
.ui-toast.is-danger { border-color: color-mix(in srgb, var(--state-danger) 34%, var(--border-color)); }
.ui-toast-icon { display: grid; place-items: center; color: var(--state-info); }
.ui-toast.is-success .ui-toast-icon { color: var(--state-success); }
.ui-toast.is-warning .ui-toast-icon { color: var(--state-warning); }
.ui-toast.is-danger .ui-toast-icon { color: var(--state-danger); }
.ui-toast-action {
    min-height: 34px;
    margin-left: auto;
    padding: 5px 10px;
    border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-primary) 9%, transparent);
    color: var(--accent-primary);
    font: inherit;
    font-size: var(--text-xs);
    font-weight: 900;
    cursor: pointer;
}

.ui-toast-action:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-primary) 52%, transparent);
    outline-offset: 2px;
}

.ui-button-spinner {
    width: var(--icon-sm);
    height: var(--icon-sm);
    flex: 0 0 var(--icon-sm);
    border: 2px solid color-mix(in srgb, currentColor 24%, transparent);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: uiStateSpin 0.72s linear infinite;
}

.ui-form-field {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 750;
}

.ui-form-field > input,
.ui-form-field > select,
.ui-form-field > textarea {
    width: 100%;
}

:where(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--state-danger) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--state-danger) 14%, transparent) !important;
}

.ui-field-error {
    color: var(--state-danger);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.4;
}

.ui-field-error[hidden] { display: none; }

.ui-inline-feedback {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--state-info) 28%, var(--border-color));
    border-radius: var(--radius-md);
    background: var(--state-info-bg);
    color: var(--state-info);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.45;
}

.ui-inline-feedback[hidden] { display: none; }

.compare-dock[hidden],
.candidate-dock[hidden],
.comparison-overlay[hidden] {
    display: none !important;
}
.ui-inline-feedback > span:first-child { display: grid; place-items: center; }
.ui-inline-feedback .ui-icon { width: 17px; height: 17px; }
.ui-inline-feedback.is-success { border-color: color-mix(in srgb, var(--state-success) 28%, var(--border-color)); background: var(--state-success-bg); color: var(--state-success); }
.ui-inline-feedback.is-warning { border-color: color-mix(in srgb, var(--state-warning) 28%, var(--border-color)); background: var(--state-warning-bg); color: var(--state-warning); }
.ui-inline-feedback.is-danger { border-color: color-mix(in srgb, var(--state-danger) 28%, var(--border-color)); background: var(--state-danger-bg); color: var(--state-danger); }

.ui-save-state,
.match-save-state,
.formation-save-message,
.db-tactics-status {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 750;
    line-height: 1.35;
}

.ui-save-state::before,
.match-save-state::before,
.formation-save-message::before,
.db-tactics-status::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent);
}

:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-saving::before {
    border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    border-top-color: currentColor;
    background: transparent;
    animation: uiStateSpin 0.72s linear infinite;
}

:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-saved,
:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-success { color: var(--state-success); }
:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-dirty,
:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-warning { color: var(--state-warning); }
:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-error,
:where(.ui-save-state, .match-save-state, .formation-save-message, .db-tactics-status).is-danger { color: var(--state-danger); }

.modal-close {
    min-width: var(--control-height);
    min-height: var(--control-height);
    display: grid;
    place-items: center;
}

.modal-close .ui-icon { width: 18px; height: 18px; }

@keyframes uiStateSpin { to { transform: rotate(360deg); } }

/* High-frequency information must remain readable on compact cards. */
:where(
    .team-center-welcome-count small,
    .team-center-club-copy small,
    .team-center-club-stats,
    .team-center-switcher-control label span,
    .team-power-summary-values section > span,
    .team-power-summary-values section > small,
    .team-match-series-head span,
    .team-match-series-head small,
    .team-match-leg-meta small,
    .team-power-player small,
    .team-power-metric span,
    .team-power-heigo small,
    .team-power-shape-badge,
    .team-roster-name small,
    .team-roster-player-copy,
    .team-roster-detail-table th,
    .team-roster-detail-player small,
    .team-roster-slot-empty,
    .team-roster-card-head small,
    .team-roster-card-position,
    .team-roster-card-power,
    .team-roster-card-stats em,
    .team-roster-card-copy,
    .team-wage-cap-unit,
    .workspace-logo-source-note small,
    .workspace-logo-team-copy small,
    .workspace-logo-upload-drop small,
    .workspace-logo-upload-file small,
    .workspace-logo-upload-file button,
    .workspace-logo-candidate-copy > small,
    .workspace-logo-metadata dt,
    .workspace-logo-metadata dd,
    .workspace-logo-confirm strong,
    .workspace-logo-confirm small,
    .workspace-promotion-guide span,
    .workspace-promotion-summary p,
    .workspace-promotion-summary small,
    .workspace-promotion-row-actions .btn,
    .workspace-promotion-delete,
    .workspace-promotion-image-control > p,
    .workspace-promotion-image-clear,
    .workspace-promotion-image-status,
    .workspace-daily-report-guide span,
    .workspace-daily-report-head-actions label,
    .workspace-daily-report-metrics small,
    .workspace-daily-report-title,
    .workspace-daily-report-copy,
    .workspace-daily-template-filter,
    .workspace-daily-template-head small,
    .workspace-daily-template-row-head span,
    .workspace-daily-template-row-head em,
    .workspace-daily-template-row p,
    .workspace-daily-template-row > small,
    .workspace-daily-template-row button,
    .workspace-daily-placeholder-note,
    .workspace-daily-template-token-list,
    .mobile-standings-quick-stats small,
    .mobile-standings-strip em
) {
    font-size: var(--text-xs);
}

/* Shared flower / egg reaction controls used by coach and player profiles. */
.player-reaction-host {
    max-width: 100%;
    margin-top: 10px;
}

.player-reaction-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
}

.player-reaction-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
}

.player-reaction-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 11px 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease, opacity var(--duration-fast) ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 9px 18px rgba(15, 23, 42, 0.14);
}

body.light-mode .player-reaction-button {
    border-color: rgba(76, 79, 105, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 252, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 16px rgba(76, 79, 105, 0.1);
}

.player-reaction-button:hover,
.player-reaction-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(122, 162, 247, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 20px rgba(15, 23, 42, 0.16);
}

body.light-mode .player-reaction-button:hover,
body.light-mode .player-reaction-button:focus-visible {
    border-color: rgba(30, 102, 245, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 18px rgba(76, 79, 105, 0.12);
}

.player-reaction-button:active {
    transform: translateY(0) scale(0.98);
}

.player-reaction-button.is-bouncing {
    animation: playerReactionBounce 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.player-reaction-button[disabled] {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-reaction-icon {
    position: relative;
    flex: 0 0 auto;
    display: inline-block;
}

.player-reaction-icon.is-flower {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 18%, #ff9fbe 0 22%, transparent 24%),
                radial-gradient(circle at 84% 50%, #ff9fbe 0 22%, transparent 24%),
                radial-gradient(circle at 50% 82%, #ff9fbe 0 22%, transparent 24%),
                radial-gradient(circle at 16% 50%, #ff9fbe 0 22%, transparent 24%),
                radial-gradient(circle at 70% 26%, rgba(255, 255, 255, 0.22) 0 10%, transparent 11%),
                radial-gradient(circle at 50% 50%, #8fe388 0 18%, transparent 20%);
    filter: drop-shadow(0 1px 2px rgba(244, 114, 182, 0.18));
}

.player-reaction-icon.is-egg {
    width: 12px;
    height: 15px;
    box-sizing: border-box;
    border: 1px solid rgba(223, 142, 29, 0.4);
    border-radius: 54% 54% 46% 46% / 68% 68% 36% 36%;
    background: linear-gradient(180deg, #fff8d6 0%, #ffe8ae 58%, #f0cf89 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.player-reaction-button.is-flower {
    border-color: rgba(244, 114, 182, 0.26);
    background: linear-gradient(180deg, rgba(249, 168, 212, 0.16), rgba(255, 255, 255, 0.05));
}

.player-reaction-button.is-egg {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.14), rgba(255, 255, 255, 0.05));
}

body.light-mode .player-reaction-button.is-flower {
    background: linear-gradient(180deg, rgba(255, 236, 244, 0.96), rgba(255, 246, 250, 0.92));
}

body.light-mode .player-reaction-button.is-egg {
    background: linear-gradient(180deg, rgba(255, 247, 220, 0.98), rgba(255, 250, 238, 0.92));
}

.player-reaction-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    min-height: 19px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    font-size: 0.68rem;
    line-height: 1;
}

.player-reaction-count.is-popping {
    animation: playerReactionCountPop 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

body.light-mode .player-reaction-count {
    background: rgba(76, 79, 105, 0.08);
}

@keyframes playerReactionBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-3px) scale(1.06); }
    65% { transform: translateY(1px) scale(0.98); }
}

@keyframes playerReactionCountPop {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.14); }
}

.loading,
.data-status-skeleton {
    color: var(--text-secondary);
}

.loading[aria-busy="true"],
[aria-busy="true"] .loading {
    cursor: progress;
}

@media (max-width: 780px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        min-height: var(--control-height);
        font-size: var(--text-base);
    }

    button,
    [role="button"],
    a.btn {
        min-height: var(--control-height);
    }

    .ui-state-panel {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .ui-state-icon { width: 38px; height: 38px; }
    .ui-state-action { grid-column: 1 / -1; width: 100%; }
    .ui-toast { bottom: calc(var(--mobile-bottom-nav-height, 72px) + env(safe-area-inset-bottom) + 12px); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
