/* satellite-witness prototype
   notes/ui_design_guide.md の原則を、明度のみ反転して適用している。
   - 半透明カード＋backdrop-filter（地色は Canvas の地球）
   - 面で色を持たせ、縁取りで色を出さない
   - 状態は塗りの濃さと影で表す
   - 暖色（アンバー）は「高度と残存時間」にだけ使う
     ＝ 画面で唯一あたたかい色が寿命になる */

:root {
  --bg:            #05070b;
  --ink:           rgba(233, 238, 245, 0.92);
  --ink-2:         rgba(233, 238, 245, 0.58);
  --ink-3:         rgba(233, 238, 245, 0.34);
  /* 縁取りを持たせないので、塗りの濃さが唯一の輪郭になる。
     暗い地の上では暗い影が効かないため、地よりわずかに明るく置いて浮かせる */
  --card:          rgba(23, 30, 41, 0.66);
  --edge-hi:       rgba(255, 255, 255, 0.16);

  /* 唯一の暖色。高度・残存時間・主要導線にのみ使う */
  --amber:         #f2a34e;
  --amber-dim:     rgba(242, 163, 78, 0.62);
  --amber-fill-a:  rgba(122, 78, 26, 0.92);
  --amber-fill-b:  rgba(74, 46, 16, 0.92);
  --amber-edge:    rgba(242, 163, 78, 0.42);

  --radius:        18px;
  --radius-sm:     5px;
  --shadow:        0 22px 56px rgba(0, 0, 0, 0.62);

  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium",
          "Yu Gothic", "Noto Sans JP", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* .btn などが display を指定すると、ブラウザ標準の [hidden]{display:none} に勝ってしまう。
   見えないまま画面に残り、後ろの要素のクリックを奪う */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 数字は必ず等幅。周回カウンタが毎秒動くため、これが無いと桁が揺れる */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---- 背景レイヤー（地球・星・デブリ）------------------------------------ */

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  /* モバイルは縦積みでページ自体がスクロールする。canvas は pointer-events を
     指定していないため既定で auto になり、指を置いた場所によって
     （カードの上か、素通しの地球儀の上か）スクロールの効き方が変わっていた。
     pan-y にすると縦スクロールはブラウザに渡り、observatory の wheel（PC専用の
     寄り引き）には影響しない（wheel はマウス操作で touch-action の対象外） */
  touch-action: pan-y;
}

.stage {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  /* 地球を押せるようにするため、素通しにして中身だけ受け取る */
  pointer-events: none;
}
.card, .btn, .devbar, .globe-ui, .roster__row { pointer-events: auto; }

/* ---- カード -------------------------------------------------------------- */

/* 縁取りは持たせない（指針：面で色を持たせ、縁取りで色を出さない）。
   境界を線で示さないぶん、塗りをやや濃くし、影を広く深くして浮かせる。
   背後が明るい地球でも輪郭が溶けないのは、この2つが担っている */
.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 30px;
}

/* 主役カード。画面で唯一の暖色 */
.card--life {
  background: linear-gradient(158deg, var(--amber-fill-a), var(--amber-fill-b));
  box-shadow: 0 22px 56px rgba(70, 40, 8, 0.55);
}

.card__title {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.06em;
  margin: 0 0 18px;
}

