/**
 * Streamlit コピー: D:\\鑑定\\system\\app.py
 * inject_app_css + inject_global_ui_css（原文 + #app 用複製）+ 既存 lib-* / レイアウト
 */
:root {
  --bg: #f7f5f2;
  --ink: #0f1c2e;
  --gold: #c9a24d;
  --muted: #64748b;
}
* {
  box-sizing: border-box;
}
html {
  background-color: #f7f5f2;
}
body {
  margin: 0;
  background: #f7f5f2;
}

.lib-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(15, 28, 46, 0.1);
  background: #fff;
}
.lib-shell-header h1 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.lib-shell-brand {
  margin: 0;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  color: var(--ink);
}

.lib-shell-brand img {
  display: block;
  height: clamp(3.1rem, 7.2vw, 4rem);
  width: auto;
  max-width: min(440px, 96vw);
  object-fit: contain;
  object-position: left center;
}

.lib-shell-brand:hover {
  text-decoration: none;
}

.lib-shell-brand:hover img {
  opacity: 0.9;
}
.lib-lang {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.lib-lang button {
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(15, 28, 46, 0.16);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.65rem;
}
.lib-lang button:disabled {
  opacity: 0.45;
  cursor: default;
}


#app.st-app-view {
  padding: 0;
  max-width: none;
  margin: 0;
}

#app.st-app-view--top .block-container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: clamp(12px, 4.5vw, 72px) !important;
  padding-right: clamp(12px, 4.5vw, 72px) !important;
}


.lib-corp-pillar-card .lib-corp-pillar-body {
  color: #1f2937;
  font-size: 1.05rem;
  line-height: 1.95;
  margin: 0;
}
.lib-corp-pillar-card .lib-corp-pillar-h {
  margin: 0 0 0.5rem;
}

