/* G-IT Alert 確定デザイン（Googleニュース風・GOAT緑・ライト/ダーク） */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@500;600;700&family=Fredoka:wght@600;700&family=Noto+Sans+JP:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  /* 面・線 */
  --bg: #F5F6F8; --surface: #FFFFFF; --surface-2: #FAFAF7;
  --line: #E3E6EA; --line-2: #EFEDE7;
  /* 文字 */
  --text: #1F2227; --text-2: #3E434C; --text-3: #5A6473; --muted: #6B7280;
  /* ブランド（GOAT緑） */
  --brand: #4F7D1E; --brand-ink: #2F5A12; --brand-hover: #3F6B16;
  --accent: #8DC556; --accent-ink: #3F6B16; --accent-soft: #EAF4DC;
  --hover: rgba(141,197,86,.10);
  /* 重要度 */
  --critical: #C0362C; --confirmed: #B4690E; --confirming: #2563EB; --unconfirmed: #6B7280;
  /* 警告 */
  --warn-bg: #FFF6E1; --warn-border: #F1DFAE; --warn-ink: #7A5A12;
  /* 旧ガラス（互換のため名称維持・中身は無地カード） */
  --glass: #FFFFFF; --glass-strong: #FFFFFF; --glass-border: #E3E6EA;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  /* 形 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  /* 寸法 */
  --side: 256px; --ctl-h: 40px; --top-h: 64px;
  /* 文字サイズ */
  --fs-title: 24px; --fs-h1: 24px; --fs-h2: 18px; --fs-sect: 16px; --fs-body: 15px; --fs-sm: 13px; --fs-xs: 12px;
}
html[data-theme="dark"] {
  --bg: #1A1C1E; --surface: #25282B; --surface-2: #202325;
  --line: #34383C; --line-2: #2E3236;
  --text: #E8EBEF; --text-2: #C7CCD3; --text-3: #A7AEB6; --muted: #A7AEB6;
  --brand: #8DC556; --brand-ink: #AED87E; --brand-hover: #9BCB6A;
  --accent: #8DC556; --accent-ink: #AED87E; --accent-soft: rgba(141,197,86,.16);
  --hover: rgba(141,197,86,.14);
  --warn-bg: #352B12; --warn-border: #5A4718; --warn-ink: #E6C06A;
  --glass: #25282B; --glass-strong: #25282B; --glass-border: #34383C;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Meiryo, sans-serif;
  font-size: var(--fs-body); line-height: 1.7;
}
a { color: var(--brand-ink); }
.num { font-family: "Roboto", inherit; font-variant-numeric: tabular-nums; }

/* フォーカス可視化 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
[tabindex]:focus-visible, .ftag:focus-visible, .card:focus-visible, .tile.link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm);
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--brand); color: #fff;
  padding: 9px 14px; border-radius: 0 0 var(--r-sm) 0; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.skip:focus { left: 0; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 互換: 旧ガラスクラスは無地カードに */
.glass, .glass-strong { background: var(--surface); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }

/* ===== トップバー ===== */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  height: var(--top-h); padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .ham { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  color: var(--text-3); display: none; align-items: center; justify-content: center; }
.topbar .ham:hover { background: var(--hover); }
.topbar .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.topbar .brand svg { display: block; }
.topbar .bname { font-family: "Rubik", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.3px; color: var(--text); }
.topbar .bname span { color: var(--accent-ink); }
.topsearch { flex: 1; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--bg); border: 1px solid transparent; }
.topsearch:focus-within { background: var(--surface); border-color: var(--line); box-shadow: 0 1px 6px rgba(16,24,40,.10); }
.topsearch .ic { color: var(--text-3); flex: none; }
.topsearch input { border: 0; background: transparent; outline: none; width: 100%; font-family: inherit; font-size: 15px; color: var(--text); }
.topsearch ::placeholder { color: var(--muted); }
.topacts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  color: var(--text-3); display: flex; align-items: center; justify-content: center; }
.iconbtn:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ===== レイアウト ===== */
.app { display: grid; grid-template-columns: var(--side) 1fr; max-width: 1480px; margin-inline: auto; min-height: calc(100vh - var(--top-h)); }
.content { padding: 24px 32px 56px; max-width: 1100px; width: 100%; }

