/* =========================================================
   積ん読堂 — design system
   「紙とインクと朱色」editorial bookstore
   ========================================================= */

:root {
  /* paper & ink */
  --paper:      #f4ede0;
  --paper-2:    #efe6d6;
  --paper-3:    #e9dec9;
  --card:       #fbf6ec;
  --ink:        #221c15;
  --ink-soft:   #4c4338;
  --muted:      #8a7c69;
  --line:       #ddd0b8;
  --line-soft:  #e7ddca;

  /* accents */
  --accent:      #bb4530;   /* 朱 vermilion */
  --accent-deep: #8f3120;
  --accent-tint: #f0d9cd;
  --pine:        #2d4636;   /* deep green */
  --pine-soft:   #51624f;
  --gold:        #b0883e;

  /* type */
  --serif-jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --serif-en: "Fraunces", Georgia, serif;
  --sans-jp:  "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;

  --shadow-sm: 0 2px 10px rgba(40, 30, 18, .08);
  --shadow-md: 0 14px 40px rgba(40, 30, 18, .16);
  --shadow-lg: 0 28px 70px rgba(40, 30, 18, .22);

  --radius: 4px;
  --maxw: 1200px;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans-jp);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(120, 96, 60, .045) 1px, transparent 1px);
  background-size: 4px 4px;
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--serif-jp); font-weight: 600; line-height: 1.35; margin: 0; letter-spacing: .02em; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.bg-alt { background: var(--paper-2); }
.bg-ink { background: var(--ink); color: #f3ebdd; }
.bg-pine { background: var(--pine); color: #eef0e7; }

/* ---------- editorial section heading ---------- */
.shead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.shead__main { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.shead__num { font-family: var(--serif-en); font-size: 1rem; color: var(--accent); letter-spacing: .15em; }
.shead__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.shead__en { display: block; font-family: var(--serif-en); font-style: italic; font-size: .82rem; letter-spacing: .18em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }
.shead__more { font-size: .85rem; color: var(--accent-deep); white-space: nowrap; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: gap .2s; }
.shead__more:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-size: .92rem; letter-spacing: .06em; border-radius: var(--radius);
  transition: transform .18s ease, background .2s, color .2s, box-shadow .2s; line-height: 1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff5ee; }
.btn--accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--pine { background: var(--pine); border-color: var(--pine); color: #eef0e7; }
.btn--ghost { background: transparent; }
.btn--light { border-color: #f3ebdd; color: #f3ebdd; }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 34px; font-size: 1rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- top announcement bar ---------- */
.topbar {
  background: var(--ink); color: #efe4d2; font-size: .76rem; letter-spacing: .14em;
  text-align: center; padding: 7px 12px;
}
.topbar span { font-family: var(--serif-en); font-style: italic; color: var(--gold); }

/* ================= HEADER ================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244,237,224,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px rgba(40,30,18,.08); }
.header-inner { display: flex; align-items: center; gap: 22px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__seal {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff3ea; display: grid; place-items: center;
  font-family: var(--serif-jp); font-size: 1.1rem; box-shadow: inset 0 0 0 2px rgba(255,243,234,.5);
  transform: rotate(-4deg);
}
.brand__name { font-family: var(--serif-jp); font-size: 1.32rem; letter-spacing: .08em; line-height: 1; }
.brand__sub { display: block; font-family: var(--serif-en); font-style: italic; font-size: .62rem; letter-spacing: .28em; color: var(--muted); margin-top: 3px; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { position: relative; padding: 8px 14px; font-size: .92rem; letter-spacing: .04em; }
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--accent-deep); }

/* dropdown */
.has-drop { position: relative; }
.drop { position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-md); border-radius: var(--radius); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .22s; }
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a { display: block; padding: 9px 14px; font-size: .88rem; border-radius: var(--radius); }
.drop a::after { display: none; }
.drop a:hover { background: var(--paper-2); color: var(--accent-deep); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--card); border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--ink); transition: .2s; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; }
.cart-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; background: var(--accent); color: #fff; border-radius: 999px; font-size: .68rem; font-family: var(--serif-en); display: grid; place-items: center; line-height: 1; }
.cart-badge:empty, .cart-badge[data-count="0"] { display: none; }

.hamburger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 0; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--ink); transition: .3s; }

