/* ============================================================
   DADADA — dadada.in — style.css
   Mobile-first, fully responsive. No framework, no build step.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --ink:   #0e0e0d;
  --paper: #f5f3ee;
  --mid:   #c8c5bc;
  --faint: #eceae4;
  --font:  'Courier Prime', 'Courier New', monospace;
  --nav-h: 46px;
  --gap:   clamp(16px, 4vw, 28px);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.8125rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
img { display: block; max-width: 100%; }
input, textarea { font-family: var(--font); }

.u-label { font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.38; }
.u-tag   { font-size: 0.5625rem; letter-spacing: 0.10em; text-transform: uppercase; border: 1px solid var(--mid); padding: 2px 7px; opacity: 0.55; display: inline-block; }

/* ── THEME ── */
html[data-theme="dark"] {
  --ink:   #eceae4;
  --paper: #111110;
  --mid:   #333230;
  --faint: #1c1b1a;
}
html[data-theme="dark"] .det__image-panel,
html[data-theme="dark"] .reader__image   { background: #0a0a09; }
html[data-theme="dark"] .cat-card__cover,
html[data-theme="dark"] .feat-card__cover,
html[data-theme="dark"] .cart-thumb      { background: var(--faint); }
html[data-theme="dark"] .cat-card__type-pip { background: var(--paper); }
html[data-theme="dark"] .status-pill--open  { background: #1a2e16; color: #8ecb7e; border-color: #3a5e30; }
html[data-theme="dark"] .how__format-card   { background: var(--faint); }
html[data-theme="dark"] .cart-summary       { background: var(--faint); }

/* ── FONT SIZE — JS sets font-size on html element directly ── */

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: var(--paper); border-bottom: 1px solid var(--mid);
  display: flex; align-items: center; height: var(--nav-h);
  transition: background 0.3s;
}
.nav__logo {
  padding: 0 18px; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.03em;
  border-right: 1px solid var(--mid); height: 100%;
  display: flex; align-items: center; flex-shrink: 0; white-space: nowrap;
}
.nav__logo em { font-weight: 400; font-style: normal; opacity: 0.32; font-size: 0.6875rem; margin-left: 5px; }

.nav__tabs { display: flex; height: 100%; list-style: none; }
.nav__tab  {
  font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: none; border-right: 1px solid var(--mid);
  padding: 0 15px; color: var(--ink); opacity: 0.38; height: 100%;
  transition: opacity 0.15s; white-space: nowrap;
}
.nav__tab:hover, .nav__tab[aria-current="page"] { opacity: 1; }

.nav__right { display: flex; align-items: center; height: 100%; margin-left: auto; }

.nav__search {
  background: none; border: none; border-left: 1px solid var(--mid);
  font-family: var(--font); font-size: 0.625rem; color: var(--ink);
  padding: 0 14px; width: 140px; outline: none; letter-spacing: 0.08em; height: 100%;
  transition: width 0.2s, background 0.15s;
}
.nav__search::placeholder { opacity: 0.3; }
.nav__search:focus { background: var(--faint); width: 190px; }

.nav__font-ctrl { display: flex; align-items: center; border-left: 1px solid var(--mid); height: 100%; }
.nav__ctrl-btn  {
  font-family: var(--font); font-size: 0.6875rem; font-weight: 700;
  background: none; border: none; border-right: 1px solid var(--mid);
  color: var(--ink); height: 100%; padding: 0 13px; opacity: 0.5;
  transition: opacity 0.15s, background 0.15s; white-space: nowrap;
}
.nav__ctrl-btn:hover, .nav__ctrl-btn:active { opacity: 1; background: var(--faint); }

.nav__theme-btn {
  background: none; border: none; border-left: 1px solid var(--mid);
  color: var(--ink); height: 100%; padding: 0 14px; font-size: 0.9375rem;
  opacity: 0.55; transition: opacity 0.15s, background 0.15s;
  display: flex; align-items: center;
}
.nav__theme-btn:hover { opacity: 1; background: var(--faint); }

.nav__cart {
  font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: none; border-left: 1px solid var(--mid);
  padding: 0 16px; color: var(--ink); height: 100%;
  display: flex; align-items: center; gap: 7px;
  transition: background 0.15s; white-space: nowrap;
}
.nav__cart:hover { background: var(--faint); }
.nav__cart-badge {
  background: var(--ink); color: var(--paper);
  font-size: 0.5625rem; padding: 1px 6px; min-width: 18px; text-align: center; line-height: 1.6;
}

.nav__burger {
  display: none; background: none; border: none;
  border-left: 1px solid var(--mid); padding: 0 16px; height: 100%;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Drawer */
.nav__drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--mid);
  z-index: 299; flex-direction: column;
  display: none; max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  transition: background 0.3s;
}
.nav__drawer.is-open { display: flex; }

