/* Shared stylesheet for the TTF card tracker. */  

:root {
    --bg: #f2fbf0;
    --paper: rgba(224, 224, 224, 1);
    --dark-grey: #2d2d2d;
    --paper-strong: #f6fff2;
    --ink: #42473e;
    --muted: #6f746b;
    --line: rgba(66, 71, 62, 0.12);
    --accent: #ff1e1e;
    --accent-soft: #e3ffd0;
    --green: #62c01e;
    --teal: #378400;
    --gold: #378400;
    --good: #378400;
    --link: #212121;
    --link-hover: #378400;
    --button-bg: rgba(247, 255, 246, 0.12);
    --button-border: rgba(255, 255, 255, 0.16);
    --button-primary-bg: #378400;
    --button-primary-color: #42473e;
    --chip-bg: rgba(107, 255, 0, 0.08);
    --chip-border: rgba(107, 255, 0, 0.14);
    --chip-color: var(--good);
    --status-good-bg: rgba(107, 255, 0, 0.12);
    --status-good-border: rgba(107, 255, 0, 0.2);
    --status-alert-bg: rgba(187, 77, 32, 0.1);
    --status-alert-border: rgba(187, 77, 32, 0.18);
    --shadow: 0 24px 70px rgba(66, 71, 62, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --font-body: "D-DIN Condensed", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-heading: "D-DIN Condensed", "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-extra: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

a { text-decoration: none; }

html {
    background: #080a08;
}

body {
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.hero-title,
.section-title,
.public-storefront-listing-head h1,
.public-card-copy h1,
.public-card-panel > h1 {
    font-family: var(--font-heading);
}

.hero-copy,
.panel-copy,
.public-card-copy p {
    font-family: var(--font-extra);
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px clamp(12px, 2vw, 26px);
    border-bottom: 1px solid rgba(107, 255, 0, 0.2);
    background: rgba(66, 71, 62, 0.95);
    box-shadow: 0 14px 38px rgba(32, 38, 31, 0.18);
    backdrop-filter: blur(14px);
}

.site-nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(107, 255, 0, 0.24);
}

.site-nav-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid rgba(246, 255, 242, 0.16);
    border-radius: 999px;
    color: #f6fff2;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
    border-color: rgba(107, 255, 0, 0.55);
    background: rgba(107, 255, 0, 0.16);
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.site-nav-link.is-active {
    border-color: transparent;
    background: var(--green);
    color: var(--ink);
}

.site-nav-add-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-left: auto;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink) !important;
    font-weight: 1000;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    text-decoration-color: transparent !important;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(107, 255, 0, 0.2);
    transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.site-nav-add-card:hover,
.site-nav-add-card:focus-visible,
.site-nav-add-card.is-active {
    background: #f6fff2;
    color: var(--ink);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(107, 255, 0, 0.26);
    outline: none;
}


.marketplace-cleanup-banner {
    position: relative;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px clamp(12px, 2vw, 26px);
    border-bottom: 1px solid rgba(187, 77, 32, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 246, 232, 0.98), rgba(227, 255, 208, 0.96));
    color: var(--ink);
    box-shadow: 0 12px 28px rgba(66, 71, 62, 0.12);
}

.marketplace-cleanup-banner-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 1000;
}

.marketplace-cleanup-banner-main strong {
    color: #bb4d20;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.marketplace-cleanup-breakdown {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.marketplace-cleanup-breakdown span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(187, 77, 32, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 900;
}

.marketplace-cleanup-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-left: auto;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff !important;
    font-weight: 1000;
    white-space: nowrap;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.marketplace-cleanup-action:hover,
.marketplace-cleanup-action:focus-visible {
    background: var(--green);
    color: var(--ink) !important;
    transform: translateY(-1px);
    outline: none;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    flex-wrap: wrap;
}

.hero-top > :first-child {
    min-width: 0;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 4.1rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.section-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: var(--radius-lg);
    padding: 20px;
    color: #fff;
    background: #42473e;
    box-shadow: var(--shadow);
}

.section-hero .hero-copy {
    max-width: 720px;
    margin: 8px 0 0;
    color: rgba(246, 255, 242, 0.76);
    font-size: 1.05rem;
    line-height: 1.35;
}

.section-hero .eyebrow {
    margin-bottom: 8px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.button-row,
.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-row {
    align-items: flex-start;
}

.hero-actions {
    align-items: center;
}

.button-link,
.action-link,
.mini-button,
.jump-link,
button.ui-button,
body.card-form-page button,
body.import-page button,
body.margin-page button,
body.team-page button,
.inline-order-form button,
.inline-image-form button,
.marketplace-reminder-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--button-border);
    background: var(--button-bg);
    color: var(--good);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    text-decoration-color: transparent;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.button-link,
button.ui-button,
body.card-form-page button,
body.import-page button,
body.margin-page button,
body.team-page button {
    padding: 12px 16px;
}

body.card-form-page button:not(.mini-button),
body.import-page button:not(.mini-button),
body.margin-page button:not(.mini-button),
body.team-page button:not(.mini-button) {
    background: var(--teal);
    color: var(--ink);
    border-color: transparent;
}

.button-link.primary,
button.primary,
button.ui-button.primary {
    background: var(--button-primary-bg);
    color: var(--button-primary-color);
    border-color: transparent;
}

.action-link,
.mini-button,
.jump-link,
.inline-order-form button,
.inline-image-form button,
.marketplace-reminder-form button {
    padding: 8px 12px;
    background: rgba(107, 255, 0, 0.12);
    color: var(--good);
    border-color: rgba(107, 255, 0, 0.14);
}

.jump-link {
    padding: 10px 14px;
    font-size: 0.92rem;
}

.action-link:hover,
.action-link:focus-visible,
.mini-button:hover,
.mini-button:focus-visible,
.jump-link:hover,
.jump-link:focus-visible,
.inline-order-form button:hover,
.inline-order-form button:focus-visible,
.inline-image-form button:hover,
.inline-image-form button:focus-visible {
    background: rgba(107, 255, 0, 0.2);
    color: var(--ink);
    text-decoration: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--status-good-border);
    background: var(--status-good-bg);
    color: var(--good);
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.good {
    background: rgba(107, 255, 0, 0.18);
    border-color: rgba(107, 255, 0, 0.28);
    color: var(--ink);
}

.status-pill.alert,
.button-warning,
.marketplace-reminder-form button {
    background: var(--status-alert-bg);
    border-color: var(--status-alert-border);
    color: var(--accent);
}

.button-warning:hover,
.button-warning:focus-visible,
.marketplace-reminder-form button:hover,
.marketplace-reminder-form button:focus-visible {
    background: rgba(187, 77, 32, 0.17);
    border-color: rgba(187, 77, 32, 0.3);
}

.section-count-bar {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 18px;
    padding: 10px 14px;
    border: 1px solid rgba(107, 255, 0, 0.24);
    border-radius: 999px;
    background: rgba(107, 255, 0, 0.12);
    color: var(--dark-grey);
    font-weight: 900;
    width: fit-content;
}

.section-count-value {
    font-size: 1.25rem;
    line-height: 1;
    text-shadow: 0 0 18px rgba(107, 255, 0, 0.22);
}

.chips,
.chip-list,
.formation-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip,
.formation-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    color: var(--chip-color);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
}

.formation-tab.active {
    background: var(--teal);
    color: var(--ink);
}

.soft-tile,
.marketplace-card,
.summary-card,
.player-chip,
.owner-summary-row {
    border-radius: 16px;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
}

.mt-16 {
    margin-top: 16px;
}

.mt-18 {
    margin-top: 18px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-22 {
    margin-top: 22px;
}

.mb-18 {
    margin-bottom: 18px;
}

.toolbar-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.rule-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 24px 0;
}

.image-preview-thumb {
    margin-top: 10px;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(66, 71, 62, 0.12);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(66, 71, 62, 0.08);
}

body.card-form-page .edit-card-thumbnail-panel {
    display: block;
    padding: 14px;
}

body.card-form-page .edit-card-thumbnail-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    border: 1px solid rgba(66, 71, 62, 0.12);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 28px rgba(66, 71, 62, 0.12);
}

.is-good {
    color: var(--good);
}

.is-alert {
    color: var(--accent);
}


