/* AIB-DESIGN-SYSTEM v3 — プロデザイナー仕上げの共通デザイン+レイアウトパターン集(初期構築・修正後も維持) */
:root{
  /* ブランド */
  --brand:#3b5bdb; --brand-hover:#2f49b8; --brand-press:#27409f;
  --brand-soft:#eef2ff; --brand-soft-2:#e0e7ff; --brand-ink:#1e2a78;
  /* 面と境界 */
  --bg:#f6f8fc; --surface:#ffffff; --surface-2:#f9fafe; --surface-3:#f1f4fb;
  --line:#e6e9f2; --line-strong:#d4d9e8;
  /* テキスト階層 */
  --ink:#10172a; --text:#374151; --muted:#6b7280; --faint:#9aa3b2;
  /* セマンティック */
  --ok:#15803d; --ok-bg:#ecfdf3; --ok-line:#bbf7d0;
  --warn:#b45309; --warn-bg:#fffbeb; --warn-line:#fde68a;
  --err:#b91c1c; --err-bg:#fef2f2; --err-line:#fecaca;
  --info:#1e40af; --info-bg:#eff4ff; --info-line:#c7d6fe;
  /* 形状・影・余白 */
  --r-xs:6px; --r-sm:9px; --r:13px; --r-lg:18px; --r-pill:999px;
  --sh-xs:0 1px 2px rgba(16,23,42,.06);
  --sh-sm:0 1px 3px rgba(16,23,42,.07), 0 1px 2px rgba(16,23,42,.04);
  --sh:0 4px 14px rgba(16,23,42,.07), 0 2px 4px rgba(16,23,42,.04);
  --sh-lg:0 18px 44px rgba(16,23,42,.12), 0 6px 14px rgba(16,23,42,.06);
  --maxw:1120px; --ease:cubic-bezier(.4,0,.2,1);
  --font:"Inter","Noto Sans JP",-apple-system,BlinkMacSystemFont,"Hiragino Sans","Segoe UI",sans-serif;
}
*{box-sizing:border-box;}
*::selection{background:var(--brand-soft-2); color:var(--brand-ink);}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
html,body{margin:0;padding:0;overflow-x:hidden;max-width:100%;}
body{
  font-family:var(--font); background:var(--bg); color:var(--text);
  line-height:1.7; font-size:15.5px; letter-spacing:.005em;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,h5{color:var(--ink); line-height:1.25; margin:0 0 .55em; font-weight:700; letter-spacing:-.012em;}
h1{font-size:clamp(1.7rem,2.4vw,2.15rem);} h2{font-size:1.5rem; margin-top:.2em;} h3{font-size:1.2rem;} h4{font-size:1.02rem;}
p{margin:0 0 1em;} small{color:var(--muted);}
a{color:var(--brand); text-decoration:none; transition:color .15s var(--ease);}
a:hover{color:var(--brand-hover); text-decoration:underline; text-underline-offset:2px;}
img{max-width:100%; height:auto; display:block;}
hr{border:0; border-top:1px solid var(--line); margin:24px 0;}
code{background:var(--surface-3); padding:.12em .4em; border-radius:var(--r-xs); font-size:.88em; font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,monospace;}
:focus-visible{outline:2px solid var(--brand); outline-offset:2px; border-radius:4px;}
::-webkit-scrollbar{width:11px; height:11px;}
::-webkit-scrollbar-thumb{background:#cfd6e6; border-radius:8px; border:3px solid var(--bg);}
::-webkit-scrollbar-thumb:hover{background:#b9c2d8;}
.container{max-width:var(--maxw); margin:0 auto; padding:28px 22px;}
/* 取りこぼし対策: ラッパークラスを付け忘れても整って見えるように */
main{display:block;}
main:not(.container){max-width:var(--maxw); margin:0 auto; padding:28px 22px;}
section:not(.hero){margin:18px 0;}

/* ナビゲーション */
.navbar{background:rgba(255,255,255,.86); backdrop-filter:saturate(1.6) blur(10px);
  border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50;}
.navbar .nav-inner{max-width:var(--maxw); margin:0 auto; padding:14px 22px;
  display:flex; align-items:center; justify-content:space-between; gap:18px;}
.nav-brand{font-weight:800; font-size:1.12rem; color:var(--ink); letter-spacing:-.02em;
  display:flex; align-items:center; gap:9px;}
.nav-brand:hover{text-decoration:none; color:var(--ink);}
.nav-links{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.nav-links a{color:var(--muted); font-weight:600; font-size:.9rem; padding:7px 12px; border-radius:var(--r-sm);
  transition:background .15s var(--ease),color .15s var(--ease);}
.nav-links a:hover{color:var(--brand-ink); background:var(--brand-soft); text-decoration:none;}
/* ハンバーガーボタン(スマホ時のみ表示。PCでは非表示) */
.nav-toggle{display:none; flex-direction:column; justify-content:center; gap:5px;
  width:42px; height:38px; padding:8px 9px; background:transparent; border:1px solid var(--line-strong);
  border-radius:var(--r-sm); cursor:pointer; box-shadow:none;}
.nav-toggle:hover{background:var(--surface-3); transform:none;}
.nav-toggle span{display:block; width:100%; height:2px; background:var(--ink); border-radius:2px; transition:transform .2s var(--ease),opacity .2s var(--ease);}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0;}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ヒーロー(画面いっぱいのフルブリード) */
.hero{position:relative; overflow:hidden; color:#fff; border-radius:0;
  width:auto; max-width:none; margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw);
  margin-top:0; margin-bottom:36px;
  padding:clamp(56px,9vw,132px) clamp(20px,6vw,48px);
  min-height:clamp(340px,52vh,620px);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  box-shadow:none; background-color:var(--brand-press); background-size:cover; background-position:center;
  background-image:linear-gradient(180deg, rgba(12,18,42,.50), rgba(12,18,42,.66)),
    var(--hero-bg, radial-gradient(120% 140% at 0% 0%, #4c6ef5 0%, var(--brand) 45%, var(--brand-press) 100%));}
.hero > *{position:relative; z-index:1; max-width:var(--maxw); width:100%; margin-left:auto; margin-right:auto;}
.hero::after{content:""; position:absolute; inset:0; z-index:0;
  background:radial-gradient(70% 90% at 50% 0%, rgba(255,255,255,.16), transparent 62%); pointer-events:none;}
.hero h1{color:#fff; font-size:clamp(2.1rem,4.6vw,3.4rem); line-height:1.12; margin-bottom:.4em; letter-spacing:-.025em; text-shadow:0 2px 18px rgba(0,0,0,.28);}
.hero p{color:rgba(255,255,255,.96); font-size:clamp(1.02rem,1.6vw,1.28rem); line-height:1.85; max-width:64ch; margin:0 auto; text-shadow:0 1px 10px rgba(0,0,0,.22);}
.hero .btn{margin-top:26px;}

/* カード・グリッド */
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
  padding:24px; box-shadow:var(--sh-sm); margin-bottom:22px; transition:box-shadow .2s var(--ease),transform .2s var(--ease),border-color .2s var(--ease);}
a.card,.card-link{display:block; color:inherit;}
a.card:hover,.card-link:hover{text-decoration:none; box-shadow:var(--sh); transform:translateY(-2px); border-color:var(--line-strong);}
.card-title{font-size:1.08rem; font-weight:700; color:var(--ink); margin-bottom:.7em; letter-spacing:-.01em;}
.grid{display:grid; gap:22px;}
.grid.cols-2{grid-template-columns:repeat(2,1fr);}
.grid.cols-3{grid-template-columns:repeat(3,1fr);}
.grid.cols-4{grid-template-columns:repeat(4,1fr);}

/* ボタン */
.btn,button{display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 19px; background:var(--brand); color:#fff; border:1px solid transparent;
  border-radius:var(--r-sm); cursor:pointer; font:inherit; font-weight:650; line-height:1.1;
  text-decoration:none; letter-spacing:.01em; box-shadow:var(--sh-xs);
  transition:background .15s var(--ease),box-shadow .15s var(--ease),transform .06s var(--ease);}
.btn:hover,button:hover{background:var(--brand-hover); color:#fff; text-decoration:none; box-shadow:var(--sh-sm); transform:translateY(-1px);}
.btn:active,button:active{background:var(--brand-press); transform:translateY(0);}
.btn:disabled,button:disabled{opacity:.55; cursor:not-allowed; transform:none; box-shadow:none;}
.btn-secondary{background:var(--brand-soft); color:var(--brand-ink); border-color:var(--brand-soft-2);}
.btn-secondary:hover{background:var(--brand-soft-2); color:var(--brand-ink);}
.btn-ghost{background:var(--surface); color:var(--text); border-color:var(--line-strong);}
.btn-ghost:hover{background:var(--surface-3); color:var(--ink);}
.btn-danger{background:var(--err);} .btn-danger:hover{background:#a11616;}
.btn-success{background:var(--ok);} .btn-success:hover{background:#11652f;}
.btn-sm{padding:7px 13px; font-size:.85rem; border-radius:var(--r-xs);}
.btn-lg{padding:14px 26px; font-size:1.05rem;}
.btn-block{display:flex; width:100%;}

/* フォーム */
.form-group{margin-bottom:17px;}
label{display:block; font-weight:600; color:var(--ink); margin-bottom:7px; font-size:.9rem;}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],
input[type=date],input[type=search],input[type=url],input[type=time],select,textarea{
  width:100%; padding:11px 13px; border:1px solid var(--line-strong); border-radius:var(--r-sm);
  font:inherit; color:var(--ink); background:var(--surface); transition:border-color .15s var(--ease),box-shadow .15s var(--ease);}
input::placeholder,textarea::placeholder{color:var(--faint);}
input:hover,select:hover,textarea:hover{border-color:#b6bed2;}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3.5px var(--brand-soft);}
input:disabled,select:disabled,textarea:disabled{background:var(--surface-3); color:var(--muted);}
textarea{min-height:118px; resize:vertical;}
.form-hint{font-size:.82rem; color:var(--muted); margin-top:5px;}

/* 認証ページ */
.auth-wrap{min-height:calc(100vh - 64px); display:flex; align-items:center; justify-content:center; padding:34px 16px;
  background:radial-gradient(80% 60% at 50% -10%, var(--brand-soft), transparent 70%);}
.auth-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--sh-lg); padding:38px 34px; width:100%; max-width:430px;}
.auth-card h1{text-align:center; font-size:1.55rem; margin-bottom:1.1em;}
.auth-card .btn{width:100%; margin-top:4px;}
.auth-alt{text-align:center; margin-top:20px; font-size:.9rem; color:var(--muted);}

/* テーブル */
.table-wrap{overflow-x:auto; border-radius:var(--r); box-shadow:var(--sh-sm); border:1px solid var(--line);}
.table,table{width:100%; border-collapse:collapse; background:var(--surface); overflow:hidden;}
.table th,.table td,th,td{padding:13px 15px; text-align:left; border-bottom:1px solid var(--line); font-size:.93rem;}
.table th,th{background:var(--surface-3); font-weight:700; color:var(--ink); font-size:.82rem;
  text-transform:uppercase; letter-spacing:.04em;}
.table tbody tr,tbody tr{transition:background .12s var(--ease);}
.table tbody tr:hover,tbody tr:hover{background:var(--surface-2);}
.table tr:last-child td,tr:last-child td{border-bottom:0;}

/* アラート・バッジ */
.alert{padding:13px 16px 13px 16px; border-radius:var(--r-sm); margin:14px 0; border:1px solid transparent;
  border-left-width:4px; font-size:.92rem;}
.alert.success{background:var(--ok-bg); color:var(--ok); border-color:var(--ok-line); border-left-color:var(--ok);}
.alert.error{background:var(--err-bg); color:var(--err); border-color:var(--err-line); border-left-color:var(--err);}
.alert.warning{background:var(--warn-bg); color:var(--warn); border-color:var(--warn-line); border-left-color:var(--warn);}
.alert.info{background:var(--info-bg); color:var(--info); border-color:var(--info-line); border-left-color:var(--info);}
.badge{display:inline-flex; align-items:center; gap:5px; padding:3px 11px; border-radius:var(--r-pill);
  font-size:.76rem; font-weight:700; background:var(--brand-soft); color:var(--brand-ink); letter-spacing:.01em;}
.badge.ok{background:var(--ok-bg); color:var(--ok);} .badge.warn{background:var(--warn-bg); color:var(--warn);}
.badge.err{background:var(--err-bg); color:var(--err);}

/* ダッシュボード */
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:18px; margin-bottom:8px;}
.stat-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
  padding:22px; box-shadow:var(--sh-sm); position:relative; overflow:hidden;}
.stat-card::before{content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--brand); opacity:.9;}
.stat-card .stat-label{color:var(--muted); font-size:.85rem; font-weight:600;}
.stat-card .stat-value{font-size:2rem; font-weight:800; color:var(--ink); margin-top:5px; letter-spacing:-.02em;}

/* 空状態・フッター・ユーティリティ */
.empty-state{text-align:center; color:var(--muted); padding:48px 20px;}
.site-footer{text-align:center; color:var(--muted); font-size:.85rem; padding:30px 16px; border-top:1px solid var(--line); margin-top:36px;}
.text-center{text-align:center;} .text-muted{color:var(--muted);} .text-right{text-align:right;}
.mt-0{margin-top:0;} .mb-0{margin-bottom:0;} .mt-1{margin-top:8px;} .mb-1{margin-bottom:8px;}
.mt-2{margin-top:18px;} .mb-2{margin-bottom:18px;} .mt-3{margin-top:28px;}
.flex{display:flex; gap:12px; align-items:center;} .flex-between{justify-content:space-between;}
.flex-wrap{flex-wrap:wrap;} .gap-sm{gap:8px;}

/* ===== レイアウトパターン集(v3)— トップページや特集を多彩に組むための共通部品 ===== */
/* 小さなオーバーラインラベル(セクション見出しの上に置く) */
.eyebrow{display:inline-block; font-size:.78rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase;
  color:var(--brand); margin-bottom:8px;}
.lead{font-size:1.08rem; line-height:1.9; color:var(--text); max-width:70ch;}

/* 全幅バンド(淡色/濃色)。重要メッセージ・特徴を帯で強調 */
/* 注意: left:50%+負マージン方式はAI CSSの margin 上書きで右ズレ事故を起こすため使用禁止。
   margin計算のみの方式なら、上書きされても「親幅の帯」に安全に退化する */
.section-band{width:auto; margin:44px calc(50% - 50vw); padding:clamp(36px,6vw,72px) clamp(20px,6vw,48px);
  background:var(--brand-soft);}
.section-band > .band-inner, .section-band > .container{max-width:var(--maxw); margin:0 auto; padding:0;}
.section-band.dark{background:var(--brand-press); color:rgba(255,255,255,.92);}
.section-band.dark h1,.section-band.dark h2,.section-band.dark h3{color:#fff;}
.section-band.dark .eyebrow{color:rgba(255,255,255,.75);}
.section-band.dark .card{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); color:rgba(255,255,255,.92); box-shadow:none;}
.section-band.dark .card-title{color:#fff;}

/* 画像×テキストの左右分割(交互に .reverse でジグザグ) */
.split{display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:center; margin:40px 0;}
.split.reverse > .split-media{order:2;}
.split .split-media img{width:100%; border-radius:var(--r-lg); box-shadow:var(--sh);}
.split .split-media .media-ph{aspect-ratio:4/3; border-radius:var(--r-lg);
  background:linear-gradient(135deg,var(--brand-soft),var(--brand-soft-2)); display:flex; align-items:center; justify-content:center;
  color:var(--brand-ink); font-size:2.2rem;}

/* 横スクロール(スナップ)カード列 */
.hscroll{display:flex; gap:18px; overflow-x:auto; padding:6px 4px 18px; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;}
.hscroll > *{flex:0 0 min(280px,78vw); scroll-snap-align:start; margin-bottom:0;}
.hscroll::-webkit-scrollbar{height:8px;}

/* 大きな番号付き特徴(01/02/03…) */
.feature-num{display:grid; grid-template-columns:repeat(3,1fr); gap:26px; counter-reset:featnum; margin:28px 0;}
.feature-num > div{counter-increment:featnum; position:relative; padding-top:14px;}
.feature-num > div::before{content:counter(featnum,decimal-leading-zero); display:block;
  font-size:2.4rem; font-weight:800; line-height:1; letter-spacing:-.02em; color:var(--brand-soft-2); margin-bottom:10px;}
.feature-num h3{margin-bottom:.4em;}

/* 利用の流れ(ステップ) */
.steps{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; counter-reset:stepnum; margin:28px 0;}
.steps > div{counter-increment:stepnum; background:var(--surface); border:1px solid var(--line); border-radius:var(--r);
  padding:20px 18px; position:relative;}
.steps > div::before{content:counter(stepnum); display:flex; align-items:center; justify-content:center; position:static;
  width:30px; height:30px; border-radius:50%; background:var(--brand); color:#fff; font-weight:800; font-size:.9rem; margin-bottom:10px;}
.steps > div:not(:last-child)::after{content:"→"; position:absolute; right:-14px; top:50%; transform:translateY(-50%);
  color:var(--faint); font-weight:700; z-index:1;}

/* 実績・数値の帯 */
.kpi-strip{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:18px; text-align:center;
  padding:26px 18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); margin:34px 0;}
.kpi-strip .kpi-value{font-size:clamp(1.8rem,3.4vw,2.6rem); font-weight:800; color:var(--brand); letter-spacing:-.02em; line-height:1.1;}
.kpi-strip .kpi-label{color:var(--muted); font-size:.88rem; font-weight:600; margin-top:6px;}

/* よくある質問(開閉式) */
.faq-item{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); margin-bottom:12px; overflow:hidden;}
.faq-item summary{cursor:pointer; list-style:none; padding:16px 20px; font-weight:700; color:var(--ink);
  display:flex; justify-content:space-between; align-items:center; gap:12px;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:"+"; font-size:1.3rem; color:var(--brand); font-weight:700; transition:transform .18s var(--ease);}
.faq-item[open] summary::after{transform:rotate(45deg);}
.faq-item .faq-body{padding:0 20px 18px; color:var(--text);}

/* お客様の声・引用 */
.quote{background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--accent, var(--brand));
  border-radius:var(--r); padding:22px 24px; margin:18px 0; box-shadow:var(--sh-sm);}
.quote p{font-style:normal; margin-bottom:.6em;}
.quote .quote-by{color:var(--muted); font-size:.86rem; font-weight:600;}

/* 行動喚起の帯(登録・予約・問い合わせ) */
.cta-band{width:auto; margin:48px calc(50% - 50vw) 0;
  padding:clamp(40px,6vw,72px) clamp(20px,6vw,48px); text-align:center;
  background:linear-gradient(120deg,var(--brand),var(--brand-press)); color:#fff;}
.cta-band > *{max-width:min(var(--maxw),60ch); margin-left:auto; margin-right:auto;}
.cta-band h2{color:#fff; margin-bottom:.4em;}
.cta-band p{color:rgba(255,255,255,.92); max-width:60ch; margin:0 auto 1.2em;}
.cta-band .btn{background:#fff; color:var(--brand-ink); font-weight:800;}
.cta-band .btn:hover{background:rgba(255,255,255,.9); color:var(--brand-ink);}

/* 画像トップのカード */
.card > .card-img, .card > a > .card-img{width:calc(100% + 48px); margin:-24px -24px 16px; border-radius:var(--r) var(--r) 0 0;
  aspect-ratio:16/9; object-fit:cover;}

@media (max-width:820px){
  .split{grid-template-columns:1fr;}
  .split.reverse > .split-media{order:0;}
  .feature-num{grid-template-columns:1fr;}
  .steps > div:not(:last-child)::after{content:"";}
}

@media (max-width:820px){
  .grid.cols-2,.grid.cols-3,.grid.cols-4{grid-template-columns:1fr;}
  .nav-inner{flex-wrap:wrap; gap:10px;}
  .container{padding:22px 16px;}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none !important; transition:none !important; scroll-behavior:auto !important;}
}

/* ===== AIB-THEME v2 (project #168 / dir:auto / layout:center / nav:pill / card:tint / deco:dot) ===== */
:root{
  --brand:#e8590c; --brand-hover:#d0500a; --brand-press:#b94709;
  --brand-soft:#fbe7dc; --brand-soft-2:#f9d7c4; --brand-ink:#7f3006;
  --accent:#1098ad; --accent-ink:#095b67;
  --bg:#fff8f4; --surface:#ffffff; --surface-2:#fbfbfb; --surface-3:#f7f7f7;
  --line:#ffe3d3; --line-strong:#ead0c2;
  --ink:#3a1d10; --text:#5a3a2a; --muted:#977865; --faint:#b1998b;
  --r-xs:7px; --r-sm:10px; --r:14px; --r-lg:20px;
  --sh-xs:0 1px 2px rgba(16,23,42,.10); --sh-sm:0 1px 3px rgba(16,23,42,.10); --sh:0 6px 18px rgba(16,23,42,.10); --sh-lg:0 22px 50px rgba(16,23,42,.14);
  --font:"Yu Gothic","YuGothic","Hiragino Kaku Gothic ProN","Noto Sans JP",system-ui,sans-serif;
}
h1,h2,h3,h4,h5{font-family:"Yu Gothic","YuGothic","Hiragino Kaku Gothic ProN","Noto Sans JP",system-ui,sans-serif; letter-spacing:.04em; text-transform:uppercase;}
*::selection{background:#f9d7c4; color:#7f3006;}
.badge,.tag,.chip{background:rgba(16,152,173,0.120); color:var(--accent-ink); border-color:rgba(16,152,173,0.350);}
.btn-accent{background:var(--accent); color:#fff;}
.eyebrow{color:var(--accent-ink);}
.hero{background:linear-gradient(135deg,#d5510b 0%,#1098ad 120%); color:#fff;}
.hero h1,.hero h2,.hero p{color:#fff;}
/* nav: pill */
@media (min-width:821px){
  .navbar .nav-links{background:var(--surface-3); border:1px solid var(--line); border-radius:999px; padding:4px 6px; gap:2px;}
  .navbar .nav-links a{border-radius:999px; padding:7px 14px;}
  .navbar .nav-links a:hover{background:var(--brand); color:#fff;}
}
/* card: tint(淡色ベタ) */
.card{background:#fdf5f0; border-color:transparent; box-shadow:none;}
a.card:hover,.card-link:hover{background:var(--surface); border-color:var(--line-strong); box-shadow:var(--sh-sm);}
/* deco: dot */
.container h2::before, main h2::before{content:''; display:inline-block; width:.5em; height:.5em; border-radius:50%; background:var(--accent); margin-right:.45em; vertical-align:.08em;}


/* ===== project-specific styles (AI generated) ===== */
@charset "UTF-8";

:root {
    color-scheme: light;
    --brand: #123d9e;
    --accent: #64ffda;
    --ink: #11223c;
    --muted: #4d6078;
    --surface: #ffffff;
    --surface-alt: #eef4fa;
    --bg: #f5f8fc;
    --navy: #081427;
    --panel: #10243d;
    --electric: #2364ed;
    --line: #d2dfed;
    --r-sm: 0.65rem;
    --r: 1rem;
    --r-lg: 1.5rem;
    --r-pill: 999px;
    --sh: 0 18px 60px rgb(8 20 39 / 9%);
    --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 1.5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--accent);
    color: var(--navy);
}

a {
    color: var(--brand);
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 4px;
}

h1,
h2,
h3,
h4,
p,
figure,
dl {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.4;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(2.25rem, 6.5vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.65rem, 3.6vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

h3 {
    margin-bottom: 0.85rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

h4 {
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
}

p {
    margin-bottom: 1.1rem;
}

img,
svg {
    max-width: 100%;
}

img {
    display: block;
    height: auto;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    max-width: 100%;
    margin-bottom: 0.9rem;
    padding: 0;
    font-weight: 800;
}

.container {
    width: min(100% - 3rem, 1180px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    z-index: 20;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.8rem 1.2rem;
    transform: translateY(-180%);
    border-radius: var(--r-sm);
    background: var(--navy);
    color: #ffffff;
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 3px solid var(--accent);
}

.navbar {
    padding: 1.15rem 0;
    background: var(--surface);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    width: min(100% - 3rem, 1180px);
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.nav-brand {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.65rem;
    color: var(--navy);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-decoration: none;
    white-space: nowrap;
}

.nav-brand::before {
    content: "";
    width: 0.8rem;
    height: 0.8rem;
    flex: 0 0 auto;
    border: 2px solid var(--brand);
    border-radius: 0.2rem;
    background: var(--accent);
    box-shadow: 4px -4px 0 var(--electric);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.3rem;
    border-radius: var(--r-pill);
    background: var(--surface-alt);
}

.nav-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.05rem;
    border-radius: var(--r-pill);
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    background: var(--navy);
    color: #ffffff;
}

.hero {
    padding: clamp(3.5rem, 8vw, 7rem) 0;
    background-color: var(--navy);
    background-image:
        linear-gradient(100deg, rgb(8 20 39 / 95%), rgb(8 20 39 / 82%) 50%, rgb(8 20 39 / 90%)),
        url("../img/hero.png");
    background-position: center;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    border-bottom: 3px solid var(--accent);
}

.hero .container {
    max-width: 900px;
}

.hero h1 {
    margin-bottom: 1.4rem;
    color: #ffffff;
    text-shadow: 0 4px 30px rgb(8 20 39 / 60%);
}

.hero p {
    max-width: 42rem;
    margin-inline: auto;
    margin-bottom: 2rem;
    color: #e0eafa;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 2;
}

.eyebrow {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1.6;
}

.hero .eyebrow,
.cta-band .eyebrow,
.section-band.dark .eyebrow {
    color: var(--accent);
}

.lead {
    max-width: 53rem;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.95;
}

main > .container > section {
    padding-block: clamp(2.75rem, 5vw, 4.5rem);
}

main > .container > section + section {
    border-top: 1px solid var(--line);
}

main > .container > .alert {
    margin-top: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid > *,
.split > *,
.nav-inner > *,
.game-panel-header > * {
    min-width: 0;
}

.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    min-width: 0;
    padding: clamp(1.2rem, 2.8vw, 2rem);
    border: 0;
    border-radius: var(--r-lg);
    background: var(--surface-alt);
    color: var(--ink);
    box-shadow: none;
}

.card > :last-child {
    margin-bottom: 0;
}

.card p {
    color: var(--muted);
    font-size: 0.93rem;
}

.card-title {
    margin-top: 0.85rem;
    margin-bottom: 1rem;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.5;
}

.card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 1.35rem;
    border-radius: var(--r);
    object-fit: cover;
}

.btn {
    display: inline-flex;
    min-width: 44px;
    min-height: 48px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: var(--brand);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn:hover:not(:disabled) {
    background: var(--navy);
    color: #ffffff;
    box-shadow: 0 6px 20px rgb(18 61 158 / 15%);
    text-decoration: none;
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-secondary {
    border-color: var(--brand);
    background: transparent;
    color: var(--brand);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--brand);
    color: #ffffff;
}

.btn-ghost {
    border-color: var(--line);
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--brand);
    background: var(--surface);
    color: var(--brand);
}

.btn-lg {
    min-height: 56px;
    padding: 0.95rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #a52b3d;
    color: #ffffff;
}

.btn-success {
    background: #126148;
    color: #ffffff;
}

.btn:disabled,
fieldset:disabled .btn {
    border-color: #c0ccdb;
    background: #e0e7f0;
    color: #53657b;
    box-shadow: none;
    transform: none;
}

.hero .btn-secondary,
.cta-band .btn-secondary,
.section-band.dark .btn-secondary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--navy);
}

.hero .btn-secondary:hover,
.cta-band .btn-secondary:hover,
.section-band.dark .btn-secondary:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--navy);
    box-shadow: 0 0 28px rgb(100 255 218 / 22%);
}

.hero :focus-visible,
.cta-band :focus-visible,
.section-band.dark :focus-visible {
    outline-color: var(--accent);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
}

input:not([type="hidden"]),
select,
textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    border: 1px solid #8b9db3;
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.5;
}

select {
    padding-right: 2rem;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #e0e7f0;
    color: #53657b;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
    border: 2px solid #a52b3d;
}

.form-hint,
.card .form-hint {
    margin-top: 0.6rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.85;
}

.alert {
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    line-height: 1.85;
}

.alert p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: inherit;
    font-size: inherit;
}

.alert.info {
    border-color: #afc9f2;
    background: #e8f0ff;
    color: #153c75;
}

.alert.success {
    border-color: #91d9c2;
    background: #e0f8ee;
    color: #15533e;
}

.alert.error {
    border-color: #e7b2bb;
    background: #fff0f3;
    color: #842437;
}

.alert.warning {
    border-color: #dec27d;
    background: #fff6dd;
    color: #674b0c;
}

.badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: var(--r-pill);
    background: #dce8fc;
    color: #143c7b;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.5;
}

.badge.ok {
    background: #d4f5e9;
    color: #15533e;
}

.badge.warn {
    background: #fff0c8;
    color: #674b0c;
}

.badge.err {
    background: #ffe1e7;
    color: #842437;
}

#game .grid.cols-2 {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: start;
    gap: 1.75rem;
}

.game-panel {
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid #37526f;
    background:
        radial-gradient(ellipse at top left, rgb(100 255 218 / 9%), transparent 55%),
        linear-gradient(150deg, #142b47, var(--navy));
    color: #ffffff;
    box-shadow: 0 20px 55px rgb(8 20 39 / 18%), inset 0 1px 0 rgb(255 255 255 / 12%);
}

.game-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.game-panel-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 0.08em;
}

.game-panel-header .badge {
    background: #193e49;
    color: var(--accent);
}

.game-panel .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.3rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    min-width: 0;
    padding: 1rem;
    border-radius: var(--r);
    background: var(--surface);
    color: var(--ink);
}

.stat-label {
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.stat-value {
    font-size: clamp(1.1rem, 2.3vw, 1.7rem);
    font-weight: 800;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

.game-panel .stat-card {
    padding: 0.85rem 1rem;
    border: 1px solid #304a65;
    background: rgb(8 20 39 / 65%);
    color: #ffffff;
}

.game-panel .stat-label {
    color: #b7c9de;
}

#elapsed-time {
    white-space: nowrap;
}

.game-panel .form-hint,
.game-panel p {
    color: #c1d1e4;
}

.game-panel .alert.info,
.game-panel .alert.info p {
    color: #153c75;
}

.game-panel :focus-visible {
    outline-color: var(--accent);
}

.game-board {
    display: grid;
    width: min(100%, 390px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.5vw, 0.9rem);
    margin: 1.5rem auto;
    padding: clamp(0.6rem, 2vw, 1rem);
    border: 1px solid #36526e;
    border-radius: var(--r-lg);
    background: rgb(3 12 25 / 70%);
    box-shadow: inset 0 2px 20px rgb(0 0 0 / 24%), 0 0 45px rgb(35 100 237 / 10%);
}

.cell {
    display: flex;
    min-width: 44px;
    min-height: 64px;
    aspect-ratio: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.5rem 0.2rem;
    border: 2px solid #4c6685;
    border-radius: var(--r);
    background: linear-gradient(145deg, #1b324e, #102139);
    color: #d5e2f2;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
    -webkit-tap-highlight-color: transparent;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.cell-light {
    display: block;
    width: clamp(0.85rem, 2.4vw, 1.45rem);
    height: clamp(0.85rem, 2.4vw, 1.45rem);
    flex: 0 0 auto;
    border: 2px solid #9db2cc;
    border-radius: 50%;
    background: transparent;
}

.cell-state {
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.06em;
}

.cell[aria-pressed="true"],
.cell.is-on,
.cell.on {
    border-color: var(--accent);
    background: linear-gradient(145deg, #89ffe4, #51dfc4);
    color: var(--navy);
    box-shadow: 0 0 18px rgb(100 255 218 / 24%), inset 0 1px 0 rgb(255 255 255 / 70%);
}

.cell[aria-pressed="true"] .cell-light,
.cell.is-on .cell-light,
.cell.on .cell-light {
    border-color: var(--navy);
    background: var(--navy);
    box-shadow: 0 0 0 4px rgb(8 20 39 / 9%);
}

.cell.is-hint,
.cell.hint,
.cell[data-hint="true"] {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    border-style: dashed;
    box-shadow: 0 0 0 6px var(--electric), 0 0 24px rgb(35 100 237 / 55%);
}

.cell.is-hint .cell-state::before,
.cell.hint .cell-state::before,
.cell[data-hint="true"] .cell-state::before {
    content: "↓ ";
}

.cell:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
    box-shadow: 0 0 0 7px var(--electric);
}

.cell:active:not(:disabled) {
    transform: scale(0.96);
}

.cell:disabled {
    cursor: default;
    opacity: 1;
}

.game-board[aria-busy="true"] .cell {
    cursor: wait;
}

.game-status,
.game-panel .game-status {
    min-height: 3.3em;
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

#hint-message {
    min-height: 1.85em;
    color: var(--accent);
    text-align: center;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.game-actions .btn {
    flex: 1 1 10rem;
}

.game-panel .btn-secondary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--navy);
}

.game-panel .btn-secondary:hover:not(:disabled) {
    background: #ffffff;
    color: var(--navy);
}

.game-panel .btn-ghost {
    border-color: #6c86a5;
    color: #ffffff;
}

.game-panel .btn-ghost:hover:not(:disabled) {
    border-color: #ffffff;
    background: #213b59;
    color: #ffffff;
}

.game-panel .btn:disabled {
    border-color: #425971;
    background: #20354e;
    color: #b2c3d7;
    box-shadow: none;
}

.game-sidebar {
    display: grid;
    min-width: 0;
    gap: 1.25rem;
}

.game-sidebar .card {
    background: #eaf0f8;
}

.game-sidebar .btn-block + .form-hint {
    margin-top: 1rem;
}

#clear-panel {
    border: 1px solid #a5dbc9;
    background: #e4f8f0;
}

#clear-title {
    color: #15533e;
}

#clear-summary {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

#score-form {
    margin-top: 1.5rem;
}

#submit-status:not(:empty) {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.9rem;
}

.personal-best {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.personal-best dt {
    font-weight: 800;
}

.personal-best dd {
    margin: 0;
    color: var(--muted);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
}

.split.reverse .split-media {
    order: 2;
}

.split-media {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--r-lg);
}

.split-media img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    counter-reset: steps;
}

.steps > div {
    position: relative;
    min-width: 0;
    padding-top: 3.6rem;
    counter-increment: steps;
}

.steps > div::before {
    content: counter(steps, decimal-leading-zero);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.steps > div:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 0.35rem;
    right: 0;
    color: var(--brand);
    font-size: 1.4rem;
}

.steps p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

#ranking .card {
    background: var(--surface);
}