/* mobile drawer (CSS-only via #drawer-toggle checkbox) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(34,28,21,.5); opacity: 0; visibility: hidden; transition: .3s; z-index: 60; cursor: pointer; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(82vw, 340px); background: var(--paper); transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1); z-index: 70; padding: 24px; overflow-y: auto; box-shadow: var(--shadow-lg); }
.drawer-toggle:checked ~ .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-toggle:checked ~ .drawer { transform: translateX(0); }
.drawer__close { margin-left: auto; display: block; background: none; border: none; font-size: 1.7rem; color: var(--ink); line-height: 1; cursor: pointer; }
.drawer__group-title { font-family: var(--serif-en); font-style: italic; font-size: .72rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin: 22px 0 6px; }
.drawer nav a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--line-soft); font-size: 1.02rem; font-family: var(--serif-jp); }

/* ================= HERO ================= */
.hero { position: relative; overflow: hidden; padding: 0; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 600px; }
.hero__media { position: relative; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(34,28,21,.22), transparent 55%); }
.hero__body { background: var(--paper-2); display: flex; flex-direction: column; justify-content: center; padding: 60px clamp(28px, 5vw, 84px); position: relative; }
.hero__kicker { font-family: var(--serif-en); font-style: italic; letter-spacing: .2em; color: var(--accent); font-size: .9rem; margin-bottom: 18px; }
.hero__title { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.45; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead { color: var(--ink-soft); margin: 22px 0 34px; max-width: 30ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__vlabel {
  position: absolute; top: 42px; right: 34px; writing-mode: vertical-rl;
  font-family: var(--serif-jp); letter-spacing: .35em; color: rgba(34,28,21,.32);
  font-size: .82rem;
}

/* ================= BOOK CARD / GRID ================= */
.book-grid { display: grid; gap: 30px 26px; grid-template-columns: repeat(4, 1fr); }
.book-grid--3 { grid-template-columns: repeat(3, 1fr); }

.book-card { display: flex; flex-direction: column; }
.book-card__cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--paper-3); box-shadow: var(--shadow-sm); }
.book-card__cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0)); z-index: 2; }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.book-card:hover .book-card__cover img { transform: scale(1.06); }
.book-tag { position: absolute; top: 10px; left: 10px; z-index: 3; background: var(--accent); color: #fff5ee; font-size: .66rem; letter-spacing: .12em; padding: 4px 9px; border-radius: 2px; }
.book-tag--soldout { background: var(--ink); }
.book-card__cat { font-family: var(--serif-en); font-style: italic; font-size: .72rem; letter-spacing: .14em; color: var(--muted); margin: 14px 0 4px; }
.book-card__title { font-size: 1.04rem; line-height: 1.5; }
.book-card a.book-card__title:hover { color: var(--accent-deep); }
.book-card__author { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.book-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.price { font-family: var(--serif-en); font-size: 1.18rem; color: var(--ink); }
.price span { font-family: var(--sans-jp); font-size: .72rem; color: var(--muted); margin-left: 2px; }
.stars { color: var(--gold); font-size: .85rem; letter-spacing: .05em; }
.stars small { color: var(--muted); margin-left: 4px; font-size: .72rem; }

/* ================= CATEGORY TILES ================= */
.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.cat-tile { position: relative; aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat-tile:hover img { transform: scale(1.07); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(34,28,21,.72), rgba(34,28,21,.05) 65%); }
.cat-tile__body { position: absolute; left: 22px; bottom: 18px; right: 22px; z-index: 2; color: #f6efe2; }
.cat-tile__name { font-family: var(--serif-jp); font-size: 1.3rem; }
.cat-tile__lead { font-size: .8rem; opacity: .85; margin-top: 2px; }
.cat-tile__arrow { position: absolute; right: 18px; top: 16px; z-index: 2; color: #fff; opacity: .8; }

/* ================= NEWS ================= */
.news-grid { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); }
.news-card { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.news-card__img { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-card__img img { transform: scale(1.05); }
.news-meta { display: flex; gap: 12px; align-items: center; font-size: .76rem; color: var(--muted); margin-bottom: 8px; }
.news-meta .tag-pill { background: var(--pine); color: #eef0e7; padding: 3px 10px; border-radius: 2px; letter-spacing: .08em; }
.news-card__title { font-size: 1.12rem; line-height: 1.5; margin-bottom: 8px; }
.news-card:hover .news-card__title { color: var(--accent-deep); }
.news-card__exc { font-size: .86rem; color: var(--ink-soft); }

/* ================= BADGES / PILLS / FILTERS ================= */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .85rem; color: var(--ink-soft); transition: .2s; }
.pill:hover { border-color: var(--accent); color: var(--accent-deep); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: #f3ebdd; }
.tag-chip { display: inline-block; font-size: .72rem; color: var(--pine-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; margin: 0 6px 6px 0; }

/* ================= PAGE HEADER / BREADCRUMB ================= */
.page-head { padding: 46px 0 30px; }
.breadcrumb { font-size: .78rem; color: var(--muted); margin-bottom: 14px; letter-spacing: .04em; }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb span { margin: 0 8px; opacity: .5; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-title__en { display: block; font-family: var(--serif-en); font-style: italic; font-size: .85rem; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }

/* category banner */
.cat-banner { position: relative; height: 320px; overflow: hidden; }
.cat-banner img { width: 100%; height: 100%; object-fit: cover; }
.cat-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(34,28,21,.7), rgba(34,28,21,.15)); }
.cat-banner__body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; color: #f6efe2; }
.cat-banner__body .container { width: min(100% - 40px, var(--maxw)); }
.cat-banner h1 { font-size: clamp(2rem, 5vw, 3rem); }
.cat-banner p { max-width: 36ch; opacity: .9; margin-top: 8px; }

/* ================= TOOLBAR (listing) ================= */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.list-count { font-size: .85rem; color: var(--muted); }
.list-count b { font-family: var(--serif-en); color: var(--ink); font-size: 1.05rem; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding: 10px 38px 10px 16px; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); font-family: inherit; font-size: .86rem; color: var(--ink); }
.select-wrap::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }

/* ================= BOOK DETAIL ================= */
.detail { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.detail__media { position: relative; }
.detail__cover { aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); position: relative; }
.detail__cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: linear-gradient(90deg, rgba(0,0,0,.25), transparent); z-index: 2; }
.detail__cover img { width: 100%; height: 100%; object-fit: cover; }
.detail__cat { font-family: var(--serif-en); font-style: italic; letter-spacing: .14em; color: var(--accent); font-size: .82rem; }
.detail__title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 10px 0; }
.detail__author { color: var(--ink-soft); font-size: 1rem; }
.detail__author a { color: var(--accent-deep); border-bottom: 1px solid var(--line); }
.detail__price { font-family: var(--serif-en); font-size: 2rem; margin: 22px 0 6px; }
.detail__price span { font-family: var(--sans-jp); font-size: .8rem; color: var(--muted); }
.detail__desc { color: var(--ink-soft); margin: 22px 0; line-height: 2; }
.spec-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: .88rem; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec-table th { width: 34%; color: var(--muted); font-weight: 500; }
.buy-row { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-top: 8px; }

/* qty stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.qty button { width: 42px; height: 48px; border: none; background: transparent; font-size: 1.2rem; color: var(--ink); }
.qty button:hover { background: var(--paper-2); color: var(--accent); }
.qty input { width: 46px; height: 48px; border: none; text-align: center; font-family: var(--serif-en); font-size: 1.1rem; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ================= CART ================= */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 44px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.cart-line__cover { aspect-ratio: 2/3; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cart-line__cover img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__title { font-family: var(--serif-jp); font-size: 1.05rem; }
.cart-line__author { font-size: .8rem; color: var(--muted); margin: 3px 0 12px; }
.cart-line__controls { display: flex; align-items: center; gap: 18px; }
.cart-line__remove { background: none; border: none; color: var(--muted); font-size: .8rem; border-bottom: 1px solid transparent; }
.cart-line__remove:hover { color: var(--accent); border-color: var(--accent); }
.cart-line__price { font-family: var(--serif-en); font-size: 1.15rem; text-align: right; min-width: 90px; }

.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: calc(var(--header-h) + 20px); }
.summary h3 { font-size: 1.2rem; margin-bottom: 18px; }
.summary__row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .9rem; color: var(--ink-soft); }
.summary__row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-size: 1.05rem; color: var(--ink); }
.summary__row.total b { font-family: var(--serif-en); font-size: 1.5rem; }
.summary__note { font-size: .76rem; color: var(--muted); margin: 14px 0 20px; line-height: 1.7; }
.ship-bar { height: 6px; background: var(--paper-3); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.ship-bar > i { display: block; height: 100%; background: var(--pine); transition: width .4s; }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state__mark { font-family: var(--serif-jp); font-size: 3rem; color: var(--accent); opacity: .5; }

/* ================= FORMS ================= */
.form-grid { display: grid; gap: 20px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.col-span-2 { grid-column: 1 / -1; }
.field label { font-size: .82rem; color: var(--ink-soft); letter-spacing: .03em; }
.field label .req { color: var(--accent); margin-left: 4px; font-size: .72rem; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.field textarea { resize: vertical; min-height: 130px; }
.field .err { color: var(--accent-deep); font-size: .76rem; min-height: 1em; }
.field.invalid input, .field.invalid textarea { border-color: var(--accent); }

.radio-cards { display: grid; gap: 12px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--card); cursor: pointer; transition: .2s; }
.radio-card:hover { border-color: var(--accent); }
.radio-card input { margin-top: 4px; accent-color: var(--accent); }
.radio-card.is-checked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.radio-card__t { font-weight: 500; }
.radio-card__d { font-size: .8rem; color: var(--muted); margin-top: 2px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.fset { margin-bottom: 38px; }
.fset__title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fset__title .n { font-family: var(--serif-en); color: var(--accent); }
.fset__title h3 { font-size: 1.25rem; }

.mini-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); align-items: center; font-size: .85rem; }
.mini-line img { width: 42px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px; }
.mini-line__q { color: var(--muted); }
.mini-line__p { margin-left: auto; font-family: var(--serif-en); }

/* ================= TABS (login) — CSS-only via radio inputs ================= */
.tabs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 5px; background: var(--paper-2); margin-bottom: 28px; }
.tabs__btn { flex: 1; padding: 11px; border: none; background: transparent; border-radius: 999px; font-size: .92rem; color: var(--ink-soft); transition: .2s; cursor: pointer; text-align: center; }
.tab-panel { display: none; }