/* index.php */

        body.dashboard-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background: #efefef;
            min-height: 100vh;
        }

        body.dashboard-page a {
            color: #519a1c;
            text-decoration-color: rgba(107, 255, 0, 0.34);
            text-underline-offset: 0.14em;
            transition: color 140ms ease, text-decoration-color 140ms ease;
        }

        body.dashboard-page a:hover,
        body.dashboard-page a:focus-visible {
            color: var(--link-hover);
            text-decoration-color: rgba(82, 192, 3, 0.62);
        }

        body.dashboard-page .site-nav-link {
            color: #f6fff2;
            text-decoration: none;
        }

        body.dashboard-page .site-nav-link:hover,
        body.dashboard-page .site-nav-link:focus-visible {
            color: #ffffff;
            text-decoration: none;
        }

        body.dashboard-page .site-nav-link.is-active {
            color: var(--ink);
        }

        body.dashboard-page .site-nav-logo {
            text-decoration: none;
        }

        body.dashboard-page .page {
            margin: 10px;
        }

        body.dashboard-page .hero:not(.section-hero) {
            position: relative;
            overflow: hidden;
            border-radius: var(--radius-lg);
            padding: 20px;
            color: #fff;
            background: #42473e;
        }

        body.dashboard-page .hero:not(.section-hero) .eyebrow {
            margin-bottom: 8px;
            color: var(--green);
            font-size: 0.78rem;
            font-weight: 900;
            letter-spacing: 0.16em;
            text-transform: uppercase;
        }

        body.dashboard-page .jump-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 18px;
            align-items: center;
            padding: 0 20px;
            
            a { background: #666; color: #fff; }
            a:hover { background: #000;  }
        }

        body.dashboard-page .jump-nav .button-link {
            margin-left: auto;
        }

        body.dashboard-page .search-toolbar {
            display: grid;
            grid-template-columns: minmax(280px, 520px) 1fr;
            gap: 14px;
            align-items: end;
            padding: 10px 20px 5px 20px;
        }

        body.dashboard-page .search-field input {
            width: 100%;
            padding: 14px 16px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: #fff;
            color: #000;
            font: inherit;
        }

        body.dashboard-page .search-field input:focus {
            outline: 2px solid rgba(255, 248, 240, 0.28);
            outline-offset: 2px;
        }

        body.dashboard-page .search-copy {
            font-size: 0.94rem;
            line-height: 1.5;
        }

        body.dashboard-page .goal-strip {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin: 20px;
        }

        body.dashboard-page .goal-card {
            padding: 18px;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(255, 255, 255, 0.14);
            color: #232323;
            background: #cacaca;
        }

        body.dashboard-page .goal-card-header {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: baseline;
            margin-bottom: 12px;
        }

        body.dashboard-page .goal-label {
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        body.dashboard-page .goal-value {
            font-size: clamp(1.35rem, 1.5vw, 1.5rem);
            font-weight: 900;
        }

        body.dashboard-page .goal-bar {
            height: 12px;
            border-radius: 999px;
            overflow: hidden;
            background: rgba(10, 35, 20, 0.28);
        }

        body.dashboard-page .goal-fill {
            height: 100%;
            width: var(--goal-progress);
            border-radius: inherit;
            background-color: #ffffff;
        }

        body.dashboard-page .goal-meta {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 10px;
            font-size: 0.9rem;
        }

        body.dashboard-page .hero-grid,
        body.dashboard-page .dashboard-grid,
        body.dashboard-page .orders-grid {
            display: grid;
            gap: 18px;
        }

        body.dashboard-page .hero-grid {
            grid-template-columns: 1fr;
            align-items: stretch;
        }

        body.dashboard-page .snapshot-stat,
        body.dashboard-page .owner-stat {
            grid-column: 1 / -1;
        }

        body.dashboard-page .dashboard-grid {
            grid-template-columns: 1fr;
            margin-top: 22px;
            align-items: start;
        }

        body.dashboard-page .orders-grid {
            grid-template-columns: 1fr;
            margin-top: 22px;
        }

        body.dashboard-page .panel,
        body.dashboard-page .stat {
            border-radius: var(--radius-lg);
            backdrop-filter: blur(12px);
        }

        body.dashboard-page .stat {
            position: relative;
            overflow: hidden;
            padding: 20px;
        }

        body.dashboard-page .brand-logo-wrap {
            width: 74px;
            aspect-ratio: 1;
            border-radius: 22px;
            display: grid;
            place-items: center;
            padding: 5px;
            background-color: #6bff00;
            box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
        }

        body.dashboard-page .brand-logo {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            filter: drop-shadow(0 18px 26px rgba(14, 40, 21, 0.22));
        }

        body.dashboard-page .stat-label {
            font-size: 0.82rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 241, 225, 0.65);
            margin-bottom: 12px;
        }

        body.dashboard-page .stat-value {
            font-size: clamp(1.7rem, 3vw, 2.35rem);
            font-weight: 700;
            margin-bottom: 8px;
        }

        body.dashboard-page .stat-note {
            color: rgba(255, 241, 225, 0.7);
            line-height: 1.5;
            font-size: 0.95rem;
        }

        body.dashboard-page .snapshot-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .snapshot-card-head > div:first-child {
            display: flex;
            align-items: center;
            gap: 14px;
            min-width: 0;
        }

        body.dashboard-page .snapshot-title {
            color: #fff8f0;
            font-size: clamp(1.85rem, 3.4vw, 3.15rem);
            font-weight: 900;
            line-height: 0.92;
            letter-spacing: 0;
        }

        body.dashboard-page .snapshot-badge {
            padding: 10px 14px;
            border-radius: 999px;
            background: #6bff00;
            color: #42473e;
            font-size: 0.86rem;
            font-weight: 900;
            white-space: nowrap;
            box-shadow: 0 12px 26px rgba(107, 255, 0, 0.22);
        }

        body.dashboard-page .snapshot-hero {
            display: grid;
            grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
            gap: 12px;
            margin-bottom: 14px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .snapshot-hero div {
            padding: 10px;
            border-radius: 5px;
            background:
                radial-gradient(circle at top right, rgba(107, 255, 0, 0.22), transparent 42%),
                rgba(255, 255, 255, 0.08);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        body.dashboard-page .snapshot-hero div:first-child {
            background:
                radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.48), transparent 24%),
                linear-gradient(135deg, #6bff00, #b7ff7a);
            color: #42473e;
            border-color: transparent;
        }

        body.dashboard-page .snapshot-hero div:nth-child(2) {
            background:
                radial-gradient(circle at 85% 14%, rgba(255, 255, 255, 0.16), transparent 34%),
                rgba(255, 255, 255, 0.1);
        }

        body.dashboard-page .snapshot-hero span {
            display: block;
            color: rgba(255, 241, 225, 0.62);
            font-size: 0.68rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        body.dashboard-page .snapshot-hero div:first-child span {
            color: rgba(66, 71, 62, 0.72);
        }

        body.dashboard-page .snapshot-hero strong {
            display: block;
            color: #fff8f0;
            font-size: clamp(1rem, 2vw, 2rem);
            line-height: 0.9;
            padding-top: 5px;
        }

        body.dashboard-page .snapshot-hero div:first-child strong {
            color: #42473e;
        }

        body.dashboard-page .snapshot-flow {
            display: flex;
            height: 20px;
            overflow: hidden;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.1);
            margin-bottom: 10px;
            padding: 5px;
            gap: 5px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .snapshot-flow-segment {
            min-width: 3px;
            border-radius: 2px;
        }

        body.dashboard-page .snapshot-flow-segment.listed {
            background: #6bff00;
        }

        body.dashboard-page .snapshot-flow-segment.sold {
            background: #f2ffe8;
        }

        body.dashboard-page .snapshot-flow-segment.pc {
            background: rgba(255, 255, 255, 0.52);
        }

        body.dashboard-page .snapshot-flow-segment.waiting {
            background: rgba(255, 107, 64, 0.9);
        }

        body.dashboard-page .stat-matrix {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 10px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .stat-metric {
            min-width: 0;
            padding: 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        body.dashboard-page .stat-metric-label {
            font-size: 1rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 241, 225, 0.58);
            margin-bottom: 4px;
        }

        body.dashboard-page .snapshot-secondary {
            padding-top: 10px;
            display: grid;
            grid-template-columns: repeat(9, minmax(0, 1fr));
            gap: 10px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .snapshot-secondary-item {
            min-width: 0;
            padding: 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.07);
        }

        body.dashboard-page .snapshot-secondary-label {
            font-size: 1rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 241, 225, 0.58);
            margin-bottom: 4px;
        }

        body.dashboard-page .snapshot-secondary-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: rgba(255, 248, 240, 0.9);
        }

        body.dashboard-page .stat-metric-value {
            font-size: 1.5rem;
            font-weight: 900;
            color: #fff8f0;
            line-height: 1;
        }

        body.dashboard-page .owner-summary-list {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
            position: relative;
            z-index: 1;
        }

        body.dashboard-page .owner-summary-row {
            display: grid;
            gap: 10px;
            align-items: start;
            padding: 12px;
            border-radius: 20px;
            max-width: none;
            min-width: 0;
        }

        body.dashboard-page .owner-summary-head {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            align-items: flex-start;
        }

        body.dashboard-page .owner-summary-person {
            display: flex;
            align-items: center;
            gap: 9px;
            min-width: 0;
        }

        body.dashboard-page .owner-summary-photo {
            width: 40px;
            height: 40px;
            flex: 0 0 auto;
            overflow: hidden;
            display: grid;
            place-items: center;
            border-radius: 100px;
            box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
        }

        body.dashboard-page .owner-summary-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        body.dashboard-page .owner-summary-photo span {
            color: #42473e;
            font-size: 1rem;
            font-weight: 900;
        }

        body.dashboard-page .owner-summary-name {
            font-size: clamp(1rem, 1.5vw, 2rem);
            font-weight: 900;
            color: #fff8f0;
            line-height: 1;
            letter-spacing: 0;
        }

        body.dashboard-page .owner-summary-titleline {
            display: flex;
            align-items: center;
            gap: 7px;
            flex-wrap: wrap;
        }

        body.dashboard-page .owner-summary-box-badge {
            display: inline-flex;
            align-items: center;
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 2;
            min-height: 22px;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(66, 71, 62, 0.82);
            border: 1px solid rgba(107, 255, 0, 0.42);
            color: #6bff00;
            font-size: 0.66rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            line-height: 1;
            text-transform: uppercase;
        }

        body.dashboard-page .owner-summary-meta {
            display: block;
            margin-top: 2px;
            color: rgba(255, 241, 225, 0.72);
            font-size: 1rem;
            line-height: 1.25em;
        }

        body.dashboard-page .owner-summary-spend {
            text-align: right;
            display: grid;
            gap: 2px;
            flex: 0 0 auto;
        }

        body.dashboard-page .owner-summary-spend span,
        body.dashboard-page .owner-summary-kpis span {
            color: rgba(255, 241, 225, 0.62);
            font-size: 0.62rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        body.dashboard-page .owner-summary-spend strong {
            color: #6bff00;
            font-size: 1.5rem;
            line-height: 1;
            letter-spacing: 0;
        }

        body.dashboard-page .owner-summary-spend strong.is-good {
            color: #6bff00 !important;
        }

        body.dashboard-page .owner-summary-spend strong.is-alert {
            color: var(--accent) !important;
        }

        body.dashboard-page .owner-summary-bar {
            position: relative;
            height: 18px;
            overflow: hidden;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.1);
        }

        body.dashboard-page .owner-summary-track {
            position: absolute;
            inset: 4px;
            display: flex;
            gap: 3px;
            pointer-events: none;
        }

        body.dashboard-page .owner-summary-segment {
            min-width: 3px;
            border-radius: 2px;
        }

        body.dashboard-page .owner-summary-segment.listed {
            background: #6bff00;
        }

        body.dashboard-page .owner-summary-segment.sold {
            background: #f2ffe8;
        }

        body.dashboard-page .owner-summary-segment.pc {
            background: rgba(255, 255, 255, 0.52);
        }

        body.dashboard-page .owner-summary-segment.waiting {
            background: rgba(255, 107, 64, 0.9);
        }
        
        body.dashboard-page .owner-summary-segment.boxes {
            background: rgba(219, 255, 64, 0.9);
        }
        
        body.dashboard-page .owner-summary-kpis {
            display: flex;
            flex-wrap: wrap;
            gap: 12px 18px;
            padding: 5px;
        }

        body.dashboard-page .owner-summary-kpis > div {
            flex: 1 1 72px;
            min-width: 0;
        }

        body.dashboard-page .owner-summary-kpis strong {
            color: #fff8f0;
            font-size: 1.5rem;
            font-weight: 900;
            line-height: 1;
        }

        body.dashboard-page .owner-summary-kpis strong.is-good {
            color: #6bff00;
        }

        body.dashboard-page .owner-summary-kpis strong.is-alert {
            color: var(--accent);
        }

        body.dashboard-page .owner-summary-statuses {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            justify-content: flex-start;
            align-items: center;
            z-index: 1;
            text-transform: uppercase;
            font-family: var(--font-heading);
        }

        body.dashboard-page .owner-summary-statuses span {
            padding: 4px 10px;
            border-radius: 3px;
            background: rgba(0,0,0,0.5);
            color: rgba(255, 248, 240, 0.92);
            font-size: 0.7rem;
            font-weight: 800;
            color: #000;
            
            &.listed { background-color: #6bff00;  }
            &.sold { background-color: #f2ffe8;  }
            &.pc { background-color: rgba(255, 255, 255, 0.52);  }
            &.waiting { background-color: rgba(255, 107, 64, 0.9); color: #fff;  }
            &.boxes { background-color: rgba(219, 255, 64, 0.9); }
        }

        body.dashboard-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            box-shadow: var(--shadow);
            padding: 22px;
        }

        body.dashboard-page .panel h2,
        body.dashboard-page .panel h3 {
            margin: 0 0 12px;
            font-family: var(--font-extra);
            font-weight: 700;
        }

        body.dashboard-page .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 14px;
            margin-bottom: 18px;
        }

        body.dashboard-page .panel-title-copy {
            color: var(--muted);
            margin: 6px 0 0;
            line-height: 1.5;
        }

        body.dashboard-page .formula {
            background: linear-gradient(135deg, rgba(198, 140, 28, 0.13), rgba(187, 77, 32, 0.1));
            border-radius: var(--radius-md);
            padding: 16px 18px;
            border: 1px solid rgba(198, 140, 28, 0.16);
            line-height: 1.6;
        }

        body.dashboard-page .formula code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            font-size: 0.95rem;
            background: rgba(31, 27, 22, 0.06);
            padding: 2px 6px;
            border-radius: 8px;
        }

        body.dashboard-page .footer-note code,
        body.dashboard-page .table-note code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            font-size: 0.95em;
            background: rgba(255, 248, 240, 0.12);
            padding: 2px 6px;
            border-radius: 8px;
        }

        body.dashboard-page .chips {
            margin-top: 16px;
        }

        body.dashboard-page .meta-list {
            display: grid;
            gap: 12px;
            margin-top: 18px;
        }

        body.dashboard-page .meta-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--line);
        }

        body.dashboard-page .meta-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        body.dashboard-page .meta-label {
            color: var(--muted);
        }

        body.dashboard-page .meta-value {
            text-align: right;
            font-weight: 600;
        }

        body.dashboard-page table {
            width: 100%;
            border-collapse: collapse;
        }

        body.dashboard-page thead th {
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--muted);
            padding: 0 0 12px;
            text-align: left;
            border-bottom: 1px solid var(--line);
        }

        body.dashboard-page tbody td {
            padding: 14px 0;
            border-bottom: 1px solid var(--line);
            vertical-align: top;
        }

        body.dashboard-page tbody tr:last-child td {
            border-bottom: 0;
        }

        body.dashboard-page tfoot td {
            padding: 16px 0 0;
            border-top: 2px solid rgba(107, 255, 0, 0.18);
            font-weight: 800;
            vertical-align: top;
        }

        body.dashboard-page .table-total-label {
            color: var(--ink);
            font-size: 1rem;
        }

        body.dashboard-page .table-total-value {
            font-size: 1.08rem;
        }

        body.dashboard-page .card-row {
            scroll-margin-top: 24px;
        }

        body.dashboard-page .card-cell {
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        body.dashboard-page .card-thumb {
            width: 72px;
            height: 72px;
            object-fit: cover;
            border-radius: 14px;
            border: 1px solid rgba(66, 71, 62, 0.12);
            background: rgba(255, 255, 255, 0.82);
            flex: 0 0 auto;
            box-shadow: 0 10px 24px rgba(66, 71, 62, 0.08);
        }

        body.dashboard-page .listing-card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
            gap: 16px;
        }

        body.dashboard-page .listing-card {
            position: relative;
            display: grid;
            align-content: start;
            gap: 10px;
            padding-bottom: 12px;
            border-radius: 22px;
            background: rgba(255, 255, 255, 0.78);
            border: 1px solid rgba(66, 71, 62, 0.12);
            box-shadow: 0 16px 38px rgba(66, 71, 62, 0.11);
            overflow: hidden;
            transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
        }

        body.dashboard-page .listing-card:hover,
        body.dashboard-page .listing-card:focus-within {
            transform: translateY(-3px);
            border-color: rgba(107, 255, 0, 0.46);
            box-shadow: 0 24px 54px rgba(66, 71, 62, 0.16);
        }

        body.dashboard-page .listing-card-main {
            display: grid;
            gap: 10px;
            color: inherit;
            text-decoration: none;
        }

        body.dashboard-page .listing-card-image-wrap {
            position: relative;
            overflow: hidden;
            aspect-ratio: 3 / 4;
            display: grid;
            place-items: center;
            border-radius: 20px;
            margin: 10px 10px 0;
            background:
                radial-gradient(circle at 76% 14%, rgba(107, 255, 0, 0.22), transparent 34%),
                rgba(255, 255, 255, 0.78);
            border: 1px solid rgba(66, 71, 62, 0.12);
        }

        body.dashboard-page .listing-card-image {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: transform 180ms ease, filter 180ms ease;
        }

        body.dashboard-page .listing-card:hover .listing-card-image,
        body.dashboard-page .listing-card:focus-within .listing-card-image {
            transform: scale(1.025);
            filter: saturate(1.06) contrast(1.03);
        }

        body.dashboard-page .listing-card-placeholder {
            width: 100%;
            height: 100%;
            display: grid;
            place-items: center;
            background:
                radial-gradient(circle at 35% 24%, rgba(107, 255, 0, 0.28), transparent 30%),
                repeating-linear-gradient(135deg, rgba(66, 71, 62, 0.06) 0 8px, transparent 8px 16px),
                rgba(255, 255, 255, 0.74);
        }

        body.dashboard-page .listing-card-placeholder span {
            width: 66px;
            height: 66px;
            display: grid;
            place-items: center;
            border-radius: 999px;
            background: var(--green);
            color: var(--ink);
            font-size: 2.6rem;
            font-weight: 900;
            box-shadow: 0 16px 34px rgba(66, 71, 62, 0.16);
        }

        body.dashboard-page .listing-card-owner {
            position: absolute;
            top: 8px;
            right: 8px;
            display: inline-grid;
            place-items: center;
            width: 44px;
            height: 44px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.78);
            box-shadow: 0 12px 26px rgba(66, 71, 62, 0.18);
        }

        body.dashboard-page .listing-card-owner .owner-avatar {
            width: 38px;
            height: 38px;
            box-shadow: none;
        }

        body.dashboard-page .listing-card-promoted {
            position: absolute;
            left: 8px;
            bottom: 8px;
            display: inline-flex;
            align-items: center;
            padding: 6px 8px;
            border-radius: 999px;
            background: rgba(66, 71, 62, 0.82);
            color: #f6fff2;
            font-size: 0.78rem;
            font-weight: 900;
            box-shadow: 0 10px 22px rgba(66, 71, 62, 0.18);
        }

        body.dashboard-page .listing-card-body {
            display: grid;
            gap: 5px;
            padding: 0 12px;
        }

        body.dashboard-page .listing-card-body strong {
            color: var(--ink);
            font-size: 1.02rem;
            line-height: 1.08;
        }

        body.dashboard-page .listing-card-body span,
        body.dashboard-page .listing-card-meta span {
            color: var(--muted);
            font-size: 0.88rem;
            font-weight: 800;
            line-height: 1.2;
        }

        body.dashboard-page .listing-card-main:hover .listing-card-body strong,
        body.dashboard-page .listing-card-main:focus-visible .listing-card-body strong {
            color: var(--good);
            text-decoration: underline;
            text-decoration-thickness: 2px;
            text-underline-offset: 0.16em;
        }

        body.dashboard-page .listing-card-meta {
            display: grid;
            gap: 4px;
            padding: 0 12px;
        }

        body.dashboard-page .listing-card-meta strong {
            color: var(--ink);
            font-size: 1rem;
            line-height: 1;
        }

        body.dashboard-page .marketplace-toggle-pills {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            padding: 0 12px;
        }

        body.dashboard-page .marketplace-toggle-form {
            margin: 0;
        }

        body.dashboard-page .marketplace-toggle-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 32px;
            padding: 6px 10px;
            border: 1px solid rgba(66, 71, 62, 0.14);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.68);
            color: var(--muted);
            cursor: pointer;
            font: inherit;
            font-size: 0.78rem;
            font-weight: 1000;
            line-height: 1;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
            transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, opacity 140ms ease;
        }

        body.dashboard-page .marketplace-toggle-pill:hover,
        body.dashboard-page .marketplace-toggle-pill:focus-visible {
            border-color: rgba(107, 255, 0, 0.5);
            color: var(--ink);
            transform: translateY(-1px);
            outline: none;
        }

        body.dashboard-page .marketplace-toggle-pill.is-active {
            border-color: rgba(107, 255, 0, 0.55);
            background: rgba(107, 255, 0, 0.2);
            color: var(--ink);
        }

        body.dashboard-page .marketplace-toggle-pill:disabled {
            cursor: wait;
            opacity: 0.65;
            transform: none;
        }

        body.dashboard-page .marketplace-toggle-dot {
            width: 8px;
            height: 8px;
            flex: 0 0 auto;
            border-radius: 999px;
            background: rgba(66, 71, 62, 0.28);
        }

        body.dashboard-page .marketplace-toggle-pill.is-active .marketplace-toggle-dot {
            background: var(--green);
            box-shadow: 0 0 0 3px rgba(107, 255, 0, 0.16);
        }

        body.dashboard-page .listing-card-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            padding: 0 12px;
        }

        body.dashboard-page .listing-card-actions .action-link {
            padding: 7px 9px;
            font-size: 0.84rem;
        }

        body.dashboard-page .listing-image-form,
        body.dashboard-page .listing-owner-form {
            padding: 0 12px;
        }

        body.dashboard-page .listing-image-form input,
        body.dashboard-page .listing-owner-form select {
            min-width: 0;
            flex: 1 1 100%;
        }

        body.dashboard-page .pc-showcase-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
            gap: 18px;
        }

        body.dashboard-page .pc-showcase-card {
            position: relative;
            overflow: hidden;
            border-radius: 24px;
            background:
                radial-gradient(circle at 80% 4%, rgba(107, 255, 0, 0.16), transparent 34%),
                linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(230, 238, 224, 0.84));
            border: 1px solid rgba(66, 71, 62, 0.12);
            box-shadow: 0 18px 42px rgba(66, 71, 62, 0.12);
            transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
        }

        body.dashboard-page .pc-showcase-card:hover,
        body.dashboard-page .pc-showcase-card:focus-within {
            transform: translateY(-4px) rotate(-0.5deg);
            border-color: rgba(107, 255, 0, 0.42);
            box-shadow: 0 26px 60px rgba(66, 71, 62, 0.18);
        }

        body.dashboard-page .pc-showcase-link {
            display: grid;
            color: inherit;
            text-decoration: none;
        }

        body.dashboard-page .pc-showcase-image-wrap {
            position: relative;
            overflow: hidden;
            aspect-ratio: 3 / 4;
            margin: 12px 12px 0;
            border-radius: 20px;
            background:
                linear-gradient(135deg, rgba(107, 255, 0, 0.18), rgba(66, 71, 62, 0.1)),
                rgba(255, 255, 255, 0.72);
            box-shadow: inset 0 0 0 1px rgba(66, 71, 62, 0.08);
        }

        body.dashboard-page .pc-showcase-image {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: transform 220ms ease, filter 220ms ease;
        }

        body.dashboard-page .pc-showcase-card:hover .pc-showcase-image,
        body.dashboard-page .pc-showcase-card:focus-within .pc-showcase-image {
            transform: scale(1.035);
            filter: saturate(1.08) contrast(1.04);
        }

        body.dashboard-page .pc-showcase-placeholder {
            width: 100%;
            height: 100%;
            display: grid;
            place-items: center;
            color: rgba(66, 71, 62, 0.72);
            background:
                radial-gradient(circle at 35% 24%, rgba(107, 255, 0, 0.28), transparent 30%),
                repeating-linear-gradient(135deg, rgba(66, 71, 62, 0.06) 0 8px, transparent 8px 16px),
                rgba(255, 255, 255, 0.74);
        }

        body.dashboard-page .pc-showcase-placeholder span {
            width: 74px;
            height: 74px;
            display: grid;
            place-items: center;
            border-radius: 999px;
            background: var(--green);
            color: var(--ink);
            font-size: 3rem;
            font-weight: 900;
            box-shadow: 0 16px 34px rgba(66, 71, 62, 0.16);
        }

        body.dashboard-page .pc-showcase-glare {
            position: absolute;
            inset: -35%;
            pointer-events: none;
            background:
                linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.52) 48%, rgba(107, 255, 0, 0.22) 55%, transparent 68%);
            transform: translateX(-48%) rotate(8deg);
            mix-blend-mode: screen;
            opacity: 0.75;
            transition: transform 420ms ease, opacity 220ms ease;
        }

        body.dashboard-page .pc-showcase-card:hover .pc-showcase-glare,
        body.dashboard-page .pc-showcase-card:focus-within .pc-showcase-glare {
            transform: translateX(48%) rotate(8deg);
            opacity: 1;
        }

        body.dashboard-page .pc-showcase-owner {
            position: absolute;
            top: 10px;
            right: 10px;
            display: inline-grid;
            place-items: center;
            width: 46px;
            height: 46px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.78);
            box-shadow: 0 12px 26px rgba(66, 71, 62, 0.18);
        }

        body.dashboard-page .pc-showcase-owner .owner-avatar {
            width: 40px;
            height: 40px;
            box-shadow: none;
        }

        body.dashboard-page .pc-showcase-body {
            display: grid;
            gap: 6px;
            padding: 14px 16px 16px;
        }

        body.dashboard-page .pc-showcase-body strong {
            color: var(--ink);
            font-size: 1.12rem;
            line-height: 1.05;
        }

        body.dashboard-page .pc-showcase-body span {
            color: var(--muted);
            font-size: 0.92rem;
            font-weight: 800;
            line-height: 1.2;
        }

        body.dashboard-page .pc-owner-form {
            padding: 0 14px 14px;
        }

        body.dashboard-page .card-owner-cell {
            min-width: 64px;
        }

        body.dashboard-page .owner-avatar {
            width: 40px;
            height: 40px;
            display: inline-grid;
            place-items: center;
            overflow: hidden;
            border-radius: 100px;
            background:
                linear-gradient(135deg, rgba(107, 255, 0, 0.28), rgba(255, 255, 255, 0.18)),
                rgba(66, 71, 62, 0.12);
            border: 1px solid rgba(66, 71, 62, 0.14);
            box-shadow: 0 8px 16px rgba(66, 71, 62, 0.12);
            vertical-align: middle;
        }

        body.dashboard-page .owner-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        body.dashboard-page .owner-avatar span {
            color: #42473e;
            font-size: 0.9rem;
            font-weight: 900;
        }

        body.dashboard-page .owner-avatar.is-unassigned {
            opacity: 0.72;
            filter: grayscale(0.25);
        }

        body.dashboard-page a.owner-avatar:hover,
        body.dashboard-page a.owner-avatar:focus-visible,
        body.dashboard-page .owner-summary-photo:hover,
        body.dashboard-page .owner-summary-photo:focus-visible {
            transform: translateY(-1px) scale(1.05);
            outline: 2px solid rgba(107, 255, 0, 0.62);
            outline-offset: 2px;
        }

        body.dashboard-page .card-cell-main {
            min-width: 0;
        }

        body.dashboard-page .table-note {
            display: block;
            color: var(--muted);
            font-size: 0.88rem;
            margin-top: 4px;
            line-height: 1.45;
        }

        body.dashboard-page .inline-order-form {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
        }

        body.dashboard-page .inline-order-form select {
            min-width: 210px;
            width: auto;
            max-width: 100%;
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.82);
            font: inherit;
            color: var(--ink);
        }

        body.dashboard-page .inline-order-form input {
            padding: 8px 10px;
            border-radius: 10px;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.82);
            font: inherit;
            color: var(--ink);
            min-width: 0;
        }

        body.dashboard-page .inline-order-form input[type="date"] {
            width: 150px;
        }

        body.dashboard-page .inline-order-form input[type="number"] {
            width: 100px;
        }

        body.dashboard-page .table-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 6px;
        }

        body.dashboard-page .inline-image-form {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
            max-width: 430px;
        }

        body.dashboard-page .inline-image-form input {
            flex: 1 1 210px;
            min-width: 0;
            padding: 8px 10px;
            border-radius: 12px;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.82);
            color: var(--ink);
            font: inherit;
            font-size: 0.88rem;
        }

        body.dashboard-page .marketplace-reminders {
            display: grid;
            gap: 8px;
            margin-top: 10px;
        }

        body.dashboard-page .marketplace-reminder-form {
            margin: 0;
        }

        body.dashboard-page .marketplace-reminder-form button {
            width: 100%;
            border-radius: 14px;
            font-size: 0.84rem;
            text-align: left;
        }

        body.dashboard-page .marketplace-reminder-form button[disabled] {
            opacity: 0.68;
            cursor: wait;
        }

        body.dashboard-page .marketplace-reminders.is-complete {
            padding: 8px 10px;
            border-radius: 14px;
            background: rgba(107, 255, 0, 0.1);
            color: var(--teal);
            font-size: 0.84rem;
            font-weight: 800;
        }

        body.dashboard-page .inline-order-form button[disabled] {
            opacity: 0.65;
            cursor: wait;
        }

        body.dashboard-page .card-row.is-removing {
            opacity: 0;
            transform: scale(0.99);
            transition: opacity 180ms ease, transform 180ms ease;
        }

        body.dashboard-page .accent-value {
            color: var(--accent);
            font-weight: 700;
        }

        body.dashboard-page .good-value {
            color: green;
            font-weight: 700;
        }

        body.dashboard-page .soft-value {
            color: var(--muted);
            font-weight: 700;
        }

        body.dashboard-page .order-row-alert td {
            background: rgba(187, 77, 32, 0.06);
        }

        body.dashboard-page .order-row-alert td:first-child {
            box-shadow: inset 4px 0 0 var(--accent);
            padding-left: 14px;
        }

        body.dashboard-page .order-flag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 0.82rem;
            font-weight: 700;
        }

        body.dashboard-page .order-flag.alert {
            background: rgba(184, 32, 32, 0.12);
            color: var(--accent);
            border: 1px solid rgba(187, 77, 32, 0.18);
        }

        body.dashboard-page .order-flag.ok {
            background: rgba(112, 161, 78, 0.1);
            color: var(--good);
            border: 1px solid rgba(107, 255, 0, 0.16);
        }

        body.dashboard-page .empty-state {
            border: 1px dashed rgba(151, 151, 151, 0.16);
            border-radius: var(--radius-lg);
            padding: 22px;
            background: rgba(102, 102, 102, 0.36);
            color: var(--muted);
            line-height: 1.6;
        }

        body.dashboard-page .footer-note {
            margin-top: 18px;
            color: var(--muted);
            line-height: 1.6;
        }