.nav__drawer-link {
  font-family: var(--font); font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 18px var(--gap); border-bottom: 1px solid var(--mid);
  background: none; border-left: none; border-right: none; border-top: none;
  color: var(--ink); text-align: left; opacity: 0.55;
  transition: opacity 0.15s, background 0.15s; width: 100%;
}
.nav__drawer-link:hover, .nav__drawer-link[aria-current="page"] { opacity: 1; background: var(--faint); }

.nav__drawer-controls { display: flex; border-top: 1px solid var(--mid); }
.nav__drawer-ctrl {
  flex: 1; font-family: var(--font); font-size: 0.75rem; letter-spacing: 0.10em; text-transform: uppercase;
  background: none; border: none; border-right: 1px solid var(--mid);
  color: var(--ink); padding: 16px 10px; opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
}
.nav__drawer-ctrl:last-child { border-right: none; }
.nav__drawer-ctrl:hover { opacity: 1; background: var(--faint); }

.drawer-badge { background: var(--ink); color: var(--paper); font-size: 0.5625rem; padding: 1px 6px; margin-left: 6px; }

.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 298; }
.drawer-backdrop.is-open { display: block; }

/* ── PAGE ── */
.page { margin-top: var(--nav-h); min-height: calc(100vh - var(--nav-h)); }

