/* ===========================
   Live Event Styles
   =========================== */

/* --- Theme-aware semantic colors --- */
:root {
  --lh-success: #15803d;
  --lh-danger: #b91c1c;
  --lh-info: #1d4ed8;
  --lh-warning: #92400e;
  --lh-gold: #92400e;
  --lh-link: #2563eb;
}
[data-theme^="dark-"] {
  --lh-success: #3fb950;
  --lh-danger: #f85149;
  --lh-info: #58a6ff;
  --lh-warning: #ffc107;
  --lh-gold: #e3b341;
  --lh-link: #79c0ff;
}

/* --- Buttons --- */
.lh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s, transform 0.2s;
}

.lh-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  text-decoration: none;
}

/* Primary: accent color filled */
.lh-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.lh-btn-primary:hover { color: #fff; }

/* Large variant */
.lh-btn-lg {
  padding: 0.65rem 1.75rem;
  font-size: 1rem;
}

/* Secondary: outlined */
.lh-btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.lh-btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Outline variant */
.lh-btn-outline {
  background: transparent;
  color: var(--text-secondary, #aaa);
  border-color: var(--border-color, #444);
}
.lh-btn-outline:hover {
  color: var(--text-primary, #eee);
  border-color: var(--accent, #4c9aff);
}

/* Small variant */
.lh-btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Filter button group */
.lh-filter-group {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.lh-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.lh-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.lh-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Badges --- */
.lh-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.lh-badge-warning {
  background: rgba(255, 193, 7, 0.15);
  color: var(--lh-gold);
}
.lh-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--lh-info);
}
.lh-badge-secondary {
  background: rgba(128, 128, 128, 0.15);
  color: var(--text-secondary);
}
.lh-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--lh-success);
}
.lh-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--lh-danger);
}

/* --- Song Info Card (show page, 2-2) --- */
.lh-song-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
}
.lh-song-card-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 45px;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.lh-song-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lh-song-card-info {
  flex: 1;
  min-width: 0;
}
.lh-song-card-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #eee);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lh-song-card-title:hover {
  color: var(--accent);
  text-decoration: none;
}
.lh-song-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
}
.lh-song-card-meta i {
  margin-right: 0.15rem;
  font-size: 0.7rem;
}
@media (max-width: 480px) {
  .lh-song-card-thumb {
    width: 64px;
    height: 36px;
  }
}