.lib-svc-embed-root {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.lib-svc-embed-root .lib-svc-embed {
  min-height: 200px;
}

/* ---------- BEGIN verbatim inject_app_css (app.py) ---------- */
/* Base */
html, body, [data-testid="stAppViewContainer"] { background-color: #F7F5F2; }
.block-container { max-width: 1120px; padding-top: 2rem; padding-bottom: 4rem; }
/* TOP 専用の全幅オーバーライドは `if page == "TOP"` 内で注入（他ページは 1120px のまま） */
/* TOP 直上：パンくず「ホーム」・ブランド帯をブロック左端に揃える */
.block-container [data-testid="stMarkdownContainer"]:has(.lib-bc-home-row),
.block-container [data-testid="stMarkdownContainer"]:has(.lib-top-brand-strip--home) {
  text-align: left !important;
}
.block-container [data-testid="stMarkdownContainer"]:has(.lib-bc-home-row) p,
.block-container [data-testid="stMarkdownContainer"]:has(.lib-top-brand-strip--home) p {
  text-align: left !important;
}

h1, h2, h3 { color: #0F1C2E; font-weight: 800; letter-spacing: .01em; }
p, li { line-height: 1.95; font-size: 1.05rem; color: #1f2937; }

.small { color: #6B7280; font-size: .95rem; line-height: 1.8; }
.hr { height: 1px; background: rgba(15,28,46,0.14); margin: 1.6rem 0; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid rgba(15,28,46,0.12);
  border-radius: 16px;
  padding: 1.4rem 1.4rem;
  box-shadow: 0 14px 40px rgba(15,28,46,0.05);
}

.hero {
  background: #fff;
  border: 1px solid rgba(15,28,46,0.15);
  border-radius: 18px;
  padding: 2.6rem 2.4rem;
  box-shadow: 0 20px 60px rgba(15,28,46,0.08);
}

.kicker {
  color:#C9A24D;
  font-weight: 900;
  letter-spacing: .14em;
  font-size: .86rem;
}

.badge {
  display:inline-block;
  padding:.15rem .6rem;
  border-radius:999px;
  border:1px solid rgba(201,162,77,.40);
  background: rgba(201,162,77,.10);
  color:#0F1C2E;
  font-weight: 900;
  font-size: .86rem;
}

.footer {
  margin-top: 4.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(15,28,46,0.15);
  font-size: .92rem;
  color: #6B7280;
}

/* Sidebar（コード8）：文字をやや小さく */
[data-testid="stSidebar"] { background: #0F1C2E; font-size: 0.8125rem; }
[data-testid="stSidebar"] * { color: rgba(255,255,255,0.92); }
[data-testid="stSidebar"] a { color: rgba(201,162,77,.95) !important; text-decoration:none; }
[data-testid="stSidebar"] h1,
[data-testid="stSidebar"] h2,
[data-testid="stSidebar"] h3 {
  font-size: 1.02rem !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  margin: 0 0 0.35rem 0 !important;
}
[data-testid="stSidebar"] [data-baseweb="radio"] label,
[data-testid="stSidebar"] [data-testid="stRadio"] label,
[data-testid="stSidebar"] [data-testid="stMarkdown"] p {
  font-size: 0.78rem !important;
  line-height: 1.45 !important;
}
[data-testid="stSidebar"] [data-testid="stCaptionContainer"] p,
[data-testid="stSidebar"] [data-testid="stCaptionContainer"] {
  font-size: 0.68rem !important;
  line-height: 1.45 !important;
  opacity: 0.9;
}
[data-testid="stSidebar"] [data-testid="stExpander"] summary,
[data-testid="stSidebar"] [data-testid="stExpander"] summary p {
  font-size: 0.76rem !important;
}
[data-testid="stSidebar"] [data-testid="stVerticalBlock"] {
  gap: 0.35rem !important;
}

/* TOP hero（背景＋オーバーレイを1レイヤーに統合） */
.hero-visual {
  position: relative;
  min-height: 560px;
  border-radius: 22px;
  overflow: hidden;
  margin: 16px 0 14px 0;
  box-shadow:
    0 28px 80px rgba(15,28,46,0.32),
    0 0 0 1px rgba(201,162,77,0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(201,162,77,.24);
  background-image: linear-gradient(90deg, rgba(11,22,40,0.58) 0%, rgba(15,28,46,0.36) 50%, rgba(15,28,46,0.18) 100%), linear-gradient(135deg, #0F1C2E 0%, #182a46 55%, #0F1C2E 100%);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: rgba(255,255,255,.96);
  /* カスタム HTML ブロックで Source Sans 系のみだと日本語が豆腐化することがある */
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro",
    "Yu Gothic UI", "Yu Gothic Medium", "Yu Gothic", "Meiryo", "MS PGothic",
    "Noto Sans JP", "Noto Sans CJK JP", "Takao Gothic", "IPAexGothic",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(201,162,77,0.14) 0%, transparent 45%),
    radial-gradient(ellipse 80% 50% at 100% 20%, rgba(59,130,246,0.08) 0%, transparent 40%),
    linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.38) 55%, rgba(0,0,0,0.62) 100%);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 22px;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

.hero-visual .hero-inner {
  position: relative;
  z-index: 1;
  min-height: 560px;
  padding: 52px 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-visual .eyebrow {
  letter-spacing: .16em;
  font-weight: 800;
  font-size: .78rem;
  color: rgba(201,162,77,.98);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.hero-visual .hero-tagline-jp {
  margin: 0 0 8px 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(201,162,77,.98);
}
.hero-visual .hero-footnote {
  margin: 16px 0 0 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.86);
}

.hero-visual .hero-tagline-en {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-bottom: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.hero-visual .headline {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: .02em;
  color: rgba(255,255,255,.99);
  margin: 0 0 12px 0;
  max-width: 920px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.hero-visual .gold-line {
  width: 88px;
  height: 4px;
  background: #C9A24D;
  border-radius: 10px;
  margin-bottom: 14px;
}

.hero-visual .subcopy {
  font-size: 1.05rem;
  line-height: 1.82;
  color: rgba(255,255,255,.90);
  max-width: 820px;
  margin-bottom: 14px;
}

.hero-visual .hero-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,162,77,.42);
  background: rgba(201,162,77,.14);
  color: rgba(255,255,255,.95);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .04em;
}

.hero-visual .pillbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-visual .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,162,77,.28);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  font-weight: 800;
  font-size: .88rem;
}

.hero-visual .pill b { color: rgba(201,162,77,.96); }

.hero-visual .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin: 0.35rem 0 1rem 0;
  padding-top: 0.25rem;
}
.hero-visual .hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 5.5rem;
}
.hero-visual .hero-stat .num {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(201,162,77,.98);
  line-height: 1.1;
}
.hero-visual .hero-stat .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

/* TOP ヒーロー：ビューポートいっぱい（写真は __bg に分離し filter を写真のみに適用） */
.hero-visual.hero-visual--fullvp {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -2rem;
  margin-bottom: 1.25rem;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  box-shadow: 0 20px 64px rgba(15,28,46,0.22);
  /* 画像あり時：フォールバック紺＋写真は子レイヤー。画像なし時は fullvp_fill 空で親のグラデを継承 */
  
  --lib-hero-photo: var(--lib-hero-photo, none);
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  image-rendering: auto;
}
/* トップ全画面ヒーロー専用：背景写真レイヤー（鮮度：軽い露出・コントラスト・彩度＋わずかなオーバーサンプリングで解像感） */
.hero-visual.hero-visual--fullvp .hero-visual__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--lib-hero-photo, none);
  background-size: cover;
  background-position: center 36%;
  background-repeat: no-repeat;
  filter: brightness(1.06) contrast(1.08) saturate(1.07);
  transform: scale(1.035);
  transform-origin: 50% 40%;
}
@media (max-width: 768px) {
  .hero-visual.hero-visual--fullvp .hero-visual__bg {
    background-position: center 34%;
    transform: scale(1.05);
    filter: brightness(1.07) contrast(1.06) saturate(1.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual.hero-visual--fullvp .hero-visual__bg {
    transform: none;
  }
}
.hero-visual.hero-visual--fullvp::before {
  border-radius: 0;
  z-index: 1;
  /* 左コピー可読用スクリーム＋下方向ヴィネットを紺寄りに調整（重すぎない範囲でコントラスト確保） */
  background:
    linear-gradient(90deg, rgba(11,22,40,0.76) 0%, rgba(15,28,46,0.38) 36%, rgba(28,56,96,0.12) 72%, rgba(255,255,255,0.04) 100%),
    radial-gradient(ellipse 90% 55% at 15% 15%, rgba(201,162,77,0.085) 0%, transparent 54%),
    radial-gradient(ellipse 72% 48% at 90% 20%, rgba(96,165,250,0.055) 0%, transparent 46%),
    linear-gradient(165deg, rgba(10,20,36,0.15) 0%, rgba(8,16,30,0.24) 44%, rgba(6,12,24,0.48) 100%);
}
/* ノイズレイヤは写真のピンボケ感を増すため fullvp ではオフ */
.hero-visual.hero-visual--fullvp::after {
  display: none;
}
.hero-visual.hero-visual--fullvp .hero-inner {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(28px, 5vw, 56px) clamp(22px, 6vw, 80px) clamp(36px, 8vh, 96px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  box-sizing: border-box;
}
/* ガラス風パネル：コントラストとデザイン性を両立 */
.hero-visual.hero-visual--fullvp .hero-copy-panel {
  position: relative;
  z-index: 1;
  max-width: min(36.5rem, 100%);
  width: 100%;
  padding: clamp(1.35rem, 3.2vw, 2.1rem) clamp(1.35rem, 3vw, 2.35rem);
  border-radius: clamp(14px, 2vw, 22px);
  border: 1px solid rgba(201, 162, 77, 0.28);
  background: rgba(15, 28, 46, 0.82);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero-visual.hero-visual--fullvp .hero-copy-panel {
    background: linear-gradient(
      155deg,
      rgba(15, 28, 46, 0.52) 0%,
      rgba(15, 28, 46, 0.38) 55%,
      rgba(24, 40, 62, 0.45) 100%
    );
    -webkit-backdrop-filter: blur(16px) saturate(1.12);
    backdrop-filter: blur(16px) saturate(1.12);
  }
}
.hero-visual.hero-visual--fullvp .hero-copy-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,162,77,0.85), rgba(201,162,77,0.35), transparent);
  opacity: 0.9;
  pointer-events: none;
}
.hero-visual.hero-visual--fullvp .hero-copy-panel > * {
  position: relative;
  z-index: 1;
}
.hero-visual.hero-visual--fullvp .hero-tagline-jp {
  margin-bottom: 0.35rem;
  font-size: clamp(0.78rem, 1.9vw, 0.88rem);
}
.hero-visual.hero-visual--fullvp .hero-micro-en {
  margin: 0 0 1rem 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.hero-visual.hero-visual--fullvp .headline {
  font-size: clamp(1.65rem, 4.8vw, 2.35rem);
  line-height: 1.18;
  margin-bottom: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.hero-visual.hero-visual--fullvp .gold-line {
  width: min(7.5rem, 42vw);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8c66a 0%, #c9a24d 45%, #8b6914 100%);
  box-shadow: 0 0 20px rgba(201, 162, 77, 0.35);
  margin-bottom: 1rem;
}
.hero-visual.hero-visual--fullvp .subcopy {
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  text-shadow: none;
}
.hero-visual.hero-visual--fullvp .hero-footnote {
  margin-top: 1.15rem;
  padding: 0.45rem 0.85rem;
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(201, 162, 77, 0.12);
  border: 1px solid rgba(201, 162, 77, 0.35);
}
.hero-visual.hero-visual--fullvp .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  max-width: 28rem;
}
@media (max-width: 640px) {
  .hero-visual.hero-visual--fullvp .hero-stats {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}
.hero-visual.hero-visual--fullvp .pillbar {
  max-width: 40rem;
}

/* TOP ブランド帯（ロゴ＋社名） */
.lib-top-brand-strip {
  margin: 0 0 6px 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8f5 100%);
  border: 1px solid rgba(15, 28, 46, 0.08);
  box-shadow: 0 8px 28px rgba(15, 28, 46, 0.06);
}
.lib-top-brand-strip--home {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  justify-content: start;
  text-align: left;
  column-gap: clamp(1rem, 3vw, 1.75rem);
  row-gap: 0.75rem;
  padding: clamp(14px, 2.5vw, 20px) clamp(16px, 3vw, 24px);
  margin: 0 0 12px 0;
  width: 100%;
  box-sizing: border-box;
}
.lib-top-brand-strip__text {
  text-align: left;
  justify-self: start;
  width: 100%;
  max-width: 100%;
}
@media (max-width: 520px) {
  .lib-top-brand-strip--home {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}
.lib-top-brand-strip__logo img {
  display: block;
  max-width: min(200px, 46vw) !important;
  width: 100%;
  height: auto;
}
.lib-top-brand-strip__name {
  display: block;
  font-size: clamp(1.45rem, 4.2vw, 1.95rem);
  font-weight: 800;
  color: #0f1c2e;
  letter-spacing: 0.03em;
  line-height: 1.2;
  padding: 2px 0 4px 0;
  border-left: 4px solid #c9a24d;
  padding-left: 1rem;
  margin-left: 2px;
}
@media (max-width: 520px) {
  .lib-top-brand-strip__name {
    border-left: none;
    padding-left: 0;
    border-bottom: 3px solid #c9a24d;
    padding-bottom: 6px;
    margin-left: 0;
  }
}

/* 言語切替マーカー（非表示）。詳細スタイルはグローバル secondary 定義の直後に配置 */
.lib-lang-switcher-mark {
  display: none !important;
}

/* ボタン — 紺ベースで統一（ラベルが内側 span/p にあるため子要素まで白を指定） */
[data-testid="stButton"] button {
  font-weight: 700 !important;
}
[data-testid="stButton"] button:hover {
  border-color: #182a46 !important;
}
[data-testid="stButton"] button:focus-visible {
  box-shadow: 0 0 0 2px #F7F5F2, 0 0 0 4px #C9A24D !important;
}
/* secondary — 白地＋黒字（子要素も黒） */
[data-testid="stButton"] button[data-testid="baseButton-secondary"],
[data-testid="stButton"] button[data-testid="baseButton-secondary"] * {
  background-color: transparent !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  fill: #000000 !important;
}
[data-testid="stButton"] button[data-testid="baseButton-secondary"] {
  background-color: #ffffff !important;
  border: 2px solid #0F1C2E !important;
}
[data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover * {
  background-color: rgba(15, 28, 46, 0.07) !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}
[data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover {
  border-color: #182a46 !important;
}
/* primary — 紺地＋白字（子要素・SVG アイコンまで） */
[data-testid="stButton"] button[data-testid="baseButton-primary"],
[data-testid="stButton"] button[data-testid="baseButton-primary"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stButton"] button[data-testid="baseButton-primary"] {
  background-color: #0F1C2E !important;
  border-color: #0F1C2E !important;
}
[data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[data-testid="stButton"] button[data-testid="baseButton-primary"]:hover * {
  background-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stButton"] button[data-testid="baseButton-primary"]:hover {
  background-color: #182a46 !important;
  border-color: #182a46 !important;
}
/* kind=secondary（Streamlit 1.5x）：data-testid 差異でも黒字・白地を維持 */
[data-testid="stButton"] button[kind="secondary"],
[data-testid="stButton"] button[kind="secondary"] * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  fill: #000000 !important;
}
[data-testid="stButton"] button[kind="secondary"] {
  background-color: #ffffff !important;
  border: 2px solid #0F1C2E !important;
}
[data-testid="stButton"] button[kind="secondary"]:hover,
[data-testid="stButton"] button[kind="secondary"]:hover * {
  background-color: rgba(15, 28, 46, 0.07) !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* 言語切替 J|E（ヘッダー右上）：極小・薄地。マーク直後の横3列のみ対象（他ボタンに波及しない） */
[data-testid="element-container"]:has(.lib-lang-switcher-mark) {
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"] {
  gap: 0.08rem 0.14rem !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1)
  [data-testid="stButton"]
  button,
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3)
  [data-testid="stButton"]
  button {
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  min-height: 1.28rem !important;
  padding: 0.04rem 0.22rem !important;
  line-height: 1 !important;
  border-width: 1px !important;
  border-radius: 5px !important;
  background-color: rgba(255, 255, 255, 0.35) !important;
  border-color: rgba(15, 28, 46, 0.16) !important;
  color: #0f1c2e !important;
  -webkit-text-fill-color: #0f1c2e !important;
  box-shadow: none !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1)
  [data-testid="stButton"]
  button *,
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3)
  [data-testid="stButton"]
  button * {
  color: #0f1c2e !important;
  -webkit-text-fill-color: #0f1c2e !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1)
  [data-testid="stButton"]
  button:hover,
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3)
  [data-testid="stButton"]
  button:hover {
  background-color: rgba(15, 28, 46, 0.07) !important;
  border-color: rgba(15, 28, 46, 0.35) !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1)
  [data-testid="stButton"]
  button:hover *,
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3)
  [data-testid="stButton"]
  button:hover * {
  color: #0f1c2e !important;
  -webkit-text-fill-color: #0f1c2e !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1) [data-testid="stButton"],
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3) [data-testid="stButton"] {
  min-width: 0 !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(1)
  [data-testid="stButton"]
  button:disabled,
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(3)
  [data-testid="stButton"]
  button:disabled {
  opacity: 0.42 !important;
  cursor: default !important;
}
[data-testid="element-container"]:has(.lib-lang-switcher-mark)
  + [data-testid="element-container"]
  [data-testid="stHorizontalBlock"]
  > [data-testid="column"]:nth-child(2)
  [data-testid="stMarkdownContainer"]
  p {
  margin: 0 !important;
  padding: 0.18rem 0 0 0 !important;
  text-align: center !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  font-size: 0.58rem !important;
}
@media (max-width: 520px) {
  [data-testid="element-container"]:has(.lib-lang-switcher-mark)
    + [data-testid="element-container"]
    [data-testid="stHorizontalBlock"]
    > [data-testid="column"]:nth-child(1)
    [data-testid="stButton"]
    button,
  [data-testid="element-container"]:has(.lib-lang-switcher-mark)
    + [data-testid="element-container"]
    [data-testid="stHorizontalBlock"]
    > [data-testid="column"]:nth-child(3)
    [data-testid="stButton"]
    button {
    font-size: 0.58rem !important;
    min-height: 1.22rem !important;
    padding: 0.03rem 0.18rem !important;
  }
}

/* data-testid が付かない環境向け：secondary 以外は白字（kind=secondary は除外） */
[data-testid="stButton"] button:not([data-testid="baseButton-secondary"]):not([kind="secondary"]),
[data-testid="stButton"] button:not([data-testid="baseButton-secondary"]):not([kind="secondary"]) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}

/* タブ見出し（入力／結果 等）を黒字に */
[data-testid="stTabs"] button,
[data-testid="stTabs"] button p,
[data-testid="stTabs"] button span,
[data-testid="stTabs"] [role="tab"],
[data-testid="stTabs"] [role="tab"] * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}
[data-testid="stTabs"] [data-baseweb="tab"],
[data-testid="stTabs"] [data-baseweb="tab"] * {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* st.link_button（stButton とは別コンポーネント）— primary は紺地＋白字 */
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"],
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"] {
  background-color: #0F1C2E !important;
  border-color: #0F1C2E !important;
}
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"]:hover,
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"]:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"]:hover {
  background-color: #182a46 !important;
  border-color: #182a46 !important;
}
[data-testid="stLinkButton"] a[data-testid="stBaseLinkButton-primary"]:visited {
  color: #ffffff !important;
}

/* AI分析ツール：免責・カタログ文言の読みやすさ */
.ai-page-disclaimer {
  background: rgba(255, 193, 7, 0.11);
  border-left: 4px solid #C9A24D;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 1.02rem;
  line-height: 1.9;
  color: #1f2937;
  margin: 0 0 1.1rem 0;
}
p.ai-tool-title {
  color: #0F1C2E;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0.85rem 0 0.4rem 0;
  min-height: 2.85em;
}
p.ai-tool-tag {
  color: #4b5563;
  font-size: 0.93rem;
  line-height: 1.62;
  margin: 0 0 0.85rem 0;
  min-height: 3.05em;
}

/* ツール体験デモ（st.dialog）：濃紺背景 → 白字、白背景 → 黒字 */

/* 濃紺（primary）：背景 #0F1C2E／ホバー #182a46、ラベル・子要素・SVG は白 */
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"] *,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"],
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"] *,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"] *,
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"],
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"] *,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"] *,
[role="dialog"] [data-testid="stButton"] button[kind="primary"],
[role="dialog"] [data-testid="stButton"] button[kind="primary"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"],
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"],
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"],
[role="dialog"] [data-testid="stButton"] button[kind="primary"] {
  background-color: #0F1C2E !important;
  border-color: #0F1C2E !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover *,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"]:hover *,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover *,
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"]:hover *,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover *,
[role="dialog"] [data-testid="stButton"] button[kind="primary"]:hover,
[role="dialog"] [data-testid="stButton"] button[kind="primary"]:hover * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: #ffffff !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="primary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[kind="primary"]:hover,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-primary"]:hover,
[role="dialog"] [data-testid="stButton"] button[kind="primary"]:hover {
  background-color: #182a46 !important;
  border-color: #182a46 !important;
}

/* 白背景（secondary 等）：黒字（サイト全体の「非 secondary は白字」対策） */
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"] *,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"],
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"] *,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"] *,
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"],
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"] *,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"] *,
[role="dialog"] [data-testid="stButton"] button[kind="secondary"],
[role="dialog"] [data-testid="stButton"] button[kind="secondary"] * {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  fill: #111827 !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"],
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"],
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"],
[role="dialog"] [data-testid="stButton"] button[kind="secondary"] {
  background-color: #ffffff !important;
  border: 2px solid #0F1C2E !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover *,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"]:hover *,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover *,
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"]:hover *,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover *,
[role="dialog"] [data-testid="stButton"] button[kind="secondary"]:hover,
[role="dialog"] [data-testid="stButton"] button[kind="secondary"]:hover * {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  fill: #111827 !important;
}
[data-testid="stDialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[data-testid="stDialog"] [data-testid="stButton"] button[kind="secondary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[data-testid="stModal"] [data-testid="stButton"] button[kind="secondary"]:hover,
[role="dialog"] [data-testid="stButton"] button[data-testid="baseButton-secondary"]:hover,
[role="dialog"] [data-testid="stButton"] button[kind="secondary"]:hover {
  background-color: rgba(15, 28, 46, 0.06) !important;
}

/* tertiary／その他（primary 以外）：黒字のフォールバック */
[data-testid="stDialog"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]),
[data-testid="stDialog"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]) *,
[data-testid="stModal"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]),
[data-testid="stModal"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]) *,
[role="dialog"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]),
[role="dialog"] [data-testid="stButton"] button:not([data-testid="baseButton-primary"]):not([kind="primary"]) * {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  fill: #111827 !important;
}
/* ---------- END verbatim inject_app_css ---------- */

