/* Glass Gradient の白 — アプリ用の上書き層 v1.1（AI 作成・2026-11-27。v1.1 で詳細パネルの白を濃くした）
   Ink v2.1（ink.css）で作ったアプリを、Glass Gradient の白（同じフォルダの document-template.html の [data-theme="white"]）に着せ替える。
   正本はこのファイル。各アプリには ink.css と同じく写しを置く（Cloudflare のアプリは public/ に置かないと配れないため）。

   使い方
   - ink.css のすぐ後、アプリの CSS の前に読む:  ink.css → glass-white.css → アプリの CSS
   - 字は Google Fonts の Manrope と Zen Kaku Gothic New。<head> の Inter・Noto Sans JP の読み込みを差し替える
     https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap
   - theme-color は地のグレー #d4d5d8 にする
   - 地は body.ink-ui の ::before に固定する。アプリの CSS で面に --ink-canvas を塗っている所は透明になる（地が見える）。
     上に貼り付く帯（sticky）は透けて重なるので、アプリの CSS で .gw-glass と同じ指定（半透明の白＋ぼかし）を当てる
   - 選択中・主ボタンは今までどおり艶のある黒（--ink-black）。色は白・墨・グレーだけ

   決まり（Glass Gradient の readme と同じ）
   - 読む文・表・一覧はカード（半透明の白）に入れる。地の上に直に置くのは題と短い説明だけ
   - 左に 2px 以上の縦の線を引かない（引用も灰色の箱にする）
   - すりガラスのぼかし（backdrop-filter）は、帯・サイドバー・浮かぶ面だけ。長い一覧やカード全部にはかけない（重くなる） */

