/* ===================== RESET & BASE ===================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
  background: #0a0a0a; color: #fff;
}
input, textarea, select, button { font-family: inherit; }
button { cursor: pointer; border: none; outline: none; }
textarea { resize: none; }

/* ===================== SCENE MANAGEMENT ===================== */
.scene {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  overflow: hidden;
}
.scene.active { display: flex; }

/* ===================== TITLE SCENE ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
#scene-title {
  background: #000;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  position: relative;
}
.title-kv {
  position: absolute; inset: 0; overflow: hidden;
}
.title-kv-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  user-select: none; -webkit-user-drag: none;
}
.title-kv-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    transparent 0%,
    transparent 45%,
    rgba(0,0,0,0.55) 65%,
    rgba(0,0,0,0.92) 100%
  );
}
.title-bottom {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 0 24px 52px;
}
.title-disclaimer {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,107,53,0.12);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 8px; padding: 8px 14px;
  font-size: 12px; color: #ff8c42;
  max-width: 480px; width: 100%;
  animation: fadeInUp 0.8s 0.5s both;
}
.btn-start-kv {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #FF4500, #FF6B35);
  color: white;
  font-size: 18px; font-weight: 800;
  padding: 16px 48px;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(255,69,0,0.5);
  transition: all 0.2s;
  animation: fadeInUp 0.8s 0.3s both;
}
.btn-start-kv:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255,69,0,0.7);
}

/* ===================== SETUP SCENE ===================== */
#scene-setup {
  background: #111;
  align-items: center; justify-content: center;
  overflow-y: auto;
}
.setup-container {
  width: 100%; max-width: 500px; padding: 20px;
}
.setup-card {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #2a2a2a;
}
.setup-card h2 {
  font-size: 24px; font-weight: 700; margin-bottom: 8px;
}
.setup-desc {
  color: #666; font-size: 14px; margin-bottom: 24px;
}
.avatar-select {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 24px;
}
.avatar-opt {
  width: 70px; height: 70px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.avatar-opt.selected {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,0.3);
}
.avatar-opt:hover { transform: scale(1.05); }
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block; font-size: 13px; color: #888;
  margin-bottom: 6px; font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #FF6B35;
}
.form-group select option { background: #1a1a1a; }
.form-hint { display: block; font-size: 11px; color: #555; margin-top: 4px; }
.btn-primary {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #FF4500, #FF6B35);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  margin-top: 8px;
  transition: all 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,69,0,0.4);
}

/* ===================== COMPANY SELECT SCENE ===================== */
#scene-company-select {
  background: #0d0d0d;
  align-items: center; justify-content: center; flex-direction: column;
  overflow-y: auto;
}
.company-select-container {
  width: 100%; max-width: 1000px; padding: 40px 20px;
  text-align: center;
}
.company-select-container h2 {
  font-size: 28px; font-weight: 800; margin-bottom: 8px;
}
.company-select-container > p {
  color: #666; font-size: 15px; margin-bottom: 32px;
}
.company-cards {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
.company-card {
  width: 290px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}
.company-card:hover {
  transform: translateY(-5px);
  border-color: #FF4500;
  box-shadow: 0 12px 40px rgba(255,69,0,0.3);
}
.company-card-inner { display: flex; flex-direction: column; }
.company-card-preview {
  width: 100%; height: 160px; overflow: hidden;
  border-bottom: 1px solid #2a2a2a;
}
.company-card-preview img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.company-card:hover .company-card-preview img { transform: scale(1.05); }
.company-card-body {
  display: flex; gap: 14px; padding: 16px; align-items: flex-start; flex: 1;
}
.company-logo { flex-shrink: 0; }
.company-card-info { flex: 1; text-align: left; }
.company-card-info strong { display: block; font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.company-card-info span { font-size: 13px; color: #666; display: block; margin-bottom: 8px; }
.company-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ctag {
  font-size: 11px; background: rgba(255,69,0,0.12);
  color: #ff8c42; border: 1px solid rgba(255,69,0,0.25);
  padding: 2px 8px; border-radius: 20px;
}
.company-card-arrow {
  position: absolute; opacity: 0; transition: opacity 0.2s;
}
.company-card:hover .company-card-arrow { opacity: 1; }

/* ===================== SNS SELECT SCENE ===================== */
#scene-sns-select {
  background: #0d0d0d;
  align-items: center; justify-content: center; flex-direction: column;
  overflow-y: auto;
}
.sns-select-container {
  width: 100%; max-width: 900px; padding: 40px 20px;
  text-align: center;
}
.sns-select-container h2 {
  font-size: 28px; font-weight: 800; margin-bottom: 8px;
}
.sns-select-container > p {
  color: #666; font-size: 15px; margin-bottom: 32px;
}
.sns-cards {
  display: flex; gap: 16px;
  justify-content: center; flex-wrap: wrap;
}
.sns-card {
  width: 260px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.sns-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.sns-card:hover {
  transform: translateY(-4px);
  border-color: #444;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.sns-card:hover::before { opacity: 1; }
.sns-card-logo {
  margin-bottom: 16px;
  display: flex; align-items: center;
}
.betruth-logo { background: #000; padding: 10px; border-radius: 8px; }
.pixtagram-logo, .xcross-logo { border-radius: 12px; overflow: hidden; }
.sns-card-preview {
  width: 100%; height: 120px;
  background: #0d0d0d;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}
.betruth-preview { background: #000; }
.bt-dual-cam {
  display: flex; height: 100%;
}
.bt-cam-back { flex: 2; }
.bt-cam-front { flex: 1; border-left: 2px solid #333; }
.pixtagram-preview { background: #fafafa; display: flex; align-items: center; justify-content: center; }
.px-post-thumb { width: 90px; height: 90px; border-radius: 6px; overflow: hidden; }
.xcross-preview { background: #000; display: flex; flex-direction: column; padding: 8px; }
.xc-tweet-thumb { color: #fff; }
.sns-card-info { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.sns-card-info strong { font-size: 18px; font-weight: 700; }
.sns-card-info span { font-size: 13px; color: #666; }
.sns-card-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  opacity: 0; transition: opacity 0.2s;
  color: #FF6B35;
}
.sns-card:hover .sns-card-arrow { opacity: 1; }

/* ===================== FLAME SCENE ===================== */
#scene-flame {
  background: #0a0a0a;
  overflow: hidden;
}
.flame-container {
  display: flex; width: 100%; height: 100%;
}
.flame-left {
  width: 380px; min-width: 340px;
  background: #111;
  border-right: 1px solid #222;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.flame-post-wrapper {
  flex: 1; overflow-y: auto; padding: 16px;
}
/* ── 炎上モニター（redesigned stats panel） ── */
.flame-monitor {
  border-top: 1px solid #1a1a1a;
  background: #080808;
}
.fmon-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px 5px;
  border-bottom: 1px solid #141414;
}
.fmon-title {
  font-size: 9px; font-weight: 800; color: #3a3a3a;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.fmon-live {
  display: flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 800; color: #cc3333;
  letter-spacing: 1px;
}
.fmon-stats-row {
  display: flex; align-items: stretch;
  border-bottom: 1px solid #141414;
}
.fmon-stat {
  flex: 1; padding: 8px 12px 9px;
  min-width: 0;
}
.fmon-stat-sep {
  width: 1px; background: #141414; flex-shrink: 0;
}
.fmon-stat-label {
  font-size: 9px; color: #3a3a3a; text-transform: uppercase;
  letter-spacing: 0.8px; font-weight: 700; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fmon-stat-num {
  font-size: 20px; font-weight: 900; color: #c8c8c8;
  font-family: 'SF Mono', 'Courier New', monospace;
  letter-spacing: -1px; line-height: 1;
  transition: color 0.2s;
}
.fmon-stat-num.flash { color: #ff4500; }
.fmon-stat-rate {
  font-size: 10px; color: #2e2e2e; margin-top: 3px;
  font-family: 'SF Mono', 'Courier New', monospace;
  white-space: nowrap;
  transition: color 0.3s;
}
.fmon-stat-rate.rising { color: #cc3300; }

/* ── 炎上メーター（redesigned） ── */
.fmon-meter-section {
  padding: 8px 14px 10px;
}
.fmon-meter-top {
  display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px;
}
.fmon-meter-label {
  font-size: 9px; color: #3a3a3a; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 700;
}
.fmon-level-badge {
  font-size: 12px; font-weight: 800; color: #777;
  transition: color 0.5s;
  margin-left: 2px;
}
.fmon-level-pct {
  font-size: 10px; color: #2e2e2e;
  font-family: 'SF Mono', 'Courier New', monospace;
  margin-left: auto;
}
.fmon-meter-track {
  position: relative; height: 5px;
  background: #141414; border-radius: 2px;
  overflow: visible;
}
.fmon-meter-fill {
  height: 100%; width: 0%; border-radius: 2px;
  background: linear-gradient(90deg, #884400, #cc3300, #ff0000);
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
.fmon-meter-fill::after {
  content: '';
  position: absolute; right: 0; top: -3px; bottom: -3px; width: 3px;
  background: #ff6600; border-radius: 2px;
  box-shadow: 0 0 6px #ff4500, 0 0 12px rgba(255,69,0,0.4);
  opacity: 0;
  transition: opacity 0.3s;
}
.fmon-meter-fill.active::after { opacity: 1; }
.fmon-meter-mark {
  position: absolute; top: -3px; bottom: -3px; width: 1px;
  background: #222;
}
.fmon-meter-scale {
  display: flex; position: relative;
  margin-top: 4px; font-size: 8px; color: #282828;
  font-weight: 600; letter-spacing: 0.3px;
}
.flame-right {
  flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0;
}
.flame-right-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #1a1a1a;
  background: #0a0a0a;
  flex-shrink: 0;
}
.flame-tabs { display: flex; }
.flame-tab {
  padding: 12px 14px;
  font-size: 12px; font-weight: 700;
  background: transparent;
  color: #3a3a3a;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.flame-tab:hover { color: #888; }
.flame-tab.active {
  color: #e7e9ea; border-bottom-color: #cc3300;
}
.flame-tab .tab-badge {
  position: absolute; top: 6px; right: 4px;
  background: #cc0000; color: white;
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.flame-tab .tab-badge.visible { display: flex; }
.flame-live-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 800; color: #cc3333;
  letter-spacing: 1px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d5e;
  animation: livePulse 1s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.flame-tab-content {
  display: none; flex: 1; min-height: 0;
}
.flame-tab-content.active {
  display: block;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Comment Feed */
.comment-feed {
  position: absolute; inset: 0;
  overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-anchor: none;
}
.comment-feed > * { flex-shrink: 0; }
.comment-item {
  display: flex; gap: 10px;
  animation: slideInRight 0.25s ease-out;
  padding: 10px 12px;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid #111;
  border-left: 2px solid transparent;
}
.comment-item:last-child { border-bottom: none; }
.comment-item.mild { border-left-color: #2a2a2a; }
.comment-item.moderate { border-left-color: #7a3800; background: rgba(255,140,0,0.03); }
.comment-item.intense { border-left-color: #aa2200; background: rgba(255,69,0,0.05); }
.comment-item.extreme { border-left-color: #880000; background: rgba(204,0,0,0.07); animation: shake 0.3s ease-out, slideInRight 0.25s ease-out; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.comment-name { font-size: 13px; font-weight: 700; }
.comment-time { font-size: 11px; color: #555; }
.comment-text { font-size: 14px; color: #ddd; line-height: 1.4; word-break: break-all; }
.comment-likes { font-size: 11px; color: #555; margin-top: 4px; }

/* News Feed */
.news-feed {
  position: absolute; inset: 0;
  overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-anchor: none;
}
.news-feed > * { flex-shrink: 0; }
.news-placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; color: #444; font-size: 14px;
  padding: 40px;
}

/* Workplace Feed */
.workplace-feed {
  position: absolute; inset: 0;
  overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-anchor: none;
}
.workplace-feed > * { flex-shrink: 0; }

/* Phase Banner */
.phase-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 10px 20px;
  text-align: center;
  font-size: 12px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  animation: bannerSlide 0.3s ease-out;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@keyframes bannerSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.phase-banner.warning { background: rgba(180,80,0,0.95); color: #ffcc88; backdrop-filter: blur(8px); }
.phase-banner.danger  { background: rgba(160,0,0,0.97); color: #ff9999; backdrop-filter: blur(8px); }
.phase-banner.critical { background: rgba(100,0,0,0.99); color: #ffaaaa; backdrop-filter: blur(8px); animation: bannerSlide 0.3s, critBlink 0.15s 0.3s 3; }
@keyframes critBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Notification Overlay */
.notification-overlay {
  position: fixed; top: 16px; right: 16px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: 340px;
}
.notif-toast {
  background: rgba(16,16,18,0.97);
  border: 1px solid #222;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  animation: toastSlide 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03);
  pointer-events: all;
  backdrop-filter: blur(12px);
}
.notif-toast.remove {
  animation: toastFade 0.25s ease-out forwards;
}
@keyframes toastSlide {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastFade {
  to { transform: translateX(100%); opacity: 0; }
}
.notif-icon { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; overflow: hidden; }
.notif-content { flex: 1; min-width: 0; }
.notif-app { font-size: 10px; color: #555; font-weight: 700; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.notif-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: #d0d0d0; }
.notif-body { font-size: 12px; color: #666; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notif-time { font-size: 10px; color: #333; flex-shrink: 0; font-family: 'SF Mono', monospace; }

/* Fired Scene */
#scene-fired {
  background: #0a0a0a;
  align-items: center;
  justify-content: flex-start;
  overflow-y: scroll;
  overflow-x: hidden;
  flex-direction: column;
}
.fired-container {
  width: 100%; max-width: 700px;
  padding: 40px 20px 60px;
  display: flex; flex-direction: column; gap: 24px;
  align-items: stretch;
  flex-shrink: 0;
}
.fired-press-banner {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid #2a2a2a; background: #111;
}
.fired-press-img {
  width: 100%; height: 210px; object-fit: cover; display: block;
}
.fired-press-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 20px 16px 12px;
  display: flex; align-items: center; gap: 10px;
}
.fired-press-label { font-size: 15px; font-weight: 800; color: white; }
.fired-press-breaking {
  background: #cc0000; color: white;
  font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 3px;
  letter-spacing: 1px;
}
.fired-letter {
  background: #fff; color: #000;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.fired-letter-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 32px; padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}
.fired-company-info { flex: 1; }
.fired-company-name { font-size: 18px; font-weight: 700; color: #1a3a6b; }
.fired-company-sub { font-size: 13px; color: #666; margin-top: 4px; }
.fired-stamp {
  position: absolute; right: 40px; top: 30px;
  opacity: 0.85;
  animation: stampIn 0.5s 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes stampIn {
  0% { transform: scale(3) rotate(-15deg); opacity: 0; }
  70% { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 0.85; }
}
.fired-title {
  font-size: 22px; font-weight: 700; text-align: center;
  color: #1a1a1a; margin-bottom: 16px;
  letter-spacing: 2px;
}
.fired-date { text-align: right; font-size: 14px; color: #444; margin-bottom: 12px; }
.fired-recipient { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 20px; }
.fired-content {
  font-size: 14px; color: #333; line-height: 1.9;
  display: flex; flex-direction: column; gap: 16px;
}
.fired-violations {
  background: #fff5f5; border: 1px solid #ffcccc; border-radius: 6px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.fired-violation-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: #660000;
}
.fired-signature {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid #e0e0e0;
  text-align: right; font-size: 14px; color: #333;
  line-height: 2;
}
.fired-stats {
  background: #0c0c0c; border-radius: 4px;
  width: 100%;
  border: 1px solid #1e1e1e;
  overflow: hidden;
}
.fired-stats-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 10px; font-weight: 800; color: #444;
  text-transform: uppercase; letter-spacing: 1.2px;
}
.fired-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.fired-stat {
  padding: 14px 16px;
  border-right: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}
.fired-stat:nth-child(4n) { border-right: none; }
.fired-stat-wide {
  grid-column: span 2;
}
.fired-stat-full {
  grid-column: span 4;
  border-right: none;
}
.fs-num {
  font-size: 20px; font-weight: 900;
  font-family: 'SF Mono', 'Courier New', monospace;
  color: #cc3300;
  letter-spacing: -0.5px; line-height: 1; margin-bottom: 5px;
}
.fs-num-sm { font-size: 15px; letter-spacing: 0; }
.fs-num-score { font-size: 22px; color: #5599ff; }
.fs-label { font-size: 10px; color: #3a3a3a; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.fs-score-row {
  display: flex; align-items: center; gap: 24px;
}
.fs-score-detail {
  display: flex; flex-direction: column; gap: 4px;
  border-left: 1px solid #1e1e1e; padding-left: 24px;
}
.fs-score-item {
  font-size: 12px; color: #555;
  font-family: 'SF Mono', 'Courier New', monospace;
}
.fs-score-item span { color: #888; font-weight: 700; }
.fs-score-rank {
  font-size: 13px; font-weight: 800; color: #5599ff;
  margin-top: 4px;
}
.fired-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.btn-share-x {
  display: flex; align-items: center; gap: 8px;
  background: #000; color: #fff;
  border: 1px solid #333;
  padding: 14px 28px; border-radius: 50px;
  font-size: 15px; font-weight: 700;
  transition: all 0.2s;
}
.btn-share-x:hover { background: #111; border-color: #666; transform: translateY(-2px); }
.btn-retry {
  display: flex; align-items: center; gap: 10px;
  background: #1a1a1a; color: #fff;
  border: 1px solid #333;
  padding: 14px 28px; border-radius: 50px;
  font-size: 15px; font-weight: 600;
  transition: all 0.2s;
}
.btn-retry:hover { background: #222; border-color: #555; transform: translateY(-2px); }

/* Number count-up animation */
.num-update { animation: numPop 0.3s ease-out; }
@keyframes numPop {
  0% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Screen shake when things get bad */
.screen-shake {
  animation: screenShake 0.4s ease-out;
}
@keyframes screenShake {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-2px, 4px); }
  80% { transform: translate(2px, -4px); }
}

/* Red overlay for danger phase */
.danger-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  border: 0px solid #ff0000;
  transition: border-width 1s ease;
}
.danger-overlay.phase2 { border-width: 4px; box-shadow: inset 0 0 30px rgba(255,0,0,0.15); }
.danger-overlay.phase3 { border-width: 6px; box-shadow: inset 0 0 60px rgba(255,0,0,0.25); }
.danger-overlay.phase4 { border-width: 8px; box-shadow: inset 0 0 100px rgba(255,0,0,0.35); animation: dangerPulse 1s ease-in-out infinite; }
@keyframes dangerPulse {
  0%, 100% { box-shadow: inset 0 0 80px rgba(255,0,0,0.3); }
  50% { box-shadow: inset 0 0 120px rgba(255,0,0,0.5); }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ===================== CREDITS ===================== */
.credits-section {
  width: 100%; padding-top: 8px;
}
.credits-divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, #2a2a2a, transparent);
  margin-bottom: 20px;
}
.credits-inner {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
}
.credits-icon { flex-shrink: 0; }
.credits-icon-img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.credits-text {
  display: flex; flex-direction: column; gap: 3px;
}
.credits-title {
  font-size: 11px; color: #444; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.credits-by {
  font-size: 15px; font-weight: 700; color: #aaa;
}
.credits-link {
  color: #e8a0bf; text-decoration: none;
  transition: color 0.15s;
}
.credits-link:hover { color: #f0c0d8; }
.credits-caption {
  font-size: 12px; color: #555; font-style: italic;
}
.credits-disclaimer {
  font-size: 11px; color: #2a2a2a; text-align: center;
  margin-top: 16px; line-height: 1.5;
}

/* ===================== RESPONSIVE ===================== */

/* ── Tablet (≤1023px) ── */
@media (max-width: 1023px) {
  .flame-left { width: 300px; min-width: 260px; }
  .fmon-stat-num { font-size: 16px; }
  .company-cards { justify-content: center; }
  .sns-cards { justify-content: center; }
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  /* Flame scene: stack vertically */
  .flame-container { flex-direction: column; }
  .flame-left {
    width: 100%; min-width: unset;
    flex: 0 0 auto;
    flex-direction: row;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid #222;
    max-height: 200px;
  }
  .flame-post-wrapper {
    width: 120px; min-width: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid #1a1a1a;
    padding: 10px;
  }
  /* Scale down post display on mobile */
  .flame-post-wrapper > * { transform: scale(0.65); transform-origin: top left; width: 154%; }
  .flame-monitor {
    flex: 1; border-top: none;
    overflow: hidden;
  }
  .fmon-header { padding: 5px 10px 4px; }
  .fmon-stat { padding: 6px 8px 7px; }
  .fmon-stat-num { font-size: 14px; }
  .fmon-stat-label { font-size: 8px; }
  .fmon-stat-rate { font-size: 9px; }
  .fmon-meter-section { padding: 6px 10px 8px; }
  .flame-right { flex: 1; min-height: 0; }
  .flame-tab { padding: 10px 10px; font-size: 11px; }

  /* Setup / company / SNS select */
  .company-cards { flex-direction: column; align-items: center; }
  .company-card { width: 100%; max-width: 440px; }
  .sns-cards { flex-direction: column; align-items: center; }
  .sns-card { width: 100%; max-width: 440px; }
  .setup-card { padding: 24px 20px; }

  /* Fired scene */
  .fired-letter { padding: 24px 18px; }
  .fired-stamp { right: 18px; top: 20px; }
  .fired-stamp svg { width: 60px; height: 60px; }
  .fired-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .fired-stat-wide { grid-column: span 1; }
  .fired-stat-full { grid-column: span 2; }
  .fired-stat:nth-child(2n) { border-right: none; }
  .fired-stat:nth-child(4n) { border-right: 1px solid #1a1a1a; }
  .fs-score-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fs-score-detail { border-left: none; padding-left: 0; border-top: 1px solid #1e1e1e; padding-top: 10px; }
  .fired-actions { flex-direction: column; align-items: stretch; }
  .btn-share-x, .btn-retry { justify-content: center; }

  /* Notifications - smaller on mobile */
  .notification-overlay { max-width: 280px; top: 8px; right: 8px; }
  .notif-toast { padding: 9px 11px; }
  .notif-title { font-size: 12px; }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
  .title-main { font-size: 32px; }
  .title-sub { font-size: 15px; }
  .btn-start { font-size: 16px; padding: 14px 28px; }
  .flame-post-wrapper { display: none; } /* hide post on tiny screens, feed is priority */
  .flame-left { max-height: unset; }
  .flame-monitor { border-top: none; }
  .company-select-container h2 { font-size: 22px; }
  .sns-select-container h2 { font-size: 22px; }
}