.card__title-sub {
  font-size: 17px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.card__rule {
  height: 1px;
  background: var(--edge-hi);
  border: 0;
  margin: 18px 0;
}

/* ---- ワードマーク --------------------------------------------------------- */

/* ORBIT WITNESS と書き、Orbwit に残る文字だけを明るくする。
   明るいところだけ拾うと ORBWIT、全部読むと ORBIT WITNESS。
   本文が日本語のゴシックなので、等幅にすると名前だけが別のものとして立つ */
.wordmark {
  position: fixed;
  left: 22px;
  bottom: 18px;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.30em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark__keep { color: rgba(233, 238, 245, 0.66); }
/* 落ちた文字。消さずに沈めることで、縮約の前後が同時に読める */
.wordmark__drop { color: rgba(233, 238, 245, 0.20); }
/* 単語の切れ目。字間を広く取っているので、空白1つでは切れ目に見えない */
.wordmark__gap { display: inline-block; width: 0.85em; }

/* 開発用の帯と同じ隅に出るので、そのときだけ上へ逃がす */
.has-devbar .wordmark { bottom: 52px; }

@media (max-width: 900px) {
  .wordmark { left: 16px; bottom: 14px; font-size: 11px; letter-spacing: 0.24em; }
}

/* ---- あだ名の入力 --------------------------------------------------------- */

.nickname-field {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.input {
  flex: 1 1 220px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--edge-hi);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.03em;
  padding: 10px 14px;
}
.input:focus { outline: none; border-color: var(--amber-dim); }
.input::placeholder { color: var(--ink-3); }

.nickname-edit {
  background: none;
  border: 0;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nickname-edit:hover { color: var(--ink-2); }

.card__row  { color: var(--ink-2); font-size: 15px; line-height: 2; }
.card__note { color: var(--ink-2); font-size: 15px; margin-top: 4px; }

/* ---- テキスト ------------------------------------------------------------ */

.lead {
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.75;
  text-align: center;
  font-weight: 300;
  margin: 0;
}

.sub   { color: var(--ink-2); font-size: 14px; }
.tiny  { color: var(--ink-3); font-size: 12px; letter-spacing: 0.06em; }
.amber { color: var(--amber); }

/* ---- ボタン -------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--amber);
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.08em;
  padding: 15px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: background 240ms ease, border-color 240ms ease, color 240ms ease;
}
.btn:hover { background: rgba(242, 163, 78, 0.10); border-color: var(--amber); }

.btn--quiet {
  border-color: var(--edge-hi);
  color: var(--ink-2);
  font-size: 13px;
  padding: 10px 20px;
}
.btn--quiet:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }

.btnrow { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---- 中央寄せの一枚画面（home / meeting / reentry / birth / roster）------ */

.center {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 6vh 6vw;
  text-align: center;
  overflow-y: auto;
}

/* ---- 出会い：残った一点の横に並べる ------------------------------------- */

/* 遭遇シーケンスの絵をそのまま引き継ぎ、点は動かさずカードだけを右に足す。
   中央に置き直すと、画面が切り替わったことになってしまう */
.meeting {
  position: absolute;
  left: 48%;
  top: 50%;
  transform: translateY(-50%);
  width: 44vw;
  min-width: 340px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  /* rise は transform を none で終えるので、そのまま使うと translateY(-50%) が
     打ち消されて中央寄せが外れる。中央寄せを畳み込んだ専用の動きを使う */
  animation: riseCentered 900ms cubic-bezier(0.16, 0.84, 0.32, 1) both;
  animation-delay: 260ms;
}

@keyframes riseCentered {
  from { opacity: 0; transform: translateY(calc(-50% + 22px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

/* ---- 観測室：衛星を中心に浮遊するカード群 -------------------------------- */

.observatory { position: absolute; inset: 0; }

/* 固定の top% で置くとビューポートが低いときに必ず重なるので、
   左右2列を上下に突っ張らせて、間隔は space-between に任せる */
.obs-col {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  scrollbar-width: none;
}
.obs-col::-webkit-scrollbar { display: none; }

.obs-col--right {
  right: 3.5%;
  top: 4vh;
  bottom: 4vh;
  width: 40vw;
  min-width: 330px;
  max-width: 520px;
  /* safe を付けないと、内容がビューポートより高いときに上端が切れて読めなくなる */
  justify-content: safe center;
}
.obs-col--left {
  left: 3.5%;
  top: 4vh;
  bottom: max(6vh, 76px); /* 開発バーと試験バーに被らせない */
  width: 26vw;
  min-width: 240px;
  max-width: 340px;
  justify-content: safe space-between;
}

.float { animation: rise 900ms cubic-bezier(0.16, 0.84, 0.32, 1) both; }
.float--identity { animation-delay: 120ms; }
.float--absence  { animation-delay: 260ms; }
.float--life     { animation-delay: 400ms; }
.float--revs     { animation-delay: 340ms; }
.float--pass     { animation-delay: 480ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.revs__total { font-size: 40px; letter-spacing: 0.04em; }
.revs__label { color: var(--ink-2); font-size: 15px; }

.life {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(60px, 1fr) minmax(0, auto);
  gap: 18px;
  align-items: end;
}
.life__alt       { font-size: clamp(26px, 2.6vw, 40px); color: #fff; letter-spacing: 0.01em; line-height: 1.1; white-space: nowrap; }
.life__altlabel  { color: rgba(255, 255, 255, 0.62); font-size: 13px; margin-bottom: 2px; }
.life__delta     { color: rgba(255, 255, 255, 0.72); font-size: 14px; margin-top: 6px; }
.life__left      { font-size: clamp(20px, 2vw, 28px); color: #ffd9a8; text-align: right; line-height: 1.2; white-space: nowrap; }
.life__leftlabel { color: rgba(255, 255, 255, 0.62); font-size: 13px; text-align: right; }
.life__verdict   { color: rgba(255, 255, 255, 0.62); font-size: 13px; text-align: right; margin-top: 8px; }
.life__chart     { width: 100%; height: 64px; display: block; }

.pass__time { font-size: 28px; letter-spacing: 0.03em; }


/* ---- 地球儀モード -------------------------------------------------------- */

/* 画面は一枚。カードは常に地球儀の上に載っている */
.obs-col { transition: opacity 620ms ease; }


@keyframes hintPulse {
  0%, 100% { opacity: 0.5;  transform: translate(-50%, 0); }
  50%      { opacity: 1;    transform: translate(-50%, 5px); }
}

/* ---- 地球の見え方（本番機能）----------------------------------------------- */

.lookbar {
  position: fixed;
  right: 0;
  bottom: 30px;
  z-index: 5;
  pointer-events: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top-left-radius: 10px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.lookbar::-webkit-scrollbar { display: none; }
.lookbar button {
  font-family: inherit;
  font-size: 11px;
  font-weight: 300;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 4px;
  padding: 5px 9px;
  cursor: pointer;
}
.lookbar button:hover { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
.lookbar button.on { background: rgba(242, 163, 78, 0.22); color: var(--amber); }

/* ---- 試験用の帯（本番では消す）------------------------------------------- */

.testbar {
  position: fixed;
  left: 0;
  bottom: 30px;
  z-index: 5;
  pointer-events: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top-right-radius: 10px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.testbar::-webkit-scrollbar { display: none; }
.testbar button {
  font-family: inherit;
  font-size: 11px;
  font-weight: 300;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 4px;
  padding: 5px 9px;
  cursor: pointer;
}
.testbar button:hover { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
.testbar button.on { background: rgba(242, 163, 78, 0.22); color: var(--amber); }

.globe-ui {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 620ms ease;
}
.globe-ui.on { opacity: 1; }
.globe-ui.on > * { pointer-events: auto; }
/* 閉じている間は中身も一切受け取らせない。
   .btn の pointer-events:auto が親の none を上書きしてしまうため、
   透明なまま前面に居座って後ろの地球を押せなくなる */
.globe-ui:not(.on),
.globe-ui:not(.on) * { pointer-events: none !important; }

/* 左上に積む履歴。開くたびに1行ずつ増えていくことで、
   自分が何もしていない間も動き続けている実感を出す */
.log {
  max-height: 42vh;
  overflow-y: auto;
  scrollbar-width: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  animation: rise 900ms cubic-bezier(0.16, 0.84, 0.32, 1) both;
}
.log::-webkit-scrollbar { display: none; }
.log__head {
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}
.log__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 7px 0;
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.log__when { color: var(--ink-3); font-size: 11px; }
.log__what { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.log__row--met .log__what { color: var(--amber); }
/* 外で起きたことは、この履歴で唯一の実測。少しだけ立たせる */
.log__row--storm .log__what { color: var(--ink); }
.log__est { color: var(--ink-3); font-size: 10px; }

/* 文字を出すだけの帯。pointer-events を持たせると、下のカードのタップを奪う */
.globe-top {
  pointer-events: none;
  position: absolute;
  top: 5vh;
  left: 0;
  right: 0;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
}
.globe-place { font-size: clamp(20px, 2.4vw, 30px); letter-spacing: 0.08em; }
.globe-sub   { color: var(--ink-2); font-size: 13px; margin-top: 8px; letter-spacing: 0.06em; }

.globe-bottom {
  position: absolute;
  bottom: 4.5vh;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.replay-readout {
  display: flex;
  gap: 30px;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
}
.replay-readout[hidden] { display: none; }
.replay-cell { text-align: center; }
.replay-cell b { display: block; font-size: clamp(22px, 2.4vw, 32px); font-weight: 300; color: var(--amber); }
.replay-cell span { color: var(--ink-3); font-size: 12px; letter-spacing: 0.1em; }

.globe-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 900px) {
  .globe-top { top: 3vh; }
  .replay-readout { gap: 18px; }
}

/* ---- 遭遇シーケンス ------------------------------------------------------ */

.encounter__caption {
  position: absolute;
  left: 0;
  right: 0;
  /* 12vh だと地球の明るい縁に重なって読めなくなる */
  bottom: 24vh;
  text-align: center;
  color: var(--ink-2);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 900ms ease;
}
.encounter__caption.on { opacity: 1; }

.skip { position: absolute; right: 26px; bottom: 22px; z-index: 3; }

/* ---- 出生記録 ------------------------------------------------------------ */

.record       { max-width: 640px; width: 100%; }
.record__grid { display: grid; grid-template-columns: auto 1fr; gap: 12px 26px; text-align: left; }
.record__k    { color: var(--ink-3); font-size: 13px; letter-spacing: 0.1em; white-space: nowrap; padding-top: 4px; }
.record__v    { color: var(--ink); font-size: 17px; }

/* ---- 名簿 ---------------------------------------------------------------- */

.roster { max-width: 760px; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.roster__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  text-align: left;
}
.roster__name { font-size: 20px; letter-spacing: 0.05em; }
.roster__alias { font-size: 14px; color: var(--ink-2); letter-spacing: 0.03em; }
.roster__meta { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.roster__stat { text-align: right; color: var(--ink-2); font-size: 14px; line-height: 1.7; }

/* 名簿は「いま見ている1体」と「見送った記録」の2段。集めるものではないので、
   一覧ではなく記録として組む */
.roster-block { max-width: 760px; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.roster-block__head {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  text-align: left;
}
/* 見送った個体は、もう動いていない。押せないので塗りを沈める */
.roster__row--retired { background: rgba(23, 30, 41, 0.38); color: var(--ink-3); }
.roster__row--retired .roster__name { color: var(--ink-2); }

/* 乗り換えの代償。読ませてから選ばせる */
.roster__warn {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.9;
  text-align: left;
}

/* ---- 再突入 -------------------------------------------------------------- */

.reentry__stats { color: var(--ink-2); font-size: 16px; line-height: 2.1; }

/* ---- 開発用のフッタ（プロトタイプのみ）----------------------------------- */

.devbar {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top-right-radius: 10px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  /* 幅が足りないときに縦に折り返すと画面を潰すので、横スクロールに逃がす */
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.devbar::-webkit-scrollbar { display: none; }
.devbar a { color: var(--ink-2); text-decoration: none; }
.devbar a:hover { color: var(--amber); }

/* ---- モバイル ------------------------------------------------------------ */

@media (max-width: 900px) {
  /* body の height:100% を外さないと、コンテンツがはみ出しても
     documentElement（実際にスクロールを担う要素）がそれを検知できず、
     overflow: auto を足しただけでは直らない。body の内側にもう1つ
     スクロールコンテナができたような中途半端な状態になり、
     触る場所によってスクロールが効いたり効かなかったりしていた（実測で確認） */
  html, body { overflow: auto; }
  body { height: auto; min-height: 100%; }
  /* カードが画面のほとんどを占める縦積みなので、地の色を素通しに近づける。
     blur(22px) は残るので、透けても文字は滲んだ地球の上に読める */
  :root { --card: rgba(23, 30, 41, 0.42); }

  .observatory {
    position: static;
    /* 上の余白は「衛星の一点だけが見えている」ための間。空けすぎると
       ただの空白になるので、点が収まる分だけにする */
    padding: 27vh 16px 84px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .obs-col {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    overflow: visible;
  }
  .card { padding: 20px 22px; border-radius: 16px; }
  .card__title { font-size: 25px; }

  /* fixed のまま画面下に貼りつけると、縦積みのカードが下から迫ってきて
     必ずどこかで重なる。.stage（position:relative）基準の絶対配置に変え、
     地球儀だけが見えている上の余白（27vh）の中に置く。
     ページの一部として流れるので、スクロールすると一緒に動く */
  .lookbar {
    position: absolute;
    top: 1.5vh;
    right: 12px;
    left: auto;
    bottom: auto;
    border-radius: 10px;
  }
  .life { grid-template-columns: 1fr; gap: 14px; }
  .life__left, .life__leftlabel, .life__verdict { text-align: left; }
  .revs__total { font-size: 32px; }
  .center { height: auto; min-height: 100%; }

  /* 縦積みでは点の下に並べる。scene.js が点を上へ寄せている */
  .meeting {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 38vh 16px 72px;
    animation-name: rise; /* 縦積みでは中央寄せが要らない */
  }
  .meeting .btnrow { justify-content: center; }

  /* 縦積みでは地球儀とカードが同じ流れに並ぶので、スクロールで行き来させる。
     右列は場所を空けるために消す（opacity では空白が残る） */
}

@media (prefers-reduced-motion: reduce) {
  .float { animation: none; }
}

/* ---- 読み込み中の表示 ----------------------------------------------------- */

.loading {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.18em;
  pointer-events: none;
  /* hintPulse は transform も動かすので流用できない（中央寄せが外れる）。
     また animation は opacity を毎フレーム上書きするため、消すときは
     animation ごと止めないと .done の opacity:0 が効かない */
  animation: loadingPulse 2.2s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
.loading.done {
  animation: none;
  opacity: 0;
  transition: opacity 600ms ease;
}
