html, body { margin: 0; height: 100%; overflow: hidden; background: #0c0d10; }
body { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }

#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
#view.pixel { image-rendering: pixelated; }

/* 追加された瞬間に画面のふちが光る */
#frame { position: fixed; inset: 0; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 9vw 1.2vw rgba(255, 226, 120, .85); }
#frame.on { animation: frame 2.6s ease-out; }
@keyframes frame { 0% { opacity: 0 } 12% { opacity: 1 } 100% { opacity: 0 } }

/* 見た目が切り替わる瞬間の白フラッシュ */
#flash { position: fixed; inset: 0; pointer-events: none; background: #fff; opacity: 0; }
#flash.on { animation: flash 1.5s ease-out; }
@keyframes flash { 0% { opacity: 0 } 16% { opacity: .95 } 100% { opacity: 0 } }

/* 右上のタイムライン */
#timeline { position: fixed; top: 1.6vw; right: 1.6vw; width: clamp(230px, 27vw, 520px);
  font-size: clamp(11px, 1.15vw, 22px); color: #fff; pointer-events: none; }
#tl-head { display: inline-block; margin: 0 0 .7em .2em; padding: .25em .8em; border-radius: 99px;
  font-size: .82em; font-weight: 700; letter-spacing: .06em;
  background: rgba(15, 16, 20, .72); color: #ffe27a; }
#tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }

.card { display: flex; gap: .7em; align-items: flex-start; padding: .7em .8em; border-radius: .8em;
  background: rgba(15, 16, 20, .78); border: 2px solid rgba(255, 255, 255, .08);
  box-shadow: 0 .3em 1.2em rgba(0, 0, 0, .35);
  transition: opacity .6s, border-color 1.2s, background 1.2s; }
.card:nth-child(n+4) { opacity: .75; }
.card:nth-child(n+6) { opacity: .5; }
.card.new { border-color: #ffe27a; background: rgba(46, 40, 12, .9);
  animation: card-in .7s cubic-bezier(.2, 1.4, .4, 1), card-glow 1.3s ease-in-out .7s 6; }
@keyframes card-in { from { transform: translateX(115%) scale(.9); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes card-glow { 50% { box-shadow: 0 0 1.6em rgba(255, 226, 120, .9) } }

.avatar { flex: none; width: 2.3em; height: 2.3em; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; background-size: cover; background-position: center; }
.body { min-width: 0; flex: 1; }
.meta { display: flex; gap: .6em; align-items: baseline; font-size: .78em; color: #b9bcc4; }
.name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { flex: none; opacity: .7; }
.text { margin-top: .15em; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.card.shot { padding: 0; overflow: hidden; }
.card.shot img { display: block; width: 100%; }