@media (max-width: 1200px) {
        body.dashboard-page .hero-grid {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .search-toolbar {
                grid-template-columns: 1fr;
            }
}

@media (max-width: 980px) {
        body.dashboard-page .owner-summary-list {
                grid-template-columns: 1fr;
            }
}

@media (max-width: 760px) {
        .site-nav {
                align-items: flex-start;
                flex-wrap: wrap;
                gap: 10px;
                padding: 8px 10px;
            }

        .site-nav-logo {
                width: 50px;
                height: 50px;
                border-radius: 16px;
            }

        .site-nav-logo img {
                width: 100%;
                height: 100%;
            }

        .site-nav-links {
                order: 3;
                flex-basis: 100%;
                gap: 6px;
            }

        .site-nav-add-card {
                min-height: 38px;
                padding: 8px 12px;
                font-size: 0.92rem;
            }

        .site-nav-link {
                min-height: 34px;
                padding: 8px 10px;
                font-size: 0.9rem;
            }

        body.dashboard-page .page {
                width: min(100% - 20px, 2000px);
                margin-top: 10px;
            }

        body.dashboard-page .hero:not(.section-hero),
        body.dashboard-page .panel {
                padding: 18px;
            }

        body.dashboard-page .hero-grid {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .goal-strip {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .snapshot-card-head,
        body.dashboard-page .owner-summary-head {
                align-items: flex-start;
            }

        body.dashboard-page .snapshot-card-head {
                flex-direction: column;
            }

        body.dashboard-page .snapshot-hero {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .jump-nav .button-link {
                margin-left: 0;
                width: 100%;
            }

        body.dashboard-page .stat-matrix {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .snapshot-secondary {
                grid-template-columns: 1fr;
            }

        body.dashboard-page .panel-header,
        body.dashboard-page .meta-row {
                flex-direction: column;
                align-items: flex-start;
            }

        body.dashboard-page .meta-value {
                text-align: left;
            }

        body.dashboard-page table,
        body.dashboard-page thead,
        body.dashboard-page tbody,
        body.dashboard-page th,
        body.dashboard-page td,
        body.dashboard-page tr {
                display: block;
            }

        body.dashboard-page thead {
                display: none;
            }

        body.dashboard-page tbody tr {
                padding: 16px 0;
                border-bottom: 1px solid var(--line);
            }

        body.dashboard-page tbody td {
                padding: 6px 0;
                border-bottom: 0;
            }

        body.dashboard-page tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: 0.78rem;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                color: var(--muted);
                margin-bottom: 4px;
            }
}


/* add-card.php */
        body.card-form-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background: --bg;
            min-height: 100vh;
        }

        body.card-form-page::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background-image:
                linear-gradient(rgba(66, 71, 62, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(66, 71, 62, 0.03) 1px, transparent 1px);
            background-size: 26px 26px;
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 70%);
        }

        body.card-form-page a {
            color: inherit;
        }

        body.card-form-page .page {
            width: min(1180px, calc(100% - 32px));
            margin: 24px auto 56px;
        }

        body.card-form-page .hero {
            position: relative;
            overflow: hidden;
            border-radius: 10px;
            box-shadow: var(--shadow);
            background-color: #ccc;
            color: #fff8f0;
            padding: 20px;
        }

        body.card-form-page .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            position: relative;
            z-index: 1;
        }

        body.card-form-page .hero:not(.section-hero) .hero-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            width: 100%;
        }

        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link {
            border-color: rgba(66, 71, 62, 0.18);
            background: rgba(66, 71, 62, 0.82);
            color: #ffffff;
            box-shadow: 0 10px 22px rgba(66, 71, 62, 0.16);
        }

        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link.primary {
            border-color: transparent;
            background: var(--green);
            color: var(--ink);
            box-shadow: 0 12px 26px rgba(107, 255, 0, 0.22);
        }

        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link:hover,
        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link:focus-visible {
            border-color: rgba(107, 255, 0, 0.5);
            background: #ffffff;
            color: var(--ink);
            transform: translateY(-1px);
            outline: none;
        }

        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link.primary:hover,
        body.card-form-page .hero:not(.section-hero) .hero-actions .button-link.primary:focus-visible {
            background: #f6fff2;
            color: var(--ink);
        }

        body.card-form-page h1 {
            margin: 0 0 10px;
            font-family: var(--font-extra);
            font-size: clamp(1.65rem, 2.7vw, 2.4rem);
            line-height: 1.05;
            max-width: none;
            white-space: nowrap;
            position: relative;
            z-index: 1;
        }

        body.card-form-page .hero-copy {
            position: relative;
            z-index: 1;
            margin: 0;
            max-width: 700px;
            color: rgba(255, 248, 240, 0.86);
            line-height: 1.6;
        }

        body.card-form-page .layout {
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
            gap: 20px;
            align-items: start;
            margin-top: 22px;
        }

        body.card-form-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            border-radius: 10px;
            padding: 22px;
        }

        body.card-form-page .panel h2,
        body.card-form-page .panel h3 {
            margin: 0 0 12px;
            font-family: var(--font-extra);
        }

        body.card-form-page .panel-copy {
            margin: 0 0 18px;
            color: var(--muted);
            line-height: 1.6;
        }

        body.card-form-page .alert {
            border-radius: var(--radius-md);
            padding: 14px 16px;
            margin-bottom: 18px;
            line-height: 1.5;
        }

        body.card-form-page .alert.success {
            background: var(--button-primary-bg);
            border: 1px solid rgba(107, 255, 0, 0.2);
            color: var(--dark-grey);
        }

        body.card-form-page .alert.error {
            background: rgba(187, 77, 32, 0.1);
            border: 1px solid rgba(187, 77, 32, 0.18);
            color: var(--accent);
        }

        body.card-form-page .form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px 18px;
        }

        body.card-form-page .field {
            display: grid;
            gap: 8px;
        }

        body.card-form-page .field-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }

        body.card-form-page .field-head.wrap {
            flex-wrap: wrap;
        }

        body.card-form-page .field.full {
            grid-column: 1 / -1;
        }

        body.card-form-page .checkbox-field {
            align-content: start;
        }

        body.card-form-page .checkbox-control {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            width: fit-content;
            min-height: 42px;
            padding: 8px 0;
            cursor: pointer;
            user-select: none;
        }

        body.card-form-page .checkbox-control input[type="checkbox"] {
            width: 24px;
            height: 24px;
            margin: 0;
            accent-color: var(--teal);
            flex: 0 0 auto;
            cursor: pointer;
        }

        body.card-form-page .checkbox-label {
            font-weight: 700;
            font-size: 1rem;
            line-height: 1.2;
        }

        body.card-form-page .marketplace-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 10px;
        }

        body.card-form-page .marketplace-card {
            display: grid;
            gap: 4px;
            padding: 12px 14px;
        }

        body.card-form-page label {
            font-weight: 700;
            font-size: 0.95rem;
        }

        body.card-form-page .help {
            color: var(--muted);
            font-size: 0.9rem;
            line-height: 1.45;
        }

        body.card-form-page .help.good {
            color: var(--good);
        }

        body.card-form-page .help.alert {
            color: var(--accent);
        }

        body.card-form-page input,
        body.card-form-page select,
        body.card-form-page textarea {
            width: 100%;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.72);
            border-radius: 12px;
            padding: 12px 14px;
            color: var(--ink);
            font: inherit;
        }

        body.card-form-page textarea {
            min-height: 120px;
            resize: vertical;
        }

        body.card-form-page input:focus,
        body.card-form-page select:focus,
        body.card-form-page textarea:focus {
            outline: 2px solid rgba(107, 255, 0, 0.24);
            border-color: rgba(107, 255, 0, 0.4);
        }

        body.card-form-page .form-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            margin-top: 22px;
            flex-wrap: wrap;
        }

        body.card-form-page .player-lock-summary {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        body.card-form-page .muted-link {
            color: var(--muted);
            text-decoration: none;
        }

        body.card-form-page .meta-list {
            display: grid;
            gap: 12px;
        }

        body.card-form-page .meta-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--line);
        }

        body.card-form-page .meta-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        body.card-form-page .meta-label {
            color: var(--muted);
        }

        body.card-form-page .meta-value {
            text-align: right;
            font-weight: 600;
        }

        body.card-form-page .stack {
            display: grid;
            gap: 18px;
        }

        body.card-form-page code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            font-size: 0.95em;
            background: rgba(31, 27, 22, 0.06);
            padding: 2px 6px;
            border-radius: 8px;
        }

@media (max-width: 980px) {
body.card-form-page .layout {
                grid-template-columns: 1fr;
            }
}

@media (max-width: 760px) {
body.card-form-page .page {
                width: min(100% - 20px, 1180px);
                margin-top: 10px;
            }

        body.card-form-page .hero,
        body.card-form-page .panel {
                padding: 18px;
            }

        body.card-form-page .topbar,
        body.card-form-page .hero:not(.section-hero) .hero-actions,
        body.card-form-page .form-actions,
        body.card-form-page .meta-row {
                flex-direction: column;
                align-items: flex-start;
            }

        body.card-form-page .form-grid {
                grid-template-columns: 1fr;
            }

        body.card-form-page .meta-value {
                text-align: left;
            }

        body.card-form-page h1 {
                white-space: normal;
            }
}


