/* ==========================================================================
   買いどきウォッチ
   アイコンとタイトル画像の色から組み立てる。
   青 = ブランド・操作 / 紺 = 見出し / ティール = 値下がり・最安値 / オレンジ = セール・通知
   ========================================================================== */

:root {
  --blue: #0a63e6;
  --blue-strong: #0750c4;
  --blue-bright: #1a8cff;
  --blue-deep: #0b3a8c;      /* タイトルの「買いどき」 */
  --blue-line: #1a6fe8;      /* グラフの線 */
  --blue-50: #f2f7ff;
  --blue-100: #e3eeff;
  --blue-200: #c6dcfb;
  --sky: #a8d4f7;            /* アイコンの棒グラフ */

  --teal: #0fbfae;           /* アイコンの矢印 */
  --teal-line: #0b8f84;      /* グラフの最安値ライン */
  --teal-text: #0a7a71;
  --teal-50: #e4f7f4;

  --orange: #ff8a1f;         /* アイコンのベル */
  --orange-text: #a24b00;
  --orange-50: #fff3e3;
  --orange-wash: #ffe9d2;    /* グラフのセール期間 */

  --ink: #0f1f3d;
  --ink-2: #3b4a66;
  --muted: #66738c;
  --line: #dfe7f2;
  --bg: #f4f7fb;
  --surface: #ffffff;

  --r-lg: 18px;
  --r: 12px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 31, 61, 0.05), 0 10px 28px -14px rgba(10, 99, 230, 0.22);
  --shadow-lift: 0 2px 4px rgba(15, 31, 61, 0.06), 0 18px 40px -16px rgba(10, 99, 230, 0.32);

  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  --round: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;

  --wrap: 1120px;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.8; letter-spacing: 0.02em;
}
a { color: var(--blue); text-underline-offset: 0.2em; }
a:hover { color: var(--blue-strong); }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.text-orange { color: var(--orange-text); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.icon { flex: none; }

/* ---------- ヘッダー ---------- */
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: block; line-height: 0; }
.brand-logo { width: 248px; height: auto; }
.nav { display: flex; align-items: center; gap: 6px 22px; font-size: 0.93rem; font-weight: 700; flex-wrap: wrap; }
.nav > a:not(.btn) { color: var(--ink-2); text-decoration: none; padding: 6px 0; position: relative; }
.nav > a:not(.btn):hover { color: var(--blue); }
.nav > a.is-current { color: var(--blue); }
.nav > a.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--blue); }
@media (max-width: 600px) {
  .header { position: static; }
  .brand-logo { width: 200px; }
  .header-inner { justify-content: center; }
}

.sample-note { background: var(--orange-50); border-bottom: 1px solid #ffe0b8; color: var(--ink-2); font-size: 0.83rem; }
.sample-note .wrap { padding-top: 8px; padding-bottom: 8px; }
.sample-tag { display: inline-block; margin-right: 10px; padding: 0 10px; border-radius: 999px; background: var(--orange); color: var(--ink); font-weight: 700; font-size: 0.75rem; }

.main { padding-bottom: 80px; }
.main > .wrap:first-child { padding-top: 36px; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r); border: 2px solid transparent;
  font: inherit; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.88rem; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(10, 99, 230, 0.7); }
