/* JDMyasan サイト共通(トップ・記事・商品紹介)。計算アプリと同じ色と書体 */
:root {
  --bg: #eef0f2;
  --panel: #ffffff;
  --ink: #1b2026;
  --muted: #5d6670;
  --line: #d3d8de;
  --accent: #d9480f;
  --accent-soft: #fde8dd;
  --logo-bg: #fcfbf7;
  --ok: #2b8a3e; --ok-soft: #e3f5e7;
  --caution: #b26a00; --caution-soft: #fff3d6;
  --font-display: "Chakra Petch", "IBM Plex Sans JP", system-ui, sans-serif;
  --font-body: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171b; --panel: #1d2127; --ink: #e8ebef; --muted: #98a2ad; --line: #323941;
    --accent: #ff7a3d; --accent-soft: #3a2418;
    --ok: #69db7c; --ok-soft: #1c3322; --caution: #ffc04d; --caution-soft: #3a2f14;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171b; --panel: #1d2127; --ink: #e8ebef; --muted: #98a2ad; --line: #323941;
  --accent: #ff7a3d; --accent-soft: #3a2418;
  --ok: #69db7c; --ok-soft: #1c3322; --caution: #ffc04d; --caution-soft: #3a2f14;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 48px; display: grid; gap: 40px; }

/* ヘッダー */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-brand img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--logo-bg); }
.site-brand span { font: 700 1.25rem var(--font-display); letter-spacing: .02em; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: .9rem; padding: 6px 12px; border-radius: 6px; color: var(--muted); }
.site-nav a:hover { color: var(--ink); background: var(--panel); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--panel); box-shadow: inset 0 -2px 0 var(--accent); }

