/* 締切サバイバル 固有の見た目。共通部分は ./shared/base.css（2026-11-09 に web/ 直下へ移動。公開先 days.kabatask.com のルートに web/ をそのまま置く） */

body { overflow-x: hidden; }

/* ---- タイトル ---- */
.screen--title { text-align: center; }
.title__kanta { display: block; margin: 4px auto 0; }
.title { margin: 4px 0 8px; font-size: 28px; line-height: 1.15; letter-spacing: .04em; }
.lead { margin: 0; color: var(--text-2); font-size: 14px; }
.rules { margin: 12px 0 0; padding: 10px 14px; list-style: none; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--text-2); }
.rules li { padding: 3px 0 3px 1.2em; position: relative; }
.rules li::before { content: "・"; position: absolute; left: 0; color: var(--faint); }
.challenge { margin: 16px 0 0; padding: 8px 12px; border-radius: 8px; background: #fff7e8; border: 1px solid #f3dfb3; color: #8a5a00; font-weight: 700; }
.best { margin: 10px 0 0; color: var(--muted); font-size: 13px; min-height: 1.2em; }
.howto { margin: 14px 0 0; color: var(--faint); font-size: 12px; line-height: 1.6; }

/* ---- ゲージ ---- */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gauge { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.gauge__icon { font-size: 20px; line-height: 1; }
.gauge__name { font-size: 11px; color: var(--muted); }
.gauge__bar { width: 100%; height: 8px; background: #e3e9f2; border-radius: 4px; overflow: hidden; position: relative; }
.gauge__zone { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(205, 12, 69, .12); pointer-events: none; } /* 限界の領域の下地。ごく薄く、境界を示すだけ（濃い赤は帯の側に持たせる） */
.gauge__fill { position: relative; z-index: 1; height: 100%; width: 60%; background: var(--primary); border-radius: 4px; transition: width .35s ease-out, background .3s; }
.gauge.is-low .gauge__fill { background: var(--accent); }
.gauge.is-low .gauge__icon { animation: wobble 1s ease-in-out infinite; }
/* 終わりの一拍: 盤面と札が沈み、尽きたゲージだけ赤く点滅（2026-11-09） */
.screen--play.is-over .board, .screen--play.is-over .shelfbar, .screen--play.is-over .deck, .screen--play.is-over .buttons, .screen--play.is-over .dayline { opacity: .3; transition: opacity .6s ease; }
.screen--play.is-over .gauge:not(.is-dead) { opacity: .4; transition: opacity .6s ease; }
.gauge.is-dead .gauge__fill, .gauge[data-key="mp"].is-dead .gauge__fill { background: var(--accent); }
.gauge.is-dead .gauge__icon { animation: deadpulse .5s ease-in-out infinite alternate; }
.loadbar.is-dead { animation: deadpulse .5s ease-in-out infinite alternate; color: var(--accent); }
@keyframes deadpulse { from { transform: scale(1); filter: none; } to { transform: scale(1.25); filter: drop-shadow(0 0 6px var(--accent)); } }
@keyframes wobble { 50% { transform: translateY(-2px); } }
.gauge__hint { position: absolute; top: -2px; right: 2px; font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .1s; }
.gauge__hint.is-up { color: var(--kb-done-strong); opacity: 1; }
.gauge__hint.is-down { color: var(--accent); opacity: 1; }

.dayline { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.dayline__day { font-weight: 700; }
.dayline__week { color: var(--faint); font-size: 11px; }
/* 時計の帯: 9:00〜22:30。左 2/3 が日中（9時間）、右 1/3 が残業（4.5時間）。印が 1枚ごとに右へ滑る */
.dayline { margin-bottom: 8px; }
.dayline__band { margin-left: auto; flex: 1; min-width: 110px; max-width: 180px; height: 8px; position: relative; border-radius: 4px; background: #d9dfea; }
.dayline__band i { display: block; }
.dayline__band .ot { position: absolute; left: 66.667%; right: 0; top: 0; bottom: 0; background: #f2d4dc; border-radius: 0 4px 4px 0; }
.dayline__band .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #8a97b3; }
.dayline__band .tick--noon { left: 22.222%; opacity: .5; }
.dayline__band .tick--end { left: 66.667%; background: #3a4a6b; z-index: 1; }
.dayline__band .label { position: absolute; top: 9px; left: 66.667%; transform: translateX(-50%); font-size: 9px; line-height: 1; color: var(--muted); white-space: nowrap; }
.dayline__band.is-due .tick--end { background: var(--accent); }
.dayline__band.is-due .label { color: var(--accent); font-weight: 700; }
.dayline__band .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; --v: 1; background: linear-gradient(to right, var(--primary) calc(66.667 * 100% / var(--v)), var(--accent) 0); transition: width .4s ease-out; }
.dayline__band .marker { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-sizing: border-box; z-index: 2; transition: left .4s ease-out; }
.dayline__band.is-over .marker { border-color: var(--accent); }

/* ---- ミニかんばん ---- */
/* 上限の帯: 盤面の中、ToDo と Doing の列にまたがる細い行（数えている領域の上に置く）。10マスのうち今の枚数ぶんを埋め、右の3マスは危険域。10 で溢れる */
/* 帯は盤面の中の1行目に全幅・左詰め（ToDo / Doing / Done の見出しの縦位置を揃えるため。ToDo と Doing の上だけにまたがる形は Done の見出しがずれ、右端を Doing に揃えるのも取ってつけた感じになった。2026-11-08） */
.loadbar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 3px 6px; border-radius: 6px; background: linear-gradient(to right, var(--kb-todo), transparent 70%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.loadbar__label { font-weight: 700; color: var(--kb-todo-strong); }
.board__col { grid-row: 2; }
.loadbar__cells { display: flex; gap: 2px; }
.loadbar__cells[hidden] { display: none; }
.loadbar__cells i { width: 9px; height: 9px; border-radius: 2px; background: #e3e9f2; }
.loadbar__cells i.is-zone { background: #f6dde3; }
.loadbar__cells i.is-on { background: var(--kb-todo-strong); }
.loadbar__cells i.is-on.is-zone { background: var(--accent); }
.loadbar__num { font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }
.loadbar.is-warn .loadbar__num { color: var(--accent); font-weight: 700; }
.loadbar.is-danger .loadbar__cells i.is-on.is-zone { animation: board-warn 1s ease-in-out infinite; }
.board { display: grid; grid-template-columns: 1.3fr 1fr .8fr; /* ToDo は札が多く情報も多いので広く、Done は記録なので狭く。Doing と Done を同じ幅にすると Doing の題名が切れた（2026-11-08 試して戻した） */ gap: 6px; min-width: 0; margin-top: 8px; border-radius: 10px; padding: 4px; border: 2px solid transparent; transition: border-color .2s, background .2s; }
/* 溢れの3枚手前から警告（縁が薄い赤）、1枚手前で「もうアカン」（赤い縁が脈打つ） */
.board.is-warn { border-color: #f0a9bb; background: #fdf3f5; }
.board.is-danger { border-color: var(--accent); background: #fdeef1; animation: board-warn 1s ease-in-out infinite; }
@keyframes board-warn { 50% { box-shadow: 0 0 0 4px rgba(205, 12, 69, .18); } }
.board__col { border-radius: 8px; padding: 5px 5px 5px; min-width: 0; }
.board__cards { min-height: 141px; } /* 6枚ぶん（札 21px × 6 ＋ 間 3px × 5）。札の数で盤面の高さが変わらない（2026-11-08、札の位置がガタガタしないように） */
.board__col--todo { background: var(--kb-todo); }
.board__col--doing { background: var(--kb-doing); }
.board__col--done { background: var(--kb-done); }
/* 保留は製品のレーンではないので、盤面の下に別の帯として置く（ToDo の一部、答えを待っている札） */
.shelfbar { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 8px; border: 1px dashed #cbbf9a; border-radius: 8px; background: #f7f4ea; min-height: 46px; }
.shelfbar__head { font-size: 11px; font-weight: 700; color: #8a5a00; white-space: nowrap; }
.shelfbar__head span { font-weight: 400; color: var(--muted); }
.shelfbar__cards { flex: 1; display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.shelfbar .tcard { cursor: pointer; border-color: #d8bd77; background: #fff7df; flex: 1 1 0; max-width: 33%; flex-direction: column; align-items: stretch; gap: 1px; padding: 3px 5px; }
.shelfbar .tcard__l1 { display: flex; justify-content: space-between; gap: 4px; font-size: 9px; }
.shelfbar .tcard__who { font-weight: 700; color: var(--primary); white-space: nowrap; }
.shelfbar .tcard__l2 { font-size: 10px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.6em; }
.shelfbar .tcard--more { min-height: 36px; }
.shelfbar .tcard:active { transform: scale(.96); }
/* 朝にめくった一晩の行方 */
.shelfbar .tcard.is-reveal { animation: night-flip .3s ease-out; }
@keyframes night-flip { 0% { transform: scaleY(.1); } 100% { transform: none; } }
.shelfbar .tcard.is-cool { border-color: #b9a6e6; background: #f3effc; }
.shelfbar .tcard.is-cool .tcard__due { color: #5b3fa8; font-weight: 700; }
.shelfbar .tcard.is-burn { border-color: var(--accent); background: #fde3e8; }
.shelfbar .tcard.is-burn .tcard__due { color: var(--accent); font-weight: 700; }
.shelfbar .tcard.is-gone { border-style: dashed; background: transparent; opacity: .55; }
.shelfbar .tcard.is-gone .tcard__l2 { text-decoration: line-through; }
.shelfbar .tcard.is-gone .tcard__due { color: var(--kb-done-strong); font-weight: 700; }
.shelfbar.is-full { border-style: solid; border-color: var(--accent); }
/* 精神の帯は二色: 領域の中（左 --zone %）は赤、外は紫。帯の幅は --v % なので、帯の中での境界は zone/v */
.gauge[data-key="mp"] .gauge__fill { --v: 100; --zone: 31; background: linear-gradient(to right, #ad3a7e calc(var(--zone) * 100% / var(--v)), #7b5cc9 0); } /* 根元は落ち着いた赤紫。領域に入ったら is-low で全体が赤 */
.gauge[data-key="mp"].is-low .gauge__fill { background: var(--accent); }
/* 精神が限界: ゲージの角に小さな赤い札を重ねる（場所を取らず、画面がずれない。2026-11-08。説明は題のルールに） */
/* 精神が限界: 🧠 が激しく揺れる（吹き出し・小札は試して外した。2026-11-08） */
.gauge[data-key="mp"].is-low .gauge__icon { animation: dizzy .55s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes dizzy { 0% { transform: rotate(0) translate(0, 0); } 20% { transform: rotate(-18deg) translate(-2px, -1px) scale(1.08); } 40% { transform: rotate(14deg) translate(2px, 1px); } 60% { transform: rotate(-12deg) translate(-1px, -2px) scale(1.1); } 80% { transform: rotate(16deg) translate(2px, 0); } 100% { transform: rotate(0) translate(0, 0); } }
.deck.is-tired .card { box-shadow: 0 0 0 2px rgba(205, 12, 69, .35), 0 6px 18px rgba(0, 0, 0, .12); }
.board__head { font-size: 11px; font-weight: 700; display: flex; align-items: baseline; gap: 3px; white-space: nowrap; overflow: hidden; }
.board__col--todo .board__head { color: var(--kb-todo-strong); }
.board__col--doing .board__head { color: var(--kb-doing-strong); }
.board__col--done .board__head { color: var(--kb-done-strong); }
.board__head span { font-weight: 400; color: var(--muted); }
.board__hint { margin-left: auto; color: var(--accent) !important; font-weight: 700 !important; font-size: 10px; }
.board__cards { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.tcard { background: var(--kb-card); border: 1px solid var(--kb-card-border); border-radius: 4px; padding: 2px 4px; font-size: 10px; line-height: 1.35; display: flex; justify-content: space-between; gap: 3px; align-items: center; min-width: 0; }
.tcard__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.tcard__due { flex: 0 0 auto; font-size: 9px; color: var(--muted); }
.tcard__new { flex: 0 0 auto; margin-right: 3px; padding: 0 3px; border-radius: 2px; background: var(--primary); color: #fff; font-size: 8px; font-weight: 700; line-height: 1.5; } /* 今日生まれた仕事 */
.tcard__due.is-today { color: var(--accent); font-weight: 700; }
.tcard.is-due-today { border-left: 3px solid var(--accent); } /* 今日締切の札は左端に赤い縁。ToDo でも Doing でも、山の中でも分かる（2026-11-08） */
.tcard__prog { flex: 0 0 auto; display: flex; gap: 2px; }
.tcard__prog i { width: 6px; height: 6px; border-radius: 1px; background: #f1e6c4; }
.tcard__prog i.is-on { background: var(--kb-doing-strong); }
.tcard__prog i.is-half { background: linear-gradient(to right, var(--kb-doing-strong) 50%, #f1e6c4 50%); } /* 精神が限界: 半分ずつ進む */
.board__col--todo .tcard__prog { margin-right: 4px; }
.board__col--todo .tcard__prog i { background: #ece2c0; }
.tcard__prog i.is-lit { animation: dot-lit .6s ease-out; }
@keyframes dot-lit { 0% { transform: scale(2); background: #ff8fb1; box-shadow: 0 0 0 3px rgba(216, 27, 96, .3); } 100% { transform: none; } }
.tcard.is-move { position: relative; z-index: 2; box-shadow: 0 4px 12px rgba(216, 27, 96, .25); }
.tcard.is-done.is-move { box-shadow: 0 4px 12px rgba(31, 122, 60, .3); opacity: 1; } /* Doing から Done へ滑る間は濃く */
.tcard.is-arrive { animation: tcard-arrive .45s ease-out; }
@keyframes tcard-arrive { from { transform: translateX(-24px); opacity: 0; background: #d7f2e0; } to { transform: none; opacity: .75; } }
.board__col--done .board__hint { color: var(--kb-done-strong) !important; }
.tcard.is-enter { animation: tcard-in .3s ease-out; }
@keyframes tcard-in { from { transform: translateY(-8px) scale(.9); opacity: 0; background: #ffe9a8; } to { transform: none; opacity: 1; } }
.tcard.is-done { opacity: .75; }
.tcard--more { background: none; border: 0; color: var(--muted); justify-content: center; }
/* ToDo の山: 6枚を超えたら重ねる。少し傾けて、積み上がった感じに */
.board__cards.is-pile .tcard + .tcard { margin-top: calc(var(--squeeze, 0px) * -1); }
.board__cards.is-pile .tcard:nth-child(odd) { transform: rotate(-1.2deg); }
.board__cards.is-pile .tcard:nth-child(even) { transform: rotate(1deg); }
.board__cards.is-pile .tcard { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* ---- カード ---- */
.deck { position: relative; height: 176px; margin-top: 10px; touch-action: none; }
.card {
  position: absolute; left: 50%; top: 0; width: min(330px, 100%); height: 160px; transform: translateX(-50%);
  background: var(--kb-card); border: 1px solid var(--kb-card-border); border-radius: 16px; padding: 16px 18px 14px;
  box-shadow: 0 10px 28px rgba(31, 41, 55, .14); cursor: grab; user-select: none; display: flex; flex-direction: column;
  will-change: transform;
}
.card:active { cursor: grabbing; }
.card.is-enter { animation: card-in .22s ease-out; }
@keyframes card-in { from { transform: translateX(-50%) translateY(16px) scale(.96); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.card.fly-left { animation: fly-left .25s ease-in forwards; }
.card.fly-right { animation: fly-right .25s ease-in forwards; }
.card.fly-down { animation: fly-down .3s ease-in forwards; }
@keyframes fly-left { to { transform: translateX(-50%) translate(-140%, -30px) rotate(-16deg); opacity: 0; } }
@keyframes fly-right { to { transform: translateX(-50%) translate(140%, -30px) rotate(16deg); opacity: 0; } }
@keyframes fly-down { to { transform: translateX(-50%) translateY(160px) scale(.85); opacity: 0; } }
/* 定時の札は時報: 場面の札と違う部品に見せる（影なし・線だけ・時刻が主役）。これで仕事が進まないことに違和感が出ないようにする */
.card--closing { background: #fff; border: 2px solid var(--primary); box-shadow: none; text-align: center; }
.card--closing .card__who { text-align: left; }
.card--closing .card__text { margin-top: 0; display: flex; flex-direction: column; justify-content: center; }
.chime__time { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: .02em; color: var(--primary); font-variant-numeric: tabular-nums; }
.chime__label { margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .1em; }
.chime__say { margin-top: 12px; font-size: 14px; font-weight: 400; color: var(--text-2); }
.dayline__band.is-chime .tick--end { animation: chime 1s ease-in-out infinite; }
@keyframes chime { 50% { box-shadow: 0 0 0 3px rgba(31, 90, 214, .3); } }
.card--overtime { background: #2b3448; border-color: #2b3448; color: #fff; }
.card--overtime .card__who { color: #9fb3e8; }
.card__time { position: absolute; top: 10px; right: 14px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card__time.is-over { color: var(--accent); font-weight: 700; }
.card--overtime .card__time { color: #f4b6c6; }
.card__time.is-hidden { display: none; }
.card__badge { position: absolute; top: -10px; left: 14px; padding: 1px 8px; border-radius: 999px; background: #8a5a00; color: #fff; font-size: 11px; font-weight: 700; }
.card__badge[hidden] { display: none; }
.card__badge.is-burn { background: var(--accent); }
.card__who { font-size: 12px; font-weight: 700; color: var(--primary); }
.card__who.is-kanta { color: var(--kb-done-strong); }
.card__who.is-self { color: var(--muted); }
.card__text { margin-top: 4px; font-size: 16px; line-height: 1.55; font-weight: 700; flex: 1; }
.card__kanta { position: absolute; right: 12px; bottom: 8px; opacity: .9; width: 48px; height: auto; }
.card__kanta[hidden] { display: none; }

.choice { position: absolute; max-width: 46%; padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; line-height: 1.4; opacity: 0; transition: opacity .1s; z-index: 3; pointer-events: none; }
.choice--left { top: 12px; left: 4px; background: #eef4ff; color: var(--primary); border: 2px solid var(--primary); }
.choice--right { top: 12px; right: 4px; background: #fdeef1; color: var(--accent); border: 2px solid var(--accent); text-align: right; }
.choice--down { bottom: 4px; left: 50%; transform: translateX(-50%); background: #fff7df; color: #6b4e00; border: 2px solid #d8bd77; }
.choice.is-on { opacity: 1; }

.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.btn--choice { padding: 8px 15px; font-size: 14px; line-height: 1.35; border-radius: 12px; white-space: normal; position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; text-align: left; }
/* 行動名を主役に（黒字・太字・左寄せ）、コストと結果は下段に左寄せ。左右の区別は枠の色と端の矢印（2026-11-09、外部の提案から。中央寄せだと文の長さで位置が揺れ、2つを見比べにくかった） */
.btn--choice .lbl { min-height: 2.7em; display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; font-size: 15px; } /* 文言は2行まで。短くても高さを保つ */
.btn--choice .lbl .txt { flex: 1; min-width: 0; }
.btn--choice .lbl .arw { flex: 0 0 auto; font-style: normal; font-size: 12px; }
#btn-left .lbl .arw { color: var(--primary); }
#btn-right .lbl .arw { color: var(--accent); }
.btn--choice .meta { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 3px; min-height: 18px; } /* 2段目: ゲージ、3段目: 盤面。空でも1行ぶん */
.btn--choice .cost { display: inline-block; white-space: nowrap; padding: 0 6px; border-radius: 999px; background: #efe9fb; color: #5b3fa8; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.btn--choice[disabled] { opacity: .45; cursor: default; }
.btn--choice .cost.is-tire, .btn--choice[disabled] .cost { background: #fde3e8; color: var(--accent); }
.btn--choice .fxb { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.btn--choice .fxb--todo { background: #e4ebfa; color: var(--kb-todo-strong); }
.btn--choice .fxb--warn { background: #fff1d6; color: #8a5a00; }
.btn--choice .cost s { opacity: .55; font-weight: 400; }
.btn--choice .dir { display: inline-block; font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; }
.btn--choice .dir.is-up { color: var(--kb-done-strong); }
.btn--choice .dir.is-down { color: var(--accent); }
#btn-left { border-color: var(--primary); }
#btn-right { border-color: var(--accent); }
.btn--defer { grid-column: 1 / -1; padding: 7px; font-size: 13px; border-radius: 10px; border-color: #d8bd77; background: #fff7df; color: #6b4e00; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px 8px; }
.btn--defer .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.btn--defer .fxb { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.btn .fxb--wait { background: #fde3e8; color: var(--accent); }        /* 減るもの（待たせる代償、締切を残す、残業の体力） */
.btn .fxb--up { background: #e0f3e6; color: var(--kb-done-strong); }  /* 増えるもの */
.btn .fxb .sq { display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 1px; background: var(--kb-doing-strong); vertical-align: 1px; } /* 盤面の札と同じ、仕事の四角 */
.btn .fxb .sq--half { background: linear-gradient(to right, var(--kb-doing-strong) 50%, #f1e6c4 50%); }
.btn .fxb--sleep { background: #efe9fb; color: #5b3fa8; }             /* 明朝の精神の費用（精神の費用と同じ紫） */
.btn .fxb--fade { background: #fff; color: #6b4e00; border: 1px dashed #c9a94e; line-height: 1.4; } /* 半々で消える */
.btn .fxb--burn { background: var(--accent); color: #fff; }           /* 寝かせると燃える */
.btn--defer[disabled] { opacity: .35; cursor: default; }
.btn--defer.is-none { border-color: transparent; background: transparent; color: var(--faint); opacity: 1; } /* あとでにできない話。場所は保つ */
.btn--leave { grid-column: 1 / -1; padding: 6px; font-size: 12px; border-radius: 10px; border: 1px dashed #8a97b3; background: #fff; color: var(--text-2); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px 8px; }
.btn--leave[hidden] { display: none; }
.btn--leave .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.btn--leave .fxb { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.toast { margin: 0 0 6px; height: 2.9em; overflow: hidden; font-size: 13px; line-height: 1.45; color: var(--text); font-weight: 700; text-align: center; display: flex; align-items: center; justify-content: center; padding: 0 6px; } /* 札とボタンのあいだ、2行ぶんの高さを固定（2026-11-08） */
.toast.is-new { animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 語り手 */
.narr { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.narr__kanta { flex: 0 0 auto; display: block; }
.bubble { position: relative; flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.6; text-align: left; }
.bubble::before { content: ""; position: absolute; left: -7px; bottom: 14px; border: 6px solid transparent; border-right-color: var(--border); border-left: 0; }
.bubble::after { content: ""; position: absolute; left: -5px; bottom: 15px; border: 5px solid transparent; border-right-color: var(--surface); border-left: 0; }

/* ---- 結果 ---- */
.screen--result { text-align: center; }
.result__eyebrow { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.result__days { margin: 2px 0 0; font-size: 52px; font-weight: 700; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.result__unit { font-size: 16px; margin-left: 6px; color: var(--text-2); }
.result__cause { margin: 6px 0 0; font-size: 18px; font-weight: 700; }
.result__leave { margin: 4px 0 0; font-size: 13px; color: var(--text-2); }
.result__score { margin: 10px 0 0; font-size: 26px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.result__score .result__label { display: block; font-size: 11px; font-weight: 400; letter-spacing: .12em; color: var(--muted); margin-bottom: -2px; } /* 大きな数字は単位なし、ラベル「スコア」で見せる。文中は「pt」（2026-11-09） */
.scorelist { margin: 4px auto 0; padding: 0; list-style: none; max-width: 320px; font-size: 12px; color: var(--text-2); }
.scorelist li { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; border-bottom: 1px dotted var(--border); }
.scorelist b { font-variant-numeric: tabular-nums; color: var(--kb-done-strong); }
.scorelist b.is-minus { color: var(--accent); }
/* 観察記録（図鑑の1ページ）。白地に細い枠、左寄せの読みもの。見出しは小さく薄い字で、本文は観察文（2026-11-09） */
.dex { margin: 14px 0 0; padding: 12px 14px 12px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.dex__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.dex__no { font-variant-numeric: tabular-nums; }
.dex__top { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.dex__title { flex: 1; min-width: 0; }
.dex__img { flex: 0 0 auto; width: 104px; height: 104px; display: block; } /* 種の絵（species/<code>.png、256px を 104px で表示） */
.dex__name { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: .06em; color: var(--primary); }
.dex__taxon { margin: 4px 0 0; font-size: 12px; color: var(--text-2); }
.dex__sep { margin: 0 5px; color: var(--faint); }
.dex__h { margin: 12px 0 2px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.dex__h .dex__days { margin-left: 2px; font-weight: 400; letter-spacing: 0; }
.dex__p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text); }
.dex__count { margin: 8px 0 0; font-size: 12px; color: var(--text-2); }
/* 生き残るための助言。図鑑の枠の外、システムの声。左に indigo の線 */
.advice { margin: 14px 0 0; padding: 8px 12px 10px; text-align: left; border-left: 3px solid var(--primary); background: #f6f7fb; border-radius: 0 8px 8px 0; }
.advice__h { margin: 0 0 4px; font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .08em; }
.advice__p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text); }
.evidence { margin: 0; padding: 0 0 0 1.3em; font-size: 13px; line-height: 1.6; color: var(--text); }
.evidence li { margin: 1px 0; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.product { margin: 22px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.external { color: var(--primary); }

/* ---- 図鑑（2026-11-09） ---- */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dexlink { margin: 6px 0 0; font-size: 13px; }
.screen--dexbook { text-align: left; }
.dexbook__head { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.dexbook__title { flex: 1; margin: 0; font-size: 15px; letter-spacing: .04em; color: var(--text); }
.dexbook__count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.btn--small { padding: 4px 10px; font-size: 12px; min-height: 0; }
.btn--ghost { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.dexbook__grid { display: grid; grid-template-columns: 22px repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.dexbook__colhead { grid-column: span 2; text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .06em; padding-bottom: 2px; }
.dexbook__rowhead { display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1.2; color: var(--muted); writing-mode: vertical-rl; letter-spacing: .12em; }
.dexbook__cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font: inherit; }
.dexbook__cell img { width: 64px; height: 64px; display: block; }
.dexbook__cell.is-unknown img { filter: brightness(0); opacity: .18; } /* 未発見はシルエット */
.dexbook__cell .nm { font-size: 10px; line-height: 1.2; text-align: center; color: var(--text); min-height: 2.4em; display: flex; align-items: center; }
.dexbook__cell.is-unknown .nm { color: var(--faint); letter-spacing: .1em; }
.dexbook__cell .cnt { position: absolute; top: 3px; right: 5px; font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dexbook__cell.is-selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.dexbook__detail { margin-top: 12px; }
.dexbook__detail.is-unknown .dex__img { filter: brightness(0); opacity: .18; }
.dexbook__stat { margin: 10px 0 0; font-size: 12px; color: var(--text-2); }