/* import-order.php */
        body.import-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background:
                radial-gradient(circle at top left, rgba(107, 255, 0, 0.26), transparent 26%),
                radial-gradient(circle at top right, rgba(107, 255, 0, 0.16), transparent 28%),
                linear-gradient(180deg, #ecf9ea 0%, #f6fff4 48%, #ffffff 100%);
            min-height: 100vh;
        }

        body.import-page::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background-image:
                linear-gradient(rgba(66, 71, 62, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(66, 71, 62, 0.03) 1px, transparent 1px);
            background-size: 26px 26px;
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 70%);
        }

        body.import-page a { color: inherit; }

        body.import-page .page {
            width: min(1240px, calc(100% - 32px));
            margin: 24px auto 56px;
        }

        body.import-page .hero {
            position: relative;
            overflow: hidden;
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow);
            background: linear-gradient(145deg, rgba(66, 71, 62, 0.96), rgba(66, 71, 62, 0.9));
            color: #fff8f0;
            padding: 28px 30px 30px;
        }

        body.import-page .hero::after {
            content: "";
            position: absolute;
            width: 340px;
            height: 340px;
            right: -120px;
            top: -160px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(107, 255, 0, 0.42), transparent 70%);
        }

        body.import-page .topbar,
        body.import-page .form-actions,
        body.import-page .summary-grid,
        body.import-page .meta-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        body.import-page .eyebrow {
            letter-spacing: 0.16em;
            text-transform: uppercase;
            font-size: 0.78rem;
            color: rgba(255, 241, 225, 0.74);
        }

        body.import-page h1 {
            margin: 10px 0;
            font-family: var(--font-extra);
            font-size: clamp(2.1rem, 4vw, 3.6rem);
            line-height: 0.98;
            max-width: 10ch;
            position: relative;
            z-index: 1;
        }

        body.import-page .hero-copy {
            position: relative;
            z-index: 1;
            margin: 0;
            max-width: 760px;
            color: rgba(255, 248, 240, 0.86);
            line-height: 1.6;
        }

        body.import-page .layout {
            display: grid;
            grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
            gap: 20px;
            margin-top: 22px;
            align-items: start;
        }

        body.import-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow);
            padding: 22px;
        }

        body.import-page .panel h2,
        body.import-page .panel h3 {
            margin: 0 0 12px;
            font-family: var(--font-extra);
        }

        body.import-page .panel-copy,
        body.import-page .help,
        body.import-page .table-note {
            color: var(--muted);
            line-height: 1.55;
        }

        body.import-page .alert {
            border-radius: var(--radius-md);
            padding: 14px 16px;
            margin-bottom: 18px;
        }

        body.import-page .alert.success {
            background: rgba(107, 255, 0, 0.11);
            border: 1px solid rgba(107, 255, 0, 0.2);
            color: var(--teal);
        }

        body.import-page .alert.error {
            background: rgba(187, 77, 32, 0.1);
            border: 1px solid rgba(187, 77, 32, 0.18);
            color: var(--accent);
        }

        body.import-page .field-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px 18px;
        }

        body.import-page .field {
            display: grid;
            gap: 8px;
        }

        body.import-page .field.full {
            grid-column: 1 / -1;
        }

        body.import-page label {
            font-weight: 700;
        }

        body.import-page input,
        body.import-page select {
            width: 100%;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.72);
            border-radius: 12px;
            padding: 12px 14px;
            color: var(--ink);
            font: inherit;
        }

        body.import-page table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 18px;
        }

        body.import-page thead th {
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--muted);
            text-align: left;
            padding: 0 0 12px;
            border-bottom: 1px solid var(--line);
        }

        body.import-page tbody td {
            padding: 12px 0;
            border-bottom: 1px solid var(--line);
            vertical-align: top;
        }

        body.import-page tbody tr:last-child td {
            border-bottom: 0;
        }

        body.import-page .summary-grid {
            align-items: flex-start;
            margin-top: 12px;
        }

        body.import-page .summary-card {
            flex: 1 1 180px;
            padding: 14px 16px;
        }

        body.import-page .summary-label {
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--muted);
            margin-bottom: 8px;
        }

        body.import-page .summary-value {
            font-size: 1.2rem;
            font-weight: 700;
        }

        body.import-page .meta-list {
            display: grid;
            gap: 12px;
        }

        body.import-page .meta-row {
            padding-bottom: 12px;
            border-bottom: 1px solid var(--line);
        }

        body.import-page .meta-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        body.import-page .meta-label { color: var(--muted); }

        body.import-page .meta-value { font-weight: 600; text-align: right; }

        body.import-page code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            font-size: 0.95em;
            background: rgba(31, 27, 22, 0.06);
            padding: 2px 6px;
            border-radius: 8px;
        }

@media (max-width: 980px) {
body.import-page .layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
body.import-page .page {
                width: min(100% - 20px, 1240px);
                margin-top: 10px;
            }

        body.import-page .hero,
        body.import-page .panel {
                padding: 18px;
            }

        body.import-page .field-grid {
                grid-template-columns: 1fr;
            }

        body.import-page .topbar,
        body.import-page .form-actions,
        body.import-page .meta-row {
                flex-direction: column;
                align-items: flex-start;
            }

        body.import-page .meta-value {
                text-align: left;
            }

        body.import-page table,
        body.import-page thead,
        body.import-page tbody,
        body.import-page th,
        body.import-page td,
        body.import-page tr {
                display: block;
            }

        body.import-page thead { display: none; }

        body.import-page tbody tr {
                padding: 16px 0;
                border-bottom: 1px solid var(--line);
            }

        body.import-page tbody td {
                padding: 6px 0;
                border-bottom: 0;
            }

        body.import-page tbody td::before {
                content: attr(data-label);
                display: block;
                font-size: 0.78rem;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                color: var(--muted);
                margin-bottom: 4px;
            }
}


/* margin-check.php */
        body.margin-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background:
                radial-gradient(circle at top left, rgba(107, 255, 0, 0.24), transparent 24%),
                radial-gradient(circle at top right, rgba(107, 255, 0, 0.15), transparent 26%),
                linear-gradient(180deg, #ecf9ea 0%, #f6fff4 48%, #ffffff 100%);
            min-height: 100vh;
        }

        body.margin-page a {
            color: var(--link);
            text-decoration-color: rgba(107, 255, 0, 0.34);
            text-underline-offset: 0.14em;
            transition: color 140ms ease, text-decoration-color 140ms ease;
        }

        body.margin-page a:hover,
        body.margin-page a:focus-visible {
            color: var(--link-hover);
            text-decoration-color: rgba(82, 192, 3, 0.62);
        }

        body.margin-page .page {
            width: min(1400px, calc(100% - 32px));
            margin: 24px auto 56px;
        }

        body.margin-page .hero,
        body.margin-page .panel {
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow);
        }

        body.margin-page .hero {
            padding: 34px;
            color: #fff8f0;
            background:
                linear-gradient(145deg, rgba(66, 71, 62, 0.96), rgba(66, 71, 62, 0.9)),
                linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
        }

        body.margin-page .hero-copy {
            margin: 10px 0 0;
            color: rgba(255, 241, 225, 0.76);
            max-width: 900px;
            line-height: 1.5;
        }

        body.margin-page .layout {
            display: grid;
            grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.2fr);
            gap: 22px;
            margin-top: 22px;
        }

        body.margin-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            padding: 22px;
        }

        body.margin-page .panel h2,
        body.margin-page .panel h3 {
            margin: 0 0 12px;
            font-family: var(--font-extra);
        }

        body.margin-page .panel-copy {
            margin: 0 0 18px;
            color: var(--muted);
            line-height: 1.5;
        }

        body.margin-page .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 18px;
            margin-bottom: 22px;
        }

        body.margin-page .stat {
            padding: 18px;
            border-radius: var(--radius-lg);
            background: rgba(255, 248, 240, 0.55);
            border: 1px solid rgba(58, 45, 31, 0.08);
        }

        body.margin-page .stat-label {
            font-size: 0.76rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--muted);
            margin-bottom: 10px;
        }

        body.margin-page .stat-value {
            font-size: clamp(1.3rem, 2.5vw, 2rem);
            font-weight: 700;
        }

        body.margin-page .meta-list {
            display: grid;
            gap: 12px;
        }

        body.margin-page .meta-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--line);
        }

        body.margin-page .meta-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        body.margin-page .meta-label {
            color: var(--muted);
        }

        body.margin-page .meta-value {
            text-align: right;
            font-weight: 700;
        }

        body.margin-page .form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px 18px;
        }

        body.margin-page .field {
            display: grid;
            gap: 8px;
        }

        body.margin-page .field.full {
            grid-column: 1 / -1;
        }

        body.margin-page label {
            font-weight: 700;
        }

        body.margin-page input {
            width: 100%;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.82);
            font: inherit;
            color: var(--ink);
        }

        body.margin-page .help {
            color: var(--muted);
            font-size: 0.9rem;
            line-height: 1.45;
        }

        body.margin-page .submit-row {
            display: flex;
            gap: 12px;
            align-items: center;
            flex-wrap: wrap;
            margin-top: 18px;
        }

        body.margin-page .good-value { color: var(--good); }

        body.margin-page .accent-value { color: var(--accent); }

        body.margin-page .formula {
            background: linear-gradient(135deg, rgba(198, 140, 28, 0.13), rgba(187, 77, 32, 0.08));
            border-radius: var(--radius-md);
            padding: 16px 18px;
            border: 1px solid rgba(198, 140, 28, 0.16);
            line-height: 1.65;
        }

        body.margin-page .formula code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            background: rgba(31, 27, 22, 0.06);
            padding: 2px 6px;
            border-radius: 8px;
        }

@media (max-width: 1000px) {
body.margin-page .layout,
        body.margin-page .stats-grid,
        body.margin-page .form-grid {
                grid-template-columns: 1fr;
            }
}


/* order.php */
        body.order-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background:
                radial-gradient(circle at top left, rgba(107, 255, 0, 0.24), transparent 24%),
                radial-gradient(circle at top right, rgba(107, 255, 0, 0.15), transparent 26%),
                linear-gradient(180deg, #ecf9ea 0%, #f6fff4 48%, #ffffff 100%);
            min-height: 100vh;
        }

        body.order-page a {
            color: var(--link);
            text-decoration-color: rgba(107, 255, 0, 0.34);
            text-underline-offset: 0.14em;
            transition: color 140ms ease, text-decoration-color 140ms ease;
        }

        body.order-page a:hover,
        body.order-page a:focus-visible {
            color: var(--link-hover);
            text-decoration-color: rgba(82, 192, 3, 0.62);
        }

        body.order-page .page {
            width: min(2000px, calc(100% - 32px));
            margin: 24px auto 56px;
        }

        body.order-page .hero,
        body.order-page .panel {
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow);
        }

        body.order-page .hero {
            padding: 34px;
            color: #fff8f0;
            background:
                linear-gradient(145deg, rgba(66, 71, 62, 0.96), rgba(66, 71, 62, 0.9)),
                linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
        }

        body.order-page .hero-copy {
            margin: 10px 0 0;
            color: rgba(255, 241, 225, 0.76);
            max-width: 900px;
            line-height: 1.5;
        }

        body.order-page .stats-grid,
        body.order-page .panel-grid {
            display: grid;
            gap: 18px;
        }

        body.order-page .stats-grid {
            grid-template-columns: repeat(6, minmax(0, 1fr));
            margin-top: 24px;
        }

        body.order-page .panel-grid {
            grid-template-columns: 1.2fr 1fr;
            margin-top: 22px;
        }

        body.order-page .stat,
        body.order-page .panel {
            backdrop-filter: blur(12px);
        }

        body.order-page .stat {
            padding: 18px;
            border-radius: var(--radius-lg);
            background: rgba(255, 248, 240, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.order-page .stat-label {
            font-size: 0.76rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 241, 225, 0.64);
            margin-bottom: 10px;
        }

        body.order-page .stat-value {
            font-size: clamp(1.45rem, 2.6vw, 2.2rem);
            font-weight: 700;
        }

        body.order-page .stat-note {
            margin-top: 8px;
            color: rgba(255, 241, 225, 0.74);
            font-size: 0.92rem;
            line-height: 1.45;
        }

        body.order-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            padding: 22px;
        }

        body.order-page .panel h2 {
            margin: 0 0 12px;
            font-family: var(--font-extra);
        }

        body.order-page .panel-copy {
            margin: 0 0 18px;
            color: var(--muted);
            line-height: 1.5;
        }

        body.order-page .meta-list {
            display: grid;
            gap: 12px;
        }

        body.order-page .meta-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--line);
        }

        body.order-page .meta-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        body.order-page .meta-label {
            color: var(--muted);
        }

        body.order-page .meta-value {
            text-align: right;
            font-weight: 700;
        }

        body.order-page .formula {
            background: linear-gradient(135deg, rgba(198, 140, 28, 0.13), rgba(187, 77, 32, 0.08));
            border-radius: var(--radius-md);
            padding: 16px 18px;
            border: 1px solid rgba(198, 140, 28, 0.16);
            line-height: 1.65;
        }

        body.order-page .formula code {
            font-family: "SFMono-Regular", Consolas, Monaco, monospace;
            background: rgba(31, 27, 22, 0.06);
            padding: 2px 6px;
            border-radius: 8px;
        }

        body.order-page table {
            width: 100%;
            border-collapse: collapse;
        }

        body.order-page thead th {
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--muted);
            padding: 0 0 12px;
            text-align: left;
            border-bottom: 1px solid var(--line);
        }

        body.order-page tbody td,
        body.order-page tfoot td {
            padding: 14px 0;
            border-bottom: 1px solid var(--line);
            vertical-align: top;
        }

        body.order-page tfoot td {
            font-weight: 700;
            border-bottom: 0;
            padding-top: 18px;
        }

        body.order-page .table-note {
            display: block;
            color: var(--muted);
            font-size: 0.88rem;
            margin-top: 4px;
            line-height: 1.45;
        }

        body.order-page .card-cell {
            display: flex;
            align-items: flex-start;
            gap: 12px;
        }

        body.order-page .card-cell-main {
            min-width: 0;
        }

        body.order-page .card-thumb {
            width: 72px;
            height: 72px;
            object-fit: cover;
            border-radius: 14px;
            border: 1px solid rgba(66, 71, 62, 0.12);
            background: rgba(255, 255, 255, 0.82);
            flex: 0 0 auto;
            box-shadow: 0 10px 24px rgba(66, 71, 62, 0.08);
        }

        body.order-page .card-owner-cell {
            min-width: 128px;
        }

        body.order-page .quick-owner-panel {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 18px;
            padding: 14px;
            border: 1px solid rgba(66, 71, 62, 0.12);
            border-radius: var(--radius-lg);
            background:
                radial-gradient(circle at 12% 50%, rgba(107, 255, 0, 0.22), transparent 28%),
                rgba(255, 255, 255, 0.52);
        }

        body.order-page .quick-owner-title {
            color: var(--ink);
            font-size: 0.96rem;
            font-weight: 900;
        }

        body.order-page .quick-owner-copy {
            color: var(--muted);
            font-size: 0.84rem;
            font-weight: 700;
        }

        body.order-page .quick-owner-panel select,
        body.order-page .quick-card-owner-form select,
        body.order-page .quick-card-set-form select,
        body.order-page .quick-card-gift-form select,
        body.order-page .quick-card-number-form input {
            border: 1px solid rgba(66, 71, 62, 0.16);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.74);
            color: var(--ink);
            font: inherit;
            font-weight: 800;
        }

        body.order-page .quick-owner-panel select {
            min-width: 170px;
            padding: 11px 14px;
        }

        body.order-page .quick-card-owner-form {
            margin-top: 8px;
        }

        body.order-page .quick-card-number-form,
        body.order-page .quick-card-set-form,
        body.order-page .quick-card-gift-form {
            display: grid;
            gap: 4px;
            margin-top: 8px;
        }

        body.order-page .quick-card-number-form label {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--muted);
            font-size: 0.76rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        body.order-page .quick-card-owner-form select {
            width: 124px;
            padding: 7px 10px;
            font-size: 0.82rem;
        }

        body.order-page .quick-card-gift-form select {
            width: 124px;
            padding: 7px 10px;
            font-size: 0.78rem;
        }

        body.order-page .quick-gift-toggle {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 900;
        }

        body.order-page .quick-gift-toggle input {
            width: 18px;
            height: 18px;
            accent-color: var(--green);
        }

        body.order-page .quick-card-set-form select {
            width: min(220px, 100%);
            padding: 7px 10px;
            font-size: 0.82rem;
        }

        body.order-page .quick-card-number-form input {
            width: 74px;
            padding: 7px 10px;
            font-size: 0.82rem;
        }

        body.order-page .quick-owner-status {
            display: block;
            min-height: 1.1em;
            margin-top: 4px;
            color: var(--good);
            font-size: 0.76rem;
            font-weight: 900;
        }

        body.order-page .owner-avatar {
            width: 40px;
            height: 40px;
            display: inline-grid;
            place-items: center;
            overflow: hidden;
            border-radius: 50%;
            background:
                linear-gradient(135deg, rgba(107, 255, 0, 0.28), rgba(255, 255, 255, 0.18)),
                rgba(66, 71, 62, 0.12);
            border: 1px solid rgba(66, 71, 62, 0.14);
            box-shadow: 0 8px 16px rgba(66, 71, 62, 0.12);
            vertical-align: middle;
        }

        body.order-page .owner-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        body.order-page .owner-avatar span {
            color: #42473e;
            font-size: 0.9rem;
            font-weight: 900;
        }

        body.order-page .owner-avatar.is-unassigned {
            opacity: 0.72;
            filter: grayscale(0.25);
        }

        body.order-page a.owner-avatar:hover,
        body.order-page a.owner-avatar:focus-visible {
            transform: translateY(-1px) scale(1.05);
            outline: 2px solid rgba(107, 255, 0, 0.62);
            outline-offset: 2px;
        }

        body.order-page .no-owner-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 32px;
            padding: 7px 10px;
            border-radius: 999px;
            background: rgba(66, 71, 62, 0.08);
            color: var(--muted);
            font-size: 0.82rem;
            font-weight: 800;
            white-space: nowrap;
        }

        body.order-page .accent-value {
            color: var(--accent);
            font-weight: 700;
        }

        body.order-page .good-value {
            color: var(--good);
            font-weight: 700;
        }

        body.order-page .soft-value {
            color: var(--muted);
            font-weight: 700;
        }

        body.order-page .empty-state {
            border: 1px dashed rgba(31, 27, 22, 0.16);
            border-radius: var(--radius-lg);
            padding: 22px;
            background: rgba(255, 255, 255, 0.36);
            color: var(--muted);
            line-height: 1.6;
        }

