/* the launcher's look, ported from edenfall-launcher/src/css/app.css. same fonts, colours, edges and parts */

@font-face { font-family: "Fell"; src: url(fonts/im-fell-english-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url(fonts/im-fell-english-latin-400-italic.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Fell SC"; src: url(fonts/im-fell-english-sc-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 400; src: url(fonts/spectral-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: italic; src: url(fonts/spectral-latin-400-italic.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 500; src: url(fonts/spectral-latin-500-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 600; src: url(fonts/spectral-latin-600-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 400; src: url(fonts/spectral-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }
@font-face { font-family: "Spectral"; font-weight: 600; src: url(fonts/spectral-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; font-display: swap; }

/* surfaces step by value, edges are solid and darker, never a light hairline */
:root {
  --bg: #1b1e28;
  --panel: #14171f;
  --raise: #232633;
  --raise-2: #2b2e3c;
  --well: #0f1117;
  --line: #30313a;
  --edge: #0b0c11;
  --text: #e9e2d3;
  --dim: #c5bfb1;
  --muted: #a3ab9c;
  --gold: #a8823c;
  --gold-hover: #947235;
  --gold-deep: #5e4720;
  --gold-ink: #15120c;
  --apple: #a8232b;
  --gold-text: #a8823c;
  --gold-text-hover: #c19a52;
  --btn-hover: #343848;
  --placeholder: #737a70;
  --ok: #94ad6e;
  --bad: #e08b8b;
  --shade: 20, 23, 31;
  --shade-2: 27, 30, 40;
  --veil: 11, 12, 17;
  --plate-line: 21, 18, 12;
  --star-lo: .2;
  --star-hi: .8;
  --serif: "Spectral", Georgia, serif;
  --fell: "Fell", "Spectral", Georgia, serif;
  --fell-sc: "Fell SC", "Fell", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --bar: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* day: parchment, dark ink, the same gold */
:root[data-theme="light"] {
  --bg: #ebe3d1;
  --panel: #e1d8c4;
  --raise: #d7cdb6;
  --raise-2: #cdc2a7;
  --well: #f5f0e4;
  --line: #c4b89c;
  --edge: #aa9e82;
  --text: #1f1d1a;
  --dim: #3f3b34;
  --muted: #6a6558;
  --gold: #a8823c;
  --gold-hover: #b8924a;
  --gold-deep: #6e5526;
  --gold-ink: #15120c;
  --gold-text: #7a5a1e;
  --gold-text-hover: #5e4517;
  --btn-hover: #c2b698;
  --placeholder: #8c8574;
  --ok: #4f6b2e;
  --bad: #8a1f26;
  --shade: 235, 227, 209;
  --shade-2: 235, 227, 209;
  --veil: 60, 52, 38;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 1.5rem); }
body {
  margin: 0;
  min-height: 100vh;
  padding: var(--bar) 0 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { font-family: var(--fell); font-weight: 400; line-height: 1.1; margin: 0 0 .5rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.4rem, 5vw, 3.25rem); line-height: 1; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin-bottom: .9rem; color: var(--gold-text); }
h3 { font-size: 1.35rem; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: var(--gold); color: var(--gold-ink); }
small { color: var(--muted); font-size: .85rem; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--well); padding: 1px 6px; }

/* paper grain over everything, a static texture so it costs nothing per frame */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .91 0 0 0 0 .88 0 0 0 0 .82 0 0 0 1.2 -.35'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after { opacity: .1; mix-blend-mode: multiply; }

/* the site's own top bar: brand on the left, the pages in the middle, theme and account on the right */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar);
  z-index: 50;
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 0 16px 0 20px;
  background: var(--panel);
  box-shadow: 0 3px 0 var(--edge);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.brand-sigil { width: 34px; height: 34px; object-fit: contain; display: block; }
:root[data-theme="light"] .brand-sigil { filter: brightness(.3) sepia(.6); }
.wordmark { font: 20px/1 var(--fell-sc); letter-spacing: .06em; color: var(--gold-text); }
.brand:hover .wordmark { color: var(--gold-text-hover); }

.topnav { display: flex; align-items: stretch; gap: 2px; min-width: 0; }
.topnav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.topnav-link:hover, .topnav-link[aria-current="page"] { color: var(--text); background: var(--bg); }
.topnav-link[aria-current="page"] .nav-icon { color: var(--gold-text); }
/* the open page gets a gold rule along the bottom edge */
.topnav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.topnav-link[aria-current="page"]::after { transform: scaleX(1); }

.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }

/* three-way theme switch: a sunken track with a raised gold block for the active choice */
.seg { display: flex; padding: 3px; gap: 3px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border: 0; background: none; font-size: 14px; color: var(--dim); cursor: pointer; }
.seg button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.seg button:hover { color: var(--text); background: var(--raise); }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); box-shadow: 0 2px 0 var(--gold-deep); }
.theme-seg button { height: 28px; padding: 0 10px; }
.theme-seg button svg { width: 14px; height: 14px; }

.login-btn { height: 34px; padding: 0 14px; font-size: 14px; }
.usermenu { position: relative; }
.account {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--dim);
  font: 19px/1 var(--fell);
  background: var(--raise);
  box-shadow: inset 0 -3px 0 var(--edge);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  cursor: pointer;
}
.account img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account:hover, .account[aria-expanded="true"] { background: var(--raise-2); color: var(--text); }
.account[aria-expanded="true"] { box-shadow: inset 0 -3px 0 var(--gold); }

/* menus open like the launcher's pickers */
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 210px;
  padding: 6px;
  background: var(--raise);
  box-shadow: 0 4px 0 var(--edge), 0 18px 40px rgba(0, 0, 0, .5);
  transform-origin: top right;
  animation: menu-in .18s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: scaleY(.92); } }
.menu-head { padding: 6px 12px 8px; margin-bottom: 4px; font: 18px/1.1 var(--fell); color: var(--gold-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 0 var(--edge); }
.menu form { margin: 0; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; padding: 7px 12px; border: 0; background: none; color: var(--dim); font: inherit; font-size: 14.5px; text-align: left; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--gold); color: var(--gold-ink); outline: none; }

