/* The Project Zomboid Tool-Kit's wall of boxes: a render in each box with a flat layer of that tool's real output over it.
   Sizes in cqw scale with the box. */
html, body { background: #141414 !important; color: #fff; min-height: 100% }
body { display: flex; flex-direction: column; min-height: 100vh; background-image: none !important }

.ez-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 28px; padding: 22px 34px 16px }
.ez-head h1 { margin: 0; color: #fff; font: 400 clamp(38px, 3.6vw, 88px)/1 "DeltaBlock", sans-serif; text-transform: uppercase; text-shadow: none; background: none; -webkit-text-fill-color: #fff }
.ez-head h1::after { content: "." }
.ez-head p { margin: 0; color: #e4e4e4; font: 400 clamp(14px, .86vw, 19px)/1.4 ui-monospace, Consolas, monospace }

.doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); gap: 14px; padding: 0 34px }
.door { --in: min(16px, 2.6cqw); --gap: min(10px, 1.6cqw); --pad: min(12px, 2cqw); --ic: min(64px, 11cqw); position: relative; display: block; aspect-ratio: 1232 / 800; overflow: hidden; container-type: inline-size; background: #0d0d0d; color: #fff; text-decoration: none }
.door:hover, .door:focus-visible { outline: 4px solid #ff8a28; outline-offset: -4px }
.door > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }

.door__label { position: absolute; left: var(--in); right: var(--in); top: 12px }
.door__title { margin: 0; padding: 0; border: 0; background: none; color: #fff; font-weight: 400; font-size: min(64px, 9.8cqw); line-height: 1; text-transform: uppercase; text-shadow: 0 3px 0 #000; -webkit-text-fill-color: #fff; -webkit-text-stroke: 7px #000; paint-order: stroke fill }
html[lang="en"] .door__title { white-space: nowrap }
.door--notes .door__title { font-size: min(54px, 8.6cqw) }
html:not([lang="en"]) .door--notes .door__title { font-size: min(44px, 7.2cqw) }
.door__n { margin: 6px 0 0; color: #fff; font: 700 15px ui-monospace, Consolas, monospace; -webkit-text-stroke: 4px #000; paint-order: stroke fill }

.o-panel { position: absolute; left: var(--in); bottom: var(--in); padding: var(--pad); background: rgba(10, 10, 10, .88); border: 3px solid #fff; box-shadow: 0 4px 16px #000; color: #fff; font: 700 clamp(11px, 2.3cqw, 14px)/1.3 "Rubik", "Segoe UI", system-ui, sans-serif }
.o-panel--right { left: auto; right: var(--in) }
.o-panel img { display: block; image-rendering: pixelated }

.o-grid { display: grid; grid-template-columns: repeat(6, auto); gap: var(--gap) }
.o-row { display: flex; gap: var(--gap) }
.o-grid img, .o-row img { width: var(--ic); height: auto; animation: bob 2.6s ease-in-out infinite }
.o-grid img:nth-child(3n+1), .o-row img:nth-child(3n+1) { animation-delay: -.9s }
.o-grid img:nth-child(3n+2), .o-row img:nth-child(3n+2) { animation-delay: -1.7s }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }

.o-sprites { position: absolute; inset: 0 }
.o-sprites img { position: absolute; height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .7)) }

.o-fade { display: grid }
.o-rec { grid-area: 1 / 1; opacity: 0; animation: recfade 12s linear infinite }
.o-rec i { display: block; margin-bottom: 4px; font-style: normal; color: #ffb648 }
.o-rec div { display: flex; align-items: center; gap: var(--gap) }
.o-rec b { font-size: min(24px, 4cqw) }
.o-ic { position: relative; display: block }
.o-ic img { width: var(--ic); height: auto }
.o-ic em { position: absolute; right: 0; bottom: 0; font-style: normal; -webkit-text-stroke: 3px #000; paint-order: stroke fill }
@keyframes recfade { 0% { opacity: 0 } 4% { opacity: 1 } 25% { opacity: 1 } 29% { opacity: 0 } 100% { opacity: 0 } }

.o-list { display: flex; gap: var(--gap) }
.o-list div { width: min(92px, 15cqw); font-size: clamp(10px, 2.1cqw, 13px); line-height: 1.2; text-align: center }
.o-list img { width: var(--ic); height: auto; margin: 0 auto 6px }

.o-note { display: grid; gap: min(6px, 1cqw); font: 700 clamp(10px, 2.1cqw, 13px)/1.2 ui-monospace, Consolas, monospace }
.o-note div { display: flex; align-items: center; gap: var(--gap) }
.o-note img { width: min(32px, 5.2cqw); height: auto }

.o-win { position: absolute; left: var(--in); bottom: var(--in); width: 46%; aspect-ratio: 3 / 2; overflow: hidden; border: 3px solid #fff; background: #000; box-shadow: 0 4px 16px #000 }
.o-win img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: winfade 15s linear infinite }
.o-win--still img { animation: none; opacity: 1 }
@keyframes winfade { 0% { opacity: 0 } 4% { opacity: 1 } 20% { opacity: 1 } 24% { opacity: 0 } 100% { opacity: 0 } }

@media (prefers-reduced-motion: reduce) {
  .o-grid img, .o-row img { animation: none }
  .o-rec, .o-win img { animation: none }
  .o-rec:first-child, .o-win img:first-child { opacity: 1 }
}

.shelf { padding: 30px 34px 0 }
.shelf__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px }
.shelf__head h2 { margin: 0; padding: 0; border: 0; color: #fff; font: 400 clamp(34px, 2.6vw, 62px)/1 "DeltaBlock", sans-serif; text-transform: uppercase; text-shadow: none; background: none; -webkit-text-fill-color: #fff }
.shelf__head h2::after { content: "." }
.shelf__head p { margin: 0; color: #e4e4e4; font: 400 15px/1.4 ui-monospace, Consolas, monospace }
.mods { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 14px }
@media (max-width: 1900px) { .mods { grid-template-columns: repeat(7, minmax(0, 1fr)) } }
@media (max-width: 860px) { .mods { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) } }
.mod { display: block; background: #0d0d0d; color: #fff; text-decoration: none }
.mod:hover, .mod:focus-visible { outline: 4px solid #ff8a28; outline-offset: -4px }
.mod img { display: block; width: 100%; height: auto }
.mod b { display: block; padding: 8px 10px 10px; font: 700 14px/1.25 "Rubik", "Segoe UI", system-ui, sans-serif }

footer { margin-top: auto; padding: 34px 34px 14px !important; background: none !important; border: 0 !important; color: #bdbdbd; font-size: 13px; text-align: center }
footer a { color: #e4e4e4 }
@media (max-width: 860px) { .ez-head, .doors, .shelf { padding-left: 14px; padding-right: 14px } }
