@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fnt/geologica-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fnt/geologica-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Geologica'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('../fnt/geologica-400.woff') format('woff');
}
@font-face {
  font-family: 'Geologica'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('../fnt/geologica-700.woff') format('woff');
}

:root {
  --choco-900: #1c130c;
  --choco-800: #2a1d12;
  --choco-700: #3a2817;
  --choco-600: #4d361f;
  --choco-400: #8a6244;
  --cream: #f4e9da;
  --cream-dim: #c9b6a0;
  --black: #100a06;
  --white: #fffaf3;
  --link: #c9a26a;
  --c1: #FF685D;
  --c2: #F8925B;
  --c3: #F8BE5B;
  --c4: #4DDD74;
  --c5: #4DBCDD;
  --c6: #BB8CD6;
  --c7: #D790CD;
  --font: 'Geologica', 'MS Gothic', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 18px;
  background: url('../img/stickerbg.png') var(--choco-900);
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--cream);
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

img { image-rendering: pixelated; }
.game-icon { width: 48px; height: 48px; border: 2px solid var(--black); vertical-align: middle; image-rendering: auto; }
.game-icon:hover { border-color: var(--link); }
.game-icon.soul { border: none; image-rendering: pixelated; transition: transform .12s; }

::selection { background: var(--c1); color: var(--black); }

/* shop (frontend custom del ko-fi) */
.shop-intro { color: var(--cream-dim); }
.shop-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 14px;
}
.shop-card {
  border: 2px solid var(--black);
  background: var(--choco-800);
  display: flex; flex-direction: column;
}
.shop-card .cover {
  aspect-ratio: 1 / 1; width: 100%;
  object-fit: cover; display: block;
  border-bottom: 2px solid var(--black);
  background: var(--choco-900);
  image-rendering: auto;
}
.shop-card .info { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-card .name { font-size: .78rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.shop-card .price { font-size: .85rem; color: var(--c3); font-weight: 700; }
.shop-card .buy {
  margin-top: auto; text-align: center;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--black); background: var(--c4);
  border: 2px solid var(--black); padding: 5px;
  text-decoration: none;
}
.shop-card .buy:hover { background: var(--c3); text-decoration: none; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  background: var(--choco-700);
  border: 3px solid var(--black);
  box-shadow: 6px 6px 0 var(--black);
}

.rainbow {
  height: 8px;
  background: linear-gradient(90deg,
    var(--c1) 0 14.28%, var(--c2) 14.28% 28.57%, var(--c3) 28.57% 42.85%,
    var(--c4) 42.85% 57.14%, var(--c5) 57.14% 71.42%, var(--c6) 71.42% 85.71%,
    var(--c7) 85.71% 100%);
}

header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 26px 16px 18px;
  background: var(--choco-900);
  border-bottom: 3px solid var(--black);
}

/* dibujos decorativos (bubu) flanqueando el logo, dos de cada lado */
.deco {
  position: absolute;
  height: 118px; width: auto;
  pointer-events: none;
  image-rendering: auto;
  opacity: .4;
  z-index: 0;
}
.deco-l1 { left: 14px;  bottom: 6px;  transform: rotate(-6deg); }
.deco-l2 { left: 104px; top: 14px;    height: 92px; transform: rotate(5deg); }
.deco-r1 { right: 14px;  top: 10px;    transform: rotate(6deg); }
.deco-r2 { right: 108px; bottom: 6px;  height: 96px; transform: rotate(-5deg); }
header h1, header .tagline { position: relative; z-index: 1; }

@media (max-width: 760px) {
  .deco { display: none; }
}
header h1 {
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--white);
  text-shadow: 3px 3px 0 var(--c2), 6px 6px 0 var(--c1);
}
header h1 img {
  display: block; margin: 0 auto;
  height: 140px; width: auto; max-width: 100%;
  image-rendering: auto;
}
header .tagline {
  margin-top: 6px;
  font-weight: 300;
  font-size: .95rem;
  color: var(--cream-dim);
  letter-spacing: .04em;
}

.cols { display: flex; gap: 0; align-items: stretch; }
.sidebar {
  width: 220px; flex: none;
  padding: 16px;
  background: var(--choco-800);
  border-right: 3px solid var(--black);
}
.main { flex: 1; padding: 18px; min-width: 0; }

