/* Only /codigos/ loads these rules. Title/intro reuse Halloween's .placeholder.
   Cards reuse Tierlist's .tier-board, buttons its .tier-tab; source styles unchanged. */
.codes-page .codes-main{padding-bottom:60px}
.codes-page .codes-section{width:min(1120px,100%);margin:0 auto 48px}
.codes-page .codes-section h2{font-size:36px;margin-bottom:24px}
.codes-page .codes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:stretch}
.codes-page .code-card{margin:0;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.codes-page .code-media{position:relative;aspect-ratio:1;width:100%;background:#09090a;border-bottom:1px solid rgba(255,255,255,.12);display:grid;place-items:center}
.codes-page .code-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.codes-page .code-media>span{padding:24px;text-align:center;color:#bbb;font-size:15px}
.codes-page .code-content{display:flex;flex-direction:column;gap:20px;padding:24px;flex:1;min-width:0}
.codes-page .code-heading{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}
.codes-page .code-card h3{font-size:32px;overflow-wrap:anywhere;line-height:1.15;user-select:all;max-width:100%}
.codes-page .code-state{font:800 11px/1.4 var(--body);color:var(--red);letter-spacing:.06em}
.codes-page [data-status="expired"] .code-state{color:#b7b7bf}
.codes-page [data-status="expired"] .code-media img{opacity:.65}
.codes-page .code-card dl{font-size:15px;line-height:1.6;min-height:112px}
.codes-page .code-card dt{font-size:12px;font-weight:800;color:#bbb;letter-spacing:.04em;margin-top:16px}
.codes-page .code-card dt:first-child{margin-top:0}.codes-page .code-card dd{overflow-wrap:anywhere}
.codes-page .code-actions{display:flex;flex-direction:column;gap:18px;margin-top:auto}
.codes-page .code-actions button{width:100%;height:48px;min-height:48px;padding:0 12px;margin:0;white-space:nowrap}
.codes-page .code-actions button:disabled{background:#29292e;color:#bbb;cursor:default;box-shadow:none;transform:none}
.codes-page .code-source{font-size:12px;font-weight:700;text-align:center;text-decoration:underline;text-underline-offset:4px;padding:10px 0}
.codes-page .code-feedback{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.codes-page :is(button,a):focus-visible{outline:2px solid #fff;outline-offset:3px}
.codes-page .codes-notice{padding:18px;margin-bottom:24px;background:#09090a;border-left:3px solid var(--red);font-size:15px}
.codes-page .codes-debug{padding:24px;background:#09090a;border:1px solid rgba(255,255,255,.12);margin:30px auto;max-width:1120px}
.codes-page .codes-debug pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7}
.codes-page [hidden]{display:none!important}
@media(max-width:760px){.codes-page .codes-grid{grid-template-columns:1fr}.codes-page .codes-intro{margin-bottom:var(--public-section-gap)}.codes-page .codes-section h2{font-size:30px}.codes-page .code-content{padding:20px}.codes-page .code-card h3{font-size:28px}.codes-page .code-card dl{min-height:112px}}
/* Shared left edge and spacing are local to the codes page. */
.codes-page .codes-intro{margin-bottom:52px;align-items:flex-start!important;text-align:left}
.codes-page .codes-intro :is(h1,p){text-align:left!important;margin-left:0!important;margin-right:0!important}
.codes-page .codes-section{width:100%;margin:0 0 76px}
.codes-page .codes-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.codes-page .code-card{border-radius:14px}
.codes-page .code-media{border-radius:14px;overflow:hidden}
.codes-page .code-content{padding:20px;gap:18px}
.codes-page .code-heading{min-height:54px;align-content:flex-start}
.codes-page .code-card h3{font-size:28px}
.codes-page .code-card dl{min-height:132px}
.codes-page .code-card dd:first-of-type{min-height:48px}
.codes-page .codes-notice,.codes-page .codes-debug{border-radius:14px}
.codes-page .code-media-fallback{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:24px;width:100%;height:100%;text-align:center;background:#09090a}
.codes-page .code-media-fallback>span{font-size:12px;font-weight:800;color:var(--red);letter-spacing:.12em}
.codes-page .code-media-fallback strong{font:400 clamp(24px,3vw,36px)/1.15 var(--head);overflow-wrap:anywhere;max-width:100%}
.codes-page .code-media-fallback small{font-size:11px;color:#aaa}
.codes-page .codes-archive{display:flex;gap:20px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#63303c #111114;cursor:grab;padding:0 0 14px;touch-action:pan-x pan-y;max-width:100%}
.codes-page .codes-archive::-webkit-scrollbar{height:5px}.codes-page .codes-archive::-webkit-scrollbar-thumb{background:#63303c;border-radius:999px}.codes-page .codes-archive::-webkit-scrollbar-track{background:#111114;border-radius:999px}
.codes-page .codes-archive .code-card{flex:0 0 280px;scroll-snap-align:start}
.codes-page .codes-archive .code-content{padding:18px;gap:14px}
.codes-page .codes-archive h3{font-size:24px}.codes-page .codes-archive dl{font-size:14px;min-height:122px}
.codes-page .codes-archive .code-source{font-size:11px}
.codes-page .codes-archive.is-dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.codes-page .codes-archive.is-dragging *{cursor:grabbing;user-select:none}
.codes-page .codes-archive:focus-visible{outline:2px solid var(--red);outline-offset:4px}
@media(max-width:1200px){.codes-page .codes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.codes-page .codes-grid{grid-template-columns:1fr}.codes-page .codes-intro{margin-bottom:38px}.codes-page .codes-archive .code-card{flex-basis:min(280px,85%)}.codes-page .code-card dl{min-height:112px}}
.codes-page .codes-archive{border-radius:14px}
.codes-page .code-card[data-status="active"]{transition:border-color .2s,box-shadow .2s}
@media(hover:hover) and (min-width:761px){.codes-page .code-card[data-status="active"]:hover{border-color:#ff003c;box-shadow:0 0 8px rgba(255,0,60,.45),0 0 20px rgba(255,0,60,.22)}.codes-page [data-status="active"] .code-media img{transition:transform .25s}.codes-page [data-status="active"] .code-media:hover img{transform:scale(1.03)}}
.codes-page .code-zoom{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:14px;background:transparent;cursor:zoom-in}
.codes-page .codes-archive{scrollbar-color:#ff003c #111114}.codes-page .codes-archive::-webkit-scrollbar-thumb{background:#ff003c}
.codes-page .codes-lightbox{position:fixed;inset:0;margin:auto;padding:40px 12px 12px;width:fit-content;height:fit-content;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);background:#09090a;border:1px solid #ff003c;border-radius:14px;color:#fff;overflow:hidden}
.codes-page .codes-lightbox::backdrop{background:rgba(0,0,0,.86)}.codes-page .codes-lightbox img{max-width:88vw;max-height:calc(90dvh - 64px);width:auto;height:auto;object-fit:contain}.codes-page .codes-lightbox .codes-lightbox-close{position:absolute;top:4px;right:8px;width:40px;height:40px;background:#09090a;color:#fff;border:0;border-radius:999px;font-size:32px;cursor:pointer}
@media(prefers-reduced-motion:reduce){.codes-page .code-card,.codes-page .code-media img{transition:none!important}}

/* Hover ring is positioned over the existing border: no content or card geometry changes. */
.codes-page .code-card[data-status="active"]{position:relative}
.codes-page .code-card[data-status="active"]::after{content:"";position:absolute;inset:0;border:2px solid transparent;border-radius:inherit;pointer-events:none;z-index:4;box-sizing:border-box}
@media(hover:hover) and (min-width:761px){.codes-page .code-card[data-status="active"]:hover::after{border-color:#ff003c}}
.codes-page .code-media [hidden]{display:none!important}
.codes-page .code-image-prev,.codes-page .code-image-next{position:absolute;top:50%;bottom:auto;transform:translateY(-50%);width:44px;height:44px;padding:0;display:grid;place-items:center;z-index:3;border:0;border-radius:0;background:transparent;box-shadow:none;outline:0;color:#fff;font-size:32px;line-height:1;cursor:pointer;transition:color .18s}
.codes-page .code-image-prev{left:10px}.codes-page .code-image-next{right:10px}
.codes-page .code-image-prev:focus-visible,.codes-page .code-image-next:focus-visible{outline:0;color:#ff003c;text-decoration:underline;text-underline-offset:4px}
.codes-page .code-image-dots{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:2;pointer-events:none}
.codes-page .code-image-dots span{width:6px;height:6px;border-radius:50%;background:#444}
.codes-page .code-image-dots .is-current{background:#ff003c}
.codes-page .has-many-images img{box-sizing:border-box;padding:0;object-position:center}
.codes-page .codes-lightbox{border:2px solid #ff003c;box-shadow:0 0 12px rgba(255,0,60,.50),0 0 30px rgba(255,0,60,.25);box-sizing:border-box}
.codes-page .codes-lightbox .code-media{width:fit-content;height:fit-content;aspect-ratio:auto;border:0;display:block}
.codes-page .codes-lightbox .code-media img{position:static;display:block;width:auto;height:auto;max-width:min(90vw,calc(100vw - 44px));max-height:min(88dvh,calc(100dvh - 72px));object-fit:contain;object-position:center;padding:0}
@media(max-width:760px){.codes-page .codes-lightbox{box-shadow:0 0 8px rgba(255,0,60,.4),0 0 18px rgba(255,0,60,.2)}}

@media(hover:hover){.codes-page .code-image-prev:hover,.codes-page .code-image-next:hover{color:#ff003c;background:transparent;box-shadow:none}}


/* Vistas CÓDIGOS: dos grupos visuales independientes con las mismas 3 columnas.
   El grupo de imágenes siempre empieza una nueva fila desde la izquierda. */
.codes-page .codes-active-layout{display:flex;flex-direction:column;gap:26px}
.codes-page .codes-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.codes-page .codes-grid > .code-card{grid-column:span 1;max-width:none;width:100%}
.codes-page .codes-section > h2{margin-bottom:28px}
.codes-page .codes-source-note{font-size:14px;line-height:1.5;color:#bcbcc1;margin:-12px 0 24px;max-width:390px;text-wrap:balance}

/* Sin imagen: mismo ancho de columna y gris visible que los dropzones S-A-B-C-D de TIERLIST.\n   .tier-dropzone rgba(16,16,17,.86) sobre .tier-board #09090a equivale a #0f0f10. */
.codes-page .code-card.code-card-text{
 position:relative;min-height:235px;
 background:#0f0f10;border:1px solid #303034;
 border-left:6px solid #ff003c;border-radius:14px;
 max-width:none;align-self:stretch;
}
.codes-page .code-card-text .code-content{
 padding:18px 18px 16px;gap:14px;min-height:235px
}
.codes-page .code-card-text .code-heading{
 display:flex;flex-direction:column;align-items:stretch;
 gap:12px;min-height:0
}
.codes-page .code-card-text .code-topline{
 display:flex;align-items:center;justify-content:space-between;gap:8px
}
.codes-page .code-card-text .code-state{
 font:800 11px/1.4 var(--body);padding:3px 8px;
 border-radius:999px;background:rgba(0,132,48,.18);
 color:#00ca68;letter-spacing:0;flex-shrink:0
}
.codes-page .code-card-text[data-status="expired"] .code-state{
 background:#2c2c30;color:#b7b7bf
}
.codes-page .code-card-text .code-kind{
 font:700 10px/1.4 var(--body);color:#bcbcc1;text-align:right
}
.codes-page .code-card-text h3{
 font-size:clamp(21px,2.05vw,29px);line-height:1.15;
 overflow-wrap:anywhere
}
.codes-page .code-card-text dl{
 display:block;font-size:13px;line-height:1.5;
 min-height:0;margin:0;color:#bcbcc1
}
.codes-page .code-card-text dl dt{
 display:inline;font:600 13px/1.5 var(--body);
 color:#bcbcc1;margin:0;letter-spacing:0
}
.codes-page .code-card-text dl dd{
 display:inline;min-height:0;font-size:13px;color:#bcbcc1
}
.codes-page .code-card-text dl dt:not(:first-child){display:block;margin-top:8px}
.codes-page .code-card-text .code-actions{
 display:flex;flex-direction:row;align-items:center;
 justify-content:space-between;gap:12px;flex-wrap:wrap;
 margin-top:auto;padding-top:13px;
 border-top:1px solid rgba(255,255,255,.07)
}
.codes-page .code-card-text .code-actions button{
 order:2;width:auto;height:44px;min-height:44px;
 padding:0 17px;margin-left:auto;border-radius:999px;
 font:800 12px/1.2 var(--body)
}
.codes-page .code-card-text .code-source-info{
 order:1;display:flex;flex-direction:column;
 align-items:flex-start;gap:6px
}
.codes-page .code-card-text .code-missing-image{
 font-size:11px;line-height:1.4;color:#bcbcc1
}
.codes-page .code-card-text .code-source{
 font-size:11px;line-height:1.3;color:#bcbcc1;
 text-align:left;text-decoration:underline;padding:0
}
.codes-page .code-source-info{display:flex;flex-direction:column;align-items:center}
.codes-page .code-missing-image[hidden]{display:none!important}

/* Evitar que el borde superpuesto deje franjas grises junto a la línea roja. */
.codes-page .code-card.code-card-text::after{display:none}
@media(hover:hover) and (min-width:761px){
 .codes-page .code-card.code-card-text[data-status="active"]:hover{
  border-color:#ff003c;
  border-left-color:#ff003c;
  box-shadow:0 0 8px rgba(255,0,60,.45),0 0 20px rgba(255,0,60,.22)
 }
}
.codes-page .codes-archive .code-card-text{min-height:235px}
.codes-page .codes-archive .code-card-text .code-content{
 padding:16px;gap:14px;min-height:235px
}
.codes-page .codes-archive .code-card-text dl{min-height:0}
@media(max-width:1200px){
 .codes-page .codes-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 .codes-page .codes-grid{grid-template-columns:minmax(0,1fr)}
 .codes-page .codes-section{margin-bottom:56px}
 .codes-page .codes-intro{margin-bottom:38px}
 .codes-page .codes-active-layout{gap:22px}
 .codes-page .code-card-text .code-content{min-height:235px}
 .codes-page .code-card-text h3{font-size:27px}
}
@media(max-width:360px){
 .codes-page .code-card-text .code-content{padding:16px}
 .codes-page .code-card-text .code-actions button{padding:0 13px;font-size:11px}
}