#ranking .form-group {
    max-width: 21rem;
}

#ranking-status {
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.table-wrap {
    max-width: 100%;
    margin-block: 1.25rem;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overscroll-behavior-inline: contain;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink);
    text-align: left;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.table caption {
    padding: 1rem;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 0.8rem;
    text-align: left;
}

.table th,
.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table th {
    background: var(--surface-alt);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.table td:nth-child(2) {
    min-width: 7rem;
    max-width: 14rem;
    overflow-wrap: anywhere;
}

.table td:not(:nth-child(2)) {
    white-space: nowrap;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:first-child {
    background: #eafaf4;
    color: var(--ink);
}

.table tbody tr:first-child td:first-child {
    color: #15533e;
    font-weight: 900;
}

.empty-state {
    margin-block: 1.25rem;
    padding: clamp(1.3rem, 4vw, 2.5rem);
    border: 1px dashed #9caec4;
    border-radius: var(--r);
    background: var(--surface-alt);
    color: var(--ink);
    text-align: center;
}

.empty-state h3 {
    font-size: 1.1rem;
}

.empty-state p {
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: 0;
}

.faq-item {
    margin-bottom: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--ink);
}

.faq-item summary {
    min-height: 52px;
    padding: 1rem 1.25rem;
    border-radius: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}

.faq-item summary::marker {
    color: var(--brand);
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--line);
}