/* ---------- BEGIN verbatim inject_global_ui_css (app.py) ---------- */
/* ========== グローバル余白・フローティング導線（inject_global_ui_css） ========== */
section[data-testid="stMain"] .block-container {
  padding-top: 1.7rem !important;
  padding-bottom: 5.35rem !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  section[data-testid="stMain"] .block-container {
    padding-top: 1.45rem !important;
    padding-bottom: 5.65rem !important;
  }
}
section[data-testid="stMain"] h1 {
  margin-top: 0.2rem !important;
  margin-bottom: 0.72rem !important;
}
section[data-testid="stMain"] h2 {
  margin-top: 1.2rem !important;
  margin-bottom: 0.52rem !important;
}
section[data-testid="stMain"] h3 {
  margin-top: 0.95rem !important;
  margin-bottom: 0.42rem !important;
}
section[data-testid="stMain"] [data-testid="stMarkdownContainer"] p {
  margin-bottom: 0.62rem !important;
}
section[data-testid="stMain"] [data-testid="stVerticalBlock"] {
  gap: 0.82rem !important;
}
section[data-testid="stMain"] .hr {
  margin: 1.45rem 0 1.65rem !important;
}
section[data-testid="stMain"] .card {
  margin-bottom: 1.05rem !important;
}
section[data-testid="stMain"] [data-testid="stForm"] {
  margin-bottom: 0.35rem !important;
}
section[data-testid="stMain"] [data-testid="stTextInput"],
section[data-testid="stMain"] [data-testid="stTextArea"],
section[data-testid="stMain"] [data-testid="stSelectbox"] {
  margin-bottom: 0.28rem !important;
}
/* フローティング J|S ホスト（components が親 document に挿入） */
#lib-floating-nav-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99950;
}
#lib-floating-nav-host .lib-fn-btn {
  pointer-events: auto;
  position: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.74rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 28, 46, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #0f1c2e;
  box-shadow: 0 6px 22px rgba(15, 28, 46, 0.12);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
