/* lalatoki portal 共通スタイル — Liquid Glass（2026-11-27〜）。
   淡い色の光を敷いた背景の上に、半透明で背景がにじむ「ガラス」の部品（浮いたカプセル型のナビ、カード、ボタン）を重ねる。
   ガラスの約束: 半透明の塗り + 背景ぼかし(ナビ・メニュー・ログインなど上に浮く部品だけ) + 縁の光(::before のグラデーションの枠) + 内側の光沢と柔らかい影。
   ログイン・管理画面・各セクションの index.html（generate-index が生成）で共有する。
   既定はダーク。ナビ右端のボタンでライトに切り替えられ、選択はブラウザに保存する(portal-assets/theme.js)。 */

:root {
  color-scheme: light;

  --bg: #eef1f7;
  --bg-solid: #ffffff;
  --tile: rgba(255, 255, 255, 0.5);
  --text: #1d1d1f;
  --text-2: #55555c;
  --text-3: #808088;
  --line: rgba(60, 60, 67, 0.16);
  --link: #0066cc;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --eyebrow: #bf4800;
  --nav-bg: rgba(255, 255, 255, 0.62);
  --nav-line: rgba(0, 0, 0, 0.08);
  --menu-bg: rgba(255, 255, 255, 0.78);
  --field: rgba(255, 255, 255, 0.62);
  --seg: rgba(255, 255, 255, 0.42);
  --seg-active: rgba(255, 255, 255, 0.95);
  --err: #d70015;
  --warn-bg: rgba(255, 159, 10, 0.16);
  --warn-text: #8a4b00;
  --shadow: 0 22px 50px rgba(31, 41, 80, 0.16);

  /* ガラスの素材 */
  --glass: rgba(255, 255, 255, 0.46);
  --glass-hover: rgba(255, 255, 255, 0.6);
  --glass-sheen: rgba(255, 255, 255, 0.55);          /* 上半分の光沢 */
  --glass-rim: rgba(255, 255, 255, 1);               /* 縁の光(左上) */
  --glass-rim-2: rgba(255, 255, 255, 0.45);          /* 縁の光(右下) */
  --glass-edge: rgba(15, 23, 42, 0.07);              /* 外側の細い輪郭 */
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(31, 41, 80, 0.1);
  --glass-blur: blur(22px) saturate(180%);
  --ambient:
    radial-gradient(46vmax 36vmax at 8% 4%, rgba(120, 115, 245, 0.32), transparent 70%),
    radial-gradient(40vmax 32vmax at 96% 14%, rgba(90, 200, 250, 0.34), transparent 70%),
    radial-gradient(46vmax 38vmax at 84% 96%, rgba(255, 100, 140, 0.22), transparent 70%),
    radial-gradient(40vmax 34vmax at 4% 92%, rgba(255, 190, 90, 0.28), transparent 70%);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "PingFang SC", sans-serif;
  --ease-spring: cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #07080c;
  --bg-solid: #14151b;
  --tile: rgba(255, 255, 255, 0.06);
  --text: #f5f5f7;
  --text-2: #a6a6ad;
  --text-3: #85858c;
  --line: rgba(255, 255, 255, 0.14);
  --link: #4aa8ff;
  --blue: #0a84ff;
  --blue-hover: #409cff;
  --eyebrow: #ffb340;
  --nav-bg: rgba(30, 30, 38, 0.5);
  --nav-line: rgba(255, 255, 255, 0.1);
  --menu-bg: rgba(24, 24, 32, 0.72);
  --field: rgba(255, 255, 255, 0.06);
  --seg: rgba(255, 255, 255, 0.07);
  --seg-active: rgba(255, 255, 255, 0.2);
  --err: #ff453a;
  --warn-bg: rgba(255, 214, 10, 0.1);
  --warn-text: #ffd60a;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55);

  --glass: rgba(255, 255, 255, 0.055);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --glass-sheen: rgba(255, 255, 255, 0.06);
  --glass-rim: rgba(255, 255, 255, 0.42);
  --glass-rim-2: rgba(255, 255, 255, 0.1);
  --glass-edge: rgba(255, 255, 255, 0.07);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.45);
  --ambient:
    radial-gradient(46vmax 36vmax at 8% 4%, rgba(94, 92, 230, 0.36), transparent 70%),
    radial-gradient(40vmax 32vmax at 96% 14%, rgba(48, 176, 199, 0.24), transparent 70%),
    radial-gradient(46vmax 38vmax at 84% 96%, rgba(255, 55, 95, 0.18), transparent 70%),
    radial-gradient(40vmax 34vmax at 4% 92%, rgba(255, 159, 10, 0.13), transparent 70%);
}

/* 「透明度を下げる」設定の端末では、ガラスを不透明に近づけて読みやすさを優先する */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, 0.92); --glass-hover: #fff; --nav-bg: rgba(255, 255, 255, 0.96); --menu-bg: rgba(255, 255, 255, 0.98); --field: #fff; --seg: #e8e8ed; }
  :root:not([data-theme="light"]) { --glass: rgba(34, 34, 40, 0.94); --glass-hover: #2a2a31; --nav-bg: rgba(28, 28, 34, 0.97); --menu-bg: rgba(24, 24, 30, 0.98); --field: #1d1d22; --seg: #1d1d22; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.47;
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* 背景の光（画面に固定。ガラスの部品がこの色をにじませる）。ひろきのページは hiroki.css が自分の背景で上書きする */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ambient);
}

a { text-decoration: none; color: inherit; }

