/* ===================================================================
   NOWHOW Buyers Hub — TemplateB Poetic CSS tokens
   Shared by all 5 screens. Mirrors the design system used by
   sales-document-generator (Excel/PDF) for visual continuity.
   =================================================================== */

:root {
  /* Palette — v5 NOWHOW (neutral gray + deep red accent) */
  --bg: #FFFFFF;      /* page background — white (was #ECECEC) */
  --ink: #000000;     /* all text — pure black */
  --body: #000000;    /* body text — pure black */
  --mute: #000000;    /* secondary text — pure black (was muted gray) */
  --hair: #C9C9C9;    /* hairline rules — neutral mid-gray */
  --paper: #FFFFFF;   /* card / panel surface — white (was #F4F4F4) */
  --accent: #B40000;  /* NOWHOW accent — deep red */
  --on-accent: #FFFFFF; /* text/icons on accent color */
  --warn: #B45A3C;    /* warning (intact) */
  --ok: #4A6E58;      /* check (intact) */
  --white: #FFFFFF;

  /* Typography */
  --font-sans: "tt-commons-pro", 'Helvetica Neue', Helvetica, 'Arial', sans-serif;
  --font-mono: "tt-commons-pro", 'Helvetica Neue', Helvetica, 'Arial', sans-serif;  /* unified with --font-sans, was 'IBM Plex Mono' */

  /* Spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 40px;
  --s8: 56px;
  --s9: 72px;

  /* Layout — tighter for 13" MBP (1280x800 effective) */
  --max-w: 1120px;
  --pad-x: 40px;
  --pad-y: 32px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent); }
/* Buttons-as-links inherit the .button* hover (bg → accent, text → on-accent) defined below.
   Restore proper on-accent text color since the generic a:hover above sets color: var(--accent) */
a.button:hover,
a.button--outline:hover { color: var(--on-accent); }
a.button--ghost:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== Container ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x) 60px;
}
.container--narrow { max-width: 720px; }
.container--medium { max-width: 920px; }

/* ===== Top header (mirrors Order Form OF style) ===== */
.top-header {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.top-header__spacer { flex: 1; }
.top-header__meta { color: var(--body); font-size: 11px; }

/* ===== Title block ===== */
.title-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  color: var(--ink);
}
.title--small { font-size: 12px; }
.subtitle {
  font-size: 14px;
  color: var(--body);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
  margin-top: 14px;
}

/* ===== Meta column (right-aligned) ===== */
.meta-right {
  text-align: right;
  font-size: 13px;
  color: var(--body);
}
.meta-right__row { margin-bottom: 12px; }
.meta-right__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 3px;
}
.meta-right__value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

/* ===== Section ===== */
.section { margin-bottom: 48px; }
.section__label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section__rule { border-top: 1px solid var(--hair); margin-bottom: 18px; }
.section__title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin-bottom: 18px;
  color: var(--ink);
}
.section__intro {
  font-size: 14px;
  color: var(--body);
  max-width: 720px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== Form fields ===== */
.field { margin-bottom: 18px; }
.field__label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mute);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.field__input,
.field__select,
.field__textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  padding: 6px 2px;
  width: 100%;
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.15s ease;
}
.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  outline: 0;
  border-bottom-color: var(--ink);
}
.field__input::placeholder { color: var(--hair); font-weight: 300; }
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ===== Button ===== */
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 24px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  border: 1px solid var(--ink);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.button:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.button--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.button--outline:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.button--ghost {
  background: transparent;
  color: var(--mute);
  font-size: 10px;
  padding: 10px 0;
  border: 0;
}
.button--ghost:hover {
  color: var(--accent);
  background: transparent;
}