/* --- Event Header (show page) --- */
.lh-event-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.lh-event-header-main {
  flex: 1;
  min-width: 0;
}
.lh-event-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.lh-event-badges {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.lh-event-meta {
  font-size: 0.9rem;
  color: var(--text-muted, #888);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.lh-event-comment {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary, #aaa);
}

/* Action column (countdown + join) */
.lh-event-header-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Countdown */
.lh-countdown {
  text-align: center;
  padding: 0.5rem 1rem;
  background: rgba(var(--accent-rgb, 139,26,26), 0.08);
  border: 1px solid rgba(var(--accent-rgb, 139,26,26), 0.2);
  border-radius: 10px;
  min-width: 140px;
}
.lh-countdown-label {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.25rem;
}
.lh-countdown-time {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #eee);
  letter-spacing: 1px;
}
.lh-countdown-urgent .lh-countdown-time {
  color: #dc3545;
  animation: lh-countdown-blink 1s ease-in-out infinite;
}
.lh-countdown-ended {
  opacity: 0.6;
}
@keyframes lh-countdown-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Join button */
.lh-join-btn {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  padding: 0.7rem 2rem;
}

/* Info cards (challenge, reward) */
.lh-info-card {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.lh-info-card h4 {
  margin: 0 0 0.375rem;
  font-size: 0.95rem;
}
.lh-info-card-challenge {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
}
.lh-info-card-challenge h4 i { color: var(--lh-warning); }
.lh-info-card-reward {
  background: rgba(40, 167, 69, 0.08);
  border: 1px solid rgba(40, 167, 69, 0.25);
}
.lh-info-card-reward h4 i { color: var(--lh-success); }

/* --- Provisional Actions (play + cancel side by side) --- */
.lh-provisional-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}
.lh-provisional-play-btn {
  flex: 1;
  justify-content: center;
  font-size: 1rem;
  padding: 0.6rem 1rem;
}
.lh-provisional-cancel-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
}
.lh-provisional-refund {
  display: inline;
  font-size: 0.7rem;
  opacity: 0.8;
}

/* --- Venue + Reaction combined section --- */
.lh-venue-reaction-section {
  margin-top: 1.5rem;
  border: 1px solid rgba(var(--accent-rgb, 139,26,26), 0.15);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}
.lh-venue-reaction-section .venue-visual {
  margin-bottom: 0;
  border-radius: 0;
}
.lh-reaction-summary-bar {
  font-size: 0.85rem;
  color: var(--text-muted, #888);
  padding: 0.4rem 0.75rem;
  background: rgba(var(--accent-rgb, 139,26,26), 0.04);
  min-height: 0;
}
.lh-reaction-summary-bar:empty {
  display: none;
}
.lh-reaction-section {
  padding: 0.75rem;
}
.lh-reaction-section-header {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.lh-reaction-section-hint {
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.lh-reaction-section-hint i {
  font-size: 1rem;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .lh-event-header {
    flex-direction: column;
  }
  .lh-event-header-action {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .lh-join-btn {
    flex: 1;
  }
  /* 仮参加: カウントダウンと2ボタンが1行に収まらないので折り返す */
  .lh-provisional-actions {
    flex-basis: 100%;
    flex-wrap: nowrap;
  }
  .lh-provisional-play-btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  .lh-provisional-cancel-btn {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }
  .lh-provisional-refund {
    display: block;
    font-size: 0.6rem;
  }
}

/* --- Event Card (used in index list by JS) --- */
.lh-event-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius, 0.75rem);
  padding: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.lh-event-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}

/* --- Create Form Panel --- */
.lh-create-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius, 0.75rem);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.lh-create-panel label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.lh-create-panel select,
.lh-create-panel input[type="text"],
.lh-create-panel input[type="number"],
.lh-create-panel textarea {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--body-bg, #fff);
  color: var(--text-primary);
  font-size: 0.85rem;
}
.lh-create-panel select:focus,
.lh-create-panel input:focus,
.lh-create-panel textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

/* --- Close button (X) --- */
.lh-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}
.lh-close-btn:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text-primary);
}

/* --- Back Link --- */
.lh-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s;
}
.lh-back-link:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  text-decoration: none;
}

/* ===========================
   Reaction Shop
   =========================== */

.lh-reaction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.lh-reaction-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lh-gold);
}
.lh-reaction-balance i { font-size: 0.9rem; }

.lh-reaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.625rem;
}

.lh-reaction-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.5rem;
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.lh-reaction-card:hover {
  border-color: rgba(var(--accent-rgb, 139,26,26), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.lh-reaction-card:active {
  transform: translateY(0);
}

.lh-reaction-card-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.lh-reaction-card-price {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--lh-gold);
  background: rgba(255, 193, 7, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}
.lh-reaction-card-price i { font-size: 0.65rem; }

/* ===========================
   Purchase Confirmation Modal
   =========================== */

.lh-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.lh-modal-overlay.lh-modal-visible {
  opacity: 1;
}

.lh-modal-panel {
  background: var(--card-bg, #1e1e2e);
  border: 1px solid var(--border-color, #333);
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.lh-modal-body {
  padding: 1.5rem;
}

/* Item preview area */
.lh-modal-item-preview {
  text-align: center;
  padding: 1.25rem 1rem;
  margin: -1.5rem -1.5rem 1.25rem;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb, 139,26,26), 0.08) 0%,
    rgba(var(--accent-rgb, 139,26,26), 0.02) 100%
  );
  border-bottom: 1px solid var(--border-color, #333);
}
.lh-modal-item-icon {
  font-size: 2.5rem;
  color: var(--item-color, var(--accent));
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}
.lh-modal-item-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #eee);
}
.lh-modal-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-top: 0.25rem;
}

/* Cost breakdown */
.lh-modal-cost-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
}
.lh-modal-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #aaa);
}
.lh-modal-cost-value {
  font-weight: 700;
  color: var(--lh-gold);
  font-size: 0.95rem;
}
.lh-modal-cost-divider {
  height: 1px;
  background: var(--border-color, #333);
  margin: 0.35rem 0;
}
.lh-modal-cost-error {
  color: #dc3545;
  font-weight: 600;
  justify-content: center;
}

/* Action buttons */
.lh-modal-actions {
  display: flex;
  gap: 0.5rem;
}
.lh-modal-actions .lh-btn {
  flex: 1;
  justify-content: center;
}
.lh-modal-actions .lh-btn-primary {
  padding: 0.6rem 1rem;
}
.lh-modal-actions .lh-btn-secondary {
  padding: 0.6rem 1rem;
}

@media (max-width: 480px) {
  .lh-reaction-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
  }
  .lh-reaction-card {
    padding: 0.6rem 0.4rem;
  }
  .lh-reaction-card-icon {
    font-size: 1.25rem;
  }
  .lh-modal-panel {
    width: 95%;
  }
}

