/* Side menu. 8 Nov 2026: on wide screens the top bar (logo + main menu) becomes a menu on the left that stays in
   place while the page scrolls. 19 Nov 2026 (owner picked it from mockups): the menu is a NARROW strip of icons with
   small labels, the account sits at the bottom. The icons are drawn here in CSS (one per link address), so no page's
   HTML or wording changed. Phones and narrow windows keep the normal top bar.
   Linked at the end of <head> on every page, so it wins over each page's own header styles. */
@media (min-width: 1100px) {
  body { padding-left: 92px; }
  header.top {
    position: fixed; top: 0; bottom: 0; left: 0; right: auto; width: 92px;
    padding: 0; z-index: 40; overflow-y: auto; scrollbar-width: none;
    background: #170e0b; border-right: 1px solid rgba(255, 241, 214, .07); border-bottom: 0;
  }
  header.top::-webkit-scrollbar { display: none; }
  header.top .wrap {
    width: auto; max-width: none; min-height: 100%; margin: 0; padding: 20px 8px 16px;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px;
  }
  /* the logo keeps its text for screen readers and search; on the strip only the kiln shows */
  header.top .logo { justify-content: center; padding: 0; gap: 0; font-size: 0; letter-spacing: 0; }
  header.top .logo svg { width: 36px; height: 36px; }
  header.top nav {
    flex: 1; display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px;
    font-size: .7rem; line-height: 1.2; justify-content: flex-start;
  }
  header.top nav a, header.top nav a.hide-sm {
    display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
    padding: 9px 2px; border-radius: 10px; border: 0;
    color: #cdbfb4; text-decoration: none; overflow-wrap: anywhere;
  }
  header.top nav a::before {
    content: ""; flex: none; width: 22px; height: 22px; background: currentColor;
    -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
  }
  header.top nav a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%224%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%224%22/%3E%3C/svg%3E"); }
  header.top nav a[href="/"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 11l9-7 9 7v9h-6v-6H9v6H3z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 11l9-7 9 7v9h-6v-6H9v6H3z%22/%3E%3C/svg%3E"); }
  header.top nav a[href="#how"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 11v6M12 7.5v.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 11v6M12 7.5v.5%22/%3E%3C/svg%3E"); }
  header.top nav a[href$="/games"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222%22 y=%227%22 width=%2220%22 height=%2211%22 rx=%224%22/%3E%3Cpath d=%22M7 11v3M5.5 12.5h3M16 12.5h2%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222%22 y=%227%22 width=%2220%22 height=%2211%22 rx=%224%22/%3E%3Cpath d=%22M7 11v3M5.5 12.5h3M16 12.5h2%22/%3E%3C/svg%3E"); }
  header.top nav a[href$="/feedback-friday"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 7v5l3 2%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 7v5l3 2%22/%3E%3C/svg%3E"); }
  header.top nav a[href$="/playtesting"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 5h16v11H9l-5 4z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 5h16v11H9l-5 4z%22/%3E%3C/svg%3E"); }
  header.top nav a[href$="/guide"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 4h11l3 3v13H5z%22/%3E%3Cpath d=%22M9 10h6M9 14h6%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 4h11l3 3v13H5z%22/%3E%3Cpath d=%22M9 10h6M9 14h6%22/%3E%3C/svg%3E"); }
  header.top nav a[href*="/discord"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%229.5%22 cy=%227%22 r=%224%22/%3E%3Cpath d=%22M19 8v6M22 11h-6%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%229.5%22 cy=%227%22 r=%224%22/%3E%3Cpath d=%22M19 8v6M22 11h-6%22/%3E%3C/svg%3E"); }
  header.top nav a[href="/me"]::before, header.top nav a[href^="/login"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E"); }
  header.top nav a[href="/review"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 11l3 3 8-8%22/%3E%3Cpath d=%22M20 12v7H4V5h11%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 11l3 3 8-8%22/%3E%3Cpath d=%22M20 12v7H4V5h11%22/%3E%3C/svg%3E"); }
  header.top nav a:hover { background: rgba(255, 241, 214, .05); color: #ffd38a; }
  header.top nav a[aria-current] { background: rgba(232, 100, 30, .16); color: #ffd38a; font-weight: 600; }
  /* the Discord link looks like a button */
  header.top nav a[href*="/discord"] { margin-top: 10px; background: #e8641e; color: #1c120e; font-weight: 600; }
  header.top nav a[href*="/discord"]:hover { background: #ffd38a; color: #1c120e; }
  /* Log in / the profile (kg-me.js): under the Discord button, after a small gap (owner 19 Nov: not at the very bottom) */
  header.top nav .kg-me {
    order: 90; margin-top: 18px; padding: 8px 2px; background: rgba(255, 241, 214, .05); color: #fff1d6; font-weight: 600;
    cursor: pointer; position: relative;
  }
  header.top nav .kg-me:hover { color: #ffd38a; }
  header.top nav .kg-me img { width: 36px !important; height: 36px !important; margin: 0 !important; flex: none; background: #3a2219; }
  header.top nav .kg-me:has(img)::before { display: none; }
  header.top nav .kg-me .kg-n { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.top nav .kg-me > span:not(.kg-n) { position: absolute; top: 2px; right: 6px; margin: 0 !important; }
  /* the owner's "Review 2" / "Storage 80%" notes sit above the profile */
  header.top nav .kg-review, header.top nav .kg-storage { order: 80; margin-top: 18px; padding: 6px 2px !important; border-radius: 10px !important; }
  header.top nav .kg-review::before, header.top nav .kg-storage::before { display: none; }
  header.top nav .kg-storage { order: 79; }
  header.top nav:has(.kg-review, .kg-storage) .kg-me, header.top nav:has(.kg-storage) .kg-review { margin-top: 4px; }
  /* the yellow "preview" banner on preview links sits beside the menu, not under it */
  .preview { position: relative; z-index: 41; }
}

/* Phones (19 Nov, owner): the links in the top bar (Games, Guide, Discord) are small orange buttons, like the other
   buttons on the page. The Log in / profile button keeps its own look. */
@media (max-width: 640px) {
  header.top nav { gap: 6px !important; align-items: center; }
  /* My kiln, /upload, /review and /privacy list every link without the hide-sm class: on a phone keep the same three as the other pages */
  header.top nav a[href="/"], header.top nav a[href$="/feedback-friday"], header.top nav a[href$="/playtesting"] { display: none; }
  header.top nav a:not(.kg-me):not(.kg-review):not(.kg-storage) {
    padding: 5px 10px; border-radius: 8px; background: #e8641e; color: #1c120e; font-weight: 600; font-size: .88rem; line-height: 1.3;
  }
  header.top nav a:not(.kg-me):not(.kg-review):not(.kg-storage):hover { background: #ffd38a; color: #1c120e; }
  header.top nav a[aria-current]:not(.kg-me):not(.kg-review):not(.kg-storage) { background: #ffd38a; color: #1c120e; }
}