/* ===== Browser-style preview frame (for visual reference) ===== */
.browser {
  background: white;
  border: 1px solid var(--hair);
  border-radius: 4px;
  overflow: hidden;
  margin: 24px 0;
}
.browser__bar {
  background: #F0F2F0;
  border-bottom: 1px solid var(--hair);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Hub tabs (inline navigation) ===== */
.hub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.hub-tabs::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.hub-tab {
  background: transparent;
  border: 0;
  padding: 14px 22px 14px 0;
  margin-right: 28px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
  font-weight: 500;
}
.hub-tab:hover { color: var(--ink); }
.hub-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.hub-tab__index {
  font-size: 9px;
  color: var(--mute);
  letter-spacing: 0.14em;
  margin-right: 8px;
  font-weight: 400;
}
.hub-tab[aria-selected="true"] .hub-tab__index { color: var(--ink); opacity: 0.55; }

/* Gallery viewer — page-by-page (presentation style) */
.gallery {
  background: var(--paper);
  border: 1px solid var(--hair);
  padding: 16px 20px 20px;
  min-height: 400px;
}
.gallery__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 20px;
  flex-wrap: wrap;
}
.gallery__heading-left { min-width: 0; }
.gallery__title {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.gallery__meta {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.gallery__nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gallery__btn {
  background: var(--white);
  border: 1px solid var(--hair);
  color: var(--ink);
  width: 32px;
  height: 32px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  border-radius: 2px;
}
.gallery__btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gallery__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.gallery__counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  min-width: 60px;
  text-align: center;
  font-weight: 500;
}
.gallery__download {
  font-size: 11px;
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.gallery__download:hover { border-bottom-color: var(--ink); }

/* Single-page viewer */
.gallery__viewer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--hair);
  height: 76vh;
  max-height: 820px;
  min-height: 460px;
  overflow: hidden;  /* no scrollbar — image fits via object-fit */
}
.gallery__viewer.is-spread { gap: 8px; padding: 8px; }
.gallery__page {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: white;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  transition: opacity 0.25s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery__page.loading { opacity: 0; }

/* Click zones overlaid on the image — left half = prev, right half = next */
.gallery__click {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 2;
  outline: 0;
}
.gallery__click--prev { left: 0; cursor: w-resize; }
.gallery__click--next { right: 0; cursor: e-resize; }
.gallery__click:disabled { cursor: default; }

/* Subtle hover hint arrows in click zones */
.gallery__click::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.gallery__click--prev::after {
  left: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M8 2 L4 6 L8 10' fill='none' stroke='%23131313' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.gallery__click--next::after {
  right: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M4 2 L8 6 L4 10' fill='none' stroke='%23131313' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.gallery__viewer:hover .gallery__click:not(:disabled)::after { opacity: 1; }

/* Thumbnail strip below the viewer */
.gallery__thumbs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb {
  flex-shrink: 0;
  width: 48px;
  height: 64px;
  background: white;
  border: 1px solid var(--hair);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}
.gallery__thumb:hover { border-color: var(--ink); }
.gallery__thumb[aria-selected="true"] {
  border: 2px solid var(--ink);
  transform: translateY(-2px);
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.gallery__thumb__num {
  position: absolute;
  top: 1px;
  left: 2px;
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--mute);
  background: rgba(255, 255, 255, 0.8);
  padding: 0 3px;
  pointer-events: none;
}

.gallery__placeholder {
  background: white;
  border: 1px dashed var(--hair);
  padding: 80px 32px;
  text-align: center;
  color: var(--body);
  font-size: 13px;
  line-height: 1.7;
}
.gallery__placeholder b { color: var(--ink); display: block; margin-bottom: 8px; font-size: 15px; }

/* Spread (2-page) layout — PC only, opt-in via toggle */
.gallery__pair {
  display: contents;  /* lets the two pages live as flex children of viewer */
}
.gallery__viewer.is-spread .gallery__page {
  max-width: calc(50% - 4px);
  max-height: 100%;
}
.gallery__viewer.is-spread .gallery__page--placeholder {
  visibility: hidden;
  width: 50%;
}

/* Spread toggle button (in heading) */
.gallery__mode {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--hair);
  border-radius: 2px;
  overflow: hidden;
}
.gallery__mode-btn {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mute);
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 500;
  border-right: 1px solid var(--hair);
}
.gallery__mode-btn:last-child { border-right: 0; }
.gallery__mode-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
@media (max-width: 900px) {
  .gallery__mode { display: none; }  /* spread mode hidden on mobile */
}

/* ===== Lightbox (fullscreen view) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.92);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px 60px;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: white;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  transition: background 0.15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav:disabled { opacity: 0.25; cursor: not-allowed; }
.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
}

/* On the in-page viewer image, hint that it's clickable */
.gallery__page { cursor: zoom-in; }

/* Place-order CTA (lower visual weight than tabs) */
.cta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}
.cta-row .button { padding: 12px 28px; font-size: 11px; }

