/* ストアの見た目(明るい配色 + 白いカード + やわらかい影)。外部のフォント・画像は使わない */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --line: #e1e7f0;
  --ink: #18202f;
  --sub: #5d6b82;
  --accent: #0d7f78;
  --accent-2: #13a198;
  --warn-bg: #fff6dc;
  --warn-ink: #7a5600;
  --warn-line: #f1dc9a;
  --ok: #14804a;
  --err: #c0362c;
  --radius: 16px;
  --shadow-s: 0 1px 3px rgba(24, 32, 47, 0.08);
  --shadow-m: 0 10px 28px rgba(24, 32, 47, 0.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 90% -8%, rgba(99, 132, 255, 0.12), transparent 65%),
    radial-gradient(800px 420px at -8% -4%, rgba(19, 161, 152, 0.12), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #0a625d; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ヘッダー */
#site-header { position: sticky; top: 0; z-index: 20; background: linear-gradient(110deg, #0a2540 0%, #0b4f6c 55%, #0d7f78 100%); box-shadow: 0 2px 14px rgba(10, 37, 64, 0.25); }
.bar { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand-logo { display: flex; background: #fff; border-radius: 8px; padding: 4px 10px; }
.brand-logo img { height: 22px; width: auto; display: block; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: 0.06em; white-space: nowrap; }
.brand { flex-shrink: 0; }
.bar nav { display: flex; gap: 2px; flex: 1; }
.bar nav a, .bar .right a { color: rgba(255, 255, 255, 0.78); text-decoration: none; padding: 5px 13px; border-radius: 99px; font-size: 14px; font-weight: 600; transition: background 0.15s, color 0.15s; }
.bar nav a:hover, .bar .right a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.bar a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.22); }
.bar .right { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-left: auto; }
.who { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.78); }
.link-btn { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.4); color: #fff; padding: 4px 13px; border-radius: 99px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.link-btn:hover { background: rgba(255, 255, 255, 0.25); }
.demo-banner { background: var(--warn-bg); color: var(--warn-ink); text-align: center; font-size: 12.5px; padding: 5px 14px; border-top: 1px solid var(--warn-line); }

/* 本体 */
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 20px 72px; }
h1 { font-size: clamp(25px, 5vw, 34px); margin: 0 0 10px; line-height: 1.35; letter-spacing: 0.02em; font-weight: 800; }
h2 { font-size: 20px; margin: 36px 0 10px; line-height: 1.4; }
h3 { margin: 0; }
h1, h2, h3, .btn { text-wrap: balance; }
.lead { color: var(--sub); margin: 0 0 28px; font-size: 16px; }
.muted { color: var(--sub); font-size: 14px; }