/* ── HERO ── */
.hero {
  padding: clamp(44px,7vw,80px) var(--gap) clamp(36px,5vw,60px);
  border-bottom: 1px solid var(--mid);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px,5vw,56px); align-items: end;
}
.hero__h1   { font-size: clamp(2.375rem,7vw,4.25rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.025em; margin-bottom: 18px; }
.hero__sub  { font-size: 0.6875rem; letter-spacing: 0.10em; text-transform: uppercase; opacity: 0.4; line-height: 2.2; }
.hero__meta { font-size: 0.625rem; opacity: 0.32; letter-spacing: 0.08em; line-height: 2.2; text-align: right; }
.hero__cta  { margin-top: 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: none; padding: 12px 22px; transition: opacity 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.btn--dark  { background: var(--ink); color: var(--paper); }
.btn--dark:hover  { opacity: 0.78; }
.btn--light { background: none; color: var(--ink); border: 1px solid var(--mid); }
.btn--light:hover { background: var(--faint); }
.btn--full  { width: 100%; justify-content: center; }

/* ── MARQUEE ── */
.marquee { border-bottom: 1px solid var(--mid); overflow: hidden; height: 32px; display: flex; align-items: center; white-space: nowrap; }
.marquee__inner { display: inline-flex; animation: marquee-scroll 28s linear infinite; }
.marquee__item  { font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.32; padding: 0 28px; border-right: 1px solid var(--mid); }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── FEATURED ── */
.featured { display: grid; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid var(--mid); }
.feat-card { border-right: 1px solid var(--mid); cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
.feat-card:last-child { border-right: none; }
.feat-card:hover { background: rgba(14,14,13,0.025); }

.feat-card__cover {
  width: 100%; aspect-ratio: 3/4; background: var(--faint);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.feat-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-card__cover-label { font-size: 0.5625rem; opacity: 0.28; text-transform: uppercase; letter-spacing: 0.12em; line-height: 2.2; text-align: center; z-index: 1; }

.feat-card__body { padding: clamp(14px,3vw,22px); }
.feat-card__type   { font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.4; margin-bottom: 5px; }
.feat-card__title  { font-size: 0.9375rem; font-weight: 700; margin-bottom: 4px; line-height: 1.2; }
.feat-card__artist { font-size: 0.6875rem; opacity: 0.5; margin-bottom: 14px; }
.feat-card__price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.price       { font-size: 0.8125rem; font-weight: 700; }
.price__from { font-size: 0.5625rem; opacity: 0.45; margin-right: 2px; }
.price__free { font-size: 0.5625rem; opacity: 0.4; }

.btn-add-sm {
  font-size: 0.5625rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: 1px solid var(--mid); padding: 6px 11px;
  color: var(--ink); transition: all 0.15s; white-space: nowrap;
}
.btn-add-sm:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── HOW ── */
.how { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--mid); }
.how__col:first-child { border-right: 1px solid var(--mid); }
.how__col { padding: clamp(28px,5vw,44px) var(--gap); }
.how__step { padding: 12px 0; border-bottom: 1px solid var(--mid); font-size: 0.75rem; display: flex; gap: 14px; align-items: baseline; }
.how__step:last-child { border-bottom: none; }
.how__n { opacity: 0.28; flex-shrink: 0; font-size: 0.5625rem; }
.how__format-card { padding: 13px 15px; border: 1px solid var(--mid); margin-bottom: 9px; }
.how__format-card:last-child { margin-bottom: 0; }
.how__format-name { font-weight: 700; font-size: 0.75rem; margin-bottom: 3px; }
.how__format-desc { font-size: 0.5625rem; opacity: 0.5; line-height: 1.7; }

/* ── CATALOGUE ── */
.cat-bar {
  display: flex; align-items: center; border-bottom: 1px solid var(--mid);
  height: 42px; position: sticky; top: var(--nav-h);
  background: var(--paper); z-index: 10;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  transition: background 0.3s;
}
.cat-bar::-webkit-scrollbar { display: none; }

.cat-filter {
  font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: none; border-right: 1px solid var(--mid);
  padding: 0 16px; color: var(--ink); opacity: 0.38; height: 100%;
  transition: opacity 0.15s; white-space: nowrap; flex-shrink: 0;
}
.cat-filter:hover, .cat-filter[aria-pressed="true"] { opacity: 1; }
.cat-count {
  margin-left: auto; font-size: 0.5625rem; opacity: 0.38; letter-spacing: 0.10em;
  padding: 0 18px; border-left: 1px solid var(--mid); height: 100%;
  display: flex; align-items: center; white-space: nowrap; flex-shrink: 0;
}

.cat-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.cat-card {
  border-right: 1px solid var(--mid); border-bottom: 1px solid var(--mid);
  cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent;
}
.cat-card:nth-child(4n) { border-right: none; }
.cat-card:hover { background: rgba(14,14,13,0.025); }

.cat-card__cover {
  width: 100%; aspect-ratio: 3/4; background: var(--faint);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5625rem; opacity: 0.25; text-transform: uppercase; letter-spacing: 0.10em;
}
.cat-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.cat-card__type-pip {
  position: absolute; top: 8px; left: 8px; font-size: 0.5rem; letter-spacing: 0.12em;
  text-transform: uppercase; background: var(--paper); border: 1px solid var(--mid);
  padding: 2px 5px; z-index: 1;
}
.cat-card__body  { padding: clamp(12px,2.5vw,18px); }
.cat-card__title { font-size: 0.8125rem; font-weight: 700; margin-bottom: 3px; line-height: 1.25; }
.cat-card__by    { font-size: 0.5625rem; opacity: 0.45; margin-bottom: 9px; }
.cat-card__formats { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.fmt-badge         { font-size: 0.5rem; letter-spacing: 0.10em; text-transform: uppercase; border: 1px solid var(--mid); padding: 2px 5px; opacity: 0.55; }
.fmt-badge--paid   { opacity: 0.8; }

/* ── DETAIL ── */
.det__back {
  padding: 13px var(--gap); border-bottom: 1px solid var(--mid);
  font-size: 0.5625rem; letter-spacing: 0.12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 0.45; transition: opacity 0.15s;
  background: none; border-top: none; border-left: none; border-right: none;
  color: var(--ink); width: 100%;
}
.det__back:hover { opacity: 1; }

/* ══════════════════════════════════════
   DETAIL PAGE — image gallery left,
   info/format/buttons right.
   Up to 10 plates, sticky stage,
   auto-scroll slideshow or click thumbs.
   Reading text only opens via the
   "Read online" / "Narrator" buttons.
══════════════════════════════════════ */
.det__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 90px);
}

/* LEFT: sticky gallery */
.det__gallery {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - 90px);
  background: #161613;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.det__gallery-stage {
  flex: 1; position: relative; overflow: hidden;
}
.det__gallery-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 5%; opacity: 0; transition: opacity 0.6s ease;
}
.det__gallery-stage img.is-active { opacity: 1; }
.det__gallery-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(245,243,238,0.18); font-size: 0.5625rem; letter-spacing: 0.14em;
  text-transform: uppercase; text-align: center; line-height: 2.5;
}