.faq-body {
    padding: 1.2rem 1.25rem;
    color: var(--muted);
    font-size: 0.93rem;
}

.faq-body > :last-child {
    margin-bottom: 0;
}

.cta-band {
    padding: 3rem 1.5rem;
    border: 1px solid #294a70;
    border-radius: var(--r-lg);
    background:
        radial-gradient(ellipse at bottom right, rgb(100 255 218 / 12%), transparent 60%),
        var(--navy);
    color: #ffffff;
    text-align: center;
}

.cta-band h2 {
    color: #ffffff;
}

.cta-band p {
    max-width: 43rem;
    margin-inline: auto;
    margin-bottom: 1.75rem;
    color: #d5e2f2;
}

.section-band {
    padding-block: 3.5rem;
    background: var(--surface-alt);
    color: var(--ink);
}

.band-inner {
    width: min(100% - 3rem, 1180px);
    margin-inline: auto;
}

.section-band.dark {
    background: var(--navy);
    color: #ffffff;
}

.section-band.dark .lead {
    color: #d5e2f2;
}

.section-band.dark .card {
    background: var(--surface);
    color: var(--ink);
}

.section-band.dark .card p {
    color: var(--muted);
}

.site-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
}

.site-footer strong {
    color: var(--ink);
    letter-spacing: 0.08em;
}