/* ボタン(薄め) */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.5; letter-spacing: 0.03em; text-decoration: none; text-align: center;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); padding: 8px 22px; border-radius: 10px;
  box-shadow: var(--shadow-s); transition: filter 0.15s, box-shadow 0.15s;
}
.btn:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 4px 12px rgba(13, 127, 120, 0.3); }
.btn:active { filter: brightness(0.95); }
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; filter: none; }
.btn.sub { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.sub:hover { background: var(--surface-2); color: var(--ink); }
.btn.block { display: block; width: 100%; }

/* カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-s); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.card h3 { font-size: 18px; line-height: 1.4; }
.card p { margin: 0; }
.card .price { font-weight: 800; font-size: 18px; color: var(--ink); }
.card .actions { margin-top: auto; padding-top: 10px; }
.card.has-thumb { padding: 0; overflow: hidden; gap: 0; }
.card.has-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: #c9d6e6; }
.card.has-thumb > :not(.thumb-link) { margin-left: 20px; margin-right: 20px; }
.card.has-thumb > h3 { margin-top: 16px; }
.card.has-thumb > .price { margin-top: 4px; }
.card.has-thumb > .actions { margin-top: 14px; margin-bottom: 20px; padding-top: 0; }
.badge { display: inline-block; background: #e3f6ec; color: var(--ok); font-size: 12px; font-weight: 800; padding: 2px 12px; border-radius: 99px; }

/* サムネイル(5:4 = 900×720) */
.thumb { position: relative; width: 100%; aspect-ratio: 5 / 4; background: linear-gradient(135deg, #0c1459, #1c2a9a); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.thumb-mark { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.35); font-size: 64px; font-weight: 800; }
.thumb-link { display: block; overflow: hidden; }
.card.has-thumb:hover .thumb img { transform: scale(1.04); }
.thumb-lg { margin-bottom: 0; border-radius: var(--radius); box-shadow: var(--shadow-m); max-width: 560px; }
.lib .thumb { width: 130px; flex: none; border-radius: 10px; }

/* フォーム */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; max-width: 480px; margin: 0 auto; box-shadow: var(--shadow-m); }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.tabs button { flex: 1; background: none; border: 0; border-radius: 9px; padding: 6px 4px; font: inherit; font-weight: 700; font-size: 14px; color: var(--sub); cursor: pointer; transition: background 0.15s, color 0.15s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--accent); background: #fff; box-shadow: var(--shadow-s); }
label { display: block; font-size: 13.5px; font-weight: 700; color: var(--sub); margin: 16px 0 5px; }
label .opt { font-weight: 500; font-size: 12px; margin-left: 6px; }
input[type="email"], input[type="password"], input[type="text"], input[type="date"], select {
  width: 100%; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid #cdd6e3; border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 127, 120, 0.18); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(80, 110, 230, 0.55); outline-offset: 2px; }
.form-msg { min-height: 1.6em; margin: 12px 0 0; font-size: 14px; }
.form-msg.err { color: var(--err); }
.form-msg.ok { color: var(--ok); }
.panel .btn { margin-top: 18px; }
.hint { font-size: 12.5px; color: var(--sub); margin: 8px 0 0; line-height: 1.7; }
.next-note { background: #eaf0ff; border-radius: 10px; padding: 8px 14px; font-size: 13.5px; margin-bottom: 14px; color: #2d3f8f; }
.fixed-value { margin: 0; padding: 9px 12px; background: var(--surface-2); border-radius: 10px; color: var(--sub); overflow-wrap: anywhere; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0 4px; }

/* 商品ページ */
.product { display: grid; gap: 32px; grid-template-columns: 1fr; }
.p-head { min-width: 0; }
.p-info { min-width: 0; }
/* スマホ: 見出し・画像 → 購入カード → 詳しい情報。広い画面: 左に見出し・画像・詳しい情報、右に購入カード */
@media (min-width: 820px) {
  .product { grid-template-columns: 1fr 320px; grid-template-areas: "head buy" "info buy"; align-items: start; }
  .p-head { grid-area: head; }
  .buybox { grid-area: buy; }
  .p-info { grid-area: info; margin-top: -32px; }
}
.crumbs { margin: 0 0 14px; font-size: 13px; color: var(--sub); }
.crumbs a { color: var(--sub); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.title-block { margin-bottom: 20px; padding-left: 16px; border-left: 5px solid var(--accent); }
.title-block h1 { margin: 0 0 10px; font-size: clamp(28px, 6vw, 40px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { background: rgba(13, 127, 120, 0.1); color: var(--accent); font-size: 12.5px; font-weight: 700; padding: 2px 12px; border-radius: 99px; }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; position: sticky; top: 84px; align-self: start; box-shadow: var(--shadow-m); }
.buybox .price { font-size: 32px; font-weight: 800; margin: 0 0 2px; }
.buybox .muted { margin: 0 0 16px; }
.prod-sec { margin-top: 32px; }
.prod-sec h2 { font-size: 18px; margin: 0 0 12px; padding-left: 12px; border-left: 4px solid var(--accent); }
.prod-sec h3 { font-size: 15px; margin: 16px 0 4px; }
.prod-sec p { margin: 0; color: #3d4860; font-size: 15px; }
.spec { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.spec > div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.spec > div:first-child { border-top: 0; }
.spec dt { color: var(--sub); font-weight: 700; font-size: 14px; }
.spec dd { margin: 0; overflow-wrap: anywhere; }
.notes { margin: 12px 0 0; padding: 0; list-style: none; color: var(--sub); font-size: 13.5px; }
.notes li::before { content: "※"; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.faq details p { padding-bottom: 14px; }
@media (max-width: 560px) { .spec > div { grid-template-columns: 1fr; gap: 0; } }
.buybox .price.soon, .card .price.soon { font-size: 18px; color: var(--sub); }
.buybox .btn.block { margin-top: 14px; }
.buybox .btn.block:first-child { margin-top: 0; }
.login-promo { margin-top: 2px; }
.login-promo p { margin: 0 0 6px; }
.login-promo .btn.block { margin-top: 10px; }

/* 購入済み */
.lib { display: grid; gap: 14px; }
.lib .card { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 20px 14px 14px; }
.lib .info { flex: 1; min-width: 160px; }

/* 待ち画面 */
.center { text-align: center; padding: 56px 0; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 18px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } html { scroll-behavior: auto; } .card, .btn, .thumb img { transition: none; } }

/* 表記ページ */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px 28px 28px; box-shadow: var(--shadow-s); }
.doc h2 { border-left: 4px solid var(--accent); padding-left: 12px; scroll-margin-top: 84px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 12px; vertical-align: top; text-align: left; }
.doc th { color: var(--sub); width: 32%; font-weight: 700; }
.doc td { overflow-wrap: anywhere; }
.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0 6px; border-radius: 6px; font-weight: 700; }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.notice { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 12px; padding: 10px 16px; font-size: 14px; margin: 16px 0 24px; }

/* フッター */
#site-footer { border-top: 1px solid var(--line); padding: 26px 20px; text-align: center; font-size: 13px; color: var(--sub); background: #fff; }
#site-footer a { color: var(--sub); }
#site-footer a:hover { color: var(--ink); }
#site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 10px; }
#site-footer p { margin: 0; }

/* 小さな部品 */
.link-text { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--accent); text-decoration: underline; cursor: pointer; }
.link-text:hover { color: #0a625d; }
.ta-center { text-align: center; }
.bar nav a, .bar .right a, .link-btn { white-space: nowrap; }
@media (max-width: 760px) {
  .bar { gap: 4px 12px; padding: 8px 16px; }
  .brand { flex: 1; }
  .bar nav { order: 3; width: 100%; flex: none; }
  .who { max-width: 110px; }
}
@media (max-width: 560px) {
  main { padding-top: 26px; }
  .panel { padding: 20px; }
  .doc { padding: 4px 18px 22px; }
  .doc table, .doc tbody, .doc tr, .doc th, .doc td { display: block; width: 100%; }
  .doc th { border-bottom: 0; padding-bottom: 0; }
  .doc td { padding-top: 2px; }
  .lib .thumb { width: 100%; }
}
@media (max-width: 400px) { .who { display: none; } }

/* お知らせの窓(core.js の notify) */
dialog.notice { margin: auto; width: min(420px, calc(100vw - 40px)); padding: 24px 24px 20px; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-m); }
dialog.notice::backdrop { background: rgba(24, 32, 47, 0.45); }
dialog.notice h2 { margin: 0 0 10px; font-size: 18px; }
dialog.notice p { margin: 0 0 18px; color: var(--sub); line-height: 1.8; overflow-wrap: anywhere; }
