/* /trading-card-maker/ page styles (T-PB.638), prefix tc-. Built from /assets/polyatic.css tokens only (no new
   colours or fonts for the page chrome). The cards themselves are print and keep their own colours in light and dark;
   the six swatches show the card colours a visitor can pick. */
.nojs{margin:1.25rem 0 0;padding:0.875rem 1rem;border:1px solid var(--line);border-left:0.25rem solid var(--accent);border-radius:0.625rem;background:var(--surface);color:var(--ink);font-size:0.9375rem;line-height:1.6}
.tc-head .sub{margin-bottom:0.875rem}
@media(max-width:519px){.tc-head h1{margin-bottom:0.25rem}.tc-head .sub{font-size:0.9375rem;line-height:1.4}.tc-head .sub:not([data-you-get]){display:none}}
@media(min-width:920px){.tc-duo{grid-template-columns:minmax(0,1.25fr) minmax(20rem,.9fr)}}
.duo>.pane-result.tc-sidebar{position:static}
.tc-sidebar{display:grid;gap:1rem;align-content:start}
.tc-card{padding:0.875rem;min-width:0}
@media(min-width:520px){.tc-card{padding:1.25rem}}
[hidden]{display:none!important}

.tc-stage{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.625rem;border:1px solid var(--line);border-radius:0.5rem;background:var(--surface-2);padding:0.625rem}
.tc-stage.one{grid-template-columns:minmax(0,1fr)}
.tc-side{margin:0;min-width:0;text-align:center}
.tc-side canvas{display:block;width:100%;max-width:18rem;height:auto;margin:0 auto;border-radius:0.25rem;box-shadow:0 1px 4px rgba(0,0,0,.22)}
.tc-stage.one .tc-side canvas{max-width:min(18rem,62vw)}
.tc-side figcaption{margin-top:0.375rem;font-family:var(--mono);font-size:0.6875rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.tc-nav{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;margin:0.625rem 0 0;font-family:var(--mono);font-size:0.8125rem;color:var(--ink-2);text-align:center}
.btn.tc-small{height:2.375rem;padding:0 0.75rem;font-size:0.8125rem}
.btn:disabled{opacity:.5;cursor:default;filter:none}

.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.375rem;text-align:center;padding:0.875rem 1rem;border:2px dashed var(--line-2);border-radius:0.875rem;background:var(--surface-2);cursor:pointer;transition:border-color .15s,background .15s;margin-top:0.875rem}
.drop:hover,.drop:focus-visible,.drop.drag{border-color:var(--accent);background:var(--accent-soft)}
.drop b{font-size:1rem}
.drop small{color:var(--muted);max-width:48ch}
.hint{font-size:0.8125rem;color:var(--muted);margin:0.5rem 0.125rem 0;min-height:1.125rem;overflow-wrap:anywhere}
.hint.bad{color:var(--bad);font-weight:600}

