:root {
    --ink: #1d2736;
    --muted: #667085;
    --line: #d8dde6;
    --panel: #ffffff;
    --page: #f6f7f9;
    --navy: #172235;
    --blue: #2f7bf6;
    --teal: #13c8b5;
    --gold: #d59000;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.button,
input,
select,
textarea {
    border: 1px solid #c9d0dc;
    border-radius: 0;
    font: inherit;
}

button,
.button {
    background: white;
    color: var(--ink);
    cursor: pointer;
    padding: 12px 18px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

input,
select,
textarea {
    width: 100%;
    background: white;
    color: var(--ink);
    padding: 12px 14px;
}

.topbar {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 40px;
    border-bottom: 1px solid #e0e4ea;
    background: #fbfcfd;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2768dc;
    font-size: 30px;
    font-weight: 800;
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #39a7f3, #16c8b4);
    box-shadow: 0 8px 18px rgba(22, 200, 180, .22);
}

.brand-icon .icon {
    width: 25px;
    height: 25px;
}

.search {
    width: min(290px, 30vw);
}

.topbar nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.username {
    font-weight: 700;
}

.icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    vertical-align: -4px;
}

.icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.coin-mark,
.coin-pill .icon {
    color: #f5ad00;
}

.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #f4f5f7;
    border: 1px solid #dde2ea;
    color: #172235;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.balance-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
    line-height: 1;
}

.balance-item .icon {
    width: 20px;
    height: 20px;
    margin: 0;
}

.coin-balance .icon {
    color: #f5ad00;
}

.withdraw-balance .icon {
    color: #05a85a;
}

.balance-item b {
    font-size: 14px;
    font-weight: 900;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid #e1e6ee;
    font-weight: 700;
}

.withdraw-pill {
    color: #05a85a;
}

.pill .icon {
    margin-right: 2px;
}

.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 18px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    color: white;
    border: 0;
    font-weight: 700;
}

.primary .icon,
button .icon {
    width: 17px;
    height: 17px;
}

.upload-button {
    min-width: 88px;
    gap: 8px;
    padding: 10px 16px;
}

.upload-button .icon {
    width: 17px;
    height: 17px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d1d8e4;
    background: white;
}

.logout-button {
    color: #5c6b7d;
}

.logout-button .icon {
    width: 19px;
    height: 19px;
}

.inline {
    display: inline;
}

main {
    max-width: 1480px;
    margin: 0 auto;
    padding: 32px 40px 60px;
}

.flash {
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #e9f8f5;
    border-left: 4px solid var(--teal);
}

.flash.error {
    width: fit-content;
    max-width: min(720px, 100%);
    margin: 0 auto 24px;
    padding: 16px 24px;
    background: #c81e1e;
    color: #fff;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(200, 30, 30, 0.26);
    text-align: center;
    font-weight: 900;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
    color: #111827;
}

.hero p {
    margin: 0 0 34px;
    color: #50627a;
    font-size: 18px;
}

.gallery-tabs {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 32px;
    padding: 4px;
    border-radius: 999px;
    background: #e2e6ec;
}

.gallery-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #1f2937;
    font-size: 14px;
}

.gallery-tabs a.active {
    background: white;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .16);
}

.gallery-tabs .icon {
    width: 16px;
    height: 16px;
}

.content-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.category-sidebar {
    position: sticky;
    top: 92px;
}

.category-sidebar h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #344054;
}

.filters {
    display: grid;
    gap: 8px;
    margin: 0;
}

.filters a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 12px 17px;
    background: var(--navy);
    color: white;
    font-size: 14px;
}

.filters .icon {
    width: 15px;
    height: 15px;
}

.filters .category-icon {
    color: #7dd3fc;
}

.filters a.active .category-icon,
.filters a.active .icon {
    color: white;
}

.filters a.active {
    background: var(--teal);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
    max-width: none;
}

.top-active-panel {
    position: sticky;
    top: 92px;
    padding: 28px 24px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.top-active-panel h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 24px;
    font-size: 22px;
    color: #1d2736;
}

.top-active-panel h2 .icon {
    width: 22px;
    height: 22px;
    color: #12b886;
}

.top-active-list {
    display: grid;
    gap: 24px;
}