#lib-floating-nav-host .lib-fn-btn:hover {
  background: #ffffff;
  border-color: rgba(201, 162, 77, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(15, 28, 46, 0.14);
}
#lib-floating-nav-host .lib-fn-btn:active {
  transform: translateY(0);
}
#lib-floating-nav-host .lib-fn-back {
  top: 4.85rem;
  right: clamp(0.55rem, 2.2vw, 1.15rem);
}
#lib-floating-nav-host .lib-fn-top {
  bottom: calc(1.05rem + env(safe-area-inset-bottom, 0px));
  right: clamp(0.55rem, 2.2vw, 1.15rem);
}
@media (max-width: 768px) {
  #lib-floating-nav-host .lib-fn-btn {
    font-size: 0.84rem;
    padding: 0.5rem 0.88rem;
    min-height: 2.65rem;
    border-radius: 11px;
  }
  #lib-floating-nav-host .lib-fn-back {
    top: 4.15rem;
  }
  #lib-floating-nav-host .lib-fn-top {
    bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  }
}
/* ---------- END verbatim inject_global_ui_css ---------- */

/* ---------- inject_global_ui_css → #app.st-app-view ---------- */
/* ========== グローバル余白・フローティング導線（inject_global_ui_css） ========== */
#app.st-app-view .block-container {
  padding-top: 1.7rem !important;
  padding-bottom: 5.35rem !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  #app.st-app-view .block-container {
    padding-top: 1.45rem !important;
    padding-bottom: 5.65rem !important;
  }
}
#app.st-app-view h1 {
  margin-top: 0.2rem !important;
  margin-bottom: 0.72rem !important;
}
#app.st-app-view h2 {
  margin-top: 1.2rem !important;
  margin-bottom: 0.52rem !important;
}
#app.st-app-view h3 {
  margin-top: 0.95rem !important;
  margin-bottom: 0.42rem !important;
}
#app.st-app-view [data-testid="stMarkdownContainer"] p {
  margin-bottom: 0.62rem !important;
}
#app.st-app-view [data-testid="stVerticalBlock"] {
  gap: 0.82rem !important;
}
#app.st-app-view .hr {
  margin: 1.45rem 0 1.65rem !important;
}
#app.st-app-view .card {
  margin-bottom: 1.05rem !important;
}
#app.st-app-view [data-testid="stForm"] {
  margin-bottom: 0.35rem !important;
}
#app.st-app-view [data-testid="stTextInput"],
#app.st-app-view [data-testid="stTextArea"],
#app.st-app-view [data-testid="stSelectbox"] {
  margin-bottom: 0.28rem !important;
}
/* フローティング J|S ホスト（components が親 document に挿入） */
#lib-floating-nav-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99950;
}
#lib-floating-nav-host .lib-fn-btn {
  pointer-events: auto;
  position: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.74rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 28, 46, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: #0f1c2e;
  box-shadow: 0 6px 22px rgba(15, 28, 46, 0.12);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
