:root {
  color-scheme: dark;
  --ink: #e6dbc6;
  --muted: #b6ad9b;
  --amber: #f4c277;
  --line: #7d6b494d;
  --text-shadow: 0 1px 1px #100e0de6, 0 0 4px #100e0db3;
  --mono: "Cascadia Code", Consolas, monospace;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-padding-top: 20px; }
body { margin: 0; color: var(--ink); background: #171410; font: 14px/1.65 "Trebuchet MS", "Segoe UI", sans-serif; text-shadow: var(--text-shadow); }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: #171410; }
.background-elevator { position: fixed; left: 50%; top: 50%; width: min(1280px, 100vw); aspect-ratio: 1280 / 550; transform: translate(-50%, -50%); z-index: -1; pointer-events: none; background: url("/workshop-background.png") center / 100% 100% no-repeat; }
.background-elevator::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0c0c0bc4, #18130ddd); }
.background-elevator img { position: absolute; left: 47.1875%; top: 3%; width: 5.625%; height: 4.363636%; animation: elevator-travel 16s ease-in-out infinite alternate; }
@keyframes elevator-travel { from { top: 3%; } to { top: 91%; } }
@media (min-width: 1301px) {
  .background-elevator { left: calc(50% + 530px + (100vw - 1060px) / 4); }
}
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: #fff0ca; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
h1 { font: bold clamp(25px, 3vw, 34px)/1.2 Georgia, serif; color: #f5e4bd; margin: 8px 0 16px; }
h2 { font: bold 24px/1.25 Georgia, serif; color: #e9c78e; margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 8px; }
p + p { margin-top: 12px; }
::selection { color: #171410; background: var(--amber); }
.skip-link, ::selection { text-shadow: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 10px; background: var(--amber); color: #171410; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.shell { width: min(1060px, calc(100% - 48px)); margin-inline: auto; }
.mine-site { margin-block: 32px 20px; }
.panel { border: 24px solid transparent; border-image: url("/art/ui/panel.png") 52 / 24px repeat; background: #202026 url("/art/ui/panel-texture.png") repeat; background-size: 140px 62px; background-clip: padding-box; }
.panel-forge { border-image-source: url("/art/ui/forge-panel.png"); border-image-slice: 88; background-image: url("/art/ui/forge-panel-texture.png"); background-size: 81px 28px; }
.button, .menu-toggle { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 5px 8px; border: solid transparent; border-width: 14px 28px; border-image: url("/art/ui/button.png") 20 40 / 14px 28px repeat; background: #26262d url("/art/ui/button-texture.png") repeat; background-size: 62px 8px; background-clip: padding-box; font: bold 12px/1.35 var(--mono); text-align: center; text-decoration: none; color: #e5d8c3; text-shadow: 0 2px #000; }
.button:hover, .button-amber, .menu-toggle[aria-expanded="true"] { border-image-source: url("/art/ui/button-active.png"); background-image: url("/art/ui/button-active-texture.png"); color: #ffe2a7; }
.button:hover { filter: brightness(1.15); }
.button[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.masthead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; min-height: 155px; padding: 0 0 12px 26px; gap: 24px; background: linear-gradient(90deg, #201b12, transparent); }
.masthead.panel { border-width: 18px; border-image-width: 18px; background: #24221e url("/art/ui/forge-panel-texture.png") repeat; background-size: 81px 28px; background-clip: padding-box; }
.eyebrow { font: 10px/1.5 var(--mono); color: #c4a46d; letter-spacing: 1.2px; }
.wordmark { display: inline-block; max-width: 100%; font: bold clamp(28px, 5vw, 48px)/1.2 Georgia, serif; letter-spacing: 2px; color: #f0d299; text-decoration: none; text-shadow: 3px 3px #070706; }
.brand-logo { width: 125px; height: auto; object-fit: contain; }
.masthead-content, .credits-nav > div { display: flex; align-items: flex-end; gap: 30px; }
.masthead-content { align-self: stretch; align-items: center; }
.masthead .game-version { align-self: flex-end; margin-bottom: -8px; }
.masthead .wordmark { display: block; width: min(90%, 680px); min-width: 0; flex: 0 1 680px; }
.masthead .brand-logo { width: 100%; }
.game-version { flex-shrink: 0; color: var(--muted); font: 12px/1.5 var(--mono); letter-spacing: 0; white-space: nowrap; }
.lamp-light { position: relative; display: inline-block; }
.lamp-light::after { content: ""; position: absolute; inset: 0; background: url("/art/ui/lantern-light.png") center / 100% 100% no-repeat; filter: drop-shadow(0 0 5px #fff3bd) drop-shadow(0 0 16px #ffc15a) drop-shadow(0 0 36px #ff9518bb); pointer-events: none; }
.hanging-lantern { position: absolute; width: 58px; top: -22px; right: 24px; }
.hanging-lantern > img { clip-path: inset(16% 0 60.8%); }
.hanging-lantern::before { content: ""; position: absolute; left: 50%; top: 75%; width: 20px; height: 20px; transform: translate(-50%, -50%); border-radius: 50%; background: #b054ff33; box-shadow: 0 0 60px 35px #b054ff55, 0 0 120px 80px #be5aff33, 0 0 210px 130px #be5aff1c; pointer-events: none; }
.hanging-lantern::after { filter: hue-rotate(235deg) drop-shadow(0 0 6px #eec8ff) drop-shadow(0 0 22px #b054ff) drop-shadow(0 0 48px #be5affdd) drop-shadow(0 0 90px #be5aff77); }
.hanging-lantern::before, .hanging-lantern::after { animation: lantern-flicker 3s ease-in-out infinite; }
@keyframes lantern-flicker {
  0%, 100% { opacity: 1; }
  24% { opacity: .55; }
  48% { opacity: 1; }
  72% { opacity: .4; }
  88% { opacity: .9; }
}
.nav-inner { position: relative; padding: 6px 18px 0; }
nav { display: flex; gap: 6px; }
nav .button { flex: 1; }
.menu-toggle { display: none; }
.station-body { margin-top: -2px; padding: 10px 18px 22px; }
.station-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line); font: 10px/1.6 var(--mono); color: var(--muted); }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: #edb34d; box-shadow: 0 0 6px #ffae39; }
.station-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 32px; align-items: start; }
.main-column, .station-sidebar { min-width: 0; }
.welcome p:not(.eyebrow) { color: #d2c8b5; }
.text-link { display: inline-block; margin-top: 16px; font-weight: bold; }
.mine-map { margin-top: 26px; padding: 0 4px 6px; border-width: 18px; border-image-width: 18px; position: relative; overflow: hidden; }
.map-heading { display: flex; justify-content: space-between; gap: 8px; font: 9px/1.5 var(--mono); color: #c9b086; }
.world-art { width: 100%; height: auto; margin: 12px 0; }
figcaption { font: 10px/1.5 var(--mono); color: var(--muted); position: relative; }
.station-section { margin-top: 30px; padding-top: 24px; border-top: 2px solid var(--line); }
.mine-inventory { margin: 0; }
.mine-inventory > div { display: grid; grid-template-columns: 165px 1fr; gap: 18px; padding-block: 12px; border-bottom: 1px dotted var(--line); }
.mine-inventory dt { display: flex; align-items: center; gap: 10px; font-weight: bold; font-size: 12px; }
.mine-inventory dd { margin: 0; color: var(--muted); font-size: 13px; }
.item-slot { display: flex; align-items: center; justify-content: center; width: 44px; height: 50px; flex-shrink: 0; background: url("/art/ui/slot.png") center / 44px 44px no-repeat; }
.item-slot img { max-height: 38px; width: auto; max-width: 30px; }
.player-greeting { position: relative; cursor: help; }
.player-bubble { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 2; width: 210px; padding: 10px 12px; border: 2px solid #a48651; background: #211c16; color: var(--ink); font: 12px/1.5 var(--mono); box-shadow: 3px 3px #100e0db3; visibility: hidden; opacity: 0; pointer-events: none; }
.player-bubble::after { content: ""; position: absolute; left: 16px; top: 100%; border: 6px solid transparent; border-top-color: #a48651; }
.player-greeting:hover .player-bubble, .player-greeting:focus .player-bubble { visibility: visible; opacity: 1; }
.section-note { color: var(--muted); font-size: 12px; margin-top: -6px; margin-bottom: 18px; }
.work-log article { position: relative; border-left: 3px solid #74603a; padding: 0 0 0 14px; margin-bottom: 22px; }
.log-label { font: 9px/1.5 var(--mono); color: var(--amber); }
.work-log h3 { margin-top: 4px; }
.work-log article p { font-size: 13px; color: var(--muted); }
.unfinished { border-top: 1px dashed var(--line); padding-top: 14px; font-size: 12px; color: #bba98c; }
.download-card { padding: 8px 0; border-width: 18px; border-image-width: 18px; }
.download-card h2 { margin: 8px 0 12px; }
.download-card > p { font-size: 12px; color: var(--muted); }
.button-download { width: 100%; margin-block: 16px 8px; border-width: 14px 20px; border-image-width: 14px 20px; }
.release-meta { font: 10px/1.6 var(--mono); }
.download-card h3 { margin-top: 22px; font-size: 13px; color: #d8c39c; }
.install-steps { padding-left: 18px; margin: 10px 0 18px; font-size: 12px; color: var(--muted); }
.install-steps li { padding: 4px 0; }
.build-warning { border-top: 1px dashed var(--line); padding-top: 12px; }
code { font: .9em var(--mono); overflow-wrap: anywhere; }
details { border-bottom: 1px solid var(--line); padding-block: 12px; }
summary { cursor: pointer; color: #dcc69f; font-size: 13px; }
details p { color: var(--muted); font-size: 12px; margin-top: 12px; }
.checksum { margin-top: 8px; border-bottom: 0; }
.checksum summary { font-size: 11px; }
.checksum code { display: block; font-size: 10px; color: var(--muted); margin-top: 10px; }
.shift-notes { padding: 22px 10px 0; }
.notes-heading { display: flex; align-items: center; gap: 10px; }
.notes-heading h2 { font-size: 19px; margin: 0; }
.shift-notes ul { padding-left: 16px; font-size: 12px; color: var(--muted); }
.shift-notes li { padding-block: 5px; }
.scribble { font: italic 14px/1.5 Georgia, serif; color: #c3a974; transform: rotate(-2deg); margin-top: 16px; }
.guide-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; }
.controls h3 { font-size: 14px; }
.controls dl { margin: 0; font-size: 12px; }
.controls dl > div { display: grid; grid-template-columns: 110px 1fr; padding-block: 6px; border-bottom: 1px dotted var(--line); gap: 10px; }
.controls dd { margin: 0; color: var(--muted); }
kbd { display: inline-block; border: 1px solid #65573f; background: #181713; padding: 0 4px; font: 11px/1.7 var(--mono); box-shadow: 0 2px #090908; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 18px 24px; font: 10px/1.6 var(--mono); color: #a7987f; }
.credits-page { padding-block: 30px; max-width: 820px; }
.credits-panel { padding: 20px; }
.credits-panel h2 { margin-top: 28px; }
.credits-panel p { color: var(--muted); margin-top: 16px; }
.credits-panel .button { margin-top: 24px; }
.credits-page .eyebrow { margin-bottom: 12px; }
.credits-nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; }
.credits-nav .wordmark { font-size: 28px; }
@media (max-width: 900px) {
  .station-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; }
  .station-body { padding-inline: 8px; }
  .mine-inventory > div { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 800px) {
  .shell { width: calc(100% - 24px); }
  .mine-site { margin-top: 12px; }
  .masthead { grid-template-columns: minmax(0, 1fr) 100px; min-height: 134px; padding-left: 0; gap: 14px; padding-right: 0; }
  .masthead-content { padding-right: 0; }
  .masthead .account-bar { grid-column: 2; justify-self: end; width: 100px; margin-top: 88px; }
  .hanging-lantern { width: 44px; top: -18px; right: 14px; }
  .wordmark { font-size: clamp(24px, 6vw, 40px); letter-spacing: 1px; }
  .nav-inner { padding-inline: 0; }
  .menu-toggle { display: flex; width: 100%; }
  nav { display: none; }
  nav.is-open { display: grid; grid-template-columns: 1fr 1fr; padding-top: 6px; }
  .station-layout { grid-template-columns: 1fr; }
  .station-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .station-body { border-width: 18px; border-image-width: 18px; padding: 10px; }
  .mine-inventory > div { grid-template-columns: 160px 1fr; gap: 12px; }
  .guide-layout { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 540px) {
  .masthead-content, .credits-nav > div { gap: 14px; }
  .station-sidebar { grid-template-columns: 1fr; }
  .station-body { padding-inline: 2px; }
  .mine-inventory > div { grid-template-columns: 1fr; gap: 8px; }
  .map-heading { flex-direction: column; gap: 2px; }
  .mine-map { border-width: 14px; border-image-width: 14px; }
  .station-status { font-size: 9px; }
  .masthead { gap: 9px; }
  .credits-panel { padding: 10px 4px; }
  .credits-nav { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.masthead-content { min-width: 0; }
.account-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 88px; font-size: 12px; }
.account-bar > button:not(.button), .forum-action { border: 1px solid #8d724b; background: #211d18; color: var(--amber); padding: 6px 10px; font-size: 12px; }
.account-bar > .button { width: 100%; min-height: 38px; border-width: 10px 18px; border-image-width: 10px 18px; padding: 3px 2px; font-size: 10px; }
.account-status { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
dialog { color: var(--ink); max-width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; padding: 18px; }
dialog::backdrop { background: #100e0dcc; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading button { border: 0; background: none; font-size: 25px; }
.account-form label, .post-form label, dialog label { display: grid; gap: 6px; margin-block: 12px; color: var(--muted); }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #8d724b; background: #171510; color: var(--ink); font: inherit; padding: 10px; border-radius: 0; }
textarea { resize: vertical; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px; }
.account-form p, .post-form > p { font-size: 12px; color: var(--muted); }
.account-error, .forum-error { color: #ffc0a4 !important; overflow-wrap: anywhere; }
.forum-nav { display: flex; flex-wrap: wrap; padding: 6px; }
.forum-nav > * { flex: 1; }
.forum-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.forum-policy { font-size: 12px; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#forum-message:not(:empty) { margin-bottom: 16px; padding: 10px; border: 1px solid #8d724b; }
#forum-view { padding-top: 20px; }
.forum-categories { margin-block: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.forum-categories > div { border-bottom: 1px solid var(--line); padding-block: 14px; }
.forum-categories a { font-weight: bold; }
.forum-categories p, .topic-row p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.forum-search { margin-bottom: 16px; }
.topic-row { padding-block: 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.topic-row a { font-size: 16px; }
.forum-post { border: 1px solid #6c593d; background: #17151066; padding: 18px; margin-block: 16px; overflow-wrap: anywhere; }
.post-meta { font: 11px/1.6 var(--mono); color: var(--muted); margin-bottom: 12px; }
.role-badge { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid #8d724b; color: var(--muted); font: 10px/1.6 var(--mono); }
.role-developer { color: #b9dfae; border-color: #71935e; }
.role-moderator { color: #b3d7ed; border-color: #668a9c; }
.role-admin { color: var(--amber); border-color: #cf9947; }
.role-management { margin-block: 20px; }
.post-body { white-space: pre-wrap; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.post-images { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.post-images img { max-width: min(100%, 360px); max-height: 280px; object-fit: contain; image-rendering: auto; }
.post-images a { min-width: 0; max-width: 100%; }
.hidden-post { border-style: dashed; opacity: .8; }
.post-form { margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--line); }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 540px) {
  .forum-categories { grid-template-columns: 1fr; }
  .forum-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .forum-post { padding: 10px; }
}
