* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    background: #f5f5f5;
    color: #111111;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* =========================
   LAYOUT
========================= */

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-wrap {
    flex: 1;
    width: 100%;
}

/* =========================
   SITE HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.site-header-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-brand-wrap {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    color: #111;
    text-decoration: none;
}

.site-brand {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.site-brand-sub {
    margin-top: 5px;
    max-width: 230px;
    font-size: 12px;
    line-height: 1.25;
    color: #666;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.site-nav-link:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-1px);
}

.site-nav-dark {
    background: #111;
    color: #fff;
    border-color: #111;
}

.site-nav-dark:hover {
    background: #333;
    border-color: #333;
}

.site-user-text {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    padding: 0 4px;
}

.site-logout-form {
    margin: 0;
    display: inline-flex;
}

.site-nav-button {
    appearance: none;
}

.site-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.site-menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #111;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid #111;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-dark {
    background: #111;
    color: #fff;
}

.btn-dark:hover {
    background: #000;
}

.btn-light {
    background: #fff;
    color: #111;
    border-color: rgba(0, 0, 0, 0.12);
}

.btn-light:hover {
    background: #f0f0f0;
}

/* =========================
   GLOBAL PAGE / HERO
========================= */

.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.game-page-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 36px 24px 80px;
}

.game-page-section .hero-card {
    width: 100%;
    max-width: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: stretch;
}

.hero-card,
.side-card,
.mini-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
}

.hero-card {
    background: #fff;
    border-radius: 32px;
    padding: 42px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.06);
}

.hero-label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #222;
    font-size: 12px;
    font-weight: 700;
}

.hero-title {
    margin: 0 0 18px;
    font-size: 58px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -2px;
}

.hero-text {
    max-width: 720px;
    margin: 0 0 30px;
    font-size: 18px;
    line-height: 1.7;
    color: #555;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.meta-box {
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 24px;
    background: #fafafa;
}

.meta-number {
    margin-bottom: 6px;
    font-size: 24px;
    font-weight: 800;
}