.site-footer p {
    margin-bottom: 0.65rem;
}

.site-footer a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    font-weight: 700;
}

@media (hover: hover) {
    .cell:hover:not(:disabled) {
        border-color: #ffffff;
        transform: translateY(-2px);
    }

    .cell[aria-pressed="true"]:hover:not(:disabled),
    .cell.is-on:hover:not(:disabled),
    .cell.on:hover:not(:disabled) {
        box-shadow: 0 0 26px rgb(100 255 218 / 38%);
    }
}

@media (min-width: 1100px) {
    .game-panel .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .game-panel .stat-card {
        padding: 0.85rem 0.55rem;
    }

    .game-panel .stat-value {
        font-size: 1.15rem;
    }

    .game-panel .stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 900px) {
    .cols-3,
    .cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #game .grid.cols-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .game-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    #clear-panel {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .game-panel .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .game-panel .stat-value {
        font-size: 1.3rem;
    }

    .split {
        gap: 1.75rem;
    }
}

@media (max-width: 640px) {
    .container,
    .nav-inner,
    .band-inner {
        width: calc(100% - 2rem);
    }

    .navbar {
        padding-block: 0.75rem;
    }

    .nav-inner {
        flex-direction: column;
        gap: 0.6rem;
    }

    .nav-brand {
        font-size: 1.05rem;
    }

    .nav-links {
        width: 100%;
        gap: 0;
    }

    .nav-links a {
        flex: 1 1 auto;
        padding-inline: 0.55rem;
        font-size: 0.76rem;
    }

    .hero h1 {
        font-size: clamp(2.1rem, 10vw, 3.5rem);
    }

    .hero p {
        font-size: 0.88rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .cols-2,
    .cols-3,
    .cols-4,
    .split,
    .steps,
    .game-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .split.reverse .split-media {
        order: 0;
    }

    .split-media img {
        aspect-ratio: 16 / 10;
    }

    .steps {
        gap: 1.75rem;
        margin-top: 2rem;
    }

    .steps > div {
        padding-top: 0;
        padding-left: 3.7rem;
    }

    .steps > div:not(:last-child)::after {
        content: "↓";
        top: auto;
        right: auto;
        bottom: -1.5rem;
        left: 0.8rem;
        font-size: 1rem;
    }

    .game-panel .stat-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-panel .stat-card {
        padding: 0.75rem;
    }

    .game-panel .stat-value {
        font-size: 1.25rem;
    }

    .card {
        border-radius: var(--r);
    }

    #clear-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.65rem;
    }

    .table {
        font-size: 0.82rem;
    }

    .table caption {
        padding: 0.85rem 0.65rem;
    }

    .faq-item summary,
    .faq-body {
        padding: 1rem;
    }

    .personal-best {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        gap: 0.65rem;
    }
}