/* ===== ガラスの縁の光（グラデーションの 1px の枠。左上と右下が光る） ===== */
.guide-card::before,
.learning-paths::before,
.login-card::before,
.admin-user::before,
.admin-note::before,
.globalnav-inner::after,
.menu-panel::after,
.lang-tabs::before,
.page-home .card-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(155deg, var(--glass-rim) 0%, var(--glass-rim-2) 24%, transparent 46%, transparent 68%, var(--glass-rim-2) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ===== アクセント（カードの色味とアイコン色） ===== */
.accent-indigo  { --a-fg: #5856d6; }
.accent-emerald { --a-fg: #248a3d; }
.accent-amber   { --a-fg: #c93400; }
.accent-rose    { --a-fg: #d70015; }
.accent-sky     { --a-fg: #0071e3; }
.accent-purple  { --a-fg: #8944ab; }

:root:not([data-theme="light"]) .accent-indigo  { --a-fg: #7d7aff; }
:root:not([data-theme="light"]) .accent-emerald { --a-fg: #30d158; }
:root:not([data-theme="light"]) .accent-amber   { --a-fg: #ff9f0a; }
:root:not([data-theme="light"]) .accent-rose    { --a-fg: #ff6482; }
:root:not([data-theme="light"]) .accent-sky     { --a-fg: #64d2ff; }
:root:not([data-theme="light"]) .accent-purple  { --a-fg: #bf5af2; }

/* ===== 活動ごとのアクセント(ライフプラン一覧。家族カレンダーの活動色に合わせる) ===== */
.act-tt { --act: #f97316; }
.act-golf { --act: #22a06b; }
.act-ski { --act: #3b82f6; }
.act-piano { --act: #8b7cf6; }
.act-study { --act: #e8a93a; }
.act-english { --act: #06b6d4; }
.act-fin { --act: #84cc16; }
.act-finedu { --act: #14b8a6; }
.act-med { --act: #f43f5e; }
.act-sperm { --act: #d946ef; }
.act-ivf { --act: #ff5fa8; }
.act-health { --act: #b45309; }
.act-newlife { --act: #ec4899; }
.act-license { --act: #0e7490; }
.act-lifeplan { --act: #94a3b8; }
.act-cal { --act: #6366f1; }
.act-visa { --act: #14b8a6; }
[class*="act-"] { --a-fg: var(--act); }
:root:not([data-theme="light"]) [class*="act-"] { --a-fg: color-mix(in srgb, var(--act) 82%, #fff); }

/* ===== ダーク／ライト切り替えボタン（小さなガラスの丸） ===== */
.theme-toggle, .scenery-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border: 0; border-radius: 999px;
  background: var(--glass); color: var(--text-2); cursor: pointer;
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
  transition: color 0.2s, background 0.2s, transform 0.2s var(--ease-spring);
}
.theme-toggle:hover, .scenery-toggle:hover { color: var(--text); background: var(--glass-hover); }
.theme-toggle:active, .scenery-toggle:active { transform: scale(0.92); }
.theme-toggle:focus-visible, .scenery-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* ポータルトップの「カードの表示 on/off」(generate-index の SCENERY_BUTTON)。off で見出し・カード・フッターを隠し、背景だけにする */
.scenery-toggle { margin-right: 6px; }
.scenery-toggle .icon { width: 18px; height: 18px; }
.scenery-toggle .icon-off { display: none; }
html.scenery-only .scenery-toggle .icon-on { display: none; }
html.scenery-only .scenery-toggle .icon-off { display: block; }
html.scenery-only .page-home .hero,
html.scenery-only .page-home .container,
html.scenery-only .page-home footer { display: none; }
.theme-toggle .icon { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.theme-toggle-float {
  position: fixed; top: 14px; right: 14px; z-index: 200; width: 40px; height: 40px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}

/* ===== グローバルナビ（上に浮いたガラスのカプセル + ガラスのメガメニュー） ===== */
.globalnav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 12px 0;
}
.globalnav-inner {
  position: relative;
  max-width: 1200px;
  height: 52px;
  margin: 0 auto;
  padding: 0 9px 0 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}
/* ガラスの塗りとぼかしは疑似要素に置く（中のメガメニューが自分の背景ぼかしを使えるように。
   backdrop-filter を持つ要素の子は、その外側の背景をぼかせないため） */
.globalnav-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 60%), var(--nav-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.globalnav-brand {
  flex: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-right: 10px;
  white-space: nowrap;
}
.globalnav-links {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.globalnav-toggle { display: none; }
.nav-items { display: flex; align-items: center; }
.nav-item { display: flex; align-items: center; height: 52px; }
.nav-top {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.82;
  white-space: nowrap;
  transition: opacity 0.2s, background 0.2s;
}
.nav-item:hover .nav-top,
.nav-item:focus-within .nav-top,
.nav-item.current .nav-top { opacity: 1; }
.nav-item:hover .nav-top,
.nav-item:focus-within .nav-top { background: var(--glass); }
.nav-item.current .nav-top { font-weight: 600; background: var(--glass-hover); box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge); }
.globalnav-util { display: flex; align-items: center; gap: 16px; margin-left: auto; padding-right: 4px; }
.globalnav-util a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  transition: color 0.2s;
  white-space: nowrap;
}
.globalnav-util a:hover { color: var(--text); }
.globalnav-util .icon { width: 14px; height: 14px; }

/* ポータルトップの「ログイン中 ●●●●●●」（目のボタンでパスワードを表示。whoami.js） */
.whoami { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.whoami-label { opacity: 0.8; }
.whoami-value { color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.whoami:not(.whoami-shown) .whoami-value { letter-spacing: 0.08em; opacity: 0.7; }
.whoami-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.whoami-toggle:hover { color: var(--text); background: rgba(127, 127, 127, 0.15); }
.whoami-toggle .icon-eye-off { display: none; }
.whoami.whoami-shown .whoami-toggle .icon-eye { display: none; }
.whoami.whoami-shown .whoami-toggle .icon-eye-off { display: inline; }

/* メガメニュー: ナビのカプセルの下に、同じ幅のガラスのパネルとして浮かぶ */
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  border-radius: 30px;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 30%), var(--menu-bg);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--shadow);
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.985);
  transform-origin: 50% 0;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-spring), visibility 0s linear 0.25s;
  z-index: 2;
}
/* ナビとパネルのすき間でマウスが外れても閉じないように、見えない橋を架ける */
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-item:hover .menu-panel,
.nav-item:focus-within .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
/* メニューが開いている間、ページの残りをぼかして少し暗くする（カプセルの後ろ） */
.globalnav::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
  z-index: -2;
}
.globalnav:has(.nav-item:hover)::after,
.globalnav:has(.nav-item:focus-within)::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.menu-inner {
  padding: 34px 34px 40px;
  display: flex;
  align-items: flex-start;
  gap: 44px;
}
/* 左は見出しだけ。コンテンツページの一覧は右側のグリッドに並べる */
.menu-col-main { flex: 0 0 clamp(200px, 25%, 260px); }
.menu-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px 32px;
}
/* 右端の1列を持つメニュー（技術学習ガイド: 資格対策を右に縦に並べる。generate-index の menuSide）
   左は2列のグリッド、右は細い線で区切った1列。権限で右の列が全部消えたら右の箱も隠す */
.menu-grid.has-side { display: flex; align-items: flex-start; gap: 32px; }
.menu-grid-main {
  flex: 2 1 0;
  min-width: 0;
  columns: 2;          /* 行の高さをそろえず、上から詰めて2段に流す（長い列の横に空きを作らない） */
  column-gap: 32px;
}
.menu-grid-main .menu-col { break-inside: avoid; margin-bottom: 28px; }
/* 縦に重ねた列(generate-index の stack)。権限で中の列が全部消えたら枠も隠す */
.menu-stack { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.menu-stack:not(:has(.menu-link)) { display: none; }
.menu-grid-main .menu-col:last-child { margin-bottom: 0; }
.menu-grid-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 32px;
  border-left: 1px solid var(--nav-line);
}
.menu-grid-side:not(:has(.menu-link)) { display: none; }
.menu-label {
  font-size: 12px;
  line-height: 1.33;
  color: var(--text-3);
  margin-bottom: 12px;
  letter-spacing: 0;
}
.menu-col ul { list-style: none; }
.menu-col li + li { margin-top: 4px; }
.menu-link {
  display: inline-block;
  margin-left: -8px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  transition: color 0.15s, background 0.15s;
}
.menu-link:hover { color: var(--link); background: var(--glass); }
.menu-link-lg {
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1.14;
  letter-spacing: 0.007em;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 72px 24px 24px;
  max-width: 980px;
  margin: 0 auto;
}
/* 見出しの上の小さなラベル: ガラスのカプセル */
.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 15px;
  border-radius: 999px;
  color: var(--eyebrow);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.011em;
  margin-bottom: 18px;
  background: var(--glass);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 600;
  line-height: 1.0625;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 18px;
}
.hero p {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.012em;
  color: var(--text-2);
  max-width: 720px;
  margin: 0 auto;
}

/* セクションの一覧は見出しだけ（generate-index の heroTitleOnly）。説明文が無いぶん上下の余白を詰める */
.hero-title-only { padding: 56px 24px 0; }
.hero-title-only h1 { margin-bottom: 0; }
.hero-title-only + .container > .category:first-child,
.hero-title-only + .container > .tab-panel:first-child .category:first-child { margin-top: 44px; }
@media (max-width: 734px) { .hero-title-only { padding-top: 36px; } }

/* ===== Container / Category ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px 96px;
}
.category { margin-top: 72px; }
.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--text-2);
  background: var(--glass);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
}
.category-title {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.01em;
  color: var(--text);
}
.category-count {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--glass);
  box-shadow: 0 0 0 1px var(--glass-edge);
  white-space: nowrap;
}

/* ===== Guide Grid / Card（コンテンツページ = ガラスのタイル） ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
/* カードは数が多いので背景ぼかしは使わない（背景の光はなめらかなので、半透明の塗りだけでガラスに見える。スマホでも軽い） */
.guide-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, var(--glass-sheen), transparent 45%),
    radial-gradient(120% 85% at 0% 0%, color-mix(in srgb, var(--a-fg, var(--blue)) 24%, transparent), transparent 62%),
    var(--glass);
  border-radius: 28px;
  padding: 28px 28px 24px;
  min-height: 236px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.35s, background-color 0.35s;
}
.guide-card:hover {
  transform: translateY(-4px) scale(1.012);
  background-color: var(--glass-hover);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--shadow);
}
.guide-card:active { transform: scale(0.985); transition-duration: 0.15s; }
.guide-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.card-top { display: flex; flex-direction: column; gap: 18px; }
/* アイコンは色つきのガラスの小石に載せる */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--a-fg, var(--text));
  background:
    linear-gradient(180deg, var(--glass-sheen), transparent 70%),
    color-mix(in srgb, var(--a-fg, var(--blue)) 16%, transparent);
  box-shadow: var(--glass-shine), 0 0 0 1px color-mix(in srgb, var(--a-fg, var(--blue)) 22%, transparent), 0 6px 16px color-mix(in srgb, var(--a-fg, var(--blue)) 18%, transparent);
}
.card-icon .icon { width: 30px; height: 30px; stroke-width: 1.6; }
.card-meta { min-width: 0; }
.hero h1, .hero p, .card-meta h3, .card-meta p, .category-title { text-wrap: balance; }
.card-meta h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.011em;
  color: var(--text);
}
.card-meta p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-2);
  margin-top: 8px;
}
.card-footer {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 24px;
}
/* 「開く」: アクセント色を溶かしたガラスのカプセル */
.open-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px 7px 17px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: color-mix(in srgb, var(--a-fg, var(--link)) 78%, var(--text));
  background: color-mix(in srgb, var(--a-fg, var(--blue)) 13%, var(--glass));
  box-shadow: var(--glass-shine), 0 0 0 1px color-mix(in srgb, var(--a-fg, var(--blue)) 20%, transparent);
  transition: background 0.2s;
}
.open-btn .icon { width: 14px; height: 14px; transition: transform 0.25s var(--ease-spring); }
.guide-card:hover .open-btn { background: color-mix(in srgb, var(--a-fg, var(--blue)) 22%, var(--glass)); }
.guide-card:hover .open-btn .icon { transform: translateX(3px); }

/* ===== 近道つきのカード（generate-index の quickCard）: カードは <div>。見出しのリンクをカード全体に広げ、近道はその上に重ねる ===== */
.guide-card.has-quick { cursor: pointer; }
.guide-card.has-quick .card-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.guide-card.has-quick .card-cover:focus-visible { outline: none; }
.guide-card.has-quick:has(.card-cover:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.guide-card.has-quick .card-footer { flex-wrap: wrap; gap: 10px; }
.card-quicks { position: relative; z-index: 2; display: inline-flex; gap: 8px; }
.card-quicks:empty { display: none; }
.card-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
  transition: transform 0.25s var(--ease-spring), background 0.2s;
}
.card-quick .icon { width: 18px; height: 18px; color: color-mix(in srgb, var(--a-fg, var(--blue)) 80%, var(--text)); }
.card-quick:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--a-fg, var(--blue)) 20%, var(--glass)); }
.card-quick:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.page-home .card-quick { font-size: 15px; padding: 9px 15px 9px 12px; }
.page-home .card-quick .icon { width: 19px; height: 19px; }

/* ===== 推奨学習パス（技術学習ガイド）: 番号付きのステップを線でつないだ道筋 ===== */
.learning-paths {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px 32px;
  padding: 32px 36px;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 40%), var(--glass);
  border-radius: 30px;
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}
.lp-path-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--a-fg); margin-bottom: 16px;
}
.lp-path-title .icon { width: 16px; height: 16px; }
.lp-steps { list-style: none; position: relative; }
.lp-steps li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.lp-steps li:last-child { padding-bottom: 0; }
/* ステップ同士をつなぐ縦線 */
.lp-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px;
  width: 2px; border-radius: 1px; background: var(--a-fg); opacity: 0.35;
}
.lp-step-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--a-fg);
  border: 2px solid var(--a-fg); background: color-mix(in srgb, var(--a-fg) 12%, var(--bg-solid));
}
.lp-step-link {
  padding-top: 3px; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--text);
  transition: color 0.2s;
}
.lp-step-link:hover { color: var(--a-fg); text-decoration: underline; text-underline-offset: 3px; }
.lp-step-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 734px) { .learning-paths { padding: 24px; border-radius: 24px; } }

/* 画面には見せず、読み上げ機能には読ませる（ポータルトップの見出しなど） */
.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;
}

/* ===== ポータルトップ（セクション = 大きなガラスのタイル。アイコンはガラスの球に浮かべる） =====
   見える見出しは無く（読み上げ用の h1.sr-only だけ）、ナビの下に少し海を見せてからタイルを置く */
.page-home .hero { padding-top: 84px; }
.page-home .category { margin-top: 52px; }
.page-home .container > .category:first-child { margin-top: 48px; }
.page-home .category-header { display: none; }
.page-home .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.page-home .guide-card {
  align-items: center;
  text-align: center;
  min-height: 480px;
  padding: 52px 32px 48px;
  overflow: hidden;
  border-radius: 36px;
  background:
    linear-gradient(180deg, var(--glass-sheen), transparent 40%),
    radial-gradient(80% 70% at 50% 100%, color-mix(in srgb, var(--a-fg) 26%, transparent), transparent 70%),
    var(--glass);
}
/* 先頭を横長にするのはタイルが奇数枚のときだけ(偶数枚なら 2 x 2 などの格子に並べる) */
.page-home .guide-card:first-child:nth-last-child(odd) { grid-column: 1 / -1; min-height: 500px; }
.page-home .card-top { display: contents; }
.page-home .card-meta { order: 1; }
.page-home .card-meta h3 {
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.page-home .card-meta p {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.35;
  max-width: 460px;
  margin: 10px auto 0;
}
.page-home .card-footer { order: 2; padding: 20px 0 36px; margin-top: 0; justify-content: center; }
.page-home .open-btn { font-size: 17px; padding: 9px 20px 9px 22px; }
.page-home .card-icon {
  order: 3;
  position: relative;
  margin-top: auto;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background:
    radial-gradient(60% 45% at 35% 22%, rgba(255, 255, 255, 0.42), transparent 70%),
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--a-fg) 34%, transparent), transparent 70%),
    color-mix(in srgb, var(--a-fg) 10%, var(--glass));
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.35),
    inset 0 -10px 24px color-mix(in srgb, var(--a-fg) 18%, transparent),
    0 0 0 1px var(--glass-edge),
    0 24px 50px color-mix(in srgb, var(--a-fg) 26%, transparent),
    0 0 90px 10px color-mix(in srgb, var(--a-fg) 18%, transparent);
  transition: transform 0.6s var(--ease-spring);
}
.page-home .card-icon .icon {
  position: relative;
  width: 80px;
  height: 80px;
  stroke-width: 1.3;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--a-fg) 40%, transparent));
}
.page-home .guide-card:hover .card-icon { transform: translateY(-6px) scale(1.04); }
/* ===== セクションの色（ポータルトップのタイルと、各セクションの一覧ページの背景） =====
   黒っぽいガラスではなく、セクションの基調色がにじむ落ち着いたグラデーションにする。
   基調色: ライフプラン=緑 / 事業計画書=藍 / 技術学習ガイド=深い青緑 / 開発プロジェクトガイド=プラム。
   色は変数だけで決める(--s-g1〜3 = 地のグラデーション、--s-glow-a〜c = 左上・右下・下の光、--s-ink2・3 = 補足の文字、
   --s-nav・--s-menu = ナビとメニュー、--s-edge = 縁)。body の page-* は generate-index が付ける。ひろきは hiroki.css が別に持つ。 */