@media (max-width: 1200px) {
body.order-page .stats-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

        body.order-page .panel-grid {
                grid-template-columns: 1fr;
            }
}

body.box-page .box-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

body.box-page .box-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 92% 8%, rgba(107, 255, 0, 0.18), transparent 34%),
        rgba(255, 255, 255, 0.56);
    border: 1px solid rgba(66, 71, 62, 0.12);
}

body.box-page .box-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(66, 71, 62, 0.1);
}

body.box-page .box-image-preview img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
}

body.box-page .box-image-preview span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

body.box-page .box-card-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(66, 71, 62, 0.08);
    border: 1px solid rgba(66, 71, 62, 0.1);
    aspect-ratio: 16 / 9;
}

body.box-page .box-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.box-page .box-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

body.box-page .box-card-image-link > span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--teal);
    font-size: 3rem;
    font-weight: 900;
    background:
        radial-gradient(circle at 50% 28%, rgba(107, 255, 0, 0.18), transparent 38%),
        rgba(66, 71, 62, 0.9);
}

body.box-page .box-card-image > span:not(.box-owner-thumb) {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--teal);
    font-size: 3rem;
    font-weight: 900;
    background:
        radial-gradient(circle at 50% 28%, rgba(107, 255, 0, 0.18), transparent 38%),
        rgba(66, 71, 62, 0.9);
}

body.box-view-page .box-owner-thumb {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(66, 71, 62, 0.86);
    border: 2px solid rgba(255, 248, 240, 0.92);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

body.box-view-page .box-owner-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.box-view-page .box-owner-thumb span {
    color: #6bff00;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
}

body.box-view-page a.box-owner-thumb {
    color: inherit;
    text-decoration: none;
    transition: transform 140ms ease, outline-color 140ms ease;
}

body.box-view-page a.box-owner-thumb:hover,
body.box-view-page a.box-owner-thumb:focus-visible {
    transform: translateY(-1px) scale(1.08);
    outline: 2px solid rgba(107, 255, 0, 0.7);
    outline-offset: 2px;
}

body.box-page .box-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

body.box-page .box-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

body.box-page .box-card-head span,
body.box-page .box-metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.box-page .box-card-head strong {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
}

body.box-page .box-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

body.box-page .box-metrics div {
    min-width: 0;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(66, 71, 62, 0.08);
}

body.box-page .box-metrics strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
}

body.box-page .box-recovery {
    height: 16px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(66, 71, 62, 0.8);
    overflow: hidden;
}

body.box-page .box-recovery div {
    width: var(--box-recovery);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), #b7ff7a);
}

body.box-page .box-recovery.is-negative div {
    background: linear-gradient(90deg, #ff5c35, #ffb088);
}

body.box-page .box-recovery.is-positive div {
    background: linear-gradient(90deg, var(--teal), #b7ff7a);
}

body.box-page .box-recovery-note {
    margin-top: -4px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

body.box-page .box-statuses {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

body.box-page .box-statuses span {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(107, 255, 0, 0.1);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
}

body.box-page .box-card-table {
    margin-top: 2px;
}

body.box-page .box-card-table td,
body.box-page .box-card-table th {
    padding: 10px 0;
}

body.box-page .box-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.box-page .box-card-title-row > div {
    min-width: 0;
}

body.box-page .box-card-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(66, 71, 62, 0.14);
    box-shadow: 0 8px 18px rgba(66, 71, 62, 0.12);
}

body.box-page .box-card-name {
    color: inherit;
    text-decoration: none;
}

body.box-page .box-card-name:hover,
body.box-page .box-card-name:focus-visible {
    color: var(--good);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
}


body.box-page .box-sidebar-panel .box-grid {
    grid-template-columns: 1fr;
}

body.box-page .box-sidebar-panel .box-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.box-page .box-sidebar-panel .box-card-head {
    flex-direction: column;
}

body.box-edit-page .layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

body.box-add-page .layout {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

body.box-view-page .panel-copy {
    display: none;
}

body.box-view-page .box-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    align-items: start;
}

body.box-view-page .box-card-compact {
    padding: 14px;
    gap: 0;
}

body.box-view-page .box-tile-link {
    display: grid;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
}

body.box-view-page .box-tile-link:hover h3 {
    color: var(--link-hover);
}

body.box-view-page .box-card-image {
    width: min(200px, 100%);
    height: 200px;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    border-radius: 22px;
}

body.box-view-page .box-card-compact h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.08;
}

body.box-view-page .box-recovery {
    height: 13px;
}

body.box-view-page .box-tile-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.box-view-page .box-tile-progress .box-recovery {
    flex: 1 1 auto;
    min-width: 0;
}

body.box-view-page .box-tile-progress strong {
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 980px) {
    body.box-page .box-grid,
    body.box-page .box-metrics {
        grid-template-columns: 1fr;
    }

    body.box-view-page .box-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    body.box-page .box-card-head {
        flex-direction: column;
    }
}

@media (max-width: 760px) {
body.order-page .page {
                width: min(100% - 20px, 2000px);
                margin-top: 10px;
            }

        body.order-page .hero,
        body.order-page .panel {
                padding: 18px;
            }

        body.order-page .stats-grid {
                grid-template-columns: 1fr;
            }

        body.order-page .meta-row {
                flex-direction: column;
            }

        body.order-page table,
        body.order-page thead,
        body.order-page tbody,
        body.order-page tfoot,
        body.order-page th,
        body.order-page td,
        body.order-page tr {
                display: block;
            }

        body.order-page thead {
                display: none;
            }

        body.order-page tbody td,
        body.order-page tfoot td {
                padding: 6px 0;
                border-bottom: 0;
            }

        body.order-page tbody td::before,
        body.order-page tfoot td::before {
                content: attr(data-label);
                display: block;
                font-size: 0.78rem;
                text-transform: uppercase;
                letter-spacing: 0.08em;
                color: var(--muted);
                margin-bottom: 4px;
            }
}


/* team.php */
        body.team-page {
            margin: 0;
            color: var(--ink);
            font-family: var(--font-heading);
            background:
                radial-gradient(circle at top left, rgba(107, 255, 0, 0.26), transparent 26%),
                radial-gradient(circle at top right, rgba(107, 255, 0, 0.16), transparent 28%),
                linear-gradient(180deg, #ecf9ea 0%, #f6fff4 48%, #ffffff 100%);
            min-height: 100vh;
        }

        body.team-page::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            background-image:
                linear-gradient(rgba(66, 71, 62, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(66, 71, 62, 0.03) 1px, transparent 1px);
            background-size: 26px 26px;
            mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 70%);
        }

        body.team-page a {
            color: var(--link);
            text-decoration-color: rgba(107, 255, 0, 0.34);
            text-underline-offset: 0.14em;
        }

        body.team-page a:hover,
        body.team-page a:focus-visible { color: var(--link-hover); }

        body.team-page .page {
            width: min(1800px, calc(100% - 32px));
            margin: 24px auto 56px;
        }

        body.team-page .hero {
            position: relative;
            overflow: hidden;
            background:
                linear-gradient(145deg, rgba(66, 71, 62, 0.96), rgba(66, 71, 62, 0.9)),
                linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow);
            padding: 28px 30px;
            color: #fff8f0;
        }

        body.team-page .panel-header,
        body.team-page .form-row,
        body.team-page .toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            flex-wrap: wrap;
        }

        body.team-page h2,
        body.team-page h3 {
            margin: 0;
            font-family: var(--font-extra);
        }

        body.team-page .layout {
            display: grid;
            grid-template-columns: minmax(320px, 0.4fr) minmax(0, 1fr);
            gap: 20px;
            align-items: start;
            margin-top: 22px;
        }

        body.team-page .panel {
            background: var(--paper);
            border: 1px solid rgba(255, 255, 255, 0.42);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow);
            padding: 22px;
        }

        body.team-page .stack { display: grid; gap: 18px; }

        body.team-page .alert,
        body.team-page .success {
            border-radius: var(--radius-md);
            padding: 12px 14px;
            margin-top: 16px;
            font-weight: 800;
        }

        body.team-page .alert {
            background: rgba(187, 77, 32, 0.1);
            border: 1px solid rgba(187, 77, 32, 0.18);
            color: var(--accent);
        }

        body.team-page .success {
            background: rgba(107, 255, 0, 0.9);
            border: 1px solid rgba(107, 255, 0, 0.2);
            color: var(--good);
        }

        body.team-page form { margin: 0; }
        body.team-page .autosave-form {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
        }

        body.team-page .autosave-status {
            display: inline-flex;
            align-items: center;
            min-height: 34px;
            padding: 7px 11px;
            border-radius: 999px;
            background: rgba(66, 71, 62, 0.1);
            border: 1px solid rgba(66, 71, 62, 0.14);
            color: var(--muted);
            font-size: 0.82rem;
            font-weight: 900;
        }

        body.team-page .autosave-status[data-state="saving"],
        body.team-page .autosave-status[data-state="pending"] {
            background: rgba(107, 255, 0, 0.16);
            border-color: rgba(107, 255, 0, 0.28);
            color: var(--dark-grey);
        }

        body.team-page .autosave-status[data-state="saved"] {
            background: rgba(107, 255, 0, 0.22);
            border-color: rgba(107, 255, 0, 0.32);
            color: var(--good);
        }

        body.team-page .autosave-status[data-state="error"] {
            background: rgba(187, 77, 32, 0.1);
            border-color: rgba(187, 77, 32, 0.2);
            color: var(--accent);
        }

        body.team-page label {
            display: grid;
            gap: 7px;
            font-weight: 800;
        }

        body.team-page input,
        body.team-page select {
            width: 100%;
            border: 1px solid rgba(58, 45, 31, 0.14);
            background: rgba(255, 255, 255, 0.78);
            border-radius: 12px;
            padding: 11px 13px;
            color: var(--ink);
            font: inherit;
        }

        body.team-page .form-grid {
            display: grid;
            gap: 12px;
        }

        body.team-page .add-player-panel {
            margin-top: 14px;
        }

        body.team-page .add-player-panel summary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            padding: 10px 14px;
            border-radius: 999px;
            background: rgba(37, 89, 0, 1);
            border: 1px solid rgba(107, 255, 0, 0.14);
            color: var(--teal);
            cursor: pointer;
            font-weight: 900;
            list-style: none;
        }

        body.team-page .add-player-panel summary::-webkit-details-marker {
            display: none;
        }

        body.team-page .add-player-panel[open] summary {
            margin-bottom: 14px;
        }

        body.team-page .roster {
            display: grid;
            gap: 10px;
            margin-top: 16px;
        }

        body.team-page .player-chip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 14px;
            background: rgba(29, 68, 0, 0.08);
            color: var(--good);
            border: 1px solid rgba(107, 255, 0, 0.14);
        }

        body.team-page .player-chip strong {
            display: block;
        }

        body.team-page .player-number {
            color: var(--muted);
            font-size: 0.9rem;
        }
        body.team-page .player-chip-actions {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        body.team-page .player-chip-actions form,
        body.team-page .unavailable-player form {
            margin: 0;
        }

        body.team-page .mini-button.muted {
            background: rgba(66, 71, 62, 0.12);
            border-color: rgba(66, 71, 62, 0.18);
            color: var(--dark-grey);
        }

        body.team-page .mini-button.good {
            background: rgba(107, 255, 0, 0.22);
            border-color: rgba(107, 255, 0, 0.3);
            color: var(--dark-grey);
        }

        body.team-page .player-status-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 0.76rem;
            font-weight: 950;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        body.team-page .player-status-badge.in {
            background: rgba(107, 255, 0, 0.22);
            color: var(--dark-grey);
            border: 1px solid rgba(107, 255, 0, 0.3);
        }

        body.team-page .player-status-badge.out {
            background: rgba(200, 101, 47, 0.14);
            color: var(--accent);
            border: 1px solid rgba(200, 101, 47, 0.22);
        }

        body.team-page .roster-section-title {
            margin-top: 20px;
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 900;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }

        body.team-page .not-available-roster {
            margin-top: 10px;
        }

        body.team-page .unavailable-player {
            background: rgba(66, 71, 62, 0.1);
            border-color: rgba(66, 71, 62, 0.16);
            color: var(--dark-grey);
        }


        body.team-page .field-wrap {
            display: grid;
            gap: 16px;
        }

        body.team-page .field-shell {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 10;
            min-height: 520px;
            border-radius: 24px;
            overflow: hidden;
            background:
                repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 8.33%, rgba(255, 255, 255, 0.08) 8.33% 16.66%),
                linear-gradient(135deg, #42473e, #6bff00);
            border: 8px solid rgba(246, 255, 242, 0.86);
            box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4), var(--shadow);
            touch-action: none;
        }

        body.team-page .field-line {
            position: absolute;
            pointer-events: none;
            border: 3px solid rgba(255, 255, 255, 0.72);
        }

        body.team-page .midline {
            top: 0;
            bottom: 0;
            left: 50%;
            border-width: 0 0 0 3px;
        }

        body.team-page .center-circle {
            width: 18%;
            aspect-ratio: 1;
            border-radius: 50%;
            left: 41%;
            top: 36%;
        }

        body.team-page .box-left,
        body.team-page .box-right {
            top: 15%;
             width: 17%;
             height: 70%;
        }

        body.team-page .box-left { left: 0; border-left: 0; }

        body.team-page .box-right { right: 0; border-right: 0; }

        body.team-page .six-left,
        body.team-page .six-right {
            top: 37%;
            width: 7%;
            height: 26%;
        }

        body.team-page .six-left { left: 0; border-left: 0; }

        body.team-page .six-right { right: 0; border-right: 0; }

        body.team-page .coverage-zone {
            position: absolute;
            left: var(--player-x, 50%);
            top: var(--player-y, 50%);
            z-index: 1;
            width: var(--coverage-w, 18%);
            height: var(--coverage-h, 18%);
            min-width: 58px;
            min-height: 44px;
            border: 2px dashed rgba(248, 255, 241, 0.78);
            border-radius: 18px;
            background: rgba(107, 255, 0, 0.18);
            box-shadow: inset 0 0 34px rgba(255, 255, 255, 0.12);
            opacity: 0;
            transform: translate(-50%, -50%);
            visibility: hidden;
            pointer-events: none;
            transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, visibility 160ms ease;
        }

        body.team-page .coverage-zone::before {
            content: "";
            position: absolute;
            inset: 9px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            border-radius: 12px;
        }

        body.team-page .coverage-handle {
            position: absolute;
            right: -9px;
            bottom: -9px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid #fff;
            background: var(--accent);
            box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
            cursor: nwse-resize;
            opacity: 0;
            pointer-events: none;
            transition: opacity 140ms ease, transform 140ms ease;
        }

        body.team-page .field-shell.zones-visible .coverage-zone,
        body.team-page .field-shell.coverage-edit-mode .coverage-zone {
            opacity: 1;
            visibility: visible;
        }

        body.team-page .field-shell.coverage-edit-mode .coverage-zone {
            border-style: solid;
            background: rgba(255, 248, 240, 0.24);
            pointer-events: auto;
        }

        body.team-page .field-shell.coverage-edit-mode .coverage-handle {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1);
        }

        body.team-page .field-shell.has-focus.zones-visible .coverage-zone,
        body.team-page .field-shell.has-focus.coverage-edit-mode .coverage-zone {
            opacity: 0.26;
        }

        body.team-page .field-shell.has-focus.zones-visible .coverage-zone.focused,
        body.team-page .field-shell.has-focus.coverage-edit-mode .coverage-zone.focused {
            opacity: 1;
            border-color: #fff8f0;
            border-style: solid;
            background: rgba(242, 255, 232, 0.34);
            box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.22), 0 0 0 4px rgba(255, 248, 240, 0.18);
        }

        body.team-page .player-token {
            position: absolute;
            left: var(--player-x, 50%);
            top: var(--player-y, 50%);
            z-index: 2;
            transform: translate(-50%, -50%);
            min-width: 112px;
            max-width: 154px;
            padding: 10px 12px;
            border: 2px solid rgba(255, 255, 255, 0.74);
            border-radius: 999px;
            background: linear-gradient(135deg, #f8fff1, #c9ff9c);
            color: #42473e;
            box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
            cursor: grab;
            user-select: none;
            text-align: center;
            font-weight: 900;
            touch-action: none;
            transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
        }

        body.team-page .player-token:active {
            cursor: grabbing;
        }

        body.team-page .field-shell.has-focus .player-token:not(.focused) {
            opacity: 0.7;
        }

        body.team-page .player-token.focused {
            z-index: 4;
            border-color: #fff8f0;
            background: linear-gradient(135deg, #fff8f0, #f4ff8f);
            box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26), 0 0 0 5px rgba(255, 248, 240, 0.26);
        }

        body.team-page .token-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
            margin-right: 5px;
            border-radius: 50%;
            background: #42473e;
            color: #fff8f0;
            font-size: 0.82rem;
        }

        body.team-page .remove-token {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 0;
            padding: 0;
            background: #c8652f;
            color: #fff;
            font-size: 1rem;
            line-height: 1;
            opacity: 0;
            pointer-events: none;
            transform: scale(0.84);
            transition: opacity 140ms ease, transform 140ms ease;
        }

        body.team-page .field-shell.removal-mode .remove-token {
            opacity: 1;
            pointer-events: auto;
            transform: scale(1);
        }

        body.team-page .field-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 14px;
        }

        body.team-page .field-actions .mini-button[aria-pressed="true"] {
            background: var(--accent);
            color: #fff;
            border-color: rgba(200, 101, 47, 0.24);
        }

        body.team-page .empty-state {
            padding: 18px;
            border-radius: var(--radius-md);
            background: rgba(107, 255, 0, 0.08);
            color: var(--muted);
            font-weight: 800;
        }

