/* 司令室の見た目。色・寸法は見本（docs/ui/reference/Main.dc.html）と仕様書 §4-2 に合わせる */

/* フォントは自前で配る（tools/build_web_fonts.py で軽くしたもの）。無い文字は端末の標準のフォントで出る */
@font-face { font-family: "Shippori Mincho B1"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/ShipporiMinchoB1-Bold.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/ZenKakuGothicNew-Regular.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/ZenKakuGothicNew-Bold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap;
  src: url("/static/fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

:root {
  --ground: #0B1024;
  --card: #10183A;
  --line: #2A3560;
  --line-soft: #1B2449;
  --gold: #C9A45C;
  --gold-bright: #E8C674;
  --gold-pale: #F2DFA6;
  --crimson-deep: #9E2A3A;
  --crimson: #B8384C;
  --aqua: #9FD8E6;
  --ink: #ECE6D8;
  --ink-soft: #A7AFC8;
  --ink-mute: #8C95B4;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); font-family: var(--gothic); }
button, input { font-family: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
button:disabled, input:disabled { cursor: default; }

.app { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }  /* hidden だと下の固定が効かない */

/* ---- 見出し ---- */
.head { display: flex; justify-content: space-between; align-items: flex-end; padding: 22px 20px 12px; }
.title { display: flex; flex-direction: column; gap: 2px; }
.brand { font-family: var(--mono); font-size: 11px; letter-spacing: 0.34em; color: var(--gold); }
.room { font-family: var(--mincho); font-size: 22px; font-weight: 700; letter-spacing: 0.08em; }
.head-right { display: flex; align-items: center; gap: 6px; }
.date { font-size: 13px; color: var(--ink-soft); }
.bell { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: transparent;
  color: var(--gold); display: flex; align-items: center; justify-content: center; }

/* ---- いま ---- */
.now { margin: 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  display: flex; flex-direction: column; gap: 10px; }
.now-main { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.now-left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.now-label { font-size: 11px; letter-spacing: 0.24em; color: var(--gold); }
.now-name { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-sub { font-size: 12px; color: var(--ink-soft); }
.now-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.now-elapsed { font-family: var(--mono); font-size: 30px; font-weight: 500; color: var(--gold-pale); line-height: 1; }
.end-button { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid #3A4675; background: transparent;
  color: var(--ink); font-size: 12px; }
.nagara-list { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid #1F2A55; display: flex; flex-direction: column; gap: 8px; }
.nagara-list li { display: flex; align-items: center; gap: 10px; }
.nagara-plus { font-weight: 700; color: var(--gold-bright); }
.nagara-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex-grow: 1; }
.nagara-name { font-size: 14px; font-weight: 700; }
.nagara-note { font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.nagara-since { font-size: 11px; color: var(--ink-soft); }
.nagara-elapsed { font-family: var(--mono); font-size: 16px; color: var(--gold-pale); }
.nagara-list .end-button { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 11px; }

/* ---- 天球儀のダイアル（380×380 の部品を、画面の幅に合わせて縮める）---- */
.dial-section { position: relative; height: calc(380px * var(--dial-scale, 0.91) + 6px); margin-bottom: 8px; }
.dial { position: absolute; left: 50%; top: 50%; width: 380px; height: 380px; margin: -190px 0 0 -190px;
  transform: scale(var(--dial-scale, 0.91)); }
.band { position: absolute; left: 40px; top: 40px; width: 300px; height: 300px; }
.rings { position: absolute; left: 0; top: 0; pointer-events: none; }
.rot { transform-origin: 190px 190px; transform-box: view-box; }
.cw40 { animation: spinCW 40s linear infinite; }
.ccw70 { animation: spinCCW 70s linear infinite; }
@keyframes spinCW { to { transform: rotate(360deg); } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }

.sphere-anchor { position: absolute; left: 190px; top: 190px; width: 0; height: 0; perspective: 600px; pointer-events: none; }
.sphere { position: absolute; width: 0; height: 0; transform-style: preserve-3d; animation: sphere 22s linear infinite; }
@keyframes sphere { from { transform: rotateX(-16deg) rotateY(0deg); } to { transform: rotateX(-16deg) rotateY(360deg); } }
.s-axis { position: absolute; width: 1px; height: 170px; margin: -85px 0 0 0; background: rgba(232, 198, 116, 0.5); }
.s-ring { position: absolute; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 75px; }
.s-meridian { border: 1.3px solid rgba(232, 198, 116, 0.8); }
.s-equator { border: 1.3px solid rgba(232, 198, 116, 0.55); transform: rotateX(90deg); }
.s-ecliptic { width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 66px;
  border: 2px solid rgba(200, 70, 90, 0.8); transform: rotateX(66deg) rotateY(23deg); }
.s-dashed { border: 1px dashed rgba(232, 213, 163, 0.5); transform: rotateY(90deg); }

.core-button { position: absolute; left: 142px; top: 142px; width: 96px; height: 96px; border: none; padding: 0;
  background: transparent; display: flex; align-items: center; justify-content: center; }
.core-halo { position: absolute; width: 92px; height: 92px; border-radius: 46px; border: 1px solid var(--gold-bright);
  animation: clioHalo 3.2s ease-in-out infinite; }
.core { width: 46px; height: 46px; border-radius: 23px; background: var(--gold-pale);
  box-shadow: 0 0 18px 6px rgba(232, 198, 116, 0.45), 0 0 48px 16px rgba(158, 42, 58, 0.25);
  animation: clioPulse 3.2s ease-in-out infinite; }
@keyframes clioPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes clioHalo { 0%, 100% { transform: scale(1); opacity: .35; } 50% { transform: scale(1.22); opacity: .12; } }

/* ---- よく使う記録のボタン ---- */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 20px; }
.quick button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 14px; }

/* ---- チャット欄と下のタブ ---- */
.chat { display: flex; gap: 8px; align-items: center; padding: 12px 16px 10px 20px;
  border-top: 1px solid var(--line-soft); background: var(--ground); }
.chat input { flex-grow: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 15px; }
.chat input::placeholder { color: #6E7796; }
.send { width: 44px; height: 44px; border-radius: 22px; border: none; background: var(--crimson-deep); color: #FFF4E8;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tabs { height: 64px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-soft);
  background: #080C1E; padding-bottom: env(safe-area-inset-bottom); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none;
  background: transparent; color: var(--ink-mute); font-size: 11px; }
.tab[aria-current="page"] { color: var(--gold-bright); }

.mic { width: 36px; height: 44px; border: none; background: transparent; color: var(--ink-mute); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; }

/* まだ動かない部品（仮置きのマイク・準備中のタブ）と、送っている間のボタンは少し暗くする */
.end-button:disabled, .quick button:disabled, .chat input:disabled, .send:disabled, .tab:disabled, .mic:disabled,
.ask button:disabled { opacity: 0.45; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- 鈴（静かにする）---- */
.head-right { position: relative; }
.bell[aria-pressed="true"] { background: rgba(232, 198, 116, 0.14); border-color: var(--gold); }
.bell-menu { position: absolute; right: 0; top: 50px; z-index: 7; width: min(290px, calc(100vw - 40px)); padding: 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: 6px; }
.bell-state { margin: 2px 4px 4px; font-size: 12px; color: var(--gold-pale); }
.bell-menu button { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--ink); font-size: 13px; text-align: left; }

/* ---- 主の「終わり」で、ながらを続けるか聞く ---- */
.ask { padding-top: 10px; border-top: 1px solid #1F2A55; display: flex; flex-direction: column; gap: 8px; }
.ask-text { font-size: 13px; line-height: 1.6; }
.ask-keys { display: flex; gap: 8px; }
.ask-keys button { flex: 1 1 0; min-width: 0; height: 36px; border-radius: 18px; border: 1px solid #3A4675; background: transparent;
  color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.ask-keys .keep { border-color: var(--gold); background: rgba(232, 198, 116, 0.12); color: var(--gold-pale); }

/* ---- 記録の受付（小さなお知らせ）---- */
.toast { position: fixed; left: 16px; right: 20px; bottom: calc(var(--dock, 131px) + 10px); z-index: 5;
  display: flex; gap: 8px; align-items: flex-end; animation: clioFade .35s ease-out both; pointer-events: none; }
/* 会話画面が開いている間は、メッセージウィンドウに重ならないよう上に出す */
.talking .toast { bottom: auto; top: 62px; }
.toast-avatar { width: 34px; height: 34px; border-radius: 17px; object-fit: cover; border: 1px solid var(--gold); flex-shrink: 0; }
.toast-text { padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #1A2350; border: 1px solid #5B5132;
  font-size: 13px; line-height: 1.5; white-space: pre-line; max-height: 7.5em; overflow: hidden; }

/* ---- C.L.I.O. が顕れる会話画面（見本 Main.dc.html の manifest）---- */
.manifest { position: fixed; left: 0; right: 0; top: 0; bottom: var(--dock, 131px); z-index: 2; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(26, 35, 80, 0.94) 0%, rgba(7, 11, 26, 0.96) 70%);
  animation: clioFade .35s ease-out both; }
.bust-box { position: absolute; left: 0; right: 0; top: 8px; bottom: 110px; display: flex; justify-content: center; align-items: flex-end; }
.bust { height: 560px; max-height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%); mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  filter: drop-shadow(0 0 22px rgba(232, 198, 116, 0.22)); }
.bust.rise { animation: clioRise .6s cubic-bezier(.2, .8, .2, 1) both; }
.manifest-keys { position: absolute; right: 12px; top: 14px; display: flex; gap: 8px; z-index: 1; }
.log-button { height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--gold); background: rgba(11, 16, 36, 0.8);
  color: var(--gold-pale); font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; }
.dismiss { width: 36px; height: 36px; border-radius: 6px; border: 1px solid #3A4675; background: rgba(11, 16, 36, 0.8);
  color: var(--ink); display: flex; align-items: center; justify-content: center; }
.window { position: absolute; left: 10px; right: 10px; bottom: 28px; min-height: 132px; max-height: 48%; overflow-y: auto;
  padding: 14px 18px 22px; border-radius: 10px; border: 1px solid rgba(201, 164, 92, 0.55);
  background: linear-gradient(180deg, rgba(16, 24, 58, 0.9) 0%, rgba(8, 12, 30, 0.95) 100%); box-shadow: 0 -8px 30px rgba(7, 11, 26, 0.6); }
.nameplate { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(201, 164, 92, 0.35); }
.nameplate .name { font-family: var(--mincho); font-size: 17px; font-weight: 700; letter-spacing: 0.12em; color: var(--gold-pale); }
.nameplate .title-sub { font-size: 12px; color: var(--aqua); }
.line { margin: 10px 0 0; font-size: 15px; line-height: 1.75; white-space: pre-line; }
.line.thinking { color: var(--ink-soft); }
.next { position: absolute; right: 16px; bottom: 10px; width: 0; height: 0; border-left: 6px solid transparent;
  border-right: 6px solid transparent; border-top: 8px solid var(--aqua); animation: clioNext 1.2s ease-in-out infinite; }
.log { position: absolute; inset: 0; z-index: 3; background: rgba(7, 11, 26, 0.97); display: flex; flex-direction: column;
  animation: clioFade .35s ease-out both; }
.log-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 12px 10px 20px; border-bottom: 1px solid var(--line-soft); }
.log-title { font-family: var(--mono); font-size: 13px; letter-spacing: 0.3em; color: var(--gold); }
.log-back { height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid #3A4675; background: transparent; color: var(--ink); font-size: 13px; }
.log-list { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px 20px 20px; }
.log-item { display: flex; flex-direction: column; gap: 3px; }
.log-who { font-size: 13px; font-weight: 700; }
.log-who.clio { font-family: var(--mincho); color: var(--gold-pale); }
.log-who.user { color: #E7A3AE; }
.log-time { margin-left: 8px; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-mute); }
.log-text { font-size: 14px; line-height: 1.7; color: #D9D3C4; white-space: pre-line; overflow-wrap: anywhere; }
.log-empty { font-size: 13px; color: var(--ink-soft); }
.dock { position: sticky; bottom: 0; z-index: 4; margin-top: auto; }

/* ---- 帳簿（見本 Ledger.dc.html）---- */
.view { display: flex; flex-direction: column; }
#view-ledger .head { padding-bottom: 10px; }
.ledger-summary { font-size: 12px; color: var(--ink-soft); }
.day-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px; }
.day-step { width: 44px; height: 44px; border: none; background: transparent; color: var(--gold); font-size: 20px; }
.day-step:disabled { color: #3A4675; }
.ledger-date { font-family: var(--mincho); font-size: 16px; font-weight: 700; }
.ledger-list { list-style: none; margin: 0; padding: 0 16px 16px; display: flex; flex-direction: column; }
.ledger-list .place { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 14px; font-weight: 700; color: #E8D5A3; }
.ledger-list .place .mark { color: var(--gold); }
.ledger-list .time { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-soft); width: 92px; flex-shrink: 0; }
.ledger-list .place .time { width: auto; font-size: 14px; font-weight: 500; color: #E8D5A3; }
.ledger-list .row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 0 0 16px;
  border: none; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.ledger-list .row.nagara { padding-left: 34px; }
.ledger-list .row.live { min-height: 42px; padding-left: 14px; border: 1px solid var(--crimson-deep); border-radius: 10px; background: #1E1430; }
.ledger-list .row.live.nagara { padding-left: 32px; }
.ledger-list .row.live .time { color: var(--gold-pale); }
.ledger-list .row.static { cursor: default; }
.ledger-list .bar { width: 4px; height: 22px; flex-shrink: 0; }
.ledger-list .plus { font-weight: 700; color: var(--gold-bright); }
.ledger-list .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-list .note { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ledger-list .tags { margin-left: auto; margin-right: 4px; display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.ledger-list .food { width: 16px; height: 16px; border: 1px solid #E8D5A3; font-family: var(--mono); font-size: 10px;
  display: flex; align-items: center; justify-content: center; }
.ledger-list .memo { width: 16px; height: 16px; border-radius: 8px; background: #E8D5A3; color: var(--ground); font-family: var(--mono);
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ledger-list .live-tag { font-size: 11px; color: var(--gold-bright); margin-right: 4px; }
.ledger-empty { padding: 24px 4px; font-size: 13px; color: var(--ink-soft); }

/* ---- 重点（見本 Focus.dc.html）---- */
.focus .chat, .ledger .chat { display: none; }
#view-focus .head { padding-bottom: 14px; }
.focus-say { margin: 0 20px 14px; display: flex; gap: 12px; align-items: flex-start; }
.focus-avatar { width: 52px; height: 52px; border-radius: 26px; object-fit: cover; border: 1px solid var(--gold); flex-shrink: 0; }
.focus-line { margin: 0; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: #121A3E; border: 1px solid #5B5132;
  font-size: 14px; line-height: 1.6; white-space: pre-line; }
.focus-cards { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.focus-card { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  display: flex; flex-direction: column; gap: 10px; }
.focus-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.focus-name { margin: 0; font-size: 16px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.focus-goal { font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.focus-tag { padding: 3px 10px; border-radius: 12px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.focus-tag.streak { background: #3A3016; color: var(--gold-pale); }
.focus-tag.gap { background: #3A1620; color: #F0B4BE; }
.focus-dots { display: grid; gap: 4px; }
.focus-dots span { height: 12px; border-radius: 3px; }
.focus-dots .on { background: var(--gold-bright); }
.focus-dots .off { background: #1F2A55; }
.focus-dots .future { border: 1px dashed var(--line); }
.focus-stats { display: flex; gap: 18px; font-size: 12px; color: var(--ink-soft); }
.focus-stats b { color: var(--ink); }
.focus-stats .num { font-family: var(--mono); font-size: 14px; }
.focus-stats .word { font-size: 13px; }
.focus-empty { padding: 16px; border-radius: 14px; border: 1px dashed var(--line); font-size: 14px; color: var(--ink-soft); text-align: center; }
.focus-change { margin: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.focus-change-button { height: 44px; border-radius: 22px; border: 1px solid var(--gold); background: transparent; color: var(--gold-pale); font-size: 14px; }
.focus-hint { margin: 0; font-size: 12px; color: var(--ink-soft); text-align: center; }

/* 記録を直す（下から出る）*/
.sheet-backdrop { position: fixed; inset: 0; z-index: 5; background: rgba(7, 11, 26, 0.55); }
.sheet { position: fixed; left: 0; right: 0; bottom: var(--dock, 64px); z-index: 6; padding: 10px 20px 18px;
  border-radius: 20px 20px 0 0; border-top: 1px solid var(--gold); background: #121A3E;
  display: flex; flex-direction: column; gap: 12px; animation: sheetUp .25s ease-out both; max-height: calc(100dvh - var(--dock, 64px) - 20px); overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: #3A4675; }
.sheet-head { display: flex; flex-direction: column; gap: 2px; }
.sheet-title { margin: 0; font-family: var(--mincho); font-size: 18px; font-weight: 700; }
.sheet-sub { font-size: 12px; color: var(--ink-soft); }
.sheet-form { display: flex; flex-direction: column; gap: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-soft); min-width: 0; }
.sheet-grid input { height: 44px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground);
  color: var(--ink); font-size: 15px; min-width: 0; }
.sheet-grid input[type="time"] { font-family: var(--mono); }
.field-note { font-size: 11px; color: var(--ink-mute); }
.sheet-note { margin: 0; font-size: 12px; color: var(--ink-soft); white-space: pre-line; }
.sheet-note.error { color: #E7A3AE; }
.sheet-keys { display: flex; gap: 10px; }
.sheet-keys button { height: 44px; border-radius: 22px; font-size: 14px; }
.sheet-keys .remove { padding: 0 16px; border: 1px solid #5A2230; background: transparent; color: #E7A3AE; }
.sheet-keys .save { flex-grow: 1; border: none; background: var(--crimson-deep); color: #FFF4E8; font-size: 15px; font-weight: 700; }
.sheet-confirm { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.confirm-text { margin: 0; font-size: 14px; line-height: 1.7; }
.sheet-keys .keep-record { flex-grow: 1; border: 1px solid #3A4675; background: transparent; color: var(--ink); }
.sheet-keys .remove-yes { flex-grow: 1; border: none; background: var(--crimson-deep); color: #FFF4E8; font-weight: 700; }
.sheet button:disabled { opacity: 0.45; }

/* 顕れる瞬間の白い光（1秒。すでに顕れている間は光らせない）*/
.flash { position: fixed; inset: 0; z-index: 6; background: #FFF8E6; pointer-events: none; animation: clioFlash 1s ease-out both; }

@keyframes clioFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes clioRise { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes clioFlash { 0% { opacity: 0; } 16% { opacity: .92; } 100% { opacity: 0; } }
@keyframes clioNext { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(3px); opacity: .5; } }

/* ---- お知らせ（認証の失敗など）---- */
.notice { position: fixed; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center;
  background: rgba(7, 11, 26, 0.96); color: var(--crimson); font-size: 14px; line-height: 1.7; z-index: 10; }
.notice[hidden] { display: none; }

/* 端末で「視差効果を減らす」が有効なら、回転と脈動をすべて止める（仕様書 §4） */
@media (prefers-reduced-motion: reduce) {
  .cw40, .ccw70, .sphere, .core, .core-halo, .next, .bust.rise, .toast, .manifest, .log, .sheet { animation: none; }
  .flash { animation: clioFade .3s ease-out reverse both; }
}