.page-home .guide-card.accent-emerald, body.page-life-plan {
  --s-g1: #1f3d32; --s-g2: #19342c; --s-g3: #142c2c;
  --s-glow-a: rgba(140, 205, 165, .22); --s-glow-b: rgba(60, 150, 135, .28); --s-glow-c: rgba(80, 200, 120, .16); --s-glow-d: rgba(170, 200, 120, .12);
  --s-ink2: #a9bfb3; --s-ink3: #86a095; --s-nav: rgba(24, 46, 38, .5); --s-menu: rgba(20, 40, 33, .8); --s-edge: rgba(200, 255, 220, .1); --s-shadow: rgba(4, 24, 16, .45);
}
.page-home .guide-card.accent-indigo, body.page-business {
  --s-g1: #2b2b56; --s-g2: #23234a; --s-g3: #1c1f42;
  --s-glow-a: rgba(160, 155, 255, .22); --s-glow-b: rgba(90, 110, 220, .26); --s-glow-c: rgba(125, 122, 255, .16); --s-glow-d: rgba(190, 150, 255, .1);
  --s-ink2: #b2b2cf; --s-ink3: #8d8dad; --s-nav: rgba(34, 34, 70, .5); --s-menu: rgba(28, 28, 60, .8); --s-edge: rgba(210, 210, 255, .1); --s-shadow: rgba(8, 8, 30, .45);
}
.page-home .guide-card.accent-sky, body.page-tech-basic {
  --s-g1: #1d3748; --s-g2: #172e3d; --s-g3: #122634;
  --s-glow-a: rgba(130, 200, 240, .2); --s-glow-b: rgba(60, 150, 190, .26); --s-glow-c: rgba(100, 210, 255, .15); --s-glow-d: rgba(110, 190, 200, .1);
  --s-ink2: #a7bdcc; --s-ink3: #839aaa; --s-nav: rgba(24, 44, 58, .5); --s-menu: rgba(20, 38, 50, .8); --s-edge: rgba(200, 235, 255, .1); --s-shadow: rgba(4, 16, 26, .45);
}
.page-home .guide-card.accent-purple, body.page-tech-proj {
  --s-g1: #3a2247; --s-g2: #2f1c3b; --s-g3: #271832;
  --s-glow-a: rgba(210, 150, 245, .2); --s-glow-b: rgba(150, 90, 190, .26); --s-glow-c: rgba(191, 90, 242, .15); --s-glow-d: rgba(240, 140, 200, .1);
  --s-ink2: #c1afcc; --s-ink3: #9d8aa9; --s-nav: rgba(48, 30, 60, .5); --s-menu: rgba(40, 24, 52, .8); --s-edge: rgba(240, 210, 255, .1); --s-shadow: rgba(20, 6, 28, .45);
}
:root[data-theme="light"] .page-home .guide-card.accent-emerald, :root[data-theme="light"] body.page-life-plan {
  --s-g1: #f1f9f3; --s-g2: #e3f2e9; --s-g3: #d8ece6;
  --s-glow-a: rgba(150, 215, 175, .35); --s-glow-b: rgba(90, 175, 155, .28); --s-glow-c: rgba(100, 200, 130, .2); --s-glow-d: rgba(200, 220, 140, .22);
  --s-ink2: #4f6359; --s-ink3: #74897e; --s-nav: rgba(250, 255, 251, .62); --s-menu: rgba(248, 253, 249, .8); --s-edge: rgba(30, 90, 60, .1); --s-shadow: rgba(30, 100, 70, .12);
}
:root[data-theme="light"] .page-home .guide-card.accent-indigo, :root[data-theme="light"] body.page-business {
  --s-g1: #f4f4ff; --s-g2: #e9e9fb; --s-g3: #e0e3f7;
  --s-glow-a: rgba(170, 165, 255, .34); --s-glow-b: rgba(120, 140, 230, .26); --s-glow-c: rgba(140, 135, 255, .2); --s-glow-d: rgba(200, 170, 255, .2);
  --s-ink2: #55557a; --s-ink3: #7b7b9a; --s-nav: rgba(252, 252, 255, .62); --s-menu: rgba(250, 250, 255, .8); --s-edge: rgba(50, 50, 120, .1); --s-shadow: rgba(50, 50, 130, .12);
}
:root[data-theme="light"] .page-home .guide-card.accent-sky, :root[data-theme="light"] body.page-tech-basic {
  --s-g1: #f0f7fc; --s-g2: #e3eff8; --s-g3: #d8e8f2;
  --s-glow-a: rgba(140, 205, 245, .34); --s-glow-b: rgba(90, 170, 210, .26); --s-glow-c: rgba(110, 200, 250, .2); --s-glow-d: rgba(140, 215, 210, .2);
  --s-ink2: #4c5f6d; --s-ink3: #718694; --s-nav: rgba(250, 253, 255, .62); --s-menu: rgba(248, 252, 255, .8); --s-edge: rgba(20, 70, 110, .1); --s-shadow: rgba(20, 70, 110, .12);
}
:root[data-theme="light"] .page-home .guide-card.accent-purple, :root[data-theme="light"] body.page-tech-proj {
  --s-g1: #f9f2fd; --s-g2: #f0e5f8; --s-g3: #e8ddf3;
  --s-glow-a: rgba(215, 165, 245, .34); --s-glow-b: rgba(170, 120, 210, .26); --s-glow-c: rgba(200, 130, 245, .2); --s-glow-d: rgba(245, 170, 210, .2);
  --s-ink2: #62526e; --s-ink3: #877793; --s-nav: rgba(254, 251, 255, .62); --s-menu: rgba(252, 249, 255, .8); --s-edge: rgba(90, 40, 120, .1); --s-shadow: rgba(80, 30, 110, .12);
}