/* ===========================
   Venue Visual
   =========================== */

.venue-visual {
  --venue-bg: #1a1a2e;
  --venue-accent: #ffc107;
  --venue-stage: #2d2d44;
  --venue-accent-rgb: 255, 193, 7;
  position: relative;
  background: linear-gradient(180deg, #0a0e1a 0%, #141a2e 50%, #1a1228 100%);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  /* 背景画像(16:9)が常に全体表示されるよう比率を固定 */
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
}

/* --- Stage (compact top: small screen + lighting glow) --- */
.venue-stage {
  position: relative;
  padding: 0.5rem 0.75rem 0.2rem;
  overflow: hidden;
  flex-shrink: 0;
}
/* スクリーン非表示時のステージ（最小化） */
.venue-stage-minimal {
  padding: 0.25rem;
}

/* Ambient glow — soft light radiating down from screen */
.venue-stage-ambient {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 160%;
  background: radial-gradient(
    ellipse at 50% 25%,
    rgba(var(--venue-accent-rgb), 0.12) 0%,
    rgba(var(--venue-accent-rgb), 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: venue-ambient-breathe 6s ease-in-out infinite;
}

/* Spot lights — subtle cones from top corners */
.venue-stage-light {
  position: absolute;
  top: 0;
  width: 40%;
  height: 100%;
  opacity: 0.18;
  pointer-events: none;
  animation: venue-light-breathe 6s ease-in-out infinite;
}
.venue-stage-light-l {
  left: 0;
  background: linear-gradient(150deg, var(--venue-accent), transparent 50%);
}
.venue-stage-light-r {
  right: 0;
  background: linear-gradient(210deg, var(--venue-accent), transparent 50%);
  animation-delay: 3s;
}

/* Screen — small distant stage backdrop */
.venue-screen-area {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 1;
}
.venue-screen {
  position: relative;
  width: 32%;
  max-width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(var(--venue-accent-rgb), 0.35);
  box-shadow:
    0 0 12px rgba(var(--venue-accent-rgb), 0.2),
    0 0 40px rgba(var(--venue-accent-rgb), 0.06);
}
.venue-screen-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.1);
}
.venue-screen-fallback {
  width: 100%;
  height: 100%;
  background: var(--venue-stage);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 20%;
}
.venue-screen-fallback-bar {
  width: 3px;
  background: rgba(var(--venue-accent-rgb), 0.5);
  border-radius: 1px 1px 0 0;
  animation: venue-eq-bar 1.2s ease-in-out infinite;
}
.venue-screen-fallback-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.venue-screen-fallback-bar:nth-child(2) { height: 55%; animation-delay: 0.15s; }
.venue-screen-fallback-bar:nth-child(3) { height: 75%; animation-delay: 0.3s; }
.venue-screen-fallback-bar:nth-child(4) { height: 45%; animation-delay: 0.45s; }
.venue-screen-fallback-bar:nth-child(5) { height: 60%; animation-delay: 0.6s; }
@keyframes venue-eq-bar {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 0.8; }
}
.venue-screen-glow {
  position: absolute;
  inset: -4px;
  border-radius: 4px;
  pointer-events: none;
  box-shadow:
    0 4px 30px rgba(var(--venue-accent-rgb), 0.25),
    0 8px 60px rgba(var(--venue-accent-rgb), 0.08);
  animation: venue-screen-pulse 4s ease-in-out infinite;
}