.det__gallery-counter {
  position: absolute; top: 16px; right: 18px; z-index: 3;
  font-size: 0.5625rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245,243,238,0.45);
}

.det__gallery-playpause {
  position: absolute; top: 14px; left: 18px; z-index: 3;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #f5f3ee; width: 28px; height: 28px; border-radius: 50%;
  font-size: 0.625rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.det__gallery-playpause:hover { background: rgba(255,255,255,0.16); }

/* Thumbnail strip — up to 10, scrolls horizontally if it overflows */
.det__gallery-thumbs {
  display: flex; flex-shrink: 0; height: 64px;
  border-top: 1px solid rgba(255,255,255,0.07);
  overflow-x: auto; scrollbar-width: none;
}
.det__gallery-thumbs::-webkit-scrollbar { display: none; }
.det__gallery-thumb {
  flex: 1 0 auto; min-width: 56px; max-width: 110px;
  border-right: 1px solid rgba(255,255,255,0.07);
  position: relative; overflow: hidden; cursor: pointer;
  opacity: 0.4; transition: opacity 0.2s;
  background: none; border-top: none; border-bottom: none; border-left: none;
}
.det__gallery-thumb:last-child { border-right: none; }
.det__gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.det__gallery-thumb:hover { opacity: 0.7; }
.det__gallery-thumb.is-active { opacity: 1; }
.det__gallery-thumb.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #f5f3ee;
}

/* RIGHT: info panel */
.det__info { overflow-y: auto; max-height: calc(100vh - 90px); padding: clamp(24px,4vw,40px) clamp(20px,4vw,36px); }
.det__type   { font-size: 0.5625rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.38; margin-bottom: 10px; }
.det__title  { font-size: clamp(1.625rem,5vw,2.5rem); font-weight: 700; line-height: 1.05; margin-bottom: 8px; }
.det__artist { font-size: 0.8125rem; opacity: 0.5; margin-bottom: 22px; }
.det__desc   { font-size: 0.8125rem; line-height: 1.9; opacity: 0.72; margin-bottom: 24px; }

.det__section-label {
  font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.35;
  margin-bottom: 13px; padding-top: 20px; border-top: 1px solid var(--mid); display: block;
}
.det__info .det__section-label:first-of-type { padding-top: 0; border-top: none; }

.fmt-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 18px; }
.fmt-opt {
  border: 1px solid var(--mid); padding: 13px 11px; cursor: pointer;
  transition: border-color 0.15s; text-align: left; background: none; color: var(--ink);
}
.fmt-opt:hover { border-color: rgba(14,14,13,0.5); }
.fmt-opt[aria-pressed="true"] { border-color: var(--ink); border-width: 1.5px; }
.fmt-opt__name  { font-size: 0.6875rem; font-weight: 700; margin-bottom: 3px; }
.fmt-opt__desc  { font-size: 0.5625rem; opacity: 0.45; line-height: 1.6; }
.fmt-opt__price { font-size: 0.8125rem; font-weight: 700; margin-top: 10px; }