/* ===== Order table ===== */
.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.order-table th {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-transform: uppercase;
  font-weight: 500;
  text-align: left;
  padding: 10px 6px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.order-table th.num { text-align: right; }
.order-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--hair);
  font-size: 13px;
  vertical-align: middle;
  color: var(--body);
}
.order-table td.num { text-align: right; }
.order-table .row-num { color: var(--mute); font-size: 10px; }
.order-table .mute { color: var(--mute); }
.order-table .ink { color: var(--ink); font-weight: 500; }
.order-table select,
.order-table input {
  background: transparent;
  border: 0;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  padding: 4px 0;
  font-weight: 500;
}
.order-table input[type="number"] {
  background: var(--white);
  border: 1px solid var(--hair);
  padding: 6px 8px;
  text-align: right;
  width: 64px;
  font-weight: 500;
}
.order-table input[type="number"]:focus {
  outline: 0;
  border-color: var(--ink);
}
.order-table select { appearance: none; padding-right: 16px; cursor: pointer; }
.order-table select:focus { outline: 0; }
.order-table .col-style { width: 18%; }
.order-table .col-color { width: 12%; }
.order-table .col-sku { width: 10%; color: var(--mute); }
.order-table .col-price { width: 9%; }
.order-table .col-qty { width: 8%; }
.order-table .col-sub { width: 11%; font-weight: 500; }
.order-table .col-note { width: 14%; }

.btn-addline {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mute);
  text-transform: uppercase;
  padding: 8px 0;
}
.btn-addline:hover { color: var(--ink); }

/* ===== Order summary bar ===== */
.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.order-summary__check {
  font-size: 12px;
  color: var(--body);
  letter-spacing: 0.02em;
}
.order-summary__check b { color: var(--ink); font-weight: 600; }
.order-summary__check .ok { color: var(--ok); font-weight: 600; }
.order-summary__check .warn { color: var(--warn); font-weight: 600; }
.order-summary__amount-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.order-summary__amount {
  font-size: 26px;
  color: var(--ink);
  text-align: right;
  font-weight: 500;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--hair);
  padding-top: 24px;
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 11px;
  color: var(--body);
}
.site-footer__logo img {
  width: 90px;
  height: auto;
  margin-bottom: 8px;
}
.site-footer__right { text-align: right; }
.site-footer__right b { color: var(--ink); font-weight: 500; }

/* ===== Login centered screen ===== */
.center-screen {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* ===== Thanks screen ===== */
.thanks {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.thanks__ref {
  margin-top: 40px;
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* ===== Utilities ===== */
.mute { color: var(--mute); }
.ink { color: var(--ink); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.right { text-align: right; }
.mb-s4 { margin-bottom: var(--s4); }
.mb-s6 { margin-bottom: var(--s6); }
.mb-s7 { margin-bottom: var(--s7); }
.mt-s6 { margin-top: var(--s6); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-s4 { gap: var(--s4); }
.gap-s5 { gap: var(--s5); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  :root { --pad-x: 24px; --pad-y: 24px; }
  .container { padding: var(--pad-y) var(--pad-x) 40px; }
  .top-header { font-size: 10px; gap: 14px; margin-bottom: 24px; }
  .title { font-size: 44px; }
  .subtitle { font-size: 13px; margin-bottom: 28px; }
  .field--row { grid-template-columns: 1fr; gap: 0; }
  .section { margin-bottom: 36px; }
  .order-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gallery { padding: 14px; }
  .gallery__viewer { height: 64vh; min-height: 360px; }
  .gallery__nav { gap: 8px; }
  .gallery__counter { min-width: 50px; font-size: 11px; }

  /* Mobile order-table: collapse into card view */
  .order-table thead { display: none; }
  .order-table, .order-table tbody, .order-table tr, .order-table td { display: block; width: 100%; }
  .order-table tr {
    background: var(--paper);
    border: 1px solid var(--hair);
    padding: 12px 14px;
    margin-bottom: 14px;
    position: relative;
  }
  .order-table td {
    border: 0;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 13px;
  }
  .order-table td::before {
    content: attr(data-label);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--mute);
    text-transform: uppercase;
    flex-shrink: 0;
    width: 90px;
  }
  .order-table td.num,
  .order-table td.col-style,
  .order-table td.col-color,
  .order-table td.col-sku,
  .order-table td.col-price,
  .order-table td.col-qty,
  .order-table td.col-sub,
  .order-table td.col-note { text-align: right; }
  .order-table input[type="number"] { width: 80px; }
  .order-table select, .order-table input { text-align: right; }
  .order-table .row-num { display: none; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .site-footer__right { text-align: left; }
}

@media (max-width: 480px) {
  .title { font-size: 36px; }
  .hub-tabs { padding-bottom: 4px; }
  .hub-tab { padding: 12px 0; margin-right: 18px; font-size: 11px; }
  .gallery__pages { max-height: 55vh; }
}

/* ===================================================================
   Buyers Kit Hub — menu-style index page
   Used by hub.html (new menu layout)
   =================================================================== */

.bk-menu {
  list-style: none;
  padding: 0;
  margin: 32px 0 48px;
  border-top: 1px solid var(--hair);
}
.bk-menu__item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 18px;
  align-items: baseline;
  width: 100%;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
  transition: padding 140ms ease;
}
.bk-menu__item:hover { padding-left: 12px; }
.bk-menu__item:hover .bk-menu__action { color: var(--accent); }
.bk-menu__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.08em;
}
.bk-menu__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.bk-menu__action {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 140ms ease;
}

/* ===== Buyers Kit — action zone (Place Order primary + email note) ===== */
.bk-actions {
  margin: 0 0 48px;
}
.bk-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 24px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  text-decoration: none;
  box-sizing: border-box;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.bk-order:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.bk-order__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bk-order__action {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}
.bk-email-note {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--mute);
}
.bk-email-note a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: color 140ms ease, border-color 140ms ease;
}
.bk-email-note a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== iframe popup overlay (Buyers Kit) ===== */
.bk-popup {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.78);
  display: none;
  z-index: 1000;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
}
.bk-popup.is-open { display: flex; }

