/* ace-ui — 基幹 ERP の共通デザイン (2026-10-20 user 決定: BOTO App 視覚稿 v4 の世界に統一、後で拡張できる形で)
   参照: ~/boto-speaker-app/ios/design/home-v4.html / 使い方: docs/design/ace-ui.md / 見本: /ui
   ルール:
   - 色・角丸・影・余白は下の変数だけを使う (画面に #xxxxxx を直書きしない)。足りない時はここに変数を足す
   - クラスは au- 始まり。画面固有のスタイルは画面側で au- 以外の名前を使う
   - 書体は ace-font.css (site_font.py が全画面に差し込む) の --ace-font / --ace-mono。本文・表・入力は 14px に揃っている */

/* hidden 属性は部品の display 指定より強く (.au-btn の inline-flex 等で消えなくなる事故 2026-10-21) */
[hidden] { display: none !important; }

/* ───────── 1. 変数 (トークン) ───────── */
:root {
  /* 地と面 */
  --au-bg: #f6f5f2;          /* ページの地 (暖かい明るいグレー) */
  --au-card: #ffffff;        /* カード・一覧 */
  --au-soft: #faf9f7;        /* カードの中で一段沈めた面 (開いた行・入力欄の地) */
  --au-sunk: #f0efec;        /* チップ・トラック・無効 */
  --au-line: #ebe9e4;        /* 細い線 */
  --au-line-strong: #dcd9d2;
  /* 文字 */
  --au-ink: #111111;
  --au-ink-2: #3d3d3d;
  --au-mut: #6b6b6b;
  --au-faint: #77746e;  /* 2026-10-23 #a8a6a0 (白地 2.4:1、読めない) → 4.7:1 */
  /* 主色 (押せる物・要点の数字・選択中) */
  --au-accent: #ff5a1f;
  --au-accent-2: #ff9a3d;
  --au-accent-soft: #fff0e8;
  --au-accent-ink: #b23d0c;
  /* 意味の色 (主色とは別に数える) */
  --au-ok: #1f8a5b;    --au-ok-soft: #e8f5ee;
  --au-warn: #b23d0c;  --au-warn-soft: #fff0e8;
  --au-ng: #c0362c;    --au-ng-soft: #fdecea;
  --au-info: #2a4fa3;  --au-info-soft: #eaf1ff;
  /* 黒い面 (主カード・プレーヤー) */
  --au-dark: #0d0d0f; --au-dark-2: #18181b; --au-dark-3: #232327; --au-dark-mut: #a1a1aa;
  /* グラフの系列 (この順に使う) */
  --au-c1: #ff5a1f; --au-c2: #111111; --au-c3: #2a4fa3; --au-c4: #1f8a5b; --au-c5: #ff9a3d; --au-c6: #7a5cff;
  /* 形 */
  --au-r-xs: 8px; --au-r-sm: 12px; --au-r-md: 16px; --au-r-lg: 20px; --au-r-xl: 24px; --au-r-pill: 999px;
  --au-shadow: 0 1px 2px rgba(17,17,17,.04), 0 6px 20px rgba(17,17,17,.06);
  --au-shadow-lg: 0 18px 40px rgba(17,17,17,.18);
  /* 余白 (4 の倍数) */
  --au-s1: 4px; --au-s2: 8px; --au-s3: 12px; --au-s4: 16px; --au-s5: 20px; --au-s6: 24px; --au-s8: 32px; --au-s10: 40px;
  /* 文字の大きさ (本文 14px は ace-font.css が揃える) */
  --au-fs-xs: 14px; --au-fs-sm: 14px; --au-fs-md: 15px; --au-fs-lg: 17px; --au-fs-xl: 22px; --au-fs-2xl: 28px; --au-fs-3xl: 32px;
  /* 配置 */
  --au-side-w: 248px; --au-page-max: 1280px; --au-top-h: 56px;
  --au-font: var(--ace-font, 'Noto Sans JP', 'Hiragino Sans', 'PingFang SC', sans-serif);
  --au-mono: var(--ace-mono, ui-monospace, Menlo, Consolas, monospace);
  --au-ease: cubic-bezier(.2,.8,.2,1);
}