.btn-primary:hover { background: var(--blue-strong); color: #fff; }
.btn-outline { background: var(--surface); color: var(--blue); border-color: var(--blue-200); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue-strong); }
.btn-white { background: #fff; color: var(--blue-strong); }
.btn-white:hover { background: var(--blue-50); color: var(--blue-deep); }
.btn-danger { background: var(--surface); color: #b42318; border-color: #f3c0bb; }
.btn-danger:hover { background: #fdeceb; color: #8f1d14; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: none; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--blue-50); color: var(--blue); }
.icon-btn-danger:hover { background: #fdeceb; color: #b42318; }

/* ---------- 入力 ---------- */
input[type="text"], input[type="password"] {
  width: 100%; min-height: 48px; padding: 0 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus, input[type="password"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 140, 255, 0.18); }
input::placeholder { color: #9aa5b8; }
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 0.86rem; font-weight: 700; margin-bottom: 6px; }
.field-hint { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; margin: 4px 0 22px; }
.check input { width: 18px; height: 18px; margin-top: 0.3em; accent-color: var(--blue); }
.form-error { background: #fdeceb; color: #8f1d14; border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.9rem; margin: 12px 0 0; }

.search-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.search-hint { font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 560px) { .search-row { flex-direction: column; } }

/* ---------- 見出し ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.8rem; font-weight: 700; color: var(--blue); letter-spacing: 0.1em; }
.kicker::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--blue)); }
.page-head { margin-bottom: 28px; }
.page-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); line-height: 1.45; letter-spacing: 0.03em; }
.page-lead { color: var(--ink-2); max-width: 46em; margin-top: 10px; }
.section { margin-top: 80px; }
.section-head { margin-bottom: 24px; }
.section-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); line-height: 1.45; }
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; }
.card-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.1rem; margin-bottom: 8px; }
.label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.footnote, .fine { font-size: 0.8rem; color: var(--muted); }
.footnote { margin-top: 40px; }
.fine { margin: 16px 0 0; }

/* ---------- 金額・判定 ---------- */
.yen { white-space: nowrap; font-variant-numeric: tabular-nums; }
.yen-num { font-weight: 800; }
.yen-unit { font-size: 0.7em; margin-left: 0.1em; font-weight: 700; }
.yen-md .yen-num { font-size: 1.25rem; }
.yen-lg .yen-num { font-size: 2.2rem; letter-spacing: 0.01em; }
.yen-hero { display: block; line-height: 1.1; color: var(--ink); font-variant-numeric: normal; }
.yen-hero .yen-num { font-size: clamp(2.6rem, 2rem + 2.4vw, 3.5rem); letter-spacing: 0.01em; }
.yen-hero .yen-unit { font-size: 1.3rem; }
.diff-down { color: var(--teal-text); font-weight: 700; }
.diff-up { color: var(--ink); font-weight: 700; }

.verdict { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.verdict-large { padding: 7px 16px 7px 13px; font-size: 0.95rem; gap: 7px; }
.verdict-lowest { background: var(--teal-text); color: #fff; }
.verdict-near-lowest { background: var(--teal-50); color: var(--teal-text); }
.verdict-wait { background: var(--orange-50); color: var(--orange-text); }
.verdict-high { background: #eceff4; color: var(--ink-2); }
.verdict-normal { background: var(--blue-100); color: var(--blue-strong); }

/* ---------- トップ: ヒーロー ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 56px),
    linear-gradient(155deg, var(--blue-bright) 0%, var(--blue) 48%, var(--blue-strong) 100%);
  padding: 56px 0 104px;
}
.hero-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-line polyline { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hero-line circle { fill: var(--blue); stroke: rgba(255, 255, 255, 0.22); stroke-width: 4; vector-effect: non-scaling-stroke; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px; align-items: center; }
.hero-eyebrow { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); font-size: 0.82rem; font-weight: 700; margin-bottom: 18px; }
.hero-title { font-family: var(--round); font-weight: 800; font-size: clamp(2rem, 1.3rem + 3vw, 3.3rem); line-height: 1.35; letter-spacing: 0.04em; }
.hero-mark { background: linear-gradient(transparent 70%, rgba(255, 168, 40, 0.9) 70% 88%, transparent 88%); padding: 0 2px; }
.hero-lead { margin: 20px 0 0; max-width: 34em; color: rgba(255, 255, 255, 0.9); }
.search { margin-top: 28px; background: var(--surface); color: var(--ink); border-radius: var(--r-lg); padding: 18px; box-shadow: 0 24px 48px -24px rgba(7, 40, 110, 0.6); max-width: 560px; }
.hero-visual { justify-self: center; width: 100%; max-width: 440px; }
.cart-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(7, 40, 110, 0.35)); }
@media (max-width: 860px) {
  .hero { padding: 32px 0 96px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 240px; order: -1; margin-bottom: -8px; }
}

/* ---------- トップ: セールカード ---------- */
.sale-card { position: relative; z-index: 1; margin-top: -60px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 20px; align-items: center; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lift); padding: 20px 24px; }
.sale-card-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(150deg, #ffc23a, var(--orange) 70%, #ff6a1a); color: #fff; }
.sale-card-kicker { font-size: 0.78rem; font-weight: 700; color: var(--orange-text); margin: 0; }
.sale-card-name { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.2rem; margin: 0; line-height: 1.5; }
.sale-card-date { font-size: 0.85rem; color: var(--muted); margin: 0; }
.sale-card-count { display: flex; align-items: baseline; gap: 4px; color: var(--blue-deep); padding: 0 8px; }
.count-pre, .count-unit { font-weight: 700; font-size: 0.95rem; }
.count-num { font-family: var(--round); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--blue); }
.count-now { font-family: var(--round); font-weight: 800; font-size: 1.4rem; color: var(--orange-text); }
.sale-card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; text-decoration: none; padding: 10px 14px; border-radius: var(--r); background: var(--blue-50); }
.sale-card-link:hover { background: var(--blue-100); }
@media (max-width: 760px) {
  .sale-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 14px; padding: 16px; }
  .sale-card-icon { width: 46px; height: 46px; border-radius: 13px; }
  .count-num { font-size: 2.3rem; }
  .sale-card-link { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- トップ: 使い方（点でつないだ線） ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; left: 29px; right: calc((100% - 48px) / 3 - 29px); top: 27px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--blue-bright)); }
.step { position: relative; }
.step-node { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--surface); border: 4px solid var(--teal); color: var(--blue-deep); font-family: var(--round); font-weight: 800; font-size: 1.35rem; margin-bottom: 18px; box-shadow: 0 0 0 6px var(--bg); }
.step:nth-child(2) .step-node { border-color: #13a6d0; }
.step:nth-child(3) .step-node { border-color: var(--blue-bright); }
.step h3 { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 0.93rem; margin: 0; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { left: 27px; right: auto; top: 20px; bottom: 20px; width: 4px; height: auto; background: linear-gradient(180deg, var(--teal), var(--blue-bright)); }
  .step { padding-left: 78px; min-height: 58px; }
  .step-node { position: absolute; left: 0; top: 0; margin: 0; }
}

/* ---------- トップ: 表示内容 ---------- */
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: center; }
.showcase-copy > p { color: var(--ink-2); }
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.points li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); font-size: 0.93rem; }
.points strong { display: block; color: var(--ink); font-size: 1rem; }
.point-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.point-blue { background: var(--blue-100); color: var(--blue-strong); }
.point-orange { background: var(--orange-50); color: var(--orange-text); }
.point-teal { background: var(--teal-50); color: var(--teal-text); }
.preview { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lift); padding: 22px 24px 10px; position: relative; }
.preview-head { display: flex; justify-content: space-between; align-items: center; }
.preview-tag { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.preview-price { margin: 6px 0 6px; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; gap: 32px; } }