.top-active-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.top-active-cover {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #2dd4bf;
    background:
        radial-gradient(circle at 55% 35%, rgba(68, 84, 101, .95), transparent 42%),
        linear-gradient(150deg, #162235, #34404e);
}

.top-active-cover .icon {
    width: 24px;
    height: 24px;
}

.top-active-item strong {
    display: block;
    color: #1d2736;
    font-size: 16px;
}

.top-active-item small {
    display: block;
    margin-top: 3px;
    color: #667085;
    font-size: 12px;
}

.top-active-item b {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #05a85a;
    font-size: 12px;
    font-weight: 900;
}

.top-active-item b .icon {
    width: 14px;
    height: 14px;
}

.card {
    position: relative;
    min-height: 452px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 55% 35%, rgba(68, 84, 101, .95), transparent 42%),
        linear-gradient(150deg, #162235, #34404e);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(20, 30, 45, .18);
}

.card.own-card {
    outline: 3px solid rgba(47, 123, 246, .55);
    background: #111827;
}

.own-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.own-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .36) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .36) 1px, transparent 1px);
    background-size: calc(100% / var(--cols)) calc(100% / var(--rows));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.own-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(12, 18, 29, .18), rgba(12, 18, 29, .18) 48%, rgba(12, 18, 29, .68));
}

.card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 96px;
    background: rgba(217, 222, 229, .6);
}

.own-card::after {
    z-index: 1;
    background: rgba(22, 31, 45, .62);
}

.badge,
.percent,
.owner-badge {
    position: absolute;
    top: 14px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(14, 21, 32, .82);
    font-size: 12px;
    font-weight: 700;
}

.badge {
    left: 14px;
}

.percent {
    right: 14px;
}

.owner-badge {
    left: 50%;
    transform: translateX(-50%);
    background: #2f7bf6;
    color: white;
}

.own-progress {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    place-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(17, 24, 39, .72);
    backdrop-filter: blur(2px);
}

.own-progress strong {
    color: white;
}

.own-progress small {
    margin: 0;
    color: #dbeafe;
}

.eye {
    color: #35d9a9;
    font-size: 56px;
    line-height: 1;
}

.card strong,
.card small {
    position: relative;
    z-index: 1;
}

.card small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    color: #ffd21f;
    font-weight: 700;
}

.card footer {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    color: #dfe5ec;
}

.card footer b {
    color: #05d3ac;
}

.auth-shell {
    min-height: calc(100vh - 150px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    align-items: center;
    gap: 54px;
    max-width: 1040px;
    margin: 0 auto;
}

.auth-copy {
    max-width: 500px;
}

.auth-logo {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, #2f6bea, #12c6b7);
    box-shadow: 0 12px 28px rgba(47, 107, 234, .22);
    margin-bottom: 22px;
}

.auth-logo .icon {
    width: 30px;
    height: 30px;
}

.auth-copy h1 {
    font-size: clamp(44px, 7vw, 84px);
    line-height: .95;
    margin: 0 0 18px;
    letter-spacing: 0;
}

.auth-copy p {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.45;
    margin: 0;
}

.maintenance-notice {
    display: grid;
    gap: 6px;
    margin-top: 24px;
    padding: 16px 18px;
    background: #fff1f0;
    border: 1px solid #fecaca;
    border-left: 4px solid #c81e1e;
    color: #7f1d1d;
}

.maintenance-notice strong {
    color: #991b1b;
    font-size: 18px;
}

.auth-card {
    background: white;
    border: 1px solid #dfe5ee;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .1);
    padding: 28px;
}

.auth-card > input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: #edf1f7;
    border: 1px solid #dce3ee;
}

.auth-tabs label {
    cursor: pointer;
    padding: 12px 10px;
    text-align: center;
    font-weight: 800;
    color: #5b6779;
}

#auth-login:checked ~ .auth-tabs label[for="auth-login"],
#auth-register:checked ~ .auth-tabs label[for="auth-register"] {
    color: white;
    background: linear-gradient(135deg, #2f6bea, #12c6b7);
}

.auth-form {
    display: none;
    gap: 14px;
}

.auth-form h2 {
    margin: 0 0 4px;
    font-size: 26px;
}

.auth-form button {
    width: 100%;
}

#auth-login:checked ~ .login-form,
#auth-register:checked ~ .register-form {
    display: grid;
}

.auth-page {
    min-height: 100vh;
}