#lib-floating-nav-host .lib-fn-btn:hover {
  background: #ffffff;
  border-color: rgba(201, 162, 77, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(15, 28, 46, 0.14);
}
#lib-floating-nav-host .lib-fn-btn:active {
  transform: translateY(0);
}
#lib-floating-nav-host .lib-fn-back {
  top: 4.85rem;
  right: clamp(0.55rem, 2.2vw, 1.15rem);
}
#lib-floating-nav-host .lib-fn-top {
  bottom: calc(1.05rem + env(safe-area-inset-bottom, 0px));
  right: clamp(0.55rem, 2.2vw, 1.15rem);
}
@media (max-width: 768px) {
  #lib-floating-nav-host .lib-fn-btn {
    font-size: 0.84rem;
    padding: 0.5rem 0.88rem;
    min-height: 2.65rem;
    border-radius: 11px;
  }
  #lib-floating-nav-host .lib-fn-back {
    top: 4.15rem;
  }
  #lib-floating-nav-host .lib-fn-top {
    bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  }
}
/* ========== STEP②–⑦ Web ミラー上書き（ユーザー指定・inject ブロックの直後） ========== */
body {
  font-family:
    "Segoe UI",
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #0f172a;
}
#app.st-app-view h1,
#app.st-app-view h2,
#app.st-app-view h3,
body h1,
body h2,
body h3 {
  font-weight: 800;
  letter-spacing: 0.02em;
}
#app.st-app-view {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 1.7rem;
  padding-bottom: 5.35rem;
  box-sizing: border-box;
}
#app.st-app-view--top {
  max-width: none !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#app.st-app-view .block-container {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
}
#app.st-app-view p,
#app.st-app-view li {
  color: #0f172a;
}
#app.st-app-view .card,
.card {
  border-radius: 16px;
  padding: 1.4rem;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.st-columns {
  display: flex;
  gap: 1.5rem;
}
.st-column {
  flex: 1;
}
.hero-visual {
  min-height: 100vh;
}
.hero-visual__bg {
  background-size: cover;
  background-position: center;
}
.hero-visual .hero-micro-en {
  color: rgba(201, 162, 77, 0.98);
}

.st-sections {
  display: block;
}

/* TOP は app.py の hr 区切り中心（セクション間 3rem は使わない） */
#app.st-app-view--top section.st-section {
  margin-bottom: 0;
}
section.st-section {
  margin-bottom: 3rem;
}

