/* Tarjetas de intercambio — usa las variables de /raffle/account-theme.css (--lime, --text, --muted, --heading) */
body { margin: 0; }
.tc-page { max-width: 80rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tc-intro { padding: clamp(1.4rem, 4.2vw, 3rem) 0 1.2rem; }
.tc-kicker { margin: 0 0 .5rem; color: var(--lime); font: 700 .8rem/1 "DM Sans", sans-serif; letter-spacing: .16em; }
.tc-intro h1 { margin: 0; font: 800 clamp(3rem, 8vw, 5.8rem)/.89 var(--heading); letter-spacing: -.025em; text-transform: uppercase; }
.tc-intro p:last-child { max-width: 46rem; margin: .8rem 0 0; color: #ded7f9; font-weight: 600; }
.tc-notice { border-inline-start: 3px solid #ffa9c2; padding: .7rem 1rem; background: #2a1622; }
.account-card h2 { margin: 0; }

.tc-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .85rem; align-items: start; }
.tc-layout .account-card { min-width: 0; }
.tc-catalog-card { grid-column: span 7 !important; --accent: #96d9ff; --card-tint: #192f49; }
.tc-side { grid-column: span 5; display: grid; gap: .85rem; min-width: 0; }
.tc-card-editor { --accent: var(--lime); --card-tint: #283619; }
.tc-save-card { --accent: #cdb7ff; --card-tint: #31214d; }
.tc-notes-card { grid-column: 1 / -1 !important; --accent: #80f2d7; --card-tint: #173a39; }

/* Catálogo */
.tc-catalog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.tc-mode { display: inline-flex; padding: .2rem; border: 1px solid #96d9ff40; border-radius: .6rem; background: #0e0e18; }
.tc-mode button { min-height: 2.3rem; border: 0; background: transparent; font-size: .9rem; padding: .3rem .9rem; }
.tc-mode button[aria-checked="true"].is-have { background: var(--lime); color: #151b08; }
.tc-mode button[aria-checked="true"].is-want { background: #ffa9c2; color: #2a0d18; }
.tc-tabs, .tc-groups { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .7rem; }
.tc-tabs button[aria-selected="true"], .tc-groups button[aria-pressed="true"] { background: #96d9ff; border-color: #96d9ff; color: #0b1a2b; }
.tc-tabs small { opacity: .75; font-weight: 600; margin-inline-start: .2rem; }
.tc-groups:empty { display: none; }
.tc-groups button { font-size: .74rem; min-height: 1.8rem; }
.tc-search { display: block; margin-top: .6rem; }
.tc-search input { width: 100%; box-sizing: border-box; padding: .55rem .7rem; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr)); gap: .4rem; margin-top: .7rem; max-height: 70vh; overflow-y: auto; padding: .15rem .15rem .4rem; }
.tc-item {
    position: relative; display: grid; justify-items: center; align-content: start; gap: .25rem;
    min-width: 0; min-height: 7.6rem; padding: .45rem .3rem; border-radius: .6rem; text-align: center;
    border: 1px solid color-mix(in srgb, var(--rc, #6f6a88) 55%, #29263a); background: #15141f;
}
.tc-item:hover { background: #1d1c2b; border-color: var(--rc, #96d9ff); }
.tc-item b { font-size: .7rem; font-weight: 650; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-badges { position: absolute; top: 3px; right: 3px; display: grid; gap: 2px; }
.tc-badge { padding: 0 .3rem; border-radius: 999px; font-size: .62rem; font-weight: 800; line-height: 1.35; }
.tc-badge-have { background: var(--lime); color: #151b08; }
.tc-badge-want { background: #ffa9c2; color: #2a0d18; }
.tc-thumb { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: .6rem; background: radial-gradient(circle at 35% 30%, #34304d, #17161f 75%); overflow: hidden; }
.tc-thumb img { width: 100%; height: 100%; object-fit: contain; }
.tc-thumb span { font-size: 1.7rem; line-height: 1; }
.r-common { --rc: #a7edc8; } .r-uncommon { --rc: #a3d5ff; } .r-rare { --rc: #c8b0ff; } .r-epic { --rc: #ffa691; } .r-legendary { --rc: #ffda83; }
.tc-empty { color: var(--muted); padding: 1rem 0; }

/* Editor de la tarjeta */
.tc-fields { display: grid; gap: .4rem; margin-top: .7rem; }
.tc-fields label { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); align-items: center; gap: .5rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.tc-fields input, .tc-fields select { min-width: 0; }
.tc-preview { margin-top: .8rem; border-radius: .8rem; padding: .8rem; background: linear-gradient(160deg, color-mix(in srgb, var(--tc-accent) 22%, #12121d), #0d0d16 60%); border: 1px solid color-mix(in srgb, var(--tc-accent) 50%, transparent); }
.tc-preview header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.tc-preview header b { font: 800 1.45rem/1 var(--heading); text-transform: uppercase; }
.tc-preview header small { color: var(--tc-accent); font-weight: 700; font-size: .72rem; letter-spacing: .08em; }
.tc-preview .tc-note { margin: .3rem 0 0; color: #ded7f9; font-size: .82rem; }
.tc-list h3 { display: flex; justify-content: space-between; align-items: baseline; margin: .8rem 0 .35rem; font: 700 1.15rem/1 var(--heading); }
.tc-list h3 small { color: var(--muted); font: 600 .74rem/1 "DM Sans", sans-serif; }
.tc-list.is-have h3 { color: var(--lime); }
.tc-list.is-want h3 { color: #ffa9c2; }
.tc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: .3rem; }
.tc-chip { position: relative; display: grid; justify-items: center; gap: .15rem; padding: .35rem .25rem .3rem; border-radius: .5rem; background: #ffffff0d; border: 1px solid color-mix(in srgb, var(--rc, #6f6a88) 45%, transparent); text-align: center; }
.tc-chip .tc-thumb { width: 2.6rem; height: 2.6rem; }
.tc-chip .tc-thumb span { font-size: 1.25rem; }
.tc-chip b { font-size: .62rem; font-weight: 650; line-height: 1.1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-qty { display: flex; align-items: center; gap: .15rem; }
.tc-qty button { min-height: 1.35rem; width: 1.35rem; padding: 0; font-size: .8rem; line-height: 1; }
.tc-qty span { min-width: 1.6rem; font-weight: 800; font-size: .75rem; font-variant-numeric: tabular-nums; }
.tc-hint { color: var(--muted); font-size: .8rem; margin: .2rem 0; }
.tc-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.tc-primary { background: var(--lime); border-color: var(--lime); color: #151b08; }
.tc-primary:not(:disabled):hover { background: #efffb6 !important; }
.tc-toast { min-height: 1.3em; margin: .5rem 0 0; color: var(--accent); font-weight: 650; font-size: .86rem; }

/* Guardar */
.tc-save-form { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0; }
.tc-save-form input { flex: 1 1 10rem; min-width: 0; }
.tc-save-form button { background: #cdb7ff; border-color: #cdb7ff; color: #1b1030; }
.tc-plans { margin: .6rem 0 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.tc-plans li { display: flex; align-items: center; gap: .4rem; padding: .4rem .5rem; border: 1px solid #cdb7ff30; border-radius: .45rem; background: #15131f; }
.tc-plans li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tc-plans li small { color: var(--muted); }
.tc-login { display: inline-block; margin-top: .3rem; padding: .55rem .9rem; border-radius: .5rem; background: var(--lime); color: #151b08; font-weight: 800; text-decoration: none; }
.tc-muted { color: var(--muted); font-size: .86rem; }
.tc-notes { margin: .5rem 0 0; padding-inline-start: 1.1rem; color: #d6d2ea; font-size: .84rem; columns: 2 22rem; column-gap: 2rem; }
.tc-notes li { margin-bottom: .35rem; break-inside: avoid; }

@media (max-width: 62rem) {
    .tc-catalog-card, .tc-side { grid-column: 1 / -1 !important; }
    .tc-grid { max-height: 55vh; }
}
@media (max-width: 30rem) {
    .tc-grid { grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); }
    .tc-fields label { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) { .account-trace::after { animation: none; } }