.auth-page .topbar {
    height: 64px;
    padding: 0 clamp(18px, 2.6vw, 36px);
}

.auth-page .brand {
    font-size: 24px;
}

.auth-page .brand-icon {
    width: 36px;
    height: 36px;
}

.auth-page .brand-icon .icon {
    width: 20px;
    height: 20px;
}

.auth-page .search {
    width: min(260px, 26vw);
}

.auth-page main {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: clamp(22px, 4vh, 44px) clamp(18px, 4vw, 56px);
}

.auth-page .auth-shell {
    width: min(900px, 100%);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
    gap: clamp(28px, 4vw, 56px);
    max-width: none;
    margin: 0;
}

.auth-page .auth-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
}

.auth-page .auth-logo .icon {
    width: 24px;
    height: 24px;
}

.auth-page .auth-copy h1 {
    font-size: clamp(44px, 4.5vw, 64px);
    line-height: 1;
}

.auth-page .auth-copy p {
    max-width: 420px;
    font-size: 17px;
}

.auth-page .auth-card {
    padding: 24px;
}

.auth-page .auth-form h2 {
    font-size: 22px;
}

.panel,
.upload-form {
    background: white;
    border: 1px solid #e0e5ee;
    padding: 26px;
}

.panel {
    display: grid;
    gap: 14px;
}

.upload-panel {
    max-width: 780px;
    margin: 0 auto;
    background: white;
    padding: 24px;
}

.upload-panel h1 {
    margin-top: 0;
}

.buy-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0 60px;
    text-align: center;
}

.back-link {
    display: block;
    width: fit-content;
    margin-bottom: 36px;
    color: #344054;
}

.buy-page h1 {
    margin: 0;
    font-size: 50px;
    color: #071426;
}

.buy-page > p {
    margin: 10px 0 42px;
    color: #5d6b7f;
    font-size: 20px;
}

.packages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    text-align: center;
}

.package {
    position: relative;
    display: grid;
    gap: 22px;
    padding: 42px 24px 24px;
    background: white;
    border: 1px solid #dce2eb;
    box-shadow: 0 10px 20px rgba(16, 24, 40, .09);
}

.package.popular {
    background: #edf5ff;
    border-color: #2f7bf6;
}

.popular-label {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 18px;
    border-radius: 999px;
    background: #347bea;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.package h2 {
    margin: 0;
    font-size: 21px;
}

.package-coins {
    color: #637083;
    font-size: 25px;
}

.package-coins strong {
    color: #071426;
    font-size: 50px;
}

.package-price {
    font-size: 24px;
    font-weight: 800;
}

.package button {
    width: 100%;
    background: var(--navy);
    color: white;
    border: 0;
    font-weight: 800;
}

.package button.primary {
    background: #2f67ea;
}

.payment-note {
    margin-top: 48px;
    color: #50627a;
    font-size: 14px;
}

.checkout-page {
    max-width: 920px;
    margin: 0 auto;
}

.checkout-page h1 {
    margin: 0 0 24px;
    font-size: 46px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 24px;
}

