@font-face { font-family: 'B43N'; src: url("assets/fonts/B43N.TTF") format("truetype"); font-display: swap; }
:root { color-scheme: dark; --stone: #231b17; --gold: #c9a56a; --panel: rgba(25, 19, 16, .94); }
* { box-sizing: border-box; }
html { background: #100d0b url("assets/backgrounds/DarkPattern.jpg") repeat; }
body { margin: 0; min-width: 320px; color: #eadcc4; font: 16px/1.6 Georgia, serif; }
.site-shell { box-sizing: border-box; width: min(1650px, calc(100% - 28px)); margin: 22px auto; padding: 9px; display: flex; flex-direction: column; border: 0; box-shadow: 0 12px 35px #000; background: url("assets/legacy/top-left-corner.png") top left no-repeat, url("assets/legacy/top-right-corner.png") top right no-repeat, url("assets/legacy/bottom-left-corner.png") bottom left no-repeat, url("assets/legacy/bottom-right-corner.png") bottom right no-repeat, url("assets/legacy/top-border.png") top center repeat-x, url("assets/legacy/bottom-border.png") bottom center repeat-x, url("assets/legacy/left-border.png") left center repeat-y, url("assets/legacy/right-border.png") right center repeat-y, #211914 url("assets/legacy/brick2.png") repeat; overflow: hidden; }
.top-banner { position: relative; flex: 0 0 163px; height: 163px; min-height: 163px; padding: 0; overflow: hidden; background: #3b2518 url("assets/legacy/top.png") repeat-x left top; background-size: auto 163px; }
.animated-gears { position: absolute; top: 0; left: 0; width: 128px; height: 163px; object-fit: contain; image-rendering: auto; }
.top-title { position: absolute; top: 2px; left: 50%; width: 530px; height: 158px; transform: translateX(-50%); object-fit: contain; }
.banner-copy { padding: 15px 30px; background: rgba(33, 18, 10, .82); border: 2px solid #a67b43; box-shadow: 0 4px 12px #000; }
.eyebrow, .section-kicker { display: none; margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; }
.page-subtitle { margin: 8px 0 18px; color: var(--gold); letter-spacing: .08em; font-size: .78rem; }
h1, h2, h3 { font-weight: normal; color: #f1d49a; text-shadow: 2px 2px #120b08; }
h1 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.9rem); line-height: 1.1; }
.subtitle { margin: 8px 0 0; font-style: italic; }
.site-body { flex: 0 0 600px; height: 600px; min-height: 600px; display: flex; align-items: stretch; overflow: hidden; background: rgba(18, 13, 10, .72); }
.legacy-nav { position: relative; flex: 0 0 230px; width: 230px; min-height: 600px; overflow: hidden; background: #3a3027 url("assets/legacy/side-repeat.png") repeat-y top left; }
.legacy-nav img { display: block; object-fit: contain; object-position: top; }
.legacy-nav > img:not(.sidebar-sigil) { display: none; }
.legacy-nav::after { content: ""; position: absolute; left: 70px; top: 460px; width: 89px; height: 88px; background: url("assets/legacy/sigil.png") center/contain no-repeat; z-index: 1; }
.menu-links { position: absolute; inset: 0; }
.menu-links a { position: absolute; left: 46px; width: 138px; height: 31px; display: block; }
.menu-links img { display: block; width: 138px; height: 31px; }
.button-home { top: 14px; }.button-animations { top: 58px; }.button-h-slot { top: 102px; }.button-l-slot { top: 146px; }.button-p-slot { top: 190px; }.button-static { top: 234px; }.button-gump { top: 278px; }.button-tools { top: 322px; }.button-tutorials { top: 366px; }.button-links { top: 410px; }
.site-visit-count { position: absolute; top: 558px; left: 46px; width: 138px; height: 37px; padding: 21px 4px 0; background-image: url("assets/buttons/Page-visits.png"); background-position: center; background-repeat: no-repeat; background-size: 138px 37px; color: #fff; font: .62rem/1 'B43N', Georgia, serif; text-align: center; text-shadow: 1px 1px #120b08; white-space: pre-line; z-index: 2; }
.content-panel { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; background: var(--panel) url("assets/backgrounds/Amate Dark.jpg") repeat; }
.content-inner { box-sizing: border-box; width: 100%; max-width: 1350px; margin: 0 auto; padding: 24px clamp(28px, 4vw, 78px) clamp(28px, 4vw, 78px); background: linear-gradient(90deg, rgba(21,15,12,.88), rgba(31,20,14,.78)); min-height: 600px; }
h2 { margin: 0 0 18px; font-size: clamp(1.1rem, 2.2vw, 1.8rem); }
.notice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 18px; margin-top: 36px; }
.notice-card { min-width: 0; padding: 14px; border: 1px solid #7d5b37; background: rgba(43, 25, 15, .86); box-shadow: inset 0 0 0 3px rgba(0,0,0,.18); }
.notice-card h3 { margin-top: 0; font-size: .82rem; }
.animation-frame { height: 220px; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 5, .42); border: 1px solid #60472f; overflow: hidden; }
.animation-frame img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.static-frame { height: 150px; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 5, .42); border: 1px solid #60472f; overflow: hidden; }
.static-frame img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.animation-name { min-height: 3.2em; margin: 10px 0 0; color: #d7b67a; font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; }
.animation-title { min-height: 3.2em; margin: 0 0 10px; font-size: .82rem; line-height: 1.25; font-weight: 700; font-style: normal; overflow-wrap: anywhere; }
.download-links { overflow-wrap: anywhere; word-break: break-word; }
.animation-credit { margin: -6px 0 10px; color: #c9a56a; font-size: .82rem; font-style: italic; }
.download-links { margin: 10px 0 -4px; font-size: .82rem; line-height: 1.5; }
.download-links a, .simple-page a { color: #e2bd78; }
.download-count { display: block; margin-top: 3px; color: #806044; font-size: .7rem; line-height: 1.2; }
.download-count + br { display: none; }
.animation-frame img, .static-frame img { cursor: zoom-in; }
.preview-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 32px; background: rgba(0,0,0,.86); cursor: zoom-out; }
.preview-modal img { display: block; max-width: 95vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; image-rendering: auto; cursor: default; }
.preview-modal-close { position: absolute; top: 18px; right: 24px; width: 42px; height: 42px; border: 1px solid #c9a56a; background: #24160f; color: #f1d49a; font: 28px/1 Georgia, serif; cursor: pointer; }
.tool-list h3 { margin: 28px 0 2px; font-size: 1.1rem; }
.tool-list h3:first-child { margin-top: 24px; }
.tool-list p { margin: 0 0 16px; }
.catalogue-search { display: flex; gap: 8px; margin: 18px 0; }
.catalogue-search input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #7d5b37; background: #160f0c; color: #eadcc4; font: inherit; }
.catalogue-search button { padding: 8px 14px; border: 1px solid #a67b43; background: #3b2518; color: #f1d49a; font: inherit; cursor: pointer; }
.simple-page { width: auto; margin: 0; padding: 0; color: #eadcc4; background: transparent; border: 0; }
.simple-page h1 { margin: 0 0 18px; font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
.statistics-line { margin: 3px 0; font-size: .82rem; line-height: 1.25; }
.statistics-heading { margin: 18px 0 8px; font-size: 1rem; }
footer { flex: 0 0 128px; height: 128px; padding: 0; display: flex; align-items: center; justify-content: center; background: #21150f url("assets/legacy/bottom.png") repeat-x left top; background-size: auto 128px; }
.footer-search, .footer-statistics, .footer-information { display: block; width: 138px; height: 31px; margin: 0 6px; }
.footer-search img, .footer-statistics img, .footer-information img { display: block; width: 138px; height: 31px; }
@media (max-width: 760px) {
  .site-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 4px;
  }

  .top-banner {
    flex: 0 0 104px;
    height: 104px;
    min-height: 104px;
    background-size: auto 104px;
  }

  .animated-gears {
    display: none;
  }

  .top-title {
    top: 3px;
    width: min(90vw, 420px);
    height: 98px;
  }

  .site-body {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    display: block;
    overflow: visible;
  }

  .legacy-nav {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 12px 8px 16px;
    background-position: top left;
    background-color: #3a3027;
    background-image: url("assets/legacy/brick2.png");
    background-repeat: repeat;
  }

  .legacy-nav > img {
    display: none;
  }

  .menu-links {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 138px);
    justify-content: center;
    gap: 8px 10px;
  }

  .menu-links a,
  .button-home,
  .button-animations,
  .button-h-slot,
  .button-l-slot,
  .button-p-slot,
  .button-static,
  .button-gump,
  .button-tools,
  .button-tutorials,
  .button-links {
    position: static;
    left: auto;
    top: auto;
    width: 138px;
    height: 31px;
  }

  .menu-links img {
    width: 138px;
    height: 31px;
  }

  .legacy-nav::after {
    position: static;
    display: block;
    width: 89px;
    height: 88px;
    margin: 14px auto 0;
    transform: none;
  }

  .site-visit-count {
    position: relative;
    top: auto;
    left: auto;
    display: block;
    margin: 8px auto 0;
    transform: none;
  }

  .content-panel {
    overflow: visible;
  }

  .content-inner {
    min-height: auto;
    padding: 24px 14px 32px;
  }

  .notice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 24px;
  }

  .notice-card {
    padding: 12px;
  }

  .animation-frame {
    height: min(58vw, 260px);
  }

  .static-frame {
    height: min(48vw, 220px);
  }

  footer {
    flex: 0 0 auto;
    height: auto;
    min-height: 92px;
    padding: 18px 8px;
    flex-wrap: wrap;
    gap: 8px;
    background-size: auto 92px;
  }

  .footer-search,
  .footer-statistics,
  .footer-information {
    margin: 0;
  }
}
