/* ===== おはよう！ゲーム業界ニュース  プレイヤー ===== */
:root {
  --bg-1: #0b1230;
  --bg-2: #1a2a6c;
  --accent: #29e0ff;
  --accent-2: #ff4fa3;
  --accent-3: #ffd23f;
  --panel: rgba(10, 16, 44, 0.82);
  --panel-border: rgba(41, 224, 255, 0.55);
  --text: #f4f7ff;
  --text-dim: #aab6e8;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--text); font-family: var(--font); }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }
.hidden { display: none !important; }

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- 背景 ---------- */
.studio-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 45%, #2b4bb8 0%, transparent 70%),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 65%);
}
.studio-grid {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 45%;
  background-image:
    linear-gradient(rgba(41,224,255,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,224,255,.25) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%);
  animation: grid-move 6s linear infinite;
}
@keyframes grid-move { to { background-position: 0 48px, 0 0; } }
.studio-glow {
  position: absolute; width: 60vmin; height: 60vmin; left: 8%; top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,79,163,.35), transparent 65%);
  filter: blur(10px);
}

.avatar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- 上部バー ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: linear-gradient(to bottom, rgba(5,8,25,.85), transparent);
  z-index: 5;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-badge {
  background: var(--accent-2); color: #fff; font-weight: 800; font-size: 12px;
  padding: 3px 8px; border-radius: 4px; letter-spacing: .08em;
  animation: blink-badge 2s ease-in-out infinite;
}
@keyframes blink-badge { 50% { opacity: .55; } }
.logo-title { font-weight: 800; font-size: clamp(14px, 2.2vw, 22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.topbar-right { display: flex; gap: 12px; align-items: baseline; font-variant-numeric: tabular-nums; }
.date { color: var(--text-dim); font-size: 14px; }
.clock { font-weight: 700; font-size: 20px; color: var(--accent); }

/* ---------- ニュースパネル ---------- */
.news-panel {
  position: absolute; z-index: 4;
  right: 3.5vw; top: 14vh; width: min(44vw, 620px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.04) inset;
  overflow: hidden;
  backdrop-filter: blur(6px);
  animation: panel-in .45s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes panel-in { from { opacity: 0; transform: translateX(30px) scale(.97); } }
.panel-label {
  display: inline-block; margin: 14px 0 0 16px; padding: 3px 10px;
  background: var(--accent); color: #071030; font-weight: 800; font-size: 12px; letter-spacing: .1em;
  border-radius: 3px;
}
.panel-body { padding: 10px 18px 18px; }
.panel-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px;
  background: #0d1640; margin-bottom: 12px; display: block;
}
.panel-headline { font-size: clamp(17px, 1.9vw, 24px); font-weight: 800; line-height: 1.45; margin: 4px 0 10px; }
.panel-meta { display: flex; gap: 10px; align-items: center; color: var(--text-dim); font-size: 13px; flex-wrap: wrap; }
.panel-source { color: var(--accent-3); font-weight: 700; }
.panel-link { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor; }
.panel-index { margin-left: auto; font-weight: 700; color: var(--accent-2); }

.pickup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pickup-list li {
  display: flex; gap: 10px; align-items: baseline; padding: 8px 10px;
  background: rgba(255,255,255,.05); border-radius: 8px; font-size: 15px; line-height: 1.4;
  animation: panel-in .4s both;
}
.pickup-list li .num { color: var(--accent-2); font-weight: 800; min-width: 1.4em; }
.pickup-list li a { color: var(--text); text-decoration: none; }
.pickup-list li small { color: var(--accent-3); margin-left: 6px; white-space: nowrap; }

.title-card { text-align: center; padding: 22px 8px 10px; }
.title-card .big { font-size: clamp(22px, 2.8vw, 34px); font-weight: 900; line-height: 1.3; }
.title-card .sub { color: var(--text-dim); margin-top: 8px; }

/* ---------- 字幕 ---------- */
.subtitle {
  position: absolute; z-index: 6;
  left: 50%; transform: translateX(-50%);
  bottom: calc(64px + var(--safe-b));
  width: min(92vw, 1100px);
  background: rgba(5, 8, 25, .86);
  border-left: 5px solid var(--accent-2);
  border-radius: 10px;
  padding: 10px 18px 12px;
}
.subtitle-name { display: inline-block; color: var(--accent-2); font-weight: 800; font-size: 13px; margin-bottom: 2px; }
.subtitle-text { margin: 0; font-size: clamp(16px, 2.1vw, 24px); line-height: 1.55; font-weight: 600; min-height: 1.55em; }

/* ---------- ティッカー ---------- */
.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  height: calc(44px + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; align-items: center;
  background: linear-gradient(90deg, #ff4fa3, #7b5cff 40%, #29e0ff);
  color: #fff; font-weight: 700;
}
.ticker-label {
  flex: none; height: 100%; display: flex; align-items: center; padding: 0 14px;
  background: #071030; color: var(--accent-3); font-size: 13px; letter-spacing: .1em;
}
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; height: 100%; display: flex; align-items: center; }
.ticker-inner { display: inline-block; padding-left: 100%; animation: ticker 40s linear infinite; font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ticker-inner span { margin-right: 3em; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- 操作 ---------- */
.controls {
  position: absolute; z-index: 7; left: 16px; top: 60px;
  display: flex; gap: 8px; align-items: center;
  opacity: .35; transition: opacity .2s;
}
.controls:hover, .controls:focus-within { opacity: 1; }
.ctrl {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--panel-border);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
}
.progress { width: 120px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* ---------- クレジット ---------- */
.credits {
  position: absolute; z-index: 6; right: 12px; bottom: calc(50px + var(--safe-b));
  font-size: 10px; color: rgba(255,255,255,.6); text-align: right; line-height: 1.5;
  pointer-events: none;
}
.subtitle:not(.hidden) ~ .credits { display: none; }

/* ---------- オーバーレイ ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 7, 22, .72); backdrop-filter: blur(4px);
}
.overlay-card {
  text-align: center; padding: 32px 28px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--panel-border);
  width: min(90vw, 460px);
}
.overlay-card.wide { width: min(92vw, 640px); max-height: 85vh; overflow: auto; text-align: left; }
.overlay-sub { margin: 0; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.overlay-title { margin: 8px 0 14px; font-size: clamp(22px, 4vw, 30px); line-height: 1.35; }
.overlay-title.small { font-size: 22px; text-align: center; }
.overlay-status { color: var(--text-dim); font-size: 14px; min-height: 1.4em; }
.overlay-note { color: var(--text-dim); font-size: 12px; margin-top: 14px; }
.btn-start {
  display: block; margin: 8px auto 0; padding: 14px 34px; border: none; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), #7b5cff); color: #fff;
  font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 24px rgba(255,79,163,.4);
}
.btn-start:disabled { opacity: .45; cursor: wait; }
.end-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.end-list li { padding: 10px 12px; background: rgba(255,255,255,.05); border-radius: 8px; line-height: 1.45; }
.end-list a { color: var(--text); text-decoration: none; font-weight: 600; }
.end-list a:hover { color: var(--accent); }
.end-list small { display: block; color: var(--accent-3); margin-top: 2px; }
.end-list .tag { color: var(--accent-2); font-weight: 800; margin-right: 6px; font-size: 12px; }

/* ---------- 縦長（スマホ） ---------- */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .topbar { padding: 10px 12px; }
  .date { display: none; }
  .news-panel {
    left: 4vw; right: 4vw; width: auto;
    top: auto; bottom: calc(190px + var(--safe-b));
    max-height: 34vh; overflow: auto;
  }
  .panel-thumb { display: none; }
  .panel-headline { font-size: 17px; margin-bottom: 6px; }
  .subtitle { bottom: calc(52px + var(--safe-b)); padding: 8px 12px 10px; }
  .subtitle-text { font-size: 16px; }
  .controls { top: 52px; left: 10px; }
  .pickup-list li { font-size: 14px; padding: 6px 8px; }
}