@media (max-width: 360px) {
    .container,
    .nav-inner,
    .band-inner {
        width: calc(100% - 1.5rem);
    }

    .game-panel {
        padding: 0.85rem;
    }

    .game-board {
        gap: 0.45rem;
        padding: 0.55rem;
        border-radius: var(--r);
    }

    .cell {
        gap: 0.4rem;
        border-radius: var(--r-sm);
    }

    .cell-state {
        font-size: 0.68rem;
        letter-spacing: 0;
    }

    .game-panel .stat-label {
        font-size: 0.69rem;
    }

    .game-panel .stat-value {
        font-size: 1.1rem;
    }

    .game-actions .btn {
        flex-basis: 100%;
    }

    .nav-links a {
        padding-inline: 0.35rem;
        font-size: 0.72rem;
    }

    .btn-lg {
        padding-inline: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .cell:active:not(:disabled),
    .cell:hover:not(:disabled),
    .btn:active:not(:disabled) {
        transform: none;
    }
}

@media (forced-colors: active) {
    .cell,
    .game-panel,
    .game-board,
    .stat-card,
    .btn,
    .badge {
        border: 2px solid ButtonText;
        box-shadow: none;
    }

    .cell[aria-pressed="true"],
    .cell.is-on,
    .cell.on {
        border: 4px solid Highlight;
    }

    .cell[aria-pressed="true"] .cell-light,
    .cell.is-on .cell-light,
    .cell.on .cell-light {
        background: Highlight;
        forced-color-adjust: none;
    }

    .cell.is-hint,
    .cell.hint,
    .cell[data-hint="true"] {
        outline: 3px dashed Highlight;
    }

    :focus-visible {
        outline-color: Highlight;
    }
}

/* ===== AIB-HARD-OVERRIDE v2 — AI生成CSSより後に置き、最終的なレイアウトを保証 ===== */
html,body{overflow-x:hidden !important;}

/* 帯パターンの右ズレ・文字切れ防止(AI CSSが margin/position を上書きしても崩れないよう強制) */
.section-band,.cta-band{position:static !important; left:auto !important; right:auto !important;
  width:auto !important; min-width:0 !important; max-width:none !important;
  margin-left:calc(50% - 50vw) !important; margin-right:calc(50% - 50vw) !important;
  box-sizing:border-box !important;}
/* カードや分割レイアウトの中に入れられた場合は全幅化せずパネルとして表示 */
.card .section-band,.split .section-band,.grid .section-band,.hero .section-band,
.card .cta-band,.split .cta-band,.grid .cta-band,.hero .cta-band{
  margin-left:0 !important; margin-right:0 !important; border-radius:14px !important;}

/* 長い単語・URLでの横はみ出し防止 / グリッド子要素の膨張防止 */
h1,h2,h3,h4,h5,h6,p,li,dd,dt,td,th{overflow-wrap:break-word;}
.grid > *,.split > *,.steps > *,.kpi-strip > *,.feature-num > *,.hscroll > *{min-width:0 !important;}

/* ヘッダー固定(常に画面上部) */
.navbar{position:sticky !important; top:0 !important; z-index:1000 !important;}
.nav-inner{position:relative;}

/* スマホ: ハンバーガーメニュー */
@media (max-width:820px){
  .nav-toggle{display:inline-flex !important;}
  .nav-inner{flex-wrap:nowrap !important; gap:10px !important;}
  .navbar .nav-links{
    display:none !important; position:absolute !important; top:100% !important; left:0 !important; right:0 !important;
    flex-direction:column !important; align-items:stretch !important; gap:0 !important;
    background:#fff !important; border-top:1px solid var(--line) !important; border-bottom:1px solid var(--line) !important;
    box-shadow:0 14px 30px rgba(16,23,42,.14) !important; padding:6px 0 !important; margin:0 !important;
  }
  .navbar .nav-links.open{ display:flex !important; }
  .navbar .nav-links a{ padding:13px 22px !important; border-radius:0 !important; font-size:1rem !important; width:100% !important; }
}
@media (min-width:821px){ .nav-toggle{display:none !important;} }
/* --- hero override (layout: center) --- */
.hero, section.hero, .hero-section, .lp-hero, .hero-banner, section[class*="hero"], header[class*="hero"]{ position:relative !important; box-sizing:border-box !important; overflow:hidden !important; background-size:cover !important; background-position:center !important; background-repeat:no-repeat !important; }
.hero > *, section[class*="hero"] > *, .hero-section > *, .lp-hero > *{ position:relative !important; z-index:2 !important; float:none !important; }
.hero img, section[class*="hero"] img, .hero-section img, .lp-hero img{ display:none !important; }
.hero > div, section[class*="hero"] > div, .hero .container{ display:block !important; }
.hero, section.hero, .hero-section, .lp-hero, .hero-banner, section[class*="hero"], header[class*="hero"]{ width:auto !important; max-width:none !important; min-width:0 !important; left:auto !important; right:auto !important; margin-left:calc(50% - 50vw) !important; margin-right:calc(50% - 50vw) !important; margin-top:0 !important; border-radius:0 !important; box-sizing:border-box !important; display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; text-align:center !important; min-height:clamp(340px,52vh,600px) !important; padding:clamp(56px,9vw,120px) clamp(20px,6vw,48px) !important; color:#fff !important; background-color:var(--brand-press) !important; background-image:var(--hero-bg, radial-gradient(120% 140% at 0% 0%, #ec7637 0%, var(--brand) 45%, var(--brand-press) 100%)) !important; }
.hero::before, section[class*="hero"]::before, .hero-section::before, .lp-hero::before{ content:"" !important; position:absolute !important; inset:0 !important; z-index:1 !important; pointer-events:none !important; background:linear-gradient(180deg, rgba(8,12,30,.42), rgba(8,12,30,.60)) !important; }
.hero > *, section[class*="hero"] > *, .hero-section > *, .lp-hero > *{ width:100% !important; max-width:var(--maxw) !important; margin-left:auto !important; margin-right:auto !important; }
.hero h1,.hero h2,.hero h3,.hero p,.hero span,.hero li,section[class*="hero"] h1, section[class*="hero"] h2, section[class*="hero"] h3, section[class*="hero"] p{ color:#fff !important; }
.hero .btn-secondary{ background:rgba(255,255,255,.16) !important; color:#fff !important; border-color:rgba(255,255,255,.5) !important; }


/* AIB-HERO-IMAGE v3: existing generated content */
:root { --hero-bg: url('../img/hero.png'); }
