/* ============================================================
   CLUBS Console — 共有デザインシステム v1
   出典: frame00/clubs-console-demo docs/CLUBS_デザインシステム_v1.md
        （実 Console の computed style 実測＋フリーランス版で確定）
   方針: Chrome はクール（ダークサイドバー＋Heroicons）／Content は温かく
        （カラフルな達成シール・カラーアバター・グラデのシェア帯）。
   使い方: 各コンソールページで <link rel="stylesheet" href="/nippo/console.css" />。
        サイドバーは public/nippo/sidebar.js（mountSidebar）が別で担う。
   ここに一本化することで、各ページが個別 :root を持ってズレるのを防ぐ。
   色が何を意味するか（信頼／情報／未着手／有料）と、その根拠・コントラスト実測は
   docs/design-system-colors.md に置いた。値を変えるときはそちらの手順に従う。
   ============================================================ */

:root {
  /* sidebar（ダーク）— サイドバーは sidebar.js だが content 側の参照用に持つ */
  --side: #161a26;
  --side2: #1c2130;
  --side-text: #c7cbdb;
  --side-label: #7d8398;
  /* surface */
  --bg: #f5f6fb;
  --paper: #ffffff;
  --ink: #151827;
  --ink2: #5b607a;
  --line: #e7e9f2;
  /* brand（インディゴ→バイオレット） */
  --brand1: #4f6bf6;
  --brand2: #8b5cf6;
  /* status */
  /* 信頼の記号（検証済み・記録済み・ログと一致）。コンソールでは緑を使わない
     ——表計算の塗りに見えるため。情報の面（#EEF1FE）と同じ淡さにすると普通の
     チップに埋もれるので、1段だけ格の違う紫を当てる（日報編集の「記録済み（実績）」
     で先に使っている色に揃えた＝新しい色を増やさない）。 */
  --trust: #5b3fd1;
  --trust-bg: #f1eefe;
  --trust-line: #ded7fb;
  /* 情報の面（tool チップ・注記・状態）。 */
  --info: #3b4fd1;
  --info-bg: #eef1fe;
  --info-line: #dce3fb;
  /* 緑は使わない（信頼の記号は --trust に統一した）。旧クラスが参照している間だけ
     エイリアスとして残す——新しく緑を足さない。 */
  --ok: var(--trust);
  /* 金は**有料（PRO）だけ**の意味にする。状態（未記録・下書き・照合中・未対応）に
     使うと、黄色を見ても何を指すのか決まらない。加えて #B7862B は面 #F7EFDD 上で
     2.84:1 しかなく、小さい太字の AA（4.5:1）を満たせない。 */
  /* 金は「地」と「文字」で値を分ける。1つの値で両方を賄えない——地として使う PRO
     バッジ（濃い文字を載せる）は暗くすると読めなくなり、文字として使うプラン名は
     暗くしないと面 #F7EFDD 上で 2.84:1 のままだから。
       --gold      … 地（#2A2008 の文字で 4.94:1）
       --gold-ink  … 文字（面 --gold-t 上で 4.73:1） */
  --gold: #b7862b;
  --gold-ink: #8a6316;
  --gold-hl: #d2a64a;
  --gold-t: #f7efdd;
  /* 有料（PRO）の印。金属のグラデはやめて**平らで軽い金**にする。他のチップと
     同じ作り（淡い面＋濃い文字＋細い枠）なので、コンソールの中で浮かない。
     文字 #8A6316 は面 #FBF4E4 上で 4.94:1。ダークサイドバーの上でも淡い面が
     そのまま効く（面 vs #161A26 で 15.5:1）。 */
  --gold-fill: #fbf4e4;
  --gold-fill-ink: #8a6316;
  --gold-fill-line: #ebdcb4;
  /* まだ手が付いていない状態（未記録・下書き・未対応）。警告でも成功でもない中立。 */
  --idle: #5a6072;
  --idle-bg: #f4f5fa;
  --idle-line: #e4e7f0;
  /* radius / type */
  --r: 14px;
  --body:
    'Inter', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* ── 旧トークン名のエイリアス（移植前の各ページ markup が参照している名前を
        DS の値へ橋渡しする。色は DS に一本化しつつ既存クラスを壊さない）── */
  --indigo: var(--brand1);
  --violet: var(--brand2);
  --ink-2: var(--ink2);
  --muted: var(--ink2);
  --card: var(--paper);
  --radius: var(--r);
  --green: var(--ok);
  --green-2: var(--ok);
  --green-bg: var(--trust-bg);
  --green-line: var(--trust-line);
  --amber-ink: var(--gold-ink);
  --amber-bg: var(--gold-t);
  --amber-line: #e9d9ae;
  --gray-bg: var(--bg);
  --gray-line: var(--line);
}