/* 帳簿 */
.ledger { margin: 0; }
.ledger > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.ledger > div:first-child { border-top: none; }
.ledger dt { font-size: 0.9rem; color: var(--ink-2); }
.ledger dd { margin: 0; text-align: right; font-weight: 700; }
.ledger-sub { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 400; }

/* ---------- トップ: サンプル・CTA ---------- */
.sample-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sample-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; height: 100%; padding: 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1.5px solid transparent; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.sample-card:hover { color: var(--ink); border-color: var(--blue-200); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.sample-title { font-weight: 700; line-height: 1.6; }
.sample-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: center; }
.sample-arrow { color: var(--blue); }

.cta { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-top: 80px; padding: 36px 40px; border-radius: 22px; color: #fff; background: linear-gradient(140deg, var(--blue-bright), var(--blue-strong)); }
.cta::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.07); }
.cta > * { position: relative; z-index: 1; }
.cta-title { font-family: var(--round); font-weight: 800; font-size: 1.45rem; margin: 0 0 4px; }
.cta-text { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 0.93rem; }
@media (max-width: 560px) { .cta { padding: 28px 22px; } }

/* ---------- 商品ページ ---------- */
.crumbs { display: flex; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.item-head { margin-bottom: 24px; }
.item-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.5; }
.item-meta { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; letter-spacing: 0.08em; }
.item-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.verdict-card { border-top: 5px solid var(--blue-200); padding: 26px 28px; }
.verdict-card-lowest, .verdict-card-near-lowest { border-top-color: var(--teal); }
.verdict-card-wait { border-top-color: var(--orange); }
.verdict-card-high { border-top-color: #b9c3d3; }
.verdict-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.verdict-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.3rem; margin-top: 20px; line-height: 1.5; }
.reasons { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: r; }
.reasons li { counter-increment: r; position: relative; padding: 8px 0 8px 36px; color: var(--ink-2); }
.reasons li::before { content: counter(r); position: absolute; left: 0; top: 9px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--blue-strong); font-size: 0.78rem; font-weight: 800; line-height: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.actions form { margin: 0; }
.facts { padding: 22px 26px 12px; }
@media (max-width: 860px) { .item-grid { grid-template-columns: 1fr; } .verdict-card { padding: 22px 20px; } }