@media (max-width: 680px) {
  .cols { flex-direction: column; }
  .sidebar { width: auto; border-right: none; border-bottom: 3px solid var(--black); }
}

.box {
  border: 2px dashed var(--choco-400);
  background: var(--choco-700);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.box h3 {
  margin: -10px -12px 10px;
  padding: 5px 12px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--choco-600);
  color: var(--white);
  border-bottom: 2px solid var(--black);
}

.linklist { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.linklist li { margin: 4px 0; }
.linklist li::before { content: '★'; color: var(--c3); margin-right: 6px; font-weight: 700; }
.linklist a.active { color: var(--c3); font-weight: 700; background: var(--choco-900); }
.linklist a.shop-link {
  font-weight: 800;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7), var(--c1));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rainbow-slide 3s linear infinite;
}
.linklist li:has(.shop-link)::before {
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c6), var(--c7), var(--c1));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rainbow-slide 3s linear infinite;
}
@keyframes rainbow-slide { to { background-position: 200% center; } }

.status b { color: var(--c3); }
.np { color: var(--cream-dim); font-size: .85rem; }
.np .song { color: var(--c7); font-weight: 700; }

.clock {
  font-family: 'MS Gothic', monospace;
  font-size: 1.3rem; text-align: center; color: var(--c4);
  letter-spacing: 1px;
}
.counter { text-align: center; font-size: .8rem; color: var(--cream-dim); }
.counter b {
  font-family: 'MS Gothic', monospace; color: var(--c1);
  background: var(--black); padding: 2px 6px; letter-spacing: 3px;
}

.buttons { display: flex; flex-wrap: wrap; gap: 4px; }
.btn88 {
  width: 88px; height: 31px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  color: var(--black); border: 1px solid var(--black);
  text-align: center; line-height: 1.1; padding: 2px;
}

.main h2 {
  font-size: 1.5rem; font-weight: 800; margin: 0 0 6px;
  color: var(--white);
  border-left: 6px solid var(--c2); padding-left: 10px;
}
.main p { margin: 0 0 12px; }
.main .hi { color: var(--c3); font-weight: 700; }

details {
  border: 2px solid var(--black);
  background: var(--choco-800);
  margin-bottom: 10px;
}
summary {
  cursor: pointer; padding: 8px 12px;
  font-weight: 700; list-style: none;
  background: var(--choco-600); color: var(--white);
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸ '; color: var(--c4); }
details[open] summary::before { content: '▾ '; }
details > *:not(summary) { padding: 10px 12px; margin: 0; }

.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: 12px;
}
.oc { margin: 0; border: 2px solid var(--black); background: var(--choco-800); }
.oc-img {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--cream-dim); text-align: center;
  background: var(--choco-700);
  border-bottom: 2px solid var(--black);
}
.oc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc:nth-child(7n+1) .oc-img { box-shadow: inset 0 0 0 4px var(--c1); }
.oc:nth-child(7n+2) .oc-img { box-shadow: inset 0 0 0 4px var(--c2); }
.oc:nth-child(7n+3) .oc-img { box-shadow: inset 0 0 0 4px var(--c3); }
.oc:nth-child(7n+4) .oc-img { box-shadow: inset 0 0 0 4px var(--c4); }
.oc:nth-child(7n+5) .oc-img { box-shadow: inset 0 0 0 4px var(--c5); }
.oc:nth-child(7n+6) .oc-img { box-shadow: inset 0 0 0 4px var(--c6); }
.oc:nth-child(7n+7) .oc-img { box-shadow: inset 0 0 0 4px var(--c7); }
.oc figcaption {
  padding: 6px 8px; font-size: .85rem; font-weight: 700; color: var(--white);
}
.oc figcaption small { display: block; font-weight: 400; color: var(--cream-dim); font-size: .75rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: .75rem; font-weight: 700; color: var(--black);
  padding: 2px 8px; border: 1px solid var(--black);
}
.tag:nth-child(7n+1){background:var(--c1)} .tag:nth-child(7n+2){background:var(--c2)}
.tag:nth-child(7n+3){background:var(--c3)} .tag:nth-child(7n+4){background:var(--c4)}
.tag:nth-child(7n+5){background:var(--c5)} .tag:nth-child(7n+6){background:var(--c6)}
.tag:nth-child(7n+7){background:var(--c7)}

.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.socials li { margin: 2px 0; }