/* 見出し */
.sec { display: grid; gap: 16px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.sec-head h2 { margin: 0; font: 700 1.35rem var(--font-display); text-wrap: balance; }
.sec-head a { font-size: .85rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.sec-head a:hover { text-decoration: underline; }
.lead { margin: 0; color: var(--muted); max-width: 65ch; }

/* カード */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: grid; gap: 6px; align-content: start; text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card h3 { margin: 0; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .85rem; }
.card .meta { font: .75rem var(--font-data); color: var(--muted); }
.card .thumb { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; object-fit: cover; border-radius: 6px; background: var(--bg); }
.tag { justify-self: start; font-size: .7rem; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ボタン */
.btn-main, .btn-sub { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700; font-size: .92rem; padding: 9px 18px; border-radius: 8px; border: 1px solid transparent; }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover { filter: brightness(1.08); }
.btn-sub { border-color: var(--line); background: var(--panel); color: var(--ink); }
.btn-sub:hover { border-color: var(--accent); color: var(--accent); }

/* 商品カード */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.product .ph { aspect-ratio: 4 / 3; width: 100%; max-width: 100%; object-fit: contain; background: #fff; display: block; }
.product .ph-none { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg); color: var(--muted); font: .8rem var(--font-data); }
.product .body { padding: 14px 16px 16px; display: grid; gap: 8px; align-content: start; }
.product h3 { margin: 0; font-size: 1.05rem; text-wrap: balance; }
.product h3 a { text-decoration: none; }
.product h3 a:hover { color: var(--accent); }
.product p { margin: 0; color: var(--muted); font-size: .86rem; }
.product .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.product .price { font: 700 1.15rem var(--font-data); font-variant-numeric: tabular-nums; }
.product .price small { font-size: .7rem; color: var(--muted); font-weight: 400; margin-left: 2px; }
.product .buy { font-size: .85rem; padding: 7px 14px; }
.product .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.product > a { display: block; }
.product .specs { display: flex; flex-wrap: wrap; gap: 4px; }
.product .specs span { font-size: .72rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.status { justify-self: start; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.status.sale { background: var(--ok-soft); color: var(--ok); }
.status.order { background: var(--accent-soft); color: var(--accent); }
.status.soon { background: var(--caution-soft); color: var(--caution); }
.status.out { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
@media (min-width: 720px) {
  .products.featured > .product:first-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto; }
  .products.featured > .product:first-child .ph, .products.featured > .product:first-child .ph-none { aspect-ratio: auto; height: 100%; min-height: 260px; }
  .products.featured > .product:first-child > a { height: 100%; }
  .products.featured > .product:first-child .body { padding: 24px; align-content: center; }
  .products.featured > .product:first-child h3 { font-size: 1.4rem; }
}

/* ショップへのリンク */
.shop-nav { text-decoration: none; font-weight: 700; font-size: .88rem; padding: 6px 14px; border-radius: 99px; background: var(--accent); color: #fff; white-space: nowrap; }
.shop-nav:hover { filter: brightness(1.08); }
.site-head .right { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.shop-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 18px; }
.shop-banner b { display: block; font-size: 1rem; }
.shop-banner span { font-size: .82rem; color: var(--muted); }
.shop-banner-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-foot a { color: var(--accent); font-weight: 700; }

/* 商品ページ */
.crumbs { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.pd-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .pd-top { grid-template-columns: 1fr; } }
.gallery { display: grid; gap: 8px; }
.gallery .main { width: 100%; height: auto; max-width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.gallery .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; width: 72px; height: 72px; overflow: hidden; }
.gallery .thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-info { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); }
@media (max-width: 760px) { .pd-info { position: static; } }
.pd-info h1 { margin: 0; font: 700 clamp(1.35rem, 3.6vw, 1.8rem)/1.3 var(--font-display); text-wrap: balance; }
.pd-info .en { font: 600 .75rem var(--font-data); letter-spacing: .12em; color: var(--muted); }
.pd-info p { margin: 0; color: var(--muted); }
.pd-price { font: 700 1.5rem var(--font-data); }
.pd-price small { font-size: .8rem; color: var(--muted); font-weight: 400; }
.pd-buy { display: grid; gap: 8px; }
.pd-buy a { justify-content: center; }
.pd-buy .buy-opt { justify-content: space-between; gap: 12px; }
.pd-buy .buy-opt span { font-weight: 500; opacity: .9; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.buy-card { display: grid; gap: 4px; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--bg); transition: border-color .15s; }
.buy-card:hover { border-color: var(--accent); }
.buy-card .k { font: 600 .72rem var(--font-data); letter-spacing: .1em; color: var(--accent); }
.buy-card b { font-size: 1.05rem; }
.buy-card span { font-size: .85rem; color: var(--muted); }
.buy-card .go { margin-top: 4px; font-weight: 700; color: var(--accent); }
.pd-buy .guide-link { font-size: .88rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.pd-buy .guide-link:hover { text-decoration: underline; }
.pd-buy .note { font-size: .75rem; color: var(--muted); }
.pd-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 3vw, 28px); display: grid; gap: 14px; }
.pd-sec h2 { margin: 0; font: 700 1.2rem var(--font-display); }
.pd-sec > p, .pd-sec li { max-width: 68ch; }
.pd-sec p { margin: 0; }
.pd-sec ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.pd-sec img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pd-sec figure { margin: 0; display: grid; gap: 6px; }
.pd-sec figcaption { font-size: .8rem; color: var(--muted); }
.pd-sec.warn { border-color: var(--caution); }
.pd-sec.warn h2 { color: var(--caution); }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.video { display: grid; gap: 6px; min-width: 0; }
.video .frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video span { font-size: .85rem; font-weight: 500; }
.video.wide { grid-column: 1 / -1; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 500; }
.spec-table td { font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
details.more summary { cursor: pointer; font-weight: 700; color: var(--accent); }
details.more[open] summary { margin-bottom: 10px; }

/* SNS */
.sns-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sns-label { font-size: .78rem; color: var(--muted); margin-right: 2px; }
.sns-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: .82rem; font-weight: 500; color: var(--ink); padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); }
.sns-link:hover { border-color: var(--accent); color: var(--accent); }
.sns-link svg { width: 16px; height: 16px; flex: none; }

/* 中身がまだないとき */
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 24px 16px; text-align: center; color: var(--muted); font-size: .9rem; }
.empty b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 4px; }
.empty.big { padding: 48px 16px; }
.empty .k { display: block; font: 600 .75rem var(--font-data); letter-spacing: .14em; color: var(--accent); margin-bottom: 8px; }

/* フッター */
.site-foot { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 4px; font-size: .75rem; color: var(--muted); }
.site-foot p { margin: 0; max-width: 75ch; }
.contact-mail { color: var(--accent); font-weight: 700; word-break: break-all; }
.site-foot .foot-concept { margin-top: 6px; font: 700 .9rem var(--font-display); color: var(--ink); letter-spacing: .04em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