.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--mid); }
.qty-btn  { background: none; border: none; width: 36px; height: 36px; font-size: 1.125rem; color: var(--ink); display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.qty-btn:hover { background: var(--faint); }
.qty-val  { width: 38px; text-align: center; font-size: 0.8125rem; font-weight: 700; }

.btn-add-main {
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: none; padding: 14px 26px;
  transition: opacity 0.2s; margin-right: 8px; margin-bottom: 10px; display: inline-block; width: 100%; text-align: center;
}
.btn-add-main:hover { opacity: 0.78; }
.btn-preview {
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: none; color: var(--ink); border: 1px solid var(--mid); padding: 13px 26px;
  transition: background 0.2s; margin-bottom: 10px; display: block; width: 100%; text-align: center;
}
.btn-preview:hover { background: var(--faint); }
.btn-narrator {
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: none; color: var(--ink); border: 1px solid var(--mid); padding: 13px 26px;
  transition: background 0.2s; margin-bottom: 10px; display: block; width: 100%; text-align: center;
}
.btn-narrator:hover { background: var(--faint); }

.meta-table { width: 100%; margin-bottom: 6px; }
.meta-table td { font-size: 0.6875rem; padding: 6px 0; border-bottom: 1px solid var(--faint); vertical-align: top; }
.meta-table td:first-child { opacity: 0.4; letter-spacing: 0.10em; text-transform: uppercase; width: 110px; font-size: 0.5625rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── READER ── */
.reader { display: none; position: fixed; inset: 0; background: var(--paper); z-index: 500; flex-direction: column; transition: background 0.3s; }
.reader.is-open { display: flex; }
.reader__nav { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gap); border-bottom: 1px solid var(--mid); flex-shrink: 0; height: var(--nav-h); }
.reader__title { font-size: 0.5625rem; letter-spacing: 0.10em; text-transform: uppercase; opacity: 0.5; }
.reader__close { font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; background: none; border: none; color: var(--ink); opacity: 0.45; transition: opacity 0.15s; padding: 8px 12px; }
.reader__close:hover { opacity: 1; }
.reader__body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.reader__text { overflow-y: auto; padding: clamp(28px,5vw,48px) clamp(20px,5vw,40px); border-right: 1px solid var(--mid); }
.reader__section { padding: 36px 0; border-bottom: 1px solid var(--mid); opacity: 0.28; transition: opacity 0.35s; }
.reader__section:last-child { border-bottom: none; }
.reader__section.is-active { opacity: 1; }
.reader__section h3 { font-size: 0.5625rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.4; margin-bottom: 13px; }
.reader__section p  { font-size: 0.875rem; line-height: 1.95; }
.reader__section p + p { margin-top: 13px; }
.reader__image { background: #161613; display: flex; align-items: center; justify-content: center; color: rgba(245,243,238,0.18); font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; line-height: 2.5; position: relative; overflow: hidden; }
.reader__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 32px; }

/* ── CART ── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; min-height: calc(100vh - var(--nav-h)); }
.cart-items  { border-right: 1px solid var(--mid); padding: clamp(24px,5vw,40px) clamp(18px,4vw,32px); }
.cart-items__title { font-size: 1.125rem; font-weight: 700; margin-bottom: 28px; }
.cart-row    { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--mid); }
.cart-row:last-child { border-bottom: none; }
.cart-thumb  { width: 60px; height: 78px; background: var(--faint); display: flex; align-items: center; justify-content: center; font-size: 0.5625rem; opacity: 0.3; text-transform: uppercase; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__title { font-size: 0.8125rem; font-weight: 700; margin-bottom: 3px; }
.cart-item__by    { font-size: 0.5625rem; opacity: 0.45; margin-bottom: 5px; }
.cart-item__fmt   { font-size: 0.5625rem; letter-spacing: 0.10em; text-transform: uppercase; border: 1px solid var(--mid); padding: 2px 6px; opacity: 0.55; display: inline-block; margin-bottom: 10px; }
.cart-item__qty   { display: flex; align-items: center; gap: 7px; }
.cart-item__qty button { background: none; border: 1px solid var(--mid); width: 28px; height: 28px; font-size: 0.875rem; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.cart-item__qty span   { font-size: 0.8125rem; font-weight: 700; min-width: 20px; text-align: center; }
.cart-remove { font-size: 0.5625rem; letter-spacing: 0.10em; text-transform: uppercase; background: none; border: none; color: var(--ink); opacity: 0.35; margin-top: 8px; display: block; padding: 0; transition: opacity 0.15s; }
.cart-remove:hover { opacity: 0.8; }
.cart-price  { font-size: 0.8125rem; font-weight: 700; text-align: right; white-space: nowrap; }
.cart-empty  { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px var(--gap); gap: 14px; text-align: center; opacity: 0.4; }
.cart-empty p { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; }
.cart-summary       { padding: clamp(24px,4vw,40px) clamp(18px,3vw,28px); background: var(--faint); transition: background 0.3s; }
.cart-summary__title { font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.38; margin-bottom: 22px; }
.summary-row         { display: flex; justify-content: space-between; font-size: 0.75rem; padding: 7px 0; border-bottom: 1px solid var(--mid); }
.summary-row--total  { font-weight: 700; font-size: 0.875rem; border-bottom: none; padding-top: 14px; margin-top: 4px; }
.cart-note { font-size: 0.5625rem; opacity: 0.4; margin-top: 16px; line-height: 1.8; }

/* ── SUBMIT ── */
.sub-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--nav-h)); }
.sub-left   { padding: clamp(36px,6vw,64px) clamp(20px,4vw,40px); border-right: 1px solid var(--mid); }
.sub-left h2 { font-size: clamp(1.375rem,4vw,1.75rem); font-weight: 700; line-height: 1.15; margin-bottom: 18px; }
.sub-left p  { font-size: 0.8125rem; line-height: 1.9; opacity: 0.6; margin-bottom: 13px; max-width: 320px; }
.sub-right  { padding: clamp(36px,6vw,64px) clamp(20px,4vw,40px); }
.status-pill { display: inline-block; font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 8px; margin-bottom: 24px; border: 1px solid; }
.status-pill--open { color: #2a5420; border-color: #b8d4b0; background: #e8f0e4; }
.criteria__item { padding: 12px 0; border-bottom: 1px solid var(--mid); font-size: 0.6875rem; opacity: 0.65; display: flex; gap: 12px; align-items: start; }
.criteria__item:last-child { border-bottom: none; }
.criteria__dash { opacity: 0.4; flex-shrink: 0; }
.form-label  { display: block; font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.4; margin-bottom: 6px; }
.form-field  { width: 100%; background: none; border: none; border-bottom: 1px solid var(--mid); font-family: var(--font); font-size: 0.8125rem; color: var(--ink); padding: 9px 0; outline: none; resize: none; transition: border-color 0.2s; margin-bottom: 22px; }
.form-field:focus { border-bottom-color: var(--ink); }
.radio-group  { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 20px; }
.radio-group--2col { grid-template-columns: 1fr 1fr; }
.radio-opt    { border: 1px solid var(--mid); padding: 11px 10px; cursor: pointer; font-size: 0.6875rem; text-align: center; letter-spacing: 0.06em; background: none; color: var(--ink); transition: border-color 0.15s; }
.radio-opt[aria-pressed="true"] { border-color: var(--ink); }

/* ── ABOUT ── */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--nav-h)); }
.about-left   { padding: clamp(40px,6vw,64px) clamp(20px,4vw,40px); border-right: 1px solid var(--mid); }
.about-right  { padding: clamp(40px,6vw,64px) clamp(20px,4vw,40px); }
.about-h2     { font-size: clamp(1.5rem,4vw,2rem); font-weight: 700; line-height: 1.1; margin-bottom: 26px; }
.about-body p { font-size: 0.8125rem; line-height: 1.9; opacity: 0.65; margin-bottom: 14px; }
.features-list { display: flex; flex-direction: column; }
.feature-item  { padding: 12px 0; border-bottom: 1px solid var(--mid); font-size: 0.8125rem; }
.feature-item:last-child { border-bottom: none; }
.print-specs   { border: 1px solid var(--mid); padding: 18px; margin-bottom: 22px; }
.print-specs__label { font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.35; margin-bottom: 10px; }
.print-specs table { width: 100%; font-size: 0.6875rem; }
.print-specs td     { padding: 6px 0; border-bottom: 1px solid var(--faint); }
.print-specs td:first-child { opacity: 0.45; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.5625rem; }
.print-specs tr:last-child td { border-bottom: none; }

