.tabard-page{--tabard-line:#474239;--tabard-panel:#1b1b18;max-width:1120px;margin:0 auto;color:var(--ink)}
.tabard-intro{max-width:720px;margin:-4px 0 24px;color:#c4bfb3;font-size:16px;line-height:1.65}
.tabard-intro p{margin:0}
.tabard-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
.tabard-preview-panel,.tabard-controls{min-width:0;border:1px solid var(--line);background:var(--panel)}
.tabard-preview-panel{padding:16px 14px 13px;position:relative;top:auto;z-index:1}
.tabard-preview-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tabard-kicker{font:10px var(--mono);text-transform:uppercase;letter-spacing:.15em;color:var(--accent2)}
.tabard-live{font-size:12px;color:#d3c8b1}
.tabard-stage{position:relative;display:grid;place-items:center;width:min(100%,350px);margin:12px auto 8px;overflow:hidden;border:1px solid var(--line);background:radial-gradient(ellipse at 50% 46%,#39362c 0,#24231e 45%,#181816 75%)}
.tabard-stage:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(132deg,#ffffff04 0 1px,transparent 1px 4px);opacity:.42;pointer-events:none}
.tabard-garment{display:block;width:100%;height:auto;aspect-ratio:2/3}
.tabard-preview-note{margin:8px 0 0;color:var(--dim);font-size:11px;line-height:1.45}
.tabard-controls{padding:2px 15px 15px}
.tabard-control-group{border:0;border-bottom:1px solid var(--line);padding:15px 0 16px;margin:0;min-width:0}
.tabard-control-group legend{padding:0 0 11px;font:600 15px var(--sans);color:var(--ink)}
.tabard-swatches{display:flex;flex-wrap:wrap;gap:8px}
.tabard-swatch{position:relative;min-height:38px;display:grid;grid-template-columns:21px minmax(0,1fr);align-items:center;gap:7px;min-width:calc(50% - 4px);padding:6px 8px;border:1px solid #3f3c35;background:#191916;color:#d8d1c4;font-size:11px;line-height:1.25;cursor:pointer;overflow-wrap:normal}
.tabard-swatch:has(input:checked),.tabard-swatch:focus-within{border-color:#d58c50;background:#28231d;color:#fff0d7;box-shadow:inset 0 0 0 1px #d58c50}
.tabard-swatch input{position:absolute;width:1px;height:1px;opacity:0;margin:0}
.tabard-swatch:focus-within{outline:2px solid #f1b66f;outline-offset:2px}
.tabard-swatch-chip{display:grid;place-items:center;width:20px;height:20px;border:1px solid #ffffff6c;border-radius:50%;background:var(--swatch-color,#888);color:transparent;font-size:11px;font-weight:800}
.tabard-swatch input:checked+.tabard-swatch-chip{color:#fff;text-shadow:0 1px 2px #0008}
.tabard-swatch-chip[data-color]{background:var(--swatch-color,#888)}
.tabard-help,.tabard-emblem-status,.tabard-draft-status{margin:0 0 9px;color:var(--muted);font-size:12px;line-height:1.45}
.tabard-emblem-search-label,.tabard-border-style-label,.tabard-more-color{display:grid;gap:5px;margin:0 0 9px;color:var(--muted);font:10px var(--mono);text-transform:uppercase;letter-spacing:.06em}
.tabard-emblem-search-label input,.tabard-border-style-label select,.tabard-more-color select{width:100%;min-height:42px;padding:7px 9px;border:1px solid #514b40;background:#10100f;color:var(--ink);font:13px var(--sans);text-transform:none;letter-spacing:normal}
.tabard-emblem-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;max-height:180px;overflow:auto;overscroll-behavior:contain;padding:2px}
.tabard-emblem-choice{position:relative;display:flex;min-width:0;min-height:58px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 3px;border:1px solid #403d36;background:#191916;color:#cfc9bd;font-size:9px;line-height:1.15;text-align:center;overflow-wrap:anywhere}
.tabard-emblem-choice img{width:28px;height:28px;object-fit:contain;filter:drop-shadow(0 2px 2px #0009)}
.tabard-emblem-choice[hidden]{display:none}
.tabard-emblem-choice:hover,.tabard-emblem-choice.is-selected{border-color:#e3aa65;background:#30271e;color:#fff0d7}
.tabard-emblem-choice:focus-visible,.tabard-actions button:focus-visible,.tabard-share-result input:focus-visible{outline:2px solid #f1b66f;outline-offset:2px}
.tabard-emblem-empty,.tabard-emblem-loading{grid-column:1/-1;color:var(--muted);font-size:12px}
.tabard-actions{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}
.tabard-actions button{min-height:44px;padding:9px 12px;border:1px solid #776246;background:#29271f;color:#e8dfcc;font:600 10px var(--mono);letter-spacing:.035em;text-transform:uppercase}
.tabard-actions .tabard-share{background:var(--accent);border-color:var(--accent);color:#1b1713}
.tabard-actions button:hover{border-color:var(--accent2);background:#3a3125}
.tabard-actions .tabard-share:hover{background:var(--accent2)}
.tabard-share-result{padding:10px;border:1px solid var(--line);background:#171715;margin:8px 0 12px}
.tabard-share-result[hidden]{display:none}
.tabard-share-result label{display:block;margin-bottom:5px;color:var(--muted);font:10px var(--mono);text-transform:uppercase;letter-spacing:.08em}
.tabard-share-result input{width:100%;min-height:42px;padding:8px;border:1px solid #514b40;background:#10100f;color:#f0e5ce;font-size:12px}
.tabard-draft-status{min-height:1.4em;margin:0;color:#b7ad99}
@media(min-width:800px){.tabard-layout{grid-template-columns:minmax(300px,.9fr) minmax(420px,1.1fr);gap:24px}.tabard-preview-panel{position:sticky;top:12px;padding:18px 20px 15px}.tabard-controls{padding:5px 22px 18px}.tabard-swatch{min-width:calc(33.333% - 6px)}.tabard-more-color{grid-column:1/-1}.tabard-emblem-grid{grid-template-columns:repeat(6,minmax(0,1fr));max-height:200px}}
@media(max-width:799px){.tabard-stage{width:min(100%,300px)}}
@media(max-width:360px){.tabard-page{font-size:14px}.tabard-controls{padding-right:10px;padding-left:10px}.tabard-swatch{min-width:calc(50% - 4px);font-size:10px;padding:6px 5px}.tabard-emblem-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:132px}.tabard-actions button{flex:1 1 calc(50% - 4px)}}
@media(prefers-reduced-motion:reduce){.tabard-page *{scroll-behavior:auto!important;transition:none!important}}
