:root {
  --shop: #1f1812;
  --wood: #3d2a1c;
  --resin: #8b3a22;
  --brass: #c4a35a;
  --kraft: #d4c4a0;
  --ink: #efe6d4;
  --mute: #a89880;
  --display: "Old Standard TT", "Noto Serif SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "Fira Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--shop);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.1;
  background-image: url("images/texture.webp");
  background-size: 360px auto;
  mix-blend-mode: multiply;
}
.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    var(--wood) 0 28px,
    var(--brass) 28px 32px,
    var(--resin) 32px 36px
  );
}
.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 12px;
  top: 16px;
  z-index: 80;
  background: var(--resin);
  color: #fff;
  padding: 8px;
}

.cabinet {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  background: rgba(31, 24, 18, 0.94);
  border-bottom: 3px solid var(--brass);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mute);
  font-weight: 400;
  letter-spacing: 0.14em;
}
.nav-toggle {
  display: none;
  background: var(--resin);
  color: #fff;
  border: 0;
  padding: 8px 14px;
}
.mg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 14px;
}
.mg-links a { color: var(--mute); }
.mg-links a.is-active,
.mg-links a:hover { color: var(--ink); }
.mg-links .live {
  background: var(--resin);
  color: #fff;
  padding: 6px 12px;
}

.hero { padding: 0; position: relative; z-index: 1; }
.hero > img {
  width: 100%;
  max-height: 40vh;
  min-height: 200px;
  object-fit: cover;
  object-position: 50% 55%;
}
.tag {
  width: min(700px, calc(100% - 40px));
  margin: -44px auto 0 8%;
  position: relative;
  z-index: 2;
  background: #2a1f16;
  border: 1px solid var(--brass);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
  padding: 18px 22px 20px 28px;
}
.tag::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--shop);
  box-shadow: inset 0 0 0 1px var(--brass);
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass);
  margin: 0 0 6px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 8px;
  line-height: 1.08;
  white-space: nowrap;
}
.lead { margin: 0 0 8px; }
.meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  margin: 0 0 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.resin {
  display: inline-block;
  padding: 9px 16px;
  border: 2px solid var(--resin);
  font-size: 15px;
}
.resin.fill { background: var(--resin); color: #fff; }
.resin.ghost { background: transparent; color: var(--brass); border-color: var(--brass); }

.shop { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0; position: relative; z-index: 1; }
.alt { background: #17120e; }
.vlabel {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0 0 8px;
}
h2 {
  font-family: var(--display);
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 0 0 12px;
}
.lede { color: var(--mute); max-width: 46em; margin: 0 0 24px; }
h3 { margin: 0 0 8px; font-size: 17px; color: var(--brass); }

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.bin {
  background: #2a1f16;
  padding: 16px;
  border-bottom: 6px solid var(--resin);
}
.bin:nth-child(2) { border-bottom-color: var(--brass); }
.bin:nth-child(3) { border-bottom-color: var(--kraft); }
.bin ul { margin: 0; padding-left: 1.1em; }
.bin li { margin: 0.3em 0; }

.steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.steps li {
  background: #2a1f16;
  padding: 14px 16px 14px 52px;
  position: relative;
}
.steps span {
  position: absolute;
  left: 12px;
  top: 14px;
  font-family: var(--mono);
  color: var(--brass);
  font-size: 13px;
}
.steps strong { display: block; margin-bottom: 4px; }
figure { margin: 0 0 24px; }
figure img { width: 100%; border: 1px solid var(--wood); }
figcaption { font-size: 13px; color: var(--mute); margin-top: 8px; }

.drawer-board {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
  background: #2a1f16;
  border: 1px dashed var(--brass);
}
.mono {
  font-family: var(--mono);
  font-size: 13px;
  margin: 0;
  color: var(--brass);
  grid-column: 1 / -1;
}
#dr-read { margin: 0; color: var(--mute); }

.tray-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.tray-btn {
  padding: 10px 18px;
  border: 1px solid var(--brass);
  background: #2a1f16;
  color: var(--ink);
  font-size: 14px;
}
.tray-btn.is-on {
  background: var(--resin);
  border-color: var(--resin);
  color: #fff;
}
.lock {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--brass);
  margin: 0 0 20px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.posts {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.posts li {
  background: #2a1f16;
  padding: 16px;
  border-left: 5px solid var(--resin);
}
.posts p { margin: 0; color: var(--mute); font-size: 14px; }
.edge { color: var(--mute); padding-left: 1.2em; }
.edge li { margin: 0.4em 0; }
.foot {
  padding: 24px 28px 48px;
  border-top: 8px solid var(--brass);
  color: var(--mute);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .cabinet { padding: 8px 12px; position: relative; top: 8px; }
  .nav-toggle { display: inline-block; }
  .mg-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--shop);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 12px;
  }
  .mg-links.open { display: flex; }
  .hero > img { min-height: 160px; max-height: 28vh; }
  .tag {
    width: calc(100% - 20px);
    margin: -28px auto 0;
    padding: 14px 14px 16px 24px;
  }
  h1 { font-size: 28px; }
  .lead {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .shop { width: calc(100% - 24px); padding: 36px 0; }
  .trio, .steps, .posts, .pair, .drawer-board {
    grid-template-columns: 1fr;
  }
}