.st-section__inner {
  min-width: 0;
}

/* Streamlit メイン列の data-testid 階層（レイアウト最小限・ブラウザ必須） */
[data-testid="stVerticalBlock"] {
  width: 100%;
}
[data-testid="stHorizontalBlock"] {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
[data-testid="column"] {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
[data-testid="column"] .st-nav-card-btn {
  width: 100%;
  box-sizing: border-box;
}
[data-testid="stMarkdown"] {
  width: 100%;
}

/* Streamlit inject_global_ui_css: メイン列縦ブロック gap */
#app.st-app-view [data-testid="stVerticalBlock"] {
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
}

/* top_nav_cards.inject_top_nav_card.css（列内ナビボタン縦リズム） */
[data-testid="column"] [data-testid="stVerticalBlock"] .st-nav-card-btn {
  margin-bottom: 0.55rem;
}
[data-testid="column"] [data-testid="stVerticalBlock"]:last-of-type .st-nav-card-btn {
  margin-bottom: 0;
}

/* DSL: columns（Streamlit columns 相当） */
.st-columns {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.stColumn {
  flex: 1;
  min-width: 0;
}

.st-columns--gap-sm {
  gap: 0.75rem;
}
.st-columns--gap-md {
  gap: 1.5rem;
}
.st-columns--gap-lg {
  gap: 2rem;
}

.st-column {
  flex: 1 1 0%;
  min-width: 0;
}

/* Streamlit main 既定に合わせた gap（md） */
.st-columns.st-columns--gap-md {
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .st-columns:not(.st-columns--nowrap) {
    flex-direction: column;
  }
  .st-columns:not(.st-columns--nowrap) .st-column {
    flex: 1 1 auto !important;
    width: 100%;
  }
}

/* レガシー row（grid） */
.st-row--grid {
  display: grid;
  margin: 0.5rem 0;
  gap: 0.75rem;
}

/* Tabs: active + display（hidden 属性に依存しない） */
.st-tabs .st-tab-panel,
.lib-tab-panels .st-tab-panel {
  display: none;
}
.st-tabs .st-tab-panel.is-active,
.lib-tab-panels .st-tab-panel.is-active {
  display: block;
}

.st-tab-btn.is-active,
.lib-tab-btn.is-active {
  background: #fff;
  border: 1px solid rgba(15, 28, 46, 0.12);
  border-bottom-color: #fff;
}

.st-tab-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: #000;
  border-radius: 8px 8px 0 0;
}

.st-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(15, 28, 46, 0.12);
  margin-bottom: 0.75rem;
}

