/* =============================================================================
   site.css — 日どり / hidori 共通スタイル
   全ツール共通・外部リソースなし（システムフォント）・モバイルファースト。
   ライト/ダーク両対応（prefers-color-scheme）。8pxグリッド・等幅数字・控えめな階層。
   ============================================================================= */

/* ---------- デザイントークン（ライト） ---------- */
:root {
  color-scheme: light;

  /* サーフェス階層 */
  --bg:          #f4f6f8;
  --surface:     #ffffff;
  --surface-2:   #eef2f5;
  --surface-3:   #e4eaef;

  /* テキスト */
  --text:            #16212b;
  --text-secondary:  #465666;
  --text-muted:      #5f6b78;

  /* 境界線 */
  --border:         #dde5ec;
  --border-strong:  #c6d2dc;

  /* アクセント（ブルー〜ティール） */
  --accent:          #0e6b82;
  --accent-hover:    #0b5668;
  --accent-active:   #084858;
  --accent-contrast: #ffffff;
  --accent-weak:     #e7f1f4;
  --accent-weak-2:   #d3e7ec;
  --accent-border:   #b4d6de;
  --accent-ring:     0 0 0 3px rgba(14, 107, 130, .25);

  /* セマンティック */
  --ok-text:   #1f7a4d;  --ok-bg:   #e7f4ec;  --ok-border:   #a9d8bd;
  --warn-text: #8a5a08;  --warn-bg: #fbf1dd;  --warn-border: #e6c583;
  --danger-text: #bb3b33; --danger-bg: #fbeae7; --danger-border: #ecb2ab;

  /* カウントダウン（暖色アンバー・落ち着いた注意喚起） */
  --count-text:   #a1520a;
  --count-bg:     #fbecd6;
  --count-border: #eecb92;

  /* 形状・影 */
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 34, 51, .05), 0 1px 3px rgba(16, 34, 51, .05);
  --shadow-md: 0 3px 8px rgba(16, 34, 51, .07), 0 10px 24px rgba(16, 34, 51, .07);

  /* タイポ */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 寸法・動き */
  --maxw: 880px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur:  .18s;
}

