/* ==================================================
   usAIin — 共通スタイル
   デザインシステム: V3 Soft Brutalist
   (haiyer.work / pyhiroba / haikei-touka 準拠)

   haiyer.work の public/assets/style.css から、社内共通の基盤部分
   （トークン・リセット・ナビ・ボタン・見出し・パネル・フッター・
   バナー・スピナー）だけを抜き出したもの。
   配車フォーム等の hAIyer 固有コンポーネントは含まない。
   録音画面固有のスタイルは app.css を参照。
   ================================================== */

/* ==================================================
   フォント差し替え時のガタつき対策

   日本語ウェブフォントは届くまで数秒かかることがある。その間の
   フォールバックが Zen Kaku より 5% 狭いと、文字が折り返し直されて
   レイアウトが跳ねる。寸法を合わせた別名を挟んでズレを縮める。
   （構造側の高さも app.css で固定してあるので、これは仕上げ）
   ================================================== */
@font-face {
  font-family: 'Zen Kaku Fallback';
  src: local('Noto Sans CJK JP'), local('Noto Sans JP'), local('Hiragino Sans'),
       local('Yu Gothic Medium'), local('Meiryo'), local('Roboto');
  size-adjust: 101.5%;
  ascent-override: 88%;
  descent-override: 12%;
  line-gap-override: 0%;
}