/* Stage animations */
@keyframes venue-screen-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes venue-light-breathe {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.25; }
}
@keyframes venue-ambient-breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Decorations Overlay --- */
.venue-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.venue-decorations:empty {
  display: none;
}

/* Custom icon definitions moved to theme.css (shared with admin) */

/* --- Venue decoration overlays (icon-based, matches button icons) --- */
.venue-deco-penlight {
  position: absolute;
  font-size: calc(1.5rem * var(--deco-scale, 1));
  filter: drop-shadow(0 0 5px var(--deco-color, #ff6b6b));
  animation: venue-deco-pulse var(--deco-dur, 2s) ease-in-out infinite;
  animation-delay: var(--deco-delay, 0s);
}
.venue-deco-uchiwa {
  position: absolute;
  font-size: calc(1.5rem * var(--deco-scale, 1));
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
  opacity: 0.85;
  animation: venue-deco-sway var(--deco-dur, 3s) ease-in-out infinite;
  animation-delay: var(--deco-delay, 0s);
}
.venue-deco-flower {
  position: absolute;
  font-size: calc(1.6rem * var(--deco-scale, 1));
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  opacity: 0.8;
  animation: venue-deco-sway var(--deco-dur, 4s) ease-in-out infinite;
  animation-delay: var(--deco-delay, 0s);
}

/* Effect: sparkle star */
.venue-deco-effect {
  position: absolute;
  font-size: calc(1.4rem * var(--deco-scale, 1));
  filter: drop-shadow(0 0 4px currentColor);
  animation: venue-deco-sparkle var(--deco-dur, 2.5s) ease-in-out infinite;
  animation-delay: var(--deco-delay, 0s);
}

/* Limited: gem */
.venue-deco-limited {
  position: absolute;
  font-size: calc(1.7rem * var(--deco-scale, 1));
  filter: drop-shadow(0 0 6px currentColor);
  animation: venue-deco-float var(--deco-dur, 3s) ease-in-out infinite;
  animation-delay: var(--deco-delay, 0s);
}

/* Custom pixel art decoration */
.venue-deco-custom {
  position: absolute;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
  animation-duration: var(--deco-dur, 3s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: var(--deco-delay, 0s);
}

/* Decoration animations */
@keyframes venue-deco-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.95; }
}

@keyframes venue-deco-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

@keyframes venue-deco-sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes venue-deco-float {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-6px); opacity: 1; }
}