/* ===== 左ナビ ===== */
.sidebar { align-self: start; position: sticky; top: var(--top-h); display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px; height: calc(100vh - var(--top-h)); }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a, .admin-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text-2);
  font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: var(--r-pill); }
.sidebar nav a .ic, .admin-link .ic { width: 20px; text-align: center; color: var(--text-3); flex: none; }
.sidebar nav a:hover, .admin-link:hover { background: var(--hover); }
.sidebar nav a.active, .admin-link.active { background: var(--accent-soft); color: var(--brand-ink); font-weight: 700; }
.sidebar nav a.active .ic, .admin-link.active .ic { color: var(--accent-ink); }
.sidebar .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-link { font-size: 13px; color: var(--muted); padding: 9px 16px; }
.sidebar .disc { font-size: 11px; color: var(--muted); padding: 10px 10px 2px; line-height: 1.6; }

/* ページ見出し */
.page-head { margin: 2px 2px 16px; }
.page-head h1 { font-size: var(--fs-h1); margin: 0 0 3px; color: var(--text); letter-spacing: -.3px; font-weight: 800; }
.page-head p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

/* 警告 */
.notice, .warn { padding: 11px 15px; border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--warn-ink);
  background: var(--warn-bg); border: 1px solid var(--warn-border); display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.warn { margin: 0 0 10px; }