.platforms {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 20px; margin: 12px 0 4px;
  font-weight: 800; font-size: 1.05rem;
}
.platforms a { text-decoration: none; }
.platforms a:hover { text-decoration: underline; text-underline-offset: 3px; }

.music-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.music-table th, .music-table td { text-align: left; padding: 8px 10px; border: 2px solid var(--black); }
.music-table thead th {
  background: var(--choco-600); color: var(--white);
  text-transform: uppercase; font-size: .75rem; letter-spacing: .06em;
}
.music-table tbody tr:nth-child(odd)  { background: var(--choco-800); }
.music-table tbody tr:nth-child(even) { background: var(--choco-700); }
.music-table td b { color: var(--c7); }
.music-table .plat a { white-space: nowrap; }
.music-table .rating { color: var(--c3); white-space: nowrap; letter-spacing: 2px; font-size: 1rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox-img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  border: 3px solid var(--black);
  cursor: default;
  image-rendering: auto;
}
.lightbox-close {
  position: fixed; top: 12px; right: 16px;
  font-size: 1.8rem; color: var(--white); cursor: pointer;
  z-index: 10000; font-family: var(--font);
  line-height: 1; background: none; border: none; padding: 4px 10px;
}
.lightbox-close:hover { color: var(--c1); }

.music-table .date { color: var(--cream-dim); font-size: .8rem; white-space: nowrap; }
.music-table .allplat { color: var(--c4); font-weight: 700; }
.music-table .yt { color: #FF0000; font-weight: 700; }
.music-table .sc { color: #FF5500; font-weight: 700; }

footer {
  text-align: center; padding: 14px;
  background: var(--choco-900);
  border-top: 3px solid var(--black);
  font-size: .8rem; color: var(--cream-dim);
}
footer a { color: var(--link); }

.dim { color: var(--cream-dim); }
#stats-username { color: var(--c3); }
.stats-h {
  margin: 22px 0 8px; font-size: 1.1rem; font-weight: 800; color: var(--white);
  border-left: 6px solid var(--c4); padding-left: 10px;
}

.stats-grid {
  display: grid; gap: 8px; margin: 14px 0;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.stat {
  border: 2px solid var(--black); background: var(--choco-800);
  padding: 10px 8px; text-align: center;
}
.stat .num { display: block; font-size: 1.6rem; font-weight: 900; color: var(--white); line-height: 1.1; }
.stat .lbl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cream-dim); }
.stat:nth-child(5n+1) .num { color: var(--c1); }
.stat:nth-child(5n+2) .num { color: var(--c3); }
.stat:nth-child(5n+3) .num { color: var(--c4); }
.stat:nth-child(5n+4) .num { color: var(--c5); }
.stat:nth-child(5n+5) .num { color: var(--c7); }

.stats-hero {
  display: flex; gap: 12px; align-items: center;
  border: 2px solid var(--black); background: var(--choco-800);
  padding: 10px; margin: 8px 0;
}
.stats-hero img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--black); flex: none; }
.stats-hero .dim { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.stats-hero b { display: block; color: var(--white); }
.stats-hero small { color: var(--c7); }

.period-toggle { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pbtn {
  font-family: inherit; font-size: .8rem; cursor: pointer; color: var(--cream);
  background: var(--choco-800); border: 2px solid var(--black); padding: 3px 10px;
}
.pbtn.active { background: var(--c3); color: var(--black); font-weight: 700; }

.bar-row { margin-bottom: 8px; }
.bar-top { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 2px; }
.bar-track { height: 12px; background: var(--choco-900); border: 1px solid var(--black); }
.bar-fill { height: 100%; min-width: 2px; transition: width .4s ease; }

.album-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}
.album { margin: 0; border: 2px solid var(--black); background: var(--choco-800); }
.album img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; border-bottom: 2px solid var(--black); }
.album figcaption { padding: 4px 6px; font-size: .75rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.album figcaption small { display: block; font-weight: 400; color: var(--cream-dim); }

.track-list { list-style: none; margin: 0; padding: 0; }
.trk { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--choco-600); }
.trk img { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--black); flex: none; background: var(--choco-900); }
.trk-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trk-meta b { color: var(--cream); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trk-meta small { color: var(--cream-dim); font-size: .78rem; }
.trk-when { font-size: .72rem; color: var(--cream-dim); flex: none; }
.trk-when.np { color: var(--c4); font-weight: 700; }