/* --- 通報ボタン --- */
.lh-report-btn {
  background: none; border: none; color: var(--text-muted, #888);
  cursor: pointer; font-size: 0.75rem; padding: 0 0.2rem;
  opacity: 0.6; transition: opacity 0.2s;
}
.lh-report-btn:hover { opacity: 1; color: #dc3545; }

/* --- カスタムドット絵プレビュー --- */
.lh-custom-art-preview {
  display: flex; justify-content: center; align-items: center;
  min-height: 48px;
}
.lh-custom-art-preview canvas { image-rendering: pixelated; }

/* --- Audience --- */
.venue-audience {
  padding: 0.75rem 1rem;
  padding-bottom: 4px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  align-content: center;
  overflow: hidden;
}
/* メダルが overflow: hidden でクリップされないよう、はみ出し分を内側に収める */
.venue-person {
  margin: 3px;
}

.venue-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted, #999);
  font-size: 0.85rem;
  padding: 1rem;
}
.venue-empty i {
  font-size: 1.5rem;
  opacity: 0.4;
}

/* --- Person Avatar --- */
.venue-person {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  flex-shrink: 0;
}
.venue-person-gold  { border-color: #ffd700; box-shadow: 0 0 6px rgba(255, 215, 0, 0.4); }
.venue-person-silver { border-color: #c0c0c0; box-shadow: 0 0 6px rgba(192, 192, 192, 0.3); }
.venue-person-bronze { border-color: #cd7f32; box-shadow: 0 0 6px rgba(205, 127, 50, 0.3); }

.venue-person-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.venue-person-default {
  width: 100%;
  height: 100%;
  background: #555;
}

.venue-person-medal {
  position: absolute;
  bottom: -1px;
  right: -1px;
  font-size: 0.6rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.venue-person-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--venue-accent-rgb), 0.35);
}

/* --- Top 3 Row --- */
.venue-top3 {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* --- Dots --- */
.venue-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.venue-dots-more {
  font-size: 0.7rem;
  color: var(--venue-accent);
  padding: 0.125rem 0.375rem;
}

/* --- Progress Bar --- */
.venue-progress {
  width: 100%;
  margin-top: 0.375rem;
}
.venue-progress-track {
  height: 10px;
  background: rgba(var(--venue-accent-rgb), 0.12);
  border-radius: 5px;
  overflow: hidden;
}
.venue-progress-fill {
  height: 100%;
  background: var(--venue-accent);
  border-radius: 5px;
  transition: width 0.5s;
}
.venue-progress-label {
  font-size: 0.75rem;
  color: var(--venue-accent);
  text-align: center;
  margin-top: 0.375rem;
}

/* --- Area Grid (Tier 5-6) --- */
.venue-area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
}
.venue-area-block {
  background: var(--venue-accent);
  border-radius: 4px;
  padding: 0.5rem;
  text-align: center;
}
.venue-area-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
}
.venue-area-pct {
  font-size: 0.85rem;
  color: #fff;
  font-weight: bold;
}

/* --- Overview (Tier 7-8) --- */
.venue-overview {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  background: rgba(var(--venue-accent-rgb), 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.venue-overview-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, var(--venue-accent), transparent);
  opacity: 0.3;
  transition: height 0.5s;
}
.venue-overview-pct {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* --- Recruit Gauge --- */
.venue-recruit {
  margin-top: 0.75rem;
  padding: 0 0.5rem;
}
.venue-recruit-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 0.25rem;
}
.venue-recruit-track {
  height: 6px;
  background: #333;
  border-radius: 3px;
  overflow: hidden;
}
.venue-recruit-fill {
  height: 100%;
  background: #ffc107;
  border-radius: 3px;
  transition: width 0.5s;
}
.venue-recruit-success {
  background: #28a745;
}
.venue-recruit-msg {
  font-size: 0.75rem;
  margin-top: auto;
  padding-bottom: 0.5rem;
  text-align: center;
  flex-shrink: 0;
}
.venue-recruit-msg-warn { color: #ffc107; }
.venue-recruit-msg-ok   { color: #28a745; }
.venue-recruit-msg-fail { color: #dc3545; }

/* --- Settled --- */
.venue-settled-msg {
  text-align: center;
  margin-top: auto;
  padding: 0 0.5rem 0.5rem;
  font-size: 0.85rem;
  color: var(--venue-accent);
  flex-shrink: 0;
}

/* --- Venue responsive --- */
@media (max-width: 480px) {
  .venue-stage {
    padding: 0.4rem 0.5rem 0.2rem;
  }
  .venue-screen {
    width: 40%;
  }
  .venue-person {
    width: 28px;
    height: 28px;
  }
}

/* ========================================
   ショップ棚グリッド (リアクション設定)
   ======================================== */
.lh-shelf-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lh-shelf-slot {
  width: 56px; text-align: center; border: 1px solid var(--border-color, #444);
  border-radius: 8px; padding: 0.4rem 0.2rem; position: relative;
  cursor: default; transition: border-color 0.15s;
}
.lh-shelf-slot:hover { border-color: #4c9aff; }
.lh-shelf-slot-icon {
  font-size: 1.4rem; line-height: 1; min-height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lh-shelf-anim {
  animation-duration: 2s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.lh-shelf-slot-price {
  font-size: 0.65rem; margin-top: 0.2rem; color: var(--text-muted, #888);
  cursor: pointer;
}
.lh-shelf-slot-price:hover { color: #4c9aff; }
.lh-shelf-slot-effect {
  font-size: 0.55rem; width: 100%; margin-top: 0.15rem; padding: 0.05rem;
  border: 1px solid var(--border-color, #444); border-radius: 3px;
  background: var(--bg-secondary, #1e1e1e); color: var(--text-color, #e0e0e0);
  cursor: pointer;
}
.lh-shelf-slot-remove {
  position: absolute; top: -6px; right: -6px; width: 16px; height: 16px;
  border-radius: 50%; background: #dc3545; color: #fff; border: none;
  font-size: 0.6rem; cursor: pointer; display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: opacity 0.15s;
  line-height: 1;
}
.lh-shelf-slot:hover .lh-shelf-slot-remove { opacity: 1; }
.lh-shelf-add {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-color, #444); border-radius: 8px;
  cursor: pointer; color: var(--text-muted, #888); font-size: 1.4rem;
}
.lh-shelf-add:hover { border-color: #4c9aff; color: #4c9aff; }

/* サブモーダル */
.lh-sub-modal-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.lh-sub-modal-panel {
  background: var(--card-bg, #1e1e2e); border: 1px solid var(--border-color, #333);
  border-radius: 12px; width: 90%; max-width: 360px; max-height: 80vh;
  overflow-y: auto;
}

/* モーダル内タブ */
.lh-item-tabs {
  display: flex; border-bottom: 1px solid var(--border-color, #444);
  overflow-x: auto; padding: 0 0.5rem;
}
.lh-item-tab {
  padding: 0.4rem 0.75rem; font-size: 0.8rem; cursor: pointer;
  white-space: nowrap; border-bottom: 2px solid transparent;
  color: var(--text-muted, #888); background: none; border-top: none;
  border-left: none; border-right: none;
}
.lh-item-tab.active { border-bottom-color: #4c9aff; color: #4c9aff; }

/* モーダル内アイテムグリッド */
.lh-item-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
.lh-item-option {
  width: 52px; height: 52px; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--border-color, #444);
  border-radius: 8px; cursor: pointer; font-size: 1.3rem; position: relative;
  transition: border-color 0.15s;
}
.lh-item-option:hover { border-color: #4c9aff; }
.lh-item-option.selected { border-color: #28a745; opacity: 0.5; cursor: default; }
.lh-item-option .lh-selected-badge {
  position: absolute; bottom: 1px; font-size: 0.5rem; color: #28a745;
}

/* モーダル内ギャラリーグリッド（みんなの作品タブ） */
.lh-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem; padding: 0.75rem;
}
.lh-gallery-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.5rem 0.25rem 0.4rem;
  border: 1px solid var(--border-color, #444); border-radius: 8px;
  cursor: pointer; position: relative; transition: border-color 0.15s;
  overflow: hidden;
}
.lh-gallery-card:hover { border-color: #4c9aff; }
.lh-gallery-card.selected { border-color: #28a745; opacity: 0.5; cursor: default; }
.lh-gallery-card .lh-selected-badge {
  position: absolute; bottom: 2px; font-size: 0.5rem; color: #28a745;
}
.lh-gallery-card-name {
  display: block; width: 100%; margin-top: 4px;
  font-size: 0.6rem; color: var(--text-primary, #e0e0e0);
  text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px;
}
.lh-gallery-card-author {
  display: block; width: 100%;
  font-size: 0.5rem; color: var(--text-muted, #888);
  text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px;
}

/* === Tooltip === */
.lh-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  vertical-align: middle;
  margin-left: 0.25rem;
}
.lh-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.92);
  color: rgba(255,255,255,0.9);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
  font-weight: 400;
}
.lh-tip:hover::after {
  opacity: 1;
}

/* ===========================
   Reaction Purchase Effect
   =========================== */

/* 飛翔アイコン */
.lh-reaction-flyer {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  animation: lh-fly-to-venue 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

@keyframes lh-fly-to-venue {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(var(--fly-dx), var(--fly-dy)) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(var(--fly-dx), var(--fly-dy)) scale(0.3);
    opacity: 0;
  }
}

/* 会場フラッシュ */
.venue-visual.venue-flash {
  animation: lh-venue-flash 0.6s ease-out;
}

@keyframes lh-venue-flash {
  0% {
    box-shadow: inset 0 0 30px rgba(255, 193, 7, 0.4);
  }
  100% {
    box-shadow: none;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .lh-reaction-flyer {
    animation: none;
    opacity: 0;
  }
  .venue-visual.venue-flash {
    animation: none;
  }
  .venue-deco-penlight,
  .venue-deco-uchiwa,
  .venue-deco-flower,
  .venue-deco-effect,
  .venue-deco-limited,
  .venue-deco-custom {
    animation: none;
  }
  .lh-countdown-urgent .lh-countdown-time {
    animation: none;
  }
}

/* --- Organic Boost Info --- */
.lh-organic-info {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #aaa);
  padding: 0.4rem 0.6rem;
  background: rgba(40, 167, 69, 0.06);
  border: 1px solid rgba(40, 167, 69, 0.15);
  border-radius: 6px;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.lh-organic-info i {
  color: #28a745;
  font-size: 0.85rem;
}

/* --- Share Section --- */
.lh-share-section {
  padding: 0.6rem 0;
  margin-top: 0.5rem;
}
.lh-share-label {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.4rem;
}
.lh-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.lh-share-section .pub-share-url {
  width: 100%;
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border-color, #444);
  border-radius: 6px;
  background: var(--bg-secondary, transparent);
  color: var(--text-secondary, #aaa);
}

/* --- Reaction Ranking --- */
.lh-rr-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #333);
  font-size: 0.85rem;
}
.lh-rr-row:last-child {
  border-bottom: none;
}
.lh-rr-rank {
  width: 32px;
  text-align: center;
  font-weight: 700;
  flex-shrink: 0;
}
.lh-rr-name {
  width: 100px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lh-rr-bar-wrap {
  flex: 1;
  height: 14px;
  background: var(--lh-rr-bar-bg);
  border-radius: 7px;
  overflow: hidden;
  min-width: 40px;
}
.lh-rr-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--lh-rr-bar-from), var(--lh-rr-bar-to));
  border-radius: 7px;
  transition: width 0.5s ease;
}
/* Reaction Ranking: Theme-aware color variables */
:root {
  --lh-rr-bar-bg: rgba(0, 0, 0, 0.06);
  --lh-rr-bar-from: rgba(146, 64, 14, 0.4);
  --lh-rr-bar-to: rgba(146, 64, 14, 0.7);
  --lh-rr-progress-bg: rgba(0, 0, 0, 0.06);
  --lh-rr-progress-from: rgba(146, 64, 14, 0.4);
  --lh-rr-progress-to: rgba(146, 64, 14, 0.7);
  --lh-rr-progress-ok-from: rgba(21, 128, 61, 0.5);
  --lh-rr-progress-ok-to: rgba(21, 128, 61, 0.8);
}
[data-theme^="dark-"] {
  --lh-rr-bar-bg: rgba(255, 255, 255, 0.06);
  --lh-rr-bar-from: rgba(255, 193, 7, 0.5);
  --lh-rr-bar-to: rgba(255, 193, 7, 0.9);
  --lh-rr-progress-bg: rgba(255, 255, 255, 0.08);
  --lh-rr-progress-from: rgba(255, 193, 7, 0.5);
  --lh-rr-progress-to: rgba(255, 193, 7, 0.9);
  --lh-rr-progress-ok-from: rgba(63, 185, 80, 0.6);
  --lh-rr-progress-ok-to: rgba(63, 185, 80, 0.95);
}
/* Reaction Ranking: Info text */
.lh-rr-info {
  margin-bottom: 0.75rem;
}
.lh-rr-info-text {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.5rem;
}
/* Progress toward success */
.lh-rr-progress {
  margin-top: 0.25rem;
}
.lh-rr-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.25rem;
}
.lh-rr-progress-bar {
  height: 6px;
  background: var(--lh-rr-progress-bg);
  border-radius: 3px;
  overflow: hidden;
}
.lh-rr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lh-rr-progress-from), var(--lh-rr-progress-to));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.lh-rr-progress-success {
  background: linear-gradient(90deg, var(--lh-rr-progress-ok-from), var(--lh-rr-progress-ok-to));
}
/* My row highlight */
.lh-rr-row-me {
  background: rgba(0, 153, 204, 0.1);
  border-radius: 6px;
}
/* Reward tier table */
.lh-rr-reward-table {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--lh-rr-bar-bg);
  border-radius: 8px;
}
.lh-rr-reward-tier {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.lh-rr-reward-tier-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #888);
}
.lh-rr-reward-tier-amount {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lh-success);
}
.lh-rr-reward-tier-amount small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted, #888);
}
@media (max-width: 480px) {
  .lh-rr-name {
    width: 70px;
  }
}
