:root {
  --ink: #161914;
  --ink-2: #23281f;
  --paper: #f4efe6;
  --paper-2: #fffdf8;
  --line: #e3d8c8;
  --cinnabar: #8e261e;
  --gold: #a6843d;
  --gold-2: #e4c98a;
  --gold-ink: #7a5e28;
  --text: #1c2118;
  --muted: #5e675c;
  --cream: #f6f1e8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 12px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }

.notice {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 9px 16px;
  font-size: 13px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cinnabar);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1.5px var(--gold), inset 0 0 0 5px var(--paper-2), inset 0 0 0 6.5px var(--gold);
}
.brand strong { display: block; font-size: 14px; letter-spacing: 0.06em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.nav nav a:not(.btn):hover { color: var(--cinnabar); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--cinnabar);
  color: #fffaf3;
  border: 1px solid var(--cinnabar);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); background: #7c2019; }
.btn-sm { padding: 9px 14px; }
.btn.is-off, .btn.is-off:hover {
  background: #e9e1d3;
  border-color: #e9e1d3;
  color: var(--muted);
  cursor: default;
  transform: none;
}
.btn.ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 241, 232, 0.35);
}
.btn.ghost:hover { background: rgba(246, 241, 232, 0.08); }
.btn.line {
  background: transparent;
  color: var(--ink);
  border-color: #cfc3b0;
}
.btn.line:hover { background: rgba(28, 33, 24, 0.04); }
.btn.block { width: 100%; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(820px 380px at 100% 0%, rgba(166, 132, 61, 0.2), transparent 60%),
    linear-gradient(180deg, #121510 0%, #1c2218 100%);
  color: var(--cream);
  padding: 78px 0 86px;
}
.hero::after {
  content: "MR";
  position: absolute;
  right: -1vw;
  bottom: -9vw;
  font-size: 26vw;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: rgba(246, 241, 232, 0.035);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  margin: 0;
  color: var(--gold-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--gold-2); }
.hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(42px, 5.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.hero h1 .line, .hero h1 em { display: block; font-style: normal; }
.hero h1 em { color: var(--gold-2); }
.lead { margin: 0; max-width: 46ch; color: #d5cfc3; font-size: 16px; }
.lead.dark { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: #cfc6b6;
  font-size: 13px;
}
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-2);
}

.ledger {
  background: var(--cream);
  color: var(--text);
  border-radius: 22px;
  padding: 22px 22px 10px;
  min-height: 280px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}
.ledger-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f7d4a;
  box-shadow: 0 0 0 4px rgba(47, 125, 74, 0.15);
}
.ledger ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow: auto;
}
.ledger li { border-top: 1px solid var(--line); }
.ledger-item {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 12px 0;
  cursor: pointer;
}
.ledger-item > span:last-child { min-width: 0; flex: 1; }
.ledger-item:hover b { color: var(--cinnabar); }
.ledger .idx {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--gold-ink);
  width: 28px;
  flex: 0 0 28px;
  padding-top: 2px;
}
.ledger b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
}
.ledger small {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ledger dl { margin: 8px 0 12px; }
.ledger .pair {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.ledger .pair span { color: var(--muted); }
.ledger .pair strong { font-weight: 650; }

#products, #guide, #support { scroll-margin-top: 86px; }
.section { padding: 84px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}
h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  cursor: pointer;
}
.filter.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; min-width: 0; }
.product {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  min-width: 0;
}
.gallery { margin-bottom: 14px; min-width: 0; }
.gallery-frame {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #ebe3d4;
  scrollbar-width: none;
  min-width: 0;
  max-width: 100%;
}
.gallery-frame::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-top: 8px; }
.dots { display: flex; gap: 6px; }
.dot, .pause {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d9cdb8; padding: 0; }
.dot.is-on { background: var(--cinnabar); }
.pause {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(18, 21, 16, 0.9);
  display: grid;
  place-items: center;
  padding: 28px 18px 48px;
}
.lightbox-stage { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 1100px; width: 100%; }
.lightbox img { max-width: min(920px, calc(100vw - 140px)); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 12px; background: #111; }
.lightbox-close, .lightbox-nav {
  border: 1px solid rgba(246, 241, 232, 0.35);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  font: inherit;
}
.lightbox-close { position: absolute; top: 16px; right: 16px; border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.lightbox-nav { width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; flex: 0 0 auto; }
.lightbox-count { position: absolute; bottom: 16px; margin: 0; color: #e7e0d4; font-size: 13px; }
.product:hover { border-color: #c9b48a; }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
}
.product.tool .product-icon { background: var(--cinnabar); }
.tag {
  max-width: 58%;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-ink);
  background: #f3ead7;
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blurb {
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.more {
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cinnabar);
  font-weight: 700;
  cursor: pointer;
}
.reader {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(18, 21, 16, 0.72);
  display: grid;
  place-items: center;
  padding: 24px;
}
.reader-card {
  width: min(680px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: var(--paper-2);
  color: var(--text);
  border-radius: 22px;
  padding: 58px 32px 28px;
  position: relative;
}
.reader-kicker {
  margin: 0 0 8px;
  color: var(--gold-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reader-kicker:empty { display: none; }
.reader-card h2 { margin: 0 0 16px; font-size: 26px; line-height: 1.25; letter-spacing: -0.03em; }
.reader-body p { margin: 0; line-height: 1.75; white-space: pre-line; }
.reader-body ul { margin: 0; padding-left: 18px; }
.reader-body li { margin: 8px 0; line-height: 1.65; }
.reader-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}
.meta small { display: block; color: var(--muted); font-size: 12px; }
.meta b { font-size: 14px; }
.product-actions { display: flex; gap: 8px; }
.product-actions .btn { flex: 1; padding: 11px 10px; }

.guide { background: var(--ink); color: var(--cream); }
.guide .eyebrow { color: var(--gold-2); }
.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border: 1px solid rgba(246, 241, 232, 0.14);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.03);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-2);
}
.steps h3 { margin: 0 0 8px; font-size: 20px; }
.steps p { margin: 0; color: #cfc6b6; }

.support-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  margin-bottom: 10px;
}
.contact-row b { display: block; }
.contact-row small { color: var(--muted); }
.contact-row span.arrow { color: var(--cinnabar); font-weight: 700; }

footer { background: var(--ink); color: var(--cream); padding: 28px 0; }
.foot { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.foot p, .foot a { color: #c9c2b4; font-size: 14px; }
.foot strong { display: block; margin-bottom: 4px; letter-spacing: 0.04em; }
.foot-links, .foot-meta { display: flex; flex-direction: column; gap: 4px; }
.foot-meta { text-align: right; }
.load-error {
  grid-column: 1 / -1;
  background: #fff4f2;
  color: var(--cinnabar);
  border: 1px solid #efc7c2;
  border-radius: 14px;
  padding: 16px 18px;
}

.nav nav a[aria-current="page"] { color: var(--cinnabar); }
.page-hero {
  background:
    radial-gradient(720px 300px at 100% 0%, rgba(166, 132, 61, 0.2), transparent 60%),
    linear-gradient(180deg, #121510 0%, #1c2218 100%);
  color: var(--cream);
  padding: 56px 0 60px;
}
.page-hero .eyebrow { color: var(--gold-2); }
.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.report-section { padding-top: 40px; }
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
}
.panel h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; }
.report-side { display: grid; gap: 20px; }
.form-note { margin: 0 0 8px; font-size: 13px; }
.req { color: var(--cinnabar); }
.report-form label, .lookup label {
  display: block;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 650;
}
.report-form input, .report-form textarea, .report-form select, .lookup input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #d9cfbf;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-weight: 400;
}
.report-form textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.report-form input:focus, .report-form textarea:focus, .report-form select:focus, .lookup input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.file-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed #cfc3b0;
  border-radius: 14px;
  background: var(--paper);
}
.report-form .file-pick { display: inline-flex; margin: 0; font-size: 14px; }
.file-pick input { display: none; }
.file-hint { margin: 8px 0 0; font-size: 13px; }
.file-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.file-list li { padding: 3px 0; overflow-wrap: anywhere; }
.file-list li.bad { color: var(--cinnabar); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert {
  margin: 16px 0 0;
  background: #fff4f2;
  color: var(--cinnabar);
  border: 1px solid #efc7c2;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
}
.report-form > .btn { margin-top: 18px; min-width: 180px; }
.report-done h2 { margin: 8px 0 10px; }
.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 6px 0 12px;
}
.code-row strong {
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--cinnabar);
  font-variant-numeric: tabular-nums;
}
.lookup { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.lookup input { text-transform: uppercase; letter-spacing: 0.04em; }
.lookup .btn { padding: 11px 16px; }
.lookup-result {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.lookup-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lookup-head strong { overflow-wrap: anywhere; }
.lookup-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.lookup-meta small, .lookup-reply small { display: block; color: var(--muted); font-size: 12px; }
.lookup-meta b { font-size: 14px; overflow-wrap: anywhere; }
.lookup-reply { background: var(--paper); border-radius: 12px; padding: 12px 14px; }
.lookup-reply p { margin: 4px 0 0; white-space: pre-line; }
.status-pill {
  flex: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #f3ead7;
  color: var(--gold-ink);
}
.status-pill.doing { background: #e6eef8; color: #24507f; }
.status-pill.done { background: #e4f1e7; color: #1d5c32; }
.tips ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.tips li { margin: 6px 0; }

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid, .support-grid, .steps { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .nav-toggle { display: inline-flex; }
  .nav nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 16px 16px;
    background: #fffdf8;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 12px 4px; }
  .support-grid { padding: 24px 18px; }
  .report-layout { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
  .foot-meta { text-align: left; }
}
@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .section { padding: 58px 0; }
  .cards { grid-template-columns: 1fr; }
  .product-actions { flex-direction: column; }
  .hero h1 { letter-spacing: -0.03em; }
  .lightbox img { max-width: calc(100vw - 96px); }
  .panel { padding: 20px 16px; }
  .form-grid, .lookup-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery-track { transition: none; }
  .gallery-frame { scroll-behavior: auto; }
}
