/* Catalog: item tiles, the item page and T-Shirt pictures */
.sr-only {
    clip: rect(0 0 0 0);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.catalog-categories button { align-items: center; display: flex; gap: 8px; }
.catalog-categories button img { height: 18px; opacity: 0.7; width: 18px; }

.item-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-tile:hover { box-shadow: 0 5px 0 #d1deed, 0 14px 28px rgba(51, 81, 116, 0.12); transform: translateY(-3px); }
.item-tile:focus-visible { outline: 3px solid #e7b500; outline-offset: 2px; }

.item-tile-art {
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #eaf2fb 70%, #dce8f6 100%);
    display: block;
    padding: 12px;
    position: relative;
}

.item-tile-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.item-tile-name { color: var(--ink); font: bold 16px/1.25 Arial, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-tile-creator { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.owned-badge {
    background: rgba(35, 112, 47, 0.9);
    border-radius: 999px;
    color: #fff;
    font: bold 12px/1 Arial, sans-serif;
    padding: 5px 9px;
    position: absolute;
    right: 10px;
    top: 10px;
}

/* A T-Shirt: Gobrix's own blank tee with the image printed on the chest (kept in shape). */
.shirt-thumb {
    aspect-ratio: 1;
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.shirt-thumb svg { display: block; filter: drop-shadow(0 2px 2px rgba(36, 60, 90, 0.18)); height: 100%; width: 100%; }
.shirt-thumb .tee-body { fill: url(#gbx-tee-body); stroke: #9fb1c6; stroke-linejoin: round; stroke-width: 2.2; }
.shirt-thumb .tee-sleeve { fill: url(#gbx-tee-sleeve); stroke: #9fb1c6; stroke-linejoin: round; stroke-width: 2.2; }
.shirt-thumb .tee-cuff { fill: #e6edf5; stroke: #9fb1c6; stroke-linejoin: round; stroke-width: 1.6; }
.shirt-thumb .tee-collar { fill: #e9eff6; stroke: #9fb1c6; stroke-linejoin: round; stroke-width: 1.8; }
.shirt-thumb .tee-fold { fill: none; stroke: #cdd8e5; stroke-linecap: round; stroke-width: 2; }
.shirt-thumb .tee-hem { fill: none; stroke: #b7c5d6; stroke-dasharray: 3 3; stroke-width: 1.4; }

/* The print area on the chest: the image fits inside it without stretching. */
.shirt-print {
    align-items: center;
    display: flex;
    height: 36%;
    justify-content: center;
    left: 32%;
    position: absolute;
    top: 25%;
    width: 36%;
}
.shirt-print img { display: block; height: 100%; object-fit: contain; width: 100%; }

/* Audio (Create Store): a speaker, how long it is and a play button. */
.audio-thumb {
    align-items: center;
    aspect-ratio: 1;
    background: linear-gradient(160deg, #eef4fb 0%, #d6e3f2 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    width: 100%;
}
.audio-thumb .audio-icon { height: 46%; width: 46%; }
.audio-thumb .audio-icon path { fill: #2a63bd; }
.audio-thumb .audio-icon .audio-wave { fill: none; stroke: #2a63bd; stroke-linecap: round; stroke-width: 4; }
.audio-length { color: #1d3f79; font: bold 12px/1 Verdana, sans-serif; margin-top: 4px; }
.audio-play {
    background: #3f9b2b;
    border: 1px solid #2b6b1c;
    border-radius: 50%;
    bottom: 8px;
    cursor: pointer;
    height: 30px;
    position: absolute;
    right: 8px;
    width: 30px;
}
.audio-play::before {
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
    border-top: 7px solid transparent;
    content: "";
    left: 10px;
    position: absolute;
    top: 7px;
}
.audio-play.playing::before { border: 0; background: #fff; height: 11px; left: 9px; top: 9px; width: 11px; }
.creation .audio-thumb { width: 76px; }
.creation .audio-thumb .audio-play { bottom: 4px; height: 22px; right: 4px; width: 22px; }
.creation .audio-thumb .audio-play::before { left: 7px; top: 4px; }

.price {
    align-items: center;
    color: #23702f;
    display: inline-flex;
    font: bold 16px/1 Arial, sans-serif;
    gap: 5px;
}

.price img { height: 18px; width: 18px; }
.price.free { color: var(--brand); }
.price.off { color: var(--muted); font-size: 14px; }

.review-badge {
    border-radius: 999px;
    display: inline-block;
    font: bold 12px/1 Arial, sans-serif;
    padding: 5px 9px;
    white-space: nowrap;
}

.review-badge.pending { background: #fff3cf; color: #7a5b05; }
.review-badge.rejected { background: #fde4e1; color: #b3261e; }
.review-badge.off { background: #e9eef5; color: var(--muted); }
.review-badge.approved { background: #e3f5e6; color: #23702f; }

/* ── Item page ──────────────────────────────────────────── */
.item-page {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
}

.item-stage {
    align-items: center;
    background:
        radial-gradient(ellipse at 50% 85%, rgba(94, 145, 204, 0.18), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #eef5fd 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-canvas { aspect-ratio: 1; cursor: grab; display: block; width: 100%; }
.item-canvas:active { cursor: grabbing; }

.stage-toggle { background: #e3ecf7; border-radius: 11px; display: flex; gap: 2px; padding: 3px; }
.stage-toggle button {
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    cursor: pointer;
    font: bold 14px/1 Arial, sans-serif;
    padding: 9px 12px;
}
.stage-toggle button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 2px rgba(36, 60, 90, 0.15); color: var(--brand); }

.item-flat { max-width: 320px; width: 100%; }

.item-info { display: grid; gap: 18px; min-width: 0; }
.item-title-row { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.item-title { color: var(--ink); font: bold clamp(26px, 3.6vw, 34px)/1.15 var(--display); margin: 0; overflow-wrap: anywhere; }
.item-type { color: var(--muted); font-size: 14px; font-weight: bold; letter-spacing: 0.04em; margin: 0 0 4px; text-transform: uppercase; }

.buy-box {
    align-items: center;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 14px 16px;
}

.buy-box .price { font-size: 24px; }
.buy-box .price img { height: 26px; width: 26px; }
.buy-box .btn { margin-left: auto; min-width: 140px; }
.buy-note { color: var(--muted); flex-basis: 100%; font-size: 14px; margin: 0; }

.item-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; }
.item-stats div { display: grid; gap: 2px; }
.item-stats dt { color: var(--muted); font-size: 13px; }
.item-stats dd { color: var(--ink); font-weight: bold; margin: 0; }

.item-description { color: var(--ink); line-height: 1.55; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.item-description.empty { color: var(--muted); font-style: italic; }

.review-note {
    background: #fde4e1;
    border-radius: 10px;
    color: #8a1f17;
    margin: 0;
    padding: 12px 14px;
}

.review-note.pending { background: #fff3cf; color: #6b5005; }

/* Confirm dialog */
.confirm-dialog {
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(20, 40, 70, 0.3);
    max-width: min(420px, calc(100vw - 32px));
    padding: 22px;
}

.confirm-dialog::backdrop { background: rgba(20, 35, 55, 0.45); }
.confirm-dialog h2 { color: var(--ink); font: bold 22px/1.2 var(--display); margin: 0 0 10px; }
.confirm-dialog p { color: var(--muted); line-height: 1.5; margin: 0 0 16px; }
.confirm-item { align-items: center; display: flex; gap: 14px; margin-bottom: 16px; }
.confirm-item .shirt-thumb { flex: 0 0 72px; width: 72px; }
.confirm-item strong { color: var(--ink); display: block; margin-bottom: 4px; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ── Create: T-Shirts ───────────────────────────────────── */
.create-tabs { margin-bottom: 20px; width: fit-content; }

.tshirt-maker {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
}

.tshirt-preview { align-items: center; display: flex; flex-direction: column; gap: 10px; }
.tshirt-preview canvas { aspect-ratio: 1; display: block; width: 100%; }
.tshirt-form { display: grid; gap: 16px; min-width: 0; }

.file-drop {
    align-items: center;
    background: var(--wash);
    border: 2px dashed var(--line-strong);
    border-radius: 12px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 14px 16px;
}

.file-drop:hover, .file-drop.dragging { border-color: var(--brand-2); }
.file-drop:focus-within { box-shadow: 0 0 0 3px #d3e6fb; }
.file-drop input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.file-drop strong { color: var(--brand); }

.price-input {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    display: flex;
    gap: 8px;
    max-width: 200px;
    padding: 0 12px;
}

.price-input img { height: 20px; width: 20px; }
.price-input input { border: 0; font: 16px Arial, sans-serif; min-width: 0; outline: none; padding: 11px 0; width: 100%; }
.price-input:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px #d3e6fb; }

.creation-list { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }

.creation {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    padding: 12px 16px;
}

.creation .shirt-thumb { width: 76px; }
.creation-name { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.creation-name a { color: var(--ink); font: bold 17px/1.25 Arial, sans-serif; overflow-wrap: anywhere; text-decoration: none; }
.creation-name a:hover { text-decoration: underline; }
.creation-meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.creation-note { color: #b3261e; font-size: 14px; margin: 4px 0 0; }

/* ── Admin: catalog review ──────────────────────────────── */
.review-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.review-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.review-card .review-art { background: repeating-conic-gradient(#eef2f7 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 10px; display: block; }
.review-card .review-art img { aspect-ratio: 1; display: block; object-fit: contain; width: 100%; }
.review-card h3 { color: var(--ink); font: bold 17px/1.25 Arial, sans-serif; margin: 0; overflow-wrap: anywhere; }
.review-card p { color: var(--muted); font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.review-card textarea { border: 1px solid var(--line-strong); border-radius: 8px; font: 14px Arial, sans-serif; min-height: 54px; padding: 8px; resize: vertical; }
.review-actions { display: flex; gap: 8px; }
.review-actions .btn { flex: 1; min-height: 38px; padding: 0 10px; }

@media (max-width: 760px) {
    .item-page, .tshirt-maker { grid-template-columns: minmax(0, 1fr); }
    .item-stage, .tshirt-preview { justify-self: center; max-width: 380px; width: 100%; }
    .creation { grid-template-columns: 64px minmax(0, 1fr); }
    .creation .creation-actions { grid-column: 1 / -1; }
}

/* Admin page doesn't load games.css: its own copy of the segmented tabs. */
.catalog-review-head { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 14px; }
.catalog-review-head .admin-status-msg { margin: 0; }
#tab-catalog .sort-tabs { background: #e3ecf7; border-radius: 11px; display: flex; gap: 2px; padding: 3px; }
#tab-catalog .sort-tabs button {
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    cursor: pointer;
    font: bold 14px/1 Arial, sans-serif;
    padding: 9px 12px;
}
#tab-catalog .sort-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 2px rgba(36, 60, 90, 0.15); color: var(--brand); }
.tab-count { background: #c4281c; border-radius: 999px; color: #fff; font: bold 11px/1 Arial, sans-serif; margin-left: 4px; padding: 3px 6px; }
.item-by { align-items: center; color: var(--muted); display: flex; gap: 6px; margin: 10px 0 0; }

/* Decals: the picture on a checkerboard (so see-through parts show) */
.decal-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; aspect-ratio: 1;
  background-color: #fff;
  background-image: linear-gradient(45deg, #e6e8eb 25%, transparent 25%), linear-gradient(-45deg, #e6e8eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6e8eb 75%), linear-gradient(-45deg, transparent 75%, #e6e8eb 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  border-radius: 6px;
  overflow: hidden;
}
.decal-thumb img { max-width: 88%; max-height: 88%; object-fit: contain; }
.price.decal-id { color: #5b6270; font-weight: 600; }
.decal-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.decal-box code { font-size: 1.3em; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: #eef1f5; }
.decal-box p { flex-basis: 100%; margin: 0; color: #5b6270; font-size: 0.92em; }
.creation .decal-thumb { width: 76px; }
.confirm-item .decal-thumb { flex: 0 0 72px; width: 72px; }
.tshirt-preview .decal-thumb { max-width: 320px; }

/* Hats: shown on a classic head */
.hat-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 40%, #f4f8fc, #dde7f2);
  border-radius: 6px; overflow: hidden;
}
.hat-thumb img { width: 100%; height: 100%; object-fit: contain; }
.creation .hat-thumb { width: 76px; }
.confirm-item .hat-thumb { flex: 0 0 72px; width: 72px; }
.tshirt-preview .hat-thumb, .item-flat .hat-thumb { max-width: 320px; }

/* Meshes (Create Store): a still picture of the mesh, and a viewer you can turn */
.mesh-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 35%, #f6f9fc, #d9e3ee);
  border-radius: 6px; overflow: hidden;
}
.mesh-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mesh-thumb img:not([src]) { visibility: hidden; }
.creation .mesh-thumb { width: 76px; }
.mesh-viewer {
  display: block; width: 100%; max-width: 420px; aspect-ratio: 1;
  background: radial-gradient(circle at 50% 35%, #f6f9fc, #d9e3ee);
  border-radius: 12px; cursor: grab; touch-action: none;
}
.mesh-viewer:active { cursor: grabbing; }

/* Free Models (Create Store): the picture Studio took of the model */
.model-thumb {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1;
  background: #fff; border-radius: 6px; overflow: hidden;
}
.model-thumb img { width: 100%; height: 100%; object-fit: cover; }
.model-thumb img.model-thumb-icon { width: 40%; height: 40%; object-fit: contain; opacity: .5; }
.creation .model-thumb { width: 76px; }
.asset-art .model-thumb { max-width: 420px; border-radius: 12px; }
.model-warning { background: #fff6d6; border: 1px solid #e8c84a; border-radius: 6px; padding: 8px 10px; margin: 10px 0 0; font-size: .92em; }

/* The Create Store */
.store-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.asset-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.asset-art .decal-thumb { max-width: 420px; border-radius: 12px; }
.asset-info h1 { margin: 0 0 4px; }
.asset-kind { display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--wash); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.asset-id { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 6px; }
.asset-id code { font-size: 1.4em; font-weight: 700; padding: 4px 12px; border-radius: 8px; background: #eef1f5; }
.asset-howto { margin: 14px 0 0; padding-left: 20px; color: var(--text); }
.asset-howto li { margin: 4px 0; }
.asset-facts { color: var(--muted); font-size: 0.92em; margin: 12px 0 0; }
.asset-edit { margin-top: 22px; }
@media (max-width: 760px) { .asset-layout { grid-template-columns: 1fr; } }

/* 0.7.6: audio on its page, the spinning hat, the Updated line */
.asset-art .audio-thumb { max-width: 420px; border-radius: 12px; }
.asset-art .audio-thumb .audio-icon { height: 40%; width: 40%; }
.asset-art .audio-length { font-size: 16px; margin-top: 8px; }
.asset-audio { display: block; margin-top: 12px; max-width: 420px; width: 100%; }
.item-spin { background: radial-gradient(circle at 50% 38%, #f6f9fc, #d9e3ee); border-radius: 10px; touch-action: none; }
.item-flat .shirt-thumb { max-width: 340px; margin: 0 auto; }
.audio-preview .audio-thumb { margin: 0 auto; max-width: 260px; }
.item-tile-dates, .game-tile-dates { color: var(--muted); display: block; font-size: 11px; line-height: 1.35; }
.creation .audio-thumb .audio-length { display: none; }

/* A hat that's a gift box */
.item-gift { background: #fff4e3; border: 1px solid #e3b878; border-radius: 6px; color: #5a2d0c; font-size: 13px; line-height: 1.45; margin: 12px 0 0; padding: 8px 10px; }
.item-gift[hidden] { display: none; }

/* 0.8.0: Create Store "Get" */
.asset-get { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.asset-get .btn:disabled { cursor: default; opacity: 0.75; }
