/* 買い時ログ 共通のスタイル
   スマホ（〜767px）は design/ のHTML（幅390px）と同じ見た目。
   タブレット（768px〜）は幅720pxの列、PC（1024px〜）は幅1120pxで段組みにする。 */
:root {
  --ink: #111111; --sub: #555555; --line: #E3E3E3; --band: #F2F2F2;
  --red: #C8161D; --red-bg: #FBE3E4; --ph: #D9D9D9;
  --font: 'Hiragino Sans', 'Noto Sans JP', 'Noto Sans CJK JP', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: #FFFFFF; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6; }
a { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.palt { font-feature-settings: 'palt'; }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.jp { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- ヘッダー ---------- */
.hd { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.hd-in { display: flex; flex-wrap: wrap; align-items: center; }
.logo { flex: 1 0 100%; display: flex; align-items: center; height: 47px; padding: 0 16px; border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 700; text-decoration: none; font-feature-settings: 'palt'; }
.tabs { flex: 1 0 100%; display: flex; gap: 20px; padding: 0 16px; font-size: 14px; }
.tabs a { min-height: 44px; display: flex; align-items: center; color: var(--sub); text-decoration: none; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
.hd--item .logo { border-bottom: 0; }
.hd--item .tabs { display: none; }
@media (max-width: 340px) { .tabs { gap: 14px; font-size: 13px; } }

/* ---------- 本文の並び（スマホは白い区画を8pxの灰色の帯で区切る） ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; background: var(--band); }
.card { min-width: 0; background: #FFFFFF; padding: 20px 16px 22px; }
.card--title { padding: 22px 16px 22px; }
.card.hero { padding-bottom: 26px; }

/* ---------- 文字 ---------- */
.h1 { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 700; font-feature-settings: 'palt'; }
.h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; font-feature-settings: 'palt'; }
.h3 { margin: 16px 0 0; font-size: 14px; line-height: 20px; font-weight: 700; }
.eyebrow { margin: 0; font-size: 12px; line-height: 1.75; color: var(--sub); }
.p { margin: 8px 0 0; font-size: 14px; line-height: 1.75; }
.note { margin: 8px 0 0; font-size: 12px; line-height: 1.75; color: var(--sub); }
.more { margin-top: 10px; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; text-underline-offset: 4px; }

/* ---------- ボタン ---------- */
.btn { margin-top: 16px; width: 100%; height: 52px; border: 0; border-radius: 4px; background: var(--ink); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; text-decoration: none; }
.btn .pr { font-size: 10px; font-weight: 400; color: #BBBBBB; }
.btn-line { margin-top: 12px; height: 48px; border: 1px solid var(--ink); border-radius: 4px; background: #FFFFFF; color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; text-decoration: none; }
.btn-line .pr { font-size: 10px; font-weight: 400; color: var(--sub); }
.btn-line--first { margin-top: 16px; }

/* ---------- 2列の表（見出し | 内容） ---------- */
.dt { margin: 12px 0 0; display: grid; grid-template-columns: var(--dtw, 128px) minmax(0, 1fr); font-size: 13px; line-height: 20px;
  border-bottom: 1px solid var(--line); }
.dt > dt { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); color: var(--sub); word-break: keep-all; overflow-wrap: anywhere; }
.dt > dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.dt .sub { display: block; font-size: 12px; line-height: 18px; color: var(--sub); }
.dt--14 { font-size: 14px; }

/* ---------- 凡例 ---------- */
.legend { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; line-height: 16px; color: var(--sub); }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.sw--wide { width: 14px; }
.sw--hot { background: var(--red); }
.sw--mid { background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red); }
.sw--now { box-shadow: inset 0 0 0 2px var(--ink); }
.sw--black { background: var(--ink); }

/* ---------- トップ: 月ごとの大きなセール ---------- */
.mg { margin-top: 10px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.mg > div { height: 66px; padding: 5px 6px; border-radius: 3px; background: var(--red-bg); color: var(--red);
  display: flex; flex-direction: column; justify-content: space-between; }
.mg .m { font-size: 12px; line-height: 16px; font-weight: 700; }
.mg .v { display: block; font-size: 17px; line-height: 20px; font-weight: 700; }
.mg .s { display: block; font-size: 10px; line-height: 14px; }
.mg > .none { background: var(--band); color: var(--sub); }
.mg > .hot { background: var(--red); color: #FFFFFF; }
.mg > .now { box-shadow: inset 0 0 0 2px var(--ink); }
.mg > div { min-width: 0; }
@media (max-width: 389px) { .mg > div { padding: 5px 4px; } }
@media (max-width: 369px) { .mg { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.top-hero { display: grid; grid-template-areas: "text" "cal" "cta"; }
.top-hero .text { grid-area: text; }
.top-hero .cal { grid-area: cal; }
.top-hero .cta { grid-area: cta; }
.top-hero .cal .h3 { margin-top: 20px; }

/* ---------- セール予報 ---------- */
.fc-chart { margin-top: 12px; }
.fc-chart .legend { margin-top: 6px; }
.next-list { margin-top: 6px; border-bottom: 1px solid var(--line); }
.next { padding: 14px 0; border-top: 1px solid var(--line); }
.next .when { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.next .when span { font-size: 18px; line-height: 1.4; font-weight: 700; font-feature-settings: 'palt'; }
.next .when strong { font-size: 14px; color: var(--red); }
.next dl { margin: 6px 0 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); row-gap: 2px; font-size: 13px; line-height: 20px; }
.next dt { color: var(--sub); }
.next dd { margin: 0; }
.hist .dt { --dtw: 120px; }
.choose .dt { --dtw: 124px; }

/* ---------- 支払い方法 ---------- */
.pboxes { margin-top: 14px; display: grid; gap: 10px; }
.pbox { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.pbox .t { margin: 0; font-size: 14px; font-weight: 700; }
.chips { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 4px;
  background: #FFFFFF; font-size: 13px; font-weight: 700; }
.chips .and { font-size: 13px; color: var(--sub); }
.pbox .n { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--sub); }
.pbox .d { margin: 10px 0 0; font-size: 13px; line-height: 1.7; }

/* ---------- フッター ---------- */
.ft { background: var(--band); font-size: 12px; line-height: 1.7; color: var(--sub); }
.ft-in { padding: 14px 16px 28px; }
.ft nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.ft nav a { min-height: 40px; display: flex; align-items: center; color: var(--ink); }
.ft p { margin: 8px 0 0; }
.ft p + p { margin-top: 6px; }

/* ---------- 作品ページ ---------- */
.it-top { padding: 0; }
.adline { margin: 0; padding: 5px 16px; font-size: 11px; line-height: 16px; color: var(--sub); word-break: keep-all; overflow-wrap: anywhere; }
.it-media { position: relative; aspect-ratio: 390 / 262; background: var(--ph); }
.it-media .zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.it-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.vbtn { position: absolute; left: 12px; bottom: 12px; height: 36px; padding: 0 12px 0 10px; border: 0; border-radius: 4px;
  background: rgba(17, 17, 17, 0.85); color: #FFFFFF; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.thumbs { padding: 6px 16px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.thumbs button { aspect-ratio: 4 / 3; width: 100%; padding: 0; border: 0; background: var(--ph); cursor: zoom-in; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.thumbs .rest { border: 1px solid #BBBBBB; background: #FFFFFF; color: var(--ink); font-size: 12px; cursor: pointer; }
.it-head { padding: 14px 16px 0; }
.it-title { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 700; font-feature-settings: 'palt'; }
.it-meta { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: var(--sub); }
.it-meta span { display: inline-block; max-width: 100%; }
.it-verdict { padding: 22px 16px 24px; }
.verdict { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 700; font-feature-settings: 'palt'; }
.price { margin-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.price .now { font-size: 24px; line-height: 1; font-weight: 700; }
.price .now small { font-size: 14px; margin-left: 1px; }
.price .now.red { color: var(--red); }
.price s { font-size: 13px; color: var(--sub); }
.price .off { font-size: 13px; font-weight: 700; color: var(--red); }
.price .lab { font-size: 13px; color: var(--sub); }
.msg { margin: 10px 0 0; font-size: 14px; line-height: 1.7; }
.paynote { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--sub); }
.notify-link { margin-top: 6px; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink);
  font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.notify-note { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--sub); }
.it-hist { padding: 18px 16px 20px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.periods { display: flex; margin-right: -8px; font-size: 12px; }
.periods button { min-height: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--sub); font-size: 12px; }
.periods button[aria-pressed="true"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.chart { margin-top: 10px; }
.chart--xs, .chart--s, .chart--l { display: block; width: 100%; height: auto; }
.chart--s, .chart--l { display: none; }
@media (min-width: 360px) { .chart--xs { display: none; } .chart--s { display: block; } }
.rec-note { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--sub); }
.facts { margin: 14px 0 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); font-size: 13px; line-height: 20px; }
.facts dt { padding: 10px 0; border-top: 1px solid var(--line); color: var(--sub); }
.facts dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.facts .sub { display: block; font-size: 12px; line-height: 18px; color: var(--sub); }
.salelog { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.salelog summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; cursor: pointer; list-style: none; }
.salelog summary::-webkit-details-marker { display: none; }
.salelog .pm { display: inline-block; font-size: 16px; }
.salelog[open] .pm { transform: rotate(45deg); }
.salelog ul { margin: 0; padding: 0 0 4px; list-style: none; font-size: 13px; line-height: 20px; }
.salelog li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.it-new .h3 { margin-top: 18px; }
.it-new .big { margin: 4px 0 0; font-size: 20px; line-height: 1.4; font-weight: 700; }
.it-new .p13 { margin: 6px 0 0; font-size: 13px; line-height: 1.7; }
.it-new dl { margin: 8px 0 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); row-gap: 4px; font-size: 13px; line-height: 20px; }
.it-new dt { color: var(--sub); }
.it-new dd { margin: 0; }
.it-new .note { line-height: 1.6; }
.it-new .more { margin-top: 6px; }
.it-info { padding: 18px 16px 20px; }
.info { margin: 8px 0 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); row-gap: 6px; font-size: 13px; line-height: 20px; }
.info dt { color: var(--sub); }
.info dd { margin: 0; }
.it-rel { padding: 18px 16px 8px; }
.rel { margin-top: 2px; }
.rel a { display: flex; gap: 12px; padding: 12px 0; text-decoration: none; }
.rel a + a { border-top: 1px solid var(--line); }
.rel .th { width: 56px; height: 76px; flex: none; background: var(--ph); }
.rel .th img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rel .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rel .tt { font-size: 14px; line-height: 1.5; font-weight: 700; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rel .by { font-size: 12px; color: var(--sub); }
.rel .pr { font-size: 13px; }

/* 拡大表示 */
.viewer { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.94); color: #FFFFFF; }
.viewer .bar { flex: none; height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 16px; font-size: 13px; }
.viewer .x { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.viewer .stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 24px; }
.viewer .stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; padding: 0; border: 0;
  background: rgba(0, 0, 0, 0.45); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.viewer .vprev { left: 0; }
.viewer .vnext { right: 0; }
.viewer button:focus-visible { outline-color: #FFFFFF; }

/* ---------- 横幅が520px以上: グラフは横長の版に切り替える ---------- */
@media (min-width: 520px) {
  .chart--xs, .chart--s { display: none; }
  .chart--l { display: block; }
  .pboxes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- タブレット（768px〜） ---------- */
@media (min-width: 768px) {
  body { background: var(--band); }
  .hd-in { flex-wrap: nowrap; max-width: 720px; margin: 0 auto; height: 56px; padding: 0 24px; }
  .logo { flex: none; height: 56px; padding: 0; border-bottom: 0; font-size: 18px; }
  .tabs, .hd--item .tabs { flex: none; display: flex; margin-left: auto; padding: 0; gap: 28px; }
  .tabs a { min-height: 56px; }
  .stack { max-width: 720px; margin: 0 auto; padding: 24px; gap: 16px; background: transparent; }
  .card, .card--title { border-radius: 6px; padding: 24px; }
  .card.hero { padding-bottom: 24px; }
  .h1 { font-size: 28px; }
  .ft { border-top: 1px solid var(--line); }
  .ft-in { max-width: 720px; margin: 0 auto; padding: 20px 24px 40px; }
  .next-list { border-bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 14px; }
  .next { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; }
  /* 作品ページ */
  .it-top { padding: 24px; }
  .adline { padding: 0 0 10px; }
  .it-media { border-radius: 4px; overflow: hidden; }
  .thumbs { padding: 8px 0 0; }
  .it-head { padding: 18px 0 0; }
  .it-verdict { padding: 20px 0 0; }
  .it-hist, .it-info { padding: 24px; }
  .it-rel { padding: 24px 24px 12px; }
}

/* ---------- PC（1024px〜） ---------- */
@media (min-width: 1024px) {
  .hd-in, .stack, .ft-in { max-width: 1120px; }
  .hd-in { padding: 0 32px; }
  .stack { padding: 32px; gap: 20px; }
  .ft-in { padding: 24px 32px 48px; }
  .card, .card--title { padding: 28px 32px; }
  .card.hero { padding-bottom: 28px; }
  .h2 { font-size: 18px; line-height: 26px; }

  /* トップ */
  .page-top .stack { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "hero hero" "sales pay" "sales about"; }
  .page-top .hero { grid-area: hero; }
  .page-top .sales { grid-area: sales; }
  .page-top .pay { grid-area: pay; }
  .page-top .about { grid-area: about; }
  .top-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "text cal" "cta cal"; column-gap: 56px; align-items: start; }
  .top-hero .h1 { font-size: 32px; }
  .top-hero .cal .h3 { margin-top: 4px; }
  .top-hero .cta { align-self: end; max-width: 360px; }
  .page-top .dt { --dtw: 150px; }

  /* セール予報 */
  .page-fc .stack { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "title title" "chart chart" "next tips" "hist hist"; }
  .page-fc .title { grid-area: title; }
  .page-fc .chartc { grid-area: chart; }
  .page-fc .nextc { grid-area: next; }
  .page-fc .tips { grid-area: tips; }
  .page-fc .hist { grid-area: hist; }
  .fc-chart { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); column-gap: 40px; align-items: center; }
  .fc-chart .legend { margin: 0; flex-direction: column; gap: 10px; font-size: 12px; }
  .hist-years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; align-items: start; }

  /* 支払い方法 */
  .page-pay .stack { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "title title" "glance glance" "choose tips"; }
  .page-pay .title { grid-area: title; }
  .page-pay .glance { grid-area: glance; }
  .page-pay .choose { grid-area: choose; }
  .page-pay .tips { grid-area: tips; }
  .page-pay .choose .dt { --dtw: 200px; }

  /* このサイトについて */
  .page-about .stack { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "title title" "plan op" "src use"; }
  .page-about .title { grid-area: title; }
  .page-about .plan { grid-area: plan; }
  .page-about .src { grid-area: src; }
  .page-about .op { grid-area: op; }
  .page-about .use { grid-area: use; }

  /* 作品ページ */
  .page-item .stack { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "top top" "hist info" "hist rel"; align-items: start; }
  .it-top { grid-area: top; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "ad ad" "gal buy"; column-gap: 40px; padding: 28px 32px; }
  .it-top .adline { grid-area: ad; padding-bottom: 14px; }
  .it-gal { grid-area: gal; }
  .it-buy { grid-area: buy; }
  .it-head { padding-top: 0; }
  .it-title { font-size: 20px; }
  .it-hist { grid-area: hist; padding: 28px 32px; }
  .it-info { grid-area: info; padding: 28px 32px; }
  .it-rel { grid-area: rel; padding: 28px 32px 16px; }
  .verdict { font-size: 28px; }
}