.st-container {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

/* ----- 既存 lib-* コンポーネント ----- */
.lib-h1 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--ink);
  margin: 0 0 0.75rem;
}
h2.lib-h3,
h3.lib-h3,
.lib-h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 1rem 0 0.5rem;
}
.lib-expander {
  border: 1px solid rgba(15, 28, 46, 0.12);
  border-radius: 12px;
  padding: 0.35rem 0.85rem;
  background: #fff;
  margin: 0.5rem 0;
}
.lib-expander > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}
.lib-alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}
.lib-alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.lib-alert--warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}
.lib-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.lib-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.lib-field {
  margin: 0.5rem 0;
}
.lib-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #334155;
}
.lib-field input,
.lib-field textarea,
.lib-field select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(15, 28, 46, 0.18);
  font: inherit;
}
.lib-tabs,
.st-tabs {
  margin-top: 0.75rem;
}
.lib-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(15, 28, 46, 0.12);
  margin-bottom: 0.75rem;
}
.lib-tab-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: #000;
  border-radius: 8px 8px 0 0;
}
.lib-tab-btn[aria-selected="true"] {
  background: #fff;
  border: 1px solid rgba(15, 28, 46, 0.12);
  border-bottom-color: #fff;
}
.lib-news-wide,
.st-news-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .lib-news-wide,
  .st-news-split {
    grid-template-columns: 1fr;
  }
}
.lib-topnav-group-panel {
  margin: 0 0 0.85rem;
  padding: clamp(0.55rem, 1.4vw, 0.75rem) clamp(0.75rem, 2vw, 1.2rem);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -6px rgba(15, 28, 46, 0.08);
  width: 100%;
  box-sizing: border-box;
}
.lib-topnav-group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}
.lib-topnav-group-title-jp {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #0f172a;
}
.lib-topnav-en-geom {
  display: inline-block;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #0f172a;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 4px;
}
.lib-topnav-group-hr {
  margin-top: 0.45rem;
  height: 1px;
  background: linear-gradient(90deg, #cbd5e1, transparent);
  border-radius: 1px;
}

.lib-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
@media (max-width: 720px) {
  .lib-nav-grid {
    grid-template-columns: 1fr;
  }
}
/* Streamlit top_nav: 画像上の暗幕なし（グラデ透明レイヤのみ）→ オーバーレイ要素は付けない */
.st-nav-card-btn {
  position: relative;
  overflow: hidden;
}
.st-nav-card-label {
  position: relative;
  z-index: 2;
  color: #ffffff !important;
  font-size: inherit !important;
  font-weight: 800 !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  text-shadow: 0 1px 0 rgba(15, 28, 46, 0.65), 0 2px 4px rgba(0, 0, 0, 0.55), 0 3px 22px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.88) !important;
}

