.sidebar-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(22, 49, 39, 0.12);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #183f2f;
    box-shadow: 0 14px 30px rgba(24, 48, 36, 0.14);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    touch-action: manipulation;
    width: auto !important;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.container,
.page {
    padding-top: 42px;
}

body {
    color: #183f2f;
    text-rendering: optimizeLegibility;
    background-attachment: fixed;
}

body::selection {
    background: rgba(215, 165, 68, 0.3);
}

a,
button {
    -webkit-tap-highlight-color: rgba(24, 63, 47, 0.12);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(215, 165, 68, 0.7) !important;
    outline-offset: 3px !important;
}

.container,
.page,
main {
    isolation: isolate;
}

.hero,
.hero-shell,
.panel,
.filter-panel,
.share-panel,
.signin-card,
.auth-card,
.home-panel,
.tutorial-card,
.metric-card,
.meta-card,
.seo-card,
.category-card,
.score-card,
.stat-card,
.insight-card,
.match-card,
.profile-card,
.recruit-card,
.video-card,
.contact-card,
.about-card,
.warning-card,
.lock-card,
.status-card,
.output-card,
.team-code,
.onboarding-card,
.edit-panel,
.table-shell {
    border-color: rgba(24, 63, 47, 0.1) !important;
    box-shadow: 0 18px 48px rgba(24, 48, 36, 0.1) !important;
}

.panel,
.filter-panel,
.share-panel,
.signin-card,
.auth-card,
.home-panel,
.tutorial-card,
.metric-card,
.meta-card,
.seo-card,
.category-card,
.score-card,
.stat-card,
.insight-card,
.match-card,
.profile-card,
.recruit-card,
.video-card,
.contact-card,
.about-card,
.warning-card,
.lock-card,
.status-card,
.output-card,
.team-code,
.onboarding-card,
.edit-panel,
.table-shell {
    background-color: rgba(255, 255, 255, 0.84) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero,
.hero-shell,
.home-shell,
.auth-card,
.panel,
.seo-section,
.coach-hero,
.coach-section {
    border-radius: min(28px, 7vw) !important;
}

.home-shell::before,
.hero-shell::before,
.hero-shell::after {
    opacity: 0.7;
}

.primary-action,
.secondary-action,
.guest-action,
.btn-primary,
.btn-secondary,
.copy-btn,
.compare-btn,
.filter-clear,
.sort-btn,
.save-btn,
.report-btn,
.edit-btn,
.delete-btn,
.signout-btn,
button[type="submit"] {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.primary-action:hover,
.secondary-action:hover,
.guest-action:hover,
.google-auth-btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.copy-btn:hover,
.compare-btn:hover,
.filter-clear:hover,
.sort-btn:hover,
.save-btn:hover,
.report-btn:hover,
.edit-btn:hover,
.signout-btn:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(24, 48, 36, 0.14);
}

.google-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(22, 49, 39, 0.12);
    border-radius: 999px;
    padding: 11px 16px;
    color: #183f2f;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 900;
    cursor: pointer;
}

.google-auth-btn span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #4285f4, #34a853 48%, #fbbc05 72%, #ea4335);
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(154, 48, 48, 0.16);
}

.is-loading {
    position: relative;
    cursor: wait !important;
}

.is-loading::after {
    content: "";
    width: 0.82em;
    height: 0.82em;
    margin-left: 0.5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: veyroSpin 0.7s linear infinite;
}

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

table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

thead th {
    color: #61796b !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

tbody tr {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(24, 48, 36, 0.06);
}

tbody td:first-child {
    border-radius: 12px 0 0 12px;
}

tbody td:last-child {
    border-radius: 0 12px 12px 0;
}

.empty,
.state-card,
.status-card {
    border-radius: 18px !important;
}

.sidebar-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sidebar-footer-links a {
    min-width: 0;
}

.sidebar-footer-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.privacy-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin: 10px 0 14px;
    border: 1px solid rgba(24, 63, 47, 0.1);
    border-radius: 18px;
    background: rgba(238, 244, 239, 0.76);
}

.privacy-control label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: #183f2f;
}

.privacy-control input {
    width: 18px;
    height: 18px;
    accent-color: #183f2f;
}

.privacy-control small {
    max-width: 380px;
    color: #627a6d;
    line-height: 1.45;
}

.starter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.starter-step {
    padding: 12px;
    border: 1px solid rgba(24, 63, 47, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.66);
}

.starter-step strong {
    display: block;
    margin-bottom: 5px;
    color: #183f2f;
}

.starter-step span {
    display: block;
    color: #627a6d;
    font-size: 0.82rem;
    line-height: 1.45;
}