.bk-popup__panel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: var(--bg);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
}

.bk-popup__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hair);
  background: var(--bg);
}
.bk-popup__bar-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mute);
  text-transform: uppercase;
}
.bk-popup__close {
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--hair);
  padding: 6px 14px;
  background: var(--white);
  letter-spacing: 0.06em;
}
.bk-popup__close:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.bk-popup__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
  min-height: 0;
}

/* ===== Lookbook — full-screen lightbox ===== */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: #0e0e0e;
  z-index: 1100;
  display: none;
  flex-direction: column;
}
.lb-overlay.is-open { display: flex; }
.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 3;
  font-size: 16px;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: 0;
  padding: 10px;
  opacity: 0.65;
  transition: opacity 140ms ease;
}
.lb-close:hover { opacity: 1; }
.lb-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 36px 24px 44px;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 2px 50px rgba(0, 0, 0, 0.55);
}
.lb-zone {
  position: absolute;
  top: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  z-index: 2;
}
.lb-zone--prev { left: 0;  width: 38%; cursor: w-resize; }
.lb-zone--next { right: 0; width: 62%; cursor: e-resize; }
.lb-counter {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.6;
  pointer-events: none;
}

/* ===== Legal mini-footer (all content pages) ===== */
.legal-footer {
  border-top: 1px solid var(--hair);
  margin-top: 64px;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
}
.legal-footer__links { display: flex; align-items: center; gap: 0; }
.legal-footer__links a {
  color: var(--mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  transition: color 140ms ease, border-color 140ms ease;
}
.legal-footer__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--hair);
}
.legal-footer__sep { margin: 0 10px; opacity: 0.5; }
.legal-footer__copy { letter-spacing: 0.06em; }
@media (max-width: 700px) {
  .legal-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 16px 14px;
  }
}
@media print { .legal-footer { display: none !important; } }

/* ===== Linesheet PDF spread (lsp-) ===== */
.lsp-spread {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;          /* 本の綴じ目を表現する細い隙間 */
  max-width: 100%;
  max-height: 100%;
}
.lsp-spread--single { justify-content: center; }
.lsp-page {
  max-height: calc(100vh - 100px);  /* counter + close button のぶん余白 */
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 2px 50px rgba(0, 0, 0, 0.55);
}
.lsp-spread:not(.lsp-spread--single) .lsp-page {
  max-width: 49%;   /* 2枚並べたとき1枚は半分まで */
}
@media (max-width: 700px) {
  /* モバイルでは見開きを縦積みに */
  .lsp-spread { flex-direction: column; gap: 8px; }
  .lsp-spread:not(.lsp-spread--single) .lsp-page { max-width: 100%; max-height: 48vh; }
}

@media (max-width: 700px) {
  .bk-menu__item { grid-template-columns: 30px 1fr auto; gap: 12px; padding: 16px 4px; }
  .bk-menu__title { font-size: 13px; }
  .bk-popup { padding: 8px; }
}

