/* EQUA — 公開サイト共通スタイル
   EPロゴ（黒×金）とオープニングに合わせた配色。書体は Google Fonts（Cormorant Garamond / Noto Serif JP）だけを外部から読む。 */
:root {
  --bg: #07080c;
  --bg-2: #0b0d13;
  --surface: #0f121b;
  --surface-2: #141826;
  --surface-3: #1a1f2f;
  --ink: #ece6d6;
  --ink-2: #c9c1ad;
  --ink-3: #a39a86;
  --line: rgba(201, 162, 74, .22);
  --line-2: rgba(201, 162, 74, .45);
  --gold: #c9a24a;
  --gold-2: #e6c77a;
  --gold-3: #f3dfa6;
  --gold-grad: linear-gradient(135deg, #f3dfa6 0%, #e6c77a 30%, #c9a24a 62%, #9c7a2f 100%);
  --good: #7fcf9f;
  --bad: #ef8a7c;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 10px 30px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(230, 199, 122, .55), 0 0 22px rgba(201, 162, 74, .22);
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif-ja: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-underline-offset: 3px; text-decoration-color: rgba(230, 199, 122, .5); }
a:hover { color: var(--gold-3); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(201, 162, 74, .35); color: #fff; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-2); color: var(--gold-2); border: 1px solid var(--gold); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { background: rgba(7, 8, 12, .96); color: var(--ink); border-bottom: 1px solid var(--line); position: relative; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 199, 122, .75) 50%, transparent); pointer-events: none; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand .brand-mark { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(201, 162, 74, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--serif-en); font-size: 32px; font-weight: 600; letter-spacing: .24em; margin-right: -.24em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-family: var(--serif-en); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; color: var(--ink-3); margin-top: 6px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: .04em; padding: 6px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid transparent; transition: color .15s, border-color .15s, background .15s; }
.nav a:hover { color: var(--gold-3); border-color: var(--line); background: rgba(201, 162, 74, .06); }
.nav a[aria-current="page"] { color: var(--gold-2); border-color: var(--line-2); background: rgba(201, 162, 74, .08); }

/* ---------- headings ---------- */
h1, h2, h3 { font-family: var(--serif-ja); color: var(--ink); font-weight: 700; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.45; margin: 0 0 8px; letter-spacing: .04em; }
.page-head p { margin: 0; color: var(--ink-2); }
.eyebrow { font-family: var(--serif-en); font-size: 14px; font-weight: 700; letter-spacing: .28em; color: var(--gold); text-transform: uppercase; margin: 0 0 6px; }
main { padding-bottom: 56px; }
section { margin-top: 36px; }
h2 { font-size: 22px; line-height: 1.45; margin: 0 0 14px; letter-spacing: .03em; }
h3 { font-size: 17px; line-height: 1.5; margin: 0 0 6px; }

/* ---------- hero / world ---------- */
.hero {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 162, 74, .10), transparent 70%),
    var(--bg);
  color: var(--ink);
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}
.hero-title { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-title h1 { margin: 0; font-size: clamp(20px, 3.2vw, 28px); line-height: 1.5; font-weight: 700; letter-spacing: .04em; }
.hero-title p { margin: 0; font-family: var(--serif-en); font-size: 15px; font-weight: 600; letter-spacing: .12em; color: var(--gold); }
.world-stack {
  border-radius: 6px;
  overflow: hidden;
  background: #0b0e16;
  border: 1px solid rgba(230, 199, 122, .55);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(201, 162, 74, .28), 0 18px 50px rgba(0, 0, 0, .55), 0 0 40px rgba(201, 162, 74, .08);
}
.world {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: #0b0e16;
}
.world + .world { border-top: 1px solid rgba(201, 162, 74, .3); }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.world-ui { position: absolute; inset: 0; pointer-events: none; font-size: calc(100cqw / 768 * 6.4); line-height: 1.2; color: #e8eefb; }
.world-ui > * { position: absolute; white-space: nowrap; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.wu-title { font-weight: 700; color: #ffe6a6; }
.wu-sub { color: #cfe0ff; font-size: .82em; }
.wu-val { font-weight: 700; text-align: right; transform: translateX(-100%); color: #fff; font-variant-numeric: tabular-nums; }
.wu-plate { transition: opacity .3s; }
.wu-clock { text-align: center; font-weight: 700; display: flex; flex-direction: column; justify-content: center; }
.world-note { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }
/* スマホでも全体を表示（切り出さない。10/19 将さん：EQUA HQ が見切れる） */

/* ---------- board ---------- */
.board { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: relative; }
.board::before { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.board-head h2 { margin: 0; }
.updated { font-size: 13px; color: var(--ink-3); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.kpi-label { font-size: 13px; color: var(--ink-2); margin: 0; }
.kpi-value { font-family: var(--serif-en); font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; margin: 2px 0 0; font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; overflow-wrap: anywhere; line-height: 1.2; color: var(--gold-2); }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin: 0; }
.kpi.profit .kpi-value { color: var(--good); }
.kpi.profit.neg .kpi-value { color: var(--bad); }
.table-wrap { margin-top: 16px; }
table.money { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; table-layout: fixed; color: var(--ink); }
table.money td:not(:first-child) { white-space: nowrap; }
table.money th, table.money td { padding: 8px 6px; border-bottom: 1px solid rgba(201, 162, 74, .14); text-align: right; }
table.money th:first-child, table.money td:first-child { text-align: left; width: 40%; }
table.money thead th { font-size: 12px; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line-2); }
table.money tr.group th { text-align: left; font-size: 12px; color: var(--gold); letter-spacing: .08em; padding-top: 14px; border-bottom: none; }
table.money td.sub, table.money th.sub { padding-left: 14px; color: var(--ink-2); }
table.money tr.total td { font-weight: 700; }
table.money tr.profit td { font-weight: 800; font-size: 15px; border-bottom: none; background: rgba(201, 162, 74, .08); color: var(--gold-3); }
.neg-num { color: var(--bad); }
.notes { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; padding-left: 1.2em; }
.notes li { margin: 2px 0; }
.board-error { color: var(--bad); font-size: 14px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .tag, .tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--gold-2); background: rgba(201, 162, 74, .1); border: 1px solid rgba(201, 162, 74, .35); border-radius: 999px; padding: 1px 10px; line-height: 1.7; }
.card .tag.soon { color: var(--ink-2); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .15); }
.card .meta { font-size: 13px; color: var(--ink-3); }
.btn { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: auto; background: transparent; color: var(--gold-2); text-decoration: none; font-weight: 700; font-size: 15px; padding: 9px 18px; min-height: 44px; border-radius: 8px; border: 1px solid var(--gold); transition: background .15s, color .15s, box-shadow .15s; }
.btn:hover { background: rgba(201, 162, 74, .12); color: var(--gold-3); box-shadow: var(--glow); }
.btn .ext { font-size: 12px; opacity: .8; }
.btn.disabled { background: transparent; color: var(--ink-3); border-color: rgba(255, 255, 255, .15); pointer-events: none; }
.book { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.book img { width: 96px; height: auto; border-radius: 4px; box-shadow: 0 0 0 1px rgba(201, 162, 74, .35), 0 6px 18px rgba(0, 0, 0, .5); }
.book-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ---------- prose ---------- */
.prose { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 28px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; }
.prose dl { display: grid; grid-template-columns: 9em 1fr; gap: 6px 16px; margin: 0; }
.prose dt { font-weight: 700; color: var(--gold-2); }
.prose dd { margin: 0; color: var(--ink-2); }
@media (max-width: 520px) { .prose { padding: 18px; } .prose dl { grid-template-columns: 1fr; } .prose dd { margin-bottom: 8px; } }
.callout { border-left: 2px solid var(--gold); background: rgba(201, 162, 74, .07); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site-footer { background: #050609; color: var(--ink-3); padding: 32px 0 36px; font-size: 13px; border-top: 1px solid var(--line); position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 199, 122, .6) 50%, transparent); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--gold-3); }
.foot-brand { display: flex; flex-direction: column; gap: 2px; }
.foot-brand strong { font-family: var(--serif-en); font-weight: 600; font-size: 24px; letter-spacing: .24em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; align-self: flex-start; }
.foot-nav { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: flex-start; }

/* ---------- responsive ---------- */
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .brand-name { font-size: 28px; }
  .brand .brand-mark { width: 42px; height: 42px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 6px 8px; font-size: 15px; justify-content: center; }
  .board { padding: 14px; }
  table.money { font-size: 12.5px; }
  table.money th:first-child, table.money td:first-child { width: 38%; }
  table.money th, table.money td { padding: 7px 2px; }
  table.money td.sub { padding-left: 6px; }
  table.money tr.profit td { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.callout { margin-top: 16px; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; }
.grid.books { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
main.wrap { padding-bottom: 56px; }

/* 引っぱって更新（ptr.js） */
.ptr{position:fixed;left:50%;top:-44px;transform:translate(-50%,0);z-index:9999;display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;background:#141826;color:#e6c77a;border:1px solid rgba(201,162,74,.5);font-size:14px;box-shadow:0 4px 14px rgba(0,0,0,.45);opacity:0;transition:opacity .15s;pointer-events:none}
.ptr.on{opacity:1}
.ptr-ico{display:inline-block;transition:transform .2s}
.ptr.ready .ptr-ico{transform:rotate(180deg)}
.ptr.loading .ptr-ico{animation:ptrspin .8s linear infinite}
@keyframes ptrspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ptr,.ptr-ico{transition:none}.ptr.loading .ptr-ico{animation:none}}

/* ---------- 情報設計（入口カード・分類・目次） ---------- */
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--gold-2); background: rgba(201, 162, 74, .1); color: var(--gold-3); }
.btn.gold { background: var(--gold-grad); color: #14110a; border: 1px solid #e6c77a; }
.btn.gold:hover { color: #14110a; filter: brightness(1.06); box-shadow: 0 0 24px rgba(230, 199, 122, .35); }
/* カード全体が1つのリンク */
a.card-link { color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card-link h3 { color: var(--ink); }
a.card-link:hover { color: inherit; border-color: rgba(230, 199, 122, .7); box-shadow: var(--shadow), 0 0 26px rgba(201, 162, 74, .16); transform: translateY(-2px); }
a.card-link:hover h3 { color: var(--gold-3); }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card .tag.en, .tag.en { color: #b9cdf0; background: rgba(120, 150, 210, .1); border-color: rgba(150, 180, 230, .35); }
.tag.rec { color: #14110a; background: var(--gold-grad); border-color: #e6c77a; }
.go { display: inline-flex; align-items: center; align-self: flex-start; margin-top: auto; min-height: 44px; padding: 9px 18px; border-radius: 8px; background: transparent; color: var(--gold-2); border: 1px solid var(--gold); font-weight: 700; font-size: 15px; transition: background .2s, color .2s; }
a.card-link:hover .go { background: rgba(201, 162, 74, .14); color: var(--gold-3); }
/* トップ：何を探していますか？ */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; background: radial-gradient(ellipse 80% 120% at 0% 0%, rgba(201, 162, 74, .14), transparent 60%), var(--surface-2); color: var(--ink); border-radius: var(--radius); border: 1px solid rgba(230, 199, 122, .5); padding: 22px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cta > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cta h3 { color: var(--gold-3); font-size: 20px; margin: 0; }
.cta p { margin: 0; color: var(--ink-2); font-size: 15px; }
.cta .tag { align-self: flex-start; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 10px; }
.cta .btn { margin-top: 0; align-self: center; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card.pick { border-top: 2px solid var(--gold); padding: 20px; }
.card.pick h3 { font-size: 20px; }
/* 分類の目次（ページ内リンク） */
.jump { margin-top: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.jump a::after { content: "↓"; font-size: 13px; color: var(--gold); }
.jump a:hover { border-color: var(--gold-2); background: var(--surface-2); color: var(--gold-3); box-shadow: 0 0 16px rgba(201, 162, 74, .18); }
.jump .n { font-size: 12px; font-weight: 700; color: var(--gold-2); background: rgba(201, 162, 74, .12); border-radius: 999px; padding: 0 7px; line-height: 1.6; }
.cat { scroll-margin-top: 12px; }
.cat-head h2 { margin-bottom: 2px; padding-left: 12px; border-left: 2px solid var(--gold); }
.cat-head p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.toplink { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; }
.more .btn { margin-top: 0; }
.blog-all { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.blog-all .btn { margin-top: 0; }
@media (max-width: 520px) {
  .jump ul { display: grid; grid-template-columns: 1fr; }
  .jump ul { gap: 6px; }
  .jump a { display: flex; justify-content: space-between; border-radius: 10px; }
  .cta { padding: 16px; }
  .cta .btn { align-self: stretch; justify-content: center; }
  .go { align-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { a.card-link, .btn, .go, .jump a, .nav a { transition: none; } a.card-link:hover { transform: none; } }

.foot-line { display: flex; flex-direction: column; gap: 10px; max-width: 320px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.foot-line p { margin: 0; font-size: 13px; color: var(--ink-2); }
.line-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 20px; border-radius: 999px; background: #06c755; color: #fff; font-weight: 700; text-decoration: none; align-self: flex-start; box-shadow: 0 0 0 1px rgba(230, 199, 122, .35); }
.site-footer a.line-btn { color: #fff; }
.line-btn:hover, .line-btn:focus-visible { filter: brightness(1.08); color: #fff; }