/* ポータルトップのタイル: 地の色を半透明（--s-a）にして、後ろの深海の波と魚が透けて見えるようにする。
   透けた海は軽くぼかしてガラスらしく見せる（タイルは5枚だけなので背景ぼかしを使っても軽い） */
.page-home .guide-card { --s-a: 50%; }
:root[data-theme="light"] .page-home .guide-card { --s-a: 58%; }
.page-home .guide-card:is(.accent-emerald, .accent-indigo, .accent-sky, .accent-purple, .accent-hiroki) {
  -webkit-backdrop-filter: blur(6px) saturate(150%);
  backdrop-filter: blur(6px) saturate(150%);
}
.page-home .guide-card:is(.accent-emerald, .accent-indigo, .accent-sky, .accent-purple) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 38%),
    radial-gradient(85% 70% at 12% 0%, var(--s-glow-a), transparent 65%),
    radial-gradient(75% 70% at 92% 100%, var(--s-glow-b), transparent 70%),
    radial-gradient(60% 55% at 50% 100%, var(--s-glow-c), transparent 70%),
    linear-gradient(155deg, color-mix(in srgb, var(--s-g1) var(--s-a), transparent) 0%, color-mix(in srgb, var(--s-g2) var(--s-a), transparent) 45%, color-mix(in srgb, var(--s-g3) var(--s-a), transparent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 1px var(--s-edge), 0 14px 40px var(--s-shadow);
}
:root[data-theme="light"] .page-home .guide-card:is(.accent-emerald, .accent-indigo, .accent-sky, .accent-purple) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .6), transparent 40%),
    radial-gradient(85% 70% at 12% 0%, var(--s-glow-a), transparent 65%),
    radial-gradient(75% 70% at 92% 100%, var(--s-glow-b), transparent 70%),
    radial-gradient(60% 55% at 50% 100%, var(--s-glow-c), transparent 70%),
    linear-gradient(155deg, color-mix(in srgb, var(--s-g1) var(--s-a), transparent) 0%, color-mix(in srgb, var(--s-g2) var(--s-a), transparent) 50%, color-mix(in srgb, var(--s-g3) var(--s-a), transparent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px var(--s-edge), 0 14px 34px var(--s-shadow);
}
.page-home .guide-card:is(.accent-emerald, .accent-indigo, .accent-sky, .accent-purple) .card-meta p { color: var(--s-ink2); }

/* 各セクションの一覧ページの背景（ナビ・メニュー・補足の文字もセクションの色に寄せる。カードのガラスはそのまま重なる） */
body:is(.page-life-plan, .page-business, .page-tech-basic, .page-tech-proj) {
  --bg: var(--s-g2);
  --text-2: var(--s-ink2);
  --text-3: var(--s-ink3);
  --nav-bg: var(--s-nav);
  --menu-bg: var(--s-menu);
  --glass-edge: var(--s-edge);
  --ambient:
    radial-gradient(46vmax 36vmax at 8% 0%, var(--s-glow-a), transparent 70%),
    radial-gradient(42vmax 34vmax at 96% 18%, var(--s-glow-b), transparent 70%),
    radial-gradient(50vmax 40vmax at 80% 100%, var(--s-glow-b), transparent 70%),
    radial-gradient(40vmax 34vmax at 4% 92%, var(--s-glow-d), transparent 70%),
    linear-gradient(160deg, var(--s-g1) 0%, var(--s-g2) 45%, var(--s-g3) 100%);
  background: var(--bg);
}
/* セクションの一覧（body.ocean-section。generate-index が付ける）:
   ポータルトップと同じ背景（ダーク = 深海と魚、ライト = 草原・日差し・鳥。login-ocean.js が描く canvas）をそのまま敷き、
   その上にセクションの基調色を半透明で重ねて（body::after）、背景が透けて見えるようにする。
   下地（WebGL が無いとき）はトップと同じ海・草原のグラデーション。 */
body.ocean-section {
  background:
    radial-gradient(80% 50% at 50% 0%, #0b3a5a, transparent 70%),
    linear-gradient(180deg, #072a45 0%, #041a30 45%, #010812 100%);
  background-attachment: fixed;
}
:root[data-theme="light"] body.ocean-section {
  background:
    radial-gradient(60% 45% at 85% 0%, rgba(255, 226, 150, 0.85), transparent 70%),
    linear-gradient(180deg, #a6d4f7 0%, #dcefff 35%, #fff6dc 58%, #a9d47c 62%, #6fae47 100%);
  background-attachment: fixed;
}
body.ocean-section::before { display: none; }
body.ocean-section::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1; /* canvas と生きもの（body の中で先に描かれる）より後ろに描かれるので、背景の上に重なる */
  pointer-events: none;
  --s-veil: 58%;
  background:
    radial-gradient(46vmax 36vmax at 8% 0%, var(--s-glow-a), transparent 70%),
    radial-gradient(50vmax 40vmax at 80% 100%, var(--s-glow-b), transparent 70%),
    linear-gradient(160deg,
      color-mix(in srgb, var(--s-g1) var(--s-veil), transparent) 0%,
      color-mix(in srgb, var(--s-g2) calc(var(--s-veil) - 6%), transparent) 45%,
      color-mix(in srgb, var(--s-g3) var(--s-veil), transparent) 100%);
}
/* ライトは草原が明るいので、ベールを少し薄くして日差しと草の波を見せる */
:root[data-theme="light"] body.ocean-section::after { --s-veil: 50%; }

/* ポータルトップの「ひろき」のタイルだけ、ひろきのページ(hiroki.css)と同じ配色にする。
   ダーク: 深い藍の上に紫・水色・ピンク・オレンジの光、グラデーションの見出し、白いボタン。
   ライト: 同じ4色の光を、白っぽい背景の上にパステルで置く(ほかの明るいタイルと並んでも浮かないように)。 */
.page-home .guide-card.accent-hiroki {
  --a-fg: #ffd23f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 40%),
    radial-gradient(70% 55% at 15% 20%, rgba(167, 139, 250, .6), transparent 70%),
    radial-gradient(60% 50% at 90% 15%, rgba(56, 225, 255, .38), transparent 70%),
    radial-gradient(65% 55% at 85% 90%, rgba(255, 93, 143, .5), transparent 70%),
    radial-gradient(60% 50% at 10% 95%, rgba(255, 159, 67, .42), transparent 70%),
    rgba(26, 18, 72, .5);
  background-size: 130% 130%;
  animation: hkTileDrift 18s ease-in-out infinite alternate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 40px rgba(10, 4, 40, .4);
}
@keyframes hkTileDrift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.page-home .guide-card.accent-hiroki .card-meta h3 {
  font-weight: 900;
  background: linear-gradient(100deg, #fff 10%, #ffd23f 35%, #ff9f43 50%, #ff5d8f 68%, #a78bfa 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 12px rgba(255, 93, 143, .35));
}
.page-home .guide-card.accent-hiroki .card-meta p { color: rgba(255, 255, 255, .86); }
.page-home .guide-card.accent-hiroki .open-btn {
  color: #1a1248; background: #fff; font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(26, 18, 72, .12), 0 4px 14px rgba(10, 4, 40, .3);
}
.page-home .guide-card.accent-hiroki:hover .open-btn { background: #ffd23f; }
.page-home .guide-card.accent-hiroki .card-icon {
  color: #ffd23f;
  background: radial-gradient(60% 45% at 35% 22%, rgba(255, 255, 255, .45), transparent 70%), rgba(255, 255, 255, .1);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .4), inset 0 -10px 24px rgba(255, 93, 143, .25), 0 0 0 1px rgba(255, 255, 255, .18), 0 24px 50px rgba(255, 93, 143, .3), 0 0 90px 10px rgba(167, 139, 250, .25);
}
.page-home .guide-card.accent-hiroki .card-icon .icon { stroke-width: 1.6; filter: drop-shadow(0 0 14px rgba(255, 210, 63, .55)); }
/* ライト版 */
:root[data-theme="light"] .page-home .guide-card.accent-hiroki {
  --a-fg: #7c3aed;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), transparent 40%),
    radial-gradient(70% 55% at 15% 20%, rgba(167, 139, 250, .45), transparent 70%),
    radial-gradient(60% 50% at 90% 15%, rgba(56, 225, 255, .32), transparent 70%),
    radial-gradient(65% 55% at 85% 90%, rgba(255, 93, 143, .34), transparent 70%),
    radial-gradient(60% 50% at 10% 95%, rgba(255, 159, 67, .34), transparent 70%),
    rgba(251, 248, 255, .58);
  background-size: 130% 130%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 1px rgba(124, 58, 237, .14), 0 14px 34px rgba(124, 58, 237, .16);
}
:root[data-theme="light"] .page-home .guide-card.accent-hiroki .card-meta h3 {
  background: linear-gradient(100deg, #f97316 5%, #ec4899 45%, #8b5cf6 80%, #0ea5e9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 8px rgba(236, 72, 153, .25));
}
:root[data-theme="light"] .page-home .guide-card.accent-hiroki .card-meta p { color: #3b2a6b; }
:root[data-theme="light"] .page-home .guide-card.accent-hiroki .open-btn {
  color: #fff; background: linear-gradient(120deg, #ff9f43, #ff5d8f 45%, #a78bfa); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px rgba(255, 93, 143, .3);
}
:root[data-theme="light"] .page-home .guide-card.accent-hiroki:hover .open-btn { background: linear-gradient(120deg, #ff5d8f, #a78bfa 55%, #38bdf8); }
:root[data-theme="light"] .page-home .guide-card.accent-hiroki .card-icon { color: #8b5cf6; background: radial-gradient(60% 45% at 35% 22%, rgba(255, 255, 255, .8), transparent 70%), rgba(255, 255, 255, .35); }
:root[data-theme="light"] .page-home .guide-card.accent-hiroki .card-icon .icon { filter: drop-shadow(0 0 12px rgba(139, 92, 246, .4)); }
@media (prefers-reduced-motion: reduce) {
  .page-home .guide-card.accent-hiroki { animation: none; }
  .guide-card, .page-home .card-icon, .menu-panel { transition: none; }
}

/* ===== 言語タブ（ガラスのセグメントコントロール） ===== */
.lang-tabs {
  position: relative;
  display: flex;
  width: fit-content;
  margin: 44px auto 0;
  padding: 4px;
  gap: 2px;
  background: var(--seg);
  border-radius: 999px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}
.lang-tab {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-spring);
}
.lang-tab:hover:not(.active) { background: var(--glass); }
.lang-tab:active { transform: scale(0.96); }
.lang-tab.active {
  background: var(--seg-active);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), 0 4px 12px rgba(0, 0, 0, 0.14);
  font-weight: 600;
}
.lang-tab-count { font-size: 12px; color: var(--text-3); margin-left: 6px; font-weight: 400; }
.tab-panel[hidden] { display: none; }
.tab-panel .category:first-child { margin-top: 48px; }

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 28px 24px 36px;
  font-size: 12px;
  color: var(--text-3);
}

/* ===== SVG icons ===== */
.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
.category-icon .icon { width: 22px; height: 22px; }
.hero-badge .icon { width: 16px; height: 16px; }
.lock-back-link .icon { width: 14px; height: 14px; }
.admin-note .icon { width: 18px; height: 18px; }

/* ===== Login / 403 / ロック画面（光の上に浮かぶガラスのパネル） ===== */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 34px 34px;
  border-radius: 36px;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 40%), var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--shadow);
}
.login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: var(--text);
  margin-bottom: 16px;
  background:
    radial-gradient(60% 45% at 35% 22%, rgba(255, 255, 255, 0.4), transparent 70%),
    color-mix(in srgb, var(--blue) 18%, var(--glass));
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.3), inset 0 -8px 18px color-mix(in srgb, var(--blue) 20%, transparent),
    0 0 0 1px var(--glass-edge), 0 14px 30px color-mix(in srgb, var(--blue) 25%, transparent);
}
.login-icon .icon { width: 40px; height: 40px; stroke-width: 1.4; }
.login-card h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.01em;
  text-align: center;
}
.login-sub {
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-2);
  margin: 4px 0 26px;
  text-align: center;
}
.login-input-wrap { position: relative; width: 100%; margin-bottom: 12px; }
.login-input {
  width: 100%;
  background: var(--field);
  border: 0;
  border-radius: 16px;
  padding: 16px 48px 16px 18px;
  color: var(--text);
  /* 16px 未満だと iOS Safari が自動ズームするため固定 */
  font-size: 17px;
  min-height: 56px;
  outline: none;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.login-input::placeholder { color: var(--text-3); }
.login-input:focus {
  background: var(--glass-hover);
  box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}
.login-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  color: var(--text-3);
  touch-action: manipulation;
}
.login-toggle .icon { width: 20px; height: 20px; }
.login-toggle:hover, .login-toggle:focus-visible { color: var(--text); background: var(--glass); }
.login-error {
  color: var(--err);
  font-size: 14px;
  line-height: 1.4;
  margin: 2px 0 12px;
  text-align: center;
}
/* 主ボタン: 色の付いたガラス（上に光沢、下にわずかな影、外に色のにじみ） */
.login-button,
.admin-btn {
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 55%),
    var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 6px 18px color-mix(in srgb, var(--blue) 38%, transparent);
  transition: background-color 0.15s, transform 0.2s var(--ease-spring), box-shadow 0.2s;
  touch-action: manipulation;
}
.login-button:hover, .admin-btn:hover {
  background-color: var(--blue-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 8px 24px color-mix(in srgb, var(--blue) 48%, transparent);
}
.login-button:active, .admin-btn:active { transform: scale(0.97); }
.login-button:focus-visible, .admin-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.login-button {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  min-height: 52px;
  font-size: 17px;
  font-weight: 600;
}
.lock-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--link);
  transition: background 0.2s;
}
.lock-back-link:hover { background: var(--glass); }