/* ── SEARCH ── */
.search-header { padding: 14px var(--gap); border-bottom: 1px solid var(--mid); font-size: 0.6875rem; opacity: 0.55; }
.search-result-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 16px var(--gap); border-bottom: 1px solid var(--mid); cursor: pointer; transition: background 0.15s; }
.search-result-row:hover { background: rgba(14,14,13,0.025); }
.search-result-row__title { font-size: 0.9375rem; font-weight: 700; margin-bottom: 3px; }
.search-result-row__by    { font-size: 0.5625rem; opacity: 0.45; }
.search-result-row__price { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }

/* ── TOAST ── */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(70px); background: var(--ink); color: var(--paper); font-family: var(--font); font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 11px 22px; opacity: 0; transition: all 0.3s; z-index: 999; pointer-events: none; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FONT INDICATOR ── */
.font-indicator { position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: var(--paper); font-family: var(--font); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 18px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity 0.3s; }

/* ── FOOTER ── */
.site-footer { padding: 16px var(--gap); border-top: 1px solid var(--mid); display: flex; justify-content: space-between; align-items: center; font-size: 0.5625rem; opacity: 0.32; letter-spacing: 0.10em; text-transform: uppercase; flex-wrap: wrap; gap: 8px; }

/* ══════════════════════════════════
   RESPONSIVE — TABLET ≤900px
══════════════════════════════════ */
@media (max-width: 900px) {
  .nav__tabs      { display: none; }
  .nav__font-ctrl { display: none; }
  .nav__theme-btn { display: none; }
  .nav__burger    { display: flex; }
  .nav__search    { width: 110px; border-left: none; padding: 0 10px; }
  .nav__search:focus { width: 140px; }

  .hero     { grid-template-columns: 1fr; gap: 24px; }
  .hero__meta { text-align: left; }
  .hero__cta  { justify-content: flex-start; }

  .featured { grid-template-columns: 1fr 1fr; }
  .feat-card:last-child { display: none; }
  .feat-card:nth-child(2) { border-right: none; }

  .how { grid-template-columns: 1fr; }
  .how__col:first-child { border-right: none; border-bottom: 1px solid var(--mid); }

  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-card:nth-child(4n) { border-right: 1px solid var(--mid); }
  .cat-card:nth-child(2n) { border-right: none; }

  .fmt-grid { grid-template-columns: 1fr 1fr; }

  /* Detail page: gallery moves above info panel, modest sticky height */
  .det__layout { grid-template-columns: 1fr; }
  .det__gallery { position: sticky; top: var(--nav-h); height: 46vh; }
  .det__info { max-height: none; overflow: visible; }

  .reader__body  { grid-template-columns: 1fr; }
  .reader__image { display: none; }

  .cart-layout { grid-template-columns: 1fr; }
  .cart-items  { border-right: none; border-bottom: 1px solid var(--mid); }

  .sub-layout  { grid-template-columns: 1fr; }
  .sub-left    { border-right: none; border-bottom: 1px solid var(--mid); }

  .about-layout { grid-template-columns: 1fr; }
  .about-left   { border-right: none; border-bottom: 1px solid var(--mid); }
}

