/* AI研究所 案G（digirise.ai の見た目に合わせる）2026-10-16
   トークンは digirise-corporate-site/app/globals.css と同じ。元のテーマ（html の font-size 62.5%・header の固定）とぶつからないよう、
   すべて body.lab-g の下で px で書く */
body.lab-g {
  --lg-ink: #222222; --lg-sub: #4a4f5a; --lg-mute: #646c8a; --lg-line: #dde4f1; --lg-paper: #ebf5fa;
  --lg-blue: #3a34ff; --lg-deep: #1a15bb;
  --lg-sig: linear-gradient(90deg, #5800ff 0%, #5ce1e6 100%);
  --lg-field: linear-gradient(134deg, #3a34ff 10.51%, #1a15bb 86.6%);
  --lg-shadow: 0 6px 28px rgba(58, 52, 255, 0.07);
  --lg-ff: 'Red Hat Display', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: #fff;
}
body.lab-g .main_header { display: none !important; }
body.lab-g .lg-main, body.lab-g .lg-hdr, body.lab-g .lg-chat, body.lab-g .lg-side, body.lab-g #side-bar .lg-contact {
  font-family: var(--lg-ff); color: var(--lg-ink); letter-spacing: .06em; font-feature-settings: 'palt' 1; font-size: 16px; line-height: 2;
}
body.lab-g .lg-main *, body.lab-g .lg-hdr *, body.lab-g .lg-chat * { box-sizing: border-box; }
body.lab-g .lg-wrap { max-width: 1200px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
body.lab-g .lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.lab-g .lg-main a, body.lab-g .lg-hdr a, body.lab-g .lg-chat a, body.lab-g .lg-contact a { color: inherit; text-decoration: none; word-break: normal; }
body.lab-g .lg-main img { display: block; max-width: 100%; height: auto; }
body.lab-g .lg-main h1, body.lab-g .lg-main h2, body.lab-g .lg-main h3 { word-break: auto-phrase; text-wrap: balance; line-height: 1.45; margin: 0; }

/* 英字ラベル（斜体＋薄い影文字） */
body.lab-g .lg-en { position: relative; margin: 0 0 6px; font-family: 'Red Hat Display', sans-serif; font-style: italic; font-weight: 900; line-height: 1; }
body.lab-g .lg-en span { position: relative; z-index: 1; font-size: 15px; background: var(--lg-sig); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.lab-g .lg-en em { position: absolute; left: 12px; top: -18px; font-size: 52px; color: rgba(58,52,255,.08); font-style: italic; }
body.lab-g .lg-en--w span { background: none; color: #8fe9ee; }

/* ボタン */
body.lab-g .lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 42px; padding: 0 22px; border-radius: 999px; background: var(--lg-sig); color: #fff !important; font-size: 13px; font-weight: 700; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(88,0,255,.18); white-space: nowrap; transition: transform .2s, box-shadow .2s; }
body.lab-g .lg-btn::after { content: ''; border-left: 5px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
body.lab-g .lg-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(88,0,255,.26); }
body.lab-g .lg-btn--lg { height: 52px; padding: 0 30px; font-size: 14px; }
body.lab-g .lg-btn--w { background: #fff; color: var(--lg-blue) !important; box-shadow: none; }
body.lab-g .lg-btn--w::after { border-left-color: var(--lg-blue); }

/* ヘッダー（元のテーマの header{position:fixed} を打ち消す） */
body.lab-g header.lg-hdr { position: sticky; top: 0; left: auto; width: 100%; z-index: 1000; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--lg-line); }
body.lab-g .lg-hdr__in { display: flex; align-items: center; gap: 24px; height: 72px; }
body.lab-g .lg-logo { display: flex; align-items: center; gap: 12px; flex: none; }
body.lab-g .lg-logo img { height: 28px; width: auto; display: block; }
body.lab-g .lg-logo span { padding-left: 12px; border-left: 1px solid var(--lg-line); font-size: 15px; font-weight: 700; letter-spacing: .08em; }
body.lab-g .lg-nav { display: flex; gap: 22px; font-size: 13.5px; font-weight: 700; margin-left: 8px; }
body.lab-g .lg-nav a:hover { color: var(--lg-blue); }
body.lab-g .lg-hsearch { margin-left: auto; }
body.lab-g .lg-hsearch input { width: 180px; height: 38px; padding: 0 14px; border: 1px solid var(--lg-line); border-radius: 999px; background: #f7f9fc; font-size: 13px; outline: 0; font-family: inherit; }
body.lab-g .lg-hsearch input:focus { border-color: var(--lg-blue); background: #fff; }
body.lab-g .lg-dl { font-size: 12.5px; font-weight: 700; color: var(--lg-sub); white-space: nowrap; }

/* 見出し帯 */
body.lab-g .lg-hero { position: relative; overflow: hidden; background: var(--lg-paper); padding: 28px 0 64px; }
body.lab-g .lg-bars { position: absolute; right: 4%; top: -40px; width: 340px; height: 260px; pointer-events: none; }
body.lab-g .lg-bars i { position: absolute; height: 56px; border-radius: 999px; transform: rotate(-38deg); }
body.lab-g .lg-bars i:nth-child(1) { width: 260px; left: 0; top: 110px; background: linear-gradient(90deg, #6200ff, #3a34ff); }
body.lab-g .lg-bars i:nth-child(2) { width: 220px; left: 110px; top: 70px; background: linear-gradient(90deg, #00dbff, #00ffff); opacity: .9; }
body.lab-g .lg-crumb { display: flex; gap: 8px; font-size: 11.5px; color: var(--lg-mute); margin-bottom: 36px; }
body.lab-g .lg-hero h1 { margin-top: 26px; font-size: 52px; font-weight: 900; letter-spacing: .04em; }
body.lab-g .lg-lead { margin: 14px 0 0; color: var(--lg-sub); font-size: 15px; }
body.lab-g .lg-search { position: relative; z-index: 1; display: flex; gap: 6px; margin-top: 28px; width: min(100%, 620px); padding: 6px; background: #fff; border-radius: 999px; box-shadow: var(--lg-shadow); }
body.lab-g .lg-search input { flex: 1; min-width: 0; height: 44px; padding: 0 18px; border: 0; outline: 0; background: transparent; font-size: 14px; font-family: inherit; }
body.lab-g .lg-search button { height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--lg-ink); color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* 注目 */
body.lab-g .lg-pick { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; margin-top: -32px; position: relative; }
body.lab-g .lg-leadcard { display: grid; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--lg-shadow); align-content: start; }
body.lab-g .lg-leadcard__b { display: grid; gap: 10px; padding: 24px 28px 28px; }
body.lab-g .lg-leadcard h2 { font-size: 22px; font-weight: 900; }
body.lab-g .lg-leadcard__ex { margin: 0; font-size: 14px; color: var(--lg-sub); line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.lab-g .lg-more { font-size: 13px; font-weight: 700; color: var(--lg-blue); }
body.lab-g .lg-more::after { content: ' →'; }
body.lab-g .lg-img { overflow: hidden; }
body.lab-g .lg-img img { width: 100%; transition: transform .5s; }
body.lab-g a:hover .lg-img img { transform: scale(1.03); }
body.lab-g .lg-img--left img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left center; }
body.lab-g .lg-meta { display: flex; gap: 14px; margin: 0; font-size: 12px; color: var(--lg-mute); font-weight: 700; line-height: 1.6; }
body.lab-g .lg-meta span { color: var(--lg-blue); }
body.lab-g .lg-cards { display: grid; gap: 14px; align-content: start; }
body.lab-g .lg-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; background: #fff; border-radius: 12px; box-shadow: var(--lg-shadow); }
body.lab-g .lg-card .lg-img { border-radius: 8px; }
body.lab-g .lg-card h3 { margin-top: 4px; font-size: 14px; font-weight: 700; line-height: 1.6; }
body.lab-g .lg-card:hover h3, body.lab-g .lg-leadcard:hover h2 { color: var(--lg-blue); }

/* 新着＋右列 */
body.lab-g .lg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
body.lab-g .lg-sec { padding: 80px 0 0; min-width: 0; }
body.lab-g .lg-h2 { font-size: 34px; font-weight: 900; margin: 0 0 26px; }
body.lab-g .lg-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--lg-line); margin-bottom: 8px; }
body.lab-g .lg-tab { padding: 12px 18px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 13px; font-weight: 700; color: var(--lg-sub); cursor: pointer; font-family: inherit; letter-spacing: .06em; }
body.lab-g .lg-tab[aria-pressed="true"] { color: var(--lg-blue); border-color: var(--lg-blue); }
body.lab-g .lg-rows { list-style: none; margin: 0; padding: 0; }
body.lab-g .lg-row[hidden], body.lab-g .lg-inline[hidden] { display: none; }
body.lab-g .lg-row a { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--lg-line); }
body.lab-g .lg-row__th { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; background: var(--lg-paper); }
body.lab-g .lg-row__th img { width: 100%; height: 100%; object-fit: cover; object-position: left center; transition: transform .4s; }
body.lab-g .lg-row a:hover .lg-row__th img { transform: scale(1.04); }
body.lab-g .lg-row__b { display: grid; gap: 6px; min-width: 0; }
body.lab-g .lg-row__m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; line-height: 1.6; color: var(--lg-mute); }
body.lab-g .lg-row__k { display: inline-flex; height: 20px; align-items: center; padding: 0 8px; border-radius: 4px; background: #eeedff; color: var(--lg-blue); font-size: 11px; font-weight: 700; }
body.lab-g .lg-row__t { font-size: 15.5px; font-weight: 700; line-height: 1.6; }
body.lab-g .lg-row a:hover .lg-row__t { color: var(--lg-blue); }
body.lab-g .lg-row__x { font-size: 12.5px; color: var(--lg-sub); line-height: 1.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lab-g .lg-inline a { display: grid; gap: 8px; justify-items: start; margin: 18px 0; padding: 24px 28px; border-radius: 16px; background: linear-gradient(120deg, #f2f1ff, #e9f8fc); border: 1px solid #dcdcff; line-height: 1.7; }
body.lab-g .lg-inline__k { font-size: 12px; font-weight: 700; color: var(--lg-blue); }
body.lab-g .lg-inline b { font-size: 18px; font-weight: 900; }
body.lab-g .lg-inline__t { font-size: 13px; color: var(--lg-sub); }
body.lab-g .lg-center { display: flex; justify-content: center; margin-top: 40px; }

body.lab-g .lg-side { display: grid; gap: 18px; padding-top: 80px; }
body.lab-g .lg-contact { display: grid; gap: 10px; padding: 24px; border-radius: 16px; background: #fff; box-shadow: var(--lg-shadow); border: 1px solid var(--lg-line); line-height: 1.7; }
body.lab-g .lg-contact p { margin: 0; }
body.lab-g .lg-contact__h { font-size: 20px; font-weight: 900; }
body.lab-g .lg-contact__no1 { font-size: 12.5px; color: var(--lg-sub); line-height: 1.6; }
body.lab-g .lg-contact__no1 b { font-size: 20px; font-weight: 900; background: var(--lg-sig); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.lab-g .lg-contact__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
body.lab-g .lg-contact__list li::before { content: '✓'; margin-right: 8px; color: var(--lg-blue); font-weight: 900; }
body.lab-g .lg-contact__btn { height: 48px; margin-top: 4px; }
body.lab-g .lg-contact__sub { justify-self: center; font-size: 12.5px; font-weight: 700; color: var(--lg-blue) !important; }
body.lab-g .lg-contact__sub::after { content: ' →'; }
body.lab-g .lg-note { font-size: 10.5px; color: var(--lg-mute); }
body.lab-g .lg-banner .dr-banner { margin: 0; }
body.lab-g .lg-banner a { display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--lg-shadow); transition: transform .2s; }
body.lab-g .lg-banner a:hover { transform: translateY(-2px); }
body.lab-g .lg-banner img { width: 100%; display: block; }
body.lab-g .lg-box { padding: 18px 18px 8px; border-radius: 16px; background: #fff; border: 1px solid var(--lg-line); }
body.lab-g .lg-box__h { margin: 0 0 8px; font-size: 15px; font-weight: 900; }
body.lab-g .lg-pop { list-style: none; margin: 0; padding: 0; }
body.lab-g .lg-pop li a { display: grid; grid-template-columns: 72px 20px minmax(0, 1fr); gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--lg-line); }
body.lab-g .lg-pop__th { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--lg-paper); }
body.lab-g .lg-pop__th img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
body.lab-g .lg-pop b { font-family: 'Red Hat Display', sans-serif; font-size: 16px; font-weight: 900; font-style: italic; color: var(--lg-blue); text-align: center; }
body.lab-g .lg-pop__t { font-size: 12.5px; font-weight: 700; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.lab-g .lg-pop a:hover .lg-pop__t { color: var(--lg-blue); }

/* 業界別・用語解説 */
body.lab-g .lg-pale { background: var(--lg-paper); padding: 72px 0; margin-top: 64px; }
body.lab-g .lg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
body.lab-g .lg-pills { display: flex; flex-wrap: wrap; gap: 10px; }
body.lab-g .lg-pill { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 700; box-shadow: var(--lg-shadow); line-height: 1; }
body.lab-g .lg-pill:hover { color: var(--lg-blue) !important; }
body.lab-g .lg-pill { max-width: 100%; overflow-wrap: anywhere; line-height: 1.4; height: auto; min-height: 44px; }
body.lab-g .lg-row__t, body.lab-g .lg-card h3, body.lab-g .lg-leadcard h2, body.lab-g .lg-hero h1 { overflow-wrap: anywhere; }
body.lab-g .lg-pill--g::after { content: 'とは'; margin-left: 4px; font-size: 11px; color: var(--lg-mute); font-weight: 500; }

/* 相談の帯 */
body.lab-g .lg-cta { background: var(--lg-field); color: #fff; padding: 64px 0; }
body.lab-g .lg-cta__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
body.lab-g .lg-cta h2 { margin-top: 8px; font-size: 30px; font-weight: 900; color: #fff; }
body.lab-g .lg-cta p:not(.lg-en) { margin: 8px 0 0; font-size: 14px; color: rgba(255,255,255,.82); max-width: 40em; line-height: 1.9; }
body.lab-g .lg-cta__act { display: flex; flex-wrap: wrap; gap: 12px; }

/* 記事一覧・カテゴリ・タグ・検索・日付別（parts/g/list.php） */
body.lab-g .lg-hero--sub { padding: 24px 0 48px; }
body.lab-g .lg-hero--sub h1 { margin-top: 18px; font-size: 40px; }
body.lab-g .lg-hero--sub .lg-lead p { margin: 0; }
body.lab-g .lg-sec--list { padding-top: 48px; }
body.lab-g .lg-count { margin: 0 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--lg-line); font-size: 13px; font-weight: 700; color: var(--lg-mute); }
body.lab-g .lg-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
body.lab-g .lg-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lg-line); background: #fff; font-size: 13.5px; font-weight: 700; line-height: 1; }
body.lab-g .lg-pager a.page-numbers:hover { border-color: var(--lg-blue); color: var(--lg-blue); }
body.lab-g .lg-pager .page-numbers.current { background: var(--lg-blue); border-color: var(--lg-blue); color: #fff; }
body.lab-g .lg-pager .page-numbers.dots { border: 0; background: none; min-width: 20px; padding: 0; }
body.lab-g .lg-empty { margin-top: 24px; padding: 36px 32px; border-radius: 16px; background: var(--lg-paper); line-height: 1.9; }
body.lab-g .lg-empty p { margin: 0; font-size: 14px; color: var(--lg-sub); }
body.lab-g .lg-empty .lg-empty__h { margin-bottom: 8px; font-size: 20px; font-weight: 900; color: var(--lg-ink); }
body.lab-g .lg-empty__act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
body.lab-g .lg-empty .lg-btn--w { border: 1px solid #cfd0ff; }

/* 右列：記事に合わせたお役立ち資料 */
body.lab-g .lg-guide { display: grid; gap: 10px; padding: 18px 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--lg-line); box-shadow: var(--lg-shadow); line-height: 1.7; transition: transform .2s, border-color .2s; }
body.lab-g .lg-guide:hover { transform: translateY(-2px); border-color: #cfd0ff; }
body.lab-g .lg-guide__k { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--lg-blue); }
body.lab-g .lg-guide__k i { font-style: normal; padding: 0 10px; border-radius: 999px; background: #ffff00; color: var(--lg-deep); font-size: 11px; line-height: 20px; }
body.lab-g .lg-guide__img { display: block; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, #f1f5ff, #e6f7fb); }
body.lab-g .lg-guide__img img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 14px 28px -16px rgba(26,21,187,.55); transition: transform .4s; }
body.lab-g .lg-guide:hover .lg-guide__img img { transform: translateY(-2px) scale(1.02); }
body.lab-g .lg-guide__t { font-size: 15px; font-weight: 900; line-height: 1.55; }
body.lab-g .lg-guide__x { font-size: 12.5px; color: var(--lg-sub); line-height: 1.75; }
body.lab-g .lg-guide__go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 999px; background: var(--lg-sig); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(88,0,255,.18); }
body.lab-g .lg-guide__go::after { content: ''; border-left: 5px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* 右列：目的から選べるサービス資料 */
body.lab-g .lg-docs { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 22px 16px 18px; border-radius: 16px; background: var(--lg-field); color: #fff; line-height: 1.6; }
body.lab-g .lg-docs::before { content: ''; position: absolute; right: -40px; top: -30px; width: 160px; height: 40px; border-radius: 999px; transform: rotate(-38deg); background: linear-gradient(90deg, #00dbff, #00ffff); opacity: .55; pointer-events: none; }
body.lab-g .lg-docs p { margin: 0; position: relative; }
body.lab-g .lg-docs__k { display: flex; align-items: center; gap: 8px; padding-left: 4px; font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.8); }
body.lab-g .lg-docs__k span { padding: 0 8px; border-radius: 4px; background: #ffff00; color: var(--lg-deep); font-family: 'Red Hat Display', sans-serif; font-weight: 900; font-style: italic; letter-spacing: .08em; line-height: 20px; }
body.lab-g .lg-docs__h { padding-left: 4px; font-size: 19px; font-weight: 900; line-height: 1.45; color: #fff; }
body.lab-g .lg-docs__list { display: grid; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
body.lab-g .lg-doc { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; color: var(--lg-ink) !important; transition: transform .2s, box-shadow .2s; }
body.lab-g .lg-doc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(10,8,90,.35); }
body.lab-g .lg-doc__q { font-size: 11.5px; font-weight: 700; color: var(--lg-blue); line-height: 1.5; }
body.lab-g .lg-doc__q::before { content: 'Q. '; font-family: 'Red Hat Display', sans-serif; font-weight: 900; font-style: italic; }
body.lab-g .lg-doc__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
body.lab-g .lg-doc__img { display: block; padding: 5px; border-radius: 6px; background: #f1f5ff; }
body.lab-g .lg-doc__img img { display: block; width: 100%; height: auto; border-radius: 3px; }
body.lab-g .lg-doc__b { display: grid; gap: 2px; min-width: 0; }
body.lab-g .lg-doc__b b { font-size: 14px; font-weight: 900; line-height: 1.4; }
body.lab-g .lg-doc__b span { font-size: 11px; color: var(--lg-sub); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.lab-g .lg-doc:hover .lg-doc__b b { color: var(--lg-blue); }
body.lab-g .lg-docs__all { position: relative; justify-self: center; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: #fff !important; }
body.lab-g .lg-docs__all::after { content: ' →'; }

/* 元のテーマの固定ヘッダー分の上余白を外す（案Gのヘッダーは sticky で場所を取る） */
body.lab-g .article_mv, body.lab-g .up_fv, body.lab-g .au_fv, body.lab-g .contact_block, body.lab-g .up_unique { margin-top: 0; }
body.lab-g .contact-content { padding-top: 56px; }

/* 研究所のお問い合わせページ（フォームは公式サイト） */
body.lab-g .lg-formlink { display: grid; gap: 12px; justify-items: start; padding: 32px; font-family: var(--lg-ff); color: var(--lg-ink); line-height: 1.8; letter-spacing: .04em; }
body.lab-g .lg-formlink p { margin: 0; font-size: 14px; color: var(--lg-sub); }
body.lab-g .lg-formlink .lg-formlink__h { font-size: 18px; font-weight: 900; color: var(--lg-ink); line-height: 1.6; }
body.lab-g .lg-formlink__sub { font-size: 13px; font-weight: 700; color: var(--lg-blue); text-decoration: none; }
body.lab-g .lg-formlink__sub::after { content: ' →'; }

/* 研究所の資料ページの先頭：最新資料（公式サイト） */
body.lab-g .lg-latest { padding: 56px 20px 24px; font-family: var(--lg-ff); color: var(--lg-ink); letter-spacing: .04em; font-feature-settings: 'palt' 1; }
body.lab-g .lg-latest__in { max-width: 1100px; margin: 0 auto; padding: 36px 32px; border-radius: 20px; background: linear-gradient(120deg, #f2f1ff, #e9f8fc); border: 1px solid #dcdcff; }
body.lab-g .lg-latest .lg-docs__k { color: var(--lg-sub); }
body.lab-g .lg-latest__h { margin: 10px 0 6px; font-size: 26px; font-weight: 900; line-height: 1.45; }
body.lab-g .lg-latest__lead { margin: 0 0 22px; font-size: 14px; color: var(--lg-sub); line-height: 1.9; }
body.lab-g .lg-latest__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
body.lab-g .lg-latest__card { display: grid; gap: 6px; height: 100%; align-content: start; padding: 14px 14px 18px; border-radius: 14px; background: #fff; color: var(--lg-ink); text-decoration: none; box-shadow: var(--lg-shadow); line-height: 1.6; transition: transform .2s; }
body.lab-g .lg-latest__card:hover { transform: translateY(-2px); }
body.lab-g .lg-latest__img { display: block; margin-bottom: 6px; padding: 8px; border-radius: 8px; background: #f1f5ff; }
body.lab-g .lg-latest__img img { display: block; width: 100%; height: auto; border-radius: 4px; }
body.lab-g .lg-latest__card b { font-size: 15.5px; font-weight: 900; }
body.lab-g .lg-latest__x { font-size: 12.5px; color: var(--lg-sub); line-height: 1.75; }
body.lab-g .lg-latest__go { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--lg-blue); }
body.lab-g .lg-latest__go::after { content: ' →'; }

/* 記事・固定ページの右列（sidebar.php）。元のテーマの #side-bar の幅の中に入れる */
body.lab-g .lg-side--in { padding-top: 0; }
body.lab-g #side-bar .lg-side--in a { color: inherit; text-decoration: none; }
body.lab-g #side-bar .lg-side--in .lg-docs a.lg-docs__all { color: #fff; }
body.lab-g #side-bar .lg-side--in img { max-width: 100%; }

/* 右下の「AIに質問」（元のテーマの header{position:fixed} を打ち消す） */
body.lab-g .lg-chat { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 2000; display: grid; justify-items: end; gap: 12px; line-height: 1.6; }
body.lab-g .lg-chat__open { order: 2; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px; border: 0; border-radius: 999px; background: var(--lg-sig); color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 12px 30px rgba(88,0,255,.35); cursor: pointer; font-family: inherit; letter-spacing: .06em; }
body.lab-g .lg-chat__open:hover { transform: translateY(-2px); }
body.lab-g .lg-chat__ic { position: relative; width: 26px; height: 22px; border-radius: 8px; background: #fff; }
body.lab-g .lg-chat__ic::before, body.lab-g .lg-chat__ic::after { content: ''; position: absolute; top: 9px; width: 4px; height: 4px; border-radius: 999px; background: #3a34ff; }
body.lab-g .lg-chat__ic::before { left: 7px; } body.lab-g .lg-chat__ic::after { right: 7px; }
body.lab-g .lg-chat__panel { order: 1; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(20,24,51,.25); overflow: hidden; }
body.lab-g .lg-chat__panel[hidden] { display: none; }
body.lab-g header.lg-chat__head { position: static; width: auto; z-index: auto; display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: var(--lg-field); color: #fff; }
body.lab-g .lg-chat__head b { display: block; font-size: 15px; }
body.lab-g .lg-chat__head small { font-size: 11.5px; opacity: .8; }
body.lab-g .lg-chat__close { color: #fff; font-size: 22px; line-height: 1; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; }
body.lab-g .lg-chat__log { overflow-y: auto; padding: 16px; display: grid; align-content: start; gap: 10px; background: #f7f8fc; }
body.lab-g .lg-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.75; }
body.lab-g .lg-msg--bot { justify-self: start; background: #fff; border: 1px solid var(--lg-line); border-top-left-radius: 4px; }
body.lab-g .lg-msg--me { justify-self: end; background: var(--lg-blue); color: #fff; border-top-right-radius: 4px; }
body.lab-g .lg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
body.lab-g .lg-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #cfd0ff; background: #fff; color: var(--lg-blue); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
body.lab-g .lg-chip:hover { background: #eeedff; }
body.lab-g .lg-hits { display: grid; gap: 6px; max-width: 92%; }
body.lab-g .lg-hit { display: grid; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid var(--lg-line); border-radius: 10px; font-size: 12.5px; line-height: 1.55; }
body.lab-g .lg-hit:hover { border-color: var(--lg-blue); }
body.lab-g .lg-chat__cta { justify-self: start; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--lg-sig); color: #fff !important; font-size: 12.5px; font-weight: 700; }
body.lab-g .lg-chat__form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--lg-line); margin: 0; }
body.lab-g .lg-chat__form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--lg-line); border-radius: 999px; font-size: 13.5px; outline: 0; font-family: inherit; }
body.lab-g .lg-chat__form input:focus { border-color: var(--lg-blue); }
body.lab-g .lg-chat__form button { height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--lg-ink); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
body.lab-g .lg-chat__foot { margin: 0; padding: 0 12px 10px; font-size: 10.5px; color: var(--lg-mute); text-align: center; }

@media (max-width: 1080px) {
  body.lab-g .lg-nav, body.lab-g .lg-hsearch, body.lab-g .lg-dl { display: none; }
  body.lab-g .lg-hdr__in { justify-content: space-between; }
  body.lab-g .lg-layout { grid-template-columns: minmax(0, 1fr); }
  body.lab-g .lg-side { padding-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  body.lab-g .lg-latest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.lab-g #side-bar { width: 100%; max-width: 760px; box-sizing: border-box; padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 900px) {
  body.lab-g .lg-pick, body.lab-g .lg-two { grid-template-columns: minmax(0, 1fr); }
  body.lab-g .lg-bars { transform: scale(.6); transform-origin: top right; right: 0; }
}
@media (max-width: 640px) {
  body.lab-g .lg-wrap { padding-left: 16px; padding-right: 16px; }
  body.lab-g .lg-hdr__in { height: 60px; }
  body.lab-g .lg-logo img { height: 24px; }
  body.lab-g .lg-logo span { font-size: 13px; }
  body.lab-g .lg-hero h1 { font-size: 30px; }
  body.lab-g .lg-h2 { font-size: 26px; }
  body.lab-g .lg-side { grid-template-columns: minmax(0, 1fr); }
  body.lab-g #side-bar { width: 100%; padding: 0 16px 60px; }
  body.lab-g .related_cat_article .inner { width: auto; max-width: 100%; margin-right: 0; } /* 元のテーマの指定で横に7pxはみ出していた */
  body.lab-g .contact-content { padding-top: 32px; }
  body.lab-g .lg-latest { padding: 32px 16px 8px; }
  body.lab-g .lg-latest__in { padding: 24px 16px; }
  body.lab-g .lg-latest__h { font-size: 21px; }
  body.lab-g .lg-latest__grid { grid-template-columns: minmax(0, 1fr); }
  body.lab-g .lg-hero--sub h1 { font-size: 26px; }
  body.lab-g .lg-sec--list { padding-top: 32px; }
  body.lab-g .lg-empty { padding: 28px 20px; }
  body.lab-g .lg-pager .page-numbers { min-width: 38px; height: 38px; padding: 0 12px; }
  body.lab-g .lg-row a { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  body.lab-g .lg-row__t { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  body.lab-g .lg-row__x, body.lab-g .lg-row__c { display: none; }
  body.lab-g .lg-card { grid-template-columns: 110px minmax(0, 1fr); }
  body.lab-g .lg-inline a { padding: 20px; }
  body.lab-g .lg-search button { padding: 0 16px; }
  body.lab-g .lg-cta h2 { font-size: 22px; }
  body.lab-g .lg-cta__act, body.lab-g .lg-cta__act .lg-btn { width: 100%; }
  body.lab-g .lg-chat { right: 12px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  body.lab-g .lg-chat__open { height: 50px; padding: 0 18px 0 12px; }
}
@media (prefers-reduced-motion: reduce) { body.lab-g * { transition: none !important; } }