/* ---------- デザイントークン（ダーク） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg:        #0f151b;
    --surface:   #161d25;
    --surface-2: #1d2732;
    --surface-3: #26313d;

    --text:           #e7edf3;
    --text-secondary: #aeb9c5;
    --text-muted:     #8593a0;

    --border:        #28323d;
    --border-strong: #394653;

    --accent:          #39b1ca;
    --accent-hover:    #55c2d8;
    --accent-active:   #2c9cb4;
    --accent-contrast: #06222b;
    --accent-weak:     #142b33;
    --accent-weak-2:   #1b3a45;
    --accent-border:   #2c5666;
    --accent-ring:     0 0 0 3px rgba(57, 177, 202, .32);

    --ok-text:   #5cc98d;  --ok-bg:   #12271c;  --ok-border:   #2d5a42;
    --warn-text: #e6b45c;  --warn-bg: #2a2413;  --warn-border: #57482a;
    --danger-text: #ef8b83; --danger-bg: #2b1512; --danger-border: #582b26;

    --count-text:   #ecb45c;
    --count-bg:     #2a2413;
    --count-border: #57482a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .45), 0 12px 28px rgba(0, 0, 0, .35);
  }
}

/* ---------- リセット・ベース ---------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-weak-2); color: var(--text); }

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

strong { font-weight: 700; color: var(--text); }

h1, h2, h3 { color: var(--text); text-wrap: balance; }

h1 {
  font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.05rem);
  line-height: 1.3;
  letter-spacing: -.02em;
  font-weight: 700;
  margin: .2rem 0 .5rem;
}

h2 {
  position: relative;
  font-size: clamp(1.2rem, 1.06rem + .5vw, 1.38rem);
  line-height: 1.4;
  letter-spacing: -.01em;
  font-weight: 700;
  margin: 2.4rem 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 2.5rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

h3 {
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 700;
  margin: 1.6rem 0 .4rem;
}

p { margin: .6rem 0; }
p:first-child { margin-top: 0; }

main ul, main ol { padding-left: 1.3rem; margin: .6rem 0; }
main li { margin: .35rem 0; }
main li::marker { color: var(--accent-border); }

/* ---------- レイアウト ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.1rem 1rem;
}
@media (min-width: 640px) {
  main { padding: 2.4rem 1.25rem 1.5rem; }
}

.lead {
  color: var(--text-secondary);
  font-size: clamp(1rem, .97rem + .2vw, 1.1rem);
  line-height: 1.75;
  max-width: 60ch;
  margin: .4rem 0;
}

/* ---------- ヒーロー（トップ） ---------- */
.hero {
  padding: .5rem 0 1.6rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 { margin-top: 0; }

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .6rem;
  padding: 0;
  margin: 1.2rem 0 0;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .4rem .8rem;
  white-space: nowrap;
}
.trust svg {
  width: 15px; height: 15px;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- ヘッダー・ワードマーク ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .55rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  padding: .1rem;
  border-radius: var(--radius-sm);
}
.wordmark:hover { color: var(--text); }
.wordmark-mark { width: 30px; height: 30px; flex: none; }
.wordmark-mark .mark-tile { fill: var(--accent); }
.wordmark-mark .mark-line {
  stroke: var(--accent-contrast);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wordmark-mark .mark-dot  { fill: var(--accent-contrast); }

.wordmark-lockup { display: flex; flex-direction: column; line-height: 1.08; }
.wordmark-name {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.wordmark-tag {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tagline {
  margin-left: auto;
  font-size: .76rem;
  color: var(--text-muted);
}
@media (max-width: 559px) {
  .tagline { display: none; }
}

/* ---------- フッター ---------- */
.site-footer {
  margin-top: 4rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-muted);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.1rem 2.25rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  margin-bottom: .9rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
}
.site-footer nav a { color: var(--accent); }
.site-footer p { margin: .2rem 0; }

/* ---------- カード（ツール一覧） ---------- */
.card-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card a {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.2rem 1.2rem 1.3rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--accent-weak);
  color: var(--accent);
}
.card-icon svg {
  width: 26px; height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-title {
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.01em;
  color: var(--text);
}
.card-desc {
  font-size: .87rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.card::after {
  content: "→";
  position: absolute;
  top: 1.25rem;
  right: 1.2rem;
  color: var(--accent);
  font-size: 1rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover::after { opacity: 1; transform: none; }

/* ---------- フォーム ---------- */
.tool-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin: 1.4rem 0;
}
@media (min-width: 560px) {
  .tool-form { padding: 1.6rem; }
}

.field { margin-bottom: 1.15rem; }
.field > label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.field .hint {
  display: inline;
  font-weight: 400;
  font-size: .78rem;
  color: var(--text-muted);
  margin-left: .35rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 24rem;
  min-height: 46px;
  padding: .6rem .75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input::placeholder { color: var(--text-muted); opacity: .8; }

input[type="text"]:focus-visible,
input[type="number"]:focus-visible,
input[type="date"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--accent-ring);
}

input[type="number"] { font-variant-numeric: tabular-nums; }

/* セレクトのシェブロン */
select {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235f6b78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 12px 8px;
}
@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238593a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  }
}

/* インライン配置（年月日・株価/株数・水温） */
.field-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
}
.field-inline > div { display: flex; flex-direction: column; }
.field-inline > div > label {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.field-inline select,
.field-inline input[type="text"],
.field-inline input[type="date"] { min-width: 7.5rem; }
.field-inline input[type="number"] { max-width: 9rem; min-width: 6rem; }

/* レンジ（水温スライダー） */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--surface-3);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--surface-3);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--accent-ring); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: var(--accent-ring); }

/* フィールドセット */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 0 1.15rem;
  padding: .85rem 1rem 1rem;
}
fieldset legend {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text-secondary);
  padding: 0 .4rem;
}

/* ラジオ・チェックボックスをタップしやすいチップに */
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}
.check-row label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem .85rem;
  font-size: .9rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.check-row label:hover { border-color: var(--accent-border); background: var(--accent-weak); }
.check-row input[type="radio"],
.check-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  flex: none;
  margin: 0;
}
.check-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* ボタン */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .7rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-contrast);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
button:hover,
.btn:hover { background: var(--accent-hover); color: var(--accent-contrast); }
button:active,
.btn:active { background: var(--accent-active); transform: translateY(1px); box-shadow: none; }
button:focus-visible,
.btn:focus-visible { outline: none; box-shadow: var(--accent-ring); }

button[type="submit"] { width: 100%; white-space: nowrap; }
@media (min-width: 560px) { button[type="submit"] { width: auto; } }

button.secondary {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
button.secondary:hover {
  color: var(--accent);
  background: var(--accent-weak);
  border-color: var(--accent-border);
}

/* ---------- 結果表示 ---------- */
#result-area:not([hidden]) { animation: reveal .32s var(--ease) both; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.result-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem 1.25rem;
  margin: 1rem 0;
}
.result-box p:first-child { margin-top: 0; }
.result-box p:last-child { margin-bottom: 0; }