/* ===== ログイン画面とポータルトップの背景（ログインは main.ocean-login、トップは body.ocean-bg） =====
   ダーク = 深海（動く波と光る魚）、ライト = 草原（淡い金色の日差し・風にゆれる草・空を横切る鳥）。
   絵は portal-assets/login-ocean.js が WebGL で描く。クラス名は ocean-* のままライトの草原にも使う。
   下地: WebGL が使えないときもこのグラデーションの海・草原が見える。この2画面だけ背景の光(body::before)は消す。
   部品: 写真の円は淡い金色の光で囲み、ゆっくり回る金色の光の輪を重ねる。
   ログインボタンはダークでは深い海色、ライトでは若草色のガラスで、周りが光る。 */
body.ocean-bg, body:has(.ocean-login) {
  background:
    radial-gradient(80% 50% at 50% 0%, #0b3a5a, transparent 70%),
    linear-gradient(180deg, #072a45 0%, #041a30 45%, #010812 100%);
  background-attachment: fixed;
}
:root[data-theme="light"] body.ocean-bg, :root[data-theme="light"] body:has(.ocean-login) {
  background:
    radial-gradient(60% 45% at 85% 0%, rgba(255, 226, 150, 0.85), transparent 70%),
    linear-gradient(180deg, #a6d4f7 0%, #dcefff 35%, #fff6dc 58%, #a9d47c 62%, #6fae47 100%);
  background-attachment: fixed;
}
body.ocean-bg::before, body:has(.ocean-login)::before { display: none; }
/* ライトの草原では、トップの下端のフッターが草の上に来るので、文字を明るくして影を付ける */
:root[data-theme="light"] body.ocean-bg footer { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(20, 60, 10, 0.55); }
.ocean-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
/* ときどき横切る生きもの（login-ocean.js）。背景の canvas の上、パネルやカードの下を進む。
   1匹ずつ魚（.cr-fish）と鳥（.cr-bird）の両方の絵を持ち、ダークでは魚、ライトでは鳥だけを見せる。
   途中でテーマを切り替えると、片方が縮みながら消え、もう片方がふくらみながら現れて、そのまま進み続ける */
.ocean-fish-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ocean-fish { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.ocean-fish .cr-dir { position: absolute; inset: 0; }
.ocean-fish .cr {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.25), filter 0.7s ease;
}
.ocean-fish .cr svg { display: block; width: 100%; height: 100%; overflow: visible; }
:root:not([data-theme="light"]) .ocean-fish .cr-bird,
:root[data-theme="light"] .ocean-fish .cr-fish { opacity: 0; transform: scale(0.35) rotate(-12deg); filter: blur(3px); }
/* 魚: ほんのり光る。体のまわりに水色の光を2重ににじませ、光の強さをゆっくり揺らす */
.ocean-fish .cr-fish svg {
  opacity: 0.82;
  filter: drop-shadow(0 0 3px rgba(200, 240, 255, 0.7)) drop-shadow(0 0 12px rgba(90, 195, 255, 0.45));
  animation: oceanFishGlow 2.4s ease-in-out infinite alternate;
}
@keyframes oceanFishGlow { to { opacity: 0.95; filter: drop-shadow(0 0 4px rgba(215, 245, 255, 0.85)) drop-shadow(0 0 18px rgba(100, 205, 255, 0.6)); } }
.ocean-fish-tail { transform-box: view-box; transform-origin: 14px 10px; animation: oceanFishTail 0.36s ease-in-out infinite alternate; }
@keyframes oceanFishTail { from { transform: scaleY(0.75) skewY(-8deg); } to { transform: scaleY(1.05) skewY(8deg); } }
/* 鳥: 青みがかった炭色の影。日差しで縁がほんのり金色に光る。左右の翼を肩を軸に回して羽ばたく */
.ocean-fish .cr-bird svg {
  fill: #34445a; opacity: 0.82;
  filter: drop-shadow(0 0 2px rgba(255, 236, 180, 0.9)) drop-shadow(0 0 8px rgba(255, 214, 130, 0.45));
}
.sky-bird-wing-l, .sky-bird-wing-r { transform-box: view-box; animation: var(--flap, 0.32s) ease-in-out infinite alternate; }
.sky-bird-wing-l { transform-origin: 21px 11.5px; animation-name: skyWingL; }
.sky-bird-wing-r { transform-origin: 23px 11.5px; animation-name: skyWingR; }
@keyframes skyWingL { from { transform: rotate(16deg); } to { transform: rotate(-30deg) scaleX(0.92); } }
@keyframes skyWingR { from { transform: rotate(-16deg); } to { transform: rotate(30deg) scaleX(0.92); } }
.ocean-login { --blue: #2aa6e0; --blue-hover: #3db4ec; }
:root[data-theme="light"] .ocean-login { --blue: #4f9d34; --blue-hover: #5cab3f; }
/* 海の上のガラスは少し海色に寄せ、文字が波に負けないようにする */
.ocean-login .login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 40%), rgba(4, 22, 40, 0.42);
  box-shadow: inset 0 1px 0 rgba(170, 230, 255, 0.18), 0 0 0 1px rgba(140, 210, 255, 0.12), 0 30px 70px rgba(0, 8, 20, 0.55);
}
:root[data-theme="light"] .ocean-login .login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48) 40%), rgba(255, 252, 240, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.5), 0 30px 70px rgba(60, 70, 20, 0.22);
}
/* 写真のある最初の画面は説明文が無いので、見出しと入力欄の間を空ける */
.login-avatar + h1 { margin-bottom: 24px; }