.statebox { padding: 30px 20px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.statebox .btn { margin-top: 10px; }

/* バッジ・タグ */
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.b-critical { background: #FBEAE8; color: #8F2019; }
.b-confirmed { background: #F7EFE0; color: #844B07; }
.b-confirming { background: #E7EEFD; color: #1A47B8; }
.b-unconfirmed { background: #EEF0F2; color: #4B515A; }
.cat { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 8px; }
.tag { font-size: 11.5px; border-radius: var(--r-sm); padding: 2px 8px; background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); }
.tag.own { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; border-color: transparent; }
.expl { color: var(--critical); font-weight: 700; }
.meta .date { color: var(--muted); }

/* ボタン */
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--brand-ink);
  padding: 0 14px; height: var(--ctl-h); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 700;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-family: inherit; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #163a05; border-color: transparent; }
.btn.primary:hover { filter: brightness(.97); background: var(--accent); }

/* Bento タイル */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 112px; box-shadow: var(--shadow); }
.tile .lbl { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.tile .num { font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: -1px; font-family: "Roboto", inherit; }
.tile .num.sm { font-size: 30px; }
.tile .sub { font-size: var(--fs-xs); color: var(--muted); }
.tile .num.warn-c { color: var(--critical); } .tile .num.own-c { color: var(--accent-ink); } .tile .num.conf-c { color: var(--confirmed); }
.tile.big { grid-row: span 2; justify-content: center; gap: 6px; background: var(--accent); border-color: transparent; color: #163a05; }
.tile.big .lbl { color: #22421a; } .tile.big .sub { color: #22421a; font-weight: 600; font-size: var(--fs-sm); } .tile.big .num { font-size: 50px; color: #0f2b06; }
.tile.link { position: relative; cursor: pointer; text-decoration: none; color: inherit; transition: transform .1s, border-color .12s, box-shadow .1s; }
.tile.link::after { content: "→"; position: absolute; right: 16px; top: 16px; color: var(--accent); font-weight: 800; opacity: .7; }
.tile.big.link::after { color: #163a05; opacity: .9; }
.tile.link:hover { transform: translateY(-2px); border-color: #C3D9A0; box-shadow: 0 8px 22px rgba(16,24,40,.08); }
.tile.link:active { transform: translateY(0); }
.cat-rows { display: grid; gap: 6px; margin-top: 6px; }
.cat-rows div { display: flex; justify-content: space-between; font-size: var(--fs-sm); padding-bottom: 5px; border-bottom: 1px solid var(--line-2); }
.cat-rows div:last-child { border-bottom: 0; }
.cat-rows b { font-weight: 700; }

/* カード一覧 */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.list .head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 10px; flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--muted); border-bottom: 1px solid var(--line); }
.card { padding: 15px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer;
  text-decoration: none; color: inherit; display: block; }
.card:last-child { border-bottom: 0; }
.card:hover { background: var(--hover); }
.card:hover h3 { color: var(--brand-ink); }
.card h3 { margin: 0 0 8px; font-size: 15.5px; line-height: 1.5; font-weight: 700; }
.meta { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.more { display: block; width: 100%; padding: 13px; border: none; background: var(--accent-soft);
  color: var(--brand-ink); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; font-family: inherit; }
.more:hover { filter: brightness(.98); }

/* 詳細 */
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 30px; max-width: 900px; box-shadow: var(--shadow); }
.detail h2 { font-family: "Rubik", "Noto Sans JP", sans-serif; font-size: var(--fs-title); margin: 10px 0 10px; line-height: 1.45; }
.detail .sub { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.ai { background: var(--accent-soft); border: 1px solid #CDE6B6; border-radius: var(--r-md); padding: 14px 16px; margin: 14px 0; }
html[data-theme="dark"] .ai { border-color: #3a5a26; }
.ai .k { color: var(--accent-ink); }
.field { margin: 14px 0; } .field .k { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; margin-bottom: 4px; } .field .v { font-size: 14px; }
.detail a, .field a { text-decoration: underline; }
.reco { border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; margin: 8px 0; background: var(--surface-2); }
ul.timeline { margin: 6px 0; padding-left: 18px; }
ul.timeline li { margin: 3px 0; }
.orig { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.orig summary { cursor: pointer; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.orig summary:hover { color: var(--brand-ink); }

/* 検索・フィルタ */
.search { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.search .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search input, .search select { height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; background: var(--surface); color: var(--text); font-family: inherit; }
.search ::placeholder { color: var(--muted); }
.search .q { flex: 1; min-width: 200px; }
.chk { display: inline-flex; align-items: center; gap: 7px; height: var(--ctl-h); padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); cursor: pointer; }
.taglabel { font-size: 11.5px; color: var(--muted); font-weight: 700; margin: 14px 0 7px; }
.tagrow { display: flex; gap: 8px; flex-wrap: wrap; }
.ftag { font-size: var(--fs-xs); border-radius: var(--r-pill); padding: 6px 13px; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-3); font-family: inherit; line-height: 1.4; }
.ftag:hover { background: var(--hover); }
.ftag:active { transform: translateY(1px); }
.ftag.own { border-color: #BFE2A0; color: var(--accent-ink); background: var(--accent-soft); }
.ftag.on { background: var(--accent); color: #163a05; border-color: transparent; font-weight: 700; }
.ftag.own.on { background: var(--accent); color: #163a05; }
.adv { display: none; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.adv.open { display: block; }
.adv .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.adv label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; display: block; margin-bottom: 3px; }
.adv .fld input, .adv .fld select { width: 100%; }
.adv .check { display: flex; align-items: center; gap: 7px; align-self: end; padding-bottom: 8px; font-size: 13.5px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600;
  background: var(--accent-soft); color: var(--brand-ink); border-radius: var(--r-pill); padding: 4px 6px 4px 11px; }
.chip button { border: none; background: rgba(79,125,30,.14); color: var(--brand-ink); border-radius: var(--r-pill);
  width: 24px; height: 24px; cursor: pointer; font-size: 13px; line-height: 1; }
.chip button:hover { background: rgba(79,125,30,.26); }
.chip.clear { background: transparent; color: var(--muted); cursor: pointer; padding: 4px 12px; border: 1px solid var(--line); font-family: inherit; }

h2.secttl, .secttl { font-size: var(--fs-sect); color: var(--text); margin: 26px 2px 12px; font-weight: 800; }

/* 免責注釈 */
.site-foot { margin-top: 28px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--fs-xs); line-height: 1.8; color: var(--muted); }
.site-foot strong { color: var(--text-2); }

/* レスポンシブ */
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(2, 1fr); } .tile.big { grid-row: span 1; }
  .adv .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .topbar .ham { display: flex; }
  .sidebar { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: 272px; z-index: 35;
    background: var(--surface); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .18s; height: auto; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 12px 40px rgba(0,0,0,.18); }
  .content { padding: 18px 16px 44px; }
  .detail { max-width: none; }
  .topsearch { max-width: none; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; } .adv .grid { grid-template-columns: 1fr; }
  .topsearch { display: none; }
}