* {
  box-sizing: border-box;
}

/* hidden 属性は author の display 宣言に負ける（.share{display:flex} 等が
   [hidden] を上書きし「達成シールができました」等が 0件でも描画されていた・
   prerelease 実測）。全コンポーネント共通で hidden を絶対に勝たせる。 */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  /* 地の色。--bg（中立の面）と分けてあるのは、クラブ域が地だけ沈めて中立の面は
     明るいまま残すから（body.club-domain）。追従する帯（BOARD の日付区切り等）は
     地に溶けている必要があるので、この1つを見る。 */
  --ground: var(--bg);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.mono {
  font-family: var(--mono);
}

/* アイコン既定＝Heroicons 相当の 18px。ページ内 innerHTML 注入の svg が
   サイズ未指定で巨大化するのを防ぐ既定（達成シール等は個別に上書き）。 */
svg {
  width: 18px;
  height: 18px;
}

/* ── レイアウト補助（実際の shell 幅・並びは各ページの薄い layout 指定が持つ）── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* モバイル：左ナビ折りたたみ（ドロワー）。見た目の transform は
   NippoSidebar.vue / sidebar.js の NAV_CSS 側（後勝ちのため）。
   ここはトグル・backdrop・コンテンツ幅の共通面。 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}
.nav-toggle-fab {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  box-shadow: 0 2px 10px rgba(18, 22, 45, 0.12);
}
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(18, 22, 45, 0.45);
  cursor: pointer;
}
body.nav-open {
  overflow: hidden;
}
body.nav-open .nav-backdrop {
  display: block;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .content {
    padding: 16px 14px 36px;
  }
  .topbar {
    padding: 12px 14px 10px;
    gap: 8px;
  }
  .topbar h1 {
    font-size: 15px;
  }
  .topbar .date {
    display: none;
  }
  /* カード／グリッドが親幅を突き破らない */
  .grid2,
  .grid2 > *,
  .card {
    min-width: 0;
    max-width: 100%;
  }
  h3.ct,
  .ct {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .ct .ct-t {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
  }
  .rstats {
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .line {
    flex-wrap: wrap;
  }
  .line .via {
    margin-left: 0;
    max-width: 100%;
  }
  .stat {
    min-width: calc(50% - 5px);
  }
  .share {
    flex-direction: column;
    align-items: flex-start;
  }
  .share a {
    margin-left: 0;
  }
  .monthly {
    flex-wrap: wrap;
  }
  .monthly .tag {
    margin-left: 0;
  }
  /* 日報一覧行 */
  .row {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px 14px;
  }
  .row .date {
    width: auto;
  }
  .row .badge {
    margin-left: auto;
  }
  .row .chev {
    display: none;
  }
  .head {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ── トップバー（sticky・ブラー・下罫線／左=見出し 右=メタ）── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 246, 251, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px 12px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}
.topbar .crumb {
  font-size: 13px;
  color: var(--ink2);
}
.topbar .crumb b {
  color: var(--ink);
  font-weight: 800;
}
.topbar .sp,
.topbar .spacer {
  flex: 1;
}
.topbar .date {
  font-size: 12px;
  color: var(--ink2);
}
.plan-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--idle);
  background: var(--idle-bg);
  border: 1px solid var(--idle-line);
  border-radius: 999px;
  padding: 5px 12px;
}
.topbar .signout {
  margin-left: auto;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.topbar .signout:hover {
  color: var(--ink);
  background: #fff;
}

/* ── クラブ域の地色 ─────────────────────────────────────────
   マイ域B（個人）とクラブ域C を、開いた瞬間に地の色で見分けられるようにする。
   暖色は業務の面に合わなかったので、**寒色のまま深く**する（#E0E3ED）。
   淡すぎると並べないと分からない（#EDF0F8 では地との差が 1〜3% しかなかった）。
   青に寄せすぎると水色で甘くなるので、**彩度を落としたスレート**にする
   （B-R の差を 18 → 10 に。暗いサイドバーとも釣り合う）。
   白いカードとの差が開くぶん、カードが浮いて表が読みやすくなる。
   ※ いまは「クラブ域である」印。**有料であることの断定表示（金のバッジ・プラン名）
     は課金・エンタイトルメントが入ってから**——実装が無いうちに有料と書かない。 */
body.club-domain {
  /* 沈めるのは**地だけ**。チップ・入力・ホバー（--bg）は白いカードの上に載る
     ものなので、地に合わせて暗くすると「業務 3件」等のラベルまで沈んで、面
     全体がのっぺりする。中立の面は明るいまま残し、罫線だけ少し締める。 */
  --line: #dde1ec;
  --ground: #e0e3ed;
  background: var(--ground);
}
body.club-domain .topbar {
  background: rgba(224, 227, 237, 0.92);
  border-bottom-color: #cdd3e1;
}

/* ── トップバー右側（全ページ共通）＝ 通知ベル＋アカウント ──────────
   マークアップは /nippo/topbar.js が入れる。ページごとに右上が違うと
   「共通のもの」に見えないので、見た目はここに一本化する。
   ※ .topbar に position:relative を足さないこと——上の sticky を打ち消して
     トップバーが追従しなくなる。sticky のままでも絶対配置の基準にはなる。 */
.tbright {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.bell {
  position: relative;
  /* ページ側に素の `button {}` 規則（設定など）があっても潰れないよう、
     余白と行送りを明示する。padding を継いだままだと 34px の箱の中身が
     0 になってアイコンが消える。 */
  padding: 0;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.bell:hover {
  border-color: #cfd6ee;
  color: var(--ink);
}
.bell svg {
  width: 17px;
  height: 17px;
}
/* 未読の点。件数は開けば分かるので、閉じているときは「ある/ない」だけ伝える。 */
.bell.has::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand2);
}
.meav {
  padding: 0;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg) center/cover no-repeat;
  color: var(--ink2);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.tbpanel {
  position: absolute;
  top: 52px;
  right: 26px;
  z-index: 20;
  width: min(320px, calc(100vw - 40px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 34px rgba(30, 36, 70, 0.14);
}
.ntfpanel .ntf {
  display: block;
  padding: 9px 11px;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
}
.ntfpanel a.ntf:hover {
  background: var(--bg);
}
.ntfpanel .nt {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
}
.ntfpanel .ns {
  display: block;
  font-size: 11px;
  color: var(--ink2);
}
.ntfpanel .empty {
  font-size: 12.5px;
  color: var(--ink2);
}
.accmenu .acchead {
  padding: 9px 11px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}
.accmenu .accname {
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* プランは常時ピルで出さずここに置く。無料の面で毎ページ言っても行動は変わらず、
   有料の印はサイドバーの PRO マークが担っている。 */
.accmenu .accplan {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink2);
  font-weight: 700;
}
.accmenu .accitem {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  text-decoration: none;
}
.accmenu .accitem:hover {
  background: var(--bg);
}
@media (max-width: 760px) {
  .tbpanel {
    right: 12px;
  }
}

/* content 幅は各ページで（一覧 900 / 編集 820 等）。既定は広め。 */
.content {
  padding: 22px 26px 44px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ── カード / スタット ── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(18, 22, 45, 0.05);
}
.pad {
  padding: 16px 18px;
}

/* ── ヒーロー（ホーム）── */
.hero {
  padding: 18px 20px;
}
.hero .row {
  display: flex;
  align-items: center;
  gap: 13px;
}
.hero .av {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(160deg, #66b9d8, #3e93b5);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  flex: none;
  overflow: hidden;
}
.hero .nm {
  font-weight: 800;
  font-size: 17px;
}
/* 名前は左メニューにも出るので、右ヒーローは AI であることを添えて役割を差別化。
   システム固定タグ（名前とは独立・偽装不能）。 */
.hero .aitag {
  display: inline-flex;
  align-items: center;
  margin: 3px 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #4f6bf6;
  background: #eef1fe;
  border: 1px solid #dce3fb;
  border-radius: 999px;
  padding: 2px 9px;
}
.hero .sub {
  font-size: 11px;
  color: var(--ink2);
  font-family: var(--mono);
}

.stats {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.stat {
  flex: 1;
  min-width: 140px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
}
.stat .l {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink2);
}
.stat .n {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .n small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
}
.stat .k {
  font-size: 9.5px;
  color: var(--ink2);
  font-weight: 700;
  margin-top: 3px;
}

/* ── 2カラム／セクション見出し／チップ ── */
.grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.grid2 > * {
  min-width: 0;
}
@media (max-width: 880px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}
h3.ct,
.ct {
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ct .ct-t {
  min-width: 0;
  flex: 1 1 auto;
}
.chip {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.chip.wait,
.chip.draft {
  background: var(--idle-bg);
  color: var(--idle);
}
.chip.ok {
  background: var(--trust-bg);
  color: var(--trust);
}

/* ── 直近の日報：集計行＋作業行（ホーム）── */
.rstats {
  font-size: 11.5px;
  color: var(--ink2);
  margin-bottom: 9px;
  font-weight: 600;
}
.rstats b {
  color: var(--ink2);
}
.rstats .ok {
  color: var(--trust);
}
.line {
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.line:last-of-type {
  border-bottom: none;
}
.line .n {
  font-weight: 700;
  color: var(--brand1);
  min-width: 40px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.line .t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line .via {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--ink2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
  flex: none;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── ピル型アクション（ホーム）── */
.acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.acts a {
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  padding: 8px 15px;
  text-decoration: none;
}
.a-ok {
  background: var(--brand1);
  color: #fff;
}
.a-line {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink2);
}
.empty {
  font-size: 13px;
  color: var(--ink2);
}
.morelink {
  display: block;
  text-align: center;
  margin-top: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand1);
  text-decoration: none;
}

/* ── 達成シール（Content 側の"温かさ"：絵柄は色を持つ）── */
.ach {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.ach .m {
  width: 58px;
  text-align: center;
}
.ach .mc {
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
}
.ach .mc svg {
  width: 30px;
  height: 30px;
} /* 達成の絵柄は既定 18px を上書き */
.ach .ml {
  font-size: 8.5px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.2;
  color: var(--ink2);
}

/* ── シェア帯（グラデ・白字）── */
.share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--brand1), var(--brand2));
  border-radius: var(--r);
  padding: 15px 18px;
  color: #fff;
}
.share .st {
  font-weight: 800;
  font-size: 14px;
}
.share .ss {
  font-size: 11px;
  opacity: 0.92;
}
.share a {
  margin-left: auto;
  background: #fff;
  color: var(--brand1);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

/* ── 定期レポートへの導線（破線・タグ）── */
/* 帯そのものがリンク（/nippo/monthly）。下線は出さず、ホバーで枠を寄せる。 */
.monthly {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px dashed #d7ddf3;
  border-radius: var(--r);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink2);
  text-decoration: none;
}
.monthly:hover {
  border-color: var(--brand1);
  background: #fcfcfe;
}
.monthly svg {
  color: var(--brand1);
  flex: none;
}
.monthly b {
  color: var(--ink);
}
.monthly .tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-fill-ink);
  background: var(--gold-fill);
  border: 1px solid var(--gold-fill-line);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   日報一覧（reports/index）
   ============================================================ */
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.head .h1,
.h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}
.head .sub {
  font-size: 13px;
  color: var(--ink2);
  margin-top: 3px;
}
.agentsel {
  font-size: 13px;
  color: var(--ink2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.agentsel .av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand2), var(--brand1));
}

.month {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 640px) {
  .month {
    grid-template-columns: repeat(2, 1fr);
  }
}
.mcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.mcard .k {
  font-size: 11px;
  color: var(--ink2);
  font-weight: 600;
}
.mcard .v {
  font-size: 21px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.mcard .v small {
  font-size: 12px;
  color: var(--ink2);
  font-weight: 600;
}
.mcard .v .flame {
  color: #e8730c;
}

.listlabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  margin: 0 0 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.row:hover {
  border-color: #cfd6ee;
  box-shadow: 0 2px 10px rgba(20, 26, 38, 0.05);
}
.row .date {
  width: 96px;
  flex: none;
}
.row .date .d {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.row .date .w {
  font-size: 11px;
  color: var(--ink2);
}
.row .mid {
  flex: 1;
  min-width: 0;
}
.row .agent {
  font-size: 13px;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 3px;
}
/* display:block で、汎用 .metrics（4カラムgrid）の巻き込みを打ち消す。
   行の実働・実行・成功率は1行のインラインテキストとして流す。 */
.row .metrics {
  display: block;
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 0;
  font-variant-numeric: tabular-nums;
}
.row .metrics b {
  color: var(--ink);
  font-weight: 700;
}
.row .chev {
  color: #b7becf;
  flex: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.badge svg {
  width: 13px;
  height: 13px;
}
.badge.recorded,
.badge.anchored {
  color: var(--trust);
  background: var(--trust-bg);
  border-color: var(--trust-line);
}
.badge.pending {
  color: var(--ink2);
  background: var(--bg);
  border-color: var(--line);
}
.badge.draft {
  color: var(--idle);
  background: var(--idle-bg);
  border-color: var(--idle-line);
}

/* ============================================================
   日報を編集して記録（reports/edit）
   ============================================================ */
.pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill svg {
  width: 13px;
  height: 13px;
}
.pill.verified {
  color: var(--trust);
  background: var(--trust-bg);
  border: 1px solid var(--trust-line);
}
/* 自動照合済み: どの日報でも常に真の性質＝知らせるべき変化ではないので中立チップ。
   「ログから自動集計・編集不可」と同類の地味さに揃え、照合の意味は ✓ の緑だけ残す。 */
.pill.auto {
  color: var(--ink2);
  background: var(--bg);
  border: 1px solid var(--line);
}
.pill.auto svg {
  color: var(--ink2);
}
/* 未記録 → 記録済み は「変わる状態」。記録済みは達成なので記録バナーと同じ
   ブランド色で連動させる（緑は照合・一致の色なので達成には使わない）。 */
.pill.unrec {
  color: var(--idle);
  background: var(--idle-bg);
  border: 1px solid var(--idle-line);
}
.pill.rec {
  color: #5b3fd1;
  background: #f1eefe;
  border: 1px solid #ded7fb;
}

/* 記録できた瞬間のごほうび。ここは「検証済みの緑」ではなくブランド色で祝う
   （緑は照合・成功の色で、事務的に見える）。シールの開封バンドと同じ語彙に揃える。 */
/* 記録完了バナー（日報編集）。クラス名は .recorded にしていたが、日報一覧の
   `.badge recorded`（「記録済み」バッジ）にも当たって、バッジが display:none で
   丸ごと消えていた（一覧に状態が出ていなかった原因）。バナー側を改名して切り離す。 */
.recbanner {
  display: none;
  background: linear-gradient(135deg, #f4f2fe, #edf1fe);
  border: 1px solid #dde1fa;
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 20px;
  align-items: center;
  gap: 14px;
}
.recbanner.show {
  display: flex;
}
.recbanner .rc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.13);
}
.recbanner .rc svg {
  width: 22px;
  height: 22px;
}
.recbanner a {
  color: var(--brand1);
  text-decoration: none;
  font-weight: 700;
}
.recbanner .rtitle {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}
.recbanner .rtext {
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 3px;
}

.h1 .agent {
  color: var(--brand1);
}
.daterow {
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink2);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.section-label .lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}
.section-label .lock svg {
  width: 12px;
  height: 12px;
}
.section-label .edhint {
  font-size: 11.5px;
  color: var(--brand1);
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
@media (max-width: 640px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metric {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.metric .mk {
  font-size: 11px;
  color: var(--ink2);
  font-weight: 600;
}
.metric .mv {
  font-size: 22px;
  font-weight: 800;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.metric .mv small {
  font-size: 13px;
  color: var(--ink2);
  font-weight: 600;
}

.block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.block .bhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.block .tool {
  font-size: 11px;
  color: var(--brand1);
  font-weight: 700;
  background: #eef1fe;
  border: 1px solid #dce3fd;
  padding: 2px 8px;
  border-radius: 6px;
}
.block .metricline {
  font-size: 12px;
  color: var(--ink2);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.block .metricline svg {
  width: 12px;
  height: 12px;
  flex: none;
}
.fieldlabel {
  font-size: 11px;
  color: var(--ink2);
  font-weight: 600;
  margin: 0 0 4px;
}

input.title,
textarea.body {
  width: 100%;
  font-family: inherit;
  color: var(--ink);
  background: #fcfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  resize: vertical;
}
input.title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
}
textarea.body {
  font-size: 14px;
  line-height: 1.7;
  min-height: 72px;
}
input.title:focus,
textarea.body:focus {
  outline: none;
  border-color: var(--brand1);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 107, 246, 0.12);
}
input[readonly],
textarea[readonly] {
  background: #f3f4f7;
  color: var(--ink2);
}

.subhead {
  font-size: 15px;
  font-weight: 800;
  margin: 26px 0 10px;
}

.recbar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 16px 0;
}
.recbar .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.recbar .note {
  font-size: 12px;
  color: var(--ink2);
  flex: 1;
}

/* ボタン（DS §7: primary=brand1 フラット・白字／secondary=白地・罫線）。
   移植前は primary がグラデだったが DS はフラット。 */
.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn.secondary:hover {
  background: var(--bg);
}
.btn.primary {
  color: #fff;
  border-color: transparent;
  background: var(--brand1);
}
.btn.primary:hover {
  filter: brightness(1.05);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* キーボードフォーカスの可視化（アクセシビリティ） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand1);
  outline-offset: 2px;
}

/* ============================================================
   達成シール（ダイカット＋レアリティ意匠）
   正: reference/01_達成シールシステム.reference.html v1（確定）。
   マークアップ生成は /nippo/sticker.js（#gloss 等の defs 注入もそちら）。
   動くのは EPIC のグリント（3.6s 間欠）と LEGENDARY だけ。印刷/OGP は静止でも成立。
   ============================================================ */
@keyframes dc-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes dc-tw {
  0%,
  100% {
    transform: scale(0.2) rotate(0);
    opacity: 0;
  }
  45% {
    transform: scale(1.15) rotate(30deg);
    opacity: 1;
  }
}
@keyframes dc-sweep {
  0% {
    transform: translateX(-13px);
  }
  100% {
    transform: translateX(17px);
  }
}
@keyframes dc-glint {
  0%,
  66% {
    transform: translateX(-22px);
    opacity: 0;
  }
  74% {
    opacity: 0.95;
  }
  84% {
    transform: translateX(20px);
    opacity: 0.95;
  }
  92%,
  100% {
    transform: translateX(22px);
    opacity: 0;
  }
}

.dcwrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dcwrap .dc {
  overflow: visible;
  display: block;
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
}
.dc.tiltL {
  transform: rotate(-5deg);
}
.dc.tiltR {
  transform: rotate(5deg);
}
/* 小サイズ（ホームの直近チップ等） */
.dcwrap.sm {
  width: 56px;
  height: 56px;
}
.dcwrap.sm .dc {
  width: 48px;
  height: 48px;
}
/* 未獲得＝グレーの抜き型（意匠なし） */
.dcwrap.locked .dc {
  filter: grayscale(1);
  opacity: 0.38;
}
/* 未開封＝シルエット（ぼんやり・形の気配だけ・中身/色/数字は出さない）。 */
.dcwrap.sil .dc {
  filter: brightness(0) blur(3.5px);
  opacity: 0.16;
}
.ach .ml.sealed {
  color: var(--ink2);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* RARE：暖色の逆光（静止） */
.backglow::before {
  content: '';
  position: absolute;
  width: 104%;
  height: 104%;
  border-radius: 50%;
  z-index: 0;
  filter: blur(7px);
  background: radial-gradient(
    closest-side,
    rgba(232, 115, 12, 0.72),
    transparent 74%
  );
}
/* EPIC：明るいシルバーのぼんやりグロー（静止・大きめ）＋クローム＋グリント */
.silverglow::before {
  content: '';
  position: absolute;
  width: 132%;
  height: 132%;
  border-radius: 50%;
  z-index: 0;
  filter: blur(11px);
  background: radial-gradient(
    closest-side,
    rgba(238, 244, 253, 0.9),
    rgba(176, 190, 216, 0.6) 46%,
    rgba(150, 166, 198, 0.26) 68%,
    transparent 82%
  );
}
.dc .bar {
  animation: dc-glint 3.6s ease-in-out infinite;
}
/* LEGENDARY：虹オーラ（ふわっと回る）＋キラキラ＋光の筋 */
.rainaura::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  z-index: 0;
  filter: blur(10px);
  opacity: 0.92;
  background: conic-gradient(
    from 200deg,
    #ff9ee5,
    #9ed4ff,
    #9effc4,
    #fff0a0,
    #ffc0a0,
    #b79eff,
    #ff9ee5
  );
  animation: dc-spin 5.5s linear infinite;
}
.dc .shine {
  animation: dc-sweep 2.1s ease-in-out infinite alternate;
}
.dcwrap .spark {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 240, 190, 1));
}
.dcwrap .spark svg {
  display: block;
  fill: #fff;
  width: 100%;
  height: 100%;
}
.dcwrap .sp1 {
  top: -2%;
  left: 8%;
  width: 19%;
  height: 19%;
  animation: dc-tw 1.25s ease-in-out 0s infinite;
}
.dcwrap .sp2 {
  top: 48%;
  left: 74%;
  width: 15%;
  height: 15%;
  animation: dc-tw 1.25s ease-in-out 0.4s infinite;
}
.dcwrap .sp3 {
  top: 64%;
  left: 2%;
  width: 12%;
  height: 12%;
  animation: dc-tw 1.25s ease-in-out 0.8s infinite;
}

/* 称号＝名札（金・銀）。金=上位（RARE以上）・銀=標準 */
.plate {
  width: 120px;
  height: 74px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6e5ce6, #8b5cf6);
  border: 4px solid #e7b44b;
  box-shadow:
    0 6px 14px rgba(20, 26, 38, 0.22),
    0 0 0 1px rgba(201, 150, 46, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform: rotate(-3deg);
  position: relative;
  overflow: hidden;
}
.plate.slv {
  border-color: #c4cbd6;
  box-shadow:
    0 6px 14px rgba(20, 26, 38, 0.22),
    0 0 0 1px rgba(150, 160, 175, 0.55);
  transform: rotate(3deg);
}
.plate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0) 42%
  );
  pointer-events: none;
}
.plate .bi {
  width: 32px;
  height: 32px;
}
.plate .bt {
  font-size: 10.5px;
  font-weight: 900;
  color: #fff;
}
/* シール帳の狭い列（モバイル3列）でプレートがはみ出さないように */
.album .plate {
  max-width: 100%;
}