/* radio input が checked のときに対応するタブとパネルをアクティブに */
#auth-tab-login:checked ~ .tabs label[for="auth-tab-login"],
#auth-tab-register:checked ~ .tabs label[for="auth-tab-register"] {
  background: var(--ink); color: #f3ebdd;
}
#auth-tab-login:checked ~ .tab-panel[data-panel="login"],
#auth-tab-register:checked ~ .tab-panel[data-panel="register"] {
  display: block; animation: fade .35s ease;
}
.auth-card { max-width: 460px; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 36px; box-shadow: var(--shadow-sm); }
.auth-aside { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 18px; }
.auth-aside a { color: var(--accent-deep); border-bottom: 1px solid var(--line); }

/* ================= FAQ accordion ================= */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 8px; position: relative; font-family: var(--serif-jp); font-size: 1.06rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; font-family: var(--serif-en); color: var(--accent); margin-right: 12px; font-style: italic; }
.faq-item summary::after { content: "+"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--muted); transition: transform .25s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item__a { padding: 0 8px 24px 34px; color: var(--ink-soft); font-size: .92rem; }

/* ================= ABOUT ================= */
.about-hero { position: relative; height: 420px; overflow: hidden; border-radius: var(--radius); }
.about-hero img { width: 100%; height: 100%; object-fit: cover; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split--alt { direction: rtl; }
.split--alt > * { direction: ltr; }
.split__img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.split__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.lead-quote { font-family: var(--serif-jp); font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.9; color: var(--ink); }
.lead-quote em { color: var(--accent); font-style: normal; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat__n { font-family: var(--serif-en); font-size: 2.6rem; color: var(--accent); line-height: 1; }
.stat__l { font-size: .82rem; color: var(--muted); margin-top: 8px; letter-spacing: .08em; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; vertical-align: top; }
.info-table th { width: 26%; color: var(--muted); font-weight: 500; }
.map-embed { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); filter: grayscale(.25); }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* staff / generic feature strip */
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-cell img { aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.feature-cell h4 { margin: 14px 0 6px; font-size: 1.1rem; }
.feature-cell p { font-size: .86rem; color: var(--ink-soft); }

/* newsletter CTA */
.cta-band { text-align: center; padding: 80px 20px; }
.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 12px; }
.cta-band p { color: rgba(243,235,221,.78); max-width: 46ch; margin: 0 auto 28px; }
.cta-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.cta-form input { flex: 1; padding: 14px 16px; border: 1px solid rgba(243,235,221,.3); background: rgba(243,235,221,.06); color: #f3ebdd; border-radius: var(--radius); font-family: inherit; }
.cta-form input::placeholder { color: rgba(243,235,221,.5); }

/* ================= FOOTER ================= */
.site-footer { background: var(--ink); color: #d8cbb6; padding: 64px 0 28px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(243,235,221,.14); }
.footer-brand .brand__name { color: #f3ebdd; }
.footer-brand p { font-size: .84rem; color: #b3a690; margin-top: 16px; max-width: 30ch; line-height: 1.8; }
.footer-col h4 { font-family: var(--serif-en); font-style: italic; font-size: .8rem; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin-bottom: 16px; }
.footer-col a { display: block; font-size: .86rem; color: #cbbda7; padding: 6px 0; transition: .2s; }
.footer-col a:hover { color: #f3ebdd; padding-left: 4px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: .76rem; color: #9b8e79; flex-wrap: wrap; gap: 10px; }
.footer-bottom .serif-en { font-family: var(--serif-en); font-style: italic; }

/* ================= TOAST ================= */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { background: var(--ink); color: #f3ebdd; padding: 14px 22px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .88rem; display: flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(20px); transition: .3s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ================= REVEAL ANIMATION ================= */
/* デフォルトは「最初から表示」。JS なし & animation-timeline 非対応ブラウザでも崩れない。 */
.reveal { opacity: 1; transform: none; }

@keyframes reveal-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }

/* スクロール連動アニメーションをサポートするブラウザでのみ有効化（Chrome/Edge）。 */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
  /* 動きを抑えたい設定の人には何もしない */
  @media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; }
  }
}

/* hero load stagger */
.hero__kicker, .hero__title, .hero__lead, .hero__actions { opacity: 0; animation: heroIn .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero__title { animation-delay: .12s; }
.hero__lead { animation-delay: .24s; }
.hero__actions { animation-delay: .36s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px);} to { opacity: 1; transform: none; } }

/* misc */
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.muted { color: var(--muted); }
.divider-rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.lead-text { font-size: 1.05rem; color: var(--ink-soft); max-width: 60ch; line-height: 2; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1040px) {
  .book-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { min-height: 320px; order: -1; }
  .hero__vlabel { display: none; }
}

@media (max-width: 860px) {
  .main-nav, .header-actions .search-inline { display: none; }
  .hamburger { display: flex; }
  .detail { grid-template-columns: 1fr; gap: 32px; }
  .detail__media { max-width: 300px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .news-grid { grid-template-columns: 1fr; }
  .split, .split--alt { grid-template-columns: 1fr; direction: ltr; gap: 26px; }
  .feature-strip { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .book-grid, .book-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
  .cat-grid { grid-template-columns: 1fr; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .news-card { grid-template-columns: 110px 1fr; gap: 14px; }
  .stat-row { grid-template-columns: 1fr; gap: 18px; }
  .cta-form { flex-direction: column; }
  .shead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cart-line { grid-template-columns: 70px 1fr; }
  .cart-line__price { grid-column: 2; text-align: left; }
  :root { --header-h: 64px; }
}