/* 写真の円: 淡い金色の細い縁と、周りに薄くにじむ金色の光。外側でゆっくり回る金色の光の輪 */
.login-avatar {
  position: relative;
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
  border-radius: 50%;
  isolation: isolate;
}
.login-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 1.5px rgba(255, 228, 160, 0.7),
    0 0 0 5px rgba(255, 214, 130, 0.12),
    0 0 22px 4px rgba(255, 210, 120, 0.28),
    0 0 60px 12px rgba(255, 196, 100, 0.14);
}
.login-avatar::before {
  content: "";
  position: absolute;
  inset: -9px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 220, 150, 0), rgba(255, 226, 160, 0.6), rgba(230, 180, 90, 0.12), rgba(255, 220, 150, 0) 60%, rgba(255, 236, 185, 0.45), rgba(255, 220, 150, 0));
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  filter: blur(1.5px);
  animation: oceanRing 9s linear infinite;
}
@keyframes oceanRing { to { transform: rotate(1turn); } }

/* ログインボタン: 深い海色のガラス。周りが海の光で光り、ゆっくり呼吸する */
.ocean-login .login-button {
  color: #eaf8ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #0e5e90 0%, #083f6b 55%, #052d52 100%);
  box-shadow:
    inset 0 1px 0 rgba(170, 235, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(100, 205, 255, 0.4),
    0 0 22px rgba(30, 165, 255, 0.45),
    0 10px 28px rgba(0, 25, 55, 0.5);
  animation: oceanGlow 4.5s ease-in-out infinite;
}
.ocean-login .login-button:hover {
  background-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(190, 240, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(130, 220, 255, 0.6),
    0 0 34px rgba(50, 185, 255, 0.65),
    0 10px 28px rgba(0, 25, 55, 0.5);
}
:root[data-theme="light"] .ocean-login .login-button {
  color: #fffef5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #6db843 0%, #4c9a30 55%, #3a8125 100%);
  box-shadow:
    inset 0 1px 0 rgba(240, 255, 210, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(150, 210, 100, 0.5),
    0 0 22px rgba(255, 210, 110, 0.5),
    0 10px 24px rgba(60, 100, 20, 0.28);
}
:root[data-theme="light"] .ocean-login .login-button { animation-name: meadowGlow; }
@keyframes meadowGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06) drop-shadow(0 0 10px rgba(255, 214, 120, 0.45)); }
}
:root[data-theme="light"] .ocean-login .login-button:hover {
  box-shadow:
    inset 0 1px 0 rgba(240, 255, 210, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(170, 225, 120, 0.7),
    0 0 32px rgba(255, 210, 110, 0.7),
    0 10px 24px rgba(60, 100, 20, 0.28);
}
@keyframes oceanGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12) drop-shadow(0 0 10px rgba(60, 190, 255, 0.35)); }
}
@media (prefers-reduced-motion: reduce) {
  .login-avatar::before, .ocean-login .login-button { animation: none; }
}

