/* tayorino Web。色はアプリ（Tayorino/Views/Components.swift の brand・brandDeep・brandSoft）と LP に合わせる。
   外部のフォント・画像は読まない（CSP: style-src 'self'・img-src 'self'）。 */
:root {
  /* ブランド（ロゴの #3aafdc / #4bcee4） */
  --brand: #3aafdc;
  --brand-light: #4bcee4;
  --brand-gradient: linear-gradient(135deg, var(--brand-light), var(--brand));
  --bg: #f7fcfd;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #5b6676;
  --line: #e2edf0;
  /* brandDeep（文字・ボタン）と brandSoft（淡い背景） */
  --accent: #008388;
  --accent-text: #ffffff;
  --accent-soft: #e6fafa;
  /* 話者「相手」はアプリと同じくオレンジ */
  --other: #ec6f00;
  --mark: #fff1a8;
  --error: #b3261e;
  --error-soft: #fbe9e7;
  --radius: 16px;
  font-family: -apple-system, system-ui, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1418;
    --surface: #131f24;
    --text: #e8f1f4;
    --muted: #9aaab2;
    --line: #22343b;
    --accent: #4bcee4;
    --accent-text: #062a33;
    --accent-soft: #0e333b;
    --other: #f59a3c;
    --mark: #4d4512;
    --error: #ffb4ab;
    --error-soft: #3b1d1a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { line-height: 1.7; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
h1 { font-size: 1.6rem; line-height: 1.3; margin: 0.4em 0; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 0.2em 0 0.6em; }
h3 { font-size: 0.95rem; color: var(--muted); margin: 1.6em 0 0.4em; }
p { margin: 0.4em 0; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.02em; }
/* アプリのアイコン（web/assets/logo.png）。iOS のアイコンと同じく角を丸める */
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--brand-gradient); background-image: url("/logo.png"); background-size: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.center .brand .logo { width: 44px; height: 44px; border-radius: 10px; }
.badge { font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; }

.center { max-width: 520px; margin: 0 auto; padding: 56px 16px; }
.lead { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.steps { padding-left: 1.3em; color: var(--muted); }

button { cursor: pointer; border-radius: 10px; border: 1px solid transparent; padding: 10px 18px; }
button:disabled { opacity: 0.55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.primary:hover:not(:disabled) { filter: brightness(1.06); }
.secondary { background: var(--surface); border-color: var(--line); }
.ghost { background: transparent; border-color: var(--line); padding: 6px 14px; }

.notice { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 0.9rem; margin: 12px 0; }
.notice.error { background: var(--error-soft); color: var(--error); }

.qr { width: min(280px, 80vw); margin: 20px auto 8px; padding: 10px; background: #fff; border-radius: var(--radius); border: 3px solid var(--brand-light); }
.qr svg { display: block; width: 100%; height: auto; }
.qr.expired { opacity: 0.2; }
.sas { text-align: center; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.15em; font-variant-numeric: tabular-nums; }

.topbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tab { background: transparent; padding: 6px 12px; white-space: nowrap; color: var(--muted); }
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.topbar > .notice { margin: 0; }
body > #app > .notice { margin: 12px 16px 0; }

.app-main { padding: 16px; max-width: 1280px; margin: 0 auto; }
.pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 16px; align-items: start; }
.list-pane { max-height: calc(100vh - 110px); overflow: auto; }
.detail-pane { min-height: 50vh; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .list-pane { max-height: none; }
  .topbar { flex-wrap: wrap; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 4px 12px; border-radius: 999px; background: transparent; border-color: var(--line); font-size: 0.85rem; }
.chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
/* 上の帯の下線はブランドのグラデーション */
.topbar { border-bottom: 2px solid transparent; border-image: var(--brand-gradient) 1; }

.list { list-style: none; margin: 0; padding: 0; }
.item { width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; background: transparent; border-radius: 10px; padding: 10px; }
.item:hover { background: var(--bg); }
.item.selected { background: var(--accent-soft); }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-date { grid-column: 2; color: var(--muted); font-size: 0.8rem; }
.snippet { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
mark { background: var(--mark); color: inherit; border-radius: 3px; }
.kind { font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); align-self: start; margin-top: 3px; white-space: nowrap; display: inline-block; }
.empty { color: var(--muted); padding: 20px 4px; }

.detail h2 { overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 0.9rem; }
.text p { white-space: normal; overflow-wrap: anywhere; }
.minutes { font-feature-settings: "palt"; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.78rem; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line); }
.field { display: flex; gap: 12px; font-size: 0.9rem; padding: 2px 0; }
.field-label { color: var(--muted); min-width: 5em; }
.highlights, .marks { padding-left: 1.2em; }
.marks .offset { margin-right: 10px; }
.hl-label { font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-right: 8px; }
.transcript { list-style: none; padding: 0; margin: 0; }
.transcript li { display: grid; grid-template-columns: 3.4em auto 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.offset { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.82rem; padding-top: 2px; }
.speaker { font-size: 0.78rem; font-weight: 600; color: var(--accent); padding-top: 2px; white-space: nowrap; }
.speaker.other { color: var(--other); }
.line { overflow-wrap: anywhere; }

.search { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }

.chat { display: flex; flex-direction: column; gap: 10px; max-width: 860px; margin: 0 auto; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; max-height: calc(100vh - 330px); overflow: auto; padding: 4px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--bg); }
.bubble.user { align-self: flex-end; background: var(--accent-soft); }
.sources { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; resize: vertical; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }

.browsers { list-style: none; padding: 0; }
.browsers li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--line); }