.checkout-box {
    display: grid;
    gap: 16px;
    padding: 26px;
    background: white;
    border: 1px solid #dde3ec;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.checkout-line,
.checkout-total {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f5;
}

.checkout-line.muted {
    color: #667085;
}

.checkout-total {
    border-bottom: 0;
    font-size: 22px;
}

.paypal-box {
    align-content: start;
}

.paypal-button {
    width: 100%;
    border: 0;
    background: #ffc439;
    color: #12316b;
    font-weight: 900;
}

.paypal-box small {
    color: #667085;
}

.admin-page {
    display: grid;
    gap: 22px;
}

.admin-page h1 {
    margin: 0;
    font-size: 42px;
}

.admin-page h2 {
    margin: 16px 0 0;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    width: fit-content;
    background: #e7ebf1;
}

.admin-tabs a {
    padding: 11px 18px;
    background: transparent;
    color: #344054;
    font-weight: 800;
}

.admin-tabs a.active {
    background: white;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.admin-section-head h2 {
    margin: 0;
}

.admin-section-head p {
    margin: 5px 0 0;
    color: #667085;
}

.settings-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    background: white;
    border: 1px solid #dfe5ee;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.settings-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 19px;
    color: #172235;
}

.settings-card p {
    margin: 0;
    color: #667085;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f5f7fb;
    border: 1px solid #dfe5ee;
    font-weight: 800;
    color: #172235;
}

.switch-row input {
    width: 22px;
    height: 22px;
    accent-color: #2f7bf6;
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #dde3ec;
}

.bulk-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.bulk-toolbar select {
    width: auto;
    min-width: 180px;
    padding: 10px 12px;
}

.admin-data-table {
    display: grid;
    gap: 8px;
}

.admin-table-row {
    display: grid;
    grid-template-columns: 34px minmax(220px, 1.4fr) minmax(150px, .8fr) minmax(210px, 1fr) minmax(220px, 1.1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #dde3ec;
}

.admin-table-row.header {
    background: #eef2f7;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-table-row strong {
    display: block;
}

.admin-table-row small {
    display: block;
    margin-top: 3px;
    color: #667085;
}

.compact-admin-form,
.inline-actions,
.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.compact-admin-form input,
.compact-admin-form select,
.inline-actions input {
    width: auto;
    min-width: 110px;
    padding: 9px 10px;
}

.compact-admin-form input[type="number"] {
    min-width: 74px;
    width: 84px;
}

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

.photo-thumb-link {
    display: block;
    position: relative;
    flex: 0 0 auto;
    line-height: 0;
    border: 1px solid #cfd6e1;
    background: #f3f6fa;
}

.photo-thumb-link::after {
    content: "Ver";
    position: absolute;
    inset: auto 5px 5px auto;
    padding: 3px 6px;
    background: rgba(15, 23, 42, .86);
    color: white;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}

.photo-thumb-link:hover::after,
.photo-thumb-link:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.photo-cell img {
    width: 74px;
    height: 54px;
    object-fit: cover;
    border: 0;
}

.admin-category-create {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 120px minmax(240px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    background: white;
    border: 1px solid #dde3ec;
}

.admin-category-create label,
.admin-category-form label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 800;
}

.admin-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.admin-category-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #dde3ec;
}

.admin-category-preview {
    border: 1px solid #d8dde6;
    overflow: hidden;
    background: #111827;
}

.admin-category-preview .category-preview-art {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.admin-category-form {
    display: grid;
    gap: 10px;
}

.checkbox-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
    font-weight: 700 !important;
}

.checkbox-line input {
    width: auto;
}

.moderation-table .admin-table-row {
    grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.2fr) minmax(130px, .6fr) minmax(360px, 1.4fr);
}

.report-link {
    display: inline-flex;
    width: fit-content;
    margin: -4px 0 14px;
    color: #b42318;
    font-weight: 800;
    text-decoration: none;
}

.report-link:hover {
    text-decoration: underline;
}

.report-box {
    display: grid;
    gap: 12px;
    margin: 12px 0 18px;
    padding: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.report-box strong {
    color: #9a3412;
    font-size: 18px;
}

.report-box label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 800;
}

.report-box textarea {
    resize: vertical;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.share-panel {
    display: grid;
    gap: 12px;
    margin: 14px 0 18px;
    padding: 16px;
    background: #eef2f7;
    border: 1px solid #d9e0eb;
}

.share-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.share-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #172235;
    font-size: 18px;
}

.share-head strong .icon {
    color: #2f7bf6;
}

.share-head small {
    color: #667085;
    font-weight: 700;
}

.share-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.share-link-row input {
    min-height: 40px;
    background: white;
    font-size: 13px;
}

.share-link-row button,
.share-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #c9d2df;
    background: white;
    color: #1d2736;
    font-weight: 900;
    font-size: 13px;
}

.share-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-button.whatsapp {
    color: white;
    border-color: #10b981;
    background: #10b981;
}

.share-button.telegram {
    color: white;
    border-color: #2f8fed;
    background: #2f8fed;
}

.share-button.email {
    color: #1d2736;
    border-color: #c9d2df;
}

.share-button.social {
    color: white;
    border-color: #172235;
    background: #172235;
}

.share-button.native {
    color: white;
    border-color: #2f7bf6;
    background: linear-gradient(90deg, #2f7bf6, #13c8b5);
}

.qr-share {
    width: fit-content;
}

.qr-share summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #c9d2df;
    color: #172235;
    font-weight: 900;
}

.qr-share img {
    display: block;
    width: 180px;
    height: 180px;
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #d9e0eb;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2f7;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
}