.tc-sec{font-size:0.8125rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin:0 0 0.625rem}
.tc-sec+.modes{margin-bottom:0.75rem}
.tc-gap{margin-top:1.125rem}
.tc-k{display:block;font-family:var(--mono);font-size:0.6875rem;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-k output{text-transform:none;color:var(--ink)}
.tc-in{display:block;min-width:0;margin:0.75rem 0 0}
.tc-sec+.tc-in,.tc-sec+.tc-grid2>.tc-in{margin-top:0}
.tc-in input[type=text],.tc-in input[type=number],.tc-in textarea{width:100%;min-height:2.625rem;padding:0.4375rem 0.625rem;font:inherit;font-size:1rem;color:var(--ink);background:var(--surface);border:1px solid var(--line-2);border-radius:0.5rem}
.tc-in textarea{resize:vertical;line-height:1.45}
.tc-in input[type=range]{width:100%;margin:0.5rem 0}
.tc-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 0.75rem}
.tc-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 0.75rem}
.tc-grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0 0.5rem}
@media(max-width:419px){.tc-grid3{grid-template-columns:minmax(0,1fr)}.tc-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-grid2{grid-template-columns:minmax(0,1fr)}}
.tc-row{display:flex;align-items:flex-end;gap:0.75rem;margin-top:0.75rem}
.tc-row .modes{flex:1}
.tc-max{margin:0;width:5.5rem;flex:none}
.tc-tools{margin-top:0.5rem;padding-top:0.5rem;border-top:1px solid var(--line)}
.tc-check{display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;color:var(--ink-2);margin:0 0 0.75rem}
.tc-check input{width:1.125rem;height:1.125rem;accent-color:var(--accent);flex:none}
.tc-note{margin:0.5rem 0.125rem 0.75rem;font-size:0.8125rem;color:var(--muted);line-height:1.5}
.tc-note b{color:var(--ink-2)}
.tc-warn{color:var(--bad);font-weight:600}
.tc-sidebar .modes button,.tc-frames button{padding:0.4375rem 0.25rem}
.tc-link{border:0;background:none;padding:0.25rem 0;color:var(--muted);font:inherit;font-size:0.8125rem;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.tc-link:hover{color:var(--accent)}
.tc-dl{display:grid;gap:0.5rem;margin-top:0.25rem}
.tc-line{display:flex;flex-wrap:wrap;gap:0.375rem 0.875rem;align-items:center;margin:0.625rem 0 0}

.tc-swatches{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:0.5rem}
.tc-swatches button{width:2.5rem;height:2.5rem;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line-2);background:var(--sw);cursor:pointer;padding:0}
.tc-swatches button.active{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--ink)}
.tc-swatches button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.tc-swatches [data-colour=red]{--sw:#c4303a}
.tc-swatches [data-colour=blue]{--sw:#2356b0}
.tc-swatches [data-colour=green]{--sw:#1e7a49}
.tc-swatches [data-colour=purple]{--sw:#6a3d9a}
.tc-swatches [data-colour=orange]{--sw:#d0651a}
.tc-swatches [data-colour=black]{--sw:#2b2d31}

.tc-list-head{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;margin-top:1.125rem}
.tc-list-head .tc-sec{margin:0}
.tc-tally{font-family:var(--mono);font-weight:600;color:var(--ink);text-transform:none;letter-spacing:0}
.tc-cards{list-style:none;margin:0.5rem 0 0;padding:0;max-height:15rem;overflow-y:auto;border:1px solid var(--line);border-radius:0.5rem;counter-reset:g}
.tc-cards:empty{display:none}
.tc-cardrow{display:flex;align-items:center;gap:0.625rem;padding:0.25rem 0.625rem;border-top:1px solid var(--line);counter-increment:g}
.tc-cardrow:first-child{border-top:0}
.tc-cardrow::before{content:counter(g);font-family:var(--mono);font-size:0.75rem;color:var(--muted);min-width:1.5em}
.tc-cardrow.on{background:var(--accent-soft)}
.tc-cname{flex:1;min-width:0;border:0;background:none;padding:0.375rem 0;text-align:left;font:inherit;font-size:0.9375rem;color:var(--ink);cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.tc-designs{margin-top:1.5rem}
.tc-dlist{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.75rem}
@media(min-width:720px){.tc-dlist{grid-template-columns:repeat(4,minmax(0,14rem))}}
.tc-design{display:flex;flex-direction:column;gap:0.25rem;width:100%;padding:0.5rem;border:1px solid var(--line);border-radius:0.625rem;background:var(--surface);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.tc-design:hover,.tc-design:focus-visible{border-color:var(--accent)}
.tc-design img{display:block;width:100%;height:auto;border-radius:0.25rem;background:#fff;box-shadow:0 0 0 1px var(--line)}
.tc-design span{font-weight:600;font-size:0.9375rem}
.tc-design small{color:var(--muted);font-size:0.8125rem}