.page { min-height: calc(100vh - var(--bar)); display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { max-width: 960px; margin: 0 auto; padding: 40px 56px 56px; }
.wrap.narrow, .narrow { max-width: 760px; }
.wrap.wide, .wide { max-width: 1240px; }
.lead { color: var(--dim); font-size: 1.05rem; max-width: 40em; }
.meta { color: var(--muted); font-size: .92rem; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.link, .link-btn { color: var(--gold-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover, .link-btn:hover { color: var(--gold-text-hover); }
.link-btn { font-size: 15px; }

/* buttons are solid blocks sitting on a darker ledge, pressing one drops it onto the ledge.
   a plain .btn is the gold main action, .ghost is the everyday grey one */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  font: 500 15px/1 var(--serif);
  white-space: nowrap;
  text-decoration: none;
  color: var(--gold-ink);
  background: var(--gold);
  box-shadow: 0 3px 0 var(--gold-deep);
  position: relative;
  cursor: pointer;
  transition: background .15s, color .15s, transform .08s, box-shadow .08s;
}
.btn:hover { background: var(--gold-hover); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { color: var(--text); background: var(--raise-2); box-shadow: 0 3px 0 var(--edge); }
.btn.ghost:hover { background: var(--btn-hover); }
.btn.danger { color: #f5ece0; background: var(--apple); box-shadow: 0 3px 0 #5c1217; }
.btn.danger:hover { background: #8f1d24; }
.btn.support { color: var(--gold-text); background: var(--raise-2); box-shadow: 0 3px 0 var(--edge); }
.btn.support:hover { color: var(--gold-text-hover); background: var(--btn-hover); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wide-btn { display: flex; width: 100%; }

/* the main action is an engraved gold plate: notched corners and a pressed-in double rule */
.btn.big, .btn.plate {
  height: 58px;
  min-width: 220px;
  padding: 0 34px;
  font: 27px/1 var(--fell);
  letter-spacing: .01em;
  color: var(--gold-ink);
  background: var(--gold);
  box-shadow: none;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  filter: drop-shadow(0 4px 0 var(--gold-deep));
}
.btn.big::before, .btn.plate::before {
  content: "";
  position: absolute;
  inset: 6px;
  box-shadow: inset 0 0 0 1px rgba(var(--plate-line), .45), inset 0 0 0 3px var(--gold), inset 0 0 0 4px rgba(var(--plate-line), .25);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  pointer-events: none;
}
.btn.big:hover, .btn.plate:hover { background: var(--gold-hover); }
.btn.big:hover::before, .btn.plate:hover::before { box-shadow: inset 0 0 0 1px rgba(var(--plate-line), .45), inset 0 0 0 3px var(--gold-hover), inset 0 0 0 4px rgba(var(--plate-line), .25); }
.btn.big:active:not(:disabled), .btn.plate:active:not(:disabled) { transform: translateY(4px); filter: none; }

/* inputs are sunk into the panel rather than outlined */
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--well);
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 3px 0 var(--edge);
  padding: 0 12px;
  height: 40px;
  outline: 0;
  min-width: 0;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.55; resize: vertical; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):focus, textarea:focus { box-shadow: inset 0 3px 0 var(--edge), inset 0 -2px 0 var(--gold); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type=search]::-webkit-search-cancel-button { filter: sepia(1) saturate(.4); }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 16px; height: 16px; }
input[type=color] { width: 2.4rem; height: 34px; padding: 2px; border: 0; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); cursor: pointer; }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); padding: 6px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; height: 32px; padding: 0 14px; border: 0; font: 500 14px var(--serif); color: var(--text); background: var(--raise-2); box-shadow: 0 3px 0 var(--edge); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--btn-hover); }

.form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.form label { display: grid; gap: 4px; color: var(--muted); font-size: 14.5px; }
.form label.check, label.check { display: flex; align-items: center; gap: 10px; color: var(--dim); }
.form .btn { justify-self: start; }
.form fieldset.choice { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.form fieldset.choice legend { color: var(--muted); font-size: 14.5px; padding: 0; margin-bottom: .3rem; }
.form fieldset.choice input[type=number], .form fieldset.choice input[type=date] { height: 32px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .75rem; }
.inline input { flex: 1; min-width: 180px; }
.help { color: var(--muted); font-size: 14px; }
.help pre { white-space: pre-wrap; }

/* plain selects before app.js swaps them for pickers */
select {
  -webkit-appearance: none;
  appearance: none;
  height: 40px;
  padding: 0 34px 0 14px;
  border: 0;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  cursor: pointer;
  background: var(--raise) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23a8823c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  box-shadow: 0 3px 0 var(--edge);
}
select option { background: var(--raise); color: var(--text); }

/* app.js pickers, the launcher's picker-btn and picker-menu */
.dd { position: relative; display: inline-block; }
.form .dd, label .dd { display: block; }
.dd-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.dd-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 36px 0 14px;
  border: 0;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--raise);
  box-shadow: 0 3px 0 var(--edge);
}
.dd-btn:hover { background: var(--raise-2); }
.dd-btn.placeholder { color: var(--muted); }
.dd-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23a8823c' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}
.dd-size { display: block; height: 0; overflow: hidden; visibility: hidden; padding-right: 22px; }
.dd.open .dd-btn { background: var(--raise-2); box-shadow: 0 3px 0 var(--gold-deep); }
.dd.open .dd-btn::after { transform: rotate(180deg); }
.dd-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  background: var(--raise);
  box-shadow: 0 4px 0 var(--edge), 0 18px 40px rgba(0, 0, 0, .5);
  transform-origin: top;
  animation: menu-in .18s var(--ease);
}
.dd.up .dd-list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom; }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; font-size: 14.5px; white-space: nowrap; color: var(--dim); cursor: pointer; }
.dd-item.selected { color: var(--gold-text); }
.dd-item.selected::before { content: ""; width: 6px; height: 6px; background: currentColor; margin-left: -2px; transform: rotate(45deg); flex: none; }
.dd-item.active { background: var(--gold); color: var(--gold-ink); }
.dd-item.disabled { color: var(--muted); opacity: .6; cursor: default; }