.status-pill.open,
.status-pill.pending {
    background: #fff7d6;
    color: #8a5a00;
}

.status-pill.closed,
.status-pill.paid {
    background: #e9f8ef;
    color: #05603a;
}

.status-pill.rejected {
    background: #fff1f0;
    color: #b42318;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.admin-stats div {
    display: grid;
    gap: 6px;
    padding: 18px;
    background: white;
    border: 1px solid #dde3ec;
}

.admin-stats span,
.admin-user-row small,
.admin-photo-row small {
    color: #667085;
}

.admin-stats strong {
    font-size: 28px;
}

.admin-table,
.admin-photos {
    display: grid;
    gap: 10px;
}

.admin-user-row,
.admin-photo-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(380px, 2fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #dde3ec;
}

.admin-user-row form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-user-row input,
.admin-user-row select {
    min-width: 0;
    padding: 9px 10px;
}

.admin-user-row input[type="number"] {
    width: 82px;
}

.readonly-balance {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    background: #effcf4;
    border: 1px solid #a7efc2;
    color: #008a3d;
    font-weight: 800;
}

.admin-user-row button,
.admin-photo-row button,
.admin-photo-row .button {
    padding: 10px 12px;
}

.admin-photo-row {
    grid-template-columns: 90px minmax(220px, 1fr) auto auto;
}

.admin-photo-row img {
    width: 90px;
    height: 64px;
    object-fit: cover;
    border: 1px solid #cfd6e1;
}

.danger {
    background: #b42318;
    color: white;
    border-color: #b42318;
}

.withdrawal-admin-list {
    display: grid;
    gap: 10px;
}

.withdrawal-admin-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.4fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: white;
    border: 1px solid #dde3ec;
}

.withdrawal-admin-row.pending {
    border-left: 4px solid #f5ad00;
}

.withdrawal-admin-row.paid {
    border-left: 4px solid #079455;
}

.withdrawal-admin-row.rejected {
    border-left: 4px solid #b42318;
}

.withdrawal-admin-row form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto auto;
    gap: 8px;
}

.processed-label {
    color: #667085;
    font-weight: 700;
}

.upload-form {
    display: grid;
    gap: 18px;
    padding: 0;
    border: 0;
}

.crop-panel {
    max-width: 980px;
    border: 1px solid #dde3ec;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.crop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: start;
}

.crop-meta {
    margin: 0 0 10px;
    color: #5d6b7f;
    font-weight: 700;
}

.crop-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111827;
    border: 1px solid #cbd5e1;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.crop-frame.is-dragging {
    cursor: grabbing;
}

.crop-frame.horizontal {
    aspect-ratio: 4 / 3;
}

.crop-frame.vertical {
    max-width: 420px;
    aspect-ratio: 3 / 4;
}

.crop-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(255,255,255,.58) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,.58) 1px, transparent 1px);
    background-size: calc(100% / var(--grid-cols)) calc(100% / var(--grid-rows));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

.crop-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--crop-x) var(--crop-y);
    transform: scale(var(--crop-zoom));
    transform-origin: var(--crop-x) var(--crop-y);
}

.crop-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    padding: 24px;
    background: linear-gradient(135deg, #eef2f7, #dbe4ef);
    color: #50627a;
    text-align: center;
}

.crop-placeholder strong {
    color: #172235;
    font-size: 20px;
}

.crop-placeholder span {
    max-width: 300px;
}

.crop-handle {
    position: absolute;
    z-index: 2;
    width: 18px;
    height: 18px;
    border: 3px solid white;
    background: #2f7bf6;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .28);
}

.crop-handle.nw {
    top: 8px;
    left: 8px;
    cursor: nwse-resize;
}

.crop-handle.ne {
    top: 8px;
    right: 8px;
    cursor: nesw-resize;
}

.crop-handle.sw {
    bottom: 8px;
    left: 8px;
    cursor: nesw-resize;
}

.crop-handle.se {
    right: 8px;
    bottom: 8px;
    cursor: nwse-resize;
}

.crop-controls {
    display: grid;
    gap: 18px;
    padding: 18px;
    background: #f3f6fa;
    border: 1px solid #dde3ec;
}

.crop-controls p {
    margin: 0;
    color: #526276;
    line-height: 1.4;
}