/* ---------- リセット・基本 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ブランドカラー */
  --accent:        #028DAE;
  --accent-dk:     #01617a;
  --accent-soft:   #e3f3f7;
  --accent-border: #c8e8ef;

  /* インク（テキスト） */
  --ink:   #101418;
  --ink-2: #2b3138;
  --ink-3: #5b636c;
  --ink-4: #8a929b;

  /* 背景・サーフェス（アクセント #028DAE に合わせた寒色寄りのニュートラル） */
  --bg:    #f7fafb;
  --paper: #ffffff;
  --bg-2:  #eef3f5;

  /* ボーダー */
  --line:   #dfe7ea;
  --line-2: #eaf0f2;

  /* 情報系の注意書き（暖色は使わずアクセント基調で統一） */
  --notice-bg:     #e8f4f8;
  --notice-border: #bfdfe9;
  --notice-ink:    #0a5568;

  /* ステータスカラー */
  --color-red:    #e74c3c;
  --color-orange: #f59e0b;
  --color-green:  #27ae60;

  /* 角丸 */
  --radius-sm: 4px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* シャドウ */
  --shadow:     0 1px 0 rgba(16,20,24,.04), 0 8px 28px -12px rgba(16,20,24,.10);
  --shadow-sm:  0 1px 0 rgba(16,20,24,.04), 0 4px 12px -6px rgba(16,20,24,.08);
  --shadow-hover: 0 2px 0 rgba(16,20,24,.04), 0 12px 32px -8px rgba(16,20,24,.14);

  /* フォント */
  --font-ui:   'Zen Kaku Gothic New', 'Zen Kaku Fallback', system-ui, sans-serif;
  --font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  /* 白格子背景（アクセント4% / 28px方眼） */
  background-color: #f9fbfc;
  background-image:
    linear-gradient(rgba(2,141,174,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,141,174,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

/* hidden 属性は必ず消す。.btn（inline-flex）・.tabs（flex）・.setting（flex）などの display 指定は、
   ブラウザ既定の [hidden]{display:none} より強く、JS で hidden を付けても消えなかった（2026-10-13 の監査）。
   「送り切っていない音声を消す」ボタンが出たままになっていたのもこれ。要素ごとに足すと必ず漏れるので、ここで一律に止める */
[hidden] { display: none !important; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

a { color: inherit; }

/* ---------- ナビゲーション ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.logo {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.logo .logo-dot { color: var(--ink-4); font-weight: 700; }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-feature-settings: "palt";
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(2,141,174,.5);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover:not(:disabled) { background: var(--paper); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dk);
  height: 56px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 800;
}
.btn-accent:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(2,141,174,.5);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- セクション見出し ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-code);
}

/* 言語切替（グローブ付きセグメントトグル） */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 3px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.lang-globe {
  display: inline-flex;
  color: var(--ink-4);
  margin-right: 4px;
}
.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 13px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.lang-btn:hover:not(.is-active) { color: var(--accent-dk); }
.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px -2px rgba(2, 141, 174, .55);
}

/* 事業者ログイン導線（お客様向けCTAと競合しないよう控えめに） */
.nav-links .nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.nav-links .nav-admin:hover {
  border-color: var(--accent-border);
  color: var(--accent-dk);
  background: var(--accent-soft);
}
.nav-admin svg { flex-shrink: 0; }

/* ---------- フッター ---------- */
.footer {
  padding: 40px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
.footer-link {
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.footer-link:hover { color: var(--accent-dk); border-color: var(--accent-border); }
.footer-copy { margin-top: 14px; }
.footer-links {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 10px 22px; font-size: 13px; font-weight: 700;
}
.footer-links a {
  color: var(--ink-3); text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--accent-dk); }

/* ==================================================
   規約・ポリシー
   ================================================== */
.legal { padding: 12px 0 40px; max-width: 820px; }
.legal-lead { font-size: 15px; color: var(--ink-2); line-height: 1.9; margin: 16px 0 34px; }
.legal-sec { margin-bottom: 30px; }
.legal-sec h2 {
  font-size: 17px; font-weight: 800; color: var(--ink);
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 2px solid var(--accent-border);
}
.legal-sec p { font-size: 14.5px; line-height: 1.95; color: var(--ink-2); }
.legal-sec p + p { margin-top: 10px; }
.legal-sec ol { margin: 6px 0 0 1.4em; }
.legal-sec li { font-size: 14.5px; line-height: 1.95; color: var(--ink-2); margin-bottom: 6px; }
.legal-sec a { color: var(--accent-dk); font-weight: 700; }

.legal-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13.5px; }
.legal-table th, .legal-table td {
  border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; line-height: 1.75;
}
.legal-table th { background: var(--bg-2); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.muted-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* 特商法などの定義リスト型テーブル */
.legal-table-def th {
  width: 190px; vertical-align: top; background: var(--bg-2);
}
.legal-table-def td { line-height: 1.9; }
.legal-table-def .todo { color: var(--color-red); font-weight: 700; }
@media (max-width: 640px) {
  .legal-table-def th, .legal-table-def td { display: block; width: auto; }
  .legal-table-def th { border-bottom: 0; }
}

.legal-meta {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  padding: 18px 20px; background: var(--bg-2);
  border-radius: var(--radius-md); margin-top: 34px; font-size: 14px;
}
.legal-meta .k { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.legal-meta .todo { color: var(--color-red); font-weight: 700; }
.legal-note {
  margin-top: 18px; padding: 13px 16px; font-size: 13.5px; line-height: 1.8;
  background: var(--notice-bg); border: 1px solid var(--notice-border);
  border-radius: var(--radius-md); color: var(--notice-ink);
}

/* ==================================================
   トップページ
   ================================================== */
.hero {
  padding: 72px 0 90px;
  text-align: center;
}
.hero-brand {
  margin: 8px auto 28px;
}
.hero-kana {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.22em;
  margin-bottom: 8px;
}
.hero-name {
  font-size: clamp(56px, 12vw, 108px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--accent);
}
.hero-h1 {
  font-size: clamp(20px, 3.4vw, 30px);
  line-height: 1.5;
  font-weight: 600;
  margin: 8px auto 0;
  color: var(--ink);
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.hero-micro {
  color: var(--ink-3);
  font-size: 14px;
  margin-top: 18px;
}

/* ==================================================
   フォームページ
   ================================================== */
.form-main {
  padding: 20px 0 60px;
}
.page-head {
  margin: 8px 0 28px;
}
.page-title {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
}
.page-lead {
  color: var(--ink-3);
  font-size: 15px;
  margin-top: 10px;
  max-width: 640px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}
.panel + .panel { margin-top: 22px; }
/* パネルをまとめた入れ物（スタッフと教室など）のあいだも、パネルどうしと同じだけ空ける */
.panel-group + .panel-group, .panel + .panel-group, .panel-group + .panel { margin-top: 22px; }
.panel-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  word-break: auto-phrase;   /* 狭い画面で、見出しを言葉の途中で折らない（「いな／い」にしない） */
}
/* 見出しのすぐ下に説明の文が無いとき（説明は ? に移した）は、中身との間を少しあける */
.panel > .panel-title:not(:has(+ .panel-sub)) { margin-bottom: 12px; }
.panel-title .badge {
  flex: 0 0 auto; white-space: nowrap;   /* 見出しの横に ? が付いても、バッジの中で折れない */
  font-family: var(--font-code);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 2px 10px;
}
.panel-sub {
  color: var(--ink-2);
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* 大事な短い知らせ（空のとき・いまの状態・取り返しのつかない操作の前の 1 行）。小さく薄い文にしない（2026-10-21・前提 31） */
.msg { font-size: 14px; line-height: 1.75; color: var(--ink-2); margin: 8px 0 0; }
.msg.is-warn { color: var(--notice-ink); }

/* ---------- 通知バナー ---------- */
.banner {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.banner[hidden] { display: none; }
.banner-demo {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  color: var(--notice-ink);
}
.banner-error {
  background: #fdecea;
  border: 1px solid #f5c2bc;
  color: #a3271a;
}
.banner-ic { flex-shrink: 0; margin-top: 1px; }

/* ---------- ローディング ---------- */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 見出しの横の「？」（説明・help.js）。2026-10-21: 画面の細かい説明はここに移す ---------- */
.hlp {
  display: inline-grid; place-items: center; vertical-align: middle; flex: 0 0 auto;
  width: 20px; height: 20px; margin: 0 0 0 7px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper);
  font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1; color: var(--ink-3);
  cursor: pointer; position: relative; top: -1px; letter-spacing: 0;
}
.hlp::after { content: ''; position: absolute; inset: -8px; }   /* 指で押しやすいように、見えない所まで押せる */
.hlp:hover, .hlp[aria-expanded="true"] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-dk); }
.hlp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hlp-pop {
  position: fixed; z-index: 90; left: 0; top: 0; box-sizing: border-box;
  width: max-content; max-width: 380px; padding: 14px 16px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-hover);
  font-size: 13px; line-height: 1.85; color: var(--ink-2); text-align: left; font-weight: 400; letter-spacing: .01em;
  overflow-y: auto; overscroll-behavior: contain;   /* 画面に入りきらない長い説明は、中をスクロール（help.js が高さを決める） */
}
.hlp-pop[hidden] { display: none; }
.hlp-pop::before { content: ''; position: absolute; top: -6px; left: calc(var(--hlp-arrow, 20px) - 6px); width: 10px; height: 10px;
  background: var(--paper); border-style: solid; border-color: var(--line); border-width: 1px 0 0 1px; transform: rotate(45deg); }   /* 小さな三角（? を指す） */
.hlp-pop.is-above::before { top: auto; bottom: -6px; transform: rotate(225deg); }
.hlp-t { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.hlp-b p { margin: 0 0 8px; }
.hlp-b p:last-child, .hlp-b ul:last-child { margin-bottom: 0; }
.hlp-b ul { margin: 0 0 8px; padding: 0 0 0 1.2em; }
.hlp-b li { margin: 0 0 3px; }
.hlp-b b { color: var(--ink); font-weight: 700; }

/* 画面の JS が動き出せなかったときの知らせ（bootguard.js）。下の島の上に出す */
.boot-guard {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 200;
  width: min(520px, calc(100vw - 32px)); padding: 18px 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
}
.boot-guard p { margin: 0; flex: 1 1 260px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ================================================================
   ポップアップ（案 B・2026-10-23）: 画面の下のまん中にうさ委員が座り、その上の吹き出しで話す。
   どの画面の確認・入力・お知らせも、この 1 つの形（.sheet > .sheet-box）。ブラウザの confirm／alert／prompt は使わない（usa-dialog.js）。
   うさぎの表情は .sheet の data-usa で替える（base・smile・look・listen・surprise・worried・sad）。
   並び（flex の縦）: 吹き出し（.sheet-box）→ しっぽ（::before）→ うさぎ（::after）。吹き出しは中でスクロールする（背の低い画面でも切れない）
   ================================================================ */
.sheet {
  --usa-img: url(/rabbit/smile.png); --usa-w: 150px; --usa-h: 150px;
  position: fixed; inset: 0; z-index: 70;
  background: rgba(16, 20, 24, .42);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 16px 16px 0;
  animation: usa-fade .16s ease-out;
}
.sheet[hidden] { display: none; }
.sheet::before {           /* 吹き出しのしっぽ（うさぎへ向く） */
  content: ''; order: 1; flex: 0 0 auto; width: 0; height: 0; margin-top: -1px;
  border: 13px solid transparent; border-top-color: var(--paper); border-bottom: 0;
}
.sheet::after {            /* 話しているうさ委員（絵の上の透明な所は切って、前足を画面の下の縁に） */
  content: ''; order: 2; flex: 0 0 auto; width: var(--usa-w); height: var(--usa-h); margin-top: 2px;
  background: var(--usa-img) center bottom / cover no-repeat;
  pointer-events: none; animation: usa-pop .28s cubic-bezier(.2, .9, .3, 1.25);
}
.sheet[data-usa="base"]     { --usa-img: url(/rabbit/base.png); }
.sheet[data-usa="look"]     { --usa-img: url(/rabbit/look.png); }
.sheet[data-usa="listen"]   { --usa-img: url(/rabbit/listen.png); }
.sheet[data-usa="surprise"] { --usa-img: url(/rabbit/surprise.png); }
/* 耳を横に伏せた絵（困り顔・しょんぼり）は背が低いので、箱も低く */
.sheet[data-usa="worried"]  { --usa-img: url(/rabbit/worried.png); --usa-w: 176px; --usa-h: 92px; }
.sheet[data-usa="sad"]      { --usa-img: url(/rabbit/sad.png); --usa-w: 176px; --usa-h: 92px; }
.sheet-box {
  order: 0; position: relative;
  background: var(--paper); border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  padding: 18px 20px 18px;
  box-shadow: 0 18px 40px -16px rgba(16, 20, 24, .45);
  /* うさぎ（と、しっぽ・上の余白）のぶんを引いた高さに収め、はみ出したら吹き出しの中でスクロール */
  max-height: calc(100vh - var(--usa-h) - 40px); max-height: calc(100dvh - var(--usa-h) - 40px);
  overflow-y: auto; overscroll-behavior: contain;
  animation: usa-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.sheet-box::before {       /* 話しているのはだれか */
  content: 'うさ委員'; display: block; margin-bottom: 4px;
  font-size: 12.5px; font-weight: 900; color: var(--accent); letter-spacing: .04em;
}
.sheet-box h3 { font-size: 18px; font-weight: 900; line-height: 1.45; margin-bottom: 8px; color: var(--ink); }
.sheet-box p  { font-size: 14px; color: var(--ink-2); line-height: 1.75; margin-bottom: 16px; }
.sheet-box p b { color: var(--ink); }
.sheet-box .msg { font-size: 14px; color: var(--ink-2); margin: 8px 0 12px; }   /* .sheet-box p より強く（シートの中でも .msg は 14px の --ink-2） */
.sheet-box .msg.is-warn { color: var(--notice-ink); }
.sheet-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
/* 吹き出しの中がスクロールするときも、ボタンは下の縁に見えたまま（背の低いスマホで「開く」が隠れない・2026-11-05） */
.sheet-box .sheet-btns { position: sticky; bottom: -18px; z-index: 1; background: var(--paper); padding: 10px 0 18px; margin: -6px 0 -18px; }
.sheet-btns .btn { flex: 0 1 auto; justify-content: center; min-width: 96px; }
/* 狭い画面でボタンが 3 つ並ぶと、文字が 1 字ずつ折れる。ボタンごと次の行へ送る */
.sheet-box .sheet-btns .btn { min-width: fit-content; }
/* 取り返しのつかない操作のボタンは赤く塗る（吹き出しの中だけ） */
.sheet-box .btn-danger { background: var(--color-red); border-color: var(--color-red); color: #fff; }
.sheet-box .btn-danger:hover:not(:disabled) { background: #d23f30; border-color: #d23f30; color: #fff; }
/* 入力（usa-dialog.js の usaPrompt） */
.usa-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 14px; margin: 2px 0 14px; border: 1.5px solid var(--accent-border); border-radius: 12px; background: var(--paper);
}
.usa-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- 書き起こしの担当とニンジン（trtier.js・前提 42） ---- */
.carrot { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.carrot .carrot-b { fill: var(--color-orange); }
.carrot .carrot-l { fill: var(--color-green); }
.carrot .carrot-s { fill: none; stroke: var(--paper); stroke-width: 1.2; stroke-linecap: round; opacity: .7; }
.carrot.is-part { width: 13px; height: 13px; opacity: .75; }
.carrots { display: inline-flex; align-items: center; gap: 1px; white-space: nowrap; }
.carrots b { margin-left: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.usa-choices, .tr-tiers { display: grid; gap: 8px; margin: 12px 0 4px; text-align: left; }
.usa-choice, .tr-tier { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--paper); cursor: pointer; }
.usa-choice input, .tr-tier input { margin: 3px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.usa-choice:has(input:checked), .tr-tier:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.usa-choice:has(input:disabled), .tr-tier:has(input:disabled) { cursor: default; opacity: .6; }
.usa-choice:has(input:focus-visible), .tr-tier:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.usa-choice-b, .tr-tier-b { display: grid; gap: 3px; min-width: 0; }
.usa-choice-n { font-size: 15px; font-weight: 700; color: var(--ink); }
.usa-choice-d { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
/* 札から選ぶ（usaSelect・ブラウザの選ぶ欄の代わり） */
.usa-groups { display: grid; gap: 14px; margin: 12px 0 4px; text-align: left; }
.usa-group-t { margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.usa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.usa-chip { position: relative; display: inline-flex; cursor: pointer; }
.usa-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.usa-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--paper); font-size: 14px; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.usa-chip:hover span { border-color: var(--accent); }
.usa-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dk); }
.usa-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.tr-tier-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tr-tier-n { font-size: 15px; font-weight: 700; color: var(--ink); }
.tr-tier-t { font-size: 12.5px; font-weight: 700; color: var(--accent-dk); }
.tr-tier-c { display: flex; align-items: center; gap: 8px; }
.tr-tier-u { font-size: 13px; color: var(--ink-3); }
.tr-tier-d { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.tr-tier-x { font-size: 13px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 520px) {
  .sheet-btns .btn { flex: 1 1 auto; }
  .usa-choices { gap: 6px; }
  .usa-choice { padding: 10px 12px; }
  .usa-choice-d { font-size: 13px; line-height: 1.55; }
}
/* 背の低い画面（横向きのスマホ・小さなノート PC）はうさぎを小さく */
@media (max-height: 640px) {
  .sheet { --usa-w: 104px; --usa-h: 104px; }
  .sheet[data-usa="worried"], .sheet[data-usa="sad"] { --usa-w: 128px; --usa-h: 66px; }
}
@keyframes usa-fade { from { background: rgba(16, 20, 24, 0); } }
@keyframes usa-pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet::after, .sheet-box { animation: none; } }

/* ==================================================
   プルダウン（uselect.js・2026-11-05 のご指示「デフォルトのプルダウンを使わず、デザインに合わせたプルダウンに」）
   画面の <select> を見つけたら、見た目だけ自前のボタン（.usel-btn）と一覧（.usel-pop）に替える。正は隠した select。
   ボタンには元の select の class を写すので、.field-input・.vh-sel・.spk-select の見た目はそのまま効く
   ================================================== */
.usel { position: relative; display: block; min-width: 0; max-width: 100%; }
.usel-native { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important;
  opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
.usel-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; margin: 0;
  font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.usel-btn:hover:not(:disabled) { border-color: var(--accent); }
.usel-btn:focus-visible, .usel.is-open .usel-btn { outline: 2px solid var(--accent-border); outline-offset: 0; border-color: var(--accent); }
.usel-btn:disabled { cursor: default; background: var(--bg-2); color: var(--ink-3); }
.usel-v { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usel-chev { flex: 0 0 auto; width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s, color .15s; }
.usel.is-open .usel-chev { transform: rotate(180deg); color: var(--accent); }
/* 置き場ごとの形（もとは select に書いていたもの） */
.setting > .usel { flex: 0 1 auto; min-width: 0; max-width: 100%; margin-left: auto; }
.setting .usel-btn { width: auto; max-width: 100%; font-size: 14px; padding: 8px 10px; }
.usel-for-vh-sel { display: inline-block; vertical-align: middle; max-width: min(100%, 320px); }
.usel-btn.vh-sel { width: auto; max-width: 100%; border-radius: 10px; }
.act-filter > .usel { width: auto; min-width: 9em; }
.act-filter .usel-btn { height: 42px; padding-top: 0; padding-bottom: 0; }
.ops-toolbar > .usel { max-width: 220px; }
.spk-row > .usel { flex: 1 1 auto; min-width: 0; }
.spk-row .usel-btn { width: 100%; }
/* 一覧（body の直下・ボタンの下か上。ポップアップ .sheet・メニューより上に出す） */
.usel-pop {
  position: fixed; z-index: 100; overflow-y: auto; overscroll-behavior: contain; padding: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 36px -14px rgba(16, 20, 24, .34), 0 2px 6px rgba(16, 20, 24, .06);
  animation: usel-in .12s ease-out;
}
.usel-pop.is-up { animation-name: usel-in-up; }
.usel-opt {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 10px;
  font-size: 15px; line-height: 1.45; color: var(--ink-2); cursor: pointer; user-select: none;
}
.usel-opt.is-active { background: var(--bg-2); color: var(--ink); }
.usel-opt.is-on { color: var(--accent-dk); font-weight: 700; }
.usel-opt.is-on.is-active { background: var(--accent-soft); }
.usel-opt.is-off { opacity: .45; cursor: default; }
.usel-check { flex: 0 0 auto; width: 16px; height: 16px; color: var(--accent); visibility: hidden; }
.usel-opt.is-on .usel-check { visibility: visible; }
.usel-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.usel-group { padding: 8px 10px 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; }
@keyframes usel-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes usel-in-up { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .usel-pop { animation: none; } .usel-chev { transition: none; } }
