:root {
    color-scheme: light;
    --ink: #18212f;
    --muted: #667085;
    --line: #d9dee8;
    --surface: #ffffff;
    --surface-soft: #f5f7fb;
    --accent: #0b7a75;
    --accent-strong: #075d59;
    --warn: #b42318;
    --shadow: 0 18px 45px rgba(24, 33, 47, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--surface-soft);
    color: var(--ink);
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 16px;
    z-index: 10;
    width: min(1120px, calc(100% - 32px));
    margin: 16px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 16px;
    border: 1px solid rgba(217, 222, 232, 0.86);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand img {
    display: block;
    width: auto;
    height: 42px;
    max-width: min(260px, 52vw);
    object-fit: contain;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.primary-nav a {
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.primary-nav a:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.site-body {
    width: min(1120px, calc(100% - 32px));
    min-height: calc(100vh - 184px);
    margin: 48px auto 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 48px;
    align-items: center;
    padding: 48px 0;
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.hero-copy p:not(.eyebrow),
.page-heading p,
.product-card p,
.empty-state p,
.file-status p,
.notice p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 14px;
    padding: 0 18px;
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.button:hover {
    background: var(--accent-strong);
}

.secondary-button {
    background: #e8f2f1;
    color: var(--accent-strong);
}

.secondary-button:hover {
    background: #d7ebea;
}

button,
input,
select,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 800;
}

.button[type="submit"] {
    border: 0;
    cursor: pointer;
}

.sticker-preview,
.empty-state,
.product-card,
.detail-card,
.panel-form,
.file-status,
.admin-table-wrap,
.notice {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(24, 33, 47, 0.08);
}

.sticker-preview {
    padding: 18px;
}

.preview-canvas {
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    border: 1px dashed #9aa4b2;
    border-radius: 6px;
    background:
        linear-gradient(90deg, rgba(24, 33, 47, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(24, 33, 47, 0.06) 1px, transparent 1px),
        #fbfcfe;
    background-size: 24px 24px;
}

.preview-decal {
    width: 72%;
    padding: 18px 16px;
    border: 4px solid var(--accent);
    border-radius: 8px;
    transform: rotate(-4deg);
}

.preview-decal img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 0;
}

dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

dd {
    margin: 2px 0 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.page-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.empty-state,
.product-card,
.detail-card,
.panel-form,
.file-status,
.notice {
    padding: 20px;
}

.product-card {
    display: grid;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-card:hover,
.product-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 16px 40px rgba(24, 33, 47, 0.13);
    transform: translateY(-4px);
}

.product-card:focus-visible {
    outline: 3px solid rgba(11, 122, 117, 0.28);
    outline-offset: 3px;
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    padding: 12px;
    border-radius: 6px;
    background: var(--surface-soft);
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff7e6;
    color: #8a4b00;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.flash {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 800;
}

.flash-success {
    border-color: rgba(11, 122, 117, 0.32);
    color: var(--accent-strong);
}

.flash-error {
    border-color: rgba(180, 35, 24, 0.28);
    color: var(--warn);
}

.form-shell {
    width: min(560px, 100%);
}

.wide-form {
    width: min(900px, 100%);
}

.panel-form {
    display: grid;
    gap: 18px;
}

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

.detail-card p {
    color: var(--muted);
    line-height: 1.6;
}

.admin-edit-links {
    margin: -8px 0 18px;
}

.file-status {
    display: grid;
    gap: 12px;
}

.file-status h2 {
    font-size: 1rem;
}

.file-status dl {
    grid-template-columns: 1fr;
}

.file-status dd {
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-heading h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.admin-heading p {
    margin: 10px 0 0;
    color: var(--muted);
}

.admin-table-wrap {
    overflow-x: auto;
    background: var(--surface);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.admin-sticker-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sticker-thumb {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
}

.admin-sticker-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 6px;
    object-fit: contain;
}

.table-actions {
    display: flex;
    gap: 12px;
}

.table-actions a {
    color: var(--accent-strong);
    font-weight: 800;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 44px;
    align-items: start;
}

.product-media {
    display: grid;
    min-height: 420px;
    place-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(24, 33, 47, 0.08);
}

.product-media img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    padding: 24px;
}

.sticker-customizer {
    align-content: center;
}

.sticker-artboard {
    display: grid;
    width: min(100%, 560px);
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 1px dashed #c5ccd8;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(24, 33, 47, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(24, 33, 47, 0.05) 1px, transparent 1px),
        #fbfcfe;
    background-size: 28px 28px;
}

.sticker-artboard.is-dark-preview {
    border-color: #354052;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        #18212f;
    background-size: 28px 28px;
}

.sticker-svg-mount {
    display: grid;
    max-width: 100%;
    max-height: 100%;
    place-items: center;
}

.sticker-inline-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.svg-load-error {
    color: var(--warn);
    font-weight: 800;
}

.empty-preview {
    color: var(--muted);
    font-weight: 900;
}

.product-info {
    display: grid;
    gap: 18px;
}

.product-info h1 {
    font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.product-info p,
.rich-copy {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.product-options {
    display: grid;
    gap: 22px;
}

.size-control {
    display: grid;
    gap: 10px;
}

.size-control label,
.color-options {
    color: #344054;
    font-size: 0.92rem;
    font-weight: 900;
}

.size-control input[type="range"] {
    min-height: auto;
    padding: 0;
    accent-color: var(--accent);
}

.size-readout {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

.size-readout strong {
    color: var(--ink);
}

.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
}

.color-swatch {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
}

.color-swatch span {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid rgba(24, 33, 47, 0.18);
    border-radius: 999px;
    background: var(--swatch-color);
}

.color-swatch.is-selected,
.color-swatch:hover,
.color-swatch:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.12);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.notice {
    margin-bottom: 24px;
    border-color: rgba(180, 35, 24, 0.28);
}

.notice h1 {
    color: var(--warn);
    font-size: 1.6rem;
}

.notice code {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    overflow-x: auto;
    border-radius: 6px;
    background: #fff4f2;
    color: #7a271a;
}

.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 32px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 760px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .primary-nav {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 20px;
    }

    .form-grid,
    .detail-grid,
    .product-detail,
    .admin-heading {
        grid-template-columns: 1fr;
    }

    .product-media {
        min-height: 280px;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