.crop-controls label {
    display: grid;
    gap: 8px;
    color: #344054;
    font-weight: 700;
}

.earnings-panel {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-left: 4px solid #13c8b5;
    background: #eefdf9;
    color: #174d45;
    box-shadow: inset 0 0 0 1px rgba(19, 200, 181, .18);
}

.earnings-panel strong {
    color: #0f2f2a;
    font-size: 18px;
}

.earnings-panel span {
    font-weight: 800;
}

.earnings-panel small {
    color: #526276;
}

.dropzone {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 2px dashed #cad1dc;
    background: #fbfcff;
    text-align: center;
    cursor: pointer;
}

.dropzone span {
    font-size: 38px;
    color: #98a2b3;
}

.dropzone strong {
    color: #2867e8;
}

.dropzone small {
    color: var(--muted);
}

.dropzone input {
    width: 1px;
    height: 1px;
    opacity: 0;
    padding: 0;
}

.upload-file-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e1e6ee;
}

.compact-dropzone {
    min-height: 86px;
    display: grid;
    grid-template-columns: 44px minmax(0, auto);
    place-items: center start;
    align-content: center;
    column-gap: 12px;
    row-gap: 4px;
    padding: 18px;
    text-align: left;
}

.compact-dropzone span {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #2f7bf6, #13c8b5);
    font-size: 0;
}

.compact-dropzone span .icon {
    width: 21px;
    height: 21px;
}

.compact-dropzone small {
    grid-column: 2;
}

.upload-empty-config {
    display: grid;
    gap: 8px;
    padding: 22px;
    background: #eef7ff;
    border-left: 4px solid #2f7bf6;
}

.upload-empty-config strong {
    color: #172235;
    font-size: 20px;
}

.upload-empty-config p {
    margin: 0;
    color: #50627a;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e1e6ee;
}

.form-grid label {
    display: grid;
    gap: 8px;
    color: #273244;
    font-weight: 700;
}

.form-grid label small {
    color: #667085;
    font-weight: 400;
}

.form-grid .description-field {
    grid-column: 1 / -1;
}

.category-picker-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.category-picker-field legend {
    padding: 0;
    color: #273244;
    font-weight: 800;
}

.category-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    padding: 2px;
}

.category-choice {
    position: relative;
    display: grid;
    gap: 0;
    min-height: 154px;
    overflow: hidden;
    background: white;
    border: 2px solid #dbe2ee;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.category-choice:hover {
    border-color: #9db5e8;
    transform: translateY(-1px);
}

.category-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.category-choice input:checked ~ .category-preview-art {
    filter: saturate(1.08) contrast(1.04);
}

.category-choice:has(input:checked) {
    border-color: #2f7bf6;
    box-shadow: 0 0 0 3px rgba(47, 123, 246, .14);
}

.category-preview-art {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

.category-choice > span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 12px;
    color: #1d2736;
    font-weight: 900;
}

.category-choice .category-icon {
    color: #2f7bf6;
}

.category-terms {
    display: grid;
    gap: 6px;
    margin-top: 4px;
    padding: 14px 16px;
    background: #eef7ff;
    border-left: 4px solid #2f7bf6;
    color: #344054;
}

.category-terms strong {
    color: #1d2736;
}

.category-terms p {
    margin: 0;
    line-height: 1.35;
}

.fixed-threshold {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: white;
    border: 1px solid #b7e2ff;
    border-left: 4px solid #2f7bf6;
}

.fixed-threshold span {
    color: #526276;
    font-weight: 700;
}

.fixed-threshold strong {
    color: #0b4db3;
    font-size: 30px;
}

.fixed-threshold small {
    color: #667085;
}

.terms {
    padding: 18px;
    background: #fffbe8;
    border-left: 4px solid #f5b400;
    color: #9a5d00;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .78);
    z-index: 20;
}

.modal-card {
    position: relative;
    width: min(1024px, 96vw);
    max-height: 96vh;
    overflow: auto;
    padding: 26px;
    background: #c8c8c8;
    border-radius: 14px;
}

.spend-confirm {
    position: absolute;
    inset: 92px 26px 86px;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(17, 24, 39, .38);
    animation: confirm-in .16s ease both;
}

.spend-confirm.is-closing {
    animation: confirm-out .14s ease both;
}