/* ---------- グラフ ---------- */
.chart-card { margin-top: 20px; padding: 22px 24px 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; }
.chart-head .card-title { margin: 0; }
.segmented { display: inline-flex; background: var(--blue-50); border-radius: 999px; padding: 4px; }
.segmented a { padding: 4px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; text-decoration: none; color: var(--ink-2); }
.segmented a.is-current { background: var(--surface); color: var(--blue); box-shadow: 0 1px 3px rgba(15, 31, 61, 0.12); }
.chart { margin: 0; }
.chart-plot { position: relative; touch-action: pan-y; border-radius: var(--r); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: #b9c3d3; stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-sale { fill: var(--orange-wash); }
.chart-area { fill: var(--blue-line); opacity: 0.08; }
.chart-line { fill: none; stroke: var(--blue-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-ref { stroke: var(--teal-line); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart-ref-label { fill: var(--teal-text); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.chart-end { fill: var(--blue-line); stroke: #fff; stroke-width: 2; }
.chart-end-label { fill: var(--ink); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.chart-cross { stroke: var(--ink-2); stroke-width: 1; }
.chart-hover { fill: var(--blue-line); stroke: #fff; stroke-width: 2; }
.chart-tip { position: absolute; top: 8px; transform: translateX(12px); background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 0.8rem; line-height: 1.5; pointer-events: none; white-space: nowrap; z-index: 2; box-shadow: 0 8px 20px -8px rgba(15, 31, 61, 0.5); }
.chart-tip.flip { transform: translateX(calc(-100% - 12px)); }
.chart-tip-price { font-size: 1.05rem; font-weight: 800; }
.chart-tip-sale { color: #ffb866; font-size: 0.75rem; font-weight: 700; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 0.8rem; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 22px; height: 12px; border-radius: 3px; }
.key-ref { height: 0; border-radius: 0; border-top: 2px dashed var(--teal-line); }
.key-sale { background: var(--orange-wash); }
.chart-table { margin-top: 14px; font-size: 0.88rem; }
.chart-table summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.ledger-table { width: 100%; max-width: 520px; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ledger-table th, .ledger-table td { text-align: right; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.ledger-table th[scope="row"], .ledger-table thead th:first-child { text-align: left; }
.ledger-table thead th { font-size: 0.78rem; color: var(--muted); font-weight: 700; }

/* ---------- マイページ ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 22px; border-left: 5px solid var(--blue-200); }
.stat-teal { border-left-color: var(--teal); }
.stat-orange { border-left-color: var(--orange); }
.stat-orange .label .icon { color: var(--orange); }
.stat-value { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 2.2rem; line-height: 1.2; margin: 0; }
.stat-unit { font-size: 0.9rem; margin-left: 4px; }
.stat-text { font-size: 1.35rem; }
.stat-sub { font-size: 0.8rem; color: var(--muted); margin: 2px 0 0; }
@media (max-width: 680px) { .stats { grid-template-columns: 1fr 1fr; } .stat-orange { grid-column: 1 / -1; } }
.add-card { margin-top: 20px; padding: 20px 22px; }

.watch { margin-top: 20px; }
.watch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.watch-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 128px 84px; gap: 20px; align-items: center; padding: 16px 16px 16px 22px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.watch-title { font-weight: 700; text-decoration: none; color: var(--ink); line-height: 1.6; }
a.watch-title:hover { color: var(--blue); }
.watch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: 0.82rem; color: var(--ink-2); }
.watch-price { text-align: right; }
.watch-price .yen-num { font-size: 1.35rem; }
.watch-actions { display: flex; justify-content: flex-end; }
.watch-actions form { margin: 0; }
.spark { display: block; }
.spark-line { fill: none; stroke: var(--blue-line); stroke-width: 1.8; stroke-linejoin: round; }
.spark-min { stroke: var(--teal-line); stroke-width: 1; stroke-dasharray: 3 3; }
.spark-min-dot { fill: var(--teal-line); }
.spark-end { fill: var(--blue-line); stroke: #fff; stroke-width: 2; }
@media (max-width: 760px) {
  .watch-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 12px 10px 16px; }
  .watch-row .spark { display: none; }
  .watch-row:has(.watch-price) .watch-actions { grid-column: 1 / -1; }
}
.empty { text-align: center; padding: 44px 24px; color: var(--ink-2); }
.empty-title { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.15rem; }

.account { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.account form { margin: 0; }
.danger-zone { margin-top: 20px; font-size: 0.9rem; }
.danger-zone summary { cursor: pointer; color: var(--muted); }
.danger-zone p { margin-top: 12px; color: var(--ink-2); }
.danger-form { max-width: 420px; }

/* ---------- セールカレンダー ---------- */
.yearstrip { margin: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 20px 14px; overflow-x: auto; }
.yearstrip svg { display: block; width: 100%; min-width: 640px; height: auto; }
.ys-month { stroke: var(--line); stroke-width: 1; }
.ys-label { fill: var(--muted); font-size: 12px; font-weight: 700; }
.ys-base { stroke: var(--line); stroke-width: 2; }
.ys-sale { fill: var(--orange); rx: 4px; }
.ys-sale.is-past { fill: #c3cee0; }
.ys-sale.is-forecast { fill: var(--orange-50); stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ys-today { stroke: var(--blue); stroke-width: 2; }
.ys-today-label { fill: var(--blue); font-size: 12px; font-weight: 800; }
.key-ys { background: var(--orange); }
.key-ys-past { background: #c3cee0; }
.key-ys-forecast { background: var(--orange-50); border: 1.5px dashed var(--orange); }

.sale-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sale-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px 14px 14px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.sale-row.is-done { box-shadow: none; background: transparent; border: 1px solid var(--line); }
.sale-date { display: grid; justify-items: center; align-content: center; height: 72px; border-radius: 14px; background: var(--orange-50); color: var(--orange-text); line-height: 1.1; }
.is-done .sale-date { background: #edf1f6; color: var(--muted); }
.sale-date-month { font-size: 0.78rem; font-weight: 700; }
.sale-date-day { font-family: var(--round); font-weight: 800; font-size: 1.9rem; }
.sale-name { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.05rem; margin: 0; }
.is-done .sale-name { color: var(--ink-2); }
.sale-period { font-size: 0.85rem; color: var(--ink-2); margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.sale-note { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; }
.tag { font-size: 0.76rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.tag-now { background: var(--orange); color: var(--ink); }
.tag-next { background: var(--orange-50); color: var(--orange-text); }
.tag-forecast { background: transparent; color: var(--ink-2); border: 1.5px dashed #b9c3d3; }
.tag-done { background: #edf1f6; color: var(--muted); }
@media (max-width: 560px) {
  .sale-row { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .sale-row .tag { grid-column: 2; justify-self: start; }
  .sale-date { height: 60px; }
  .sale-date-day { font-size: 1.5rem; }
}

/* ---------- 登録・ログイン ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 28px; align-items: start; max-width: 960px; }
.auth-form { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 32px; }
.auth-form .page-title { margin-bottom: 24px; }
.auth-switch { margin: 18px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.auth-aside { background: var(--blue-50); border-radius: 22px; padding: 24px; }
.aside-title { font-size: 0.82rem; font-weight: 800; color: var(--blue-deep); margin: 0 0 4px; }
.aside-title + .ledger { margin-bottom: 22px; }
.ledger-compact > div { padding: 8px 0; border-top-color: var(--blue-100); }
.ledger-compact dd { font-size: 0.88rem; }
.struck { list-style: none; margin: 6px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.struck li { padding: 2px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--orange); text-decoration-thickness: 2px; font-size: 0.88rem; }
.aside-note { font-size: 0.82rem; color: var(--ink-2); margin: 0; padding-top: 14px; border-top: 1px solid var(--blue-100); }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; } .auth-form { padding: 24px 20px; } }

/* ---------- 文書ページ ---------- */
.doc { max-width: 820px; }
.doc > h1 { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: 20px; }
.doc h2 { font-family: var(--round); font-weight: 800; color: var(--blue-deep); font-size: 1.1rem; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.4em; }
.doc dl { display: grid; grid-template-columns: 9em 1fr; margin: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 8px 24px; }
.doc dt, .doc dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.doc dt:last-of-type, .doc dd:last-of-type { border-bottom: none; }
.doc dt { font-weight: 700; font-size: 0.9rem; }

.notfound { padding-top: 56px; text-align: center; }
.notfound-code { font-family: var(--round); font-weight: 800; font-size: 5rem; line-height: 1; margin-bottom: 8px; background: linear-gradient(135deg, var(--teal), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { color: var(--ink-2); }

/* ---------- フッター ---------- */
.footer { background: var(--blue-deep); color: #fff; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center; padding-top: 36px; padding-bottom: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.app-icon { display: block; border-radius: 22%; }
.footer-name { font-family: var(--round); font-weight: 800; font-size: 1.1rem; margin: 0; line-height: 1.4; }
.footer-tagline { font-size: 0.78rem; opacity: 0.75; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 24px; font-size: 0.86rem; }
.footer-nav a { color: #fff; opacity: 0.85; text-decoration: none; }
.footer-nav a:hover { color: #fff; opacity: 1; text-decoration: underline; }
.footer-note { grid-column: 1 / -1; font-size: 0.75rem; opacity: 0.65; margin: 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.section > .section-title { margin-bottom: 16px; }
.ys-today-label { paint-order: stroke; stroke: #fff; stroke-width: 4px; }

/* ==========================================================================
   動き・掲示板・カタログ
   ========================================================================== */

:root {
  --ill-line: #0b3a8c;
  --ill-fill: #ffffff;
  --ill-soft: #cfe2fb;
  --ill-orange: #ff8a1f;
  --ill-teal: #0fbfae;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flip-x { transform: scaleX(-1); }

/* ---------- 流れる掲示板 ---------- */
.ticker { display: flex; align-items: stretch; background: var(--blue-deep); color: #fff; font-size: 0.84rem; min-height: 38px; position: relative; z-index: 6; }
.ticker-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #082c6c; font-weight: 800; letter-spacing: 0.12em; }
.ticker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 138, 31, 0.7); animation: tk-pulse 1.8s ease-out infinite; }
.ticker-viewport { position: relative; flex: 1; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; animation: tk-scroll var(--ticker-duration, 40s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-row { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.tk { white-space: nowrap; display: inline-flex; align-items: center; }
.tk > a, .tk > span { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px 0 4px; color: #fff; text-decoration: none; }
.tk > a:hover .tk-text { text-decoration: underline; }
.tk::after { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); margin-right: 22px; }
.tk-label { flex: none; padding: 1px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; }
.tk-drop { background: var(--teal); color: #04312c; }
.tk-lowest { background: #fff; color: var(--teal-text); }
.tk-sale { background: var(--orange); color: #3a1d00; }
.tk-notice { background: rgba(255, 255, 255, 0.18); color: #fff; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tk-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(255, 138, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0); } }
@media (max-width: 600px) { .ticker-head { padding: 0 10px; } }

/* ---------- ヒーローの動き ---------- */
.hero-copy > * { animation: rise 0.8s var(--ease-out) both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.hero-mark { background-size: 0% 100%; background-repeat: no-repeat; animation: mark 0.9s 0.6s var(--ease-out) forwards; }
.hero-line polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s 0.2s var(--ease-out) forwards; }
.hero-line circle { opacity: 0; animation: pop 0.5s var(--ease-out) forwards; animation-delay: calc(0.9s + var(--i) * 0.4s); transform-box: fill-box; transform-origin: center; }
.hero-visual { position: relative; animation: rise 1s 0.15s var(--ease-out) both; }
.hero-float { animation: float 6s ease-in-out infinite; }
.bubble { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--blue-deep); font-size: 0.8rem; font-weight: 800; white-space: nowrap; box-shadow: 0 12px 26px -12px rgba(7, 40, 110, 0.55); animation: bubble-in 0.7s var(--ease-out) both, float 5s ease-in-out infinite; }
.bubble .icon { color: var(--blue); }
.bubble-1 { left: -6%; top: 14%; animation-delay: 0.7s, 0.7s; }
.bubble-1 .icon { color: var(--teal-text); }
.bubble-2 { right: -4%; top: 52%; animation-delay: 0.95s, 1.6s; }
.bubble-2 .icon { color: var(--orange); }
.bubble-3 { left: 4%; bottom: 4%; animation-delay: 1.2s, 2.4s; }
@media (max-width: 860px) { .bubble { display: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mark { to { background-size: 100% 100%; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(0.92); } to { opacity: 1; transform: none; } }

/* セールカードは少し遅れて浮き上がり、ベルがときどき揺れる */
.sale-card { animation: rise 0.8s 0.35s var(--ease-out) both; }
.sale-card-icon { animation: ring 2.8s 1.4s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(12deg); } 80% { transform: rotate(-10deg); } 86% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); } }

/* ---------- スクロールで現れる ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.steps .step-node { transition: transform 0.5s var(--ease-out); }
.js .steps[data-reveal] .step-node { transform: scale(0.6); }
.js .steps[data-reveal].is-visible .step-node { transform: none; }
.js .steps[data-reveal].is-visible .step:nth-child(2) .step-node { transition-delay: 0.15s; }
.js .steps[data-reveal].is-visible .step:nth-child(3) .step-node { transition-delay: 0.3s; }
.js .steps[data-reveal]::before { transform: scaleX(0); transform-origin: left; transition: transform 1s 0.2s var(--ease-out); }
.js .steps[data-reveal].is-visible::before { transform: none; }

/* ---------- 見出し行 ---------- */
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.more-link .icon { transition: transform 0.2s; }
.more-link:hover .icon { transform: translateX(3px); }

/* ---------- イラスト ---------- */
.illust { display: block; width: 100%; height: auto; }

/* ---------- カテゴリ ---------- */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; height: 100%; padding: 14px 12px 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1.5px solid transparent; transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s; }
.cat-tile:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--blue-200); }
.cat-tile-visual { display: block; width: 100%; max-width: 132px; border-radius: 14px; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); margin-bottom: 8px; transition: transform 0.35s var(--ease-out); }
.cat-tile:hover .cat-tile-visual { transform: rotate(-3deg) scale(1.04); }
.cat-tile-name { font-weight: 800; font-size: 0.92rem; line-height: 1.5; }
.cat-tile-count { font-size: 0.78rem; color: var(--muted); }

.cat-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.cat-head .page-lead { margin: 2px 0 0; }
.cat-head-visual { flex: none; width: 120px; border-radius: 18px; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 14px; scrollbar-width: thin; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-size: 0.85rem; font-weight: 700; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.chip:hover { border-color: var(--blue-200); color: var(--blue); }
.chip.is-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.sort-tabs { margin-bottom: 18px; flex-wrap: wrap; border-radius: 16px; }

/* ---------- 商品カード ---------- */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink); border: 1.5px solid transparent; transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s; }
.pcard:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--blue-200); }
.pcard-visual { position: relative; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); padding: 10px 24px 4px; }
.pcard-visual .illust { max-width: 190px; margin: 0 auto; transition: transform 0.4s var(--ease-out); }
.pcard:hover .pcard-visual .illust { transform: scale(1.06) rotate(-2deg); }
.pcard-badge { position: absolute; left: 12px; top: 12px; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.pcard-cat { margin: 0; font-size: 0.75rem; font-weight: 700; color: var(--blue); }
.pcard-title { margin: 0; font-weight: 700; line-height: 1.55; font-size: 0.93rem; }
.pcard-price-row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard-price-row .spark { width: 96px; height: auto; }
.pcard-meta { margin: 0; font-size: 0.8rem; color: var(--ink-2); }

/* ---------- カルーセル ---------- */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px; scrollbar-width: thin; scroll-behavior: smooth; }
@media (min-width: 1000px) { .carousel { grid-auto-columns: calc((100% - 48px) / 4); } }
.carousel-item { scroll-snap-align: start; }
.carousel-item .pcard { height: 100%; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--blue-200); background: var(--surface); color: var(--blue); cursor: pointer; transition: background 0.2s, opacity 0.2s; }
.carousel-btn:hover:not(:disabled) { background: var(--blue-50); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* ---------- 値下がりランキング ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform 0.2s var(--ease-out), box-shadow 0.2s; }
.rank-row:hover { color: var(--ink); transform: translateX(4px); box-shadow: var(--shadow-lift); }
.rank-no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue-deep); font-family: var(--round); font-weight: 800; font-size: 1.2rem; }
.rank-no-1 { background: linear-gradient(150deg, #ffc23a, var(--orange)); color: #3a1d00; }
.rank-no-2 { background: var(--blue-100); }
.rank-no-3 { background: var(--teal-50); color: var(--teal-text); }
.rank-visual { display: block; border-radius: 12px; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); }
.rank-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rank-title { font-weight: 700; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { display: block; height: 8px; border-radius: 8px; background: var(--blue-50); overflow: hidden; }
.rank-bar-fill { display: block; height: 100%; width: var(--w); border-radius: 8px; background: linear-gradient(90deg, var(--teal), var(--blue-bright)); transform-origin: left; }
.js [data-reveal] .rank-bar-fill { transform: scaleX(0); transition: transform 1s 0.25s var(--ease-out); }
.js [data-reveal].is-visible .rank-bar-fill { transform: none; }
.rank-figures { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rank-drop { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-text); font-weight: 800; font-size: 0.88rem; }
@media (max-width: 700px) {
  .rank-row { grid-template-columns: 36px 56px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .rank-no { width: 34px; height: 34px; font-size: 1rem; }
  .rank-figures { grid-column: 3; flex-direction: row; justify-content: space-between; width: 100%; align-items: center; }
  .rank-row > .verdict { display: none; }
}

/* ---------- 商品ページ（登録商品の情報） ---------- */
.item-head-visual { display: flex; align-items: center; gap: 22px; }
.item-head-visual .kicker { margin-bottom: 2px; }
.item-visual { flex: none; width: 150px; border-radius: 20px; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); box-shadow: var(--shadow); animation: rise 0.7s var(--ease-out) both; }
.item-desc { margin: 10px 0 0; color: var(--ink-2); max-width: 46em; }
@media (max-width: 600px) { .item-head-visual { flex-direction: column; align-items: flex-start; gap: 12px; } .item-visual { width: 120px; } }

/* グラフの線が左から描かれていく */
.chart-line-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s 0.15s var(--ease-out) forwards; }
.chart-area { animation: fade-in 1s 0.8s both; }
.chart-end, .chart-end-label { animation: fade-in 0.5s 1.4s both; }
@keyframes fade-in { from { opacity: 0; } }
.verdict-card { animation: rise 0.7s 0.1s var(--ease-out) both; }
.facts { animation: rise 0.7s 0.2s var(--ease-out) both; }

/* ---------- 管理画面 ---------- */
.admin-nav { margin-bottom: 20px; flex-wrap: wrap; border-radius: 16px; }
.admin .card { margin-bottom: 20px; }
.form-ok { background: var(--teal-50); color: var(--teal-text); border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.9rem; font-weight: 700; margin: 0 0 16px; }
.admin .form-error { margin: 0 0 16px; }
.admin-form { max-width: 760px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.field-narrow input { max-width: 120px; }
select, textarea, input[type="number"] {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
select:focus, textarea:focus, input[type="number"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 140, 255, 0.18); }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table thead th { font-size: 0.78rem; color: var(--muted); }
.admin-item { display: flex; align-items: center; gap: 12px; }
.admin-thumb { flex: none; display: block; width: 56px; border-radius: 10px; background: linear-gradient(160deg, var(--blue-50), var(--blue-100)); }
.admin-sub { display: block; font-size: 0.78rem; color: var(--muted); }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inline-delete { position: relative; font-size: 0.85rem; }
.inline-delete summary { cursor: pointer; color: #b42318; list-style: none; padding: 6px 8px; border-radius: 8px; }
.inline-delete summary::-webkit-details-marker { display: none; }
.inline-delete summary:hover { background: #fdeceb; }
.inline-delete form { position: absolute; right: 0; top: 100%; z-index: 3; margin-top: 4px; background: var(--surface); padding: 8px; border-radius: 12px; box-shadow: var(--shadow-lift); white-space: nowrap; }
.admin-cat-list, .admin-ann-list { list-style: none; margin: 0; padding: 0; }
.admin-cat { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-cat-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; }
.admin-cat-form input, .admin-cat-form select { min-height: 40px; padding: 6px 10px; font-size: 0.9rem; }
@media (max-width: 860px) { .admin-cat { grid-template-columns: 56px minmax(0, 1fr); } .admin-cat-form { grid-template-columns: 1fr 1fr; } }
.admin-ann { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-ann.is-off .admin-ann-body { color: var(--muted); text-decoration: line-through; }
.admin-ann-body { margin: 0; font-weight: 700; }
.admin-help ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.stat-link { text-decoration: none; color: var(--ink); transition: transform 0.2s var(--ease-out), box-shadow 0.2s; }
.stat-link:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-lift); }

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker-viewport { overflow-x: auto; -webkit-mask: none; mask: none; }
  .ticker-track > .ticker-row[aria-hidden="true"] { display: none; }
  .hero-line polyline, .chart-line-draw { stroke-dashoffset: 0; }
  .hero-line circle { opacity: 1; }
  .hero-mark { background-size: 100% 100%; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 管理画面: 2段階認証・操作履歴 ---------- */
.code-input { font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.enroll-steps { margin: 4px 0 20px; padding-left: 1.3em; color: var(--ink-2); }
.enroll-steps li { margin-bottom: 10px; }
.secret-box { margin: 8px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--blue-50); border: 1.5px dashed var(--blue-200); }
.secret-box code { font-size: 1.05rem; letter-spacing: 0.08em; word-break: break-all; color: var(--blue-deep); font-weight: 700; }
.recovery-codes { list-style: none; margin: 16px 0 8px; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; border-radius: var(--r); background: var(--blue-50); }
.recovery-codes code { font-size: 1rem; letter-spacing: 0.06em; color: var(--ink); }
.recovery { margin-top: 18px; font-size: 0.9rem; }
.recovery summary { cursor: pointer; color: var(--blue); font-weight: 700; }
.recovery form { margin-top: 12px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.admin-logout { display: flex; align-items: center; gap: 10px; margin: 0; }
.audit-table td { font-size: 0.84rem; }
.audit-table tr.is-warn td { background: #fff4f2; }
.audit-table tr.is-warn td:nth-child(2) { color: #b42318; font-weight: 700; }
.link-button { background: none; border: none; padding: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- PR 表記（Amazon アソシエイト有効時） ---------- */
.pr-note { background: var(--blue-50); border-bottom: 1px solid var(--blue-100); color: var(--ink-2); font-size: 0.83rem; }
.pr-note .wrap { padding-top: 8px; padding-bottom: 8px; }
.pr-tag, .pr-inline { display: inline-block; padding: 0 9px; border-radius: 6px; border: 1.5px solid var(--ink-2); color: var(--ink-2); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.06em; line-height: 1.6; }
.pr-tag { margin-right: 10px; }
.pr-inline { align-self: center; }

/* ==========================================================================
   管理画面の配色（公開ページと区別する）
   公開ページの明るい青に対して、落ち着いた紺を基調にし、上部に黄色の「運営者専用」帯を出す
   ========================================================================== */
body.is-admin {
  --bg: #e8ecf2;
  --blue: #2b3f7e;
  --blue-strong: #1f2f63;
  --blue-bright: #4a63b8;
  --blue-50: #eef1f8;
  --blue-100: #dde3f1;
  --blue-200: #c3cce3;
  --shadow: 0 1px 2px rgba(21, 28, 46, 0.06), 0 10px 26px -16px rgba(21, 28, 46, 0.35);
  --shadow-lift: 0 2px 4px rgba(21, 28, 46, 0.08), 0 18px 36px -18px rgba(21, 28, 46, 0.45);
}
.admin-strip {
  background: repeating-linear-gradient(135deg, #ffd25a 0 14px, #ffc93a 14px 28px);
  color: #3a2a00;
  font-size: 0.8rem;
  font-weight: 800;
}
.admin-strip-inner { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.admin-header { background: #151c2e; border-bottom: none; }
.admin-header .header-inner { min-height: 64px; }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.admin-brand:hover { color: #fff; }
.admin-brand .app-icon { border-radius: 22%; }
.admin-brand-name { font-family: var(--round); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em; }
.admin-badge { padding: 2px 10px; border-radius: 999px; background: #ffd25a; color: #3a2a00; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; }
.admin-header .nav > a.admin-view-site { display: inline-flex; align-items: center; gap: 6px; color: #cfd6e6; font-weight: 700; }
.admin-header .nav > a.admin-view-site:hover { color: #fff; }
body.is-admin .footer { background: #151c2e; }
body.is-admin .page-title { color: #151c2e; }
@media (max-width: 600px) {
  .admin-header .header-inner { justify-content: space-between; }
  .admin-brand-name { display: none; }
}
.admin .stats { margin-bottom: 20px; }

/* ---------- 管理画面: カテゴリの並び替え ---------- */
.admin-cat { grid-template-columns: auto 56px minmax(0, 1fr) auto auto; }
.admin-cat-form { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.admin-order { display: flex; align-items: center; gap: 2px; }
.admin-order form { margin: 0; }
.admin-order-no { min-width: 26px; text-align: center; font-family: var(--round); font-weight: 800; color: var(--blue); }
.order-btn { width: 32px; height: 32px; border: 1.5px solid var(--blue-200); background: var(--surface); color: var(--blue); }
.order-btn:hover:not(:disabled) { background: var(--blue-50); border-color: var(--blue); }
.order-btn:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 860px) {
  .admin-cat { grid-template-columns: auto 56px minmax(0, 1fr); }
  .admin-cat-form { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
