/* Dressmaker Guide — cozy sewing atelier chrome (sampled from Steam media) */
:root {
  color-scheme: dark;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  /* Warm wood atelier night */
  --bg: #1a120e;
  --bg-elev: #241a14;
  --surface: #2e221a;
  /* Cream / linen text */
  --text: #f3e8d8;
  --muted: #b9a894;
  /* Wood trim */
  --border: #4a382c;
  /* Dusty rose / coral fabric */
  --accent: #c4787a;
  --accent-soft: #e8a8a4;
  /* Soft sage / plant / thread */
  --thread: #6f8f78;
  --thread-hot: #a8c4b0;
  /* Soft gold / brass / pin */
  --pin: #d4a84b;
  --gold: #c9a86c;
  --link: #e8b4a8;
  --link-hover: #ffd4c8;
  --radius: 10px;
  --wide: 1080px;
  --pad: 1.25rem;
  --header-h: 3.5rem;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 100% 70% at 12% -10%, rgba(196, 120, 122, 0.22), transparent 52%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(111, 143, 120, 0.14), transparent 45%),
    linear-gradient(180deg, #221610 0%, var(--bg) 42%, #120c0a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* soft linen grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 100;
  padding: 0.5rem 0.85rem; background: var(--pin); color: #1a1008;
  font-weight: 700; text-decoration: none; border-radius: 4px;
}
.skip-link:focus { top: 0.75rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26, 18, 14, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem var(--pad);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--text); font-weight: 700;
}
img.brand-mark {
  width: 2.15rem; height: 2.15rem; border-radius: 8px;
  display: block; object-fit: cover;
  border: 1px solid #7a4a52;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 2.15rem; height: 2.15rem; border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #6a3a42, #2a1820);
  color: var(--accent-soft); font-size: 0.72rem; letter-spacing: 0.04em;
  border: 1px solid #7a4a52; font-weight: 800;
}
.brand-mark img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.brand-name { font-size: 1.05rem; }

.primary-nav {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  margin-left: auto;
}
.primary-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--accent-soft); }

/* Checkbox kept visually hidden so :checked ~ .primary-nav works */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0; opacity: 0;
}
.nav-toggle-btn {
  display: none;
  margin-left: auto;
  cursor: pointer;
  width: 2.5rem; height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle-btn span,
.nav-toggle-btn span::before,
.nav-toggle-btn span::after {
  display: block; width: 1.15rem; height: 2px;
  background: var(--text); border-radius: 1px;
  position: relative;
}
.nav-toggle-btn span::before,
.nav-toggle-btn span::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle-btn span::before { top: -6px; }
.nav-toggle-btn span::after { top: 6px; }

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
  }
  .brand { flex: 0 1 auto; min-width: 0; }
  .nav-toggle-btn { display: inline-flex; margin-left: auto; }
  .primary-nav {
    display: none;
    order: 3;
    flex-direction: column;
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
    padding: 0.35rem 0 0.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elev);
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .primary-nav a {
    display: block;
    width: 100%;
    padding: 0.85rem var(--pad);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .primary-nav a:last-child { border-bottom: none; }
  .primary-nav a:hover { background: var(--surface); }
  .nav-toggle:checked ~ .primary-nav { display: flex; }
  .scene-figure img { max-height: 260px; }
}


.site-main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--link); }
.bc-sep { margin: 0 0.4rem; opacity: 0.6; }

.guide {
  background: rgba(36, 26, 20, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.guide h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.25;
  color: var(--text);
}
.guide h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.35rem;
  color: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.guide h3 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1.12rem;
  color: var(--thread-hot);
}
.guide p, .guide li { color: var(--text); max-width: 68ch; }
.guide ul, .guide ol { padding-left: 1.25rem; }
.guide li + li { margin-top: 0.25rem; }
.guide strong { color: #fff4e8; }

.guide table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0 1.1rem;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}
.guide thead { background: rgba(196, 120, 122, 0.12); }
.guide th, .guide td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  min-width: 6rem;
}
.guide th { color: var(--accent-soft); font-weight: 700; }
.guide tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.guide hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.guide blockquote {
  margin: 1rem 0;
  padding: 0.65rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(196, 120, 122, 0.08);
  color: var(--muted);
}

/* —— Scene figure (GK2 pattern, Dressmaker tokens) —— */
.scene-figure {
  margin: 0 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #120c0a;
  box-shadow: var(--shadow);
}
.scene-figure img {
  width: 100%; height: auto; max-height: 420px;
  object-fit: cover; object-position: center;
  display: block;
}
.scene-figure figcaption {
  margin: 0;
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.35rem;
  color: var(--pin);
}

/* Card grid with thumbs */
.card-grid, .start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.card, .start-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover, .start-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}
.card-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #120c0a;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.card-body, .start-card .card-body {
  display: block;
  padding: 1rem 1.15rem 1.15rem;
}
.start-card h3, .card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--accent-soft);
}
.start-card p, .card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
/* legacy start-card without thumb still pads */
.start-card:not(:has(.card-thumb)) {
  padding: 1rem 1.1rem;
}

.related {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: rgba(111, 143, 120, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.related-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--thread-hot);
}
.related ul { margin: 0; padding-left: 1.15rem; }
.related li + li { margin-top: 0.2rem; }

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(18, 12, 10, 0.92);
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 2.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links a { color: var(--link); text-decoration: none; }
.footer-links a:hover { color: var(--link-hover); }
.footer-disclaimer, .footer-media { margin: 0.65rem 0; max-width: 70ch; }
.footer-media { font-size: 0.85rem; color: #9a8874; }

@media (max-width: 560px) {
  .guide { padding: 1rem 0.95rem 1.25rem; }
  .guide table { font-size: 0.88rem; }
}

/* Brand mark image (user-supplied dress icon) */
img.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  border: 1px solid #7a4a52;
  background: #2a1820;
}