@media (max-width: 980px) {
body.team-page .layout {
                grid-template-columns: 1fr;
            }

        body.team-page .field-shell {
                min-height: 360px;
            }

        body.team-page .player-token {
                min-width: 96px;
                font-size: 0.88rem;
            }
}

/* Keep page-level link rules from leaking into the shared top navigation. */
body.dashboard-page .site-nav-link,
body.box-page .site-nav-link,
body.card-form-page .site-nav-link,
body.import-page .site-nav-link,
body.margin-page .site-nav-link,
body.order-page .site-nav-link,
body.team-page .site-nav-link,
body.sets-page .site-nav-link,
body.search-page .site-nav-link,
body.players-page .site-nav-link {
    color: #f6fff2;
    text-decoration: none;
    text-decoration-color: transparent;
}

body.dashboard-page .site-nav-add-card,
body.box-page .site-nav-add-card,
body.card-form-page .site-nav-add-card,
body.import-page .site-nav-add-card,
body.margin-page .site-nav-add-card,
body.order-page .site-nav-add-card,
body.team-page .site-nav-add-card,
body.sets-page .site-nav-add-card,
body.search-page .site-nav-add-card,
body.players-page .site-nav-add-card {
    color: var(--ink);
    text-decoration: none;
    text-decoration-color: transparent;
}

body.dashboard-page .site-nav-link:hover,
body.dashboard-page .site-nav-link:focus-visible,
body.box-page .site-nav-link:hover,
body.box-page .site-nav-link:focus-visible,
body.card-form-page .site-nav-link:hover,
body.card-form-page .site-nav-link:focus-visible,
body.import-page .site-nav-link:hover,
body.import-page .site-nav-link:focus-visible,
body.margin-page .site-nav-link:hover,
body.margin-page .site-nav-link:focus-visible,
body.order-page .site-nav-link:hover,
body.order-page .site-nav-link:focus-visible,
body.team-page .site-nav-link:hover,
body.team-page .site-nav-link:focus-visible,
body.sets-page .site-nav-link:hover,
body.sets-page .site-nav-link:focus-visible,
body.search-page .site-nav-link:hover,
body.search-page .site-nav-link:focus-visible,
body.players-page .site-nav-link:hover,
body.players-page .site-nav-link:focus-visible {
    color: #ffffff;
    text-decoration: none;
}

body.dashboard-page .site-nav-add-card:hover,
body.dashboard-page .site-nav-add-card:focus-visible,
body.box-page .site-nav-add-card:hover,
body.box-page .site-nav-add-card:focus-visible,
body.card-form-page .site-nav-add-card:hover,
body.card-form-page .site-nav-add-card:focus-visible,
body.import-page .site-nav-add-card:hover,
body.import-page .site-nav-add-card:focus-visible,
body.margin-page .site-nav-add-card:hover,
body.margin-page .site-nav-add-card:focus-visible,
body.order-page .site-nav-add-card:hover,
body.order-page .site-nav-add-card:focus-visible,
body.team-page .site-nav-add-card:hover,
body.team-page .site-nav-add-card:focus-visible,
body.sets-page .site-nav-add-card:hover,
body.sets-page .site-nav-add-card:focus-visible,
body.search-page .site-nav-add-card:hover,
body.search-page .site-nav-add-card:focus-visible,
body.players-page .site-nav-add-card:hover,
body.players-page .site-nav-add-card:focus-visible {
    color: var(--ink);
    text-decoration: none;
}

body.dashboard-page .site-nav-link.is-active,
body.box-page .site-nav-link.is-active,
body.card-form-page .site-nav-link.is-active,
body.import-page .site-nav-link.is-active,
body.margin-page .site-nav-link.is-active,
body.order-page .site-nav-link.is-active,
body.team-page .site-nav-link.is-active,
body.sets-page .site-nav-link.is-active,
body.search-page .site-nav-link.is-active,
body.players-page .site-nav-link.is-active {
    color: var(--ink);
}

body.dashboard-page .site-nav-logo,
body.box-page .site-nav-logo,
body.card-form-page .site-nav-logo,
body.import-page .site-nav-logo,
body.margin-page .site-nav-logo,
body.order-page .site-nav-logo,
body.team-page .site-nav-logo,
body.sets-page .site-nav-logo,
body.search-page .site-nav-logo,
body.players-page .site-nav-logo {
    color: inherit;
    text-decoration: none;
}


/* sets.php */
body.sets-page {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-heading);
    background:
        linear-gradient(rgba(107, 255, 0, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 255, 0, 0.035) 1px, transparent 1px),
        #efefef;
    background-size: 46px 46px;
    min-height: 100vh;
}

body.sets-page .page {
    width: min(1500px, calc(100% - 36px));
    margin: 24px auto 56px;
}

body.sets-page .hero-actions,
body.sets-page .set-hero-stats,
body.sets-page .set-card-title-row,
body.sets-page .merge-set-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}



body.sets-page .set-hero-stats {
    margin-top: 18px;
}

body.sets-page .set-hero-stats span,
body.sets-page .set-card-statuses span,
body.sets-page .set-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    background: rgba(107, 255, 0, 0.13);
    border: 1px solid rgba(107, 255, 0, 0.18);
    color: #f6fff2;
    font-weight: 900;
}

body.sets-page .alert,
body.sets-page .success {
    margin-top: 18px;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-weight: 900;
}

body.sets-page .alert {
    background: rgba(255, 92, 53, 0.1);
    border: 1px solid rgba(255, 92, 53, 0.22);
    color: #b23517;
}

body.sets-page .success {
    background: rgba(107, 255, 0, 0.12);
    border: 1px solid rgba(107, 255, 0, 0.22);
    color: var(--good);
}

body.sets-page .sets-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 22px;
}

body.sets-page .panel,
body.sets-page .set-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(66, 71, 62, 0.12);
    box-shadow: 0 18px 46px rgba(66, 71, 62, 0.1);
}

body.sets-page .panel {
    padding: 22px;
}

body.sets-page h2 {
    margin: 0 0 14px;
    font-size: 1.8rem;
    line-height: 1;
}

body.sets-page .set-form,
body.sets-page .field {
    display: grid;
    gap: 10px;
}

body.sets-page .set-form {
    gap: 14px;
}

body.sets-page label {
    font-weight: 900;
}

body.sets-page input,
body.sets-page select {
    width: 100%;
    border: 1px solid rgba(66, 71, 62, 0.14);
    border-radius: 14px;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    font: inherit;
}

body.sets-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

body.sets-page button:hover,
body.sets-page button:focus-visible {
    background: #b7ff7a;
    transform: translateY(-1px);
    outline: none;
}

body.sets-page button.button-warning {
    background: rgba(255, 92, 53, 0.14);
    border-color: rgba(255, 92, 53, 0.28);
    color: #b23517;
}

body.sets-page button.button-warning:hover,
body.sets-page button.button-warning:focus-visible {
    background: rgba(255, 92, 53, 0.22);
}

body.sets-page .sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

body.sets-page .set-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

body.sets-page .set-card:hover,
body.sets-page .set-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(107, 255, 0, 0.44);
    box-shadow: 0 22px 54px rgba(66, 71, 62, 0.14);
    outline: none;
}

body.sets-page .set-card h2 {
    margin: 0 0 4px;
    font-size: 1.65rem;
}

body.sets-page .set-card > strong {
    color: var(--good);
    font-size: 3rem;
    line-height: 0.9;
}

body.sets-page .set-card > div > span {
    color: var(--muted);
    font-weight: 800;
}

body.sets-page .set-card-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.sets-page .set-card-statuses span {
    padding: 7px 9px;
    color: var(--ink);
    background: rgba(107, 255, 0, 0.11);
}

body.sets-page .set-detail-panel,
body.sets-page .merge-set-panel {
    margin-top: 22px;
}

body.sets-page .set-card-table {
    width: 100%;
    border-collapse: collapse;
}

body.sets-page .set-card-table th,
body.sets-page .set-card-table td {
    padding: 13px 10px;
    border-bottom: 1px solid rgba(66, 71, 62, 0.1);
    text-align: left;
    vertical-align: middle;
}

body.sets-page .set-card-table th {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.sets-page .set-card-title-row {
    flex-wrap: nowrap;
}

body.sets-page .set-card-title-row > div {
    min-width: 0;
}

body.sets-page .set-card-thumb {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(66, 71, 62, 0.14);
    box-shadow: 0 8px 18px rgba(66, 71, 62, 0.12);
}

body.sets-page .set-card-name {
    color: inherit;
    text-decoration: none;
}

body.sets-page .set-card-name:hover,
body.sets-page .set-card-name:focus-visible {
    color: var(--good);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
}

body.sets-page .table-note {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

body.sets-page .set-status {
    color: var(--ink);
    white-space: nowrap;
}

body.sets-page .set-status.is-sold {
    background: rgba(107, 255, 0, 0.18);
}

body.sets-page .set-status.is-listed {
    background: rgba(255, 255, 255, 0.75);
}

body.sets-page .set-status.is-pc {
    background: rgba(66, 71, 62, 0.12);
}

body.sets-page .set-status.is-waiting {
    background: rgba(255, 92, 53, 0.14);
}

body.sets-page .merge-set-panel {
    display: grid;
    gap: 14px;
}

body.sets-page .merge-set-panel p {
    margin: -8px 0 0;
    color: var(--muted);
    font-weight: 800;
}

body.sets-page .merge-set-form select {
    max-width: 420px;
}

body.sets-page .empty-state {
    color: var(--muted);
    font-weight: 900;
}

@media (max-width: 860px) {
    body.sets-page .sets-layout {
        grid-template-columns: 1fr;
    }

    body.sets-page .set-card-table,
    body.sets-page .set-card-table tbody,
    body.sets-page .set-card-table tr,
    body.sets-page .set-card-table td {
        display: block;
        width: 100%;
    }

    body.sets-page .set-card-table thead {
        display: none;
    }

    body.sets-page .set-card-table tr {
        padding: 12px 0;
        border-bottom: 1px solid rgba(66, 71, 62, 0.1);
    }

    body.sets-page .set-card-table td {
        padding: 6px 0;
        border-bottom: 0;
    }
}


/* search.php */
body.search-page {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-heading);
}

body.search-page .page {
   padding: 20px;
}



body.search-page .search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    flex: 1 1 520px;
    max-width: 760px;
}

body.search-page input[type="search"] {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(66, 71, 62, 0.04);
}

body.search-page input[type="search"]:focus {
    outline: 3px solid rgba(107, 255, 0, 0.28);
    outline-offset: 2px;
}

body.search-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

body.search-page button:hover,
body.search-page button:focus-visible {
    background: #b7ff7a;
    transform: translateY(-1px);
    outline: none;
}

body.search-page .search-clear-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(66, 71, 62, 0.12);
    color: var(--ink);
    font-weight: 900;
    text-decoration: none;
    transition: background 140ms ease, transform 140ms ease;
}

body.search-page .search-clear-link:hover,
body.search-page .search-clear-link:focus-visible {
    background: rgba(66, 71, 62, 0.2);
    transform: translateY(-1px);
    outline: none;
}

body.search-page .search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

body.search-page .search-result-card {
    display: grid;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

body.search-page .search-result-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background:
        radial-gradient(circle at 76% 14%, rgba(107, 255, 0, 0.22), transparent 34%),
        rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(66, 71, 62, 0.12);
    box-shadow: 0 16px 38px rgba(66, 71, 62, 0.11);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.search-page .search-result-card:hover .search-result-image-wrap,
body.search-page .search-result-card:focus-visible .search-result-image-wrap {
    transform: translateY(-3px);
    border-color: rgba(107, 255, 0, 0.46);
    box-shadow: 0 24px 54px rgba(66, 71, 62, 0.16);
}

body.search-page .search-result-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

body.search-page .search-result-image-wrap > span:not(.search-result-sold-badge):not(.search-result-pc-badge):not(.search-result-owner) {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font-size: 2em;
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(66, 71, 62, 0.16);
}

body.search-page .search-result-sold-badge,
body.search-page .search-result-pc-badge {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    font-weight: 1000;
    line-height: 1;
    pointer-events: none;
}

body.search-page .search-result-sold-badge {
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #ff0000, #a90000);
    color: #f7fff0;
    font-size: 28px;
}

body.search-page .search-result-pc-badge {
    right: 6px;
    bottom: 6px;
    min-width: 44px;
    min-height: 30px;
    padding: 0 10px;
    background: linear-gradient(145deg, var(--green), #2cb800);
    color: var(--ink);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(66, 71, 62, 0.18);
}
body.search-page .search-result-owner {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(107, 255, 0, 0.28), rgba(255, 255, 255, 0.18)),
        rgba(66, 71, 62, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 5px 12px rgba(66, 71, 62, 0.18);
}

body.search-page .search-result-owner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.search-page .search-result-owner span {
    color: #42473e;
    font-size: 0.72rem;
    font-weight: 950;
}

body.search-page .search-result-owner.is-unassigned {
    opacity: 0.72;
    filter: grayscale(0.25);
}

body.search-page .search-result-card strong {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.08;
}

body.search-page .search-result-card:hover strong,
body.search-page .search-result-card:focus-visible strong {
    color: var(--good);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
}

body.search-page .empty-state,
body.search-page .alert {
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(66, 71, 62, 0.12);
    color: var(--muted);
    font-weight: 900;
}

body.search-page .alert {
    color: #b23517;
    background: rgba(255, 92, 53, 0.1);
    border-color: rgba(255, 92, 53, 0.22);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .hero-top {
        align-items: flex-start;
        flex-direction: column;
    }

    body.search-page .search-page-form {
        grid-template-columns: 1fr;
        flex-basis: auto;
        max-width: none;
        width: 100%;
    }

    body.search-page .search-results {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Players */
body.players-page {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-heading);
    background:
        radial-gradient(circle at 18% 0%, rgba(107, 255, 0, 0.16), transparent 28%),
        linear-gradient(rgba(107, 255, 0, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 255, 0, 0.035) 1px, transparent 1px),
        #efefef;
    background-size: auto, 46px 46px, 46px 46px, auto;
    min-height: 100vh;
}

body.players-page .page {
    width: min(1500px, calc(100% - 36px));
    margin: 24px auto 56px;
}

body.players-page .hero-actions,
body.players-page .set-hero-stats,
body.players-page .set-card-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}



body.players-page .set-hero-stats {
    margin-top: 18px;
}

body.players-page .set-hero-stats span,
body.players-page .set-card-statuses span,
body.players-page .set-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    background: rgba(107, 255, 0, 0.13);
    border: 1px solid rgba(107, 255, 0, 0.18);
    color: #f6fff2;
    font-weight: 900;
}

body.players-page .alert,
body.players-page .success {
    margin-top: 18px;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-weight: 900;
}

body.players-page .alert {
    background: rgba(255, 92, 53, 0.1);
    border: 1px solid rgba(255, 92, 53, 0.22);
    color: #b23517;
}

body.players-page .success {
    background: rgba(107, 255, 0, 0.12);
    border: 1px solid rgba(107, 255, 0, 0.22);
    color: var(--good);
}

body.players-page .players-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 22px;
}

body.players-page .panel,
body.players-page .player-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(66, 71, 62, 0.12);
    box-shadow: 0 18px 46px rgba(66, 71, 62, 0.1);
}

body.players-page .panel {
    padding: 22px;
}

body.players-page h2 {
    margin: 0 0 14px;
    font-size: 1.8rem;
    line-height: 1;
}

body.players-page .set-form,
body.players-page .field {
    display: grid;
    gap: 10px;
}

body.players-page .set-form {
    gap: 14px;
}

body.players-page label {
    font-weight: 900;
}

body.players-page input,
body.players-page select {
    width: 100%;
    border: 1px solid rgba(66, 71, 62, 0.14);
    border-radius: 14px;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    font: inherit;
}

body.players-page button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background 140ms ease, transform 140ms ease;
}

body.players-page button:hover,
body.players-page button:focus-visible {
    background: #b7ff7a;
    transform: translateY(-1px);
    outline: none;
}

body.players-page .players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

