/* ===========================================================
   モギセン — 下層ページ共通スタイル (base)
   LPと同じデザイントークン／ボタン／ヘッダー／フッターを共有
   =========================================================== */
:root{
  --teal:#009ca2;
  --teal-dark:#007a7f;
  --teal-tint:#e0f5f6;
  --teal-tint-2:#eef9fa;
  --ink:#1a1a18;
  --ink-60:rgba(26,26,24,.72);
  --ink-80:rgba(26,26,24,.86);
  --ink-45:rgba(26,26,24,.45);
  --bg:#ffffff;
  --bg-alt:#fffdf8;
  --bg-warm:#fffdf7;
  --card:#ffffff;
  --card-surface:linear-gradient(165deg,#ffffff 0%,#f6fbfb 100%);
  --gold:#c8a84b;
  --red:#a32d2d;
  --line:rgba(26,26,24,.10);
  --line-teal:rgba(0,156,162,.16);
  --shadow-sm:0 1px 2px rgba(20,60,62,.05), 0 6px 18px rgba(20,60,62,.07);
  --shadow-md:0 8px 20px rgba(20,60,62,.09), 0 22px 50px rgba(20,60,62,.10);
  --shadow-teal:0 8px 22px rgba(0,156,162,.28);
  --radius:14px;
  --radius-lg:22px;
  --maxw:1180px;
  --header-h:72px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:"Noto Sans JP",system-ui,sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.85;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  font-feature-settings:"palt" 1;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
.wrap{width:100%;max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(20px,5vw,40px)}
:where(h1,h2,h3){line-height:1.28;font-weight:900;letter-spacing:.01em}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5em;
  font-family:inherit;font-weight:700;font-size:1rem;line-height:1;
  padding:1.05em 1.9em;border-radius:12px;border:1.5px solid transparent;
  cursor:pointer;transition:transform .18s ease,background .2s ease,box-shadow .2s ease,border-color .2s ease;
  white-space:nowrap;letter-spacing:.02em;
}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--teal);color:#fff;box-shadow:var(--shadow-teal)}
.btn-primary:hover{background:var(--teal-dark);box-shadow:0 10px 26px rgba(0,122,127,.34)}
.btn-outline{background:transparent;color:var(--teal-dark);border-color:rgba(0,156,162,.45)}
.btn-outline:hover{background:var(--teal-tint);border-color:var(--teal)}
.btn-ghost{background:transparent;color:var(--ink);padding:.7em 1em}
.btn-ghost:hover{color:var(--teal-dark)}
.btn-lg{font-size:1.08rem;padding:1.2em 2.4em}

/* ---------- eyebrow ---------- */
.eyebrow{
  display:inline-flex;align-items:center;gap:.6em;
  font-size:.98rem;font-weight:700;letter-spacing:.08em;color:var(--teal-dark);
}
.eyebrow::before{content:"";width:26px;height:2px;background:var(--teal);border-radius:2px}

