:root {
  --paper: #f6f1e7;
  --card: #fffdf8;
  --ink: #2b1d12;
  --muted: #6e5a48;
  --line: #e2d6c3;
  --walnut: #3b2414;
  --wood: #9a6232;
  --brass: #b8862f;
  --brass-soft: #f3e4c2;
  --good: #2f7a4a;
  --bad: #a63a2a;
  --render: #f4f1ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17110c; --card: #211810; --ink: #f1e7d8; --muted: #bba68f; --line: #3a2c1f;
    --walnut: #0f0a06; --wood: #c48a4f; --brass: #d8a94a; --brass-soft: #3a2b12; --good: #6cc48b; --bad: #ec8b7a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.6 "Source Sans 3", system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wood); }
a:hover { color: var(--brass); }
h1, h2, h3 { font-family: "Cinzel", Georgia, serif; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }

/* header */
.top { background: var(--walnut); color: #f3e7d3; border-bottom: 3px solid var(--brass); }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #f3e7d3; text-decoration: none; font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 1.15rem; }
.brand em { font-style: normal; color: #e5bd68; }
.brand:hover { color: #fff; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a { color: #f3e7d3; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.nav a:hover, .nav a.on { background: rgba(229, 189, 104, .16); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: transparent; color: #f3e7d3; border: 1px solid rgba(243, 231, 211, .4); border-radius: 6px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 640px) {
  .top-row { gap: 10px; }
  .brand { font-size: .98rem; gap: 8px; flex: 1 1 auto; min-width: 0; }
  .brand img { width: 28px; height: 28px; }
  .menu-btn { display: block; padding: 6px 12px; flex: none; }
  .nav { order: 3; width: 100%; flex-direction: column; margin: 0 0 12px; max-height: 0; overflow: hidden; transition: max-height .2s; }
  .nav.open { max-height: 300px; }
  .nav a { padding: 12px; border-top: 1px solid rgba(243, 231, 211, .12); border-radius: 0; }
}

/* hero */
.hero { background: linear-gradient(180deg, var(--walnut) 0, #4a2e19 100%); color: #f3e7d3; padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.2rem; color: #e9dcc7; max-width: 34em; }
.hero-img { border-radius: 14px; overflow: hidden; border: 2px solid rgba(229, 189, 104, .5); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); background: var(--render); }
.eyebrow { font-family: "Cinzel", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: #e5bd68; margin-bottom: 10px; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } .hero { padding: 32px 0 40px; } }

.btn { display: inline-block; background: var(--brass); color: #1d1207; border: 0; border-radius: 8px; padding: 12px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #d8a94a; color: #1d1207; }
.btn.ghost { background: transparent; color: inherit; border: 2px solid currentColor; }
.btn.ghost:hover { background: rgba(229, 189, 104, .14); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* sections */
.section { padding: 56px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .three { grid-template-columns: 1fr; } }
.feature h3 { color: var(--wood); }

/* box cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(59, 36, 20, .16); color: inherit; }
.card .img { background: var(--render); aspect-ratio: 4 / 3; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px 18px 20px; }
.card h3 { margin-bottom: 6px; }
.card.soon { border-style: dashed; justify-content: center; align-items: center; text-align: center; padding: 28px; min-height: 260px; color: var(--muted); }
.card.soon .gear { width: 64px; height: 64px; margin: 0 auto 14px; opacity: .55; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--brass-soft); color: var(--wood); margin-bottom: 8px; }
.tag.available { background: rgba(47, 122, 74, .14); color: var(--good); }

/* box page */
.box-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .box-grid { grid-template-columns: 1fr; } }
.gallery .main { background: var(--render); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--render); cursor: pointer; aspect-ratio: 4 / 3; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.on { border-color: var(--brass); }
.caption { margin-top: 8px; }
.facts { width: 100%; border-collapse: collapse; margin: 8px 0 22px; }
.facts th, .facts td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 38%; color: var(--muted); font-weight: 600; padding-right: 12px; }
.price { font-family: "Cinzel", Georgia, serif; font-size: 1.6rem; font-weight: 700; color: var(--wood); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-top: 8px; }
.story p { font-size: 1.05rem; }

/* forms */
form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--wood); }
.note { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.note.good { background: rgba(47, 122, 74, .12); color: var(--good); }
.note.bad { background: rgba(166, 58, 42, .12); color: var(--bad); }
.hp { position: absolute; left: -9999px; }

/* the hidden solution link */
.secret { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; text-decoration: none; opacity: .7; }
.secret:hover { opacity: 1; color: var(--wood); }
.secret svg { width: 14px; height: 14px; }

/* admin */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
@media (max-width: 700px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-grid .wide { grid-column: 1 / -1; }

/* footer */
.foot { background: var(--walnut); color: #d9c9b1; padding: 30px 0; margin-top: 0; border-top: 3px solid var(--brass); }
.foot a { color: #e5bd68; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.foot p { margin: 0; }

.center { text-align: center; }
.narrow { max-width: 640px; margin: 0 auto; }
@media (max-width: 360px) {
  .brand { font-size: .84rem; letter-spacing: 0; }
  .brand img { width: 24px; height: 24px; }
  .menu-btn { padding: 5px 10px; }
}