:root {
  /* ---- Glass Gradient の白の値 ---- */
  --gw-ink: #1c1c1e;
  --gw-text: #4a4a4f;
  --gw-sub: #5c5c61;
  --gw-mute: #8c8c91;
  --gw-bg-base: #ececeb;
  /* 左上がいちばん濃いグレー、右へ行くほど白 */
  --gw-bg:
    radial-gradient(75% 70% at 0% 0%, #b9babe 0%, rgba(185, 186, 190, 0) 70%),
    radial-gradient(42% 55% at 98% 52%, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(40% 45% at 62% 30%, rgba(246, 246, 245, .9) 0%, rgba(246, 246, 245, 0) 70%),
    radial-gradient(40% 42% at 100% 100%, rgba(210, 211, 215, .95) 0%, rgba(210, 211, 215, 0) 70%),
    radial-gradient(55% 45% at 18% 100%, rgba(196, 197, 201, .9) 0%, rgba(196, 197, 201, 0) 70%),
    linear-gradient(118deg, #cbcccf 0%, #dfdfe0 42%, #efefee 72%, #fbfbfa 100%);
  --gw-bg-sm:
    radial-gradient(90% 50% at 0% 0%, #bdbec2 0%, rgba(189, 190, 194, 0) 75%),
    radial-gradient(60% 30% at 110% 60%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(70% 40% at 100% 105%, rgba(214, 215, 218, .9) 0%, rgba(214, 215, 218, 0) 70%),
    linear-gradient(160deg, #cfd0d3 0%, #e6e6e6 55%, #f4f4f3 100%);
  /* カード（読む面） */
  --gw-card: rgba(255, 255, 255, .8);
  --gw-card-edge: rgba(255, 255, 255, .96);
  --gw-card-shadow: 0 0 0 1px rgba(0, 0, 0, .035), 0 24px 60px -38px rgba(0, 0, 0, .24);
  /* すりガラス（帯・サイドバー） */
  --gw-glass: rgba(255, 255, 255, .58);
  --gw-glass-strong: rgba(255, 255, 255, .78);
  --gw-glass-edge: rgba(255, 255, 255, .9);
  --gw-glass-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 16px 36px -24px rgba(0, 0, 0, .32);
  --gw-blur: blur(18px) saturate(1.3);
  /* 浮かぶ面（右から出る詳細・ダイアログ） */
  --gw-float: rgba(255, 255, 255, .9);
  /* 数字のグラデーション（墨→グレー） */
  --gw-grad-text: linear-gradient(135deg, #1c1c1e 10%, #a4a4a9 90%);
  --gw-latin: "Manrope", "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  --gw-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;

  /* ---- Ink の値を差し替える（部品はそのまま Glass の白になる） ---- */
  --ink-canvas: transparent;          /* 地＝グラデーション */
  --ink-surface: var(--gw-card);
  --ink-fill: rgba(0, 0, 0, .04);
  --ink-fill-2: rgba(0, 0, 0, .07);
  --ink-hover: rgba(0, 0, 0, .025);
  --ink-text: var(--gw-ink);
  --ink-text-2: var(--gw-text);
  --ink-text-3: var(--gw-mute);
  --ink-line: rgba(0, 0, 0, .08);
  --ink-line-2: rgba(0, 0, 0, .16);
  --ink-solid: rgba(28, 28, 30, .82);
  --ink-card-shadow: var(--gw-card-shadow);
  --ink-float-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 40px 90px -40px rgba(0, 0, 0, .38);
  --ink-scrim: rgba(28, 28, 30, .16);
  --ink-r-card: 22px;
  --ink-r-ctl: 14px;
  --ink-r-sm: 10px;
  --ink-r-float: 28px;
  --ink-font: "Manrope", "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --ink-mono: var(--ink-font);
}

/* ---------------------------------------------------------------- 地 */

html:has(body.ink-ui) { background: var(--gw-bg-base); }
body.ink-ui { background: transparent; color: var(--gw-ink); }
body.ink-ui::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--gw-bg-sm); }
@media (min-width: 821px) {
  body.ink-ui::before { background: var(--gw-bg); }
}

/* すりガラスの面（アプリの CSS から sticky の帯などに使う） */
.gw-glass {
  background: var(--gw-glass); border: 1px solid var(--gw-glass-edge); box-shadow: var(--gw-glass-shadow);
  -webkit-backdrop-filter: var(--gw-blur); backdrop-filter: var(--gw-blur);
}
.gw-num { background: var(--gw-grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gw-latin { font-family: var(--gw-latin); }

/* ---------------------------------------------------------------- 枠（サイドバーは浮かぶすりガラスの板） */

@media (min-width: 821px) {
  .ink-side {
    top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px;
    border: 1px solid var(--gw-glass-edge); border-radius: 30px;
    background: var(--gw-glass); box-shadow: var(--gw-glass-shadow);
    -webkit-backdrop-filter: var(--gw-blur); backdrop-filter: var(--gw-blur);
  }
}
@media (max-width: 820px) {
  .ink-side {
    background: var(--gw-glass-strong); border-bottom-color: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: var(--gw-blur); backdrop-filter: var(--gw-blur);
  }
  .ink-nav { background: rgba(0, 0, 0, .045); border-radius: 999px; }
}
.ink-brand { font-family: var(--gw-latin); font-weight: 600; letter-spacing: -.03em; }
.ink-nav a { border-radius: 999px; }
.ink-nav a:hover { background: rgba(0, 0, 0, .05); }

/* ---------------------------------------------------------------- 見出し（英字は Manrope を大きく・細め） */

.ink-title h1, .ink-read-title { font-weight: 600; letter-spacing: -.03em; }
.ink-count, .ink-kpi-value, .ink-bar-num, .ink-rank-num, .ink-table .num { font-family: var(--gw-latin); }

/* ---------------------------------------------------------------- カード（半透明の白・白い縁・やわらかい影） */

.ink-panel, .ink-card, .ink-kpi, .ink-table-wrap, .ink-article, .ink-form-card, .ink-empty {
  background: var(--gw-card); border-color: var(--gw-card-edge); box-shadow: var(--gw-card-shadow);
}
.ink-card:hover { border-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 28px 60px -34px rgba(0, 0, 0, .3); }
.ink-panel--flat { background: rgba(255, 255, 255, .42); border-color: rgba(255, 255, 255, .7); box-shadow: none; }
.ink-empty { border-style: solid; }
/* 艶のある黒のカード（KPI の 1 枚・主ボタン）は黒のまま */
.ink-kpi--dark { background: var(--ink-black); border-color: transparent; box-shadow: var(--ink-black-shadow); }
.ink-kpi:not(.ink-kpi--dark) .ink-kpi-value { background: var(--gw-grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ink-notice { background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .85); }

/* ---------------------------------------------------------------- 丸い部品（ボタン・札・検索・タブは丸く） */

.ink-btn, .ink-chip, .ink-search, .ink-tab, .ink-select select, .ink-side-select select, .ink-input-select { border-radius: 999px; }
.ink-btn--sm { border-radius: 999px; }
.ink-btn, .ink-icon-btn, .ink-chip, .ink-search { background-color: rgba(255, 255, 255, .7); border-color: rgba(0, 0, 0, .1); }
.ink-btn:hover, .ink-icon-btn:hover:not(:disabled), .ink-chip:hover { background-color: rgba(255, 255, 255, .95); border-color: rgba(0, 0, 0, .18); }
.ink-btn--dark, .ink-btn--dark:hover { background: var(--ink-black); border-color: transparent; }
.ink-icon-btn { border-radius: 999px; }
.ink-seg { background: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .9); border-radius: 999px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.ink-seg-btn { border-radius: 999px; }
.ink-tabs { border-color: rgba(0, 0, 0, .08); }
.ink-input, .ink-textarea { background-color: rgba(255, 255, 255, .78); }
.ink-input:focus, .ink-textarea:focus { background-color: #fff; }
.ink-pg { background: transparent; }
.ink-pg:hover:not(:disabled) { background: rgba(255, 255, 255, .7); }

/* ---------------------------------------------------------------- 表（見出しは薄いグレーの帯） */

.ink-table th { background: rgba(0, 0, 0, .03); color: var(--gw-text); }
.ink-table tbody tr.is-link:hover, .ink-rank > li > :is(a, button):hover { background: rgba(255, 255, 255, .6); }
.ink-read :where(th) { color: var(--gw-text); }

/* ---------------------------------------------------------------- 浮かぶ面（右から出る詳細） */

/* 一覧の上に重なるので、写真や表紙が透けないよう白を濃く・強めにぼかす（スマホは全画面なのでほぼ不透明） */
.ink-drawer {
  background: rgba(255, 255, 255, .95); border-color: #fff;
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
}
@media (max-width: 820px) {
  .ink-drawer { background: rgba(255, 255, 255, .97); }
}

/* ---------------------------------------------------------------- 読む（引用は左の線をやめて灰色の箱） */

.ink-read :where(blockquote) { border-left: 0; border-radius: var(--ink-r-ctl); background: rgba(0, 0, 0, .035); }
.ink-read :where(pre) { background: rgba(0, 0, 0, .04); }

/* ---------------------------------------------------------------- 印刷は地とガラスを消す */

@media print {
  html:has(body.ink-ui) { background: #fff; }
  body.ink-ui::before { display: none; }
  .ink-side, .ink-drawer, .gw-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