/* home: the launcher's library view */
.library { position: relative; min-height: calc(100vh - var(--bar)); overflow: hidden; display: flex; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .layer { transition: transform 1.2s var(--ease); }
.scene .star { animation: twinkle var(--tw, 4s) ease-in-out var(--td, 0s) infinite; }
.scene .star.big { animation-name: twinkle-big; }
@keyframes twinkle { 0%, 100% { opacity: var(--star-lo); } 50% { opacity: var(--star-hi); } }
@keyframes twinkle-big { 0%, 100% { opacity: .45; } 40% { opacity: 1; } 55% { opacity: .3; } 70% { opacity: .95; } }
.fall-apple { will-change: transform; }
.library-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--shade), .96) 0%, rgba(var(--shade), .82) 30%, rgba(var(--shade), 0) 56%),
    linear-gradient(0deg, rgba(var(--shade), .92) 0%, rgba(var(--shade), 0) 34%);
}
.library-body {
  position: relative;
  flex: 1;
  padding: 40px 44px 40px 56px;
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr minmax(260px, 300px);
  align-items: end;
}
.game { grid-column: 1; }
.game-title { margin: 0 0 14px; font: 400 76px/.92 var(--fell); letter-spacing: -.01em; color: var(--text); text-wrap: balance; }
.game-line { margin: 0 0 30px; max-width: 30em; color: var(--dim); font-size: 16px; line-height: 1.6; }
.status-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.notes {
  grid-column: 3;
  align-self: end;
  max-height: min(440px, calc(100% - 90px));
  display: flex;
  flex-direction: column;
  background: rgba(var(--shade), .94);
  box-shadow: inset 0 3px 0 var(--gold), 0 4px 0 var(--edge);
  padding: 22px 20px 16px;
}
.notes h2 { margin: 0 0 12px; font: 400 22px/1.1 var(--fell); color: var(--text); }
.notes-list { overflow-y: auto; min-height: 0; padding-right: 6px; margin-right: -6px; }
.note { display: block; padding: 12px 12px 10px; margin-bottom: 8px; background: var(--bg); text-decoration: none; transition: background .15s; }
a.note:hover { background: var(--raise); }
.note-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.note-head strong { font: 18px/1.1 var(--fell); font-weight: 400; color: var(--gold-text); }
.note-head span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.note-text { display: block; color: var(--dim); font-size: 14px; line-height: 1.5; }
.notes-empty { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.notes-more { align-self: flex-start; margin-top: 6px; font-size: 14px; }

/* page headers: the launcher's orchard strip with the intro over its left side */
.orchard-head { position: relative; height: 210px; }
.orchard-band { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.banner-art { background: center / cover no-repeat; }
.orchard-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--shade-2), .96) 0%, rgba(var(--shade-2), .72) 34%, rgba(var(--shade-2), 0) 60%); pointer-events: none; }
.orchard-intro { position: absolute; left: 44px; bottom: 28px; max-width: 520px; z-index: 1; }
.orchard-intro h1 { margin: 0 0 6px; font: 400 52px/1 var(--fell); }
.orchard-intro p { margin: 0 0 12px; color: var(--dim); }

.filters {
  position: sticky;
  top: var(--bar);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 44px;
  background: var(--panel);
  box-shadow: 0 3px 0 var(--edge);
}
.wrap .filters { position: static; padding: 0; margin: 1.5rem 0 1rem; background: none; box-shadow: none; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.search:focus-within { box-shadow: inset 0 3px 0 var(--edge), inset 0 -2px 0 var(--gold); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: none; }
.search input[type=search] { flex: 1; height: 100%; padding: 0; background: none; box-shadow: none !important; }
.filters > input[type=search] { flex: 1; min-width: 200px; }

/* category row: blocks on a ledge, the open one gold */
.chips { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 4px 0 18px; }
.chips a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; font-size: 14px; color: var(--dim); text-decoration: none; background: var(--raise); box-shadow: 0 3px 0 var(--edge); transition: background .15s, color .15s; }
.chips a:hover { color: var(--text); background: var(--raise-2); }
.chips a[aria-current] { color: var(--gold-ink); background: var(--gold); box-shadow: 0 3px 0 var(--gold-deep); }

/* mod cards are hung like fruit tags: a punched hole, a gold string, and a little swing on hover */
.mods-wrap { padding-top: 26px; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 40px 26px; padding-top: 30px; }
.tag-wrap { position: relative; filter: drop-shadow(0 4px 0 var(--edge)); }
.tag-wrap::before { content: ""; position: absolute; left: 50%; top: -24px; width: 2px; margin-left: -1px; height: 36px; background: var(--gold-deep); }
.tag {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: var(--raise);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%, 0 22px);
  transform-origin: 50% -18px;
  transition: transform .5s var(--ease), background .2s;
  animation: tag-in .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes tag-in { from { opacity: 0; transform: rotate(-2deg) translateY(-8px); } }