.lib-nav-card {
  display: flex;
  flex-direction: column;
  min-height: 118px !important;
  height: auto !important;
  white-space: normal !important;
  border-radius: 16px;
  border: 1px solid rgba(201, 169, 98, 0.55);
  color: #fff;
  font-weight: 800;
  text-align: left !important;
  padding: 1.05rem 1.1rem 1.15rem 1.1rem !important;
  font-size: clamp(0.95rem, 2.3vw, 1.08rem);
  line-height: 1.4 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(15, 28, 46, 0.65), 0 2px 4px rgba(0, 0, 0, 0.55), 0 3px 22px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 48px rgba(15, 28, 46, 0.35), 0 0 40px rgba(56, 189, 248, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  align-items: flex-start !important;
  justify-content: flex-end !important;
}
.lib-nav-card:hover {
  background-color: transparent !important;
  cursor: pointer !important;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 22px 56px rgba(15, 28, 46, 0.42), 0 0 48px rgba(201, 169, 98, 0.12) !important;
  border-color: rgba(201, 169, 98, 0.85) !important;
}
/* top_nav_cards._inject_ai_nav_styles: モバイルで min-height + padding */
@media (max-width: 640px) {
  button.st-nav-card-btn.lib-nav-card {
    min-height: calc(118px + 12px) !important;
    padding: 1.05rem 1rem 1.15rem 1rem !important;
  }
}
.lib-nav-card:focus-visible {
  outline: 2px solid rgba(201, 169, 98, 0.95);
  outline-offset: 2px;
}
.lib-nav-card[data-preset="0"] {
  background: linear-gradient(155deg, hsl(195, 38%, 16%), #070b12);
}
.lib-nav-card[data-preset="1"] {
  background: linear-gradient(155deg, hsl(265, 48%, 14%), #070b12);
}
.lib-nav-card[data-preset="2"] {
  background: linear-gradient(155deg, hsl(175, 42%, 15%), #070b12);
}
.lib-nav-card[data-preset="3"] {
  background: linear-gradient(155deg, hsl(210, 45%, 15%), #070b12);
}
.lib-nav-card[data-preset="4"] {
  background: linear-gradient(155deg, hsl(155, 40%, 14%), #070b12);
}
.lib-nav-card[data-preset="5"] {
  background: linear-gradient(155deg, hsl(230, 50%, 14%), #070b12);
}
.lib-nav-card[data-preset="6"] {
  background: linear-gradient(155deg, hsl(200, 44%, 15%), #070b12);
}
.lib-nav-card[data-preset="7"] {
  background: linear-gradient(155deg, hsl(185, 36%, 14%), #070b12);
}
.lib-nav-card[data-preset="8"] {
  background: linear-gradient(155deg, hsl(200, 44%, 15%), #070b12);
}
.lib-nav-card[data-preset="9"] {
  background: linear-gradient(155deg, hsl(155, 40%, 14%), #070b12);
}
.lib-nav-card[data-preset="10"] {
  background: linear-gradient(155deg, hsl(185, 36%, 14%), #070b12);
}
.lib-cta-band {
  margin-top: 1.5rem;
  padding: 1.5rem 1rem;
  background: linear-gradient(180deg, #0f1c2e, #182a46);
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(201, 162, 77, 0.25);
}
.lib-cta-band .k {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.lib-cta-band .lib-btn {
  max-width: 28rem;
  margin: 0 auto;
}
.lib-caption-iframe {
  border: 1px solid rgba(15, 28, 46, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  min-height: 104px;
}
.lib-caption-iframe iframe {
  width: 100%;
  min-height: 104px;
  border: none;
}
.lib-callout-gate {
  border: 2px solid #c9a962;
  border-radius: 14px;
  padding: 18px 20px;
  background: linear-gradient(165deg, #fff 0%, #f7f5f2 55%, #efebe4 100%);
}
.lib-callout-gate .t {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.lib-mekiki-h1 {
  color: #000 !important;
  font-weight: 800;
  letter-spacing: 0.01em;
}
/* Streamlit app.py hr(): <div class="hr"></div> */
#app.st-app-view .hr,
#app.st-app-view .lib-hr {
  border: none;
  height: 1px;
  min-height: 1px;
  background: rgba(15, 28, 46, 0.14);
  margin: 1.45rem 0 1.65rem !important;
  width: 100%;
  box-sizing: border-box;
}
.lib-footer-translation-note {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 0.75rem;
}

/* Streamlit inject_app_css .footer */
#app.st-app-view .footer {
  margin-top: 4.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(15, 28, 46, 0.15);
  font-size: 0.92rem;
  color: #6b7280;
}
.lib-table-wrap {
  overflow: auto;
  margin: 0.5rem 0;
}
table.lib-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.lib-table th,
.lib-table td {
  border: 1px solid rgba(15, 28, 46, 0.12);
  padding: 0.35rem 0.5rem;
  text-align: left;
}
/* top_corporate.render_corporate_section_title と同一クラス名 */
.lib-corp-sec .lib-corp-sec-en {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #94a3b8;
  text-transform: uppercase;
  margin: 0;
}
.lib-corp-sec .lib-corp-sec-jp {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0.2rem 0;
}
.lib-corp-sec .lib-corp-sec-line {
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 0.35rem;
}
.lib-corp-sec .lib-corp-sec-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.lib-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--ink);
}
.lib-btn--primary {
  background: var(--ink);
  color: #fff;
}
.lib-btn--secondary {
  background: #fff;
  color: #000;
}

.lib-metric {
  background: #fff;
  border: 1px solid rgba(15, 28, 46, 0.1);
  border-radius: 12px;
  padding: 0.85rem;
}
.lib-metric .lbl {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
.lib-metric .val {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}

.lib-spacer {
  min-height: 1px;
}

.lib-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.lib-tzk-news-item-shell {
  min-width: 0;
}

/* ── inject_tanizawa_landing_css + NEWS カード（Streamlit 相当・静的 HTML 用）── */
.lib-news-split-host {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
  margin: 0.5rem 0 1.25rem;
}
.lib-news-split-left {
  flex: 0 0 26%;
  max-width: 26%;
  min-width: 0;
}
.lib-news-split-right {
  flex: 1 1 0%;
  min-width: 0;
}
@media (max-width: 900px) {
  .lib-news-split-host {
    flex-direction: column;
  }
  .lib-news-split-left {
    flex: 1 1 auto;
    max-width: 100%;
  }
}
.lib-tzk-news-edu {
  padding: 0.35rem 0.5rem 1.25rem 0;
  border-left: 3px solid #c9a24d;
  padding-left: 1.25rem;
  margin-left: 2px;
}
.lib-tzk-news-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: #94a3b8;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
}
.lib-tzk-news-mast {
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #0f1c2e;
  margin: 0 0 0.65rem 0;
  line-height: 1.05;
}
.lib-tzk-news-lede {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #475569;
  margin: 0 0 1rem 0;
  max-width: min(36rem, 100%);
}
.lib-tzk-news-wide .lib-tzk-news-mast {
  letter-spacing: 0.14em;
}
.lib-tzk-news-accent-bar {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #c9a24d, rgba(201, 162, 77, 0.2));
  border-radius: 2px;
}
.lib-news-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.25rem 0 0.5rem 0;
}
.lib-news-card {
  border: 1px solid rgba(15, 28, 46, 0.12);
  border-radius: 12px;
  padding: 1.05rem 1.12rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  width: 100%;
}
.lib-news-card--featured {
  border-color: rgba(201, 162, 77, 0.45);
  background: linear-gradient(165deg, #faf8f5 0%, #ffffff 42%, #fafbfc 100%);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
  padding: 1.15rem 1.2rem;
}
.lib-news-card-meta {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0 0 0.45rem 0;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: center;
}
.lib-news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0.65rem 0;
  color: #0f1c2e;
}
.lib-news-tag {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
}
.lib-news-tag-report {
  background: linear-gradient(135deg, #dc2626, #991b1b);
}
.lib-news-tag-release {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.lib-news-tag-site {
  background: linear-gradient(135deg, #0d9488, #0f766e);
}
.lib-news-tag-notice {
  background: linear-gradient(135deg, #d97706, #b45309);
}
.lib-news-tag-media {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}
.lib-news-tag-event {
  background: linear-gradient(135deg, #e11d48, #be123c);
}
.lib-news-tag-governance {
  background: linear-gradient(135deg, #475569, #334155);
}
.lib-news-tag-muted {
  background: linear-gradient(135deg, #64748b, #475569);
}
.lib-news-card-body {
  font-size: 0.9rem;
  line-height: 1.72;
  color: #334155;
  margin: 0;
}
.lib-news-card-body p {
  margin: 0 0 0.55rem 0;
}
.lib-news-expander {
  margin: 0.75rem 0;
}
.lib-news-expander summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f1c2e;
}

/* st.columns 行：明示 flex コンテナ（二重レイアウト防止用クラス） */
.st-horizontal-block.lib-st-columns-container,
.st-columns.lib-st-columns-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
}
.st-horizontal-block.lib-st-columns-container [data-testid="column"].lib-st-column-flex,
.st-columns.lib-st-columns-container .lib-st-column-flex {
  flex: 1 1 0%;
  min-width: 0;
}
@media (max-width: 640px) {
  .st-horizontal-block.lib-st-columns-container:not(.st-columns--nowrap),
  .st-columns.lib-st-columns-container:not(.st-columns--nowrap) {
    flex-direction: column;
  }
}