/* ---------- simplified header (conversion pages) ---------- */
header.site{
  position:fixed;inset:0 0 auto 0;z-index:100;height:var(--header-h);
  display:flex;align-items:center;
  background:rgba(255,255,255,.7);backdrop-filter:saturate(180%) blur(12px);-webkit-backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
header.site .wrap{display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center}
.brand img{height:30px;width:auto}
.header-aside{display:flex;align-items:center;gap:14px;font-size:.9rem;color:var(--ink-60)}
.header-aside .sep{color:var(--ink-45)}
.header-aside a.tlink{font-weight:700;color:var(--teal-dark)}
.header-aside a.tlink:hover{color:var(--teal)}
.header-aside .btn{padding:.7em 1.3em;font-size:.88rem;border-radius:10px}
@media (max-width:560px){
  .header-aside .hide-sm{display:none}
  /* 汎用：狭幅で隠す要素（flow.html 見出しの改行 br 等）。.header-aside 配下以外でも効くように */
  .hide-sm{display:none}
}

/* ---------- full header nav (info pages) ---------- */
.nav{display:flex;align-items:center;gap:30px}
.nav a.link{font-size:.92rem;font-weight:500;color:var(--ink-60);transition:color .18s;position:relative;padding:4px 0}
.nav a.link:hover{color:var(--teal-dark)}
@media (max-width:860px){.nav{display:none}}

/* ---------- footer (shared, full) ---------- */
footer.site{background:var(--ink);color:rgba(255,255,255,.62);padding-block:clamp(48px,6vw,72px) 32px}
footer.site .footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:36px}
.footer-brand img{height:30px;margin-bottom:18px;filter:brightness(0) invert(1);opacity:.92}
.footer-brand p{font-size:.88rem;line-height:1.8;max-width:30ch}
.footer-col h5{color:#fff;font-size:.82rem;font-weight:700;letter-spacing:.08em;margin-bottom:16px}
.footer-col a{display:block;font-size:.9rem;padding:7px 0;color:rgba(255,255,255,.62);transition:color .18s}
.footer-col a:hover{color:#fff}
.footer-bottom{margin-top:48px;padding-top:24px;border-top:1px solid rgba(255,255,255,.12);
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;font-size:.8rem;color:rgba(255,255,255,.45)}
@media (max-width:860px){footer.site .footer-grid{grid-template-columns:1fr 1fr;gap:30px}}
@media (max-width:560px){
  footer.site .footer-grid{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column;align-items:flex-start}
}

/* ---------- form controls (shared) ---------- */
.field{display:flex;flex-direction:column;gap:9px;margin-bottom:22px}
.field > label{font-weight:700;font-size:.96rem;display:flex;align-items:center;gap:.6em}
.req-badge{font-size:.68rem;font-weight:700;letter-spacing:.04em;padding:.25em .6em;border-radius:6px;line-height:1}
.req-badge.req{background:rgba(163,45,45,.10);color:var(--red)}
.req-badge.opt{background:#eee9e0;color:var(--ink-45)}
.field .hint{font-size:.82rem;color:var(--ink-45);font-weight:400}
input,select,textarea{
  font-family:inherit;font-size:1rem;color:var(--ink);width:100%;
  padding:.9em 1em;border:1.5px solid var(--line);border-radius:11px;background:#fff;
  transition:border-color .18s,box-shadow .18s;
}
input::placeholder,textarea::placeholder{color:var(--ink-45)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px rgba(0,156,162,.15)}
textarea{resize:vertical;min-height:130px;line-height:1.8}
select{appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23007a7f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;background-position:right 1em center;padding-right:2.6em}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media (max-width:560px){.field-row{grid-template-columns:1fr}}
.checkbox{display:flex;align-items:flex-start;gap:12px;font-size:.95rem;color:var(--ink-80);line-height:1.7;cursor:pointer}
.checkbox input{width:20px;height:20px;flex:0 0 auto;margin-top:3px;accent-color:var(--teal);cursor:pointer}
.checkbox a{color:var(--teal-dark);font-weight:700;text-decoration:underline;text-underline-offset:2px}

/* ---------- legal / document pages ---------- */
.legal-hero{padding-top:calc(var(--header-h) + clamp(40px,6vw,72px));padding-bottom:clamp(28px,4vw,44px);
  background:radial-gradient(720px 360px at 80% -10%,var(--teal-tint-2),transparent 60%),var(--bg);
  border-bottom:1px solid var(--line)}
.legal-hero .eyebrow{margin-bottom:14px}
.legal-hero h1{font-size:clamp(1.9rem,4vw,2.7rem)}
.legal-hero .updated{margin-top:14px;font-size:.86rem;color:var(--ink-45)}
.legal-body{padding-block:clamp(36px,5vw,60px) clamp(48px,7vw,84px)}
.legal-body .doc{max-width:840px;margin-inline:auto}
.legal-lead{color:var(--ink-80);font-size:1rem;line-height:1.95;margin-bottom:34px}
.legal-sec{margin-bottom:36px}
.legal-sec h2{font-size:1.18rem;padding-bottom:12px;margin-bottom:16px;border-bottom:2px solid var(--teal-tint);
  display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.legal-sec h2 .no{color:var(--teal-dark);font-size:.92rem;font-weight:900;letter-spacing:.04em}
.legal-sec p{color:var(--ink-80);font-size:.96rem;line-height:1.95;margin-bottom:12px}
.legal-sec ul,.legal-sec ol{margin:8px 0 14px 1.4em;color:var(--ink-80);font-size:.96rem;line-height:1.9}
.legal-sec li{margin-bottom:7px}
.legal-table{width:100%;border-collapse:collapse;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.legal-table th,.legal-table td{text-align:left;padding:15px 18px;border-bottom:1px solid var(--line);font-size:.94rem;vertical-align:top;line-height:1.85}
.legal-table th{width:34%;background:var(--teal-tint-2);color:var(--ink);font-weight:700}
.legal-table td{color:var(--ink-80)}
.legal-table tr:last-child th,.legal-table tr:last-child td{border-bottom:none}
@media (max-width:560px){
  .legal-table,.legal-table tbody,.legal-table tr,.legal-table th,.legal-table td{display:block;width:100%}
  .legal-table th{border-bottom:none;padding-bottom:4px}
  .legal-table td{padding-top:4px}
}

/* ---------- news（トップ #news と news.html で共有） ---------- */
.news-list{max-width:50rem;margin-inline:auto;display:flex;flex-direction:column;gap:12px}
.news-item{background:var(--card-surface);border:1px solid var(--line-teal);border-radius:14px;
  padding:18px 22px;display:flex;gap:18px;align-items:baseline}
.news-meta{flex:0 0 auto;display:flex;align-items:center;gap:10px}
.news-date{font:700 .84rem/1 ui-monospace,monospace;color:var(--ink-45);letter-spacing:.02em}
/* バッジは最大幅の「新プログラム」に合わせ min-width 固定＋中央寄せ＝タイトル先頭をそろえる。 */
.news-cat{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:5.5rem;
  font-size:.72rem;font-weight:700;letter-spacing:.03em;padding:.32em .72em;border-radius:999px;
  background:var(--teal-tint);color:var(--teal-dark);white-space:nowrap}
/* カテゴリ別の色。未知のカテゴリは既定（teal）が適用される＝後から増やしても崩れない。 */
.news-cat[data-cat="新機能"]{background:#fff3da;color:#9a7415}
.news-cat[data-cat="新プログラム"]{background:#e6f0ff;color:#2b5dab}
.news-cat[data-cat="メンテナンス"]{background:#efeee9;color:var(--ink-60)}
.news-cat[data-cat="その他"]{background:#f0ecf6;color:#6b4e8a}
.news-main{flex:1 1 auto;min-width:0}
.news-title{font-size:1rem;font-weight:700;color:var(--ink);line-height:1.6}
/* リンクのある記事は teal の見出し＋矢印で明示。リンク無しは黒見出しのまま。 */
a.news-title{text-decoration:none;transition:color .15s}
a.news-title--link{color:var(--teal-dark)}
a.news-title--link:hover{text-decoration:underline;text-underline-offset:2px}
.news-arrow{margin-left:.2em;color:var(--teal);font-weight:900;display:inline-block}
.news-body{margin-top:7px;color:var(--ink-60);font-size:.92rem;line-height:1.85}
.news-more{text-align:center;margin-top:clamp(26px,4vw,38px)}
.news-empty{text-align:center;color:var(--ink-45);font-size:.96rem;padding:24px 0}
@media (max-width:560px){
  .news-item{flex-direction:column;gap:8px}
}

/* ---------- programs（programs.html で使用。トップ #programs は index.html にインライン保持・両者同期） ---------- */
.programs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.program{position:relative;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--line-teal);
  box-shadow:var(--shadow-sm);transition:transform .22s ease,box-shadow .22s ease;display:flex;flex-direction:column}
.program:hover{transform:translateY(-4px);box-shadow:var(--shadow-md)}
.program.starter{background:#fffaf1}
.program.pro{background:#f1fafa}
.pnew{position:absolute;top:14px;right:14px;z-index:2;background:#e23d3d;color:#fff;font-size:.72rem;font-weight:900;
  letter-spacing:.06em;padding:.3em .72em;border-radius:999px;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.phead{padding:24px 26px 22px;display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.program.starter .phead{background:linear-gradient(135deg,#f7c873,#e89a36)}
.program.pro .phead{background:linear-gradient(135deg,#37bdc3,#04848a)}
.pbadge{display:inline-flex;align-items:center;gap:.4em;font-size:1rem;font-weight:900;letter-spacing:.02em;
  padding:.5em 1.1em;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:0 3px 10px rgba(0,0,0,.12)}
.program.starter .pbadge{color:#b9701a}
.program.pro .pbadge{color:var(--teal-dark)}
.phead h3{font-size:clamp(1.4rem,2.1vw,1.7rem);font-weight:900;color:#fff;line-height:1.35;
  text-shadow:0 1px 2px rgba(0,0,0,.12)}
.pbody{padding:24px 26px 26px;display:flex;flex-direction:column;gap:20px;flex:1}
.pstats{display:flex;gap:22px;flex-wrap:wrap}
.pstat{display:flex;flex-direction:column;gap:6px}
.pstat .k{font-size:.84rem;font-weight:700;color:var(--ink-45);letter-spacing:.02em}
.pstat .v{font-size:1.18rem;font-weight:900;color:var(--ink);line-height:1.2}
.stars{position:relative;display:inline-block;font-size:1.3rem;line-height:1.2;letter-spacing:1px;white-space:nowrap}
.stars .base{color:#dcdcd6}
.stars .fill{position:absolute;left:0;top:0;color:var(--gold);overflow:hidden;white-space:nowrap}
.pdesc{font-size:1rem;line-height:1.9;color:var(--ink-60)}
/* 特徴セクションが無いカード（トップページ等）は従来どおり説明文を下端寄せ。
   特徴セクションがある一覧ページのカードでは説明文は上寄せのままにし、下端寄せはトグル側で担う。 */
.pbody > .pdesc:last-child{margin-top:auto}

/* ゲームとしての特徴（一覧ページのみ・折りたたみ <details>／デフォルト閉） */
.pfeatures{border-top:1px solid var(--line-teal);margin-top:auto}
.pfeatures > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;
  padding:15px 4px 4px;font-size:.94rem;font-weight:800;color:var(--teal-dark);
  transition:color .18s ease;user-select:none;-webkit-tap-highlight-color:transparent}
.pfeatures > summary::-webkit-details-marker{display:none}
.pfeatures > summary:hover{color:var(--teal)}
.pfeatures-label{display:inline-flex;align-items:center;gap:9px}
.pfeatures-label::before{content:"";width:20px;height:2px;border-radius:2px;background:var(--teal)}
.pfeatures-chev{margin-left:auto;width:8px;height:8px;flex:0 0 auto;margin-bottom:2px;
  border-right:2px solid var(--teal);border-bottom:2px solid var(--teal);transform:rotate(45deg);transition:transform .22s ease}
.pfeatures[open] > summary .pfeatures-chev{transform:rotate(-135deg);margin-bottom:-2px}
.pfeatures-list{list-style:none;margin:11px 0 4px;padding:0;display:flex;flex-direction:column;gap:9px;animation:pfeat-in .22s ease}
.pfeatures-list li{position:relative;padding-left:19px;font-size:.92rem;line-height:1.72;color:var(--ink-60)}
.pfeatures-list li::before{content:"";position:absolute;left:2px;top:.62em;width:7px;height:7px;border-radius:2px;
  background:var(--teal);transform:rotate(45deg)}
@keyframes pfeat-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.pfeatures-chev,.pfeatures-list{transition:none;animation:none}}

/* 絞り込みバー（オペレータ画面と同条件：プラン／難易度 以下・以上／フリーワード／リセット） */
.prog-filter{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 22px;margin-bottom:clamp(24px,3.4vw,36px);
  padding:18px 22px;background:var(--card-surface);border:1px solid var(--line-teal);border-radius:14px}
.prog-filter-item{display:flex;flex-direction:column;gap:7px}
.prog-filter-item > label{font-size:.78rem;font-weight:700;color:var(--ink-45);letter-spacing:.03em}
/* グローバルの input,select{width:100%} を打ち消す（自動幅にしないとトグルがはみ出す）。 */
.prog-filter-item select,.prog-filter-item input{width:auto;font:inherit;font-size:.92rem;padding:.5em .8em;
  border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}
.prog-filter-item input{width:150px}
.prog-filter-diff{display:flex;align-items:stretch;gap:8px}
.prog-filter-diff select{flex:0 0 auto}
.diff-dir{display:inline-flex;flex:0 0 auto;border:1px solid var(--line);border-radius:9px;overflow:hidden}
.diff-dir-btn{display:inline-flex;align-items:center;font:inherit;font-size:.86rem;font-weight:700;white-space:nowrap;padding:.4em .9em;border:none;background:#fff;color:var(--ink-60);cursor:pointer}
.diff-dir-btn + .diff-dir-btn{border-left:1px solid var(--line)}
.diff-dir-btn.active{background:var(--teal);color:#fff}
.prog-filter-clear{font:inherit;font-size:.86rem;font-weight:700;color:var(--teal-dark);background:transparent;
  border:1px solid rgba(0,156,162,.4);border-radius:9px;padding:.6em 1.1em;cursor:pointer;transition:.15s}
.prog-filter-clear:hover{background:var(--teal-tint)}
.prog-no-results{text-align:center;color:var(--ink-45);font-size:1rem;padding:clamp(30px,6vw,56px) 0}
@media (max-width:980px){.programs-grid{grid-template-columns:1fr 1fr}}
@media (max-width:560px){
  .programs-grid{grid-template-columns:1fr}
  .prog-filter{gap:14px 18px;padding:16px}
  .prog-filter-item input{width:100%}
}

/* ---------- faq（faq.html で使用。トップ #faq は index.html にインライン保持・両者同期） ---------- */
.faq-list{max-width:50rem;margin-inline:auto;display:flex;flex-direction:column;gap:12px}
.faq-item{background:var(--card-surface);border:1px solid var(--line-teal);border-radius:14px;overflow:hidden;transition:box-shadow .2s,border-color .2s}
.faq-item[open]{box-shadow:var(--shadow-sm);border-color:rgba(0,156,162,.35)}
.faq-item summary{list-style:none;cursor:pointer;padding:20px 24px;display:flex;align-items:center;gap:16px;font-weight:700;font-size:1.02rem}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary .q{flex:0 0 auto;color:var(--teal);font-weight:900;font-size:1.05rem}
.faq-item summary .plus{margin-left:auto;flex:0 0 auto;width:26px;height:26px;position:relative;transition:transform .25s}
.faq-item summary .plus::before,.faq-item summary .plus::after{content:"";position:absolute;top:50%;left:50%;background:var(--teal-dark);border-radius:2px;transform:translate(-50%,-50%)}
.faq-item summary .plus::before{width:14px;height:2px}
.faq-item summary .plus::after{width:2px;height:14px;transition:transform .25s}
.faq-item[open] summary .plus::after{transform:translate(-50%,-50%) scaleY(0)}
.faq-item .answer{padding:0 24px 22px 60px;color:var(--ink-60);font-size:.96rem;line-height:1.9}
.faq-item .answer a{color:var(--teal-dark);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.faq-cat{max-width:50rem;margin:0 auto clamp(26px,4vw,40px)}
.faq-cat-title{font-size:1.12rem;font-weight:900;color:var(--ink);margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--line-teal)}