.starter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.starter-actions a,
.starter-actions button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    background: linear-gradient(135deg, #183f2f, #2f6b4f);
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.hero,
.hero-shell {
    box-shadow: 0 24px 60px rgba(24, 48, 36, 0.12) !important;
}

.panel-head,
.hero-top,
.top-bar,
.score-head,
.detail-head,
.modal-head {
    gap: 12px !important;
}

.panel h2,
.panel h3,
.hero h1,
.hero-shell h1,
.auth-card h2,
.signin-card h2,
.output-card h2,
.warning-card h2 {
    text-wrap: balance;
}

.hero p,
.hero-shell p,
.panel p,
.empty,
.empty-state,
.sidebar-footer {
    text-wrap: pretty;
}

input,
select,
textarea {
    border-color: rgba(24, 63, 47, 0.14) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(45, 102, 76, 0.32) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(45, 102, 76, 0.48) !important;
    box-shadow: 0 0 0 4px rgba(45, 102, 76, 0.12) !important;
}

button,
.nav-pill,
.nav-link,
.action-link,
.compare-btn,
.filter-clear,
.sort-btn,
.primary-action,
.secondary-action,
.auth-tab,
.pos-btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

button:hover,
.nav-pill:hover,
.nav-link:hover,
.action-link:hover,
.compare-btn:hover,
.filter-clear:hover,
.sort-btn:hover,
.primary-action:hover,
.secondary-action:hover,
.auth-tab:hover,
.pos-btn:hover {
    transform: translateY(-1px);
}

button:active,
.nav-pill:active,
.nav-link:active,
.action-link:active,
.compare-btn:active,
.filter-clear:active,
.sort-btn:active,
.primary-action:active,
.secondary-action:active,
.auth-tab:active,
.pos-btn:active {
    transform: translateY(0);
}

.badge-rating,
.rating-pill,
.pill,
.status,
.summary-pill,
.position-badge {
    border: 1px solid rgba(24, 63, 47, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.table-shell,
.table-wrap,
#ratingsTableContainer,
.compare-table,
.stat-table {
    border-radius: 24px;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

th {
    background: rgba(24, 63, 47, 0.055) !important;
}

td,
th {
    border-bottom-color: rgba(24, 63, 47, 0.08) !important;
}

tr:last-child td {
    border-bottom: 0 !important;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

button:disabled,
[aria-disabled="true"] {
    cursor: not-allowed !important;
    opacity: 0.68;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
}

.sidebar-toggle-lines {
    display: inline-grid;
    gap: 3px;
}

.sidebar-toggle-lines span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #183f2f;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    width: min(320px, 86vw);
    height: calc(var(--app-vh, 1vh) * 100);
    padding: 22px 20px 18px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid rgba(22, 49, 39, 0.1);
    box-shadow: 22px 0 54px rgba(24, 48, 36, 0.18);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.sidebar-open .app-sidebar {
    transform: translateX(0);
}

.sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(12, 26, 20, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-head {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}

.sidebar-brand {
    margin: 0;
    color: #183f2f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: 0;
}

.sidebar-subtitle {
    margin: 6px 0 0;
    color: #627a6d;
    font-size: 0.78rem;
    line-height: 1.4;
}

.sidebar-close {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(22, 49, 39, 0.1);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(22, 49, 39, 0.06);
    color: #183f2f;
    font-weight: 900;
    cursor: pointer;
    pointer-events: auto;
}

.sidebar-account {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    margin-bottom: 14px;
    padding: 7px 9px;
    border: 1px solid rgba(24, 63, 47, 0.09);
    border-radius: 14px;
    background: rgba(238, 244, 239, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sidebar-account-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: linear-gradient(135deg, #183f2f, #2f6b4f);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.03em;
}

.sidebar-account-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.sidebar-account-name {
    display: block;
    overflow: hidden;
    color: #183f2f;
    font-size: 0.79rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account-role {
    color: #627a6d;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    min-height: 0;
    margin-bottom: 14px;
    padding-bottom: 6px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 63, 47, 0.22) transparent;
}

.sidebar-link {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #183f2f;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    border: 1px solid transparent;
    overflow: hidden;
}

.sidebar-link span {
    color: #627a6d;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(45, 102, 76, 0.09);
    border-color: rgba(45, 102, 76, 0.1);
}

.sidebar-link::before {
    content: "";
    position: absolute;
    inset: 9px auto 9px 8px;
    width: 4px;
    border-radius: 999px;
    background: #d7a544;
    opacity: 0;
    transform: scaleY(0.55);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sidebar-link.active {
    padding-left: 20px;
    border-color: rgba(215, 165, 68, 0.36);
    background: linear-gradient(135deg, rgba(215, 165, 68, 0.16), rgba(45, 102, 76, 0.1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 20px rgba(24, 48, 36, 0.08);
}

.sidebar-link.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.sidebar-footer {
    flex: 0 0 auto;
    margin-top: auto;
    position: relative;
    padding: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.66rem;
    line-height: 1.2;
    border: 1px solid rgba(24, 63, 47, 0.16);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(24, 63, 47, 0.98), rgba(47, 107, 79, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 14px 30px rgba(24, 48, 36, 0.16);
}

.sidebar-footer-kicker {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 0 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.52rem;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-footer-kicker::after {
    content: "";
    flex: 1;
    height: 1px;
    border-radius: 999px;
    background: rgba(215, 165, 68, 0.42);
}

.sidebar-footer-links {
    display: grid;
    gap: 5px;
}

.sidebar-footer-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-footer-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 8px;
    background: rgba(215, 165, 68, 0.92);
    color: #183f2f;
}

.sidebar-footer-icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sidebar-footer-copy {
    display: flex;
    align-items: center;
    min-width: 0;
}

.sidebar-footer-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer-links a:hover,
.sidebar-footer-links a.active {
    border-color: rgba(215, 165, 68, 0.42);
    background: #fff;
    color: #183f2f;
    box-shadow: 0 10px 22px rgba(12, 26, 20, 0.18);
    transform: translateY(-1px);
}

.sidebar-footer-links a:hover .sidebar-footer-icon,
.sidebar-footer-links a.active .sidebar-footer-icon {
    background: linear-gradient(135deg, #183f2f, #2f6b4f);
    color: #fff;
}

.sidebar-footer-links a.active {
    border-color: rgba(215, 165, 68, 0.48);
}

.mobile-bottom-nav {
    display: none;
}

.app-toast-stack {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 10050;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.app-toast {
    display: grid;
    gap: 3px;
    padding: 13px 15px;
    border: 1px solid rgba(24, 63, 47, 0.12);
    border-radius: 18px;
    background: rgba(251, 253, 249, 0.96);
    color: #183f2f;
    box-shadow: 0 18px 48px rgba(12, 26, 20, 0.18);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.app-toast.error {
    border-color: rgba(169, 72, 69, 0.24);
    color: #8f2f2b;
    background: rgba(255, 247, 244, 0.97);
}

.app-toast small {
    color: #627a6d;
    font-size: 0.74rem;
    font-weight: 700;
}

body.match-tour-active {
    overflow: hidden;
}

body.match-tour-active .app-sidebar,
body.match-tour-active .sidebar-toggle,
body.match-tour-active .sidebar-scrim,
body.match-tour-active .mobile-bottom-nav {
    pointer-events: none;
}

body.match-tour-active.sidebar-open .app-sidebar,
body.match-tour-active.sidebar-open .sidebar-scrim,
body.match-tour-active.sidebar-open .sidebar-close {
    pointer-events: auto;
}

.match-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    padding: 22px;
    background: transparent;
    pointer-events: auto;
}

.match-tour-card {
    position: fixed;
    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 10002;
    transform: translateX(-50%);
    width: min(560px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 30px;
    padding: 22px;
    background: rgba(251, 253, 249, 0.96);
    box-shadow: 0 26px 74px rgba(0, 0, 0, 0.28);
    color: #183f2f;
    pointer-events: auto;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.match-tour-step {
    display: block;
    margin-bottom: 8px;
    color: #c28d25;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.match-tour-card h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.5rem, 5vw, 2.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.match-tour-card p {
    margin: 0 0 16px;
    color: #627a6d;
    line-height: 1.55;
}

.match-tour-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22, 49, 39, 0.09);
    margin-bottom: 16px;
}

.match-tour-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f6b4f, #d7a544);
}

.match-tour-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.match-tour-next,
.match-tour-exit {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 900;
    cursor: pointer;
}

.match-tour-next {
    color: #fff;
    background: linear-gradient(135deg, #183f2f, #2f6b4f);
}

.match-tour-exit {
    color: #183f2f;
    background: rgba(22, 49, 39, 0.08);
}

.match-tour-highlight {
    position: relative !important;
    z-index: 10001 !important;
    outline: 4px solid rgba(244, 222, 157, 0.96) !important;
    box-shadow: 0 0 0 10px rgba(215, 165, 68, 0.22), 0 24px 60px rgba(0, 0, 0, 0.25) !important;
    border-radius: 22px !important;
    pointer-events: none !important;
    scroll-margin: 110px !important;
}

@media (max-width: 700px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    .container,
    .page {
        padding-top: 46px;
        max-width: 100%;
    }

    .sidebar-toggle {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
        padding: 9px 12px;
        font-size: 0.72rem;
        min-height: 42px;
    }

    .app-sidebar {
        width: min(300px, 88vw);
        padding: 18px;
        max-width: calc(100vw - 16px);
    }

    .sidebar-link {
        min-height: 44px;
        padding: 11px 12px;
    }

    .match-tour-overlay {
        padding: 12px;
    }

    .match-tour-card {
        right: 12px;
        bottom: calc(92px + env(safe-area-inset-bottom));
        left: 12px;
        width: auto;
        transform: none;
        border-radius: 24px;
        padding: 18px;
        max-height: min(58vh, 500px);
    }

    .match-tour-actions,
    .match-tour-next,
    .match-tour-exit {
        width: 100%;
    }
}

@media (max-width: 820px) {
    * {
        -webkit-tap-highlight-color: rgba(24, 63, 47, 0.12);
    }

    body {
        min-height: calc(var(--app-vh, 1vh) * 100);
        padding-right: max(10px, env(safe-area-inset-right)) !important;
        padding-left: max(10px, env(safe-area-inset-left)) !important;
        padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        left: max(8px, env(safe-area-inset-left));
        z-index: 998;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 5px;
        padding: 8px;
        border: 1px solid rgba(22, 49, 39, 0.1);
        border-radius: 22px;
        background: rgba(251, 253, 249, 0.94);
        box-shadow: 0 18px 48px rgba(12, 26, 20, 0.18);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav[data-count="5"] {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .mobile-bottom-nav[data-count="6"] {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .app-toast-stack {
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(94px + env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        width: auto;
    }

    .privacy-control {
        align-items: flex-start;
        flex-direction: column;
    }

    .starter-grid {
        grid-template-columns: 1fr;
    }

    .mobile-bottom-link {
        display: grid;
        place-items: center;
        gap: 3px;
        width: auto !important;
        min-width: 0;
        min-height: 58px !important;
        padding: 7px 3px 6px;
        border: 1px solid transparent;
        border-radius: 16px;
        background: transparent;
        color: #183f2f;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        touch-action: manipulation;
        font: inherit;
    }

    .mobile-bottom-icon {
        display: grid !important;
        place-items: center;
        width: 25px;
        height: 25px;
        border-radius: 10px;
        background: rgba(24, 63, 47, 0.075);
        color: inherit;
    }

    .mobile-bottom-icon svg {
        width: 15px;
        height: 15px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2;
    }

    .mobile-bottom-link span {
        max-width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: 0.68rem;
        font-weight: 900;
        letter-spacing: -0.01em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-bottom-link small {
        max-width: 100%;
        overflow: hidden;
        color: #627a6d;
        font-size: 0.52rem;
        font-weight: 900;
        letter-spacing: 0.06em;
        line-height: 1;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .mobile-bottom-link.active {
        color: #fff;
        background: linear-gradient(135deg, #183f2f, #2f6b4f);
        border-color: rgba(215, 165, 68, 0.28);
        box-shadow: 0 10px 22px rgba(24, 63, 47, 0.18);
    }

    .mobile-bottom-link.active .mobile-bottom-icon {
        background: rgba(215, 165, 68, 0.95);
        color: #183f2f;
    }

    .mobile-bottom-link.active small {
        color: rgba(255, 255, 255, 0.72);
    }

    input,
    select,
    textarea {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    button,
    .nav-pill,
    .nav-link,
    .action-link,
    .compare-btn,
    .filter-clear,
    .sort-btn,
    .expand-btn,
    .modal-close,
    .primary-action,
    .secondary-action,
    .auth-tab,
    .pos-btn {
        min-height: 44px !important;
        touch-action: manipulation;
    }

    .hero,
    .hero-shell,
    .panel,
    .metric-card,
    .stat-card,
    .auth-card,
    .signin-card,
    .match-card,
    .category-card,
    .score-card,
    .team-code,
    .profile-card,
    .recruit-card,
    .video-card,
    .contact-card,
    .about-card {
        border-radius: 20px !important;
    }

    .hero,
    .hero-shell,
    .panel,
    .auth-card,
    .signin-card,
    .match-card,
    .category-card {
        padding: 14px !important;
    }

    .hero-top,
    .hero,
    .team-layout,
    .profile-layout,
    .admin-layout,
    .compare-grid,
    .report-grid,
    .detail-grid,
    .dashboard-grid,
    .vault-layout,
    .video-layout,
    .about-grid,
    .contact-grid,
    .home-grid,
    .auth-layout {
        grid-template-columns: 1fr !important;
    }

    .hero-meta,
    .meta,
    .metrics-grid,
    .stats-grid,
    .key-stats-grid,
    .filter-grid,
    .mini-chart-grid,
    .insight-grid,
    .scorecard-grid,
    .stat-grid,
    .form-grid,
    .onboarding-steps,
    .share-card-grid {
        grid-template-columns: 1fr !important;
    }

    .top-bar,
    .panel-head,
    .actions,
    .button-row,
    .auth-actions,
    .compare-actions,
    .onboarding-actions,
    .sort-controls,
    .match-tour-actions {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .position-selector {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        border-radius: 20px !important;
    }

    .pos-btn,
    .action-link,
    .nav-pill,
    .nav-link,
    .compare-btn,
    .filter-clear,
    .sort-btn,
    .primary-action,
    .secondary-action {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .table-shell,
    .table-wrap,
    #ratingsTableContainer,
    .compare-table,
    .stat-table {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 720px;
    }

    th,
    td {
        padding: 10px 8px !important;
        white-space: nowrap;
    }

    .table-actions {
        display: flex !important;
        gap: 8px !important;
    }

    .trend-row,
    .compare-row,
    .row-card,
    .stat-row {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .chart-wrap {
        min-height: 300px !important;
        padding: 10px !important;
    }

    canvas,
    #ratingChart,
    #expandedChart {
        max-width: 100% !important;
    }

    #ratingChart {
        height: 280px !important;
    }

    .fullscreen-modal {
        padding: 10px !important;
    }

    .modal-card {
        width: 100% !important;
        height: min(86vh, calc(var(--app-vh, 1vh) * 86)) !important;
        border-radius: 20px !important;
        padding: 12px !important;
    }

    .category-header,
    .detail-head,
    .modal-head,
    .score-head,
    .team-actions,
    .join-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .category-header p {
        white-space: normal !important;
    }

    .metrics-list {
        max-height: none !important;
    }

    .empty,
    .empty-state {
        min-height: 180px !important;
        padding: 18px !important;
    }
}

@media (max-width: 430px) {
    body {
        padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
    }

    h1 {
        font-size: clamp(1.65rem, 12vw, 2.35rem) !important;
        line-height: 1 !important;
    }

    h2 {
        line-height: 1.1 !important;
    }

    .position-selector {
        grid-template-columns: 1fr !important;
    }

    .metric-card strong,
    .stat-value,
    .rating-big {
        font-size: 1.35rem !important;
    }

    table {
        min-width: 640px;
        font-size: 0.78rem !important;
    }

    .mobile-bottom-nav {
        gap: 6px;
        border-radius: 22px;
    }

    .mobile-bottom-nav[data-count="5"] {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .mobile-bottom-nav[data-count="6"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body:has(.mobile-bottom-nav[data-count="6"]) {
        padding-bottom: calc(156px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-bottom-link {
        min-height: 50px !important;
        padding-right: 2px;
        padding-left: 2px;
    }

    .mobile-bottom-icon {
        width: 23px;
        height: 23px;
    }
}

/* Calm UI pass: reduce visual clutter while keeping all features visible. */
:root {
    --clean-line: rgba(24, 63, 47, 0.085);
    --clean-shadow: 0 12px 30px rgba(24, 48, 36, 0.075);
    --clean-soft: rgba(255, 255, 255, 0.72);
}

.hero,
.hero-shell,
.panel,
.filter-panel,
.share-panel,
.signin-card,
.auth-card,
.home-panel,
.tutorial-card,
.metric-card,
.meta-card,
.seo-card,
.category-card,
.score-card,
.stat-card,
.insight-card,
.match-card,
.profile-card,
.recruit-card,
.video-card,
.contact-card,
.about-card,
.warning-card,
.lock-card,
.status-card,
.output-card,
.team-code,
.onboarding-card,
.edit-panel,
.table-shell {
    border-color: var(--clean-line) !important;
    box-shadow: var(--clean-shadow) !important;
}

.panel,
.filter-panel,
.share-panel,
.rating-log,
.match-detail,
.edit-panel,
.table-shell,
.home-panel,
.auth-card,
.seo-section {
    border-radius: clamp(20px, 2.4vw, 28px) !important;
}

.hero,
.hero-shell {
    border-radius: clamp(24px, 3vw, 32px) !important;
}

.filter-panel,
.share-panel,
.privacy-control,
.starter-step,
.seo-info-card,
.faq-card,
.row-card,
.stat-chip,
.trend-row,
.compare-row {
    background: var(--clean-soft) !important;
}

.panel h2,
.rating-log h2,
.match-detail h3,
.edit-panel h3,
.home-panel h2 {
    letter-spacing: -0.025em !important;
}

.action-buttons,
.share-buttons,
.team-actions,
.onboarding-actions,
.starter-actions,
.compare-actions,
.sort-controls {
    gap: 8px !important;
}

.action-buttons,
.share-buttons {
    max-width: 100%;
}

.action-buttons button,
.action-buttons a,
.share-buttons button,
.share-buttons a,
.team-actions button,
.team-actions a,
.starter-actions a,
.starter-actions button,
.copy-btn,
.btn-primary,
.btn-secondary,
.btn-gmail,
.action-link,
.nav-pill,
.compare-btn,
.filter-clear,
.sort-btn {
    min-height: 38px !important;
    padding: 9px 13px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
}

.filter-grid {
    gap: 10px !important;
}

.filter-grid label,
.field-group label {
    font-size: 0.66rem !important;
    letter-spacing: 0.07em !important;
}

input,
select,
textarea {
    min-height: 40px !important;
    border-radius: 14px !important;
}

.table-shell,
.table-wrap,
#ratingsTableContainer {
    padding: 0 !important;
}

th,
td {
    padding: 10px 12px !important;
}

.badge-rating,
.rating-pill,
.pill,
.summary-pill,
.position-badge {
    box-shadow: none !important;
}

.sidebar-toggle,
.app-sidebar,
.mobile-bottom-nav {
    box-shadow: 0 10px 28px rgba(24, 48, 36, 0.12) !important;
}

body.signed-in-home .seo-landing {
    display: none !important;
}

body.clean-focus .seo-landing {
    display: none !important;
}

/* Site-wide polish layer: shared spacing, empty states, buttons, and account status. */
:root {
    --app-ink: #183f2f;
    --app-muted: #627a6d;
    --app-green: #2f6b4f;
    --app-gold: #d7a544;
    --app-danger: #9b3a34;
}

.hero,
.hero-shell,
.page > header,
.container > header {
    border-color: rgba(24, 63, 47, 0.08) !important;
}

.hero h1,
.hero-shell h1,
.page > header h1,
.container > header h1 {
    color: var(--app-ink) !important;
    letter-spacing: 0 !important;
}

.eyebrow,
.section-kicker,
.panel-kicker {
    border: 1px solid rgba(24, 63, 47, 0.08) !important;
    background: rgba(24, 63, 47, 0.075) !important;
    color: var(--app-ink) !important;
    font-weight: 950 !important;
}

button,
.btn,
.btn-primary,
.btn-secondary,
.btn-gmail,
.nav-pill,
.action-link,
.compare-btn,
.filter-clear,
.sort-btn,
.copy-btn,
.primary-action,
.secondary-action,
.mini-link {
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

.btn-primary,
.primary-action,
button[type="submit"],
#calcBtn,
#saveBtn,
#analyzeVideoBtn,
#contactSubmitBtn,
#comparePlayersBtn,
#saveComparisonAgeBtn {
    background: linear-gradient(135deg, #183f2f, #2f6b4f) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(24, 63, 47, 0.16) !important;
}

.btn-secondary,
.secondary-action,
.nav-pill.secondary,
.filter-clear,
.sort-btn,
.compare-btn:not(#comparePlayersBtn):not(#saveComparisonAgeBtn) {
    background: rgba(255, 255, 255, 0.78) !important;
    color: var(--app-ink) !important;
}

.sort-btn.active,
.auth-tab.active,
.nav-pill.active {
    border-color: rgba(215, 165, 68, 0.38) !important;
    background: rgba(215, 165, 68, 0.18) !important;
    color: var(--app-ink) !important;
}

button.is-loading,
.is-loading,
button[aria-busy="true"] {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

button.is-loading::after,
.is-loading::after,
button[aria-busy="true"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    margin: -7.5px 0 0 -7.5px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    color: #fff;
    animation: match-rating-spin 0.7s linear infinite;
}

.btn-secondary.is-loading::after,
.secondary-action.is-loading::after,
.nav-pill.is-loading::after,
.filter-clear.is-loading::after,
.sort-btn.is-loading::after,
.compare-btn.is-loading::after {
    color: var(--app-ink);
}

@keyframes match-rating-spin {
    to {
        transform: rotate(360deg);
    }
}

.empty,
.empty-state {
    display: grid !important;
    place-items: center !important;
    gap: 8px !important;
    min-height: 124px !important;
    padding: 20px !important;
    border: 1px dashed rgba(24, 63, 47, 0.18) !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 244, 239, 0.62)) !important;
    color: var(--app-muted) !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    text-align: center !important;
}

.empty::before,
.empty-state::before {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(215, 165, 68, 0.5);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(215, 165, 68, 0.8), rgba(215, 165, 68, 0.28)),
        linear-gradient(135deg, rgba(24, 63, 47, 0.12), transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.empty.locked,
.empty.error,
.empty-state.error {
    border-color: rgba(155, 58, 52, 0.24) !important;
    background: rgba(255, 247, 244, 0.78) !important;
    color: var(--app-danger) !important;
}

.empty strong,
.empty-state strong {
    color: var(--app-ink) !important;
    font-size: 0.94rem !important;
}

.empty span,
.empty-state span {
    color: inherit !important;
}

.site-account-chip {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 997;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(240px, calc(100vw - 96px));
    min-height: 38px;
    padding: 6px 10px 6px 7px;
    border: 1px solid rgba(24, 63, 47, 0.1);
    border-radius: 999px;
    background: rgba(251, 253, 249, 0.88);
    color: var(--app-ink);
    box-shadow: 0 10px 28px rgba(24, 48, 36, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
}

.site-account-avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #183f2f, #2f6b4f);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 950;
}

.site-account-copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.site-account-name {
    overflow: hidden;
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-account-role {
    overflow: hidden;
    color: var(--app-muted);
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-account-chip.signed-in {
    border-color: rgba(215, 165, 68, 0.35);
}

/* Shared page header system. */
.hero,
.hero-shell,
.page > header,
.container > header {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(24, 63, 47, 0.085) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 244, 239, 0.82)) !important;
}

.hero::before,
.hero-shell::before,
.page > header::before,
.container > header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #183f2f, #d7a544, #2f6b4f);
    opacity: 0.82;
    pointer-events: none;
}

.hero h1,
.hero-shell h1,
.page > header h1,
.container > header h1 {
    max-width: 840px;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    font-size: clamp(2rem, 5vw, 4.4rem) !important;
    line-height: 0.98 !important;
}

.hero p,
.hero-shell p,
.page > header p,
.container > header p {
    max-width: 760px;
}

.hero .eyebrow,
.hero-shell .eyebrow,
.page > header .eyebrow,
.container > header .eyebrow {
    min-height: 26px;
    padding: 6px 10px !important;
    border-radius: 999px !important;
}

.top-bar,
.hero-top,
.panel-head,
.score-head,
.detail-head,
.modal-head {
    align-items: center !important;
}

.hero-actions,
.top-actions,
.header-actions,
.top-bar,
.hero-top {
    gap: 10px !important;
}

@media (max-width: 820px) {
    .site-account-chip {
        display: none;
    }

    .hero,
    .hero-shell,
    .page > header,
    .container > header {
        border-radius: 22px !important;
    }

    .hero h1,
    .hero-shell h1,
    .page > header h1,
    .container > header h1 {
        font-size: clamp(1.9rem, 10vw, 3rem) !important;
        line-height: 1 !important;
    }

    .hero-actions,
    .top-actions,
    .header-actions,
    .top-bar,
    .hero-top {
        align-items: stretch !important;
    }
}

@media (min-width: 821px) {
    .action-buttons,
    .share-buttons {
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    .hero,
    .hero-shell,
    .panel,
    .filter-panel,
    .share-panel,
    .rating-log,
    .match-detail,
    .edit-panel,
    .table-shell {
        margin-top: 12px !important;
    }

    .action-buttons,
    .share-buttons,
    .team-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .action-buttons,
    .share-buttons,
    .team-actions {
        grid-template-columns: 1fr !important;
    }

    .home-panel,
    .seo-landing {
        display: none !important;
    }
}

/* Performance and mobile stability pass. */
.panel,
.filter-panel,
.share-panel,
.rating-log,
.match-detail,
.edit-panel,
.table-shell,
.home-panel,
.seo-section,
.about-card,
.contact-card,
.video-card,
.recruit-card,
.profile-card,
.match-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 420px;
}

.hero,
.hero-shell,
.home-shell,
.auth-card,
.mobile-bottom-nav,
.site-account-chip,
.panel,
.filter-panel,
.share-panel,
.signin-card,
.home-panel,
.tutorial-card,
.metric-card,
.meta-card,
.seo-card,
.category-card,
.score-card,
.stat-card,
.insight-card,
.match-card,
.profile-card,
.recruit-card,
.video-card,
.contact-card,
.about-card,
.warning-card,
.lock-card,
.status-card,
.output-card,
.team-code,
.onboarding-card,
.edit-panel,
.table-shell {
    transform: translateZ(0);
}

.app-sidebar {
    transform: translateX(-105%) translateZ(0);
}

.sidebar-open .app-sidebar {
    transform: translateX(0) translateZ(0);
}

@media (max-width: 820px), (pointer: coarse) {
    body {
        background-attachment: scroll !important;
    }

    .panel,
    .filter-panel,
    .share-panel,
    .signin-card,
    .auth-card,
    .home-panel,
    .tutorial-card,
    .metric-card,
    .meta-card,
    .seo-card,
    .category-card,
    .score-card,
    .stat-card,
    .insight-card,
    .match-card,
    .profile-card,
    .recruit-card,
    .video-card,
    .contact-card,
    .about-card,
    .warning-card,
    .lock-card,
    .status-card,
    .output-card,
    .team-code,
    .onboarding-card,
    .edit-panel,
    .table-shell,
    .mobile-bottom-nav,
    .site-account-chip {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .hero,
    .hero-shell,
    .panel,
    .filter-panel,
    .share-panel,
    .auth-card,
    .signin-card,
    .match-card,
    .category-card,
    .metric-card,
    .stat-card,
    .score-card {
        box-shadow: 0 10px 24px rgba(24, 48, 36, 0.08) !important;
    }

    .sidebar-toggle {
        min-height: 42px !important;
        padding: 9px 12px !important;
    }

    .app-sidebar {
        width: min(300px, 88vw);
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 380px) {
    .mobile-bottom-link small {
        display: none;
    }

    .mobile-bottom-link {
        min-height: 46px !important;
    }

    .mobile-bottom-nav[data-count="6"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 2026 product polish pass: shared surfaces, rhythm, and mobile legibility. */
:root {
    --app-bg-page: #f5f8f4;
    --app-bg-soft: #e9f1ea;
    --app-ink: #153429;
    --app-muted: #5d7568;
    --app-line: rgba(21, 52, 41, 0.11);
    --app-green: #183f2f;
    --app-green-2: #2f6b4f;
    --app-gold: #d7a544;
    --app-shadow-sm: 0 10px 26px rgba(24, 48, 36, 0.08);
    --app-shadow-md: 0 20px 52px rgba(24, 48, 36, 0.12);
}

body {
    color: var(--app-ink);
    background:
        linear-gradient(135deg, rgba(215, 165, 68, 0.12), transparent 32%),
        linear-gradient(225deg, rgba(47, 107, 79, 0.12), transparent 34%),
        linear-gradient(180deg, #fbfdfb 0%, var(--app-bg-page) 46%, var(--app-bg-soft) 100%) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(21, 52, 41, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 52, 41, 0.03) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
}

.container,
.page,
main {
    width: min(100%, 1460px);
}

.hero,
.hero-shell,
.page > header,
.container > header {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.74) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 246, 0.86)) !important;
    box-shadow: var(--app-shadow-md) !important;
}

.hero::before,
.hero-shell::before,
.page > header::before,
.container > header::before {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: -1;
    border: 1px solid rgba(21, 52, 41, 0.07);
    border-radius: inherit;
    pointer-events: none;
}

.panel,
.filter-panel,
.share-panel,
.signin-card,
.auth-card,
.home-panel,
.tutorial-card,
.metric-card,
.meta-card,
.seo-card,
.category-card,
.score-card,
.stat-card,
.insight-card,
.match-card,
.profile-card,
.recruit-card,
.video-card,
.contact-card,
.about-card,
.warning-card,
.lock-card,
.status-card,
.output-card,
.team-code,
.onboarding-card,
.edit-panel,
.table-shell {
    border: 1px solid var(--app-line) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 251, 249, 0.76)) !important;
    box-shadow: var(--app-shadow-sm) !important;
}

.panel-head,
.score-head,
.detail-head,
.category-header,
.top-bar,
.hero-top {
    border-bottom-color: rgba(21, 52, 41, 0.08) !important;
}

.panel h2,
.panel h3,
.score-card h2,
.category-header h2,
.stat-card strong,
.metric-name,
.sidebar-brand {
    color: var(--app-ink) !important;
}

.panel p,
.sub,
.muted,
.empty-message,
.category-header p,
.input-group span,
.sidebar-subtitle {
    color: var(--app-muted) !important;
}

input,
select,
textarea {
    border-color: rgba(21, 52, 41, 0.14) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--app-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(47, 107, 79, 0.28) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(215, 165, 68, 0.62) !important;
    box-shadow: 0 0 0 4px rgba(215, 165, 68, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

th {
    color: rgba(21, 52, 41, 0.72) !important;
    background: rgba(238, 244, 239, 0.78) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

td {
    border-bottom-color: rgba(21, 52, 41, 0.07) !important;
}

tr:hover td {
    background: rgba(215, 165, 68, 0.08) !important;
}

.app-sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 247, 0.95)) !important;
    border-right-color: rgba(21, 52, 41, 0.12) !important;
}

.sidebar-link {
    min-height: 46px;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-link:hover {
    transform: translateX(2px);
}

.sidebar-account {
    background:
        linear-gradient(135deg, rgba(238, 244, 239, 0.9), rgba(255, 255, 255, 0.8)) !important;
}

.mobile-bottom-nav {
    border-color: rgba(255, 255, 255, 0.72) !important;
    background: rgba(255, 255, 255, 0.94) !important;
}

.mobile-bottom-link {
    border-radius: 16px !important;
}

.home-panel,
.seo-landing {
    content-visibility: visible;
    contain-intrinsic-size: auto;
}

@media (max-width: 820px) {
    body::before {
        background-size: 42px 42px;
    }

    .container,
    .page,
    main {
        width: 100%;
    }

    .hero::before,
    .hero-shell::before,
    .page > header::before,
    .container > header::before {
        display: none;
    }
}

@media (max-width: 520px) {
    .home-panel {
        display: grid !important;
        margin-top: 10px !important;
        padding: 14px !important;
    }

    .home-panel .seo-stack {
        display: none !important;
    }

    .home-panel h2 {
        font-size: 1.35rem !important;
        line-height: 1.05 !important;
    }
}