/* ══════════════════════════════════
   RESPONSIVE — MOBILE ≤600px
══════════════════════════════════ */
@media (max-width: 600px) {
  .nav__logo em { display: none; }
  .nav__search  { width: 80px; font-size: 0.625rem; }
  .nav__search:focus { width: 100px; }

  .hero__h1 { font-size: 2.375rem; }

  .featured { grid-template-columns: 1fr; }
  .feat-card { border-right: none; border-bottom: 1px solid var(--mid); }
  .feat-card:last-child  { display: block; border-bottom: none; }
  .feat-card:nth-child(2){ border-right: none; }
  .feat-card__cover { aspect-ratio: 4/3; }

  .cat-grid { grid-template-columns: 1fr 1fr; }

  .det__gallery { height: 36vh; }
  .det__gallery-thumbs { height: 52px; }
  .fmt-grid { grid-template-columns: 1fr; }
  .fmt-opt  { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .fmt-opt__desc  { display: none; }
  .fmt-opt__price { margin-top: 0; }

  .radio-group { grid-template-columns: 1fr; }
  .radio-group--2col { grid-template-columns: 1fr 1fr; }

  .cart-row { grid-template-columns: 48px 1fr; }
  .cart-price { display: none; }

  .search-result-row { grid-template-columns: 1fr; gap: 6px; }
  .search-result-row__price { display: none; }

  .toast { left: 16px; right: 16px; bottom: 16px; transform: translateY(60px); text-align: center; white-space: normal; }
  .toast.is-visible { transform: translateY(0); }
}

/* ══════════════════════════════════
   RESPONSIVE — SMALL ≤400px
══════════════════════════════════ */
@media (max-width: 400px) {
  .hero__h1 { font-size: 2rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card:nth-child(n) { border-right: none; }
}

/* ══════════════════════════════════
   LARGE ≥1400px
══════════════════════════════════ */
@media (min-width: 1400px) {
  .cat-grid { grid-template-columns: repeat(5,1fr); }
  .cat-card:nth-child(4n) { border-right: 1px solid var(--mid); }
  .cat-card:nth-child(5n) { border-right: none; }
  .featured { grid-template-columns: repeat(4,1fr); }
}

/* ── PRINT ── */
@media print {
  .nav, .reader__nav, .nav__cart, .btn-add-main, .btn-preview, .det__back { display: none !important; }
  .det__layout { grid-template-columns: 1fr; }
  .det__gallery { position: static; height: auto; }
  .page { margin-top: 0; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .marquee__inner { animation: none; }
  * { transition: none !important; }
}