.spend-confirm-box {
    width: min(360px, 94%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    background: white;
    border: 1px solid #dce2eb;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .26);
    text-align: center;
}

.spend-confirm-box img {
    width: 62px;
    height: 62px;
}

.spend-confirm-box h3 {
    margin: 0;
    font-size: 22px;
}

.spend-confirm-box p {
    margin: 0;
    color: #526276;
}

.spend-confirm-box div {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
}

.spend-confirm-box button {
    flex: 1;
}

.spend-confirm-box .ghost {
    background: #f4f6f9;
}

.spend-confirm.is-error .spend-confirm-box {
    border-color: #dce2eb;
}

.spend-confirm.is-error .spend-confirm-box div {
    justify-content: center;
}

.spend-confirm.is-error .spend-confirm-box button {
    max-width: 180px;
}

.modal-card h2 {
    margin: 0 0 4px;
}

.modal-card p {
    margin-top: 0;
    color: #59687a;
}

.owner-threshold-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    align-items: center;
    margin: 14px 0;
    padding: 14px;
    border-left: 4px solid #f5ad00;
    background: #fff8df;
    color: #5f4300;
}

.owner-threshold-alert strong {
    color: #2d2100;
}

.owner-threshold-alert span {
    grid-column: 1;
}

.owner-threshold-alert form {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.owner-threshold-alert.closed {
    border-left-color: #079455;
    background: #ecfdf3;
    color: #05603a;
}

.account-modal {
    width: min(672px, 94vw);
    padding: 28px 24px 24px;
    background: white;
}

.profile-modal {
    width: min(448px, 94vw);
    padding: 28px 24px 24px;
    background: white;
}

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

.balance-grid.compact {
    margin: 16px 0 24px;
}

.balance-box,
.email-box {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 78px;
    background: #f2f4f7;
    color: #667085;
    text-align: center;
}

.balance-box strong,
.email-box strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    font-size: 22px;
}

.balance-box small {
    color: #667085;
}

.withdrawal-request-box {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #dde3ec;
}

.withdrawal-request-box form {
    display: grid;
    grid-template-columns: 120px minmax(180px, 1fr) auto;
    gap: 10px;
}

.withdrawal-request-box p {
    margin: 0;
}

.min-withdrawal-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: #667085;
    font-weight: 700;
}

.balance-box strong .icon {
    width: 24px;
    height: 24px;
}

.balance-box.withdraw {
    background: #effcf4;
    border: 1px solid #a7efc2;
    color: #008a3d;
}

.balance-box.withdraw strong,
.balance-box.withdraw .icon {
    color: #008a3d;
}

.transaction-list {
    min-height: 116px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 20px 0;
    border-bottom: 1px solid #dde3ec;
}

.empty-state {
    margin: 0;
    text-align: center;
    color: #667085;
}

.transaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f5;
}

.transaction-row small {
    display: block;
    margin-top: 3px;
    color: #7b8797;
}

.transaction-row .positive {
    color: #079455;
}

.transaction-row .negative {
    color: #b42318;
}

.modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.modal-actions button {
    background: #c8cdd5;
    color: white;
    border: 0;
    font-weight: 800;
}

.modal-actions a,
.modal-actions button,
.package button,
.profile-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.email-box {
    margin-top: 22px;
}

.profile-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.profile-form label {
    display: grid;
    gap: 8px;
}

.profile-form button {
    justify-self: center;
    border: 0;
    background: white;
}

.profile-form .primary {
    width: 100%;
    color: white;
    background: linear-gradient(90deg, var(--blue), var(--teal));
}

.password-form {
    padding-top: 18px;
    border-top: 1px solid #e1e6ee;
}

.password-form h3 {
    margin: 0;
}

.close {
    position: absolute;
    top: 24px;
    right: 28px;
    font-size: 32px;
}

.grid-board {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
    gap: 1px;
    overflow: visible;
    background: #263244;
    border: 1px solid #263244;
}

.grid-board > img,
.tile-wrap,
.tile-wrap img,
.cell,
.cell button {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.grid-board > img,
.tile-wrap img {
    display: block;
    object-fit: fill;
}

.tile-wrap {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 0;
    background: #263244;
    outline: 1px solid rgba(15, 23, 42, .6);
    outline-offset: -1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.tile-wrap.revealed-by-user {
    outline-color: rgba(0, 118, 78, .85);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, .52),
        inset 0 0 0 3px rgba(19, 200, 181, .55);
}

.tile-wrap.viewer-clean-tile {
    outline-color: rgba(15, 23, 42, .34);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .22);
}

