/* ============================================================
   pandanow.css — パンダNOW！ のスタイル＆短いループアニメ
   ============================================================ */
/* ---------- テレビ筐体 ---------- */
.pn-tv {
  background: oklch(0.52 0.04 50);
  padding: 12px 12px 0; overflow: hidden;
  border-radius: 10px;
}
.pn-tv-frame {
  background: #15130f; border-radius: 7px; padding: 8px;
}
.pn-tv-foot { display: flex; align-items: center; justify-content: space-between; padding: 7px 4px 9px; }
.pn-tv-brand { font-size: 11.5px; color: oklch(0.82 0.03 80); letter-spacing: .12em; }
.pn-tv-knob { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e9e0cf, #9a8f78); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }

/* ガラス面 */
.pn-tv-glass { position: relative; background: var(--paper); border-radius: 4px; overflow: hidden; display: block; }

/* ---------- 電源OFF（押す前の派手ボタン） ---------- */
.pn-power-btn { display: block; width: 100%; border: none; padding: 0; cursor: pointer; background: none; }
.pn-head-off { opacity: .9; }
.pn-live.off { color: var(--ink-soft); }
.pn-live.off i { background: var(--ink-soft); animation: none; }
.pn-head-off .pn-power-off { opacity: .5; }
.pn-screen.off {
  background: radial-gradient(circle at 50% 45%, #2a2722, #100e0b 80%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pn-off-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transform: translateY(16px); z-index: 1;
}
.pn-noise { position: absolute; inset: 0; opacity: .06;
  background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 2px);
  animation: pnnoise .2s steps(2) infinite; }
@keyframes pnnoise { 0%{transform:translateY(0);} 100%{transform:translateY(-2px);} }
.pn-power-pix {
  display: grid; place-items: center; z-index: 1;
  filter: drop-shadow(0 0 9px rgba(126,201,154,.55));
  animation: pnpulse 1.4s ease-in-out infinite;
}
@keyframes pnpulse {
  0%,100% { transform: scale(0.42); filter: drop-shadow(0 0 6px rgba(126,201,154,.3)); }
  50%     { transform: scale(0.48); filter: drop-shadow(0 0 14px rgba(126,201,154,.7)); }
}
.pn-power-title {
  z-index: 1; white-space: nowrap; letter-spacing: .05em;
  font-family: "DotGothic16", sans-serif; font-size: 27px; color: var(--cream);
  text-shadow:
    1px 0 0 var(--cream), -1px 0 0 var(--cream), 0 1px 0 var(--cream), 0 -1px 0 var(--cream),
    4px 4px 0 var(--sage-d);
  -webkit-text-stroke: 2.5px #1a160f;
  paint-order: stroke fill;
}
.pn-power-title .pn-pt-now {
  color: #ffd24a; -webkit-text-stroke: 2.5px #1a160f; paint-order: stroke fill;
  text-shadow:
    1px 0 0 #ffd24a, -1px 0 0 #ffd24a, 0 1px 0 #ffd24a, 0 -1px 0 #ffd24a,
    4px 4px 0 #d9534f;
  margin: 0 2px;
}

/* ポップなロゴ */
.pn-pop-logo { z-index: 1; display: inline-flex; align-items: center; gap: 1px; padding: 0 4px; }
.pn-pop-ch {
  display: inline-block;
  font-family: "DotGothic16", sans-serif; font-size: 48px; line-height: 1; font-weight: 700;
  -webkit-text-stroke: 7px #1a160f; paint-order: stroke fill;
  text-shadow: 4px 6px 0 rgba(0,0,0,.45);
  animation: pnpopwob 2.2s ease-in-out infinite;
}
.pn-pop-ch:nth-child(2n) { animation-delay: .3s; }
.pn-pop-ch:nth-child(3n) { animation-delay: .6s; }
@keyframes pnpopwob {
  0%,100% { transform: translateY(0) rotate(var(--r,0)); }
  50%     { transform: translateY(-3px); }
}
.pn-power-sub { z-index: 1; font-size: 12.5px; color: oklch(0.82 0.03 80); letter-spacing: .14em; animation: pnblink 1.5s steps(1) infinite; }

/* ---------- 電源ON：CRT起動エフェクト ---------- */
.pn-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.pn-crt {
  position: absolute; inset: 0; z-index: 9; pointer-events: none; background: #fff;
  animation: pncrt .6s ease-out forwards;
}
@keyframes pncrt {
  0%   { transform: scaleY(0.004); opacity: 1; filter: brightness(3); }
  45%  { transform: scaleY(0.012); opacity: 1; }
  60%  { transform: scaleY(1); opacity: .9; }
  100% { transform: scaleY(1); opacity: 0; }
}

.pn-head {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 2px dashed var(--line);
}
.pn-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "DotGothic16", sans-serif; font-size: 12.5px; letter-spacing: .1em;
  color: #c76b6b;
}
.pn-off-pill { margin-right: auto; }
.pn-live i { width: 8px; height: 8px; border-radius: 50%; background: #d9534f; animation: pnblink 1.2s steps(1) infinite; }
@keyframes pnblink { 0%,50%{opacity:1;} 50.01%,100%{opacity:.25;} }
.pn-live.real i { background: #ff3b30; }
.pn-live-embed { position: absolute; inset: 0; background: #000; }
.pn-live-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pn-live-fallback {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: rgba(0,0,0,.78); color: var(--cream); text-decoration: none;
  font-size: 12.5px; text-align: center; padding: 7px 8px; letter-spacing: .04em;
}
.pn-live-fallback:hover { background: rgba(0,0,0,.92); }
/* チャンネル切替ボタン */
.pn-ch-row { display: flex; gap: 8px; padding: 0 14px 14px; background: var(--cream); }
.pn-ch-btn {
  flex: 1; background: var(--paper); border: 2px solid var(--ink); cursor: pointer;
  padding: 9px 6px; font-family: "DotGothic16", sans-serif; font-size: 13.5px; color: var(--ink);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.pn-ch-btn:active { transform: translateY(1px); }
.pn-ch-btn.on { background: var(--ink); color: var(--cream); }
.pn-ch-btn.real.on { background: #d9534f; border-color: #d9534f; color: #fff; }
.pn-head-on { cursor: pointer; }
.pn-off-pill {
  font-family: "DotGothic16", sans-serif; font-size: 12.5px; letter-spacing: .08em;
  color: var(--paper); background: var(--ink); padding: 3px 9px; border-radius: 4px;
}
.pn-head-on:hover .pn-off-pill { background: #d9534f; }
.pn-off-pill.dim { background: var(--line); color: var(--ink-soft); }
.pn-power-off { background: none; border: none; cursor: pointer; font-size: 17px; color: var(--ink-soft); padding: 0 2px; }
.pn-power-off:hover { color: var(--ink); }

/* シーン枠 */
.pn-scene {
  position: relative; height: 150px; overflow: hidden;
  background:
    linear-gradient(to bottom, transparent 0 70%, rgba(0,0,0,.04) 70% 72%, transparent 72%),
    var(--paper);
  display: flex; align-items: flex-end; justify-content: center;
}
.pn-stage { position: relative; z-index: 2; }
.pn-panda { transform-origin: bottom center; }

/* 共通モーション */
.bob   { animation: pnbob .9s ease-in-out infinite; }
.bob2  { animation: pnbob .9s ease-in-out infinite .25s; }
.breathe { animation: pnbreathe 2.6s ease-in-out infinite; }
@keyframes pnbob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-5px);} }
@keyframes pnbreathe { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.04);} }

/* ---------- 寝てる ---------- */
.sc-sleep { align-items: center; }
.pn-bed {
  position: absolute; bottom: 26px; width: 150px; height: 16px;
  background: var(--sky-d, #8fb3d9); border-radius: 8px 8px 3px 3px;
}
.sc-sleep .pn-stage { margin-bottom: 30px; }
.pn-z {
  position: absolute; font-family: "DotGothic16", sans-serif; color: var(--ink-soft);
  right: 38%; opacity: 0; font-weight: 700;
}
.pn-z.z1 { top: 40px; font-size: 19.5px; animation: pnzz 2.4s ease-out infinite; }
.pn-z.z2 { top: 30px; font-size: 16px; animation: pnzz 2.4s ease-out infinite .5s; }
.pn-z.z3 { top: 22px; font-size: 12.5px; animation: pnzz 2.4s ease-out infinite 1s; }
@keyframes pnzz {
  0%   { opacity: 0; transform: translate(0, 6px); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(10px, -16px); }
}

/* ---------- 子どもとごはん ---------- */
.pn-table {
  position: absolute; bottom: 22px; width: 200px; height: 12px;
  background: var(--butter-d, #c9a24a); border-radius: 4px;
}
.sc-meal2 .pn-stage { margin: 0 6px 26px; }
.sc-meal2 .pn-child { align-self: flex-end; }
.pn-plate {
  position: absolute; bottom: 28px; width: 22px; height: 6px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 50%;
}
.pn-plate.p-l { left: 32%; }
.pn-plate.p-r { right: 32%; }

/* ---------- Claudeと戯れる ---------- */
.sc-claude .pn-stage { margin-bottom: 24px; margin-right: 30px; }
.pn-laptop { position: absolute; bottom: 30px; right: 26%; }
.pn-laptop-screen {
  width: 40px; height: 28px; background: #1d2b1f; border: 2px solid var(--ink);
  border-radius: 3px 3px 0 0; display: grid; place-items: center;
}
.pn-cursor2 { width: 4px; height: 12px; background: var(--sage-d); animation: pnblink .7s steps(1) infinite; }
.pn-laptop-base {
  width: 50px; height: 6px; background: var(--ink); border-radius: 0 0 4px 4px; margin-left: -5px;
}

/* ---------- ごはん食べてる ---------- */
.sc-meshi .pn-stage { margin-bottom: 24px; margin-left: 16px; }
.pn-bowl {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-46px);
  width: 30px; height: 16px; background: var(--peach-d, #d98c6a);
  border-radius: 0 0 16px 16px; border: 2px solid var(--ink); border-top: none;
}
.pn-chopsticks {
  position: absolute; bottom: 48px; left: 50%; width: 3px; height: 28px;
  background: var(--ink); transform-origin: bottom center;
  margin-left: -36px; animation: pneat 1s ease-in-out infinite;
}
@keyframes pneat {
  0%,100% { transform: rotate(8deg) translateY(0); }
  50%     { transform: rotate(8deg) translateY(-10px); }
}

/* ---------- スーパーで買い物 ---------- */
.sc-super { overflow: hidden; }
.pn-walk { display: flex; align-items: flex-end; gap: 2px; margin-bottom: 24px; animation: pnroll 3.4s linear infinite; }
@keyframes pnroll {
  0%   { transform: translateX(-130px); }
  100% { transform: translateX(150px); }
}
.pn-walk .pn-stage.step { animation: pnstep .5s ease-in-out infinite; }
@keyframes pnstep { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-3px);} }
.pn-cart { position: relative; width: 40px; height: 34px; }
.pn-cart-basket {
  width: 36px; height: 22px; border: 2.5px solid var(--ink); border-top: none;
  background: rgba(0,0,0,.04); transform: skewX(-8deg);
}
.pn-cart-wheel {
  position: absolute; bottom: -4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
}
.pn-cart-wheel.w1 { left: 4px; } .pn-cart-wheel.w2 { right: 6px; }

/* ---------- スロット ---------- */
.sc-slot .pn-stage { margin-bottom: 24px; margin-right: 56px; }
.pn-slot {
  position: absolute; bottom: 26px; right: 22%; width: 78px;
  background: var(--blush, #e9b8b8); border: 2.5px solid var(--ink); border-radius: 6px;
  padding: 7px 6px; display: flex; align-items: center; gap: 6px;
}
.pn-reels { display: flex; gap: 3px; background: var(--ink); padding: 3px; border-radius: 3px; }
.pn-reel { width: 16px; height: 24px; overflow: hidden; background: var(--cream); border-radius: 2px; }
.pn-reel-strip {
  font-family: "DotGothic16", sans-serif; font-size: 17px; line-height: 24px;
  text-align: center; color: var(--ink); letter-spacing: 0; white-space: pre;
  writing-mode: vertical-rl; text-orientation: upright; height: 144px;
}
.pn-reel-strip.s1 { animation: pnspin .35s linear infinite; }
.pn-reel-strip.s2 { animation: pnspin .42s linear infinite; }
.pn-reel-strip.s3 { animation: pnspin .3s linear infinite; }
@keyframes pnspin { from { transform: translateY(0);} to { transform: translateY(-120px);} }
.pn-lever { position: relative; width: 6px; height: 26px; background: var(--ink); border-radius: 3px; transform-origin: bottom center; animation: pnpull 1.6s ease-in-out infinite; }
.pn-lever-knob { position: absolute; top: -6px; left: -3px; width: 12px; height: 12px; border-radius: 50%; background: #d9534f; border: 2px solid var(--ink); }
@keyframes pnpull { 0%,70%,100%{ transform: rotate(0);} 80%{ transform: rotate(28deg);} }

/* ---------- 飲みに行く ---------- */
.sc-nomi .pn-stage { margin-bottom: 24px; margin-right: 30px; }
.sc-nomi .pn-stage.tip { animation: pncheers 1.6s ease-in-out infinite; transform-origin: bottom center; }
@keyframes pncheers { 0%,60%,100%{ transform: rotate(0);} 75%{ transform: rotate(-5deg);} }
.pn-mug {
  position: absolute; bottom: 30px; right: 28%; width: 24px; height: 30px;
  background: var(--butter, #e9c96a); border: 2.5px solid var(--ink); border-radius: 3px 3px 4px 4px;
  transform-origin: bottom center;
}
.pn-mug.tipmug { animation: pnmug 1.6s ease-in-out infinite; }
@keyframes pnmug { 0%,60%,100%{ transform: rotate(0);} 78%{ transform: rotate(-22deg) translateY(-2px);} }
.pn-mug-foam { position: absolute; top: -5px; left: -2px; right: -2px; height: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.pn-mug-handle { position: absolute; right: -9px; top: 7px; width: 8px; height: 14px; border: 2.5px solid var(--ink); border-left: none; border-radius: 0 6px 6px 0; }

/* ---------- ステータス ---------- */
.pn-status {
  display: flex; align-items: baseline; justify-content: center; gap: 5px;
  padding: 13px 14px; border-top: 2px dashed var(--line); background: var(--cream);
  white-space: nowrap;
}
.pn-now-tag { font-size: 11.5px; color: #14241a; background: var(--sage-d); padding: 2px 6px; border-radius: 3px; letter-spacing: .06em; align-self: center; }
.pn-status-now { font-size: 15px; color: var(--ink-soft); }
.pn-status-act { font-family: "DotGothic16", sans-serif; font-size: 19.5px; color: var(--ink); letter-spacing: .01em; }
.pn-status-suf { font-size: 13.5px; color: var(--ink-soft); }

/* ナビ（各アニメを見る） */
.pn-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 14px 14px; background: var(--cream);
}
.pn-nav-btn {
  background: var(--paper); border: 2px solid var(--ink); cursor: pointer;
  width: 38px; height: 30px; font-size: 13.5px; color: var(--ink);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.pn-nav-btn:active { transform: translateY(1px); }
.pn-dots { display: flex; gap: 5px; }
.pn-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); display: block; }
.pn-dots i.on { background: var(--sage-d); }