/* ===== Admin ===== */
.admin-hero p { max-width: 640px; font-size: 17px; line-height: 1.5; }
.admin-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  margin: 32px 0 8px;
  line-height: 1.5;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shine), 0 0 0 1px color-mix(in srgb, var(--warn-text) 22%, transparent);
}
.admin-heading {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 56px 0 18px;
}
.admin-empty { color: var(--text-2); font-size: 15px; margin: 0 0 14px; }
.admin-form { display: flex; gap: 10px; }
.admin-wrap { flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.admin-input {
  flex: 1;
  min-width: 160px;
  background: var(--field);
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 44px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s, background 0.15s;
}
.admin-input:focus {
  background: var(--glass-hover);
  box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 4px color-mix(in srgb, var(--blue) 22%, transparent);
}
.admin-btn {
  padding: 9px 20px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
/* 危険な操作: 赤い文字の透明なガラス */
.admin-btn-danger {
  color: var(--err);
  background: color-mix(in srgb, var(--err) 8%, var(--glass));
  box-shadow: var(--glass-shine), 0 0 0 1px color-mix(in srgb, var(--err) 45%, transparent);
}
.admin-btn-danger:hover {
  background: color-mix(in srgb, var(--err) 16%, var(--glass));
  box-shadow: var(--glass-shine), 0 0 0 1px var(--err);
}
.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding: 5px 0;
  accent-color: var(--blue);
}
.admin-check input { width: 18px; height: 18px; }
.admin-user {
  position: relative;
  background: linear-gradient(180deg, var(--glass-sheen), transparent 50px), var(--glass);
  border-radius: 24px;
  padding: 18px 22px;
  margin-bottom: 12px;
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}
.admin-user[open] { background-color: var(--glass-hover); }
.admin-user summary { cursor: pointer; font-size: 17px; }
.admin-user-body { margin: 16px 0; }
.admin-tree { margin: 12px 0 16px; }
.admin-person { display: inline-flex; flex-shrink: 0; cursor: help; }
.admin-person + .admin-person { margin-left: -4px; }
.admin-alias { font-size: 12px; color: var(--text-2); }

/* 管理画面: 権限の仕組みと使い方(src/app/admin/permission-help.tsx)。ボタンと、<dialog> のモーダル */
.admin-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
  background: var(--glass);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
  transition: background 0.2s;
}
.admin-help-btn:hover { background: var(--glass-hover); }
.admin-help-btn:focus-visible, .admin-help-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.admin-help-btn .icon { width: 18px; height: 18px; }
.admin-help {
  width: min(720px, calc(100vw - 24px));
  max-width: none;
  max-height: min(86vh, 920px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--text);
  text-align: left; /* 見出しの領域(.hero。中央揃え)の中に置いているので、本文は左揃えに戻す */
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  overflow: hidden;
}
.admin-help::backdrop { background: rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.admin-help-body { display: flex; flex-direction: column; max-height: min(86vh, 920px); }
.admin-help-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px 26px;
  border-bottom: 1px solid var(--line);
}
.admin-help-head h2 { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.005em; }
.admin-help-head h2 .icon { width: 22px; height: 22px; color: var(--link); }
.admin-help-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--text-2);
  cursor: pointer;
  background: var(--glass);
  box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge);
}
.admin-help-close:hover { color: var(--text); background: var(--glass-hover); }
.admin-help-close .icon { width: 18px; height: 18px; }
.admin-help-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 26px 22px; font-size: 15px; line-height: 1.65; color: var(--text); }
.admin-help-scroll h3 { font-size: 17px; font-weight: 600; margin: 18px 0 6px; }
.admin-help-scroll ul, .admin-help-scroll ol { padding-left: 1.4em; }
.admin-help-scroll li { margin: 4px 0; }
.admin-help-scroll li::marker { color: var(--text-3); }
.admin-help-scroll code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--glass);
  box-shadow: 0 0 0 1px var(--glass-edge);
}
.admin-help-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: -3px;
}
.admin-help-foot { display: flex; justify-content: flex-end; margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .admin-help[open] { animation: admin-help-in 0.22s var(--ease-spring); }
}
@keyframes admin-help-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (max-width: 599px) {
  .admin-help-head { padding: 14px 14px 10px 18px; }
  .admin-help-scroll { padding: 4px 18px 18px; font-size: 14px; }
}
.admin-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-2);
  font-size: 13px;
}
.admin-status { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.admin-status.locked { color: var(--eyebrow); }
.admin-status.unlocked { color: var(--text-3); }
.admin-pw { font-weight: 600; color: var(--eyebrow); margin: 0 4px; }

/* ===== 幅が狭いパソコン: ナビの文字を詰める（項目の多いポータルトップでも1行に収める） ===== */
@media (max-width: 1240px) and (min-width: 735px) {
  .whoami-label { display: none; }
}
@media (max-width: 1100px) and (min-width: 735px) {
  .nav-top { padding: 0 8px; }
  .globalnav-util { gap: 12px; }
  .globalnav-util .icon { display: none; }
  .globalnav-util .whoami-toggle .icon { display: inline; }
  .whoami.whoami-shown .whoami-toggle .icon-eye { display: none; }
  .whoami:not(.whoami-shown) .whoami-toggle .icon-eye-off { display: none; }
}

/* ===== Responsive（Apple のブレークポイント 734px） ===== */
@media (max-width: 734px) {
  .hero { padding: 48px 22px 8px; }
  .page-home .hero { padding-top: 52px; }
  .category { margin-top: 56px; }
  .guide-grid { grid-template-columns: 1fr; gap: 14px; }
  .guide-card { min-height: 200px; border-radius: 26px; padding: 24px 22px 22px; }
  .page-home .guide-grid { grid-template-columns: 1fr; }
  .page-home .guide-card,
  .page-home .guide-card:first-child:nth-last-child(odd) { min-height: 380px; padding: 40px 24px 40px; border-radius: 32px; }
  .page-home .card-icon { width: 136px; height: 136px; }
  .page-home .card-icon .icon { width: 64px; height: 64px; }
  .login-card { padding: 38px 22px 26px; border-radius: 30px; }
  .globalnav { padding: 8px 10px 0; }
  .globalnav-inner { height: 48px; padding: 0 5px 0 18px; }
  .globalnav-toggle {
    display: inline-flex;
    margin-left: auto;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
  }
  .globalnav-toggle:hover, .globalnav.nav-open .globalnav-toggle { background: var(--glass); }
  .globalnav-toggle .icon { width: 22px; height: 22px; }
  .globalnav-toggle .icon + .icon,
  .globalnav.nav-open .globalnav-toggle .icon:first-child { display: none; }
  .globalnav.nav-open .globalnav-toggle .icon + .icon { display: block; }
  /* スマホ: ハンバーガーで開く縦のメニュー（カプセルの下に浮かぶガラスのパネル。メガメニューは出さず、各セクションへの入口だけ） */
  .globalnav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 22px 18px;
    border-radius: 26px;
    background: linear-gradient(180deg, var(--glass-sheen), transparent 30%), var(--menu-bg);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), var(--shadow);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
  }
  .globalnav.nav-open .globalnav-links { display: flex; }
  .nav-items { flex-direction: column; align-items: stretch; }
  .nav-item { height: auto; }
  .nav-top,
  .nav-item:hover .nav-top,
  .nav-item:focus-within .nav-top { height: auto; padding: 14px 0; font-size: 17px; opacity: 1; border-radius: 0; background: none; border-bottom: 1px solid var(--nav-line); width: 100%; }
  .nav-item.current .nav-top { background: none; box-shadow: none; border-bottom: 1px solid var(--nav-line); }
  .menu-panel { display: none; }
  /* 管理画面のヘッダー（セクションメニューなし）はスマホでもそのまま横に並べる */
  .globalnav-simple .globalnav-links {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    margin-left: auto;
  }
  .globalnav-simple .globalnav-util { flex-direction: row; margin: 0; gap: 14px; }
  .globalnav-simple .globalnav-util a { font-size: 12px; padding: 0; color: var(--text-2); }
  .globalnav-util { margin: 8px 0 0; padding: 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .globalnav-util a { font-size: 17px; padding: 12px 0; color: var(--text); }
  .globalnav-util .whoami { font-size: 15px; padding: 12px 0; }
  .admin-form { flex-wrap: wrap; }
  .admin-input { min-width: 0; width: 100%; flex-basis: 100%; }
}
.admin-hero h1 { font-size: clamp(32px, 6vw, 48px); }

/* 日中切り替え(事業計画書・ライフプランの一覧)。JS が無いときは日本語を出す */
html:not([data-lang="zh"]) .i18n[lang="zh-CN"], html[data-lang="zh"] .i18n[lang="ja"] { display: none; }
.lang-seg { display: inline-flex; flex: none; margin-right: 4px; padding: 2px; border-radius: 999px; background: var(--seg); box-shadow: inset 0 0 0 1px var(--glass-edge); }
.lang-seg button { font: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 4px 11px; border: 0; border-radius: 999px; background: none; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.lang-seg button[aria-pressed="true"] { background: var(--seg-active); color: var(--text); box-shadow: var(--glass-shine), 0 0 0 1px var(--glass-edge), 0 2px 8px rgba(0, 0, 0, 0.12); }
.lang-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.card-meta .lang-badge { display: inline-block; margin-top: 8px; padding: 1px 9px; font-size: 11.5px; line-height: 1.6; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--nav-line); color: var(--text-2); }
.card-meta .lang-badge-both { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 60%, transparent); color: var(--text); }