/* ===================================================================
   Brand Introduction — long-form reading layout (JP/EN side-by-side)
   Used by brand.html
   =================================================================== */

.brand__cover {
  margin: 8px 0 56px;
  background: var(--paper);
  padding: 28px;
  border: 1px solid var(--hair);
}
.brand__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.brand__section {
  margin-bottom: 68px;
}
.brand__section-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.brand__section-rule {
  height: 1px;
  background: var(--hair);
  margin-bottom: 28px;
}
.brand__section-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.brand__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.brand__lang p {
  font-size: 12px;
  line-height: 1.95;
  color: var(--body);
  margin-bottom: 14px;
}
.brand__lang p:last-child { margin-bottom: 0; }

/* Japanese reads in Mincho (serif) — like a printed book; English stays sans */
.brand__lang--jp {
  font-family: "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "MS Mincho", "Sazanami Mincho", serif;
  font-feature-settings: "palt";
  font-size: 12.5px;  /* Mincho reads ~0.5px smaller optically — bump up slightly */
}
.brand__lang--jp p { font-size: inherit; }

/* Brand-name dash decoration on section 01 */
.brand__name-line {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.brand__name-line .dash {
  display: inline-block;
  width: 60px;
  border-top: 1px solid var(--hair);
  vertical-align: middle;
  margin: 0 12px;
}

/* Section 01: indented question block (no italics — keeps the calm tone) */
.brand__questions {
  margin: 10px 0 14px;
  padding-left: 18px;
  border-left: 1px solid var(--hair);
  color: var(--body);
  font-size: 12px;
  line-height: 2;
}
.brand__questions p { margin-bottom: 0; }

.brand__closing {
  margin: 80px 0 56px;
  padding: 36px 24px;
  text-align: center;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.brand__closing p {
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.brand__closing p:last-child {
  margin-bottom: 0;
  color: var(--mute);
  font-size: 13px;
}

.brand__contact {
  margin: 56px 0 40px;
}
.brand__contact-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.brand__contact-rule {
  height: 1px;
  background: var(--hair);
  margin-bottom: 22px;
}
.brand__contact dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 24px;
  font-size: 13px;
}
.brand__contact dt {
  color: var(--mute);
  letter-spacing: 0.04em;
}
.brand__contact dd {
  color: var(--body);
}
.brand__contact a {
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 1px;
}
.brand__contact a:hover { border-bottom-color: var(--ink); }

@media (max-width: 700px) {
  .brand__body { grid-template-columns: 1fr; gap: 22px; }
  .brand__body .brand__lang--en { padding-top: 18px; border-top: 1px dashed var(--hair); }
  .brand__section { margin-bottom: 48px; }
  .brand__section-title { font-size: 18px; }
  .brand__cover { padding: 14px; margin-bottom: 36px; }
  .brand__contact dl { grid-template-columns: 1fr; gap: 4px 0; }
  .brand__contact dt { margin-top: 8px; }
}

/* ===================================================================
   Linesheet — Grid + Detail Modal (SS27 gallery view)
   Used by:
     - hub.html (Linesheet tab, inline)
     - order.html / submit.html (full-screen overlay via linesheet-viewer.js)
   =================================================================== */

/* Full-screen overlay used on order.html / submit.html */
.ls-viewer-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  z-index: 900;
  overflow-y: auto;
}
.ls-viewer-overlay.is-open { display: block; }

.ls-viewer-overlay__header {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;  /* 見出し非表示なので右端寄せに（元: space-between）*/
  align-items: center;
  z-index: 5;
}
.ls-viewer-overlay__title {
  display: none;  /* 見出し非表示。右側のボタンだけ残す。復活は display: block; */
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: 500;
}
.ls-viewer-overlay__title-meta {
  color: var(--mute);
  margin-left: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.ls-viewer-overlay__close {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  border: 1px solid var(--hair);
  padding: 8px 16px;
  background: var(--white);
}
.ls-viewer-overlay__close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.ls-viewer-overlay__container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 24px 60px;
}
/* Inside the overlay, the grid is always active */
.ls-viewer-overlay .ls-grid { display: grid; }

.ls-grid {
  display: none;  /* hub.html の JS が Linesheet タブ選択時に show */
  grid-template-columns: repeat(4, minmax(0, 200px));
  justify-content: center;  /* 4 列を中央寄せ — 写真は ~180-200px に収まる */
  gap: 28px;
  padding: 28px;  /* 両端余白を gap と等しく — 写真の間隔が均等に見える */
  background: var(--paper);
}
.ls-grid.is-active { display: grid; }

.ls-grid__header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 6px;
}
.ls-grid__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.ls-grid__meta {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.ls-grid__pdf-link {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 2px;
}
.ls-grid__pdf-link:hover { border-bottom-color: var(--ink); }

.ls-card {
  cursor: pointer;
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 120ms ease;
}
.ls-card:active { transform: scale(0.99); }

.ls-card__photo {
  aspect-ratio: 4 / 5;
  background: transparent;  /* was #DDE0E3 — removed to drop the gray frame look */
  overflow: hidden;
  position: relative;
}
.ls-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ls-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #DDE0E3;  /* gray box for "Photo coming soon" placeholders only */
  color: var(--mute);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hover-only caption — plain black text, no background */
.ls-card__info {
  position: absolute;
  inset: 0;                 /* 画像全体を覆う = 商品名を中央配置できる */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.28);  /* ホバー時の暗幕（白文字の可読性確保）*/
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.ls-card:hover .ls-card__info,
.ls-card:focus-visible .ls-card__info { opacity: 1; }

.ls-card__name {
  font-family: "tt-commons-pro", 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFFFFF;
  text-align: center;
}
/* In hover-only mode, hide the secondary meta line — keep grid pure visual */
.ls-card__meta { display: none; }

/* ----- Detail Modal ----- */

.ls-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.78);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.ls-modal.is-open { display: flex; }

