:root {
  color-scheme: light;
  --paper: #fdf8ec;
  --ink: #241d12;
  --tag: #ffd43b;
  --price: #e0312e;
  --free: #1f7a4d;
  --muted: #6e6046;
  --muted-soft: #8a7c5d;
  --kindle: #c47f00;
  --cmoa: #d84f74;
  --dmm: #3976d6;
  --card: #fff;
  --shadow: #e8ddc4;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; line-height: 1.6; font-feature-settings: "palt"; }
a { color: inherit; text-underline-offset: .18em; }
a:focus-visible { outline: 3px solid var(--dmm); outline-offset: 3px; }
header, main, footer { width: min(100% - 32px, 980px); margin-inline: auto; }
header { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 3px solid var(--ink); flex-wrap: wrap; }
header nav { display: flex; gap: 14px; margin-left: auto; font-size: .86rem; font-weight: 800; }
.brand { font-size: 1.7rem; font-weight: 900; letter-spacing: .02em; text-decoration: none; }
.brand span { display: inline-block; margin-right: .05em; padding: .02em .18em; background: var(--tag); border-radius: .2em; box-shadow: 2px 2px 0 var(--ink); }
.tagline { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 700; }
main { min-height: 68vh; padding-bottom: 20px; }
h1, h2, h3 { line-height: 1.35; overflow-wrap: anywhere; }
.hero { padding: 26px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.55rem, 5vw, 2.25rem); font-weight: 900; text-wrap: balance; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.stats b { color: var(--price); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 18px 0 14px; color: var(--muted); font-size: .82rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.filter, .status { padding: .4rem .75rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; font-size: .83rem; font-weight: 800; text-decoration: none; }
.filter.active { background: var(--ink); color: #fff; }
.pickup { display: flex; align-items: center; gap: 18px; margin: 20px 0 24px; padding: 18px; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--shadow); }
.pickup-body { flex: 1; min-width: 0; }
.pickup h2 { margin: .2rem 0 .3rem; font-size: 1.2rem; font-weight: 900; }
.kicker { display: inline-block; padding: .2rem .6rem; color: #fff; background: var(--price); border-radius: 999px; font-size: .78rem; font-weight: 900; }
.pickup-why { max-width: 54ch; margin: 0 0 10px; color: #5c5340; font-size: .88rem; }
.price-tag { position: relative; display: inline-flex; align-items: baseline; gap: 10px; padding: .45rem .8rem .45rem 1.5rem; background: var(--tag); border-radius: 8px; box-shadow: 2px 2px 0 var(--ink); font-weight: 900; font-variant-numeric: tabular-nums; }
.price-tag::before { position: absolute; left: .55rem; width: .45rem; height: .45rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; content: ""; }
.price-tag .off { color: var(--price); font-size: 1.3rem; }
.price-tag s { color: var(--muted-soft); font-size: .85rem; }
.price-tag strong { font-size: 1.25rem; }
.pickup-buy { display: inline-block; margin-left: 10px; }
.sale-market { margin: 30px 0; }
.obi { display: flex; align-items: center; gap: 8px 12px; margin-bottom: 4px; padding: .2rem 0 .2rem 12px; border-left: 10px solid var(--tag); flex-wrap: wrap; }
.obi h2 { flex: 1 1 360px; margin: 0; font-size: 1.18rem; font-weight: 900; }
.obi h2 a { text-decoration-thickness: 1px; }
.countdown { color: var(--price); font-size: .82rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.sale-comment { max-width: 72ch; margin: .3rem 0 14px; color: #5c5340; font-size: .9rem; }
.item-grid, .sale-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); gap: 14px; }
.item-card, .sale-card { position: relative; min-width: 0; padding: 12px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow); }
.item-card { display: flex; flex-direction: column; }
.item-layout { display: flex; align-items: flex-start; gap: 11px; }
.item-body { min-width: 0; flex: 1; }
.item-card h2, .item-card h3 { margin: 5px 0 2px; font-size: .95rem; font-weight: 800; }
.sale-card h2 { margin: 8px 0 4px; font-size: 1.05rem; font-weight: 900; }
.off-corner { position: absolute; z-index: 2; top: -10px; right: 10px; padding: .18rem .5rem; color: #fff; background: var(--price); border-radius: 6px; box-shadow: 1px 2px 0 var(--ink); font-size: .88rem; font-weight: 900; font-variant-numeric: tabular-nums; transform: rotate(3deg); }
.off-corner.free { background: var(--free); }
.book-cover { width: 76px; height: 108px; flex: 0 0 76px; border-radius: 5px 8px 8px 5px; box-shadow: inset -6px 0 8px -6px #0009, 2px 3px 8px #0002; }
.pickup-cover { width: 96px; height: 136px; flex-basis: 96px; }
.real-cover { display: block; object-fit: cover; background: #eee7d8; }
.pseudo-cover { display: flex; align-items: flex-start; justify-content: flex-end; padding: 9px 7px; color: #fff; writing-mode: vertical-rl; font-size: .75rem; font-weight: 800; line-height: 1.35; overflow: hidden; }
.pseudo-cover span { max-height: 100%; overflow: hidden; }
.cover-manga { background: linear-gradient(160deg, #e8702a, #b23a12); }
.cover-business { background: linear-gradient(160deg, #2c5f8a, #1c3d5a); }
.cover-literature { background: linear-gradient(160deg, #5c558f, #312c60); }
.cover-psychology { background: linear-gradient(160deg, #b45578, #73314e); }
.cover-culture { background: linear-gradient(160deg, #92713a, #59421f); }
.cover-blue { background: linear-gradient(160deg, #387e9b, #205064); }
.cover-rust { background: linear-gradient(160deg, #b85d39, #76331e); }
.cover-green { background: linear-gradient(160deg, #4a8f5d, #2b6141); }
.cover-purple { background: linear-gradient(160deg, #87558e, #503056); }
.badge, .timing { display: inline-block; padding: .14rem .55rem; color: #fff; border-radius: 4px; font-size: .73rem; font-weight: 900; }
.badge-kindle { background: var(--kindle); }
.badge-cmoa { background: var(--cmoa); }
.badge-dmm { background: var(--dmm); }
.timing { border-radius: 999px; }
.timing-new { background: var(--free); }
.timing-ending { background: var(--price); }
.author, .updated, .tags { color: var(--muted-soft); font-size: .78rem; }
.author { margin: 0 0 7px; }
.updated { overflow-wrap: anywhere; }
.tags { margin: 6px 0 0; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 6px 0; font-weight: 900; font-variant-numeric: tabular-nums; }
.price .now strong { color: var(--price); font-size: 1.14rem; }
.price .now .free { color: var(--free); }
.price s { color: var(--muted-soft); font-size: .77rem; font-weight: 700; }
.buy { display: block; min-height: 42px; margin-top: auto; padding: .62rem .7rem; color: #fff; background: var(--ink); border-radius: 7px; text-align: center; text-decoration: none; font-size: .8rem; font-weight: 800; }
.notice { padding: 1rem; background: #fff2bd; border-left: 5px solid var(--tag); }
footer { margin-top: 28px; padding: 14px 0 26px; color: var(--muted); border-top: 3px solid var(--ink); font-size: .78rem; }

@media (max-width: 700px) {
  header { align-items: flex-start; }
  .tagline { order: 3; width: 100%; }
  .pickup { align-items: flex-start; }
  .pickup-buy { display: block; margin: 12px 0 0; }
}

@media (max-width: 420px) {
  header, main, footer { width: min(100% - 24px, 980px); }
  header nav { width: 100%; margin-left: 0; justify-content: space-between; }
  .pickup { display: grid; grid-template-columns: 82px minmax(0, 1fr); padding: 14px; gap: 12px; overflow: hidden; }
  .pickup-body { max-width: 100%; overflow: hidden; }
  .pickup-cover { width: 82px; height: 116px; flex-basis: 82px; }
  .price-tag { gap: 4px 6px; width: 100%; justify-content: center; padding-left: 1.25rem; flex-wrap: wrap; }
  .price-tag .off { font-size: 1.05rem; }
  .price-tag strong { font-size: 1.05rem; }
  .obi { align-items: flex-start; }
  .obi h2 { flex-basis: 100%; font-size: 1.05rem; }
  .item-grid, .sale-list { grid-template-columns: 1fr; }
  .book-cover { width: 82px; height: 116px; flex-basis: 82px; }
}

/* サイトロゴ(Xヘッダー由来・ビルド毎ランダム) */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { width: min(430px, 78vw); height: auto; display: block; border: 2px solid var(--ink); border-radius: 12px; }

/* Xフォローリンク */
.nav-x { background: var(--ink); color: #fff !important; padding: .3rem .7rem; border-radius: 999px; }
.footer-x a { font-weight: 800; }