.tile-wrap.owner-visible-tile {
    outline-color: rgba(15, 23, 42, .68);
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, .54),
        inset 0 0 0 999px rgba(245, 247, 250, .08);
}

.tile-state {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(17, 24, 39, .68);
    color: white;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.revealed-by-user .tile-state {
    background: rgba(0, 169, 106, .92);
}

.owner-visible-tile .tile-state {
    background: rgba(17, 24, 39, .42);
}

.tile-wrap::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 8;
    width: max-content;
    max-width: 230px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #111827;
    color: white;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .14s ease, transform .14s ease;
}

.tile-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    z-index: 8;
    border: 6px solid transparent;
    border-top-color: #111827;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity .14s ease;
}

.tile-wrap:hover::after,
.tile-wrap:hover::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

.tile-wrap:hover::before {
    transform: translateX(-50%);
}

.cell {
    margin: 0;
}

.cell button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    padding: 1px;
    overflow: hidden;
    border-color: #c5cad3;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, .9), rgba(231, 236, 243, .96));
    color: var(--gold);
    font-weight: 800;
    transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}

.cell button:hover {
    transform: scale(1.04);
    filter: brightness(1.03);
}

.cell button img {
    width: clamp(11px, min(calc(170px / var(--cols)), calc(130px / var(--rows))), 18px);
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 3px rgba(109, 72, 0, .22));
}

.cell span {
    display: block;
    color: #c78300;
    font-size: clamp(11px, min(calc(160px / var(--cols)), calc(130px / var(--rows))), 18px);
    font-weight: 900;
    line-height: 1;
}

.cell.is-spending button {
    opacity: .68;
}

.cell.is-revealing {
    pointer-events: none;
    animation: coin-reveal .42s ease forwards;
}

.closed-cell button {
    background: #d8dde6;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

@keyframes coin-reveal {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    55% {
        opacity: .45;
        transform: scale(.84) rotate(8deg);
    }
    100% {
        opacity: 0;
        transform: scale(.22) rotate(18deg);
    }
}

@keyframes confirm-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes confirm-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.modal-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 17px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e3e7ee;
    color: #1d2736;
    font-weight: 400;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.modal-stat .icon {
    width: 19px;
    height: 19px;
    margin: 0;
}

.stat-revealed .icon {
    color: #10c7ba;
}

.stat-cost .icon {
    color: #f5ad00;
}

.stat-balance .icon {
    color: #347cf6;
}

.download-button {
    gap: 8px;
    min-width: 122px;
    padding: 10px 16px;
    border: 0;
    color: white;
    background: linear-gradient(90deg, #2f7bf6, #13c8b5);
}

.download-button .icon {
    width: 18px;
    height: 18px;
}

.modal-footer .primary,
.modal-footer button:last-child {
    margin-left: auto;
}

.empty {
    color: var(--muted);
}

@media (max-width: 850px) {
    .topbar {
        height: auto;
        flex-wrap: wrap;
        padding: 18px;
    }

    .brand {
        font-size: 24px;
    }

    .search {
        order: 3;
        width: 100%;
    }

    main {
        padding: 24px 18px 44px;
    }

    .auth-shell,
    .form-grid,
    .crop-layout,
    .packages,
    .balance-grid,
    .modal-actions,
    .admin-stats,
    .admin-user-row,
    .admin-photo-row,
    .withdrawal-admin-row,
    .withdrawal-admin-row form,
    .withdrawal-request-box form,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .auth-page .topbar {
        padding: 14px 18px;
    }

    .auth-page .search {
        width: 100%;
    }

    .auth-page main {
        min-height: auto;
        display: block;
        padding: 24px 18px 36px;
    }

    .auth-page .auth-shell {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .auth-page .auth-copy h1 {
        font-size: 44px;
    }

    .admin-user-row form {
        flex-wrap: wrap;
    }

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

    .content-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        position: static;
    }

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

    .modal {
        padding: 0;
    }

    .modal-card {
        width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        padding: 20px;
    }

    .modal-footer .primary,
    .modal-footer button:last-child {
        margin-left: 0;
        width: 100%;
    }
}