.ls-modal__panel {
  background: var(--bg);
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 44px;
  position: relative;
  border: 1px solid var(--ink);
}

.ls-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  color: var(--ink);
  padding: 4px 8px;
  line-height: 1;
}
.ls-modal__close:hover { color: var(--accent); }

.ls-modal__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--hair);
  padding: 10px 16px;
  font-size: 18px;
  color: var(--ink);
  z-index: 1001;
}
.ls-modal__nav--prev { left: 16px; }
.ls-modal__nav--next { right: 16px; }
.ls-modal__nav:hover { background: var(--ink); color: var(--bg); }
.ls-modal__nav:disabled { opacity: 0.25; cursor: not-allowed; }

.ls-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hair);
  gap: 24px;
}
.ls-modal__sku {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mute);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.ls-modal__title {
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.ls-modal__counter {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ls-modal__photos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}
.ls-modal__photo {
  aspect-ratio: 4 / 5;
  background: #DDE0E3;
  border: 1px solid var(--hair);
  overflow: hidden;
}
.ls-modal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ls-modal__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ls-modal__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 40px;
  margin-bottom: 18px;
}
.ls-modal__field-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ls-modal__field-value {
  font-family: var(--font-mono);  /* All detail values share the mono look (was SIZE-only) */
  font-size: 12px;
  color: var(--body);
  line-height: 1.6;
}
.ls-modal__field--full { grid-column: 1 / -1; }

.ls-modal__variants {
  border: 1px solid var(--hair);
  margin-top: 6px;
}
.ls-modal__variant-row {
  display: grid;
  grid-template-columns: 70px 1fr 90px 90px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hair);
  font-size: 12px;
  gap: 10px;
  align-items: baseline;
}
.ls-modal__variant-row:last-child { border-bottom: 0; }
.ls-modal__variant-row--head {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--mute);
  text-transform: uppercase;
  background: var(--paper);
}
.ls-modal__variant-row > .col-label { color: var(--ink); font-weight: 500; }
.ls-modal__variant-row > .col-size { color: var(--body); font-family: var(--font-mono); font-size: 11px; }
.ls-modal__variant-row > .col-price { text-align: right; color: var(--ink); }
.ls-modal__variant-row > .col-retail { text-align: right; color: var(--mute); }

.ls-modal__description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--body);
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}

@media (max-width: 700px) {
  .ls-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
  .ls-modal { padding: 12px; }
  .ls-modal__panel { padding: 24px 20px; max-height: 95vh; }
  .ls-modal__photos { grid-template-columns: 1fr; }
  .ls-modal__info { grid-template-columns: 1fr; gap: 16px; }
  .ls-modal__nav { padding: 6px 12px; font-size: 16px; }
  .ls-modal__nav--prev { left: 6px; }
  .ls-modal__nav--next { right: 6px; }
  .ls-modal__variant-row { grid-template-columns: 50px 1fr 70px 70px; padding: 8px; font-size: 11px; }
}

