@font-face { font-family: "Fraunces"; src: url("vendor/fonts/fraunces-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("vendor/fonts/fraunces-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #131418;
  --surface-2: #1f2127;
  --line: #2a2c33;
  --text: #f4f2ec;
  --muted: #9b9ea6;
  --gutter: clamp(16px, 3vw, 40px);
  --accent: #f2b84b;
  --accent-ink: #1c1505;
  --danger: #ff7a70;
  --discord: #5865f2;
  --row-h: 280px;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); min-height: 100dvh; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.01em; }
main { padding: 0 var(--gutter) 72px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; padding: 0 var(--gutter); background: rgb(8 9 11 / .84); backdrop-filter: blur(14px); border-bottom: 1px solid rgb(255 255 255 / .06); transition: background .25s ease, border-color .25s ease; }
.has-hero .topbar:not(.is-solid) { background: transparent; backdrop-filter: none; border-color: transparent; }
.has-hero .topbar:not(.is-solid) .topbar-nav { color: rgb(255 255 255 / .86); }
.brand { font: 600 1.25rem var(--serif); text-decoration: none; }
.topbar-nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; color: var(--muted); }
.topbar-nav a { text-decoration: none; }
.topbar-nav a:hover { color: var(--text); }
.person { display: inline-flex; align-items: center; gap: 8px; }
.person img { border-radius: 50%; }
@media (max-width: 560px) { .person span { display: none; } }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 22px 0 24px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.meta { color: var(--muted); font-size: .88rem; margin: 4px 0 0; }
.description { max-width: 62ch; margin: 10px 0 0; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 12px; }
.notice { color: var(--accent); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button-quiet { background: var(--surface-2); color: var(--text); }
.button-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.button-discord { background: var(--discord); color: #fff; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--text); }

.login { min-height: 90dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.login h1 { font-size: clamp(3.4rem, 12vw, 7.5rem); font-weight: 500; letter-spacing: -.03em; }
.login-main { background: radial-gradient(60rem 30rem at 50% 18%, rgb(242 184 75 / .14), transparent 70%); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); min-height: 100dvh; }
.login p { color: var(--muted); margin: 0 0 12px; max-width: 42ch; }

.setup { max-width: 560px; margin: 0 auto; padding-top: 40px; }
.setup-steps { padding-left: 20px; margin: 18px 0 24px; }
.setup-steps li { margin-bottom: 8px; }
code { overflow-wrap: anywhere; color: var(--accent); }
.form-error { color: var(--danger); margin: 12px 0 0; }
.settings-form { display: grid; gap: 14px; justify-items: start; max-width: 560px; }
.settings-form label { width: 100%; color: var(--muted); font-size: .9rem; }
.settings-form input:not([type=hidden]) { display: block; width: 100%; margin-top: 5px; min-height: 42px; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.block-heading { margin: 20px 0 6px; font-size: 1.05rem; }
.settings-form h3 { margin-top: 8px; }
.settings-form .hint { margin: 0; }

.prose h2 { font-size: 1.25rem; margin-top: 28px; }
.prose p { margin: 10px 0 0; }

.album-grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.album-card { display: block; color: inherit; text-decoration: none; }
.album-cover { position: relative; display: grid; gap: 3px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--tint, var(--surface)); box-shadow: 0 14px 34px rgb(0 0 0 / .32); transition: translate .3s ease, box-shadow .3s ease; }
.album-cover.mosaic-3 { grid-template: repeat(2, minmax(0, 1fr)) / 1.7fr 1fr; }
.album-cover.mosaic-3 img:first-child { grid-row: span 2; }
.album-cover.mosaic-2 { grid-template-columns: 1.5fr 1fr; }
.album-cover img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; transition: opacity .35s ease, transform .6s ease; }
.album-card:hover .album-cover { translate: 0 -4px; box-shadow: 0 22px 44px rgb(0 0 0 / .46); }
.album-cover .badge { position: absolute; top: 10px; right: 10px; z-index: 1; }
.album-card-text { padding: 14px 4px 0; }
.album-card h2 { font-size: 1.4rem; font-weight: 500; }
.album-card:hover h2 { color: var(--accent); }

.hero { position: relative; isolation: isolate; display: block; margin: -52px calc(-1 * var(--gutter)) 0; padding-top: 52px; color: #fff; text-decoration: none; }
.hero-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--tint, var(--surface)); }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(56px) saturate(1.5); transform: scale(1.3); opacity: .6; }
.hero-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(8 9 11 / .3), rgb(8 9 11 / .62) 55%, var(--bg)); }
.hero-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: clamp(24px, 4vw, 72px); max-width: 1480px; margin: 0 auto; padding: clamp(28px, 5vw, 72px) var(--gutter) clamp(40px, 5vw, 76px); }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); font-weight: 500; line-height: 1; letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: balance; }
.hero-kicker { margin: 0 0 14px; color: var(--accent); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero-meta { margin: 16px 0 0; color: rgb(255 255 255 / .78); font-size: 1rem; }
.hero .description { color: rgb(255 255 255 / .84); }
.hero .head-actions { margin-top: 26px; }
.hero-cta { margin-top: 28px; }
.hero-link:hover .hero-cta { filter: brightness(1.08); }
.collage { display: grid; gap: 8px; height: clamp(260px, 46vh, 500px); grid-template: repeat(2, minmax(0, 1fr)) / 1.6fr 1fr; }
.collage > * { display: block; min-height: 0; border-radius: 14px; overflow: hidden; background: rgb(255 255 255 / .06); box-shadow: 0 24px 60px rgb(0 0 0 / .5); }
.collage-3 > :first-child { grid-row: span 2; }
.collage-2 { grid-template: minmax(0, 1fr) / 1.4fr 1fr; }
.collage-1 { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.collage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .35s ease, transform .7s ease; }
.collage img.is-loading { opacity: 0; }
.hero-plain { margin-top: 0; padding-top: 0; }
.hero-plain .hero-body { grid-template-columns: minmax(0, 1fr); padding: 34px 0 10px; max-width: none; }
@media (max-width: 860px) {
  .hero-body { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 12px; }
  .collage { order: -1; height: clamp(220px, 62vw, 420px); gap: 5px; }
  .collage > * { border-radius: 10px; }
}
.section-title { font-size: 1.6rem; font-weight: 500; }

.button-glass { background: rgb(255 255 255 / .14); color: #fff; backdrop-filter: blur(10px); }
.menu { position: relative; }
.menu > summary { list-style: none; min-width: 46px; padding: 0 12px; font-size: 1.2rem; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; left: 0; top: calc(100% + 8px); z-index: 4; display: grid; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgb(0 0 0 / .5); }
.menu-list button { padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.menu-list button:hover { background: var(--surface-2); }

.day { margin-top: 34px; }
.day-title { position: sticky; top: 52px; z-index: 2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 calc(-1 * var(--gutter)) 10px; padding: 12px var(--gutter); background: rgb(8 9 11 / .86); backdrop-filter: blur(14px); font-size: 1.35rem; font-weight: 500; }
.day-meta { color: var(--muted); font: 400 .86rem var(--sans); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: 700 .75rem var(--sans); font-variant-numeric: tabular-nums; }
.badge-dark { background: rgb(0 0 0 / .72); color: #fff; }

.day-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.day-tiles::after { content: ""; flex-grow: 9999; }
.tile { position: relative; flex-grow: var(--r); flex-basis: calc(var(--r) * var(--row-h)); max-width: calc(var(--r) * var(--row-h) * 1.6); aspect-ratio: var(--r); background: var(--c, var(--surface)); border-radius: 8px; overflow: hidden; display: block; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, filter .35s ease, opacity .35s ease; }
.tile img.is-loading, .album-cover img.is-loading { opacity: 0; }
.tile-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(to top, rgb(0 0 0 / .72), transparent); color: #fff; font-size: .8rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s ease; pointer-events: none; }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.03); filter: brightness(1.06); }
  .tile:hover .tile-caption { opacity: 1; }
}
.tile-badges { position: absolute; left: 8px; bottom: 8px; z-index: 1; display: flex; gap: 6px; }
.tile-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { :root { --row-h: 140px; } .day-tiles { gap: 3px; } .tile { border-radius: 4px; } .day-title { font-size: 1.15rem; } }

.empty { text-align: center; padding: 72px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.empty h2 { color: var(--text); margin-bottom: 8px; }
.empty.is-over, .tiles.is-over { outline: 2px dashed var(--accent); outline-offset: 6px; }

.dropzone { background: var(--surface); border-radius: 10px; padding: 12px 16px; margin-bottom: 22px; }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: .88rem; }
.upload-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list .state { color: var(--muted); font-variant-numeric: tabular-nums; }
.upload-list .state.error { color: var(--danger); }
.upload-list progress { grid-column: 1 / -1; width: 100%; height: 4px; accent-color: var(--accent); }

.panel { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.panel::backdrop { background: rgb(0 0 0 / .65); }
.panel h3 { margin: 22px 0 0; font-size: 1.05rem; }
.panel label { display: block; margin-top: 14px; font-size: .9rem; color: var(--muted); }
.panel input:not([type=checkbox]), .panel textarea, .panel select { display: block; width: 100%; margin-top: 5px; min-height: 42px; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.panel-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
form .panel-actions { justify-content: flex-end; }
.pick-list, .share-list { list-style: none; margin: 0; padding: 0; }
.pick-list button { width: 100%; text-align: left; padding: 8px 10px; background: var(--surface-2); color: var(--text); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font: inherit; }
.share-list li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.share-list .meta { margin: 0; }
.share-list .link-button { margin-left: auto; }
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-row input { flex: 1 1 100%; margin: 0 !important; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #050506; color: var(--text); overflow: hidden; }
.lightbox[open] { display: block; }
.lightbox::backdrop { background: #050506; }
.lightbox-chrome { transition: opacity .35s ease; }
.lightbox.is-idle { cursor: none; }
.lightbox.is-idle .lightbox-chrome { opacity: 0; pointer-events: none; }
.lightbox-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 16px 30px; font-size: .88rem; background: linear-gradient(rgb(0 0 0 / .72), transparent); }
.lightbox-info { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-shrink: 1; }
.lightbox-count { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); min-width: 0; }
.lightbox-end { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lightbox-actions { display: flex; align-items: center; gap: 14px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.lightbox-actions button, .lightbox-actions a, .lightbox-close { background: none; border: 0; padding: 6px 0; color: var(--text); font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.lightbox-actions button:hover, .lightbox-actions a:hover, .lightbox-close:hover { color: var(--accent); }
.lightbox-actions [aria-pressed="true"] { color: var(--accent); }
.lightbox-close { flex-shrink: 0; min-width: 28px; font-size: 1.05rem; }
.lightbox-actions .danger { color: var(--danger); }
.lightbox-actions [data-lb-size] { color: var(--muted); margin-left: 5px; }
@media (max-width: 760px) {
  .lightbox-name { display: none; }
  .lightbox-end { width: 100%; justify-content: space-between; }
}
.lightbox-stage { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.lightbox.has-controls .lightbox-stage { inset: 56px 0 150px; touch-action: auto; }
.lightbox-stage > video { width: 100%; height: 100%; object-fit: contain; }
.zoom-layer { position: absolute; inset: 0; transform-origin: center; will-change: transform; }
.lightbox.is-zoomed .zoom-layer { cursor: grab; }
.lightbox.is-zoomed .zoom-layer:active { cursor: grabbing; }
.lightbox-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox-photo.is-shown { animation: sharpen .25s ease; }
@keyframes sharpen { from { opacity: 0; } }
.lightbox.is-slideshow .lightbox-photo.is-shown { animation: sharpen .6s ease, slide-drift 7s ease-out forwards; }
@keyframes slide-drift { to { transform: scale(1.06); } }
.lightbox-nav { position: absolute; top: 50%; z-index: 3; width: 48px; height: 72px; translate: 0 -50%; background: rgb(0 0 0 / .4); color: #fff; border: 0; border-radius: 8px; font-size: 2rem; cursor: pointer; }
.lightbox-nav:hover { background: rgb(0 0 0 / .65); }
.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }
.lightbox-nav:disabled { display: none; }
@media (hover: none) { .lightbox-nav { display: none; } }
.lightbox-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding-top: 34px; background: linear-gradient(transparent, rgb(0 0 0 / .78) 45%); }
.filmstrip { display: flex; justify-content: safe center; gap: 4px; overflow-x: auto; padding: 6px 16px calc(12px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.strip-item { position: relative; flex: 0 0 auto; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--c, var(--surface-2)); opacity: .45; cursor: pointer; transition: opacity .2s ease, transform .2s ease; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-item:hover { opacity: .85; }
.strip-item.is-active { opacity: 1; transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); }
.strip-item[data-video]::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; text-shadow: 0 1px 4px #000; }
.slide-progress { position: absolute; top: 0; left: 0; right: 0; z-index: 4; height: 3px; background: rgb(255 255 255 / .12); }
.slide-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@keyframes slide-progress { to { transform: scaleX(1); } }

.viewer360 { position: absolute; inset: 0; touch-action: none; cursor: grab; overflow: hidden; }
.viewer360.dragging { cursor: grabbing; }
.viewer360 canvas { display: block; width: 100%; height: 100%; }
.viewer-status { position: absolute; top: 12px; left: 50%; translate: -50% 0; padding: 4px 12px; border-radius: 6px; background: rgb(0 0 0 / .65); font-size: .82rem; pointer-events: none; text-align: center; }
.viewer-controls { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; width: min(620px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 10px; background: rgb(0 0 0 / .68); font-size: .85rem; font-variant-numeric: tabular-nums; cursor: default; }
.viewer-controls button { background: none; border: 0; color: #fff; font-size: 1rem; cursor: pointer; min-width: 26px; padding: 4px; }
.viewer-controls input { flex: 1; min-width: 0; accent-color: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 10; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: .9rem; }

.admin-block { background: var(--surface); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.admin-block h2 { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; color: var(--muted); font-weight: 500; }
th, td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td input { width: 18px; height: 18px; accent-color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .tile:hover img, .collage img { transform: none !important; } .album-card:hover .album-cover { translate: none; } }
.album-cover.mosaic-0::before { content: "Pusty album"; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.hero-cta span { margin-left: 6px; }

/* --- ozywienie: statystyki, rankingi, reakcje, animacje --- */
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.stats > div { display: flex; flex-direction: column-reverse; min-width: 86px; padding: 10px 16px; border: 1px solid rgb(255 255 255 / .1); border-radius: 12px; background: rgb(255 255 255 / .06); backdrop-filter: blur(8px); }
.stats dd { margin: 0; font: 500 1.7rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stats dt { color: var(--muted); font-size: .78rem; }
.stats-wide { margin: 8px 0 8px; }
.stats-wide > div { flex: 1 1 140px; background: var(--surface); border-color: var(--line); }
.stats-wide dd { font-size: 2.2rem; }

.highlights { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 28px; margin-top: 30px; }
.highlights:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .highlights { grid-template-columns: minmax(0, 1fr); } }
.hits-row { list-style: none; display: flex; gap: 6px; margin: 14px calc(-1 * var(--gutter)) 0 0; padding: 4px var(--gutter) 10px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.hit { flex: 0 0 auto; scroll-snap-align: start; }
.hit a { position: relative; display: grid; grid-template-columns: auto auto; align-items: end; text-decoration: none; }
.hit-rank { position: relative; z-index: 0; margin-right: -26px; font: 800 clamp(6rem, 11vw, 9rem)/.78 var(--serif); color: var(--bg); -webkit-text-stroke: 2px rgb(255 255 255 / .55); letter-spacing: -.06em; transition: -webkit-text-stroke-color .3s ease; }
.hit:nth-child(1) .hit-rank { -webkit-text-stroke-color: #f5c84c; }
.hit:nth-child(2) .hit-rank { -webkit-text-stroke-color: #d9dde4; }
.hit:nth-child(3) .hit-rank { -webkit-text-stroke-color: #d7905a; }
.hit-card { position: relative; z-index: 1; display: block; width: 150px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--c, var(--surface)); box-shadow: 0 14px 30px rgb(0 0 0 / .45); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), box-shadow .35s ease; }
.hit-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hit a:hover .hit-card { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 22px 40px rgb(0 0 0 / .55), 0 0 0 2px var(--accent); }
.hit a:hover .hit-rank { -webkit-text-stroke-color: var(--accent); }
.hit-score { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / .7); backdrop-filter: blur(6px); color: #fff; font-size: .8rem; font-weight: 600; }
.hit-album { grid-column: 2; margin-top: 6px; max-width: 150px; color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.leader-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.leader { position: relative; display: grid; grid-template-columns: 34px 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px 10px 8px; border-radius: 12px; background: var(--surface); overflow: hidden; }
.leader-bar { position: absolute; inset: 0 auto 0 0; z-index: 0; width: var(--w); background: linear-gradient(90deg, rgb(242 184 75 / .2), rgb(242 184 75 / .05)); transform-origin: left; }
.animate .leader.reveal .leader-bar { transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .8, .2, 1) calc(var(--delay, 0ms) + 200ms); }
.animate .leader.reveal.is-in .leader-bar { transform: none; }
.leader > :not(.leader-bar) { position: relative; z-index: 1; }
.leader-rank { text-align: center; font-size: 1.25rem; color: var(--muted); font-weight: 700; }
.leader img, .leader-avatar { width: 36px; height: 36px; border-radius: 50%; }
.leader-avatar { display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.leader-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-score { font: 600 1.15rem var(--serif); font-variant-numeric: tabular-nums; }

.podium-section { margin-top: 18px; }
.podium { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; max-width: 980px; margin: 18px 0 8px; padding: 0; }
.podium-1 { grid-template-columns: minmax(0, 420px); }
.podium-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
.podium-place a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--c, var(--surface)); box-shadow: 0 16px 40px rgb(0 0 0 / .45); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); }
.podium-place a:hover { transform: translateY(-6px); }
.podium-place img { width: 100%; height: 100%; object-fit: cover; display: block; }
.podium-3 .place-1 { order: 2; } .podium-3 .place-2 { order: 1; } .podium-3 .place-3 { order: 3; }
.podium-3 .place-1 a { aspect-ratio: 4 / 4.2; box-shadow: 0 0 0 3px #f5c84c, 0 0 50px rgb(245 200 76 / .35), 0 20px 50px rgb(0 0 0 / .5); }
.podium-3 .place-2 a { aspect-ratio: 4 / 3.4; }
.place-1 a { box-shadow: 0 0 0 3px #f5c84c, 0 0 40px rgb(245 200 76 / .3); }
.place-2 a { box-shadow: 0 0 0 2px #d9dde4, 0 16px 40px rgb(0 0 0 / .45); }
.place-3 a { box-shadow: 0 0 0 2px #d7905a, 0 16px 40px rgb(0 0 0 / .45); }
.medal { position: absolute; top: 10px; left: 10px; font-size: 2rem; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .5)); }
.place-1 .medal { animation: medal 3s ease-in-out infinite; }
@keyframes medal { 50% { transform: rotate(-10deg) scale(1.12); } }
.podium-score { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.podium-score span { padding: 3px 10px; border-radius: 999px; background: rgb(0 0 0 / .66); backdrop-filter: blur(6px); color: #fff; font-size: .85rem; font-weight: 600; }
@media (max-width: 560px) { .podium { gap: 8px; } .medal { font-size: 1.4rem; top: 6px; left: 6px; } .podium-score { display: none; } }

.tile-score { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 2px 8px 2px 6px; border-radius: 999px; background: rgb(0 0 0 / .62); backdrop-filter: blur(6px); color: #fff; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-score::before { content: "♥ "; color: #ff6b81; }
@media (hover: hover) {
  .tile { transition: transform .3s ease, box-shadow .3s ease; }
  .tile:hover { z-index: 1; transform: translateY(-3px); box-shadow: 0 14px 30px rgb(0 0 0 / .5), 0 0 26px color-mix(in srgb, var(--c, #000) 55%, transparent); }
}

.lightbox-reactions { display: flex; justify-content: center; gap: 8px; padding: 0 16px 6px; }
.reaction { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border: 1px solid rgb(255 255 255 / .12); border-radius: 999px; background: rgb(255 255 255 / .06); color: var(--text); font: 600 .95rem var(--sans); font-variant-numeric: tabular-nums; cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .15s ease; }
.reaction:hover { background: rgb(255 255 255 / .12); transform: translateY(-2px); }
.reaction[aria-pressed="true"] { background: rgb(242 184 75 / .18); border-color: var(--accent); }
.reaction-emoji { font-size: 1.25rem; line-height: 1; }
.reaction-count:empty { display: none; }
.reaction.is-popping .reaction-emoji { animation: pop .45s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes pop { 40% { transform: scale(1.7) rotate(-12deg); } }
.particle { position: fixed; z-index: 30; pointer-events: none; font-size: 1.5rem; translate: -50% -50%; animation: fly .95s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.6); opacity: 0; } }
.big-heart { position: fixed; z-index: 30; pointer-events: none; font-size: 6rem; translate: -50% -50%; animation: heart .9s ease forwards; filter: drop-shadow(0 8px 24px rgb(255 60 90 / .6)); }
@keyframes heart { 0% { transform: scale(0); } 25% { transform: scale(1.2); } 45% { transform: scale(.95); } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3) translateY(-30px); opacity: 0; } }

.animate .reveal { opacity: 0; transform: translateY(22px) scale(.98); }
.animate .reveal.is-in { opacity: 1; transform: none; transition: opacity .6s ease var(--delay, 0ms), transform .7s cubic-bezier(.2, .8, .2, 1) var(--delay, 0ms); }
.animate .tile.reveal.is-in:hover { transform: translateY(-3px); transition-delay: 0ms; }
.animate .hero-text > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.animate .hero-text > :nth-child(2) { animation-delay: .08s; }
.animate .hero-text > :nth-child(3) { animation-delay: .16s; }
.animate .hero-text > :nth-child(n+4) { animation-delay: .24s; }
.animate .collage > * { animation: rise 1s cubic-bezier(.2, .8, .2, 1) both; }
.animate .collage > :nth-child(2) { animation-delay: .12s; }
.animate .collage > :nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.animate .collage img:not(.is-loading) { animation: kenburns 22s ease-in-out infinite alternate; }
.animate .collage > :nth-child(2) img { animation-duration: 26s; animation-direction: alternate-reverse; }
.animate .collage > :nth-child(3) img { animation-duration: 30s; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -1.5%); } }
.animate .hero-backdrop img { animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.5) translate(4%, 3%); } }
@media (prefers-reduced-motion: reduce) { .particle, .big-heart { display: none; } }
.stats-wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) {
  .stats-wide > div { min-width: 0; padding: 10px 12px; }
  .stats-wide dd { font-size: 1.6rem; }
  .hit-card { width: 118px; }
  .hit-album { max-width: 118px; }
  .hit-rank { font-size: 5.2rem; margin-right: -18px; }
}

.day { scroll-margin-top: 52px; }
.album-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.day-jump { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 .88rem var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.chip span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip[aria-pressed="true"] span { color: rgb(8 9 11 / .6); }
.chip-quiet { color: var(--muted); font-weight: 500; }
.chip-quiet:hover { color: var(--text); }