body.players-page .player-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 14px;
    min-height: 176px;
    padding: 18px;
    color: var(--ink);
    text-decoration: none;
    background:
        radial-gradient(circle at 82% 16%, rgba(107, 255, 0, 0.24), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(238, 245, 232, 0.78));
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

body.players-page .player-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.72) 48%, rgba(107, 255, 0, 0.08) 100%);
    pointer-events: none;
}

body.players-page .player-card > * {
    position: relative;
    z-index: 1;
}

body.players-page .player-card.has-image {
    background:
        radial-gradient(circle at 90% 8%, rgba(107, 255, 0, 0.28), transparent 36%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 236, 219, 0.84));
}

body.players-page .player-card-image,
body.players-page .player-card-initial {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: stretch;
    min-height: 132px;
    border-radius: 22px;
    border: 1px solid rgba(66, 71, 62, 0.14);
    box-shadow: 0 14px 34px rgba(66, 71, 62, 0.16);
}

body.players-page .player-card-image {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
}

body.players-page .player-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 132px;
    border-radius: inherit;
    object-fit: cover;
}

body.players-page .player-card-initial {
    display: grid;
    place-items: center;
    background: var(--green);
    color: var(--ink);
    font-size: 3.2rem;
    font-weight: 1000;
}

body.players-page .player-card-copy {
    align-self: start;
}

body.players-page .player-card:hover,
body.players-page .player-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(107, 255, 0, 0.44);
    box-shadow: 0 22px 54px rgba(66, 71, 62, 0.14);
    outline: none;
}

body.players-page .player-card h2 {
    margin: 0 0 4px;
    font-size: 1.65rem;
}

body.players-page .player-card > strong {
    grid-column: 1;
    justify-self: start;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1;
}

body.players-page .player-card > div > span {
    color: var(--muted);
    font-weight: 800;
}

body.players-page .set-card-statuses {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.players-page .set-card-statuses span {
    padding: 7px 9px;
    color: var(--ink);
    background: rgba(107, 255, 0, 0.11);
}

body.players-page .player-edit-panel,
body.players-page .player-card-panel {
    margin-top: 22px;
}

body.players-page .set-card-table {
    width: 100%;
    border-collapse: collapse;
}

body.players-page .set-card-table th,
body.players-page .set-card-table td {
    padding: 13px 10px;
    border-bottom: 1px solid rgba(66, 71, 62, 0.1);
    text-align: left;
    vertical-align: middle;
}

body.players-page .set-card-table th {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.players-page .set-card-title-row {
    min-width: 220px;
    flex-wrap: nowrap;
}

body.players-page .set-card-thumb {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(66, 71, 62, 0.14);
    box-shadow: 0 8px 18px rgba(66, 71, 62, 0.12);
}

body.players-page .set-card-name {
    color: inherit;
    text-decoration: none;
}

body.players-page .set-card-name:hover,
body.players-page .set-card-name:focus-visible {
    color: var(--good);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
}

body.players-page .table-note {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

body.players-page .set-status {
    color: var(--ink);
    white-space: nowrap;
}

body.players-page .set-status.is-sold {
    background: rgba(107, 255, 0, 0.18);
}

body.players-page .set-status.is-listed {
    background: rgba(255, 255, 255, 0.75);
}

body.players-page .set-status.is-pc {
    background: rgba(66, 71, 62, 0.12);
}

body.players-page .set-status.is-waiting {
    background: rgba(255, 92, 53, 0.14);
}

body.players-page .empty-state {
    color: var(--muted);
    font-weight: 900;
}

@media (max-width: 860px) {
    body.players-page .players-layout {
        grid-template-columns: 1fr;
    }

    body.players-page .player-card {
        grid-template-columns: minmax(0, 1fr) 82px;
    }

    body.players-page .player-card-image,
    body.players-page .player-card-initial,
    body.players-page .player-card-image img {
        min-height: 112px;
    }

    body.players-page .set-card-table,
    body.players-page .set-card-table tbody,
    body.players-page .set-card-table tr,
    body.players-page .set-card-table td {
        display: block;
        width: 100%;
    }

    body.players-page .set-card-table thead {
        display: none;
    }

    body.players-page .set-card-table tr {
        padding: 12px 0;
        border-bottom: 1px solid rgba(66, 71, 62, 0.1);
    }

    body.players-page .set-card-table td {
        padding: 6px 0;
        border-bottom: 0;
    }
}


/* owner.php */
body.owner-page .owner-page-shell {
    width: min(100% - 20px, 1680px);
    margin: 10px auto 42px;
}

body.dashboard-page .owner-summary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(107, 255, 0, 0.14);
    color: var(--ink);
    font-weight: 900;
    text-decoration: none;
}

body.dashboard-page .owner-summary-link:hover,
body.dashboard-page .owner-summary-link:focus-visible {
    background: var(--green);
    color: var(--ink);
    outline: none;
}

body.owner-page .owner-hero-card,
body.owner-page .owner-section-panel,
body.owner-page .owner-directory-card {
    border: 1px solid rgba(66, 71, 62, 0.14);
    box-shadow: 0 24px 70px rgba(66, 71, 62, 0.12);
}

body.owner-page .owner-hero-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: clamp(18px, 3vw, 34px);
    background: #42473e;
    border-radius: 34px;
    color: #f6fff2;
}

body.owner-page .owner-hero-card > * {
    position: relative;
    z-index: 1;
}

body.owner-page .owner-hero-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

body.owner-page .owner-hero-photo,
body.owner-page .owner-directory-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 28px;
    background: var(--green);
    color: var(--ink);
    font-weight: 1000;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

body.owner-page .owner-hero-photo {
    width: clamp(88px, 10vw, 132px);
    height: clamp(88px, 10vw, 132px);
    font-size: clamp(2.6rem, 5vw, 4.8rem);
}

body.owner-page .owner-hero-photo img,
body.owner-page .owner-directory-photo img,
body.owner-page .owner-card-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

body.owner-page .owner-hero-card .eyebrow,
body.owner-page .owner-section-panel .eyebrow {
    color: var(--green);
}

body.owner-page .owner-hero-card h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.86;
    letter-spacing: 0;
}

body.owner-page .owner-hero-card p {
    margin: 12px 0 0;
    color: rgba(246, 255, 242, 0.78);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
}

body.owner-page .owner-hero-spend {
    justify-self: end;
    text-align: right;
}

body.owner-page .owner-hero-spend span,
body.owner-page .owner-hero-metrics span,
body.owner-page .owner-card-details small {
    display: block;
    color: rgba(246, 255, 242, 0.7);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.owner-page .owner-hero-spend strong {
    display: block;
    color: var(--green);
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 0.95;
}

body.owner-page .owner-hero-spend strong.is-good {
    color: var(--green) !important;
}

body.owner-page .owner-hero-spend strong.is-alert,
body.owner-page .owner-directory-card b.is-alert {
    color: var(--accent) !important;
}

body.owner-page .owner-directory-card b.is-good {
    color: var(--green) !important;
}

body.owner-page .owner-summary-bar,
body.owner-page .owner-summary-statuses,
body.owner-page .owner-hero-metrics,
body.owner-page .owner-section-jumps {
    grid-column: 1 / -1;
}

body.owner-page .owner-summary-track {
    height: 22px;
    border-radius: 999px;
    padding: 4px;
    background: rgba(246, 255, 242, 0.22);
}

body.owner-page .owner-summary-statuses {
    justify-content: flex-start;
}

body.owner-page .owner-hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

body.owner-page .owner-hero-metrics div {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.owner-page .owner-hero-metrics strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 2rem);
}

body.owner-page .owner-section-jumps {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.owner-page .owner-section-panel {
    margin-top: 18px;
    padding: clamp(16px, 2.4vw, 24px);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
}

body.owner-page .owner-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

body.owner-page .owner-section-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 0.9;
}

body.owner-page .owner-card-grid,
body.owner-page .owner-directory-grid {
    display: grid;
    gap: 14px;
}

body.owner-page .owner-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

body.owner-page .owner-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 8%, rgba(107, 255, 0, 0.18), transparent 34%),
        #f7fff3;
    border: 1px solid rgba(66, 71, 62, 0.1);
}

body.owner-page .owner-card-main {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
}

body.owner-page .owner-card-thumb {
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 74px;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    background: var(--green);
    color: var(--ink);
    font-size: 2.3rem;
    font-weight: 1000;
}

body.owner-page .owner-card-copy strong,
body.owner-page .owner-card-copy small,
body.owner-page .owner-card-details span,
body.owner-page .owner-card-details strong,
body.owner-page .owner-card-details small {
    display: block;
}

body.owner-page .owner-card-copy strong {
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.05;
}

body.owner-page .owner-card-copy small,
body.owner-page .owner-card-details span {
    margin-top: 5px;
    color: var(--muted);
    font-weight: 800;
}

body.owner-page .owner-card-details {
    padding: 12px;
    border-radius: 16px;
    background: rgba(66, 71, 62, 0.06);
}

body.owner-page .owner-card-details small {
    margin-top: 4px;
    color: var(--muted);
}

body.owner-page .owner-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.owner-page .owner-directory-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.owner-page .owner-directory-card {
    display: grid;
    gap: 10px;
    justify-items: start;
    padding: 18px;
    border-radius: 24px;
    background: #f7fff3;
    color: var(--ink);
    text-decoration: none;
}

body.owner-page .owner-directory-card:hover,
body.owner-page .owner-directory-card:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

body.owner-page .owner-directory-photo {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 2.4rem;
}

body.owner-page .owner-directory-card strong {
    font-size: 1.6rem;
}

body.owner-page .owner-directory-card span:last-child {
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 760px) {
    body.owner-page .owner-hero-card,
    body.owner-page .owner-hero-metrics {
        grid-template-columns: 1fr;
    }

    body.owner-page .owner-hero-identity,
    body.owner-page .owner-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    body.owner-page .owner-hero-spend {
        justify-self: start;
        text-align: left;
    }
}

body.card-form-page .danger-zone-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    border-color: rgba(187, 77, 32, 0.28);
    background: rgba(187, 77, 32, 0.08);
}

body.card-form-page .danger-zone-panel h3 {
    margin: 0 0 6px;
    color: var(--accent);
}

body.card-form-page .danger-zone-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

body.card-form-page .delete-card-form {
    margin: 0;
    flex: 0 0 auto;
}

body.card-form-page button.delete-card-button,
body.card-form-page button.delete-card-button:not(.mini-button) {
    background: #bb4d20;
    color: #fff;
    border-color: rgba(187, 77, 32, 0.32);
}

body.card-form-page button.delete-card-button:hover,
body.card-form-page button.delete-card-button:focus-visible {
    background: #963816;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 720px) {
    body.card-form-page .danger-zone-panel {
        align-items: stretch;
        flex-direction: column;
    }

    body.card-form-page .delete-card-form,
    body.card-form-page .delete-card-button {
        width: 100%;
    }
}

.site-nav-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid rgba(246, 255, 242, 0.16);
    border-radius: 999px;
    color: #ffffff !important;
    font-weight: 900;
    white-space: nowrap;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.site-nav-logout:hover,
.site-nav-logout:focus-visible {
    border-color: rgba(107, 255, 0, 0.45);
    background: rgba(107, 255, 0, 0.12);
    color: #fff;
    transform: translateY(-1px);
    outline: none;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(107, 255, 0, 0.24), transparent 30%),
        linear-gradient(135deg, #f2fbf0 0%, #dcebd6 45%, #42473e 100%);
    color: var(--ink);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 64px);
}

.auth-card {
    width: min(100%, 460px);
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: var(--radius-xl);
    background: rgba(246, 255, 242, 0.92);
    box-shadow: 0 28px 80px rgba(66, 71, 62, 0.24);
    backdrop-filter: blur(14px);
}

.auth-mark {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font-weight: 1000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.auth-card p {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.45;
}

.auth-form {
    display: grid;
    gap: 10px;
}

.auth-form label {
    color: var(--ink);
    font-weight: 900;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(66, 71, 62, 0.14);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 12px 14px;
}

.auth-form button {
    min-height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 1000;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.auth-form button:hover,
.auth-form button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(107, 255, 0, 0.24);
    outline: none;
}

.auth-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.auth-alert.error {
    border: 1px solid rgba(187, 77, 32, 0.2);
    background: rgba(187, 77, 32, 0.1);
    color: var(--accent);
}

.auth-alert.success {
    border: 1px solid rgba(107, 255, 0, 0.24);
    background: rgba(107, 255, 0, 0.16);
    color: var(--ink);
}

.auth-help {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

/* Public storefront */
body.public-storefront-page {
    min-height: 100vh;
    margin: 0;
    background-color: #080a08;
    overscroll-behavior-y: none;
    background:
        radial-gradient(circle at 12% -8%, rgba(107, 255, 0, 0.18), transparent 28rem),
        radial-gradient(circle at 92% 2%, rgba(255, 255, 255, 0.08), transparent 24rem),
        linear-gradient(135deg, #10130f 0%, #1c211b 42%, #080a08 100%);
    color: #fffaf0;
}

.public-storefront-header {
    padding: clamp(18px, 3vw, 34px) clamp(16px, 4vw, 56px) 10px;
}

.public-storefront-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.public-storefront-brand,
.public-storefront-login,
.public-listing-actions a {
    color: inherit;
    text-decoration: none;
}

.public-storefront-brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    color: #fffaf0;
}

.public-storefront-brand img {
    width: clamp(96px, 10vw, 148px);
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 250, 240, 0.12);
}

.public-storefront-store-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-left: 0;
}

.public-storefront-store-links a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid rgba(255, 250, 240, 0.16);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.08);
    color: #fffaf0;
    padding: 0 16px;
    font-weight: 1000;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.public-storefront-store-links a:hover,
.public-storefront-store-links a:focus-visible {
    background: #6bff00;
    color: #171d14;
    transform: translateY(-1px);
    outline: none;
}

.public-storefront-store-links a.public-storefront-dashboard-link {
    border-color: rgba(107, 255, 0, 0.42);
    background: #6bff00;
    color: #171d14;
}

.public-storefront-store-links a.public-storefront-dashboard-link:hover,
.public-storefront-store-links a.public-storefront-dashboard-link:focus-visible {
    background: #fffaf0;
    color: #171d14;
}

.public-storefront-login {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid rgba(255, 250, 240, 0.18);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 250, 240, 0.86);
    font-weight: 900;
}

.public-storefront-login:hover,
.public-storefront-login:focus-visible {
    background: #6bff00;
    color: #171d14;
    outline: none;
}

.public-storefront-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(16px, 2.2vw, 34px) clamp(16px, 3vw, 46px) 72px;
}

.public-storefront-command-center {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(16px, 2.4vw, 34px);
    align-items: start;
    margin: 0 0 clamp(18px, 2.6vw, 34px);
}

.public-storefront-command-main {
    min-width: 0;
}

.public-storefront-listing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 clamp(16px, 2vw, 26px);
    border-bottom: 1px solid rgba(255, 250, 240, 0.12);
    padding-bottom: 12px;
}

.public-storefront-listing-head h1 {
    margin: 0;
    color: #fffaf0;
    font-size: clamp(1.7rem, 2.2vw, 2.2rem);
    line-height: 0.92;
    letter-spacing: 0;
}

.public-storefront-head-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.public-storefront-head-actions > span {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(107, 255, 0, 0.13);
    padding: 10px 14px;
    color: #6bff00;
    font-weight: 1000;
}

.public-storefront-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px) auto auto;
    gap: 12px;
    align-items: end;
    margin: 0;
    border: 1px solid rgba(255, 250, 240, 0.1);
    border-radius: 26px;
    background: rgba(255, 250, 240, 0.07);
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.public-storefront-tools label {
    display: grid;
    gap: 6px;
}

.public-storefront-tools label span {
    color: rgba(255, 250, 240, 0.62);
    font-size: 0.74rem;
    font-weight: 1000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-storefront-tools input,
.public-storefront-tools select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 250, 240, 0.13);
    border-radius: 18px;
    background: rgba(8, 10, 8, 0.52);
    color: #fffaf0;
    font: inherit;
    font-weight: 850;
    padding: 0 14px;
    outline: none;
}

.public-storefront-tools input::placeholder {
    color: rgba(255, 250, 240, 0.42);
}

.public-storefront-tools input:focus,
.public-storefront-tools select:focus {
    border-color: rgba(107, 255, 0, 0.7);
    box-shadow: 0 0 0 4px rgba(107, 255, 0, 0.12);
}

.public-storefront-tools button,
.public-storefront-tools a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    font: inherit;
    font-weight: 1000;
    text-decoration: none;
    cursor: pointer;
}

.public-storefront-tools button {
    background: #6bff00;
    color: #171d14;
}

.public-storefront-tools a {
    background: rgba(255, 250, 240, 0.1);
    color: rgba(255, 250, 240, 0.8);
}

.public-storefront-tools button:hover,
.public-storefront-tools button:focus-visible,
.public-storefront-tools a:hover,
.public-storefront-tools a:focus-visible {
    background: #fffaf0;
    color: #171d14;
    outline: none;
}