.meta-label {
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

/* =========================
   SIDE / GENERIC CARDS
========================= */

.side-panel {
    display: grid;
    gap: 20px;
}

.side-card {
    min-height: 220px;
    padding: 30px;
    border-radius: 32px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.side-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.side-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
}

.mini-card {
    padding: 26px;
    border-radius: 28px;
    background: #fff;
}

.mini-card h4 {
    margin: 0 0 10px;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.mini-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

/* =========================
   FOOTER
========================= */

.footer-note {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
    font-size: 13px;
    color: #777;
}

/* =========================
   FORMS
========================= */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    background: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #111;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

input[type="checkbox"] {
    width: auto;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.field-help {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.form-page-header {
    margin-bottom: 28px;
}

.form-page-title {
    margin: 0;
    font-size: 36px;
    letter-spacing: -1px;
}

.form-alert {
    padding: 16px 18px;
    border-radius: 18px;
}

.form-alert-error {
    background: #fff4f4;
    border: 1px solid #f0caca;
    color: #7a1f1f;
}

.form-alert-details {
    margin-top: 10px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field-spaced {
    margin-top: 16px;
}

.form-field-spaced-small {
    margin-top: 10px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header-left {
    justify-content: flex-start;
}

.section-title {
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.seo-summary {
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.editor-btn {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.is-hidden,
.hidden {
    display: none !important;
}

#id_description {
    min-height: 220px;
    line-height: 1.6;
}

/* =========================
   TABLES
========================= */

table th,
table td {
    font-size: 14px;
    vertical-align: middle;
}

/* =========================
   IMAGES / UPLOADS
========================= */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.image-card {
    position: relative;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: #fff;
    cursor: grab;
}

.image-card.dragging {
    opacity: 0.45;
}

.image-card.drag-over {
    outline: 2px dashed #111;
    outline-offset: 2px;
}

.image-thumb-wrap {
    position: relative;
}

.image-thumb {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
}

.image-delete-btn,
.preview-delete-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-delete-btn:hover,
.preview-delete-btn:hover {
    background: #000;
}

.preview-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

/* =========================
   SHOE FORM / ADMIN
========================= */

.shoe-form {
    display: grid;
    gap: 28px;
}

.image-section {
    margin-bottom: 20px;
}

.release-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.referral-rows {
    display: grid;
    gap: 14px;
}

.referral-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 12px;
    align-items: end;
}

.referral-row-action,
.referral-actions {
    display: flex;
    align-items: end;
}

.referral-actions {
    margin-top: 14px;
    justify-content: flex-start;
}

.shoe-admin-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.shoe-admin-card {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shoe-admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06);
}

.shoe-admin-image-wrap {
    position: relative;
}

.shoe-admin-image-link {
    display: block;
}

.shoe-admin-image,
.shoe-admin-image-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
}

.shoe-admin-image {
    object-fit: cover;
}

.shoe-admin-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 13px;
}

.shoe-admin-delete-form {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.shoe-admin-delete-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.92);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}

.shoe-admin-delete-btn:hover {
    background: #000;
    transform: scale(1.04);
}

.shoe-admin-body {
    padding: 12px 12px 14px;
}

.shoe-admin-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
    word-break: break-word;
}

.shoe-admin-subline {
    min-height: 20px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
}

.shoe-admin-parent {
    min-height: 18px;
    font-size: 12px;
    color: #8a8a8a;
    line-height: 1.4;
    margin-bottom: 12px;
    word-break: break-word;
}

.shoe-admin-actions {
    margin-top: auto;
}

.shoe-admin-edit-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
}

.dashboard-empty-state {
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    color: #666;
    background: #fff;
}

/* =========================
   SHOE / JERSEY PICKERS
========================= */

.shoe-variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.shoe-variant-card {
    display: block;
    cursor: pointer;
}

.shoe-variant-card input {
    display: none;
}

.shoe-variant-inner {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.shoe-variant-card input:checked + .shoe-variant-inner {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.shoe-variant-media {
    width: 100%;
    height: 120px;
    border-radius: 14px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shoe-variant-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shoe-variant-thumb-empty {
    width: 100%;
    height: 100%;
    background: #f1f1f1;
}

.shoe-variant-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shoe-variant-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
}

.shoe-variant-meta {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.4;
    word-break: break-word;
}

.parent-jersey-picker {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.parent-jersey-card {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    text-align: left;
    cursor: pointer;
    transition: 0.18s ease;
    min-width: 0;
}

.parent-jersey-card:hover {
    border-color: rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.parent-jersey-card.is-selected {
    border-color: #000;
    box-shadow: inset 0 0 0 2px #000;
}

.parent-jersey-thumb-wrap {
    width: 100%;
}

.parent-jersey-thumb,
.parent-jersey-thumb-empty {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: block;
}

.parent-jersey-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.55);
}

.parent-jersey-meta {
    margin-top: 8px;
}

.parent-jersey-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parent-jersey-selected-label {
    display: none;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #000;
}

.parent-jersey-card.is-selected .parent-jersey-selected-label {
    display: block;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dashboard-page-title {
    margin: 0;
    font-size: 36px;
    letter-spacing: -1px;
}

.dashboard-search-form {
    margin-bottom: 24px;
}

.dashboard-search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-search-input {
    width: 100%;
    max-width: 320px;
}

/* =========================
   GAME ADMIN
========================= */

.game-main-card {
    padding: 28px;
    border-radius: 28px;
}

.game-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.game-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 18px;
    align-items: end;
}

.game-team-panel {
    padding: 22px;
    border-radius: 26px;
}

.game-jersey-grid,
.game-variant-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-image-choice {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.game-image-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.game-image-choice-box {
    border: 2px solid transparent;
    border-radius: 14px;
    background: #f7f7f7;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.game-image-choice:hover .game-image-choice-box {
    transform: translateY(-1px);
}

.game-image-choice.is-selected .game-image-choice-box {
    border-color: #111;
    background: #fff;
}

.game-jersey-image {
    width: 76px;
    height: 100px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.game-variant-image {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: #fff;
}

.game-table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

.game-stats-table {
    width: 100%;
    min-width: 1680px;
    border-collapse: separate;
    border-spacing: 0;
}

.game-stats-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

.game-stats-table td {
    padding: 10px 8px;
    vertical-align: top;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.game-player-row.is-played td {
    background: #efefef;
}

.game-player-main {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 180px;
}

.game-player-thumb,
.game-player-thumb-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    flex-shrink: 0;
}

.game-player-thumb {
    object-fit: cover;
}

.game-player-thumb-placeholder {
    background: #f0f0f0;
}

.game-inline-number {
    width: 74px;
    min-width: 74px;
    padding: 10px 12px !important;
    text-align: center;
}

.game-shoe-cell {
    min-width: 320px;
}

.game-photo-cell {
    min-width: 260px;
}

.game-file-input {
    display: none;
}

.game-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.game-file-btn:hover {
    background: #f3f3f3;
}

.game-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.game-photo-card,
.game-photo-preview-card {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f3;
}

.game-photo-preview-card {
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.game-photo-card img,
.game-photo-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-photo-delete-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 999px;
    background: #111;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.game-photo-delete-btn:hover {
    background: #000;
}

.game-checkbox-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

/* =========================
   FEED / POSTS
========================= */

.feed-layout {
    display: block;
    width: 100%;
}

.feed-main {
    width: 100%;
}

.feed-title {
    margin: 0 0 18px;
    font-size: 44px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.feed-intro-card,
.composer-card {
    margin-bottom: 24px;
}

.composer-text-wrap textarea {
    min-height: 140px;
    border-radius: 22px;
    resize: vertical;
    font-size: 17px;
    line-height: 1.7;
}

.composer-toolbar {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

.composer-search-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.composer-tag-search {
    width: 100%;
}

.composer-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.composer-search-result-item {
    width: 100%;
    border: none;
    background: #fff;
    text-align: left;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.composer-search-result-item:last-child {
    border-bottom: none;
}

.composer-search-result-item:hover {
    background: #f5f5f5;
}

.composer-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.composer-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: #f3f3f3;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 600;
}

.composer-selected-tag-remove {
    border: none;
    background: #111;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
}

.composer-media-preview {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.composer-media-preview.has-items {
    display: grid;
}

.composer-media-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f7f7f7;
    min-height: 220px;
    cursor: grab;
}

.composer-media-item.dragging {
    opacity: 0.45;
}

.composer-media-item.drag-over {
    outline: 2px dashed #111;
    outline-offset: 2px;
}

.composer-media-thumb {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #e9e9e9;
}

.composer-media-fallback {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 1px;
    color: #444;
}

.composer-media-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.92);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    z-index: 2;
}

.composer-media-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    z-index: 2;
}

.composer-media-meta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(17, 17, 17, 0.82);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.composer-help-text {
    font-size: 13px;
    color: #666;
}

.feed-post-list {
    display: grid;
    gap: 24px;
}

.post-card {
    overflow: hidden;
}

.post-card-link-wrap {
    display: block;
}

.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.post-author {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.post-date {
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #222;
    margin-bottom: 18px;
    word-break: break-word;
}

.post-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 18px;
}

.post-media-card {
    border-radius: 18px;
    overflow: hidden;
    background: #f6f6f6;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.post-media-image,
.post-media-video {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: #000;
}

.post-tag-list,
.post-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tag-row {
    margin-top: 16px;
    gap: 8px;
}

.post-tag-chip,
.post-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f3f3f3;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

.post-social-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.post-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.post-like-btn.is-liked {
    background: #111;
    color: #fff;
    border-color: #111;
}

.post-like-icon {
    font-size: 16px;
    line-height: 1;
}

.post-comment-link {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.post-comment-form {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.post-comment-input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 14px;
    background: #fff;
}

.post-comments-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.post-comment-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.post-comment-author {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.post-comment-date {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

.post-comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #222;
}

.post-feed-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.post-feed-card + .post-feed-card {
    margin-top: 18px;
}

.post-feed-author {
    font-size: 16px;
    font-weight: 800;
}

.post-feed-date {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.post-feed-content {
    margin-top: 14px;
    line-height: 1.65;
}

/* =========================
   SHOE PUBLIC
========================= */

.shoe-single-column {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.shoe-section {
    margin-top: 24px;
}

.shoe-hero-card {
    background: #fff;
    border-radius: 32px;
    padding: 36px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.shoe-brand-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.shoe-brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.shoe-main-image-wrap {
    margin-top: 24px;
    border-radius: 28px;
    background: linear-gradient(180deg, #f8f8f8 0%, #ededed 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px;
}

.shoe-main-image,
.shoe-main-image-empty {
    width: 100%;
    height: 520px;
}

.shoe-main-image {
    object-fit: contain;
    display: block;
}

.shoe-main-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 18px;
}

.shoe-thumb-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.shoe-thumb {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 16px;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px;
}

.position-usage-list,
.partner-link-grid,
.shoe-player-grid,
.match-photo-grid,
.shoe-family-grid {
    display: grid;
    gap: 16px;
}

.position-usage-list {
    grid-template-columns: 1fr;
}

.partner-link-grid,
.shoe-player-grid,
.match-photo-grid,
.shoe-family-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.position-usage-bar {
    height: 10px;
    border-radius: 999px;
    background: #efefef;
    overflow: hidden;
    margin-top: 10px;
}

.position-usage-fill {
    height: 100%;
    border-radius: 999px;
    background: #111;
}

.shoe-player-photo,
.shoe-family-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 18px;
}

.match-photo-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
}

.shoe-stats-wrap {
    overflow-x: auto;
}

.shoe-stats-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.shoe-stats-table th,
.shoe-stats-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
}

.stats-shoe-thumb,
.stats-game-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

/* =========================
   GAME PUBLIC
========================= */

.game-public-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.game-public-card {
    display: block;
    background: #fff;
    border-radius: 28px;
    padding: 24px 26px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-public-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.game-public-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.game-public-date {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.game-public-score-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
}

.game-public-team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-public-team-right {
    justify-content: flex-end;
    text-align: right;
}

.game-public-team-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px;
}

.game-public-team-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.game-public-score {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1px;
}

.game-public-bottom {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.game-detail-top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.game-detail-team-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.game-detail-team-head-right {
    justify-content: flex-end;
    text-align: right;
}

.game-detail-team-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.game-detail-score-box {
    text-align: center;
    min-width: 220px;
}

.game-detail-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 8px;
}

.game-detail-score {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}

.game-detail-winner {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    font-weight: 700;
}

.game-detail-jersey-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #555;
    font-size: 14px;
}

.game-detail-jersey-row-right {
    justify-content: flex-end;
}

.game-detail-jersey-thumb {
    width: 44px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
    background: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px;
}

.game-team-section-head {
    margin-bottom: 18px;
}

.game-team-section-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-detail-table th,
.game-detail-table td {
    vertical-align: middle;
}

.game-player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.game-player-photo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
    background: #f2f2f2;
}

.game-player-photo-empty {
    background: #ededed;
}

.game-player-name {
    font-weight: 700;
}

.game-shoe-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.game-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.game-usage-line {
    margin-top: 8px;
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

/* =========================
   PLAYER PUBLIC
========================= */

.player-hero-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

.player-hero-photo-wrap {
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8f8f8 0%, #ededed 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.player-hero-photo {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.player-hero-photo-empty {
    background: #efefef;
}

.player-latest-shoe-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: center;
}

.player-latest-shoe-image-link {
    display: block;
}

.player-latest-shoe-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8f8f8 0%, #ededed 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1400px) {
    .shoe-admin-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .parent-jersey-picker {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .shoe-admin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .parent-jersey-picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .game-top-grid {
        grid-template-columns: 1fr;
    }

    .game-page-section {
        padding: 24px 14px 60px;
    }

    .game-main-card {
        padding: 18px;
    }

    .game-team-panel {
        padding: 16px;
    }
}

@media (max-width: 900px) {
    .form-grid-2,
    .release-grid,
    .referral-row {
        grid-template-columns: 1fr;
    }

    .player-hero-grid,
    .player-latest-shoe-card,
    .game-detail-top-row,
    .game-analytics-grid {
        grid-template-columns: 1fr;
    }

    .game-detail-team-head,
    .game-detail-team-head-right,
    .game-detail-jersey-row,
    .game-detail-jersey-row-right,
    .game-public-team,
    .game-public-team-right {
        justify-content: center;
        text-align: center;
    }

    .game-public-score-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .player-hero-photo {
        height: 320px;
    }
}

@media (max-width: 800px) {
    .parent-jersey-picker {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shoe-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-top: 28px;
    }

    .hero-card,
    .side-card,
    .mini-card {
        padding: 24px;
        border-radius: 24px;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-text,
    .brands-subtitle {
        font-size: 16px;
    }

    .feed-title {
        font-size: 34px;
    }

    .composer-footer {
        align-items: flex-start;
    }

    .composer-toolbar {
        align-items: stretch;
    }

    .shoe-single-column {
        padding: 24px 14px 60px;
    }

    .shoe-hero-card,
    .mini-card {
        padding: 22px;
        border-radius: 24px;
    }

    .shoe-main-image,
    .shoe-main-image-empty {
        height: 320px;
    }
}

@media (max-width: 980px) {
    .site-header-inner {
        position: relative;
        padding: 12px 16px;
    }

    .site-brand {
        font-size: 28px;
    }

    .site-brand-sub {
        font-size: 11px;
        max-width: 190px;
    }

    .site-menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 16px;
        right: 16px;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 14px;
        border-radius: 24px;
        background: #fff;
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 18px 60px rgba(0,0,0,0.14);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav-link,
    .site-nav-button,
    .site-logout-form {
        width: 100%;
    }

    .site-user-text {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
        padding: 10px 12px;
        border-radius: 16px;
        background: #f6f6f6;
    }
}

@media (max-width: 520px) {
    .site-header-inner {
        padding: 10px 14px;
    }

    .site-brand {
        font-size: 26px;
    }

    .site-brand-sub {
        display: none;
    }

    .site-nav {
        grid-template-columns: 1fr;
        left: 12px;
        right: 12px;
        border-radius: 22px;
    }
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-meta {
        grid-template-columns: 1fr;
    }

    .post-media-grid {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

.post-owner-actions,
.post-comment-actions,
.post-edit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.post-inline-action {
    border: 0;
    background: #f2f2f2;
    color: #111;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.post-danger-action {
    background: #111;
    color: #fff;
}

.post-edit-form {
    margin-bottom: 18px;
}

.post-edit-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 18px;
    padding: 14px;
    resize: vertical;
    font: inherit;
}

.post-media-open {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.post-comment-actions {
    margin-top: 8px;
}

.post-comment-edit-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.feed-loader {
    height: 60px;
}

body.gallery-open {
    overflow: hidden;
}

.post-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.post-gallery-image {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 18px;
}

.post-gallery-close,
.post-gallery-nav {
    position: fixed;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 900;
}

.post-gallery-close {
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    font-size: 32px;
    line-height: 1;
}

.post-gallery-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 42px;
    line-height: 1;
}

.post-gallery-prev {
    left: 22px;
}

.post-gallery-next {
    right: 22px;
}

@media (max-width: 700px) {
    .post-header {
        flex-direction: column;
    }

    .post-owner-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .post-comment-edit-form {
        flex-direction: column;
    }

    .post-gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 34px;
    }
}