.result-big {
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: .25rem 0;
}
.result-sub {
  color: var(--text-secondary);
  font-size: .85rem;
}

.countdown {
  display: inline-block;
  font-weight: 700;
  font-size: .9em;
  font-variant-numeric: tabular-nums;
  color: var(--count-text);
  background: var(--count-bg);
  border: 1px solid var(--count-border);
  border-radius: var(--radius-pill);
  padding: .05em .65em;
  margin-left: .4em;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}

/* ---------- 表 ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .86rem;
  background: var(--surface);
}

th, td {
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover td { background: var(--accent-weak); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap, th.wrap { white-space: normal; min-width: 12rem; }

/* 横スクロールする比較表：会社名の1列目を固定 */
#cost-table { min-width: 640px; }
#cost-table th:first-child,
#cost-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 1;
}
#cost-table thead th:first-child { background: var(--surface-2); z-index: 2; }
#cost-table tbody tr:hover td:first-child { background: var(--accent-weak); }

/* 早見表など、狭い表は折り返して画面内に収める */
.lookup-table th, .lookup-table td { white-space: normal; }

/* ---------- バッジ（確認状態） ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.5;
  padding: .12em .55em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: .5em; height: .5em;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge-verified { color: var(--ok-text); background: var(--ok-bg); border-color: var(--ok-border); }
.badge-unverified { color: var(--warn-text); background: var(--warn-bg); border-color: var(--warn-border); }

/* ---------- 注意・お知らせ・免責 ---------- */
.notice, .warn {
  position: relative;
  border-radius: var(--radius);
  padding: .85rem 1rem .85rem 2.6rem;
  font-size: .85rem;
  line-height: 1.7;
  margin: 1rem 0;
}
.notice::before, .warn::before {
  position: absolute;
  left: .9rem;
  top: .82rem;
  font-weight: 700;
  line-height: 1.7;
}
.notice {
  color: var(--text-secondary);
  background: var(--accent-weak);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
}
.notice::before { content: "\24D8"; color: var(--accent); font-size: 1.05em; }
.notice strong { color: var(--text); }

.warn {
  color: var(--warn-text);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 3px solid var(--warn-border);
}
.warn::before { content: "\26A0\FE0E"; color: var(--warn-text); }
.warn strong { color: var(--warn-text); }
.warn + .warn { margin-top: -.4rem; }

/* ---------- 計算式ボックス ---------- */
.formula {
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.75;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  margin: .9rem 0;
  overflow-x: auto;
  font-variant-numeric: tabular-nums;
}
.formula strong { color: var(--text); }

/* ---------- アプリ告知バナー ---------- */
.app-banner {
  position: relative;
  display: block;
  margin: 1.6rem 0;
  padding: 1rem 1.1rem 1rem 2.9rem;
  border: 1px solid var(--accent-border);
  background: var(--accent-weak);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.65;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.app-banner:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.app-banner::before {
  content: "\1F4F1";
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 1.1rem;
  line-height: 1.5;
}
.app-banner strong { color: var(--accent); font-weight: 700; }

/* ---------- データ更新履歴（タイムライン） ---------- */
.history-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: .85rem;
  color: var(--text-secondary);
}
.history-list li {
  position: relative;
  margin-left: .35rem;
  padding: 0 0 .95rem 1.4rem;
  border-left: 2px solid var(--border);
  line-height: 1.7;
}
.history-list li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: .55em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent-border);
}
.history-list li:first-child::before { background: var(--accent); border-color: var(--accent); }
.history-list li:first-child { color: var(--text); }
.history-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.history-list li strong { font-weight: 700; }

/* ---------- 年別ページ・ハブ（和暦西暦変換など、大量の年次リンク一覧） ---------- */
.year-hub { margin: .5rem 0 1.6rem; }
.year-hub h4 {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 1.1rem 0 .5rem;
}
.year-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .3rem;
}
.year-links a {
  display: inline-block;
  font-size: .78rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .25rem .65rem;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.year-links a:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-weak);
}

/* ---------- ユーティリティ ---------- */
small, .small {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ローディング（今後のツール用の共通パターン） */
.spinner {
  display: inline-block;
  width: 1.1em; height: 1.1em;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -.15em;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  display: inline-block;
  height: 1em;
  min-width: 5em;
  border-radius: 6px;
  color: transparent;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- モーション配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