/* シール帳（集める面）：ダイカットを傾けて、空き枠は抜き型 */
.album {
  background:
    radial-gradient(circle at 20px 20px, #e3e7f1 2px, transparent 2px) 0 0/40px
      40px,
    #fbfcff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 30px 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 14px;
  justify-items: center;
  align-items: end;
}
@media (max-width: 760px) {
  .album {
    grid-template-columns: repeat(3, 1fr);
    padding: 24px 14px;
    gap: 20px 10px;
  }
}
.album .albumitem {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.album .albumitem:hover {
  transform: translateY(-3px);
}
.album .albumitem:focus-visible {
  outline: 2px solid var(--brand1);
  outline-offset: 4px;
  border-radius: 12px;
}
.album .albumitem .newbadge {
  position: absolute;
  top: 0;
  right: 4px;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #4f6bf6, #8b5cf6);
  border-radius: 999px;
  padding: 2px 7px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(79, 107, 246, 0.35);
}
.album .dcwrap {
  width: 118px;
  height: 118px;
}
.album .dcwrap .dc {
  width: 100px;
  height: 100px;
}
.album .slot {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed #c9cedc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b6bccb;
  font-size: 24px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.4);
}

/* ホームの直近チップにシール実物を置く場合（.mc の白箱をやめて素で貼る） */
.ach .mc.sticker {
  background: transparent;
  border: 0;
}
.ach .mc.sticker .dcwrap {
  width: 52px;
  height: 52px;
}
.ach .mc.sticker .dcwrap .dc {
  width: 44px;
  height: 44px;
}