.tag-wrap:hover .tag { transform: rotate(1.4deg); background: var(--raise-2); }
.tag:focus-visible { outline: none; background: var(--raise-2); box-shadow: inset 0 -3px 0 var(--gold); }
.tag-hole { position: absolute; left: 50%; top: 8px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 2px 0 var(--edge); z-index: 1; }
.tag-thumb { display: block; margin: 26px 12px 0; padding: 5px; aspect-ratio: 16 / 10; background: var(--well); overflow: hidden; position: relative; }
.tag-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag-thumb .blank { position: absolute; inset: 5px; display: grid; place-items: center; background: var(--panel); color: var(--muted); font: 20px/1 var(--fell); }
.tag-label { position: absolute; left: 5px; bottom: 5px; padding: 3px 9px; font-size: 12px; background: var(--well); color: var(--dim); }
.tag-label.wip { background: var(--gold); color: var(--gold-ink); }
.tag-label.abandoned { color: var(--muted); }
.tag-body { padding: 16px 16px 0; display: flex; flex-direction: column; flex: 1; }
.tag-title { margin: 0 0 2px; font: 400 21px/1.15 var(--fell); color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-author { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.tag-summary { margin: 0 0 14px; font-size: 14px; color: var(--dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-foot { margin: auto -16px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; background: var(--panel); font-size: 13px; color: var(--muted); }
.tag-stats { display: flex; gap: 12px; align-items: center; }
.tag-stats span { display: inline-flex; align-items: center; gap: 5px; }
.tag-stats svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tag-view { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font-size: 13.5px; font-weight: 500; background: var(--gold); color: var(--gold-ink); box-shadow: 0 3px 0 var(--gold-deep); transition: background .15s; }
.tag-wrap:hover .tag-view { background: var(--gold-hover); }

.empty { grid-column: 1 / -1; padding: 50px 0 40px; display: grid; justify-items: center; text-align: center; gap: 10px; color: var(--dim); }
.empty h3 { margin: 0; font: 400 26px/1.1 var(--fell); color: var(--text); }
.empty p { margin: 0 0 6px; max-width: 30em; }

.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 34px 0 10px; color: var(--muted); font-size: 14px; }

/* status labels and badges are small flat blocks, like the launcher's tag labels */
.badge, .status { display: inline-block; padding: 2px 9px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; background: var(--well); color: var(--dim); }
.tag-wip { background: var(--gold); color: var(--gold-ink); }
.tag-release { color: var(--gold-text); }
.tag-abandoned { color: var(--muted); }
.st-live { color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); padding-left: 11px; }
.st-pending { color: var(--gold-ink); background: var(--gold); }
.st-rejected { color: var(--bad); box-shadow: inset 3px 0 0 var(--apple); padding-left: 11px; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 14px; }

/* blog rows */
.post-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; padding: 14px; margin-bottom: 4px; background: var(--panel); text-decoration: none; transition: background .15s; }
.post-row:hover { background: var(--raise); }
.post-thumb { aspect-ratio: 16 / 9; padding: 4px; background: var(--well); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-row > div:not(.post-thumb) { padding-top: 6px; }
.post-row.no-cover { grid-template-columns: 1fr; padding: 16px 18px; }
.post-row.no-cover > div { padding-top: 0; }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin-bottom: .35rem; }
.post-head h3 { margin: 0; font-size: 1.5rem; color: var(--text); transition: color .15s; }
.post-row:hover .post-head h3 { color: var(--gold-text-hover); }
.post-head time { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.post-row p { margin: 0; color: var(--dim); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* reading text */
.prose { color: var(--dim); font-size: 16px; line-height: 1.7; max-width: 68ch; margin-top: 1.5rem; overflow-wrap: anywhere; }
.prose p { margin: 0 0 14px; }
.prose a { color: var(--gold-text); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold-text-hover); }
.prose a.btn, .prose a.btn:hover { color: var(--gold-ink); text-decoration: none; }
.prose a.btn.ghost, .prose a.btn.ghost:hover { color: var(--text); }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose h2, .prose h3 { margin: 28px 0 8px; }
.prose h2 { font-size: 28px; color: var(--text); }
.prose h3 { font-size: 22px; color: var(--text); }
.prose blockquote { margin: 0 0 14px; padding: 8px 14px; background: var(--bg); box-shadow: inset 3px 0 0 var(--gold-deep); color: var(--dim); }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 14px; }
.prose li::marker { color: var(--gold-text); }
.prose img { max-width: 100%; height: auto; display: block; }
.prose pre { background: var(--well); box-shadow: inset 0 3px 0 var(--edge); padding: 14px 16px; overflow-x: auto; }
.prose hr { border: 0; height: 2px; background: var(--edge); margin: 28px 0; }
.prose details { background: var(--panel); padding: 10px 16px; margin: 14px 0; }
.prose summary { cursor: pointer; color: var(--text); }
.prose table { border-collapse: collapse; margin: 0 0 14px; }
.prose td, .prose th { padding: 6px 10px; background: var(--panel); border: 2px solid var(--bg); }
.bb-left { text-align: left; } .bb-center { text-align: center; } .bb-right { text-align: right; }
.bb-size-1 { font-size: .8rem; } .bb-size-2 { font-size: 1rem; } .bb-size-3 { font-size: 1.35rem; }
.bb-size-4 { font-size: 1.8rem; } .bb-size-5 { font-size: 2.4rem; } .bb-size-6 { font-size: 3.2rem; }
.bb-size-4, .bb-size-5, .bb-size-6 { line-height: 1.2; }
.bb-grad { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.bb-gstroke { position: relative; isolation: isolate; display: inline-block; }
.bb-gstroke::after { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; -webkit-text-stroke: 4px transparent; background-image: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* notices: the launcher toast, sitting in the page */
.flashbar { max-width: 960px; margin: 24px auto 0; padding: 0 56px; }
.flash { margin: 0 0 1rem; padding: 12px 18px; background: var(--raise-2); color: var(--text); box-shadow: inset 4px 0 0 var(--gold), 0 4px 0 var(--edge); font-size: 14.5px; }
.flash p { margin: .2rem 0; }

/* rows on a panel, the launcher's settings rows */
.review, .row, .tile, .wiki-revbody {
  padding: 16px 18px;
  margin-bottom: 4px;
  background: var(--panel);
}
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.review-head > * { min-width: 0; }
.review-head h3 { margin: 0; }
.review .meta, .review p { margin: .35rem 0; }
.review > .actions { margin-top: .5rem; }
.row { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; text-decoration: none; }
.row time { color: var(--muted); font-size: 14px; padding-top: .2rem; }
.row h3 { margin: 0 0 4px; }
.row p { margin: 0; color: var(--dim); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 1.5rem; }
.tile { display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.tile p { margin: 0; color: var(--dim); }
.thumb { max-width: 100%; max-height: 120px; object-fit: contain; align-self: flex-start; padding: 4px; background: var(--well); }

/* tabs: the open one gets a gold rule underneath, like the top bar */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 1.5rem 0; padding: 0; background: var(--panel); box-shadow: 0 3px 0 var(--edge); }
.tabs a { padding: 10px 16px; font-size: 14.5px; text-decoration: none; color: var(--muted); position: relative; transition: color .2s, background .2s; }
.tabs a:hover { color: var(--text); background: var(--bg); }
.tabs a[aria-current] { color: var(--text); background: var(--bg); }
.tabs a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); }

/* mod page */
.slider { position: relative; margin: 1rem 0 2rem; }
.slider-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.slider-track a { flex: 0 0 auto; scroll-snap-align: start; display: block; }
.slider-track img { height: clamp(200px, 32vw, 380px); width: auto; display: block; }
.slider-btn, .lightbox-close {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  z-index: 2;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  background: var(--raise);
  box-shadow: 0 3px 0 var(--edge);
  transition: background .15s, color .15s;
}
.slider-btn:hover { background: var(--gold); color: var(--gold-ink); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-btn::after, .lightbox-close::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.slider-btn::after { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='M5 2l5 5-5 5'/%3E%3C/svg%3E"); }
.slider-btn.prev::after { transform: scaleX(-1); }

.mod-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.mod-main { min-width: 0; }
.mod-main .prose { max-width: none; }
.mod-main h1 { margin-bottom: 8px; }
.mod-side {
  position: sticky;
  top: calc(var(--bar) + 24px);
  padding: 22px 20px 18px;
  background: var(--panel);
  box-shadow: inset 0 3px 0 var(--gold), 0 4px 0 var(--edge);
}
.mod-side .btn.big { display: flex; width: 100%; min-width: 0; margin-bottom: 14px; }
.mod-side .btn + .btn, .mod-side .btn + form, .mod-side form { margin-top: 10px; }
.mod-side form { margin-bottom: 0; }
.facts { margin: 18px 0 0; }
.facts dt { font-size: 12.5px; color: var(--muted); padding: 10px 12px 0; background: var(--bg); }
.facts dd { margin: 0 0 4px; padding: 0 12px 10px; font-size: 15px; color: var(--text); background: var(--bg); }
.mobile-dl { display: none; }
.zip { margin-top: 40px; padding: 16px 20px; background: var(--panel); }
.zip summary { cursor: pointer; font: 22px/1.2 var(--fell); color: var(--text); }
.zip-list { max-height: 380px; overflow: auto; margin-top: 10px; padding: 8px 12px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.zip-row { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; font: 13.5px/1.55 var(--mono); color: var(--dim); }
.zip-row.dir { color: var(--gold-text); }
.zip-row small { color: var(--muted); white-space: nowrap; }
.shots { display: flex; gap: 8px; overflow-x: auto; margin: 1.5rem 0; padding: 6px; background: var(--well); }
.shots img { height: 180px; width: auto; display: block; }
.mod-progress { height: 6px; background: var(--well); margin: 12px 0 4px; overflow: hidden; }
.mod-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s linear; }

/* required mods on the mod form */
.deps { display: grid; gap: .4rem; position: relative; }
.deps > label { color: var(--muted); font-size: 14.5px; }
.deps .meta { margin: 0; }
.dep-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dep-chips:empty { display: none; }
.dep-chip { display: inline-flex; align-items: center; gap: .4rem; padding: 4px 4px 4px 12px; font-size: 14px; background: var(--raise); box-shadow: inset 3px 0 0 var(--gold); }
.dep-chip button { width: 24px; height: 24px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.dep-chip button:hover { background: var(--apple); color: #f5ece0; }
.dep-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; max-height: 18rem; overflow-y: auto; margin-top: 8px; padding: 6px; background: var(--raise); box-shadow: 0 4px 0 var(--edge), 0 18px 40px rgba(0, 0, 0, .5); }
.dep-results button { display: flex; width: 100%; align-items: baseline; gap: .5rem; padding: 7px 12px; border: 0; background: none; color: var(--dim); text-align: left; cursor: pointer; font: inherit; font-size: 14.5px; }
.dep-results button:hover { background: var(--gold); color: var(--gold-ink); }
.dep-results button:hover .meta { color: var(--gold-ink); }
.dep-results p { margin: .4rem .6rem; }

/* gates and notices: the launcher's centred overlay text */
.gate { text-align: center; padding-top: 12vh; }
.gate h1 { font-size: 44px; }
.gate .lead { margin: 0 auto 1.5rem; }
.gate form { display: grid; justify-items: center; gap: 18px; margin: 28px 0 18px; }
.cf-turnstile { margin: .5rem 0; }
.gate .cf-turnstile { display: flex; justify-content: center; }

.foot { margin-top: 56px; padding: 18px 24px; text-align: center; color: var(--muted); font-size: 13.5px; background: var(--panel); box-shadow: 0 -2px 0 var(--edge); }
.foot p { margin: 0; }
.foot .small { font-size: 12.5px; margin-top: 4px; }

/* admin editor */
.bbbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bbbar .btn { height: 30px; padding: 0 10px; font-size: 13.5px; }
.bbbar .dd-btn { height: 30px; font-size: 13.5px; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.editor textarea { font: 14px/1.5 var(--mono); min-height: 340px; tab-size: 4; }
.preview { margin: 0; max-width: none; padding: 12px 16px; background: var(--panel); overflow: auto; max-height: 420px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14.5px; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 6px 12px; white-space: nowrap; }
.table td { padding: 10px 12px; vertical-align: top; background: var(--panel); }
.table tr.dim td { color: var(--muted); opacity: .7; }
.table code { white-space: nowrap; }
.table .inline { margin-top: 0; }

/* wiki: sidebar on the left, article on the right */
.wiki { max-width: 1240px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.wiki-side { position: sticky; top: calc(var(--bar) + 24px); max-height: calc(100vh - var(--bar) - 48px); overflow-y: auto; padding-right: 4px; }
.wiki-side > summary { display: none; }
.wiki-side h4 { margin: 20px 0 6px; font: 15px/1.2 var(--fell-sc); letter-spacing: .06em; color: var(--gold-text); }
.wiki-search input { width: 100%; }
.wiki-nav, .wiki-toc { display: flex; flex-direction: column; gap: 2px; }
.wiki-nav { margin-top: 12px; }
.wiki-side h4 + .wiki-nav { margin-top: 0; }
.wiki-nav a, .wiki-toc a { position: relative; padding: 5px 12px; color: var(--muted); text-decoration: none; font-size: 14.5px; line-height: 1.35; transition: background .2s, color .2s; }
.wiki-nav a:hover, .wiki-toc a:hover { background: var(--panel); color: var(--text); }
.wiki-nav a[aria-current] { background: var(--panel); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.wiki-toc a { font-size: 14px; }
.wiki-toc .toc-3 { padding-left: 24px; }
.wiki-head { padding-bottom: 14px; margin-bottom: 20px; box-shadow: 0 2px 0 var(--edge); }
.wiki-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }
.wiki-head .meta, .wiki-head .lead { margin: 6px 0 0; }
.wiki-head .review-head { align-items: center; }
.wiki-tabs { display: flex; justify-content: flex-end; gap: 2px; margin-bottom: 8px; font-size: 14px; }
.wiki-tabs a { padding: 5px 12px; color: var(--muted); text-decoration: none; background: var(--panel); transition: color .2s, background .2s; }
.wiki-tabs a:hover { color: var(--text); background: var(--raise); }
.wiki-tabs a[aria-current] { color: var(--gold-ink); background: var(--gold); }
.wiki-main { min-width: 0; }
.wiki-main > .flash { margin-bottom: 1rem; }
.wiki-body.prose { max-width: none; margin-top: 0; }
.wiki-body > :first-child { margin-top: 0; }
.wiki-body h2 { padding-bottom: 6px; box-shadow: 0 2px 0 var(--edge); }
.wiki-sub { margin-top: 2rem; font-size: 1.4rem; }
.wiki-new { color: var(--bad); }
.wiki-new:hover { color: var(--apple); }
.wiki-danger { margin-top: 3rem; }
.wiki-review { margin: 1rem 0; }
.wiki-hist { list-style: none; padding: 0; margin: 0; }
.wiki-hist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; padding: 10px 14px; margin-bottom: 4px; background: var(--panel); }
.delta { font-size: .85rem; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.wiki-n { color: var(--gold-text); font-size: .85rem; }
.wiki-results { list-style: none; padding: 0; }
.wiki-results li { padding: 12px 16px; margin-bottom: 4px; background: var(--panel); }
.wiki-results li p { margin: .25rem 0 0; color: var(--dim); }
.wiki-results mark { background: none; color: var(--gold-text); font-weight: 600; }
.wiki-letter { margin: 1.5rem 0 .4rem; color: var(--gold-text); }
.wiki-all { columns: 3 200px; margin: 0; padding-left: 1.2rem; }
.wiki-all li { break-inside: avoid; }
.wiki-all li::marker { color: var(--gold-text); }

/* diffs */
.diff-wrap { overflow-x: auto; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.diff { width: 100%; border-collapse: collapse; font: 13px/1.55 var(--mono); }
.diff td { padding: 0 .6rem; vertical-align: top; }
.diff .d-ln { width: 1%; text-align: right; color: var(--muted); opacity: .6; user-select: none; }
.diff .d-sign { width: 1%; user-select: none; }
.diff .d-txt { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.diff .d-del { background: rgba(168, 35, 43, .14); } .diff .d-del .d-sign { color: var(--bad); }
.diff .d-add { background: rgba(122, 150, 80, .14); } .diff .d-add .d-sign { color: var(--ok); }
.diff del { background: rgba(168, 35, 43, .4); text-decoration: none; }
.diff ins { background: rgba(122, 150, 80, .4); text-decoration: none; }
.diff .d-gap td { color: var(--muted); text-align: center; background: var(--panel); }

/* code blocks, the godot ones use the editor's default theme */
.code-block { position: relative; margin: 14px 0; overflow: hidden; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.code-block .code-head { padding: 7px 14px 5px; font: 600 12.5px var(--mono); color: var(--muted); background: var(--panel); }
.prose .code-block pre { margin: 0; border: 0; box-shadow: none; background: none; tab-size: 4; font: 14px/1.55 var(--mono); }
.code-copy { position: absolute; top: 4px; right: 6px; z-index: 1; height: 24px; padding: 0 10px; border: 0; font: 12.5px var(--serif); color: var(--dim); background: var(--raise); box-shadow: 0 2px 0 var(--edge); cursor: pointer; }
.code-copy:hover { color: var(--text); background: var(--raise-2); }
.code-block.godot, .prose .code-block.godot pre { background: #1d2229; }
.code-block.godot .code-head { background: #161a1f; color: #9aa0a6; }
.code-block.godot pre { color: #cdcfd2; }
.t-kw { color: #ff7085; } .t-flow { color: #ff8ccc; } .t-type { color: #42ffc2; } .t-eng { color: #8fffdb; }
.t-com { color: rgba(205, 207, 210, .5); } .t-doc { color: rgba(153, 179, 204, .8); }
.t-str { color: #ffeda1; } .t-sname { color: #ffc2a6; } .t-npath { color: #b8c47d; } .t-node { color: #63c259; }
.t-num { color: #a1ffe0; } .t-sym { color: #abc9ff; } .t-ann { color: #ffb373; }
.t-fn { color: #57b3ff; } .t-fdef { color: #66e6ff; } .t-gfn { color: #a3a3f5; } .t-mem, .t-bi { color: #bce0ff; }

/* [tree] folder blocks */
.tree-block { margin: 14px 0; overflow: hidden; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.tree-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 5px 8px 5px 14px; font: 600 12.5px var(--mono); color: var(--muted); min-height: 34px; background: var(--panel); }
.tree-head > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-tools { display: flex; gap: 6px; flex-shrink: 0; }
.tree-tools button { height: 24px; padding: 0 10px; border: 0; font: 12.5px var(--serif); color: var(--dim); background: var(--raise); box-shadow: 0 2px 0 var(--edge); cursor: pointer; white-space: nowrap; }
.tree-tools button:hover { color: var(--text); background: var(--raise-2); }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.prose .tree details { margin: 0; padding: 0; border: 0; background: none; }
.tree { padding: 10px 12px 12px; overflow-x: auto; font: 14px/1.5 var(--mono); }
.tree ul { margin-left: .5rem; padding-left: .95rem; box-shadow: inset 2px 0 0 var(--line); }
.prose .tree li { margin: 0; }
.tree li { white-space: nowrap; }
.tree-file, .tree-empty { padding: .1rem 0 .1rem 1.1rem; }
.tree summary { display: block; list-style: none; position: relative; padding: .1rem 0 .1rem 1.1rem; cursor: pointer; color: var(--text); transition: background .2s; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover { background: var(--panel); }
.tree summary::before { content: ""; position: absolute; left: .3rem; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.tree details:not([open]) > summary::before { transform: translateY(-50%) rotate(-45deg); }
.tree small { margin-left: .75rem; font: italic 13px var(--serif); color: var(--muted); }
.tree .ti { display: inline-block; width: 15px; height: 15px; margin-right: .45rem; vertical-align: -2px; background: currentColor; padding: 0 !important; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tree .ti-dir { color: var(--gold-text); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 4A1.5 1.5 0 0 1 3 2.5h3.4l1.6 1.6h5A1.5 1.5 0 0 1 14.5 5.6v6.9A1.5 1.5 0 0 1 13 14H3a1.5 1.5 0 0 1-1.5-1.5z'/%3E%3C/svg%3E"); }
.tree details[open] > summary > .ti-dir { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 4A1.5 1.5 0 0 1 3 2.5h3.4l1.6 1.6h5A1.5 1.5 0 0 1 14.5 5.6V7H5.3a1.6 1.6 0 0 0-1.5 1L1.6 13.4A1.5 1.5 0 0 1 1.5 12.5zM5.3 8.2h10l-2 5a1.3 1.3 0 0 1-1.2.8H2.7l1.9-5.1a1 1 0 0 1 .7-.7z'/%3E%3C/svg%3E"); }
.tree .ti-file { color: var(--muted); --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h5.3L13 4.7V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm5 .8V5h3.2z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.tree-empty { color: var(--muted); }
.tree [data-ext="gd"] .ti { color: #57b3ff; }
.tree [data-ext="gdshader"] .ti, .tree [data-ext="gdshaderinc"] .ti { color: #ff7085; }
.tree [data-ext="tscn"] .ti, .tree [data-ext="scn"] .ti { color: #8eef97; }
.tree [data-ext="tres"] .ti, .tree [data-ext="res"] .ti { color: #e8c87a; }
.tree [data-ext="godot"] .ti, .tree [data-ext="import"] .ti { color: #478cbf; }
.tree [data-ext="png"] .ti, .tree [data-ext="jpg"] .ti, .tree [data-ext="jpeg"] .ti, .tree [data-ext="webp"] .ti, .tree [data-ext="svg"] .ti { color: #c38ef1; }
.tree [data-ext="ogg"] .ti, .tree [data-ext="wav"] .ti, .tree [data-ext="mp3"] .ti { color: #ff9f5a; }
.tree [data-ext="json"] .ti, .tree [data-ext="cfg"] .ti, .tree [data-ext="ini"] .ti, .tree [data-ext="toml"] .ti, .tree [data-ext="yaml"] .ti, .tree [data-ext="yml"] .ti, .tree [data-ext="gdextension"] .ti { color: #ffeda1; }
.tree [data-ext="cs"] .ti { color: #a179dc; }
.tree [data-ext="csv"] .ti, .tree [data-ext="po"] .ti, .tree [data-ext="pot"] .ti, .tree [data-ext="translation"] .ti { color: #42ffc2; }
.tree [data-ext="ttf"] .ti, .tree [data-ext="otf"] .ti, .tree [data-ext="woff2"] .ti, .tree [data-ext="fnt"] .ti { color: #ff8ccc; }
.tree [data-ext="zip"] .ti, .tree [data-ext="pck"] .ti, .tree [data-ext="7z"] .ti { color: #c9a96b; }
.tree [data-ext="glb"] .ti, .tree [data-ext="gltf"] .ti, .tree [data-ext="obj"] .ti, .tree [data-ext="fbx"] .ti, .tree [data-ext="blend"] .ti { color: #ffb373; }

/* mod signing, the button is meant to look like it does something serious */
.sign-panel { margin: 1rem 0; padding: 14px 18px; background: var(--well); box-shadow: inset 0 3px 0 var(--edge); }
.sign-panel.needs { box-shadow: inset 0 3px 0 var(--edge), inset 3px 0 0 var(--apple); }
.sign-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sign-panel .help { margin: .6rem 0; }
.sign-file { margin: .7rem 0; }
.sign-path { margin: 0 0 .3rem; font: 600 13.5px var(--mono); color: var(--gold-text); }
.sign-hit { display: grid; grid-template-columns: 3.2rem 9.5rem minmax(0, 1fr); gap: .6rem; align-items: baseline; padding: .15rem 0; font-size: .85rem; }
.sign-line { text-align: right; color: var(--muted); font-family: var(--mono); }
.sign-name { color: var(--bad); font-weight: 600; overflow-wrap: anywhere; }
.sign-hit code { overflow-x: auto; white-space: pre; color: var(--text); opacity: .85; background: none; }
.sign-problems { margin: .5rem 0; padding-left: 1.2rem; color: var(--bad); font-size: .92rem; }
.sign-problems li { margin: .2rem 0; }
.sign-panel form { margin-top: .6rem; }
.sign-upload { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem; }
.sign-upload input[type=file] { flex: 1 1 260px; }
.sign-live-head { margin-top: 2.2rem; }
.btn.sign { color: #ffd2d8; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; font-weight: 600; background: repeating-linear-gradient(135deg, #4a1119 0 10px, #3a0d14 10px 20px); box-shadow: 0 3px 0 #1a0508; }
.btn.sign:hover:not(:disabled) { color: #fff; background: repeating-linear-gradient(135deg, #6b1622 0 10px, #551019 10px 20px); }
.btn.sign:disabled { opacity: .45; cursor: not-allowed; }
.btn.sign svg { width: 15px; height: 15px; fill: currentColor; stroke: none; flex-shrink: 0; }
.sign-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; background: var(--panel); color: var(--text); box-shadow: inset 0 3px 0 var(--apple), 0 4px 0 var(--edge), 0 24px 60px rgba(0, 0, 0, .5); }
.sign-dialog.unneeded { box-shadow: inset 0 3px 0 var(--gold), 0 4px 0 var(--edge), 0 24px 60px rgba(0, 0, 0, .5); }
.sign-dialog::backdrop { background: rgba(var(--veil), .66); }
.sign-dialog form { padding: 24px 24px 20px; }
.sign-dialog h3 { margin: .2rem 0 .7rem; font-size: 1.6rem; }
.sign-dialog p { margin: 0 0 .8rem; line-height: 1.55; color: var(--dim); }
.sign-kicker { margin: 0 !important; font: 13px var(--fell-sc) !important; letter-spacing: .08em; color: var(--bad) !important; }
.sign-dialog.unneeded .sign-kicker { color: var(--gold-text) !important; }
.sign-points { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.sign-points li { margin: .3rem 0; }
.sign-dialog label.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1.1rem; font-size: .95rem; }
.sign-dialog label.check input { margin-top: .25rem; }
.sign-dialog .actions { display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }

/* image popup */
.zoomable { cursor: zoom-in; }
[data-protect] img, .lightbox img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.slider[data-protect] { -webkit-user-select: none; user-select: none; }
html.lightbox-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 3.5rem 5rem; background: rgba(var(--veil), .92); -webkit-user-select: none; user-select: none; animation: lb-in .2s ease; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 0 var(--edge), 0 20px 60px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }
.lightbox img.ready { opacity: 1; }
.lightbox .slider-btn.prev { left: 1.2rem; } .lightbox .slider-btn.next { right: 1.2rem; }
.lightbox-close { top: 1rem; right: 1.2rem; margin-top: 0; }
.lightbox-close:hover { background: var(--apple); color: #f5ece0; }
.lightbox-close::before { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='M3 3l8 8M11 3l-8 8'/%3E%3C/svg%3E"); }
.lightbox-close::after { content: none; }
.lightbox-count { position: absolute; bottom: 1rem; left: 0; right: 0; margin: 0; text-align: center; color: var(--muted); font-size: .9rem; }
@keyframes lb-in { from { opacity: 0; } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--raise-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }
::-webkit-scrollbar-track { background: var(--panel); }

/* narrower screens keep the icons and drop the labels before anything wraps */
@media (max-width: 960px) and (min-width: 761px) {
  .topbar { gap: 12px; }
  .topnav-link { padding: 0 13px; }
  .topnav-link span:not(.nav-icon) { display: none; }
  .nav-icon { width: 22px; height: 22px; }
}

@media (max-width: 1120px) {
  .game-title { font-size: 62px; }
  .library-body { grid-template-columns: minmax(0, 500px) 1fr minmax(240px, 270px); padding-left: 44px; }
}

@media (max-width: 960px) {
  .library-body { grid-template-columns: 1fr; align-content: end; gap: 30px; padding: 120px 32px 32px; }
  .notes { grid-column: 1; max-height: none; max-width: 520px; }
  .library-shade { background: linear-gradient(0deg, rgba(var(--shade), .96) 0%, rgba(var(--shade), .7) 45%, rgba(var(--shade), 0) 75%); }
  .wiki { grid-template-columns: 1fr; gap: 1rem; }
  .wiki-side { position: static; max-height: none; overflow: visible; padding: 0; background: var(--panel); }
  .wiki-side > summary { display: block; padding: 10px 16px; cursor: pointer; color: var(--gold-text); font: 18px var(--fell); }
  .wiki-side[open] { padding-bottom: 12px; }
  .wiki-side > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .wiki-tabs { justify-content: flex-start; }
  .mod-layout { grid-template-columns: 1fr; }
  .mod-side { position: static; }
}

/* phones: the pages drop to a second row under the brand, theme and account */
@media (max-width: 760px) {
  :root { --bar: 104px; }
  .topbar { flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 0 10px 0 14px; }
  .brand { height: 56px; }
  .brand-sigil { width: 28px; height: 28px; }
  .wordmark { font-size: 18px; }
  .topbar-end { height: 56px; gap: 8px; }
  .topnav { order: 3; flex: 1 0 100%; height: 48px; margin: 0 -10px 0 -14px; padding: 0 4px; background: var(--well); box-shadow: inset 0 2px 0 var(--edge); overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav-link { flex: 1; justify-content: center; gap: 6px; padding: 0 10px; font-size: 13.5px; }
  .nav-icon { width: 17px; height: 17px; }
  .theme-seg button { padding: 0 8px; }
  .account { width: 34px; height: 34px; }
  .login-btn { height: 32px; padding: 0 12px; }
  .wrap { padding: 28px 16px 40px; }
  .flashbar { padding: 0 16px; }
  .orchard-head { height: 190px; }
  .orchard-intro { left: 16px; right: 16px; bottom: 20px; }
  .orchard-intro h1 { font-size: 42px; }
  .orchard-head::after { background: linear-gradient(90deg, rgba(var(--shade-2), .96) 0%, rgba(var(--shade-2), .8) 60%, rgba(var(--shade-2), .3) 100%); }
  .filters { position: static; padding: 12px 16px; }
  .filters .dd, .filters > .btn { flex: 1 1 calc(50% - 10px); }
  .search { flex-basis: 100%; }
  .mod-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 36px 16px; }
  .library { min-height: 0; }
  .scene { height: 380px; }
  .library-shade { background: linear-gradient(180deg, rgba(var(--shade), 0) 0, rgba(var(--shade), 0) 150px, rgba(var(--shade), .96) 300px, rgba(var(--shade), 1) 100%); }
  .library-body { padding: 250px 16px 24px; gap: 24px; }
  .game-title { font-size: 48px; }
  .btn.big, .btn.plate { min-width: 0; height: 52px; font-size: 24px; padding: 0 28px; }
  .post-row { grid-template-columns: 1fr; gap: 10px; }
  .post-row > div:not(.post-thumb) { padding-top: 0; }
  .row { grid-template-columns: 1fr; gap: .25rem; }
  .pair { grid-template-columns: 1fr; }
  .split { flex-direction: column; }
  .editor { grid-template-columns: 1fr; }
  .gate h1 { font-size: 36px; }
  .mobile-dl { display: flex; margin-top: 18px; }
  .mod-side .btn.big { display: none; }
  .sign-hit { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .sign-hit code { grid-column: 1 / -1; }
  .lightbox { padding: 3.5rem .5rem 3rem; }
  .lightbox .slider-btn { top: auto; bottom: .6rem; margin-top: 0; }
}

@media (max-width: 400px) {
  .wordmark { display: none; }
  .topnav-link { padding: 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
