/* パララボ PARALABO ホーム（lab）— 承認済み参照画像 872x1804 の比率に合わせたスタイル
   - すべて html[data-theme="lab"] 配下。classic には効かない
   - 寸法は --u（参照画像1px 相当＝コンテナ幅/872）で比例縮小。小さくなりすぎる文字は max() で下限を設定
   - クラス名は lh- 接頭辞 */

html[data-theme="lab"]{
  --lh-ink:#1e2547;
  --lh-sub:#67739b;
  --lh-line:#ebeaff;
  --lh-violet:#6144e1;
  background:#eef1fa;
  color-scheme:light;
  -webkit-text-size-adjust:100%;
}
html[data-theme="lab"] *,
html[data-theme="lab"] *::before,
html[data-theme="lab"] *::after{box-sizing:border-box}
html[data-theme="lab"] body{
  margin:0;color:var(--lh-ink);background:#eef1fa;
  font-family:'Noto Sans JP','Noto Sans CJK JP',system-ui,-apple-system,'Hiragino Sans',sans-serif;
  line-height:1.5;-webkit-tap-highlight-color:rgba(121,97,236,.15);overflow-x:clip;
}
html[data-theme="lab"] a{color:inherit;text-decoration:none}
html[data-theme="lab"] :focus-visible{outline:3px solid #725cff;outline-offset:2px;border-radius:10px}
html[data-theme="lab"] .lh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ===== 全体（スマホ幅で中央寄せ） ===== */
html[data-theme="lab"] .lh-app{
  container-type:inline-size;position:relative;
  max-width:480px;margin:0 auto;min-height:100vh;
  background:linear-gradient(150deg,#f6f6ff 25%,#ecf5ff 100%);
  padding-bottom:calc(32px + env(safe-area-inset-bottom,0px));
  --u:calc(100cqw / 872);
}
@media (min-width:481px){
  html[data-theme="lab"] .lh-app{box-shadow:0 0 48px rgba(72,80,160,.14)}
}

/* ===== 研究室（原画の静止画）＋実リンクの透明タップ領域 ===== */
html[data-theme="lab"] .lh-hero{position:relative}
html[data-theme="lab"] .lh-hero img{display:block;width:100%;height:auto}
html[data-theme="lab"] .lh-hit{
  position:absolute;display:block;top:calc(var(--u) * 6);height:calc(var(--u) * 78);min-height:44px;
  background:transparent;border:0;padding:0;color:transparent;cursor:pointer;
}
html[data-theme="lab"] .lh-hit.h-search{left:calc(var(--u) * 630);width:calc(var(--u) * 71)}
html[data-theme="lab"] .lh-hit.h-news{left:calc(var(--u) * 710);width:calc(var(--u) * 71)}
html[data-theme="lab"] .lh-hit.h-account{left:calc(var(--u) * 794);width:calc(var(--u) * 70)}
html[data-theme="lab"] .lh-hit:focus-visible{background:rgba(114,92,255,.12)}
/* 2026-10-28: 押したことがわかるように（ぬるっと沈む＋光る） */
html[data-theme="lab"] .lh-hit{border-radius:14px;transition:transform .16s cubic-bezier(.2,.8,.3,1.4),background .16s ease,box-shadow .16s ease;-webkit-tap-highlight-color:transparent}
html[data-theme="lab"] .lh-hit:active,html[data-theme="lab"] .lh-hit.is-pressed{transform:scale(.86);background:rgba(114,92,255,.16);box-shadow:0 0 0 6px rgba(114,92,255,.10)}
@keyframes lhPressPop{0%{transform:scale(1)}40%{transform:scale(.84)}100%{transform:scale(1.04)}}
html[data-theme="lab"] .lh-hit.is-pop{animation:lhPressPop .28s cubic-bezier(.2,.8,.3,1.2)}
@media (prefers-reduced-motion:reduce){html[data-theme="lab"] .lh-hit,html[data-theme="lab"] .lh-hit.is-pop{transition:none;animation:none}}

html[data-theme="lab"] .lh-main{padding:0 calc(var(--u) * 24)}

/* ===== カード共通 ===== */
html[data-theme="lab"] .lh-card{
  position:relative;margin-top:calc(var(--u) * 19);
  border:1.5px solid var(--lh-line);border-radius:calc(var(--u) * 24);
  background:linear-gradient(130deg,rgba(255,255,255,.97),rgba(253,254,255,.91));
  box-shadow:0 7px 22px #7580d911;
}
html[data-theme="lab"] .lh-h{
  display:flex;align-items:center;gap:calc(var(--u) * 9);margin:0;
  font-size:max(15px,calc(var(--u) * 26));line-height:1.4;font-weight:850;
}
html[data-theme="lab"] .lh-h svg{width:calc(var(--u) * 29);min-width:18px;height:auto;aspect-ratio:29/33;flex-shrink:0}
html[data-theme="lab"] .lh-sub{
  margin:calc(var(--u) * 4) 0 calc(var(--u) * 14);
  font-size:max(11px,calc(var(--u) * 17));color:var(--lh-sub);line-height:1.6;
}

/* ===== 5ツール（横1列） ===== */
html[data-theme="lab"] .lh-tools{padding:calc(var(--u) * 18) calc(var(--u) * 20) calc(var(--u) * 18);margin-top:-6px;z-index:1}
html[data-theme="lab"] .lh-sec-top{display:flex;justify-content:space-between;align-items:center;gap:calc(var(--u) * 12)}
html[data-theme="lab"] .lh-pill{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;flex-shrink:0;
  border:1.5px solid #bcb7ff;background:#fff;color:#5544ec;border-radius:28px;
  padding:0 calc(var(--u) * 24);font-size:max(11px,calc(var(--u) * 19));font-weight:700;white-space:nowrap;
}
html[data-theme="lab"] .lh-tools-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:calc(var(--u) * 13)}
html[data-theme="lab"] .lh-tool{display:block;text-align:center;min-width:0}
html[data-theme="lab"] .lh-tool-tile{
  min-height:calc(var(--u) * 132);display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:calc(var(--u) * 9);padding:4px 2px;
  border:1.5px solid #dddfff;border-radius:calc(var(--u) * 17);background:linear-gradient(120deg,#fff,#f5f8ff);
  box-shadow:0 3px 7px #8d94cd0b;
}
html[data-theme="lab"] .lh-tool-tile img{height:calc(var(--u) * 68);max-width:84%;object-fit:contain;mix-blend-mode:multiply}
html[data-theme="lab"] .lh-tool-tile b{font-size:max(11px,calc(var(--u) * 20));white-space:nowrap;letter-spacing:-.03em}
html[data-theme="lab"] .lh-tool-desc{
  display:block;margin-top:calc(var(--u) * 4);font-size:max(10px,calc(var(--u) * 17));color:#5c678c;line-height:1.5;
}

/* ===== 攻略データ（左）／ちょっと一息（右） ===== */
html[data-theme="lab"] .lh-split{display:grid;grid-template-columns:552fr 262fr;gap:calc(var(--u) * 10);margin-top:calc(var(--u) * 17)}
html[data-theme="lab"] .lh-split .lh-card{margin-top:0;min-width:0;padding:calc(var(--u) * 15) calc(var(--u) * 19)}
html[data-theme="lab"] .lh-data .lh-sub{margin-bottom:calc(var(--u) * 17)}
html[data-theme="lab"] .lh-data-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:calc(var(--u) * 11)}
html[data-theme="lab"] .lh-data-tile{display:block;text-align:center;min-width:0}
html[data-theme="lab"] .lh-data-tile>div{
  min-height:calc(var(--u) * 116);display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:calc(var(--u) * 6);padding:3px 1px;
  background:linear-gradient(130deg,#fff,#f2f8ff);border:1px solid #dde9ff;border-radius:calc(var(--u) * 16);
}
html[data-theme="lab"] .lh-data-tile img{width:calc(var(--u) * 60);height:calc(var(--u) * 61);object-fit:contain;mix-blend-mode:multiply}
html[data-theme="lab"] .lh-data-tile b{font-size:max(10px,calc(var(--u) * 15));letter-spacing:-.04em;line-height:1.3}
html[data-theme="lab"] .lh-data-tile small{display:block;margin-top:calc(var(--u) * 6);font-size:max(10px,calc(var(--u) * 16));color:#586789;line-height:1.3}
html[data-theme="lab"] .lh-rest{background:linear-gradient(120deg,#fffbff,#fcf6ff)!important}
html[data-theme="lab"] .lh-rest-links{display:grid;gap:calc(var(--u) * 8);margin-top:calc(var(--u) * 9)}
html[data-theme="lab"] .lh-rest-links a{
  min-height:max(44px,calc(var(--u) * 59));display:flex;align-items:center;gap:calc(var(--u) * 12);
  padding:calc(var(--u) * 9) calc(var(--u) * 12);
  border:1px solid #efe8ff;border-radius:calc(var(--u) * 15);background:#fff;
  font-size:max(11px,calc(var(--u) * 18));line-height:1.3;
}
html[data-theme="lab"] .lh-rest-links svg{width:max(18px,calc(var(--u) * 29));height:auto;aspect-ratio:29/31;flex-shrink:0}

/* ===== 研究所の共通パーツ（下部まで同じ世界観に） ===== */
html[data-theme="lab"] .lh-card{overflow:hidden}
html[data-theme="lab"] .lh-card::before{
  content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;
  background:radial-gradient(120% 70% at 100% 0%,rgba(196,180,255,.16),transparent 60%),radial-gradient(90% 60% at 0% 100%,rgba(170,214,255,.12),transparent 60%);
}
html[data-theme="lab"] .lh-card>*{position:relative}
html[data-theme="lab"] .lh-h-img{width:max(22px,calc(var(--u) * 34));height:auto;mix-blend-mode:multiply;flex-shrink:0}
html[data-theme="lab"] .lh-h svg{color:#5b47e0}

/* ===== 特集（左）＋初心者ガイド（右）の2枚並び ===== */
html[data-theme="lab"] .lh-feat2{display:grid;grid-template-columns:1.56fr 1fr;gap:calc(var(--u) * 14);margin-top:calc(var(--u) * 19);align-items:stretch}
html[data-theme="lab"] .lh-feat2>a{display:block;min-width:0;border-radius:calc(var(--u) * 26);overflow:hidden;box-shadow:0 6px 16px rgba(40,42,119,.16)}
html[data-theme="lab"] .lh-feat2-ruins img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:493/186}
html[data-theme="lab"] .lh-begin{
  position:relative;container-type:inline-size;aspect-ratio:321/186;
  background:linear-gradient(125deg,#fbfbff 0%,#f4f2ff 60%,#efe9ff 100%);border:1px solid #e3e0fa;
}
html[data-theme="lab"] .lh-begin-in{position:absolute;inset:0;display:flex;flex-direction:column;align-items:flex-start;padding:10cqw 0 0 8cqw}
html[data-theme="lab"] .lh-begin-mira{
  position:absolute;right:-5cqw;bottom:-1cqw;width:45cqw;height:auto;pointer-events:none;
  filter:drop-shadow(0 2px 4px rgba(120,80,170,.18));
}
html[data-theme="lab"] .lh-begin-h{position:relative;display:flex;align-items:center;gap:2.6cqw;font-size:7.6cqw;font-weight:900;color:#1f2650;white-space:nowrap;letter-spacing:.02em}
html[data-theme="lab"] .lh-begin-h svg{width:7.4cqw;height:auto}
html[data-theme="lab"] .lh-begin-t{position:relative;margin-top:5cqw;font-size:4.9cqw;line-height:1.55;color:#4a5478;white-space:nowrap}
html[data-theme="lab"] .lh-begin-btn{
  position:relative;margin-top:auto;margin-bottom:8cqw;display:inline-flex;align-items:center;gap:3cqw;
  padding:2.6cqw 6.5cqw;border-radius:999px;background:#fff;border:1px solid #e1dcfb;
  font-size:5.3cqw;font-weight:800;color:#4f3fe0;white-space:nowrap;box-shadow:0 2px 6px rgba(110,90,230,.12);
}
html[data-theme="lab"] .lh-begin-btn i{font-style:normal}

/* ===== 最新の研究成果（横にめくるカード） ===== */
html[data-theme="lab"] .lh-news{padding:14px 0 12px}
html[data-theme="lab"] .lh-news .lh-sec-top{padding:0 16px}
html[data-theme="lab"] .lh-more{
  display:inline-flex;align-items:center;min-height:44px;padding:0 2px;background:none;border:0;cursor:pointer;
  font:inherit;color:#5d6aa0;font-size:12.5px;font-weight:700;white-space:nowrap;
}
html[data-theme="lab"] .lh-news-row{
  display:flex;gap:10px;margin-top:4px;padding:4px 16px 8px;
  overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-left:16px;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
}
html[data-theme="lab"] .lh-news-row::-webkit-scrollbar{display:none}
html[data-theme="lab"] .lh-news-row::after{content:"";flex:0 0 6px}
html[data-theme="lab"] .lh-news-row:focus-visible{outline-offset:-3px}
html[data-theme="lab"] .lh-news-item{
  flex:0 0 78cqw;max-width:340px;scroll-snap-align:start;scroll-snap-stop:always;
  display:flex;flex-direction:column;overflow:hidden;
  background:#fff;border:1px solid #e4e0fb;border-radius:16px;box-shadow:0 6px 16px rgba(120,110,220,.12);
}
html[data-theme="lab"] .lh-news-item:only-child{flex-basis:100%;max-width:none}
html[data-theme="lab"] .lh-news-thumb{
  position:relative;display:grid;place-items:center;height:86px;flex-shrink:0;
  background:radial-gradient(45% 70% at 50% 60%,rgba(255,255,255,.7),transparent 70%),linear-gradient(135deg,#efe9ff,#e2ecff);
}
html[data-theme="lab"] .lh-news-item.k-add .lh-news-thumb{background:radial-gradient(60% 90% at 50% 100%,rgba(255,255,255,.95),transparent 70%),linear-gradient(135deg,#ffe8f4,#efe6ff)}
html[data-theme="lab"] .lh-news-item.k-fix .lh-news-thumb{background:radial-gradient(60% 90% at 50% 100%,rgba(255,255,255,.95),transparent 70%),linear-gradient(135deg,#e3efff,#eaf7ff)}
html[data-theme="lab"] .lh-news-thumb::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(rgba(120,100,255,.07) 1px,transparent 1px) 0 0/12px 12px,linear-gradient(90deg,rgba(120,100,255,.07) 1px,transparent 1px) 0 0/12px 12px;
}
html[data-theme="lab"] .lh-news-thumb img{position:relative;z-index:1;width:60px;height:60px;object-fit:contain;mix-blend-mode:multiply;filter:drop-shadow(0 4px 8px rgba(110,90,230,.18))}
html[data-theme="lab"] .lh-kind{
  position:absolute;z-index:1;top:8px;left:8px;font-style:normal;font-size:10.5px;font-weight:800;line-height:1;padding:4px 9px;border-radius:999px;
  background:#fff;color:#5544ec;box-shadow:0 2px 6px rgba(100,80,220,.15);white-space:nowrap;
}
html[data-theme="lab"] .k-add .lh-kind{color:#c43c86}
html[data-theme="lab"] .k-fix .lh-kind{color:#2f5fb5}
html[data-theme="lab"] .lh-news-body{display:flex;flex-direction:column;gap:3px;padding:10px 13px 13px}
html[data-theme="lab"] .lh-news-item time{font-size:11.5px;font-weight:700;color:#7a84ad;font-variant-numeric:tabular-nums;letter-spacing:.02em}
html[data-theme="lab"] .lh-news-item b{font-size:14px;font-weight:900;line-height:1.4;color:#1f2650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme="lab"] .lh-news-text{
  font-size:12.5px;line-height:1.6;color:#59628a;height:calc(1.6em * 2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
html[data-theme="lab"] .lh-dots{display:flex;justify-content:center;gap:6px;height:8px;margin-top:4px}
html[data-theme="lab"] .lh-dots i{width:6px;height:6px;border-radius:999px;background:#d6d0f5;transition:width .25s,background .25s}
html[data-theme="lab"] .lh-dots i.on{width:18px;background:linear-gradient(90deg,#7b5cff,#c86fd8)}

/* ===== 全鯖ランキング（深層遺跡の背景ビジュアル） ===== */
html[data-theme="lab"] .lh-abyss{
  position:relative;overflow:hidden;isolation:isolate;margin-top:calc(var(--u) * 19);padding:18px 14px 14px;border-radius:20px;color:#fff;
  background:linear-gradient(180deg,#141a4a 0%,#1c1857 45%,#2a1a63 100%);
  box-shadow:0 14px 30px rgba(40,30,120,.30);
}
html[data-theme="lab"] .lh-abyss-bg{
  position:absolute;inset:0 0 auto 0;height:86%;z-index:-2;
  background:url(/assets/lab-reference/ranking-ruins-bg.webp) center top/cover no-repeat;
  filter:blur(1.2px) saturate(1.3) contrast(1.12) brightness(1.08);transform:scale(1.03);
  -webkit-mask-image:linear-gradient(#000 45%,transparent);mask-image:linear-gradient(#000 45%,transparent);
}
html[data-theme="lab"] .lh-abyss::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(36% 30% at 50% 34%,rgba(120,210,255,.38),transparent 70%),
    linear-gradient(180deg,rgba(26,20,80,.12) 0%,rgba(46,28,120,.32) 50%,rgba(30,18,80,.9) 100%),
    linear-gradient(90deg,rgba(90,60,200,.38),transparent 28%,transparent 72%,rgba(90,60,200,.38));
}
html[data-theme="lab"] .lh-abyss-spark{
  position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.8;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%,#bfe6ff,transparent),radial-gradient(1.5px 1.5px at 82% 18%,#d9c8ff,transparent),
    radial-gradient(2px 2px at 68% 40%,#9fdcff,transparent),radial-gradient(1.5px 1.5px at 28% 48%,#e2d6ff,transparent),
    radial-gradient(1.5px 1.5px at 90% 55%,#a8e4ff,transparent),radial-gradient(2px 2px at 8% 62%,#cbb8ff,transparent);
}
html[data-theme="lab"] .lh-abyss-top{text-align:center;padding:4px 6px 0}
html[data-theme="lab"] .lh-abyss-kicker{
  display:inline-block;font-size:10.5px;font-weight:800;letter-spacing:.14em;padding:4px 12px;border-radius:999px;
  background:rgba(255,255,255,.14);border:1px solid rgba(190,220,255,.45);box-shadow:0 0 14px rgba(120,190,255,.35);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
}
html[data-theme="lab"] .lh-abyss-top h2{
  margin:8px 0 2px;font-size:22px;font-weight:900;letter-spacing:.06em;
  text-shadow:0 0 18px rgba(130,190,255,.75),0 2px 6px rgba(10,10,40,.6);
}
html[data-theme="lab"] .lh-abyss-top p{margin:0;font-size:12px;color:rgba(225,232,255,.9);text-shadow:0 1px 4px rgba(10,10,40,.7)}
html[data-theme="lab"] .lh-abyss-panels{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:64px}
html[data-theme="lab"] .lh-glass{
  position:relative;display:flex;flex-direction:column;gap:3px;min-width:0;min-height:118px;padding:12px;border-radius:16px;
  background:linear-gradient(160deg,rgba(255,255,255,.20),rgba(160,140,255,.10));
  border:1px solid rgba(214,200,255,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 0 0 1px rgba(150,120,255,.15),0 8px 22px rgba(10,6,50,.35),0 0 22px rgba(160,120,255,.25);
  -webkit-backdrop-filter:blur(10px) saturate(1.3);backdrop-filter:blur(10px) saturate(1.3);
}
html[data-theme="lab"] .lh-glass.is-iseki{
  background:linear-gradient(160deg,rgba(255,255,255,.18),rgba(110,190,255,.12));
  border-color:rgba(170,220,255,.5);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 0 0 1px rgba(120,200,255,.15),0 8px 22px rgba(10,6,50,.35),0 0 22px rgba(110,190,255,.28);
}
/* ミラ（総戦力）・レイ（遺跡）：研究室原画から切り出した正式キャラ。文字の後ろに置き、名前と数字は隠さない */
html[data-theme="lab"] .lh-glass{overflow:hidden;min-height:136px}
html[data-theme="lab"] .lh-glass>*:not(.lh-glass-chara){position:relative;z-index:1}
html[data-theme="lab"] .lh-glass-chara{
  position:absolute;z-index:0;right:-10px;bottom:-2px;height:74%;width:auto;max-width:54%;object-fit:contain;object-position:right bottom;
  pointer-events:none;filter:drop-shadow(0 0 10px rgba(190,160,255,.45));
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 26%);mask-image:linear-gradient(90deg,transparent 0%,#000 26%);
}
html[data-theme="lab"] .lh-glass-chara.is-mira{height:72%;max-width:58%;right:-14px;bottom:-4px;-webkit-mask-image:none;mask-image:none;filter:drop-shadow(0 0 8px rgba(255,170,230,.45))}
html[data-theme="lab"] .lh-glass-chara.is-rei{height:72%;right:-6px;filter:drop-shadow(0 0 10px rgba(120,200,255,.45))}
html[data-theme="lab"] .lh-glass .lh-king-n{max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-shadow:0 1px 3px rgba(20,10,60,.85)}
html[data-theme="lab"] .lh-glass .lh-king-v{text-shadow:0 0 12px rgba(190,160,255,.95),0 1px 3px rgba(20,10,60,.85)}
html[data-theme="lab"] .lh-glass.is-iseki .lh-king-v{text-shadow:0 0 12px rgba(120,200,255,.95),0 1px 3px rgba(20,10,60,.85)}
html[data-theme="lab"] .lh-glass-l{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:800;color:#e9e4ff;white-space:nowrap}
html[data-theme="lab"] .lh-glass-l i{font-style:normal;font-size:13px;filter:drop-shadow(0 0 6px rgba(255,220,140,.8))}
html[data-theme="lab"] .lh-glass .lh-king-n{margin-top:4px;font-size:14px;font-weight:900;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme="lab"] .lh-glass .lh-king-v{
  font-size:19px;font-weight:900;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
  color:#fff;text-shadow:0 0 12px rgba(190,160,255,.95),0 0 2px rgba(255,255,255,.8);
}
html[data-theme="lab"] .lh-glass.is-iseki .lh-king-v{text-shadow:0 0 12px rgba(120,200,255,.95),0 0 2px rgba(255,255,255,.8)}
html[data-theme="lab"] .lh-glass .lh-king-v small{font-size:11px;font-weight:700;color:rgba(230,230,255,.85);margin:0 2px;text-shadow:none}
html[data-theme="lab"] .lh-glass .lh-king-s{
  align-self:flex-start;margin-top:auto;font-size:10.5px;font-weight:800;color:#fff;
  background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.3);border-radius:999px;padding:1px 9px;
}
html[data-theme="lab"] .lh-king-s:empty{display:none}
html[data-theme="lab"] .lh-tied{display:inline-block;margin-left:4px;padding:0 6px;border-radius:999px;font-size:9px;font-weight:900;background:#ffe9a8;color:#3a2a00;vertical-align:middle}
html[data-theme="lab"] .lh-abyss-btn{
  display:flex;align-items:center;justify-content:center;min-height:44px;margin:12px auto 0;width:fit-content;padding:0 22px;border-radius:999px;
  font-size:13px;font-weight:800;color:#fff;background:linear-gradient(90deg,rgba(124,92,255,.85),rgba(80,150,255,.85));
  border:1px solid rgba(220,210,255,.55);box-shadow:0 0 18px rgba(130,120,255,.55);
}

/* ===== 研究ツール棚 ===== */
html[data-theme="lab"] .lh-shelf{padding:14px 14px 16px}
html[data-theme="lab"] .lh-shelf .lh-h,html[data-theme="lab"] .lh-shelf .lh-sub{padding:0 2px}
html[data-theme="lab"] .lh-shelf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html[data-theme="lab"] .lh-shelf-t{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:78px;padding:8px 2px;text-align:center;
  background:linear-gradient(140deg,#fff,#f6f8ff);border:1px solid #e3e6fb;border-radius:14px;
}
html[data-theme="lab"] .lh-shelf-ic{
  display:grid;place-items:center;width:36px;height:36px;border-radius:12px;color:#5b47e0;
  background:linear-gradient(140deg,#f1edff,#e7f1ff);box-shadow:inset 0 0 0 1px #e1dbff;
}
html[data-theme="lab"] .lh-shelf-ic svg{width:21px;height:21px}
html[data-theme="lab"] .lh-shelf-t small{display:block;max-width:100%;padding:0 3px;font-size:9.5px;line-height:1.3;color:#7a84ad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme="lab"] .lh-shelf-t b{font-size:10.5px;font-weight:800;line-height:1.3;letter-spacing:-.03em;color:#2c3355}

/* ===== 研究記録（更新履歴の全文） ===== */
html[data-theme="lab"] .lh-log{padding:10px 16px 12px}
html[data-theme="lab"] .lh-sec{margin-top:calc(var(--u) * 19)}
html[data-theme="lab"] .lh-note{margin:4px 2px 0;font-size:11.5px;color:var(--lh-sub);line-height:1.7}
html[data-theme="lab"] .lh-note a{color:#5544ec;font-weight:700}
html[data-theme="lab"] .lh-cl{margin-top:4px;background:#fff;border:1px solid #e5e6fb;border-radius:14px;padding:12px 14px;max-height:56vh;overflow-y:auto}
html[data-theme="lab"] .lh-cl[hidden]{display:none}
html[data-theme="lab"] .lh-cl-day{margin:0 0 10px}
html[data-theme="lab"] .lh-cl-day:last-child{margin-bottom:0}
html[data-theme="lab"] .lh-cl-date{font-size:12px;font-weight:900;color:var(--lh-violet)}
html[data-theme="lab"] .lh-cl ul{margin:2px 0 0;padding:0;list-style:none}
html[data-theme="lab"] .lh-cl li{font-size:12.5px;line-height:1.7;padding-left:3.6em;text-indent:-3.6em}
html[data-theme="lab"] .lh-cl li b{display:inline-block;width:3.2em;margin-right:.4em;text-indent:0;text-align:center;font-size:10px;border-radius:6px;background:#eef2f9;color:#4a5a8c}
html[data-theme="lab"] .lh-cl li.k-add b{background:#ffe9f4;color:#c43c86}
html[data-theme="lab"] .lh-cl li.k-fix b{background:#e8f1ff;color:#2f5fb5}
html[data-theme="lab"] .lh-cl p{margin:0;font-size:12.5px;color:var(--lh-sub)}

/* ===== 案内・デザイン切り替え・フッター ===== */
html[data-theme="lab"] .lh-tip{margin:12px 2px 0;padding:10px 14px;background:linear-gradient(120deg,#fff,#faf7ff);border:1px solid #e7e3f6;border-radius:16px;font-size:12.5px;line-height:1.7}
html[data-theme="lab"] .lh-tip[hidden]{display:none}
html[data-theme="lab"] .lh-tip a{color:#5544ec;font-weight:800;text-decoration:underline}
html[data-theme="lab"] .lh-switch{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;padding:14px 16px;font-size:12.5px;color:var(--lh-sub);line-height:1.6}
html[data-theme="lab"] .lh-switch img{width:44px;height:44px;flex-shrink:0;border-radius:50%;box-shadow:0 0 0 2px #fff,0 0 0 3px #e2dcff}
html[data-theme="lab"] .lh-switch p{flex:1 1 170px;margin:0}
html[data-theme="lab"] .lh-switch b{color:var(--lh-ink)}
html[data-theme="lab"] .lh-btn{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;
  border-radius:999px;border:1.5px solid #c9c0ff;font:inherit;font-size:13px;font-weight:800;cursor:pointer;background:#fff;color:#4f3fe0;
}
html[data-theme="lab"] .lh-foot{margin-top:26px;padding:18px 0 4px;font-size:11.5px;color:var(--lh-sub);text-align:center;line-height:1.8;border-top:1px dashed #d9d5f5}
html[data-theme="lab"] .lh-foot-brand{display:block;font-size:17px;font-weight:900;background:linear-gradient(90deg,#6a4cf0,#d45fb7);-webkit-background-clip:text;background-clip:text;color:transparent}
html[data-theme="lab"] .lh-foot-sub{display:block;margin-bottom:2px}
html[data-theme="lab"] .lh-foot nav{display:flex;flex-wrap:wrap;justify-content:center;gap:0 4px;margin-bottom:6px}
html[data-theme="lab"] .lh-foot nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;color:#5544ec;font-weight:700}

/* ===== 上部の細かい調整（スマホで崩れないように） ===== */
html[data-theme="lab"] .lh-tool-desc{letter-spacing:-.04em;word-break:keep-all}
html[data-theme="lab"] .lh-data-tile b,html[data-theme="lab"] .lh-data-tile small{white-space:nowrap;letter-spacing:-.05em}
html[data-theme="lab"] .lh-rest .lh-h{font-size:max(13px,calc(var(--u) * 24));white-space:nowrap;gap:5px}
html[data-theme="lab"] .lh-rest-links a{font-size:max(11px,calc(var(--u) * 18));letter-spacing:-.04em;word-break:keep-all}
html[data-theme="lab"] .lh-rest-links a svg{width:max(16px,calc(var(--u) * 26))}

@media (prefers-reduced-motion:reduce){
  html[data-theme="lab"] *{transition:none !important;animation:none !important;scroll-behavior:auto !important}
}
