/* Sleighworks — invite and wiki.
   One visual world: a night sky over the pack's own materials (brass, planks, snow, candy-cane trim).
   Layout: a Minecraft-style title screen up top, then left-aligned reading sections in one column. */
:root {
  --night: #0e162c;      /* the pack icon's sky */
  --deep: #17223f;       /* raised panels, text fields */
  --frost: #eef3fb;      /* text, snow */
  --mist: #b3c0d6;       /* secondary text */
  --brass: #d6aa46;      /* frames, headings */
  --wood: #5c3a22;       /* button planks */
  --candy: #d62830;      /* candy-cane trim */
  --ink: #2b1a0e;        /* text on wood */
  --season: #e0782a;     /* maple in fall, ice in winter */
  --display: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mc-yellow: #ffff55;
  color-scheme: dark;
}
html[data-season="winter"] { --season: #9ad4f5; }
html[data-season="fall"] .winter-only, html[data-season="winter"] .fall-only { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--frost); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; font-variant-ligatures: no-common-ligatures; }
img { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #ffe38a; outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }
b, strong { font-weight: 700; }
kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; font: 500 14px/1.5 var(--display); text-align: center; color: #1c1c1c;
  background: #c6c6c6; border-radius: 2px; box-shadow: inset -2px -2px 0 #8b8b8b, inset 2px 2px 0 #f2f2f2, 0 0 0 1px #1c1c1c; }
code { font: 500 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--frost); color: var(--night); font-weight: 700; }
.skip:focus { top: 12px; }
.small { font-size: 15px; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 10px 20px;
  background: rgba(14, 22, 44, .94); border-bottom: 2px solid #23305a; }
.brand { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; font: 700 20px/1 var(--display); color: var(--brass); text-decoration: none; white-space: nowrap; }
.brand img { image-rendering: pixelated; }
.topbar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { padding: 6px 10px; font: 500 16px/1.2 var(--display); color: var(--mist); text-decoration: none; white-space: nowrap; border-radius: 2px; }
.topbar nav a:hover { color: var(--frost); background: #1d2a4c; }

/* ---------- title screen */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 680px; padding: 92px 20px 120px; display: grid; place-items: start center; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 44% 40% at 50% 46%, rgba(9, 14, 30, .62), rgba(9, 14, 30, 0) 72%); }
.scene { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; image-rendering: crisp-edges; image-rendering: pixelated; background: var(--night); }
.bossbar { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: min(380px, calc(100% - 40px)); text-align: center; }
.bossbar-text { font: 500 17px/1.3 var(--display); color: #55ffff; text-shadow: 2px 2px 0 #153f3f; }
.bossbar[data-color="red"] .bossbar-text { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
.bossbar[data-color="green"] .bossbar-text { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
.bossbar[data-color="purple"] .bossbar-text { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }
.bossbar[data-color="yellow"] .bossbar-text { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }
.bossbar-track { height: 10px; margin-top: 6px; background: #1b1b2a; box-shadow: 0 0 0 2px #05070f; }
.bossbar-fill { height: 100%; width: 0; background: linear-gradient(#5fd3ff 0 30%, #1f9fe0 30%); }
.bossbar[data-color="red"] .bossbar-fill { background: linear-gradient(#ff7a7a 0 30%, #d42a2a 30%); }
.bossbar[data-color="green"] .bossbar-fill { background: linear-gradient(#8cff8c 0 30%, #2fb52f 30%); }
.bossbar[data-color="purple"] .bossbar-fill { background: linear-gradient(#ff8cff 0 30%, #b52fb5 30%); }
.bossbar[data-color="yellow"] .bossbar-fill { background: linear-gradient(#ffff9a 0 30%, #d8c41c 30%); }
.bossbar[hidden] { display: none; }

.title-screen { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; max-width: 860px; text-align: center; }
.logo { position: relative; width: min(820px, 100%); margin-bottom: 14px; }
.logo h1 { line-height: 0; }
.wordmark { width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(4, 7, 16, .45)); }
html[data-season="fall"] .wm-winter, html[data-season="winter"] .wm-fall { display: none; }
.splash { position: absolute; right: -3%; top: 52%; padding: 0; border: 0; background: none; cursor: pointer;
  font: 700 clamp(15px, 2.3vw, 23px)/1 var(--display); color: var(--mc-yellow); text-shadow: 2px 2px 0 #3f3f15; white-space: nowrap;
  transform: rotate(-20deg); transform-origin: center; animation: splash .9s ease-in-out infinite alternate; }
@keyframes splash { from { transform: rotate(-20deg) scale(1); } to { transform: rotate(-20deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .splash { animation: none; } }
.invite { max-width: 44ch; font-size: 19px; line-height: 1.55; color: var(--frost); text-shadow: 0 2px 6px rgba(5, 8, 20, .9), 0 0 2px rgba(5, 8, 20, .9); }
.menu { display: flex; flex-direction: column; gap: 8px; width: min(400px, 100%); }
.menu-row { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 8px; }
.corner { position: absolute; bottom: 12px; margin: 0; padding: 3px 6px; font: 500 14px/1.35 var(--display); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; background: rgba(6, 10, 22, .42); }
.corner-left { left: 14px; text-align: left; }
.corner-right { right: 14px; text-align: right; }

/* ---------- the pack's buttons: nine-slice of the real in-game texture */
.mc { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-style: solid; border-width: 6px; border-image: url("../img/ui/button.png") 3 fill / 6px / 0 repeat;
  image-rendering: pixelated; background: none; color: #fff; font: 500 18px/1.1 var(--display); text-shadow: 2px 2px 0 #3f3f3f;
  text-decoration: none; cursor: pointer; user-select: none; }
.mc:hover, .mc:focus-visible { border-image-source: url("../img/ui/button_highlighted.png"); color: #ffffa0; }
.mc:active { transform: translateY(1px); }
.mc-wide { width: 100%; }
.mc-square { padding: 0; min-width: 48px; }
.mc-square img { width: 28px; height: 28px; image-rendering: pixelated; }
.mc-small { min-height: 36px; padding: 0 12px; font-size: 16px; border-width: 4px; border-image-width: 4px; }
.mc.is-disabled, .mc:disabled { border-image-source: url("../img/ui/button_disabled.png"); color: #a8acb6; cursor: not-allowed; transform: none; }

/* ---------- sections */
.section { max-width: 1120px; margin: 0 auto; padding: 84px 20px; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; }
.section h2 { font: 700 clamp(28px, 4vw, 36px)/1.15 var(--display); color: var(--brass); letter-spacing: .3px; }
.lede { max-width: 64ch; color: var(--mist); font-size: 18px; }

/* ---------- join: a container screen in light wood */
.join { max-width: 980px; padding-top: 72px; }
.panel { position: relative; padding: 40px clamp(18px, 4vw, 44px) 36px; color: var(--ink);
  background: linear-gradient(rgba(246, 226, 188, .42), rgba(246, 226, 188, .42)), #c49864 url("../img/ui/wood_light.png") 0 0 / 128px 64px; image-rendering: pixelated;
  box-shadow: 0 0 0 4px #24140a, inset 4px 4px 0 rgba(255, 238, 200, .35), inset -4px -4px 0 rgba(60, 30, 10, .35), 0 18px 40px rgba(0, 0, 0, .45); }
.panel::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 12px; background: url("../img/ui/snow_edge.png") 0 0 / 128px 12px repeat-x; }
html[data-season="fall"] .panel::before { background-image: url("../img/ui/leaf_edge.png"); }
.panel a:not(.mc) { color: #6e1f0c; }
.panel-head { display: grid; gap: 6px; margin-bottom: 22px; }
.panel h2 { color: var(--ink); text-shadow: 2px 2px 0 rgba(255, 236, 196, .55); }
.pack-line { font-weight: 500; }
.invite-box { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 18px 20px; margin-bottom: 8px;
  background: #f6edd7; border: 2px solid #8a6438; box-shadow: 3px 3px 0 rgba(40, 20, 6, .35); }
.invite-box[hidden] { display: none; }
.invite-box p + p { margin-top: 8px; }
.invite-icon { width: 48px; height: 48px; image-rendering: pixelated; }
.code-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.code-form label { font-weight: 700; }
.code-form .field { flex: 1 1 220px; }
.form-note { margin-top: 10px; color: #8d1212; font-weight: 700; }
.preview-note { margin: 4px 0 8px; font-size: 15px; font-style: italic; }
.field { min-height: 40px; padding: 6px 10px; font: 500 16px/1.2 var(--body); color: var(--frost); background: var(--deep);
  border: 2px solid var(--brass); border-radius: 0; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .35); }
.field::placeholder { color: #8292ae; }
.field:focus { outline: none; border-image: repeating-linear-gradient(45deg, var(--candy) 0 6px, #f8f4ec 6px 12px) 2; }
.field:disabled { color: #8a96ab; border-color: #6b7386; }
.status-up { color: #1d6b25; font-weight: 700; }
.status-down { color: #8d1212; font-weight: 700; }
.invite-box code { padding: 1px 6px; background: #fffaf0; border: 1px solid #b89766; word-break: break-all; }
.copy { margin-left: 4px; padding: 3px 10px; font: 700 14px/1.4 var(--body); color: var(--ink); background: #ead9b4; border: 2px solid #8a6438; cursor: pointer; }
.copy:hover { background: #f6edd7; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 26px; margin: 26px 0 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; display: grid; gap: 10px; padding-left: 76px; min-height: 60px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 56px; height: 56px; display: grid; place-items: end;
  padding: 0 7px 3px 0; font: 700 26px/1 var(--display); color: #fff; text-shadow: 3px 3px 0 #3f3f3f;
  background: #6b4a2f; box-shadow: inset 3px 3px 0 #3b2414, inset -3px -3px 0 #a57c52; }
.steps h3 { font: 700 21px/1.25 var(--body); }
.steps p { max-width: 66ch; }
.steps .dl-row { max-width: 420px; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.code-row code { padding: 6px 10px; background: #fffaf0; border: 2px solid #8a6438; }
.server-info { display: grid; gap: 6px; max-width: 460px; padding: 18px 22px 22px; margin: 4px 0;
  background: var(--night) radial-gradient(circle at 20% 10%, #1b2a52 0, transparent 60%); box-shadow: 0 0 0 4px #24140a; }
.server-info-title { margin-bottom: 6px; text-align: center; font: 500 17px/1.2 var(--display); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.server-label { font: 500 15px/1.2 var(--display); color: #a0a0a0; }
.server-info .field { width: 100%; }
.address-row { display: flex; gap: 8px; }
.address-row .field { flex: 1; min-width: 0; }
.update-note { margin-top: 28px; padding-top: 18px; border-top: 2px dashed rgba(43, 26, 14, .35); max-width: 70ch; font-size: 15px; }

/* ---------- what we added */
.group-title { display: flex; align-items: center; gap: 10px; margin: 46px 0 18px; font: 500 23px/1.2 var(--display); color: var(--frost); }
.group-title:first-of-type { margin-top: 0; }
.group-title::before { content: ""; width: 12px; height: 12px; background: var(--brass); box-shadow: 2px 2px 0 #6b4614; }
.group-title.fall-mark::before { background: #e0782a; box-shadow: 2px 2px 0 #7a3410; }
.group-title.winter-mark::before { background: #9ad4f5; box-shadow: 2px 2px 0 #2d5e86; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 26px 40px; }
.feature { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.feature h4 { margin-bottom: 6px; font: 700 19px/1.3 var(--body); color: var(--frost); }
.feature p { color: #d3dceb; font-size: 16px; }
.feature p + p { margin-top: 8px; }
.slot { display: grid; place-items: center; width: 64px; height: 64px; background: #6b4a2f; box-shadow: inset 3px 3px 0 #3b2414, inset -3px -3px 0 #a57c52; }
.slot img { width: 48px; height: 48px; image-rendering: pixelated; }
.tag-line { font-size: 15px; }
.tag { display: inline-block; margin-right: 6px; padding: 0 8px; font: 500 14px/1.6 var(--display); color: var(--night); background: var(--brass); }
.disc-list { font-size: 15px; font-style: italic; color: var(--mist) !important; }
.little { columns: 2 340px; column-gap: 44px; margin: 0; padding: 0; list-style: none; }
.little li { break-inside: avoid; position: relative; margin-bottom: 14px; padding-left: 22px; color: #d3dceb; font-size: 16px; }
.little li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--season); box-shadow: 2px 2px 0 rgba(0, 0, 0, .4); }

/* ---------- dates */
.timeline { list-style: none; display: grid; gap: 14px; max-width: 820px; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 86px 1fr; gap: 20px; align-items: start; padding: 10px; border: 2px solid transparent; }
.timeline .day { display: grid; text-align: center; background: #f6edd7; box-shadow: 0 0 0 2px #24140a, 3px 3px 0 2px rgba(0, 0, 0, .4); }
.timeline .mon { padding: 2px 4px; font: 500 14px/1.4 var(--display); color: #fff; background: var(--candy); }
.timeline .num { padding: 4px 4px 6px; font: 700 24px/1.1 var(--display); color: var(--ink); }
.timeline h3 { margin: 2px 0 4px; font: 700 19px/1.3 var(--body); }
.timeline p { color: #d3dceb; }
.timeline .is-big .mon { background: #2f7fb5; }
.timeline .is-past { opacity: .5; }
.timeline .is-now { border-color: var(--season); background: rgba(255, 255, 255, .03); }
.timeline .is-now h3::after { content: "Now"; margin-left: 10px; padding: 0 8px; font: 500 13px/1.6 var(--display); color: var(--night); background: var(--season); vertical-align: 3px; }
.clock { margin-top: 8px; font: 500 18px/1.4 var(--display); color: #55ffff; text-shadow: 2px 2px 0 #153f3f; }
.aside { margin-top: 24px; color: var(--mist); }

/* ---------- mods */
.mod-tools { display: grid; gap: 14px; margin-bottom: 18px; }
#mod-search { width: min(460px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; font: 500 15px/1.2 var(--display); color: var(--frost); background: #2a1c12 url("../img/ui/button.png") center / 400px 40px;
  border: 2px solid #24140a; box-shadow: inset 0 0 0 2px var(--brass); cursor: pointer; }
.chip span { color: #f3cf7a; margin-left: 4px; }
.chip:hover { color: #ffffa0; }
.chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--candy), inset 0 0 0 4px #f8f4ec; color: #ffffa0; }
.mod-count { margin-bottom: 8px; color: var(--mist); font-size: 15px; }
.mod-group { margin-top: 30px; }
.mod-group > h3 { display: flex; align-items: baseline; gap: 10px; font: 500 22px/1.2 var(--display); color: var(--frost); }
.mod-group > h3 .count { font: 700 15px/1 var(--body); color: #f3cf7a; }
.mod-group > p { margin: 4px 0 14px; color: var(--mist); font-size: 15px; }
.mods { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 10px 26px; margin: 0; padding: 0; }
.mod { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 6px 0; }
.mod-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #6b4a2f; box-shadow: inset 2px 2px 0 #3b2414, inset -2px -2px 0 #a57c52;
  font: 700 18px/1 var(--display); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.mod-icon img { width: 34px; height: 34px; border-radius: 3px; }
.mod-name { font-weight: 700; color: var(--frost); text-decoration: none; }
a.mod-name:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.mod-side { display: inline-block; margin-left: 6px; padding: 0 6px; font: 500 12px/1.6 var(--display); vertical-align: 2px; color: var(--night); background: #9ad4f5; }
.mod-side.server { background: #8fe28f; }
.mod-why { color: #cbd5e6; font-size: 15px; line-height: 1.45; }
.mods.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 6px 20px; }
.mods.compact .mod { grid-template-columns: 30px 1fr; align-items: center; padding: 2px 0; }
.mods.compact .mod-icon { width: 30px; height: 30px; font-size: 13px; }
.mods.compact .mod-icon img { width: 22px; height: 22px; }
.mods.compact .mod-name { font-weight: 500; font-size: 15px; }
.mod-empty { padding: 18px 0; color: var(--mist); }
.mod-empty button { margin-left: 6px; }
.left-out { margin-top: 56px; padding: 22px 24px; background: var(--deep); box-shadow: 0 0 0 2px #2a3a66; max-width: 820px; }
.left-out h3 { font: 500 22px/1.2 var(--display); color: var(--frost); margin-bottom: 6px; }
.left-out p { color: var(--mist); }
.left-out ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; color: #d3dceb; }

/* ---------- help */
.help-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 48px; align-items: start; }
.keys h3 { font: 500 22px/1.2 var(--display); margin-bottom: 12px; }
.keys table { width: 100%; border-collapse: collapse; }
.keys th, .keys td { padding: 7px 0; border-bottom: 1px solid #24315a; text-align: left; font-weight: 400; }
.keys th { color: #d3dceb; }
.keys td { text-align: right; white-space: nowrap; }
.faq { margin: 0; display: grid; gap: 6px; max-width: 66ch; }
.faq dt { margin-top: 14px; font-weight: 700; font-size: 18px; color: var(--frost); }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: 0; color: #cbd5e6; }

/* ---------- footer + chat */
.footer { max-width: 1120px; margin: 0 auto; padding: 36px 20px 56px; border-top: 2px solid #1f2b4f; color: var(--mist); display: grid; gap: 8px; }
.footer img { vertical-align: -3px; image-rendering: pixelated; }
.chat { position: fixed; left: 14px; bottom: 14px; z-index: 40; display: grid; gap: 4px; max-width: min(620px, calc(100% - 28px)); pointer-events: none; }
.chat-line { padding: 5px 10px; background: rgba(0, 0, 0, .62); font: 500 16px/1.35 var(--display); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; transition: opacity .6s; }
.chat-line .aqua { color: #55ffff; }
.chat-line .gold { color: #ffaa00; }
.chat-line.fade { opacity: 0; }

/* ---------- small screens */
@media (max-width: 760px) {
  .topbar { gap: 12px; padding: 8px 12px; }
  .brand { font-size: 18px; }
  .hero { min-height: 0; padding: 84px 16px 110px; }
  .invite { font-size: 17px; }
  .corner { font-size: 12px; }
  .corner-right { display: none; }
  .splash { right: 0; top: 74%; font-size: clamp(12px, 3.6vw, 16px); }
  .logo { margin-bottom: 22px; }
  .section { padding: 64px 16px; }
  .help-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps > li { padding-left: 0; padding-top: 0; }
  .steps > li::before { position: static; width: 44px; height: 44px; font-size: 21px; }
  .invite-box { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 70px 1fr; gap: 14px; padding: 6px; }
  .timeline .num { font-size: 20px; }
}