/* ───────── 2. 土台 ───────── */
body.au { margin: 0; background: var(--au-bg); color: var(--au-ink); font-family: var(--au-font); font-size: var(--au-fs-md); line-height: 1.6;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
:where(.au) *, :where(.au) *::before, :where(.au) *::after { box-sizing: border-box; }
.au ::selection { background: #ffd9c7; color: var(--au-ink); }
:where(.au) a { color: inherit; }
.au a.au-link, .au .au-link { color: var(--au-accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.au :focus-visible { outline: 2px solid var(--au-accent); outline-offset: 2px; }
:where(.au) button { font-family: inherit; color: inherit; }
:where(.au) img { max-width: 100%; }
.au ::-webkit-scrollbar { width: 10px; height: 10px; }
.au ::-webkit-scrollbar-thumb { background: var(--au-line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.au { scrollbar-color: var(--au-line-strong) transparent; }
.au-svg { width: 18px; height: 18px; flex: none; display: block; }
.au-svg.sm { width: 15px; height: 15px; } .au-svg.lg { width: 22px; height: 22px; }

/* ───────── 3. 骨組み: サイドバー + 本文 (スマホは引き出し) ───────── */
.au-app { display: grid; grid-template-columns: var(--au-side-w) minmax(0,1fr); min-height: 100vh; }
.au-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--au-card); border-right: 1px solid var(--au-line);
  padding: var(--au-s4) var(--au-s3) var(--au-s8); display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.au-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; text-decoration: none; font-weight: 800; font-size: var(--au-fs-lg); letter-spacing: -.01em; }
.au-brand-mark { width: 30px; height: 30px; border-radius: 10px; background: conic-gradient(from 200deg, var(--au-accent), var(--au-accent-2), #ffd166, var(--au-accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
/* わたし (左メニュー上: 頭像 + 座右の銘 → わたしのプロフィール、2026-10-30 ロゴの代わり) */
.au-me { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; text-decoration: none; color: var(--au-ink); }
.au-me:hover { text-decoration: none; }
.au-me-av { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--au-sunk); }
.au-me-av.is-initial { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: var(--au-fs-lg);
  background: conic-gradient(from 200deg, var(--au-accent), var(--au-accent-2), #ffd166, var(--au-accent)); }
.au-me-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.au-me-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-me-motto { font-size: var(--au-fs-sm); color: var(--au-mut); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.au-nav-sec { font-size: var(--au-fs-xs); font-weight: 700; color: var(--au-faint); padding: 14px 10px 4px; letter-spacing: .04em; }
.au-nav-a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--au-r-sm); text-decoration: none; color: var(--au-ink-2);
  font-size: var(--au-fs-md); min-height: 38px; transition: background .15s var(--au-ease); }
.au-nav-a .au-svg { color: var(--au-mut); }
.au-nav-a:hover { background: var(--au-sunk); }
.au-nav-a.is-active { background: var(--au-ink); color: #fff; font-weight: 600; }
.au-nav-a.is-active .au-svg { color: #fff; }
.au-nav-a .au-nav-ext { margin-left: auto; color: var(--au-faint); }
.au-nav-a.is-wip { opacity: .5; pointer-events: none; }
/* 自分で並べ替える (iPhone のホーム画面方式、ace-nav.js): 長押し or「編集」で揺れる → ⊖ で外す・ドラッグで並び替え → 完了 */
.au-nav-a { position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.au-nav-rm { position: absolute; left: -4px; top: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--au-ng); color: #fff; font-size: 15px; line-height: 17px;
  text-align: center; font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; z-index: 1; }
.au-nav-rm[hidden] { display: none; }
.au-side.is-edit .au-nav-a { animation: au-wiggle .28s ease-in-out infinite alternate; cursor: grab; background: var(--au-sunk); margin-bottom: 3px; }
.au-side.is-edit .au-nav-a:nth-child(2n) { animation-delay: -.14s; }
.au-side.is-edit .au-nav-a.is-active { background: var(--au-ink); }
.au-side.is-edit .au-nav-a.is-dragging { opacity: .35; animation: none; }
/* 基本項目 (ace_nav.LOCKED): 編集中も揺れない・外せない・動かせない */
.au-side.is-edit .au-nav-a.is-locked { animation: none; cursor: default; background: transparent; box-shadow: inset 0 0 0 1px var(--au-line); }
.au-side.is-edit .au-nav-a.is-locked.is-active { background: var(--au-ink); }
.au-nav-lib-a.is-locked { opacity: .3; cursor: default; }
.au-side.is-edit .au-nav-a.is-over { box-shadow: 0 -2px 0 0 var(--au-accent); }
.au-nav-use { margin-left: auto; font-size: 14px; color: var(--au-faint); white-space: nowrap; }
@keyframes au-wiggle { from { transform: rotate(-.8deg); } to { transform: rotate(.8deg); } }
@media (prefers-reduced-motion: reduce) { .au-side.is-edit .au-nav-a { animation: none; } }
.au-nav-foot { display: flex; gap: 6px; margin: 14px 6px 0; }
.au-nav-foot-b { flex: 1; border: 0; background: var(--au-soft); color: var(--au-mut); border-radius: var(--au-r-pill); padding: 6px 10px; font-size: var(--au-fs-xs); font-weight: 700; cursor: pointer; }
.au-nav-foot-b:hover { background: var(--au-sunk); color: var(--au-ink); }
.au-nav-foot-b.is-done { background: var(--au-ink); color: #fff; }
.au-nav-foot-b[hidden] { display: none; }
.au-nav-foot-b b { font-weight: 800; color: var(--au-ink); }
/* 右の面板「すべてのページ」(編集中だけ、ace-nav.js が作る): 左→右 = 外す、右→左 = 入れる */
.au-side.is-edit { z-index: 70; }   /* sticky の側欄は層叠文脈を作る → 編集中は側欄ごと画面の固定ヘッダ (表頭) より上に */
.au-nav-lib-panel { position: fixed; top: 0; left: var(--au-side-w); width: 272px; height: 100vh; overflow-y: auto; z-index: 75; padding: 14px 10px 20px;
  background: var(--au-card); border-right: 1px solid var(--au-line); box-shadow: var(--au-shadow-lg); animation: au-slide-in .2s var(--au-ease); }
.au-nav-lib-panel.is-drop { background: var(--au-ng-soft); }
@keyframes au-slide-in { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.au-nav-lib-h { font-size: var(--au-fs-lg); font-weight: 800; letter-spacing: -.01em; padding: 4px 6px 0; }
.au-nav-lib-hint { font-size: 14px; color: var(--au-faint); padding: 2px 6px 8px; }
.au-nav-lib-sec { font-size: var(--au-fs-xs); font-weight: 700; color: var(--au-faint); padding: 12px 6px 4px; }
.au-nav-lib-a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin-bottom: 4px; border-radius: var(--au-r-sm); background: var(--au-sunk); cursor: grab; user-select: none; -webkit-user-select: none; }
.au-nav-lib-a .au-svg { color: var(--au-mut); }
.au-nav-lib-a.is-on { opacity: .38; cursor: default; }
.au-nav-lib-a.is-dragging { opacity: .35; }
.au-nav-lib-t { flex: 1; min-width: 0; font-size: var(--au-fs-sm); line-height: 1.3; }
.au-nav-lib-t small { display: block; color: var(--au-faint); font-size: 14px; }
.au-nav-lib-add { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--au-ink); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; flex: none; }
.au-nav-lib-a.is-on .au-nav-lib-add { background: var(--au-soft); color: var(--au-mut); cursor: default; }
.au-nav-lib-foot { margin-top: 14px; }
.au-nav-grp.is-target { outline: 2px dashed var(--au-accent); outline-offset: 4px; border-radius: var(--au-r-sm); min-height: 24px; }
@media (max-width: 1023px) {
  .au-nav-lib-panel { position: static; width: auto; height: auto; margin: 14px -4px 0; border-top: 1px solid var(--au-line); border-right: 0; box-shadow: none; animation: none; }
}
.au-viewas { margin: 0 0 8px; padding: 10px; border-radius: var(--au-r-md); background: var(--au-soft); box-shadow: inset 0 0 0 1px var(--au-line); }
.au-viewas label { display: block; font-size: var(--au-fs-xs); color: var(--au-mut); margin-bottom: 4px; }
.au-viewas.is-on { background: var(--au-accent-soft); box-shadow: none; }
.au-main { min-width: 0; display: flex; flex-direction: column; }
.au-topbar { display: none; }
.au-page { width: 100%; max-width: var(--au-page-max); margin: 0 auto; padding: var(--au-s6) var(--au-s8) var(--au-s10); }
.au-page.is-wide { max-width: none; }
.au-app.is-bare { display: block; }
.au-page.is-flush { max-width: none; padding: 0; }
.au-mask { display: none; }
/* 横に広い表の画面: PC でもメニューを引き出しにする ({% set au_side_collapsed = true %}、2026-11-04 現金流) */
@media (min-width: 1024px) {
  .au-app.is-collapsed { grid-template-columns: minmax(0,1fr); }
  .au-app.is-collapsed .au-side { position: fixed; z-index: 60; left: 0; top: 0; width: var(--au-side-w); transform: translateX(-102%);
    transition: transform .25s var(--au-ease); box-shadow: var(--au-shadow-lg); }
  .au-app.is-collapsed.is-nav .au-side { transform: none; }
  .au-app.is-collapsed .au-mask { position: fixed; inset: 0; z-index: 59; background: rgba(17,17,17,.35); }
  .au-app.is-collapsed.is-nav .au-mask { display: block; }
  .au-app.is-collapsed .au-topbar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 10px; min-height: var(--au-top-h);
    padding: 8px var(--au-s8); background: rgba(246,245,242,.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
  .au-app.is-collapsed .au-topbar-t { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 1023px) {
  .au-app { grid-template-columns: minmax(0,1fr); }
  .au-side { position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s var(--au-ease);
    box-shadow: var(--au-shadow-lg); padding-top: calc(var(--au-s4) + env(safe-area-inset-top, 0px)); }
  .au-app.is-nav .au-side { transform: none; }
  .au-mask { position: fixed; inset: 0; z-index: 59; background: rgba(17,17,17,.35); }
  .au-app.is-nav .au-mask { display: block; }
  .au-topbar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 10px; min-height: var(--au-top-h);
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    background: rgba(246,245,242,.92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
  .au-topbar-t { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .au-page { padding: var(--au-s3) max(16px, env(safe-area-inset-right, 0px)) var(--au-s10) max(16px, env(safe-area-inset-left, 0px)); }
}

/* ───────── 4. ページの見出し ───────── */
.au-head { display: flex; align-items: flex-end; gap: var(--au-s4); flex-wrap: wrap; margin-bottom: var(--au-s5); }
.au-head-main { flex: 1 1 320px; min-width: 0; }
.au-status { font-size: var(--au-fs-sm); color: var(--au-mut); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.au-title { margin: 4px 0 0; font-size: var(--au-fs-2xl); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.au-hello { margin: 6px 0 0; font-size: var(--au-fs-3xl); line-height: 1.22; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.au-em { background: linear-gradient(90deg, var(--au-accent), var(--au-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.au-lead { margin: 8px 0 0; color: var(--au-ink-2); max-width: 68ch; }
.au-actions { display: flex; gap: var(--au-s2); flex-wrap: wrap; align-items: center; }
.au-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--au-s3); margin: var(--au-s8) 2px var(--au-s3); }
.au-sec-h h2, .au-sec-h h3 { margin: 0; font-size: var(--au-fs-lg); font-weight: 700; letter-spacing: -.01em; }
.au-sec-h a, .au-sec-h .au-sec-link { font-size: var(--au-fs-md); color: var(--au-mut); text-decoration: none; }
@media (max-width: 1023px) { .au-title { font-size: 24px; } .au-hello { font-size: 27px; } }

/* ───────── 5. 面: カード / 主カード / 数字タイル ───────── */
.au-card { background: var(--au-card); border-radius: var(--au-r-lg); box-shadow: inset 0 0 0 1px var(--au-line); padding: var(--au-s4) var(--au-s5); min-width: 0; }
.au-card.is-flush { padding: 0; overflow: hidden; }
.au-card-h { display: flex; align-items: center; gap: var(--au-s3); margin-bottom: var(--au-s3); }
.au-card-h h3 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.au-grid { display: grid; gap: var(--au-s3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.au-grid.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .au-grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.au-grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1023px) { .au-grid.c3, .au-grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .au-grid.c3 { grid-template-columns: minmax(0,1fr); } }
.au-tile { background: var(--au-card); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--au-line); padding: 14px 16px 13px; min-width: 0; }
.au-tile-k { font-size: var(--au-fs-sm); font-weight: 600; color: var(--au-mut); }
.au-tile-v { font-size: var(--au-fs-2xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; white-space: nowrap; }
.au-tile-v small { font-size: 14px; font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.au-tile-d { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: var(--au-fs-xs); color: var(--au-mut); }
.au-tile.is-ref .au-tile-v { font-size: 18px; color: var(--au-ink-2); }
.au-hero { position: relative; overflow: hidden; border: 0; width: 100%; text-align: left; display: block; color: #fff; background: var(--au-ink);
  border-radius: var(--au-r-xl); padding: 18px 18px 18px; }
.au-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,31,.55), transparent 70%); pointer-events: none; }
.au-hero > * { position: relative; }
.au-hero-k { font-size: var(--au-fs-sm); color: #c9c9c9; }
.au-hero-x { font-size: 19px; font-weight: 700; margin-top: 6px; line-height: 1.45; letter-spacing: -.01em; }
.au-hero-m { font-size: var(--au-fs-sm); color: #bdbdbd; margin-top: 6px; }
.au-hero-v { position: absolute; right: 18px; bottom: 16px; font-size: var(--au-fs-2xl); font-weight: 800; letter-spacing: -.02em; }
.au-hero-v small { font-size: 14px; font-weight: 600; color: #c9c9c9; margin-left: 2px; }
button.au-hero, a.au-hero { cursor: pointer; text-decoration: none; }
.au-note { background: var(--au-soft); border-radius: var(--au-r-md); padding: 12px 14px; color: var(--au-ink-2); font-size: var(--au-fs-md); }
.au-note.is-warn { background: var(--au-warn-soft); color: #5a2a12; } .au-note.is-ng { background: var(--au-ng-soft); color: #5c1a14; }
.au-note.is-ok { background: var(--au-ok-soft); color: #0f3d27; } .au-note.is-info { background: var(--au-info-soft); color: #18306b; }

/* ───────── 6. 一覧 (BOTO の .list / .li) ───────── */
.au-list { background: var(--au-card); border-radius: var(--au-r-lg); box-shadow: inset 0 0 0 1px var(--au-line); padding: 2px var(--au-s4); }
.au-li { display: flex; align-items: center; gap: var(--au-s3); padding: 12px 0; border-top: 1px solid var(--au-line); min-width: 0; }
.au-li:first-child { border-top: 0; }
a.au-li, .au-li.is-link { text-decoration: none; cursor: pointer; }
a.au-li:hover .au-li-t, .au-li.is-link:hover .au-li-t { text-decoration: underline; text-underline-offset: 3px; }
.au-li-time { width: 48px; flex: none; font-weight: 700; color: var(--au-ink-2); font-size: var(--au-fs-md); }
.au-li-img { width: 48px; height: 48px; border-radius: var(--au-r-sm); object-fit: cover; flex: none; background: var(--au-sunk); }
.au-li-main { flex: 1; min-width: 0; }
.au-li-t { font-weight: 600; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.au-li-sub { font-size: var(--au-fs-xs); color: var(--au-mut); margin-top: 2px; }
.au-li-end { flex: none; text-align: right; font-weight: 700; }
.au-li-end small { display: block; font-size: var(--au-fs-xs); font-weight: 500; color: var(--au-mut); }
.au-li.is-dim { opacity: .55; }
.au-kv { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 8px 16px; font-size: var(--au-fs-md); }
.au-kv dt { color: var(--au-mut); } .au-kv dd { margin: 0; }

/* ───────── 7. 操作: ボタン / タブ / チップ / タグ ───────── */
.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: var(--au-r-pill); padding: 9px 16px; min-height: 40px;
  font-size: var(--au-fs-md); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; background: var(--au-card); color: var(--au-ink-2);
  box-shadow: inset 0 0 0 1px var(--au-line); transition: transform .12s var(--au-ease), background .15s; }
.au-btn:hover { background: var(--au-soft); }
.au-btn:active { transform: scale(.97); }
.au-btn.is-primary { background: var(--au-ink); color: #fff; box-shadow: none; }
.au-btn.is-primary:hover { background: #2a2a2a; }
.au-btn.is-accent { background: var(--au-accent); color: #fff; box-shadow: none; }
.au-btn.is-danger { background: var(--au-ng-soft); color: var(--au-ng); box-shadow: none; }
.au-btn.is-ghost { background: none; box-shadow: none; color: var(--au-mut); }
.au-btn.is-sm { min-height: 32px; padding: 5px 12px; font-size: var(--au-fs-sm); }
.au-btn:disabled, .au-btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.au-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--au-card); box-shadow: inset 0 0 0 1px var(--au-line);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--au-ink); flex: none; }
.au-icon-btn.is-dark { background: var(--au-dark-3); box-shadow: none; color: #fff; }
.au-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.au-pills::-webkit-scrollbar { display: none; }
.au-pill { flex: none; border: 0; border-radius: var(--au-r-pill); padding: 9px 16px; min-height: 40px; font-size: var(--au-fs-md); font-weight: 600; cursor: pointer;
  background: var(--au-card); color: var(--au-ink-2); box-shadow: inset 0 0 0 1px var(--au-line); text-decoration: none; }
.au-pill.is-on { background: var(--au-ink); color: #fff; box-shadow: none; }
.au-pill small { font-weight: 500; opacity: .7; margin-left: 4px; }
.au-seg { display: inline-flex; background: var(--au-sunk); border-radius: var(--au-r-sm); padding: 3px; gap: 3px; }
.au-seg button { border: 0; border-radius: 9px; padding: 7px 14px; min-height: 34px; font-size: var(--au-fs-md); font-weight: 600; background: transparent; color: var(--au-mut); cursor: pointer; }
.au-seg button.is-on { background: var(--au-card); color: var(--au-ink); box-shadow: 0 1px 3px rgba(17,17,17,.12); }
.au-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.au-chips.is-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .au-chips.is-scroll::-webkit-scrollbar { display: none; }
.au-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: var(--au-r-pill); padding: 6px 12px; min-height: 34px;
  font-size: var(--au-fs-sm); color: var(--au-ink-2); background: var(--au-card); box-shadow: inset 0 0 0 1px var(--au-line); cursor: pointer; }
.au-chip .au-svg { width: 15px; height: 15px; }
.au-chip.is-on { background: var(--au-ink); color: #fff; box-shadow: none; }
.au-chip.is-off { background: transparent; color: var(--au-faint); cursor: default; }
.au-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--au-fs-xs); font-weight: 600; padding: 3px 9px; border-radius: var(--au-r-pill);
  white-space: nowrap; background: var(--au-sunk); color: var(--au-mut); }
.au-tag.ok { background: var(--au-ok-soft); color: var(--au-ok); } .au-tag.warn { background: var(--au-warn-soft); color: var(--au-warn); }
.au-tag.ng { background: var(--au-ng-soft); color: var(--au-ng); } .au-tag.info { background: var(--au-info-soft); color: var(--au-info); }
.au-tag.accent { background: var(--au-accent); color: #fff; } .au-tag.dark { background: var(--au-ink); color: #fff; }
.au-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--au-faint); display: inline-block; flex: none; }
.au-dot.ok { background: var(--au-ok); } .au-dot.warn { background: var(--au-accent-2); } .au-dot.ng { background: var(--au-ng); } .au-dot.accent { background: var(--au-accent); }

/* ───────── 8. 入力 ───────── */
.au-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.au-field > label, .au-label { font-size: var(--au-fs-sm); font-weight: 600; color: var(--au-ink-2); }
.au-help { font-size: var(--au-fs-xs); color: var(--au-mut); }
.au-help.is-ng { color: var(--au-ng); }
.au-input, .au-select, .au-textarea { width: 100%; border: 0; border-radius: var(--au-r-sm); background: var(--au-card); color: var(--au-ink);
  box-shadow: inset 0 0 0 1px var(--au-line-strong); padding: 10px 12px; min-height: 42px; font: inherit; font-size: var(--au-fs-md); }
.au-textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.au-input::placeholder, .au-textarea::placeholder { color: var(--au-faint); }
.au-input:focus, .au-select:focus, .au-textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--au-ink); }
.au-input.is-ng { box-shadow: inset 0 0 0 2px var(--au-ng); }
.au-select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.au-search { position: relative; } .au-search .au-svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--au-mut); }
.au-search .au-input { padding-left: 38px; border-radius: var(--au-r-pill); }
.au-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--au-fs-md); }
.au-check input { width: 18px; height: 18px; accent-color: var(--au-ink); }
.au-switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 14px; background: #d4d2cd; position: relative; cursor: pointer; flex: none; transition: background .2s; }
.au-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--au-ease); }
.au-switch:checked { background: var(--au-ok); } .au-switch:checked::after { transform: translateX(18px); }
.au-form { display: grid; gap: var(--au-s4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.au-bar { display: flex; gap: var(--au-s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--au-s3); }
.au-bar .au-grow { flex: 1 1 200px; min-width: 0; }

/* ───────── 9. 表 ───────── */
.au-table-wrap { background: var(--au-card); border-radius: var(--au-r-lg); box-shadow: inset 0 0 0 1px var(--au-line); overflow: auto; max-width: 100%; }
.au-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--au-fs-md); }
.au-table th { position: sticky; top: 0; z-index: 1; background: var(--au-card); text-align: left; font-size: var(--au-fs-sm); font-weight: 600; color: var(--au-mut);
  padding: 10px 12px; border-bottom: 1px solid var(--au-line-strong); white-space: nowrap; }
.au-table td { padding: 10px 12px; border-bottom: 1px solid var(--au-line); vertical-align: middle; }
.au-table tr:last-child td { border-bottom: 0; }
/* 数据表: 鼠标经过整行高亮 (浅蓝 + 左边蓝线)。浅灰 --au-soft 跟预测列・斑马底色分不出来 (user 2026-11-04「数据类 table 都需要这个」) */
.au-table tbody tr:hover > td, .au-table tbody tr:hover > td[class] { background: var(--au-info-soft); }
.au-table tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--au-info); }
.au-table .num, .au-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.au-table th.is-sort { cursor: pointer; user-select: none; } .au-table th.is-sort:hover { color: var(--au-ink); }
.au-table th.is-asc::after { content: " ↑"; } .au-table th.is-desc::after { content: " ↓"; }
.au-table.is-dense td, .au-table.is-dense th { padding: 6px 10px; }
.au-table tr.is-sel td { background: var(--au-accent-soft); }
.au-table tfoot td { font-weight: 700; background: var(--au-soft); border-top: 1px solid var(--au-line-strong); }

/* ───────── 10. 状態: 空 / 読み込み / 通知 / シート ───────── */
.au-empty { text-align: center; color: var(--au-mut); padding: var(--au-s10) var(--au-s4); }
.au-empty b { display: block; color: var(--au-ink); font-size: 15px; margin-bottom: 4px; }
.au-skel { background: linear-gradient(90deg, var(--au-sunk), var(--au-soft), var(--au-sunk)); background-size: 200% 100%; animation: au-skel 1.2s linear infinite; border-radius: var(--au-r-xs); min-height: 14px; }
@keyframes au-skel { to { background-position: -200% 0; } }
.au-toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); opacity: 0; z-index: 90;
  background: var(--au-ink); color: #fff; padding: 11px 18px; border-radius: var(--au-r-pill); font-size: var(--au-fs-md); white-space: nowrap; pointer-events: none;
  transition: opacity .2s, transform .25s var(--au-ease); }
.au-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.au-toast.is-ng { background: var(--au-ng); }
.au-sheet-mask { position: fixed; inset: 0; z-index: 80; background: rgba(17,17,17,.4); display: none; align-items: center; justify-content: center; padding: 16px; }
.au-sheet-mask.is-on { display: flex; }
.au-sheet { background: var(--au-bg); border-radius: 28px; width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 18px 20px 24px; box-shadow: var(--au-shadow-lg); }
.au-sheet-grab { display: none; width: 40px; height: 5px; border-radius: 3px; background: #d4d2cd; margin: 0 auto 14px; }
.au-sheet h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.au-sheet-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 640px) {
  .au-sheet-mask { align-items: flex-end; padding: 0; }
  .au-sheet { border-radius: 28px 28px 0 0; width: 100%; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .au-sheet-grab { display: block; }
}

/* ───────── 11. 黒い面 (回放・プレーヤー) ───────── */
.au-dark-card { background: var(--au-dark); color: #fafafa; border-radius: 26px; padding: 8px; box-shadow: var(--au-shadow-lg); }
.au-dark-card .au-mut { color: var(--au-dark-mut); }

/* ───────── 13. 移行用の小物 (2026-10-20 勤怠・経費の移行で追加、他の画面でも使う) ───────── */
/* クラスを付けていない入力欄も ace-ui の見た目にする (母版の中だけ) */
:where(.au-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]), select, textarea):not([class]) {
  border: 0; border-radius: var(--au-r-sm); background: var(--au-card); color: var(--au-ink); box-shadow: inset 0 0 0 1px var(--au-line-strong);
  padding: 8px 11px; min-height: 38px; font: inherit; font-size: var(--au-fs-md); max-width: 100%; }
:where(.au-page) :is(input, select, textarea):not([class]):focus { outline: none; box-shadow: inset 0 0 0 2px var(--au-ink); }
:where(.au-page) textarea:not([class]) { min-height: 80px; resize: vertical; line-height: 1.6; width: 100%; }
:where(.au-page) select:not([class]) { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
:where(.au-page) input[type=checkbox], :where(.au-page) input[type=radio] { width: 17px; height: 17px; accent-color: var(--au-ink); vertical-align: -3px; }
.au-field :is(input, select, textarea):not([type=checkbox]):not([type=radio]) { width: 100%; }
.au-grow { flex: 1 1 auto; min-width: 0; }
.au-card + .au-card, .au-card + .au-row, .au-row + .au-card { margin-top: var(--au-s3); }
.au-card-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: var(--au-s3);
  font-size: 15px; font-weight: 700; color: var(--au-ink); }
.au-scroll { overflow: auto; max-height: 70vh; margin: 0 calc(-1 * var(--au-s5)); padding: 0 var(--au-s5); }
.au-scroll > .au-table th { background: var(--au-card); }
.au-table tr.is-dim td { color: var(--au-faint); }
.au-table tr.is-err td { background: var(--au-ng-soft); }
.au-table tr.is-click { cursor: pointer; }
.au-kpis { display: grid; gap: var(--au-s2); grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.au-kpis .au-tile { border-radius: var(--au-r-md); padding: 10px 12px; box-shadow: none; background: var(--au-soft); }
.au-kpis .au-tile-v { font-size: 20px; margin-top: 2px; }
.au-tile.is-warn .au-tile-v { color: var(--au-warn); } .au-tile.is-ng .au-tile-v { color: var(--au-ng); } .au-tile.is-ok .au-tile-v { color: var(--au-ok); }
.au-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--au-accent); color: #fff; font-size: 14px; font-weight: 700; margin-left: 6px; }
.au-pill.is-on .au-cnt { background: #fff; color: var(--au-ink); }
/* .au-pills の中の a / button はクラス無しでもカプセルのタブになる */
.au-pills > :is(a, button):not(.au-pill) { flex: none; border: 0; border-radius: var(--au-r-pill); padding: 8px 15px; min-height: 38px; font-size: var(--au-fs-md);
  font-weight: 600; cursor: pointer; background: var(--au-card); color: var(--au-ink-2); box-shadow: inset 0 0 0 1px var(--au-line); text-decoration: none;
  display: inline-flex; align-items: center; }
.au-pills > :is(a, button).is-on:not(.au-pill) { background: var(--au-ink); color: #fff; box-shadow: none; }
.au-pills > :is(a, button).is-on .au-cnt { background: #fff; color: var(--au-ink); }
.au-pills > :is(a, button) small { font-weight: 500; opacity: .7; margin-left: 4px; font-size: var(--au-fs-sm); }
.au-sheet .au-field + .au-field, .au-sheet .au-row + .au-field, .au-sheet .au-field + .au-row { margin-top: var(--au-s3); }
.au-note + .au-note, .au-note + .au-card { margin-top: var(--au-s3); }

/* ───────── 12. 小物 ───────── */
.au-mut { color: var(--au-mut); } .au-faint { color: var(--au-faint); }
.au-sm { font-size: var(--au-fs-sm); } .au-xs { font-size: var(--au-fs-xs); }
.au-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-up { color: var(--au-ok); } .au-down { color: var(--au-ng); }
.au-row { display: flex; gap: var(--au-s2); align-items: center; flex-wrap: wrap; }
.au-stack { display: flex; flex-direction: column; gap: var(--au-s3); }
.au-gap-lg { gap: var(--au-s6); }
.au-mt { margin-top: var(--au-s4); } .au-mt-lg { margin-top: var(--au-s8); }
.au-divider { height: 1px; background: var(--au-line); border: 0; margin: var(--au-s4) 0; }
@media (max-width: 1023px) { .au-hide-sm { display: none !important; } }
@media (min-width: 1024px) { .au-only-sm { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .au *, .au *::before, .au *::after { transition: none !important; animation: none !important; } }

/* 画面の言語切替 (サイドバー下、2026-10-21 app/libs/ui_lang.py) */
.au-lang { display: flex; gap: 2px; margin: 18px 10px 8px; padding: 3px; border-radius: var(--au-r-pill); background: var(--au-soft); width: max-content; }
.au-lang a { padding: 5px 12px; border-radius: var(--au-r-pill); font-size: var(--au-fs-sm); font-weight: 700; color: var(--au-mut); text-decoration: none; }
.au-lang a.is-on { background: var(--au-ink); color: #fff; }