.public-storefront-alert,
.public-storefront-empty {
    border: 1px solid rgba(255, 250, 240, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.07);
    padding: 24px;
    color: #fffaf0;
    font-weight: 900;
}

.public-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: clamp(14px, 1.4vw, 24px);
}

.public-listing-card {
    overflow: hidden;
    border: 1px solid rgba(255, 250, 240, 0.1);
    border-radius: 30px;
    background: rgba(255, 250, 240, 0.08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.public-listing-card:hover,
.public-listing-card:focus-within {
    border-color: rgba(107, 255, 0, 0.38);
    background: rgba(255, 250, 240, 0.12);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(107, 255, 0, 0.12);
    transform: translateY(-4px);
}

.public-listing-image-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 50% 18%, rgba(255, 250, 240, 0.08), transparent 42%), #20261f;
}

.public-listing-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 220ms ease;
}

.public-listing-card:hover .public-listing-image-wrap img,
.public-listing-card:focus-within .public-listing-image-wrap img {
    transform: scale(1.02);
}

.public-listing-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(circle at 34% 22%, rgba(107, 255, 0, 0.24), transparent 32%),
        repeating-linear-gradient(135deg, rgba(255, 250, 240, 0.06) 0 8px, transparent 8px 16px),
        #252b24;
    color: #fffaf0;
    font-size: 5rem;
    font-weight: 1000;
}

.public-listing-placeholder span {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border-radius: 999px;
    background: #6bff00;
    color: #171d14;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.public-listing-glare {
    position: absolute;
    inset: -35%;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.58) 48%, rgba(107, 255, 0, 0.24) 55%, transparent 68%);
    mix-blend-mode: screen;
    opacity: 0.68;
    transform: translateX(-52%) rotate(8deg);
    transition: transform 460ms ease, opacity 220ms ease;
}

.public-listing-card:hover .public-listing-glare,
.public-listing-card:focus-within .public-listing-glare {
    opacity: 1;
    transform: translateX(48%) rotate(8deg);
}

.public-listing-hot {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 237, 177, 0.48);
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3d00 0%, #ff8a00 52%, #ffd166 100%);
    padding: 9px 13px;
    color: #2b0900;
    font-size: 0.82rem;
    font-weight: 1000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.26),
        0 0 18px rgba(255, 105, 0, 0.56),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
    transform-origin: 50% 55%;
    animation: public-hot-sizzle 780ms ease-in-out infinite alternate;
}

.public-listing-hot::before {
    content: "🔥";
    display: inline-block;
    font-size: 1.12rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 115, 0, 0.72));
    transform-origin: 50% 80%;
    animation: public-hot-flame 580ms ease-in-out infinite alternate;
}

.public-listing-hot::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(255, 111, 0, 0.42), transparent 66%);
    opacity: 0.7;
    filter: blur(5px);
    animation: public-hot-heat 1200ms ease-in-out infinite;
}

@keyframes public-hot-sizzle {
    0% {
        transform: translateY(1px) rotate(-4deg) scale(1);
    }
    35% {
        transform: translateY(-2px) rotate(4deg) scale(1.08);
    }
    68% {
        transform: translateY(1px) rotate(-3deg) scale(1.04);
    }
    100% {
        transform: translateY(-1px) rotate(3deg) scale(1.1);
    }
}

@keyframes public-hot-flame {
    from {
        transform: translateY(2px) rotate(-14deg) scale(0.92);
    }
    to {
        transform: translateY(-2px) rotate(13deg) scale(1.28);
    }
}

@keyframes public-hot-heat {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.96);
    }
    50% {
        opacity: 0.86;
        transform: scale(1.16);
    }
}

.public-listing-body {
    padding: 18px;
}

.public-listing-set {
    margin: 0 0 7px;
    color: rgba(255, 250, 240, 0.58);
    font-size: 0.78rem;
    font-weight: 1000;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.public-listing-body h2 {
    min-height: 3.2em;
    margin: 0;
    color: #fffaf0;
    font-size: 1.3rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.public-listing-price {
    margin-top: 14px;
    color: #6bff00;
    font-size: 1.6rem;
    font-weight: 1000;
    letter-spacing: 0;
}

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

.public-listing-actions a,
.public-listing-actions span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 0 13px;
    background: rgba(255, 250, 240, 0.12);
    color: #fffaf0;
    font-size: 0.86rem;
    font-weight: 1000;
}

.public-listing-actions a:first-child {
    background: #6bff00;
    color: #171d14;
}

.public-listing-actions a:hover,
.public-listing-actions a:focus-visible {
    background: #fffaf0;
    color: #171d14;
    outline: none;
}

.public-listing-actions span {
    background: rgba(255, 250, 240, 0.08);
    color: rgba(255, 250, 240, 0.62);
}

@media (max-width: 760px) {
    .public-storefront-nav {
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .public-storefront-command-center {
        grid-template-columns: 1fr;
    }

    .public-storefront-brand {
        justify-self: center;
    }

    .public-storefront-listing-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-storefront-head-actions {
        justify-content: flex-start;
    }

    .public-storefront-tools {
        grid-template-columns: 1fr;
    }

    .public-storefront-tools button,
    .public-storefront-tools a {
        width: 100%;
    }

    .public-storefront-store-links {
        justify-content: flex-start;
        margin-left: 0;
    }

    .public-listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .public-listing-body {
        padding: 14px;
    }
}

.public-listing-card-link,
.public-listing-body h2 a {
    color: inherit;
    text-decoration: none;
}

.public-listing-body h2 a:hover,
.public-listing-body h2 a:focus-visible {
    color: #6bff00;
    outline: none;
}

.public-card-shell {
    display: grid;
    gap: clamp(18px, 3vw, 34px);
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 46px) 0 72px;
}

.public-card-logo {
    --public-card-logo-size: clamp(64px, 7vw, 96px);
    justify-self: center;
    display: inline-flex;
    width: var(--public-card-logo-size);
    height: var(--public-card-logo-size);
    overflow: hidden;
    border-radius: 28px;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 250, 240, 0.12);
}

.public-card-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.public-card-panel {
    display: grid;
    grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 1fr);
    gap: clamp(20px, 4vw, 54px);
    align-items: center;
    border: 1px solid rgba(255, 250, 240, 0.12);
    border-radius: clamp(28px, 4vw, 46px);
    background: rgba(255, 250, 240, 0.08);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.24);
    padding: clamp(18px, 3vw, 38px);
}

.public-card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    background: radial-gradient(circle at 50% 18%, rgba(255, 250, 240, 0.08), transparent 42%), #20261f;
    box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.1), 0 24px 70px rgba(0, 0, 0, 0.24);
}

.public-card-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-card-copy p {
    margin: 0 0 12px;
    color: rgba(255, 250, 240, 0.62);
    font-weight: 1000;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-card-copy h1,
.public-card-panel > h1 {
    margin: 0;
    color: #fffaf0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: 0;
}

.public-card-price {
    margin-top: 22px;
    color: #6bff00;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 1000;
    letter-spacing: 0;
}

.public-card-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.public-card-buy-actions,
.public-card-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.public-card-view-actions {
    padding-top: 2px;
}

.public-card-actions a,
.public-card-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    background: #6bff00;
    color: #171d14;
    padding: 0 18px;
    font-weight: 1000;
    text-decoration: none;
}

.public-card-actions a.secondary {
    background: rgba(255, 250, 240, 0.12);
    color: #fffaf0;
}

.public-card-actions a:hover,
.public-card-actions a:focus-visible,
.public-card-back:hover,
.public-card-back:focus-visible {
    background: #fffaf0;
    color: #171d14;
    outline: none;
}

.public-card-edit-float {
    position: fixed;
    right: clamp(18px, 3vw, 34px);
    bottom: clamp(18px, 3vw, 34px);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 2px solid rgba(255, 250, 240, 0.5);
    border-radius: 999px;
    background: linear-gradient(135deg, #6bff00 0%, #d9ff65 100%);
    color: #171d14;
    padding: 0 20px;
    font-weight: 1000;
    text-decoration: none;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34), 0 0 22px rgba(107, 255, 0, 0.28);
}

.public-card-edit-float:hover,
.public-card-edit-float:focus-visible {
    background: #fffaf0;
    color: #171d14;
    outline: none;
    transform: translateY(-2px);
}


@media (max-width: 780px) {
    .public-card-panel {
        grid-template-columns: 1fr;
    }
}

.public-sport-pills {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
.public-sport-pills a {display:inline-flex;align-items:center;padding:8px 16px;border-radius:999px;border:1px solid #b5c9a8;background:#f6fff2;color:#263c1c;font-family:var(--font-body);font-size:17px;font-weight:700;}
.public-sport-pills a:hover,.public-sport-pills a[aria-current="page"] {background:#b2ea89;border-color:#71a349;color:#172310;}
.public-sport-pills a:focus-visible {outline:3px solid #378400;outline-offset:3px;}

body.search-page .search-result-count {margin:16px 0;color:var(--ink);}
body.search-page .search-pagination {display:flex;align-items:center;justify-content:center;gap:18px;margin:24px 0;}
body.search-page .search-pagination a {padding:10px 18px;border-radius:999px;background:var(--paper-strong);color:var(--ink);border:1px solid var(--line);}

.public-owner-header {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(18px, 2.6vw, 34px);
}

.public-owner-header {
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.public-owner-status {
    justify-content: center;
    margin: 0;
}

.public-owner-card-link {
    color: inherit;
    text-decoration: none;
}
.public-owner-card-link:focus-visible {
    outline: 3px solid #b2ea89;
    outline-offset: 4px;
}

.public-card-image-wrap { position: relative; }
.public-card-sold-stamp {
    position: absolute;
    z-index: 2;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-16deg);
    border: 4px double currentColor;
    border-radius: 8px;
    padding: 6px 14px;
    color: #b51e26;
    background: rgba(255, 249, 233, .92);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .2);
    pointer-events: none;
}
.public-card-sold-message { font-weight: 700; }
.public-card-recommendations { margin-top: 40px; }
.public-card-recommendations > h2 { margin-bottom: 24px; }

.public-card-shell {
    align-content: start;
    gap: 20px;
    padding-top: 20px;
}

.public-card-page .public-card-image-wrap {
    width: min(100%, 240px);
    justify-self: center;
}

.public-card-page .public-card-image-wrap img {
    object-fit: contain;
}

.public-card-page .public-card-panel {
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    padding: 22px;
    gap: 24px;
}

.public-card-recommendations {
    margin-top: 8px;
}

@media (max-width: 780px) {
    .public-card-page .public-card-panel {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .public-card-page .public-card-image-wrap {
        width: min(100%, 180px);
    }
}

/* Refund and claim tracking beneath the card details form. */
body.card-form-page .sale-claim-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(58, 45, 31, 0.14);
    scroll-margin-top: 24px;
}
body.card-form-page .sale-claim-section h2 { margin: 0 0 10px; }
body.card-form-page .sale-claim-status {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(58, 45, 31, 0.06);
    font-weight: 600;
}
body.card-form-page .sale-claim-form { display: grid; gap: 20px; margin-top: 24px; }
body.card-form-page .sale-claim-form fieldset { min-width: 0; margin: 0; padding: 18px; border: 1px solid rgba(58, 45, 31, 0.14); border-radius: 12px; }
body.card-form-page .sale-claim-form legend { padding: 0 8px; font-weight: 600; }
body.card-form-page .sale-claim-form .form-actions { margin-top: 0; justify-content: flex-end; }
@media (max-width: 600px) {
    body.card-form-page .sale-claim-form .form-grid { grid-template-columns: 1fr; }
    body.card-form-page .sale-claim-form fieldset { padding: 14px; }
    body.card-form-page .sale-claim-form button { width: 100%; }
}

.claim-reminders { margin-bottom: 24px; }
.claim-reminders-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.claim-reminders-heading h2 { margin: 0 0 6px; }
.claim-reminders-heading p { margin: 0; }
.claim-reminders-list { display: grid; gap: 12px; }
.claim-reminder { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; background: rgba(58, 45, 31, 0.04); border: 1px solid rgba(58, 45, 31, 0.12); border-radius: 12px; }
.claim-reminder.is-ready { border-color: var(--good); background: rgba(107, 255, 0, 0.08); }
.claim-countdown-wrap { text-align: right; flex-shrink: 0; }
.claim-countdown { display: block; font-size: clamp(20px, 3vw, 30px); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.claim-reminder.is-ready .claim-countdown { color: var(--good); }
@media (max-width: 600px) {
    .claim-reminder { align-items: flex-start; flex-direction: column; gap: 12px; }
    .claim-countdown-wrap { text-align: left; }
}
.claim-file-link { margin-bottom: 10px; }
.claim-file-link[hidden] { display: none; }

/* Bundle sale allocation editor */
#bundle-editor .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
#bundle-editor .field { display: flex; flex-direction: column; gap: 6px; }
#bundle-editor input:not([type="checkbox"]), #bundle-editor select { min-height: 42px; font-size: 1rem; }
#bundle-editor .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#bundle-editor [data-bundle-card][hidden] { display: none; }
#bundle-editor [data-share], #bundle-editor [data-profit] { white-space: nowrap; font-variant-numeric: tabular-nums; }
#bundle-editor #bundle-summary { margin: 18px 0; }

#bundle-editor .card-thumb { object-fit: contain; }
#bundle-editor .bundle-no-photo { display: grid; place-items: center; font-size: 0.875rem; color: #5b625d; }

/* Dedicated bundle sale workspace */
#bundle-editor { margin-bottom: 24px; }
#bundle-editor h3 { margin: 0 0 8px; font-size: 1.15rem; }
#bundle-editor .bundle-details-title { margin-top: 28px; }
#bundle-editor .bundle-members, #bundle-editor .bundle-search-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(128,128,128,.25); }
#bundle-editor .bundle-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 16px; }
#bundle-editor .bundle-member { border: 1px solid rgba(128,128,128,.3); border-radius: 14px; overflow: hidden; min-width: 0; }
#bundle-editor .bundle-member[hidden], #bundle-editor .bundle-search-card[hidden], #bundle-editor .bundle-lock-form[hidden], #bundle-editor .bundle-empty[hidden] { display: none; }
#bundle-editor .bundle-member-image { position: relative; height: 170px; background: rgba(128,128,128,.06); display: grid; place-items: center; padding: 12px; }
#bundle-editor .bundle-member-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
#bundle-editor .bundle-remove { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
#bundle-editor .bundle-member-info { padding: 14px; }
#bundle-editor .bundle-member-info > strong { display: block; line-height: 1.4; overflow-wrap: anywhere; }
#bundle-editor .bundle-card-totals { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0; font-size: .875rem; }
#bundle-editor .bundle-card-totals strong { display: block; margin-top: 4px; font-size: 1rem; font-variant-numeric: tabular-nums; }
#bundle-editor .bundle-lock { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; font-size: .875rem; }
#bundle-editor .bundle-lock.is-locked { box-shadow: inset 0 0 0 2px currentColor; }
#bundle-editor .bundle-lock-form { margin-top: 12px; display: grid; gap: 8px; }
#bundle-editor .bundle-lock-form input { width: 100%; min-width: 0; }
#bundle-editor .bundle-lock-form button { padding: 8px; font-size: .875rem; }
#bundle-editor .bundle-search-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px; text-align: left; color: inherit; background: transparent; border: 1px solid rgba(128,128,128,.3); border-radius: 14px; font-size: .875rem; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; }
#bundle-editor .bundle-search-card:hover { border-color: currentColor; transform: none; }
#bundle-editor .bundle-search-card img, #bundle-editor .bundle-search-no-photo { width: 100%; height: 150px; object-fit: contain; margin-bottom: 8px; }
#bundle-editor .bundle-search-no-photo { display: grid; place-items: center; background: rgba(128,128,128,.06); }
#bundle-editor .bundle-search-card strong { font-size: 1rem; line-height: 1.4; }
#bundle-editor .bundle-add-status { margin-top: auto; padding-top: 10px; font-weight: 700; }
#bundle-editor .bundle-search-card[aria-pressed="true"] { border-color: var(--good, #357b32); box-shadow: inset 0 0 0 1px var(--good, #357b32); }
#bundle-editor .bundle-search-card[aria-pressed="true"] .bundle-add-status { color: var(--good, #357b32); }
#bundle-editor .bundle-empty { padding: 28px 18px; border: 1px dashed rgba(128,128,128,.4); border-radius: 12px; text-align: center; }
#bundle-editor .bundle-save-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(128,128,128,.25); }
#bundle-editor #bundle-card-count { display: inline-block; padding: 2px 9px; border-radius: 20px; background: rgba(128,128,128,.12); font-size: .875rem; vertical-align: middle; }
@media (max-width: 520px) {
    #bundle-editor .bundle-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #bundle-editor .bundle-member-info { padding: 10px; }
    #bundle-editor .bundle-card-totals { flex-direction: column; gap: 8px; }
    #bundle-editor .bundle-member-image { height: 145px; }
    #bundle-editor .bundle-save-bar button { width: 100%; }
    #bundle-editor .form-grid { grid-template-columns: 1fr; }
}
