/* 新アプリ QUSUBI。並び（サイドバー＋会話＋下の入力欄）は ChatGPT の再現（chatgpt.com を 2026-09-15 に実機で計測。オーナー指示「UIをいったんchatgptの再現して」）
   見た目の面は末尾「QUSUBI の顔」（2026-09-22 #195）で差し替えた。オーナー「いまのままだと ChatGPT やん！ってならない？」
   下の :root の数値は ChatGPT の計測値として残してある（並びの寸法の根拠）。色・角・書体は末尾が上書きする
   計測値: 地 #fcfcfc・文字 #0d0d0d / 副 #5d5d5d・線 rgba(0,0,0,.05)・本文 16px/24px（回答 26px）
   サイドバー幅 259px・項目 14px 高さ 36px 角丸 10px・入力欄 幅 768px 高さ 52px 角丸 28px 白・利用者の吹き出し #e8f3fe / #0c274a 角丸 22px 最大 70% */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --bg: #fcfcfc; --card: #ffffff; --ink: #0d0d0d; --sub: #5d5d5d; --faint: #8f8f8f;
  --line: rgba(0,0,0,.1); --line-light: rgba(0,0,0,.05); --hover: rgba(0,0,0,.05); --active: rgba(0,0,0,.07);
  --user-bubble: #e8f3fe; --user-ink: #0c274a; --accent: #0d0d0d; --link: #2964aa; --focus: #4d8cf5;
  --success: #1a7f4b; --warn: #a35b00;
  --font-ui: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --radius-item: 10px; --radius-card: 16px; --radius-bubble: 22px; --radius-input: 28px; --radius-pill: 9999px;
  --shadow-composer: 0 0 0 1px rgba(0,0,0,.04), 0 2px 8px 0 rgba(0,0,0,.04), 0 4px 80px 8px rgba(0,0,0,.024);
  --shadow-pop: 0 0 0 1px rgba(0,0,0,.06), 0 8px 32px -4px rgba(0,0,0,.14);
  --shadow-card: 0 0 0 1px rgba(0,0,0,.06), 0 1px 4px 0 rgba(0,0,0,.04);
  --content-width: 768px; --sidebar-width: 259px;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/24px var(--font-ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
a { color: var(--link); }

#app { display: grid; grid-template-columns: var(--sidebar-width) 1fr; height: 100vh; height: 100dvh; }

/* ---- サイドバー ---- */
#sidebar { background: var(--bg); display: flex; flex-direction: column; padding: 8px 6px 8px; overflow: hidden; border-right: 1px solid var(--line-light); }
.side-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 6px 0 12px; }
.brand { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-item); display: inline-grid; place-items: center; color: var(--sub); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.side-nav { display: flex; flex-direction: column; margin: 8px 0 12px; }
.nav-item { display: flex; align-items: center; gap: 8px; height: 36px; padding: 6px 10px; border-radius: var(--radius-item); font-size: 14px; line-height: 20px; text-align: left; }
.nav-item:hover { background: var(--hover); }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.side-section { margin-bottom: 14px; }
.side-section h2 { font-size: 14px; font-weight: 400; color: var(--faint); padding: 6px 10px; line-height: 20px; }
.side-list { list-style: none; }
.side-list li button { width: 100%; height: 36px; text-align: left; padding: 6px 10px; border-radius: var(--radius-item); display: flex; gap: 8px; align-items: center; font-size: 14px; line-height: 20px; }
.side-list li button:hover { background: var(--hover); }
.side-list li button.active { background: var(--active); }
.side-list .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side-empty { font-size: 13px; color: var(--faint); padding: 2px 10px 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #c4c4c6; }
.dot.run { background: var(--focus); animation: pulse 1.2s ease-in-out infinite; }
.dot.wait { background: var(--warn); }
.dot.done { background: var(--success); }
.dot.fail { background: #999; }
@keyframes pulse { 50% { opacity: .35; } }
.side-foot { padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.devbar { font-size: 12px; color: var(--sub); padding: 4px 10px; }
.devbar summary { cursor: pointer; }
.devbar label { display: block; margin: 4px 0; }
.devbar input:not([type]), .devbar input[type=text] { font: inherit; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; }
.devbar fieldset { border: 0; margin-top: 4px; }
.dev-mode { margin-top: 4px; }
.account { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-item); }
.account:hover { background: var(--hover); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: #b08d57; color: #fff; font-size: 11px; display: grid; place-items: center; flex: none; }
.account-text { display: flex; flex-direction: column; line-height: 16px; }
.account-name { font-size: 14px; }
.account-plan { font-size: 12px; color: var(--faint); }

/* ---- 本体 ---- */
#main { display: flex; flex-direction: column; min-width: 0; height: 100%; position: relative; }
#topbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; height: 52px; flex: none; }
.sr-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-spacer { flex: 1; }
.temp-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }
.temp-toggle:disabled { opacity: .35; }
.only-mobile { display: none; }

#thread { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
#items, .hero { max-width: var(--content-width); margin: 0 auto; }

/* ホーム: 見出しと入力欄を画面の中ほどに置く（ChatGPT の新しいチャット） */
#main.home #thread { flex: 0 0 auto; margin-top: auto; overflow: visible; padding-bottom: 0; }
#main.home #composer { margin-bottom: auto; padding-bottom: 12vh; }
#main.home .disclaimer { display: none; }
.hero { text-align: center; padding: 0 0 28px; }
.hero h2 { font-size: 24px; line-height: 28px; font-weight: 400; }
.temp-note { display: inline-block; font-size: 14px; color: var(--sub); margin-bottom: 14px; }

/* ---- メッセージ ---- */
.msg { margin: 20px 0; display: flex; }
.msg.user { justify-content: flex-end; margin-top: 32px; }
.msg.user .bubble { background: var(--user-bubble); color: var(--user-ink); border-radius: var(--radius-bubble); padding: 10px 16px; max-width: 70%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant .bubble { width: 100%; line-height: 26px; }
.msg.memory { justify-content: flex-start; align-items: center; gap: 6px; font-size: 14px; color: var(--sub); margin: 12px 0; flex-wrap: wrap; }
.msg.memory .mem-icon { font-weight: 700; }
.msg.memory .mem-text { color: var(--faint); }
.msg.live .bubble { width: 100%; }

/* 「N秒考えました ›」（開くと途中の動き） */
.turn-head { font-size: 14px; color: var(--sub); margin-bottom: 8px; line-height: 20px; }
.turn-head summary { cursor: pointer; list-style: none; display: inline-flex; gap: 4px; }
.turn-head summary::-webkit-details-marker { display: none; }
.turn-head summary::after { content: "›"; transition: transform .15s; }
.turn-head[open] summary::after { transform: rotate(90deg); }
.turn-head .titles { margin: 8px 0 4px 2px; padding-left: 14px; border-left: 1px solid var(--line); list-style: none; color: var(--faint); }
.turn-head .router { margin: 4px 0 0 16px; font-size: 13px; color: var(--faint); }

/* 回答の下の操作列（コピー・情報源） */
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 6px; color: var(--sub); }
.act { height: 32px; min-width: 32px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.act:hover { background: var(--hover); color: var(--ink); }
.act .fav { width: 16px; height: 16px; border-radius: 50%; background: #dfe7f5; display: inline-block; }
.web-sources { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 8px; border-radius: 12px; box-shadow: var(--shadow-card); background: var(--card); max-width: 420px; }
.src-chip { font-size: 14px; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-chip:hover { background: var(--hover); }

/* 記憶の出典 */
.mem-cites { margin-top: 8px; font-size: 14px; }
.mem-cites summary { cursor: pointer; color: var(--sub); display: inline-flex; align-items: center; gap: 6px; list-style: none; height: 32px; padding: 0 8px; border-radius: 8px; }
.mem-cites summary::-webkit-details-marker { display: none; }
.mem-cites summary:hover { background: var(--hover); }
.mem-cites[open] summary { margin-bottom: 4px; }
.mem-note { color: var(--sub); }
.mem-cite { background: var(--card); box-shadow: var(--shadow-card); border-radius: 12px; padding: 10px 12px; margin-top: 6px; }
.mem-cite.off { opacity: .5; }
.mem-cite-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mem-kind { font-size: 12px; color: var(--sub); }
.mem-snip { flex: 1; min-width: 0; }
.mem-date { font-size: 12px; color: var(--faint); }
.mem-detail { margin-top: 6px; color: var(--ink); background: #f4f4f4; border-radius: 8px; padding: 6px 10px; }
.mem-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

.btn { padding: 6px 14px; border-radius: var(--radius-pill); box-shadow: 0 0 0 1px var(--line); font-size: 14px; background: var(--card); }
.btn:hover { background: #f4f4f4; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: none; }
.btn.ghost { padding: 3px 10px; font-size: 13px; box-shadow: none; background: #f4f4f4; }
.btn.ghost:hover { background: #ececec; }
.btn.ghost.danger { color: #c0392b; }
.btn:disabled { opacity: .55; }

.thinking { color: var(--sub); font-size: 16px; display: flex; gap: 10px; align-items: center; margin: 20px 0; }
.spinner { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: breathe 1.2s ease-in-out infinite; display: inline-block; flex: none; }
@keyframes breathe { 50% { transform: scale(.6); opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* markdown（回答） */
.md > * + * { margin-top: 12px; }
.md h1, .md h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin-top: 24px; }
.md h3 { font-size: 18px; font-weight: 600; margin-top: 20px; }
.md ul, .md ol { padding-left: 1.5em; }
.md li + li { margin-top: 4px; }
.md strong { font-weight: 600; }
.md blockquote { border-left: 2px solid var(--line); padding-left: 14px; color: var(--ink); }
.md table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 14px; line-height: 20px; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.md th { font-weight: 600; }
.md code { background: #ececec; padding: 1px 5px; border-radius: 6px; font-size: .9em; }
.md hr { border: 0; border-top: 1px solid var(--line); }

/* ---- Deep Research のカード ---- */
.rcard { position: relative; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 16px 18px; margin: 20px 0; }
.rcard-head { display: flex; align-items: center; gap: 10px; }
.rcard-badge { font-size: 12px; line-height: 18px; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand); flex: none; }
.rcard-badge.done { background: #f1f1f1; color: var(--sub); }
.rcard-badge.wait { background: #fbf1e3; color: var(--warn); }
.rcard-badge.off { background: #f1f1f1; color: var(--faint); }
.rcard-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard-status { color: var(--sub); font-size: 14px; margin-top: 6px; }
.rcard-steps { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.rcard-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 22px; }
.rcard-steps .mark { width: 16px; height: 16px; flex: none; margin-top: 3px; border-radius: 50%; border: 1.5px solid #c9c9cc; display: grid; place-items: center; font-size: 10px; color: #fff; }
.rcard-steps li.completed .mark { background: var(--ink); border-color: var(--ink); }
.rcard-steps li.completed .mark::after { content: "✓"; }
.rcard-steps li.in_progress .mark { border-color: var(--ink); border-top-color: transparent; animation: spin .9s linear infinite; }
.rcard-steps li.pending { color: var(--faint); }
/* 調べている最中のタイムライン（Genspark 実測 §1: 左に細い線・行頭に点・既定は閉じる） */
.rcard-tl { list-style: none; margin-top: 12px; position: relative; padding-left: 20px; }
.rcard-tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-light); }
.rcard-tl > li { position: relative; }
.rcard-tl summary { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; line-height: 22px; list-style: none; }
.rcard-tl summary::-webkit-details-marker { display: none; }
.rcard-tl summary::after { content: "›"; color: var(--faint); font-size: 15px; transition: transform .2s ease; }
.rcard-tl details[open] summary::after { transform: rotate(90deg); }
.tl-dot { position: absolute; left: -19px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1.5px solid #c9c9cc; }
.rcard-tl details[open] .tl-dot, .rcard-tl > li:last-child .tl-dot { border-color: var(--ink); }
.rcard-tl.running > li:last-child .tl-dot { border-color: var(--ink); border-top-color: transparent; animation: spin .9s linear infinite; }
.rcard-tl.running > li:last-child .tl-label { color: var(--ink); }
.tl-label { color: var(--sub); }
.rcard-tl details[open] .tl-label { color: var(--ink); }
.tl-count { flex: none; font-size: 11px; color: var(--sub); background: #f1f1f1; border-radius: var(--radius-pill); padding: 0 7px; margin-left: auto; }
.tl-detail { padding: 4px 0 10px; }
.tl-list { list-style: none; font-size: 13px; line-height: 21px; color: var(--sub); }
.tl-list li { display: flex; gap: 8px; }
.tl-q::before { content: "「"; } .tl-q::after { content: "」"; }
.tl-sub { color: var(--faint); font-size: 12px; }
.tl-src { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.src-kind.ok { background: #eaf6ed; color: #2f7a46; }
.src-kind.ng { background: #fdeeee; color: #b3413e; }
.src.ng .src-link { border-style: dashed; }
.src.ng .src-title { color: var(--sub); }
.src-err { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rcard-actions:empty { display: none; }
.rcard-bar { height: 3px; border-radius: 3px; background: #eee; margin-top: 10px; overflow: hidden; }
.rcard-bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .8s ease; }
.rcard.done .rcard-bar, .rcard.off .rcard-bar { display: none; }
.rcard-report { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-light); line-height: 26px; }
.rcard-body { max-height: 480px; overflow: hidden; position: relative; }
.rcard-body.clipped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(transparent, var(--card)); }
.rcard-body.open { max-height: none; }
.rcard-expand { margin-top: 6px; font-size: 14px; color: var(--sub); text-decoration: underline; }
.rcard-sources, .rcard-next { margin-top: 12px; }
.rcard-sources h4, .rcard-next h4 { font-size: 13px; font-weight: 400; color: var(--sub); margin-bottom: 4px; }
/* 資料カード（Genspark 実測 §2-1・2: 題名＋ドメインで公式か否かが一目で分かる形） */
.rcard-sources ol { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rcard-sources li.src { min-width: 0; }
.src-link { display: block; padding: 8px 10px; border: 1px solid var(--line-light); border-radius: 12px; text-decoration: none; color: inherit; background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.src-link:hover { border-color: #c9c9cc; box-shadow: 0 1px 6px rgba(0,0,0,.06); transform: translateY(-1px); }
.src-title { display: block; font-size: 13px; line-height: 19px; max-height: 38px; overflow: hidden; }
.src-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--sub); }
.src-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-kind { flex: none; padding: 0 6px; border-radius: var(--radius-pill); background: #f1f1f1; color: var(--sub); }
.src.go .src-kind { background: var(--brand-tint); color: var(--brand); }
.src.lg .src-kind { background: #eaf6ed; color: #2f7a46; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { padding: 6px 12px; border-radius: var(--radius-pill); box-shadow: 0 0 0 1px var(--line); font-size: 14px; text-align: left; background: var(--card); }
.chips button:hover { background: #f4f4f4; }
.route-note { font-size: 13px; color: var(--sub); margin: -8px 0 12px; }

/* ---- 入力欄（計測値: 幅 768・高さ 52・角丸 28・白） ---- */
#composer { padding: 0 20px 8px; flex: none; }
.composer-wrap { max-width: var(--content-width); margin: 0 auto; position: relative; }
.composer-box { background: var(--card); border-radius: var(--radius-input); box-shadow: var(--shadow-composer); min-height: 52px; padding: 8px 8px 8px 8px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
.c-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex: none; }
.c-icon:hover { background: var(--hover); }
#text { flex: 1 1 200px; min-width: 0; border: 0; outline: 0; resize: none; font: 16px/26px var(--font-ui); max-height: 30vh; background: transparent; padding: 5px 6px; color: var(--ink); }
#text::placeholder { color: var(--faint); }
.tool-chip { order: 5; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); background: var(--brand-tint); color: var(--brand); font-size: 14px; flex: none; }
.chip-x { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1; color: inherit; }
.chip-x:hover { background: rgba(45,95,184,.12); }
.effort { height: 36px; padding: 0 10px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--sub); flex: none; }
.effort:hover { background: var(--hover); color: var(--ink); }
.send { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.send:disabled { background: #d7d7d7; }
.disclaimer { text-align: center; font-size: 12px; line-height: 16px; color: var(--sub); padding: 8px 0 2px; }

.pop { position: absolute; z-index: 40; background: var(--card); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 6px; }
.plus-menu { left: 0; top: calc(100% + 6px); width: min(460px, 100%); }
#main:not(.home) .plus-menu { top: auto; bottom: calc(100% + 6px); }
.pop-item { width: 100%; display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 14px; line-height: 20px; }
.pop-item:hover:not(:disabled) { background: var(--hover); }
.pop-item:disabled { color: var(--faint); }
.pop-item[aria-pressed="true"] { background: var(--brand-tint); }
.pop-label { white-space: nowrap; }
.pop-desc { color: var(--faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.effort-pop { right: 48px; top: calc(100% + 6px); width: 250px; padding: 12px 14px 10px; text-align: center; }
#main:not(.home) .effort-pop { top: auto; bottom: calc(100% + 6px); }
.effort-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
#effort-range { width: 100%; accent-color: var(--focus); }
.effort-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 2px; }

/* ---- メモリ ---- */
dialog { border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow-pop); width: min(560px, 92vw); padding: 18px 20px; margin: auto; color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.25); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { font-size: 18px; font-weight: 600; }
.dlg-sub { color: var(--sub); font-size: 14px; margin: 4px 0 12px; }
.memory-list { list-style: none; display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; border-top: 1px solid var(--line-light); }
.memory-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line-light); font-size: 14px; line-height: 20px; }
.memory-list li span { flex: 1; }
.memory-list button { font-size: 13px; color: var(--sub); white-space: nowrap; }
.memory-list button:hover { color: var(--ink); }
.memory-add { display: flex; gap: 8px; margin-top: 12px; }
.memory-add input { flex: 1; font: 14px var(--font-ui); padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }

/* ---- スマホ ---- */
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; }
  #sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-width)); z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  #app.side-open #sidebar { transform: none; }
  #scrim { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 20; }
  .only-mobile { display: inline-grid; }
  #main.home #composer { padding-bottom: 6vh; }
  .pop-desc { display: none; }
}
@media (min-width: 901px) { #side-close { visibility: hidden; } }
/* ==== 動き（ChatGPT の手触りに寄せる。短く・柔らかく・止まるときに減速） ==== */
:root { --ease-out: cubic-bezier(.2,.8,.2,1); --ease-pop: cubic-bezier(.34,1.56,.64,1); }

/* 触れたものは静かに色が変わる */
.nav-item, .side-list li button, .icon-btn, .c-icon, .effort, .act, .pop-item, .btn, .chips button, .src-chip, .mem-cites summary, .account { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s var(--ease-out); }
.send { transition: background-color .2s ease, transform .15s var(--ease-out); }
.send:not(:disabled):hover { transform: scale(1.06); }
.send:not(:disabled):active, .c-icon:active, .icon-btn:active, .act:active { transform: scale(.92); }
.composer-box { transition: box-shadow .25s ease; }
.composer-box:focus-within { box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 4px 16px 0 rgba(0,0,0,.06), 0 4px 80px 8px rgba(0,0,0,.03); }
#plus svg { transition: transform .3s var(--ease-out); }
#plus[aria-expanded="true"] svg { transform: rotate(45deg); }
.effort svg { transition: transform .25s var(--ease-out); }
.effort[aria-expanded="true"] svg { transform: rotate(180deg); }
.temp-toggle svg { transition: transform .6s var(--ease-out); }
.temp-toggle:hover svg, .temp-toggle[aria-pressed="true"] svg { transform: rotate(90deg); }

/* 出てくるもの */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.msg.enter { animation: rise .42s var(--ease-out) both; }
.msg.user.enter .bubble { transform-origin: bottom right; animation: pop .38s var(--ease-out) both; }
.msg.settle .msg-actions, .msg.settle .mem-cites, .msg.settle .turn-head { animation: fade .5s ease .08s both; }
.pop:not([hidden]) { animation: pop .2s var(--ease-out) both; transform-origin: top left; }
#main:not(.home) .plus-menu:not([hidden]) { transform-origin: bottom left; }
.effort-pop:not([hidden]) { transform-origin: top right; }
#main:not(.home) .effort-pop:not([hidden]) { transform-origin: bottom right; }
.pop-item { animation: rise .28s var(--ease-out) both; }
.pop-item:nth-child(2) { animation-delay: .03s; } .pop-item:nth-child(3) { animation-delay: .06s; }
.tool-chip:not([hidden]) { animation: pop .3s var(--ease-pop) both; }
.temp-note:not([hidden]) { animation: rise .35s var(--ease-out) both; }
.mem-cites[open] > :not(summary), .turn-head[open] > :not(summary) { animation: rise .3s var(--ease-out) both; }
.web-sources:not([hidden]) { animation: pop .22s var(--ease-out) both; transform-origin: top left; }
dialog[open] { animation: pop .24s var(--ease-out) both; }
dialog[open]::backdrop { animation: fade .24s ease both; }


/* 書き出し: 新しく届いた字だけがにじむように出る */
@keyframes tok { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.tok { animation: tok .5s ease-out both; }

/* 考え中: 文字の上を光が流れる */
.shimmer { background: linear-gradient(90deg, var(--sub) 0%, var(--sub) 40%, #c9c9c9 50%, var(--sub) 60%, var(--sub) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
.thinking { animation: fade .3s ease both; }

/* Deep Research のカード */
.rcard:not(.done):not(.off) .rcard-bar span { background: linear-gradient(90deg, var(--ink) 0%, #6b6b6b 50%, var(--ink) 100%); background-size: 200% 100%; animation: bar 1.6s linear infinite; }
@keyframes bar { from { background-position: 200% 0; } to { background-position: 0 0; } }
.rcard-bar span { transition: width 1s var(--ease-out); }
.rcard-steps li { transition: color .3s ease; }
.rcard-steps .mark { transition: background-color .3s ease, border-color .3s ease; }
.rcard-steps li.just .mark { animation: check .45s var(--ease-pop) both; }
@keyframes check { 0% { transform: scale(.4); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.rcard-steps li.in_progress > span:last-child { background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, #a8a8a8 50%, var(--ink) 60%, var(--ink) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
.rcard-body { transition: max-height .55s var(--ease-out); }
.rcard-body.open { max-height: 20000px; }
.rcard-badge { transition: background-color .4s ease, color .4s ease; }

/* スマホのサイドバー */
#scrim:not([hidden]) { animation: fade .2s ease both; }
@media (max-width: 900px) { #sidebar { transition: transform .32s var(--ease-out); } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .shimmer, .rcard-steps li.in_progress > span:last-child { color: var(--sub); background: none; } }


/* ---------- 起動を確かめる（機械が「調べ物だ」と見た時だけ・オーナー決定 2026-09-20「中間」） ---------- */
.confirm { border: 1px solid var(--line-light); border-radius: var(--radius-card); padding: 14px 16px; margin: 16px 0; background: var(--card); }
.confirm-lead { font-size: 15px; line-height: 24px; }
.confirm-q { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line-light); color: var(--sub); font-size: 14px; line-height: 22px; }
.confirm-meta { margin-top: 8px; font-size: 13px; color: var(--sub); display: flex; flex-wrap: wrap; align-items: center; }
.confirm-dot { color: var(--faint); margin: 0 2px; }
.confirm-why { margin-top: 4px; font-size: 12px; color: var(--faint); }
.confirm-actions { display: flex; gap: 8px; margin-top: 12px; }
.confirm .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 起動の演出（押した時だけ・prefers-reduced-motion では出さない） ---------- */
.rcard.booting { overflow: hidden; }
.boot { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.boot::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 50%, rgba(188,0,45,.12), transparent 65%); animation: bootfade 1.6s ease-out forwards; }
.boot-scan { position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, rgba(188,0,45,.9), transparent); animation: bootscan 1.15s cubic-bezier(.4,0,.2,1) forwards; }
.boot-ring { position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid rgba(188,0,45,.7); animation: bootring 1.4s cubic-bezier(.2,.8,.2,1) forwards; }
.boot-ring:nth-of-type(3) { animation-delay: .12s; }
.boot-ring:nth-of-type(4) { animation-delay: .24s; }
.boot-label { position: relative; font-size: 12px; letter-spacing: .28em; color: var(--brand); text-transform: none; animation: bootlabel 1.6s ease-out forwards; }
@keyframes bootscan { from { top: 0; opacity: 0; } 12% { opacity: 1; } to { top: 100%; opacity: 0; } }
@keyframes bootring { from { transform: scale(.25); opacity: 0; } 25% { opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
@keyframes bootlabel { 0% { opacity: 0; transform: scale(.94); } 25% { opacity: 1; transform: none; } 70% { opacity: 1; } to { opacity: 0; } }
@keyframes bootfade { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .boot { display: none; } }


/* ---------- ログインとアカウント（2026-09-21） ---------- */
.account { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg, #fcfcfc); padding: 16px; }
.login[hidden] { display: none; }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-brand { font-size: 30px; font-weight: 700; letter-spacing: .06em; text-align: center; }
.login-sub { text-align: center; color: var(--sub); font-size: 14px; line-height: 22px; }
.login-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--sub); }
.login-field input { font: inherit; font-size: 15px; color: var(--ink); padding: 11px 14px; border: 1px solid var(--line-light, #e5e5e5); border-radius: 12px; background: #fff; }
.login-field input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.login-error { color: #b3413e; font-size: 13px; }
.login-submit { padding: 11px 14px; border-radius: 999px; font-size: 15px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { background: #b3413e; color: #fff; border-color: #b3413e; }
.btn.danger-text { color: #b3413e; }
.account-info { display: grid; grid-template-columns: 7em 1fr; gap: 8px 12px; font-size: 14px; margin: 8px 0 16px; }
.account-info dt { color: var(--sub); }
.account-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.delete-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
body.no-dev .devbar { display: none; }

/* =====================================================================
   QUSUBI の見た目（2026-09-21・オーナー指示）
   骨組みは ChatGPT のまま。全体の見た目は Gemini を足し、Gemini の青を QUSUBI の赤に置き換えた。
   Gemini 実測（gemini.google.com・2026-09-21・ログイン済みの画面）:
     地 #faf9f9 / 字 #1f1f1f / 挨拶 36px・細字（weight 320）/ 入力欄 角丸 32px・高さ 64px・影 0 2px 8px -2px rgba(0,0,0,.16)
     基本の青 #0b57d0・薄い青 #9dd2ff → QUSUBI の赤 #BC002D（ロゴの正本 brand/README.md「日章旗の赤」）
     中央の光: ぼかした不定形の塊（blur 146px / 116px）が形を変えながら動き（7.3〜11.7 秒）、中を色の帯が流れる
   Google Fonts は使わない（利用者の IP とブラウザ情報が Google に渡るため・本番 FactCore と同じ判断 #160）
   ===================================================================== */
:root {
  --brand: #BC002D; --brand-ink: #8f0022; --brand-tint: #fbeaee; --brand-soft: #f6c9d3;
  --bg: #faf9f9; --ink: #1f1f1f;
  --focus: #BC002D; --link: #a3002a;
  --user-bubble: #f5ebed; --user-ink: #3a0a14;
  --radius-input: 32px;
  --shadow-composer: 0 2px 8px -2px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.03);
}

/* ワードマーク: ロゴと QUSUBI の文字を横に並べる（オーナー指示 2026-09-21「見にくいから並べよう」。Q を六角形で置き換える案はやめた） */
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: .08em; line-height: 1; color: var(--ink); }
.brand-mark { width: 24px; height: 24px; flex: none; }

/* 挨拶（Gemini: 36px の細字） */
.hero h2 { font-size: 34px; line-height: 44px; font-weight: 300; letter-spacing: .01em; color: var(--ink); }
@media (max-width: 640px) { .hero h2 { font-size: 26px; line-height: 34px; } }

/* 入力欄（Gemini: 高さ 64px・角丸 32px・薄い影） */
.composer-box { min-height: 64px; padding: 12px 10px; }
.composer-box:focus-within { box-shadow: var(--shadow-composer), 0 0 0 1.5px rgba(188,0,45,.16); }
#text::placeholder { color: #6f6f6f; }

/* ＋ボタンの右上の小さな光（Gemini の青い点 → 赤） */
#plus { position: relative; }
#plus::after { content: ""; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 6px rgba(188,0,45,.6); }

/* サイドバーの選択中は Gemini と同じく丸い面 */
.nav-item:hover, .side-list li button:hover { background: #f2f0f0; border-radius: var(--radius-pill); }
.side-list li button[aria-current="true"] { background: var(--brand-tint); color: var(--brand-ink); border-radius: var(--radius-pill); }

/* 中央の光（ホームのときだけ）。塊の形が変わりながら、中を赤系の帯が流れる */
#topbar, #thread, #composer { position: relative; z-index: 1; }
.glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .8s ease; }
#main.home .glow { opacity: 1; }
.glow-blob { position: absolute; left: 50%; top: 46%; overflow: hidden; }
.glow-bg { width: min(1000px, 90vw); height: 460px; margin: -230px 0 0 calc(min(1000px, 90vw) / -2); filter: blur(120px); opacity: .2;
  border-radius: 58.6% 38.2% 51.9% 51.4% / 52% 48.1% 58.8% 48%; animation: glowMorphA 7.3s ease-in-out infinite alternate, glowScale 9.5s ease-in-out infinite alternate; }
.glow-fg { width: min(640px, 70vw); height: 380px; margin: -210px 0 0 calc(min(640px, 70vw) / -2); filter: blur(96px); opacity: .16;
  border-radius: 38.5% 58.9% 45.3% 60.1% / 64.5% 42.8% 53.8% 41.9%; animation: glowMorphB 11.7s ease-in-out infinite alternate, glowTurn 24s linear infinite; }
.glow-strip { position: absolute; inset: -50%;
  background: repeating-linear-gradient(120deg, #BC002D 0%, #e2475f 11%, #f79aaa 22%, #ffd3c8 33%, #f58a6c 44%, #d61f45 55%, #BC002D 66%);
  animation: glowSweep 6s ease-in-out infinite alternate; }
@keyframes glowSweep { from { transform: translate(-12%, -6%); } to { transform: translate(12%, 6%); } }
@keyframes glowScale { from { transform: scale(.94); } to { transform: scale(1.06); } }
@keyframes glowTurn { to { transform: rotate(360deg); } }
@keyframes glowMorphA {
  0% { border-radius: 58.6% 38.2% 51.9% 51.4% / 52% 48.1% 58.8% 48%; }
  100% { border-radius: 42% 60% 46% 55% / 60% 44% 55% 50%; } }
@keyframes glowMorphB {
  0% { border-radius: 38.5% 58.9% 45.3% 60.1% / 64.5% 42.8% 53.8% 41.9%; }
  100% { border-radius: 60% 40% 58% 44% / 46% 60% 42% 58%; } }
@media (prefers-reduced-motion: reduce) { .glow-blob, .glow-strip { animation: none !important; } }

/* FactCore で調べている間（Genspark の動きを参考に）: いま動いている行の点を赤く脈打たせる */
.rcard-tl.running > li:last-child .tl-dot { border-color: var(--brand); border-top-color: transparent; }
.rcard:not(.done):not(.off) .rcard-bar span { background: linear-gradient(90deg, var(--brand) 0%, #e2475f 50%, var(--brand) 100%); background-size: 200% 100%; }
.confirm .btn.primary { background: var(--brand); border-color: var(--brand); }

/* =====================================================================
   ジャービス風の背景（2026-09-21・オーナー指示）
   「FactCore を選択したら背景がジャービスみたいな色に。リサーチ中の時間つぶしになるし、最後は白に戻る」
   body.jarvis が付いている間だけ。付くのは FactCore を選んでいる時と、今の会話で調べている間（app.js の syncJarvis）
   色: 深い紺の地に水色の計器線（アイアンマンの HUD）。ロゴの赤はそのまま残す
   ===================================================================== */
body, #sidebar, .composer-box, .rcard, .pop, .msg.user .bubble, .src-link { transition: background-color 1.2s ease, color 1.2s ease, box-shadow 1.2s ease, border-color 1.2s ease; }
body.jarvis {
  --bg: #050d16; --card: rgba(9, 26, 40, .78); --ink: #e3f5ff; --sub: #8db4c8; --faint: #5b7f93;
  --line: rgba(110, 215, 255, .22); --line-light: rgba(110, 215, 255, .12); --hover: rgba(110, 215, 255, .08); --active: rgba(110, 215, 255, .12);
  --user-bubble: rgba(79, 214, 255, .12); --user-ink: #dff6ff; --link: #7fe0ff; --focus: #4fd6ff;
  --brand: #5fdcff; --brand-ink: #aeeeff; --brand-tint: rgba(79, 214, 255, .14);
  --shadow-composer: 0 0 0 1px rgba(79, 214, 255, .28), 0 0 32px -8px rgba(79, 214, 255, .45);
  --shadow-card: 0 0 0 1px rgba(79, 214, 255, .22), 0 0 28px -10px rgba(79, 214, 255, .35);
  --shadow-pop: 0 0 0 1px rgba(79, 214, 255, .25), 0 8px 32px -4px rgba(0, 0, 0, .6);
}
body.jarvis #sidebar { border-right-color: rgba(110, 215, 255, .12); }
body.jarvis .nav-item:hover, body.jarvis .side-list li button:hover { background: rgba(110, 215, 255, .08); }
body.jarvis .glow { opacity: 0 !important; }
body.jarvis #text::placeholder { color: #6f93a6; }
body.jarvis .btn { background: transparent; color: var(--ink); border-color: var(--line); }
body.jarvis .btn:hover, body.jarvis .chips button:hover { background: rgba(110, 215, 255, .08); }
body.jarvis .btn.primary, body.jarvis .confirm .btn.primary { background: #4fd6ff; color: #04121c; border-color: #4fd6ff; }
body.jarvis .rcard-badge.done, body.jarvis .rcard-badge.off, body.jarvis .tl-count, body.jarvis .src-kind { background: rgba(110, 215, 255, .1); }
body.jarvis .rcard-bar { background: rgba(110, 215, 255, .12); }
body.jarvis .rcard:not(.done):not(.off) .rcard-bar span { background: linear-gradient(90deg, #1aa9d6 0%, #9ff0ff 50%, #1aa9d6 100%); background-size: 200% 100%; box-shadow: 0 0 10px rgba(79, 214, 255, .8); }
body.jarvis .tl-dot { background: var(--bg); border-color: #3d6a80; }
body.jarvis .rcard-tl.running > li:last-child .tl-dot { border-color: #4fd6ff; border-top-color: transparent; box-shadow: 0 0 8px rgba(79, 214, 255, .8); }
body.jarvis .rcard-steps li.in_progress > span:last-child { background-image: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, #4fd6ff 50%, var(--ink) 60%, var(--ink) 100%); }
body.jarvis .src-link { background: rgba(9, 26, 40, .6); }
body.jarvis .rcard-body.clipped::after { background: linear-gradient(transparent, #0a1c2b); }
body.jarvis .mem-detail { background: rgba(110, 215, 255, .08); }
body.jarvis .rcard, body.jarvis .composer-box { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* 計器盤（背景の層）。普段は透明で、jarvis の時だけ浮かび上がる */
.hud { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
body.jarvis .hud { opacity: 1; }
.hud-grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(79, 214, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 214, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 80%);
  animation: hudDrift 18s linear infinite; }
.hud::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 45% at 50% 42%, rgba(30, 140, 190, .28), transparent 70%); }
.hud-rings { position: absolute; left: 50%; top: 42%; width: min(620px, 92vw); height: min(620px, 92vw); transform: translate(-50%, -50%); overflow: visible; }
.hud-rings * { fill: none; stroke: #4fd6ff; transform-origin: 200px 200px; }
.hud-rings .r1 { stroke-opacity: .18; stroke-width: 1; stroke-dasharray: 2 6; animation: hudSpin 60s linear infinite; }
.hud-rings .r2 { stroke-opacity: .32; stroke-width: 2; stroke-dasharray: 120 18 8 18; animation: hudSpin 26s linear infinite reverse; }
.hud-rings .r3 { stroke-opacity: .22; stroke-width: 8; stroke-dasharray: 1 5; animation: hudSpin 40s linear infinite; }
.hud-rings .r4 { stroke-opacity: .4; stroke-width: 1.2; stroke-dasharray: 60 30; animation: hudSpin 14s linear infinite reverse; }
.hud-rings .r5 { stroke-opacity: .55; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px #4fd6ff); animation: hudSpin 9s cubic-bezier(.6, 0, .4, 1) infinite; }
.hud-rings .r5.b { animation-duration: 12s; animation-direction: reverse; stroke-opacity: .35; }
.hud-scan { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(transparent, rgba(79, 214, 255, .09) 85%, rgba(140, 235, 255, .35) 100%); animation: hudScan 7s linear infinite; }
.hud-corner { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(79, 214, 255, .5); }
.hud-corner.tl { top: 64px; left: 22px; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud-corner.tr { top: 64px; right: 22px; border-top-width: 1.5px; border-right-width: 1.5px; }
.hud-corner.bl { bottom: 22px; left: 22px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud-corner.br { bottom: 22px; right: 22px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud-readout { position: absolute; top: 72px; right: 34px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 11px/16px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .18em; color: rgba(140, 225, 255, .75); }
.hud-readout b { font-weight: 600; color: #8fe8ff; text-shadow: 0 0 8px rgba(79, 214, 255, .8); }
@keyframes hudSpin { to { transform: rotate(360deg); } }
@keyframes hudScan { to { top: 100%; } }
@keyframes hudDrift { to { background-position: 44px 44px, 44px 44px; } }
@media (max-width: 640px) { .hud-readout, .hud-corner { display: none; } }
@media (prefers-reduced-motion: reduce) { .hud-grid, .hud-rings *, .hud-scan { animation: none !important; } .hud-scan { display: none; } }

/* =====================================================================
   FactCore の起動スイッチ（2026-09-21・オーナー指示「＋ボタンの右か左に・かっこいいデザインで」）
   切: 細い枠の中に灰色の六角形（ロゴと同じ形）。入: 六角形が水色に灯り、周りの輪が回り、中心の核が脈打つ。
   入れると画面全体がジャービス風になるので、スイッチも同じ水色で揃えた
   ===================================================================== */
.fc-switch { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 7px; margin-left: 2px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: transparent; color: var(--sub); font-size: 14px; font-weight: 600; letter-spacing: .02em; flex: none; overflow: hidden;
  transition: background .5s ease, border-color .5s ease, color .5s ease, box-shadow .5s ease; }
.fc-switch:hover { border-color: rgba(188, 0, 45, .35); color: var(--ink); }
.fc-core { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.fc-core svg { overflow: visible; }
.fc-hex { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; transition: stroke .5s ease, fill .5s ease; }
.fc-orbit { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 3 3.2; opacity: .45; transform-origin: 12px 12px; transition: opacity .5s ease; }
.fc-dot { fill: currentColor; opacity: .55; transform-origin: 12px 12px; transition: fill .5s ease, opacity .5s ease; }
.fc-switch:hover .fc-hex { stroke: var(--brand); }
.fc-state { font: 600 10px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; padding: 3px 5px; border-radius: 5px; background: var(--hover); color: var(--faint); transition: background .5s ease, color .5s ease; }

.fc-switch[aria-checked="true"] { color: #d9f7ff; border-color: rgba(79, 214, 255, .7);
  background: linear-gradient(135deg, #06243a 0%, #0b3a58 55%, #0a5a7c 100%);
  box-shadow: 0 0 0 1px rgba(79, 214, 255, .25), 0 0 18px -2px rgba(79, 214, 255, .55), inset 0 0 12px rgba(79, 214, 255, .25); }
.fc-switch[aria-checked="true"] .fc-hex { stroke: #6fe3ff; fill: rgba(79, 214, 255, .12); filter: drop-shadow(0 0 3px rgba(79, 214, 255, .9)); }
.fc-switch[aria-checked="true"] .fc-orbit { opacity: .9; stroke: #9eeeff; animation: hudSpin 3.2s linear infinite; }
.fc-switch[aria-checked="true"] .fc-dot { fill: #e6fbff; opacity: 1; filter: drop-shadow(0 0 4px #4fd6ff); animation: fcPulse 1.6s ease-in-out infinite; }
.fc-switch[aria-checked="true"] .fc-state { background: rgba(79, 214, 255, .22); color: #bff3ff; text-shadow: 0 0 6px rgba(79, 214, 255, .9); }
/* 表面を光の帯が一度走る */
.fc-switch::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(100deg, transparent, rgba(190, 245, 255, .55), transparent); opacity: 0; pointer-events: none; }
.fc-switch.powering::after { animation: fcSweep .75s ease-out; }
.fc-switch.powering .fc-core { animation: fcBoot .6s var(--ease-pop, cubic-bezier(.2,.8,.2,1.2)); }
@keyframes fcPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.72); } }
@keyframes fcSweep { 0% { left: -40%; opacity: 1; } 100% { left: 110%; opacity: 1; } }
@keyframes fcBoot { 0% { transform: scale(.6) rotate(-60deg); } 100% { transform: none; } }
@media (max-width: 480px) { .fc-state { display: none; } .fc-switch { padding-right: 10px; } }
@media (prefers-reduced-motion: reduce) { .fc-orbit, .fc-dot, .fc-switch::after, .fc-core { animation: none !important; } }

/* 入力欄の部品を上下の真ん中に（高さ 64 に対して部品 36 → 上下 14 ずつ。前は上 16・下 12 で 2px 下にずれていた） */
.composer-box { padding: 14px 10px; }
/* ジャービス中の送信ボタン: 地の字色が白くなるので、矢印は濃紺で（白地に白で消えていた） */
body.jarvis .send { background: #d9f7ff; color: #04121c; box-shadow: 0 0 14px -2px rgba(79, 214, 255, .7); }
body.jarvis .send:disabled { background: rgba(110, 215, 255, .25); color: rgba(4, 18, 28, .6); box-shadow: none; }

/* ---------- FactCore スイッチの説明（乗せると出る） ---------- */
.fc-tip { position: absolute; bottom: calc(100% + 10px); z-index: 45; width: 280px; padding: 12px 14px; border-radius: 14px; background: #0b1a26; color: #d9f2ff;
  box-shadow: 0 0 0 1px rgba(79, 214, 255, .28), 0 12px 32px -8px rgba(0, 0, 0, .45); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; }
.fc-tip.on { opacity: 1; transform: none; }
.fc-tip::after { content: ""; position: absolute; top: 100%; left: 26px; border: 6px solid transparent; border-top-color: #0b1a26; }
.fc-tip-head { display: flex; align-items: center; gap: 8px; }
.fc-tip-name { font-weight: 700; font-size: 14px; letter-spacing: .03em; color: #8fe8ff; }
.fc-tip-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(79, 214, 255, .16); color: #bff3ff; }
.fc-tip-body { margin-top: 6px; font-size: 13px; line-height: 20px; }
.fc-tip-meta { margin-top: 6px; display: flex; gap: 10px; font-size: 12px; color: #86a9bb; }

/* ---------- 調べ終わりの演出（app.js の playFinish） ---------- */
/* 1) 計器の輪が中心へ収束して一度強く光る */
body.fc-complete .hud-rings { animation: hudConverge 1.1s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes hudConverge {
  0% { transform: translate(-50%, -50%) scale(1); filter: none; }
  55% { transform: translate(-50%, -50%) scale(.82); filter: drop-shadow(0 0 18px rgba(79, 214, 255, .9)) brightness(1.8); }
  100% { transform: translate(-50%, -50%) scale(1.25); filter: drop-shadow(0 0 30px rgba(160, 240, 255, 1)) brightness(2.2); opacity: .0; } }
body.fc-complete .hud-scan { animation: hudScan 1.1s cubic-bezier(.4, 0, .2, 1) 1; }
body.fc-complete .hud-readout span { color: #bff3ff; text-shadow: 0 0 10px rgba(79, 214, 255, 1); animation: fcBlink .28s steps(2) 3; }
@keyframes fcBlink { 50% { opacity: .2; } }
/* 2) カードの縁を光が一周する */
.rcard.finishing::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--fc-a, 0deg), transparent 0deg, rgba(160, 240, 255, 1) 40deg, rgba(188, 0, 45, .9) 80deg, transparent 120deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: fcRing 1.3s cubic-bezier(.5, 0, .3, 1) .15s both, fcRingOut 1s ease 1.6s forwards; }
@property --fc-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes fcRing { from { --fc-a: -30deg; } to { --fc-a: 330deg; } }
@keyframes fcRingOut { to { opacity: 0; } }
/* 3) 白い光（直径 100px を元に拡大）。背景の層（.hud）の上・中身（z-index 1）の下 */
.fc-bloom { position: absolute; z-index: 0; width: 100px; height: 100px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #ffffff 0%, #fbfcfd 55%, rgba(210, 245, 255, .9) 70%, rgba(120, 220, 255, .35) 82%, transparent 100%); }
@media (prefers-reduced-motion: reduce) { .fc-bloom, .rcard.finishing::before { display: none; } }

/* 画面の高さを固定して、サイドバーと会話欄を別々にスクロールさせる（オーナー指摘 2026-09-21「ChatGPT は左のバーとチャット欄が分かれてスクロール・入力欄は固定」）
   前は grid の行が中身の高さまで伸び、長い会話でページごと動いて入力欄が画面の外へ押し出されていた（実測: 画面 735px に対し 1210px） */
html, body { overflow: hidden; }
#app { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
#sidebar, #main { min-height: 0; }
#thread { min-height: 0; }
.side-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; }

/* ---------- GSR からの確認（聞き返し）。報告ではないので、カードは小さく・問いを目立たせる ---------- */
.rcard.ask { border-left: 3px solid var(--warn); }
.rcard.ask .rcard-report { border-top: 0; padding-top: 4px; margin-top: 8px; }
.rcard.ask .rcard-sources, .rcard.ask .rcard-next { display: none; }
.rcard.ask.answered { border-left-color: var(--line); opacity: .75; }
body.asking .composer-box { box-shadow: var(--shadow-composer), 0 0 0 2px rgba(163, 91, 0, .35); }

/* 入力欄を 2 段に（オーナー指摘 2026-09-21「カーソルを置く場所がわかりづらい」）: 上の段はまるごと文字を打つ所、下の段に ＋・FactCore・思考量・送信（Gemini と同じ並び） */
.composer-box { align-items: center; padding: 10px 12px 10px; row-gap: 6px; cursor: text; }
#text { order: 0; flex: 1 1 100%; padding: 8px 8px 4px; min-height: 40px; }
#plus { order: 1; } .fc-switch { order: 2; } #effort { order: 3; margin-left: auto; } #send { order: 4; }

/* ---------- 添付の札（入力欄の上の段・利用者の吹き出しの上） ---------- */
.attach-row { order: -1; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 0; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 32px; padding: 0 6px 0 8px; border-radius: 10px; background: var(--hover); border: 1px solid var(--line-light); font-size: 13px; color: var(--ink); }
.file-kind { flex: none; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--brand-tint); color: var(--brand); }
.file-chip.image .file-kind { background: #eaf3ea; color: #2c6e3f; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-state { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--sub); }
.file-chip { max-width: min(100%, 420px); }
.file-chip.error { border-color: rgba(179, 65, 62, .4); } .file-chip.error .file-state { color: #b3413e; }
.file-chip.uploading .file-name { opacity: .6; }
.file-x { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; line-height: 1; color: var(--sub); }
.file-x:hover { background: var(--active); color: var(--ink); }
.attach-msg { font-size: 12px; color: var(--warn); align-self: center; }
.composer-box.dropping { box-shadow: var(--shadow-composer), 0 0 0 2px rgba(188, 0, 45, .45); }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; width: 100%; margin-bottom: 6px; }
.msg.user { flex-wrap: wrap; }
body.jarvis .file-chip { background: rgba(110, 215, 255, .08); border-color: rgba(110, 215, 255, .18); }

/* ---------- これまでの FactCore（読むだけの表示） ---------- */
.legacy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 16px 0 8px; border-radius: var(--radius-card); background: var(--hover); }
.legacy-tag { font-size: 13px; color: var(--sub); }
.legacy-note { font-size: 13px; color: var(--sub); padding: 8px 12px; margin: 12px 0; border-left: 3px solid var(--brand); background: var(--hover); border-radius: 0 8px 8px 0; }
.legacy-files { margin: 16px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.legacy-files h4 { width: 100%; font-size: 13px; font-weight: 400; color: var(--sub); }

/* 声で入力（聞いている間は赤く脈打つ） */
#mic { order: 3; margin-left: auto; }
#mic + #effort, #mic:not([hidden]) ~ #effort { margin-left: 0; }
#mic.listening { color: #fff; background: var(--brand); animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(188, 0, 45, .45); } 50% { box-shadow: 0 0 0 7px rgba(188, 0, 45, 0); } }
body.jarvis #mic.listening { background: #4fd6ff; color: #04121c; }
@media (prefers-reduced-motion: reduce) { #mic.listening { animation: none; } }

/* =====================================================================
   QUSUBI の顔（2026-09-22 #195・クロコ）
   オーナー「いまのままだと ChatGPT やん！ってならない？」「ランドのセンスが古くてダサくなる心配」→ ここで考えて決めた。
   並びは ChatGPT のまま。面だけを「紙と朱」にする:
     地  — 冷たい灰白（ChatGPT #fcfcfc・Gemini #faf9f9）をやめ、温かい紙の白。サイドバーは一段沈めた紙
     字  — 本文・UI は Noto Sans JP＋Inter（fonts/・自前で配る）。**挨拶だけ明朝**（新聞の見出し＝事実の顔。ChatGPT・Gemini に明朝は無い）
     朱  — #BC002D は面に広げない。送信・いま居る場所の印・Q のロゴ・ FactCore の入だけ
     形  — 全部丸（pill）をやめ、角丸を 8 / 14 / 18 / 22 の 4 段に。アイコンは線 1.5・端は丸のまま（角を立てると古く見える）
     光  — Gemini 写しの動く雲も、六角形の格子も置かない。紙は無地
   ===================================================================== */
:root {
  --font-ui: "QUSUBI Latin", "QUSUBI JP", ui-sans-serif, system-ui, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Apple Color Emoji", sans-serif;
  --font-display: "QUSUBI Mincho", "Hiragino Mincho ProN", "Yu Mincho", "游明朝", "Noto Serif JP", "BIZ UDPMincho", serif;
  --bg: #f8f6f1; --card: #ffffff; --ink: #1c1917; --sub: #6b6560; --faint: #9a938c;
  --side-bg: #f1ede6;
  --line: rgba(28,25,23,.10); --line-light: rgba(28,25,23,.06); --hover: rgba(28,25,23,.05); --active: rgba(28,25,23,.08);
  --user-bubble: #ede7dc; --user-ink: #1c1917;
  --link: #a3002a;
  --radius-item: 8px; --radius-card: 14px; --radius-bubble: 18px; --radius-input: 22px;
  --shadow-composer: 0 0 0 1px rgba(28,25,23,.08), 0 6px 20px -10px rgba(28,25,23,.18);
  --shadow-card: 0 0 0 1px rgba(28,25,23,.07), 0 2px 8px -4px rgba(28,25,23,.10);
}

/* 字: 画面の部品は かなを詰める（Noto Sans JP の全角送りは「新しいチャッ ト」と間延びする）。長く読む文は詰めない */
body { font-feature-settings: "palt" 1; }
.md, .msg.user .bubble, #text, .rcard-report, .confirm-lead, .confirm-q { font-feature-settings: normal; }
.brand, .md h1, .md h2, .md h3, .md strong, .md th, .rcard-title, .effort-title, .dlg-head h2, .file-kind { font-weight: 700; }
.md code { background: #efebe4; }

/* 挨拶: 明朝・太め。Q のロゴを上に */
.hero { text-align: center; }
.hero-mark { display: block; width: 52px; height: auto; margin: 0 auto 18px; }
.hero h2 { font-family: var(--font-display); font-size: 32px; line-height: 44px; font-weight: 700; letter-spacing: .06em; color: var(--ink); font-feature-settings: "palt" 1; }
.hero-sub { color: var(--sub); }
@media (max-width: 640px) { .hero-mark { width: 44px; margin-bottom: 14px; } .hero h2 { font-size: 26px; line-height: 36px; } }
/* 紙の地: 無地にしない（オーナー「無地すぎない？」2026-09-22）。スライド背景システム（deck_kit/bg.py）と同じ層の重ね方＝
   L0 温かい地のグラデ ／ L1 等高線（比較図と同じ seed=5・bg-contour.svg・地形図＝全国の土地）／ L2 朱の光を右上に薄く ／ L4 四隅を落とす。
   Gemini 写しの動く雲（.glow-blob）は使わない。ホームの時だけ。会話中は文字の後ろに模様を置かない */
.glow { display: block; }
.glow-blob { display: none; }
.glow::before { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(150% 130% at 50% 45%, transparent 58%, rgba(74,74,80,.08) 100%),
    radial-gradient(1150px 640px at 86% 18%, rgba(188,0,45,.075), transparent 72%),
    radial-gradient(1400px 820px at 84% 12%, rgba(241,237,230,.95) 0%, transparent 60%),
    radial-gradient(1100px 700px at 6% 96%, rgba(241,237,230,.70) 0%, transparent 58%),
    linear-gradient(160deg, #ffffff 0%, var(--bg) 52%, #f1ede6 100%); }
.glow::after { content: ""; position: absolute; inset: 0; opacity: .085;
  background: url("/bg-contour.svg") center / cover no-repeat;
  -webkit-mask-image: radial-gradient(150% 130% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%);
          mask-image: radial-gradient(150% 130% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%); }
@media (max-width: 640px) { .glow::after { background-position: 62% center; opacity: .07; } }
body.jarvis .glow { display: none; }
#plus::after { content: none; }

/* 形: pill をやめる */
.nav-item, .side-list li button, .icon-btn, .account, .pop-item, .effort, .tool-chip { border-radius: var(--radius-item); }
.nav-item:hover, .side-list li button:hover { background: var(--hover); border-radius: var(--radius-item); }
.btn, .chips button, .login-submit { border-radius: 10px; }
.c-icon { border-radius: 10px; }
.pop, .effort-pop { border-radius: var(--radius-card); }
.act .fav { background: #e9e3d9; }

/* 送信: 黒い丸 → 朱の角丸 */
.send { border-radius: 11px; background: var(--brand); color: #fff; }
.send:not(:disabled):hover { background: var(--brand-ink); transform: none; }
.send:disabled { background: #d9d3ca; color: #fff; }
.spinner { background: var(--brand); }

/* 利用者の吹き出し: 薄い青（ChatGPT）→ 紙より一段濃い生成り */
.msg.user .bubble { border-radius: var(--radius-bubble) var(--radius-bubble) 4px var(--radius-bubble); padding: 10px 16px; }

/* 入力欄 */
.composer-box { min-height: 60px; padding: 10px 10px; }
.composer-box:focus-within { box-shadow: 0 0 0 1.5px rgba(188,0,45,.32), 0 6px 20px -10px rgba(28,25,23,.18); }
#text::placeholder { color: var(--faint); }

/* サイドバー: 一段沈めた紙。いま居る所は朱の細い縦線 */
#sidebar { background: var(--side-bg); border-right: 1px solid var(--line-light); }
.side-section h2 { font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .06em; color: var(--sub); padding: 8px 10px 4px; }
.side-list li button.active, .side-list li button[aria-current="true"] { background: rgba(188,0,45,.07); color: var(--ink); border-radius: var(--radius-item); box-shadow: inset 3px 0 0 var(--brand); }
.side-legal { display: block; padding: 2px 10px 6px 12px; font-size: 12px; line-height: 18px; color: var(--faint); text-decoration: none; }
.side-legal:hover { color: var(--ink); text-decoration: underline; }
/* ログインのボタンも朱（黒は ChatGPT の名残） */
.login-submit, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.login-submit:hover, .btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.login-legal { text-align: center; font-size: 12px; margin-top: 12px; }
.login-legal a { color: var(--sub); }

/* FactCore（ジャービス）の間は、沈めた紙をやめて暗い地に揃える */
body.jarvis #sidebar { background: var(--bg); }
body.jarvis .side-list li button.active, body.jarvis .side-list li button[aria-current="true"] { background: var(--brand-tint); color: var(--ink); }
body.jarvis .send { background: var(--brand); color: #05202c; }
body.jarvis .send:not(:disabled):hover { background: #eafbff; }
body.jarvis .composer-box:focus-within { box-shadow: var(--shadow-composer), 0 0 0 1px rgba(79,214,255,.5); }

/* =====================================================================
   ログイン（2026-09-23 #195）: 左＝QUSUBI の顔（紙・等高線・明朝の一文）／右＝入口（白・ログインと新規登録のタブ）
   オーナー「Claude Code で作った感がすごい」→ 白い画面に入力欄 2 つを置くのをやめ、製品の顔を先に見せる。携帯幅は縦積み（顔は小さく）
   ===================================================================== */
.login { display: grid; grid-template-columns: 1.15fr 1fr; place-items: stretch; padding: 0; background: var(--bg); }
.login[hidden] { display: none; }
.login-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; min-height: 0; }
.login-visual-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(150% 130% at 50% 45%, transparent 58%, rgba(74,74,80,.08) 100%),
    radial-gradient(1150px 640px at 86% 18%, rgba(188,0,45,.09), transparent 72%),
    radial-gradient(1400px 820px at 84% 12%, rgba(241,237,230,.95) 0%, transparent 60%),
    linear-gradient(160deg, #ffffff 0%, var(--bg) 52%, #f1ede6 100%); }
.login-visual-bg::after { content: ""; position: absolute; inset: 0; opacity: .1; background: url("/bg-contour.svg") 70% center / cover no-repeat;
  -webkit-mask-image: radial-gradient(150% 130% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%); mask-image: radial-gradient(150% 130% at 50% 45%, #000 40%, rgba(0,0,0,.35) 100%); }
.login-visual-body { position: relative; max-width: 520px; }
.login-mark { display: block; width: 64px; height: auto; margin-bottom: 28px; }
.login-copy { font-family: var(--font-display); font-size: 40px; line-height: 1.4; font-weight: 700; letter-spacing: .06em; color: var(--ink); font-feature-settings: "palt" 1; }
.login-copy-sub { margin-top: 18px; font-size: 15px; line-height: 26px; color: var(--sub); letter-spacing: .02em; }
.login-visual-foot { position: absolute; left: 56px; bottom: 32px; font-family: "QUSUBI Latin", Inter, sans-serif; font-size: 12px; letter-spacing: .18em; color: var(--faint); }
.login-pane { display: grid; place-items: center; background: #fff; border-left: 1px solid var(--line-light); padding: 40px 24px; overflow-y: auto; }
.login-pane-inner { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; }
.login-tab { flex: 1; height: 36px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--sub); transition: background-color .18s ease, color .18s ease; }
.login-tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(28,25,23,.08), 0 0 0 1px rgba(28,25,23,.06); }
.login-card { gap: 14px; }
.login-title { font-family: var(--font-display); font-size: 26px; line-height: 36px; font-weight: 700; letter-spacing: .04em; margin-top: 6px; }
.login-sub { text-align: left; margin-top: -6px; }
.login-field { gap: 6px; font-size: 13px; color: var(--sub); }
.login-field input { padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: box-shadow .18s ease, border-color .18s ease; }
.login-field input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(188,0,45,.14); }
.login-error { color: var(--brand-ink); }
.login-submit { margin-top: 6px; height: 46px; padding: 0 14px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.login-legal { text-align: left; margin-top: 0; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-visual { padding: 28px 24px 22px; justify-content: flex-start; }
  .login-mark { width: 40px; margin-bottom: 14px; }
  .login-copy { font-size: 24px; line-height: 1.45; }
  .login-copy-sub { margin-top: 8px; font-size: 13px; line-height: 22px; }
  .login-visual-foot { display: none; }
  .login-pane { border-left: 0; border-top: 1px solid var(--line-light); padding: 24px 20px 40px; place-items: start center; }
}
.login-links { text-align: left; margin-top: 2px; }
.login-link { font-size: 13px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.login-link:hover { color: var(--brand-ink); }
.login-note { font-size: 13px; line-height: 20px; color: var(--ink); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
