/* Startup Tycoon - フラットUI (モバイルファースト) */
:root {
  --navy: #1f2a44; --navy2: #2b3a5e;
  --bg: #f2f4f8; --card: #ffffff;
  --ink: #23293a; --sub: #6b7385;
  --accent: #2f80ed; --green: #27ae60; --red: #e74c3c; --amber: #f2994a;
  --line: #e3e7ef;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none;
}
.screen { min-height: 100vh; }

/* タイトル */
#title-screen { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--navy) 0%, #3d5286 100%); }
.title-wrap { text-align: center; color: #fff; padding: 24px; width: 100%; max-width: 420px; }
.title-logo { font-size: 56px; }
.title-wrap h1 { font-size: 30px; letter-spacing: 1px; margin: 4px 0 2px; }
.subtitle { opacity: .8; margin-bottom: 20px; font-size: 13px; }
.title-wrap .card { text-align: left; color: var(--ink); }
.title-wrap label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 12px; }
.title-wrap input[type=text], .title-wrap select {
  width: 100%; padding: 10px; margin-top: 4px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fafbfd;
}
.hint { font-size: 12px; opacity: .7; margin-top: 14px; }

/* カード・ボタン */
.card { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(31,42,68,.06); }
.card h3 { font-size: 14px; margin-bottom: 8px; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 9px 14px;
  background: #e8ecf4; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { width: 100%; padding: 13px; font-size: 16px; margin-top: 6px; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .4; pointer-events: none; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* HUD */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: var(--navy); color: #fff;
  padding: calc(var(--safe-top) + 8px) 12px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.hud-row1 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
#hud-name { font-size: 18px; font-weight: 900; letter-spacing: .5px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud-date { color: #9fb3d9; font-weight: 600; flex: 1; }
.btn.turn { background: var(--green); color: #fff; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.hud-row2 { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11.5px; color: #c9d4ea; }
.hud-row2 b { color: #fff; font-weight: 700; }
.hud-row2 .warn { color: #ffd66b; } .hud-row2 .bad { color: #ff8a80; }

/* メイン */
#panel { padding: 108px 10px calc(70px + var(--safe-bot)); max-width: 560px; margin: 0 auto; }

/* タブバー */
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bot);
}
#tabbar button {
  flex: 1; border: none; background: none; padding: 8px 0 6px;
  font-size: 10px; color: var(--sub); font-weight: 600;
}
#tabbar button span { display: block; font-size: 20px; }
#tabbar button.active { color: var(--accent); }
#tabbar button .dot { position: relative; }
#tabbar button.notify::after { content: ''; position: absolute; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin-left: -2px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.kpi { background: var(--card); border-radius: 12px; padding: 10px 8px; text-align: center; box-shadow: 0 1px 3px rgba(31,42,68,.06); }
.kpi .v { font-size: 15px; font-weight: 800; color: var(--navy); }
.kpi .l { font-size: 10px; color: var(--sub); margin-top: 2px; }
.kpi .d { font-size: 10px; font-weight: 700; }
.up { color: var(--green); } .down { color: var(--red); }

/* テーブル */
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; color: var(--sub); font-size: 11px; font-weight: 600; padding: 4px 4px; border-bottom: 1px solid var(--line); }
table.t td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: none; }
.total-row td { font-weight: 800; background: #f7f9fc; }

/* 財務諸表 */
details.fs { background: var(--card); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
details.fs summary { padding: 13px 14px; font-weight: 700; font-size: 14px; color: var(--navy); cursor: pointer; list-style: none; }
details.fs summary::after { content: '▾'; float: right; color: var(--sub); }
details.fs[open] summary::after { content: '▴'; }
details.fs .fs-body { padding: 0 14px 12px; }
.indent td:first-child { padding-left: 18px; color: var(--sub); }

/* ニュース */
.news { font-size: 12.5px; line-height: 1.5; }
.news li { list-style: none; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.news li:last-child { border: none; }
.news .tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 6px; margin-right: 5px; font-weight: 700; }
.tag.news { background: #e5efff; color: var(--accent); }
.tag.fin { background: #e8f8ee; color: var(--green); }
.tag.biz { background: #fff2e3; color: var(--amber); }
.tag.warn { background: #ffe9e7; color: var(--red); }
.tag.inv { background: #f0e8fb; color: #8e5fd6; }
.tag.info { background: #eef1f6; color: var(--sub); }

/* アドバイザー(キャラクター) */
.advisor { display: flex; gap: 10px; align-items: flex-start; }
.advisor svg { flex-shrink: 0; }
.bubble { background: #eef4ff; border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 13px; line-height: 1.55; }
.bubble b { color: var(--accent); }

/* シェアマップ */
.share-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin: 8px 0 4px; }
.share-bar div { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.legend { font-size: 11px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 3px; }

/* モーダル */
#modal-bg {
  position: fixed; inset: 0; background: rgba(15,20,35,.55); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
#modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 82vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-bot));
  animation: slideup .18s ease-out;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#modal h2 { font-size: 17px; color: var(--navy); margin-bottom: 10px; }
#modal .m-body { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
#modal input[type=number], #modal input[type=text] {
  width: 100%; padding: 11px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0;
}
#modal .m-actions { display: flex; flex-direction: column; gap: 8px; }
.offer-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.offer-card.withdrawn { opacity: .45; }
.offer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { background: #eef1f6; border-radius: 20px; padding: 3px 10px; font-size: 11px; color: var(--sub); font-weight: 600; }
.chip.on { background: var(--accent); color: #fff; }

/* スライダー・入力補助 */
.qbtns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
canvas.spark { width: 100%; height: 64px; display: block; }
.sec-title { font-size: 12px; color: var(--sub); font-weight: 700; margin: 14px 0 6px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pill.g { background: #e8f8ee; color: var(--green); }
.pill.r { background: #ffe9e7; color: var(--red); }
.pill.a { background: #fff2e3; color: var(--amber); }
.pill.b { background: #e5efff; color: var(--accent); }
.progress { height: 8px; border-radius: 6px; background: #e8ecf4; overflow: hidden; margin: 4px 0; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.progress.warn i { background: var(--amber); }
.progress.bad i { background: var(--red); }
.small-note { font-size: 11px; color: var(--sub); }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--red); font-weight: 700; }

/* ジャンル選択カード */
#genre-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.genre-card {
  border: 2px solid var(--line); border-radius: 10px; padding: 9px; cursor: pointer;
  background: #fafbfd; font-size: 12px;
}
.genre-card.on { border-color: var(--accent); background: #eef4ff; }
.genre-card .g-head { font-weight: 800; font-size: 13px; margin-bottom: 3px; }
.genre-card .g-desc { color: var(--sub); font-size: 10.5px; line-height: 1.45; }

/* プロダクトカード */
.product-card { display: flex; gap: 12px; align-items: flex-start; }
.p-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(140deg, #2f80ed, #7db4f7); display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 2px 6px rgba(47,128,237,.3);
}
.p-info { flex: 1; min-width: 0; }
.p-name { font-size: 15px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.p-genre { font-size: 11px; color: var(--sub); margin: 1px 0 6px; }
.p-stat { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--sub); margin-top: 3px; }
.p-stat .progress { flex: 1; margin: 0; }

/* 手数表示 */
.ap-chip { background: rgba(255,255,255,.14); border-radius: 14px; padding: 1px 9px; }
.btn.turn.pulse { animation: turnpulse 1.1s ease infinite; }
@keyframes turnpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(39,174,96,.7); } 50% { box-shadow: 0 0 0 8px rgba(39,174,96,0); } }

/* 折りたたみカード */
details.fold { background: var(--card); border-radius: var(--radius); margin-bottom: 10px; box-shadow: 0 1px 3px rgba(31,42,68,.06); overflow: hidden; }
details.fold > summary {
  padding: 13px 14px; font-weight: 700; font-size: 14px; color: var(--navy);
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▾'; margin-left: auto; color: var(--sub); font-size: 12px; }
details.fold[open] > summary::after { content: '▴'; }
details.fold .fold-body { padding: 0 14px 12px; }
.sum-badge { background: #eef1f6; color: var(--sub); border-radius: 20px; padding: 1px 9px; font-size: 11px; font-weight: 700; }
.chart-block { margin-bottom: 10px; }
.chart-block:last-child { margin-bottom: 0; }

/* プロダクト帯(オフィス下) */
.prod-strip { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.ps-item {
  background: #eef4ff; border-radius: 9px; padding: 5px 9px; font-size: 11.5px; font-weight: 700; color: var(--navy);
  display: flex; flex-direction: column; line-height: 1.35;
}
.ps-item i { font-style: normal; font-weight: 600; font-size: 10px; color: var(--sub); }
.ps-item.dev { background: #f2f4f8; color: var(--sub); }

/* 次の目標カード */
.next-goal-card { background: #eef4ff; border: 1px solid #d3e2fb; }

/* 会計科目の解説リンク */
.acct { cursor: pointer; border-bottom: 1px dotted var(--accent); }
.acct i { font-style: normal; font-size: 9px; color: var(--accent); vertical-align: super; margin-left: 1px; font-weight: 700; }
tr.sub-head td { background: #f2f5fa; font-weight: 800; font-size: 12px; color: var(--navy); padding: 5px 4px; }
.yoy { display: block; font-size: 10px; font-weight: 700; }

/* 取締役会 */
.board-card { border: 1px solid #f0d0a0; background: #fffdf7; }
.bd-head { font-size: 14px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.bd-goal { background: #fff4e0; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; margin-top: 8px; }

/* 事業機会 */
.opp { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; background: #fbfcfe; }
.opp:last-child { margin-bottom: 0; }
.opp-head { font-weight: 800; font-size: 13.5px; color: var(--navy); display: flex; align-items: center; gap: 6px; }
.opp-desc { font-size: 12px; color: var(--sub); line-height: 1.5; margin: 4px 0; }
.opp-eff { font-size: 12px; color: var(--accent); font-weight: 700; }

/* 手数切れバナー */
.ap-banner {
  background: #fff4e0; border: 1px solid #f0d0a0; color: #8a5a1a;
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; margin-bottom: 10px;
}

/* 社内の声 */
.chat-line { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.chat-line:last-of-type { border-bottom: none; }
.chat-msg { background: #f4f6fa; border-radius: 4px 12px 12px 12px; padding: 7px 10px; margin-top: 4px; font-size: 12.5px; line-height: 1.5; }

/* チャート現在値・次の目標・名簿 */
.h3val { margin-left: auto; color: var(--accent); font-size: 15px; font-weight: 800; }
.next-goal { background: #eef4ff; border: 1px solid #d3e2fb; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ng-title { font-size: 13.5px; font-weight: 800; color: var(--accent); }
.ng-hint { font-size: 12px; color: var(--ink); line-height: 1.55; margin: 5px 0 8px; }
details.roster { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
details.roster summary { font-size: 12.5px; font-weight: 700; color: var(--accent); cursor: pointer; padding: 4px 0; }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* オフィスビュー */
.office-card { padding: 0; overflow: hidden; }
#office-cv { width: 100%; height: 235px; display: block; }
.office-cap {
  display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px;
  font-size: 11px; color: var(--sub); border-top: 1px solid var(--line); background: #fbfcfe;
}
.office-cap b { color: var(--ink); }

/* サウンドボタン */
.btn.sound { background: transparent; color: #fff; padding: 6px 8px; font-size: 15px; }

/* 月替わり演出 */
#season-ov {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: seasonfade 1.5s ease forwards;
}
#season-art { font-size: 64px; line-height: 1; animation: seasonpop .6s ease; }
#season-label { font-size: 14px; font-weight: 700; margin-top: 10px; opacity: .85; }
#season-date { font-size: 30px; font-weight: 900; letter-spacing: 2px; margin-top: 2px; }
#season-ov.spring { background: linear-gradient(160deg, #ffe3ee, #fff6fa); color: #b1487c; }
#season-ov.summer { background: linear-gradient(160deg, #bfe8ff, #f2fbff); color: #1d6fa3; }
#season-ov.autumn { background: linear-gradient(160deg, #ffe0b8, #fff7ec); color: #a55b1e; }
#season-ov.winter { background: linear-gradient(160deg, #dde7f5, #f8fafd); color: #4a6591; }
@keyframes seasonpop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes seasonfade { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.petal { position: absolute; top: -20px; font-size: 18px; animation: fall linear infinite; }
@keyframes fall {
  from { transform: translateY(-5vh) rotate(0deg); }
  to { transform: translateY(110vh) rotate(360deg); }
}

/* プロダクトの折りたたみ */
details.prod-fold { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: #fbfcfe; overflow: hidden; }
details.prod-fold > summary {
  padding: 10px 12px; font-weight: 800; font-size: 13.5px; color: var(--navy);
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
details.prod-fold > summary::-webkit-details-marker { display: none; }
details.prod-fold > summary::after { content: '▾'; margin-left: auto; color: var(--sub); font-size: 12px; }
details.prod-fold[open] > summary::after { content: '▴'; }
details.prod-fold .pf-body { padding: 0 12px 12px; }

/* プロダクト運営ブロック */
.prod-block { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 10px 0; background: #fbfcfe; }
.pb-head { font-weight: 800; font-size: 14px; color: var(--navy); margin-bottom: 6px; }
.pb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pb-lbl { font-size: 11.5px; color: var(--sub); font-weight: 700; }
.pb-row .qbtns { margin: 0; }
.product-card.dev { opacity: .85; }
.p-icon.dev { background: linear-gradient(140deg, #9aa3b5, #c3cad8); }
.genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 達成演出 */
#ach-ov {
  position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
  background: rgba(15,20,35,.55); animation: achfade .35s ease;
}
#ach-card {
  background: linear-gradient(160deg, #fffdf5, #fff);
  border-radius: 20px; padding: 26px 26px 22px; text-align: center; max-width: 300px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35); border: 2px solid #f2c94c;
  animation: achpop .5s cubic-bezier(.2,1.5,.4,1);
}
#ach-icon { font-size: 58px; line-height: 1; animation: achspin .8s ease; }
#ach-label { font-size: 11px; font-weight: 800; letter-spacing: 3px; color: #c99a17; margin-top: 8px; }
#ach-title { font-size: 21px; font-weight: 900; color: var(--navy); margin-top: 2px; }
#ach-desc { font-size: 12.5px; color: var(--sub); margin-top: 8px; line-height: 1.55; }
@keyframes achfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes achpop { from { transform: scale(.3) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes achspin { from { transform: scale(0) rotate(-180deg); } to { transform: none; } }
.confetti { position: absolute; top: -5vh; font-size: 16px; animation: fall linear forwards; }

/* 実績一覧 */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.ach-cell { text-align: center; padding: 8px 4px; border-radius: 10px; background: #f4f6fa; font-size: 9.5px; color: var(--sub); line-height: 1.3; }
.ach-cell.got { background: #fff8e6; border: 1px solid #f0d68a; color: var(--ink); font-weight: 700; }
.ach-cell .ai { font-size: 22px; display: block; filter: grayscale(1) opacity(.35); }
.ach-cell.got .ai { filter: none; }

/* ゲームオーバー */
.gameover { text-align: center; padding: 30px 16px; }
.gameover .big-emoji { font-size: 60px; }
.gameover h2 { margin: 10px 0; color: var(--navy); }

/* M&A: PMI進捗バーと調査で判明したリスク */
.ma-bar { height: 6px; background: #e8ecf3; border-radius: 4px; margin: 7px 0 4px; overflow: hidden; }
.ma-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ma-risk { background: #fff4f2; border: 1px solid #ffd9d2; border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 12px; color: var(--ink); }
.ma-risk b { color: var(--red); }
.ma-risk ul { margin: 4px 0 0 16px; line-height: 1.55; }

/* ===== UI v2(2026-09): 上部バーを軽く・「一手」タブ新設・ホームを状況確認に絞る ===== */
/* 上部バー: 数字は現金・資金寿命・月商の3つだけを大きく */
#hud-date { line-height: 1.25; font-size: 12px; white-space: nowrap; min-width: 0; }
/* 幅375pxの端末でも1行目が収まるよう、会社名は少し短めで省略する */
#hud-name { max-width: 38%; }
#hud-stats.hud-row2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.hm { background: rgba(255,255,255,.07); border-radius: 10px; padding: 5px 9px; }
.hm .l { font-size: 10.5px; color: #9fb3d9; font-weight: 700; }
.hm .v { font-size: 17px; font-weight: 800; color: #fff; margin-top: 1px; white-space: nowrap; }
.hm .v small { font-size: 11px; font-weight: 700; margin-left: 3px; }
.hm .v.ok, .hm small.up { color: #6fdc9a; } .hm small.down { color: #ff8a80; }
.hm .v.warn { color: #ffd66b; } .hm .v.bad { color: #ff8a80; }
#panel { padding-top: 124px; }

/* タブバー: 一手タブに残り手数のバッジ */
#tabbar button { position: relative; }
.apbadge { position: absolute; top: 3px; left: 50%; margin-left: 7px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; font-style: normal; line-height: 17px; padding: 0 4px; }
.apbadge.zero { background: #c3cad8; }

/* ホーム: プロダクト帯は横スクロールの1列に */
.prod-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.prod-strip::-webkit-scrollbar { display: none; }
.ps-item { flex: none; flex-direction: row; align-items: baseline; gap: 5px; white-space: nowrap; }
.valline { font-size: 11.5px; color: var(--sub); text-align: center; margin: -2px 0 12px; }
.valline b { color: var(--ink); }

/* ホーム: 今月の注目(行形式。タップで該当タブへ) */
.h3x { font-size: 13px; font-weight: 800; color: var(--navy); margin: 0 4px 6px; display: flex; align-items: center; gap: 6px; }
.rows { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(31,42,68,.06); margin-bottom: 12px; overflow: hidden; }
.rowx { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.rowx:first-child { border-top: none; }
.rowx .ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.rowx .tx { flex: 1; min-width: 0; }
.rowx .t1 { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.rowx .t2 { font-size: 11.5px; color: var(--sub); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowx .t2.wrap { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.rowx .t2 b { color: var(--accent); }
.rowx .chev { color: #b6bfd0; font-size: 18px; flex: none; }
.ic.amber { background: #fff2e3; } .ic.blue { background: #e5efff; } .ic.red { background: #ffe9e7; }
.ic.green { background: #e8f8ee; } .ic.purple { background: #f0e9fb; } .ic.gray { background: #f0f2f6; }

/* ホーム: 次の目標(CFOの助言・ロードマップと統合) */
.goal2 { display: flex; gap: 11px; align-items: flex-start; }
.goal2 svg { flex: none; }
.goal2 .g1 { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.goal2 .g2 { font-size: 16px; font-weight: 900; color: var(--navy); margin-top: 1px; }
.goal2 .g3 { font-size: 12px; color: var(--ink); line-height: 1.55; }
.goal2 .g3 b.miss { color: var(--red); }
.prog2 { height: 7px; background: #e8ecf3; border-radius: 4px; margin: 8px 0 6px; overflow: hidden; }
.prog2 i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 4px; }

/* 一手タブ */
.aphead { background: linear-gradient(150deg, var(--navy), #3d5286); color: #fff; border-radius: var(--radius); padding: 14px 14px 13px; margin-bottom: 14px; }
.aphead .a1 { display: flex; align-items: center; justify-content: space-between; }
.aphead .a1 b { font-size: 19px; font-weight: 900; }
.aphead .left { background: var(--green); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 20px; }
.aphead .left.used { background: #8391ad; }
.aphead p { font-size: 12px; color: #c9d4ea; margin-top: 6px; line-height: 1.55; }
.aphead p b { color: #fff; }
.grp { font-size: 12px; font-weight: 800; color: var(--sub); letter-spacing: 1px; margin: 6px 4px 6px; display: flex; align-items: center; gap: 6px; }
.move { display: flex; align-items: center; gap: 11px; background: var(--card); border-radius: 12px; padding: 11px 12px 11px 14px; margin-bottom: 7px; box-shadow: 0 1px 3px rgba(31,42,68,.06); position: relative; overflow: hidden; cursor: pointer; }
.move::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.move:active { transform: scale(.985); }
.move .ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; background: #f0f4fb; }
.move .tx { flex: 1; min-width: 0; }
.move .t1 { font-size: 14px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.move .t2 { font-size: 11.5px; color: var(--sub); margin-top: 2px; line-height: 1.45; }
.move .cost { text-align: right; flex: none; font-size: 13px; font-weight: 800; color: var(--navy); }
.move .cost small { display: block; font-size: 10px; font-weight: 600; color: var(--sub); }
.move.dis { opacity: .62; cursor: default; }
.move.dis:active { transform: none; }
.move.dis .t2 { color: var(--red); font-weight: 700; }
.move.info { cursor: default; }
.move.urgent { box-shadow: 0 0 0 2px #f2c94c inset, 0 1px 3px rgba(31,42,68,.06); }
.g-growth { --c: var(--accent); } .g-money { --c: var(--green); } .g-deal { --c: var(--amber); } .g-invest { --c: #8e5fd6; }
.empty { font-size: 12px; color: var(--sub); background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 7px; border: 1.5px dashed var(--line); line-height: 1.55; }
.grp-card { background: var(--card); border-radius: 12px; padding: 12px; margin-bottom: 7px; box-shadow: 0 1px 3px rgba(31,42,68,.06); }

/* 財務タブ: 財務三表は切り替えタブで1つずつ表示 */
.seg { display: flex; background: #eef1f6; border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.seg button { flex: 1; border: none; background: none; padding: 7px 0; font-size: 13px; font-weight: 700; color: var(--sub); border-radius: 8px; font-family: inherit; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(31,42,68,.12); }

/* タイトル: 詳細設定(会計基準など) */
.title-wrap details.adv { margin: 2px 0 12px; }
.title-wrap details.adv > summary { font-size: 12.5px; font-weight: 700; color: var(--accent); cursor: pointer; padding: 4px 0 8px; list-style: none; }
.title-wrap details.adv > summary::-webkit-details-marker { display: none; }
.title-wrap details.adv > summary::before { content: '▸ '; }
.title-wrap details.adv[open] > summary::before { content: '▾ '; }
.adv-note { font-size: 11px; color: var(--sub); line-height: 1.5; margin: -6px 0 4px; }

/* 米国基準の科目名(英語+日本語の併記) */
.en { font-weight: 600; }
.jp { font-size: 11px; color: var(--sub); }
tr.sub-head .jp { color: var(--navy); }
table.cmp th { font-size: 11px; }
table.cmp td, table.cmp th { padding-left: 3px; padding-right: 3px; }

/* 経営指標 */
.metrics .roe-box { display: flex; align-items: center; gap: 16px; background: #f5f8fd; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.metrics .roe { font-size: 30px; font-weight: 900; line-height: 1.1; }
.metrics .warn-t { color: var(--amber); }
.metrics .dupont { font-size: 12px; color: var(--sub); line-height: 1.7; }
.metrics .dupont b { color: var(--ink); }
.metrics .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.metrics .mt { background: #f7f9fc; border-radius: 10px; padding: 7px 8px; }
.metrics .ml { font-size: 10.5px; color: var(--sub); font-weight: 700; }
.metrics .mv { font-size: 15px; font-weight: 800; color: var(--navy); margin-top: 1px; }
.metrics .mn { font-size: 10px; color: var(--sub); }
/* 金額は折り返さない(英語の長い科目名と並んでも「億/円」で改行しないように) */
table.t td.num { white-space: nowrap; }
