/* jlpapa classroom window (2026-11-17) */
.jl-cr {
  --jl-accent: #ff6b4a;
  --jl-accent-deep: #e85a3a;
  --jl-ink: #2b2b2b;
  --jl-soft: #fff7f2;
  --jl-cream: #fff1e6;
  --jl-line: #f0d9cb;
  --jl-muted: #7a6a60;
  box-sizing: border-box;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
.jl-cr *, .jl-cr *::before, .jl-cr *::after { box-sizing: border-box; }

/* stage: video + danmaku overlay */
.jl-cr-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 28px rgba(80, 40, 20, 0.12); }
@supports not (aspect-ratio: 16 / 9) { .jl-cr-stage { height: 0; padding-top: 56.25%; } }
.jl-cr-video { position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.jl-cr-danmaku { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; }
.jl-dm-item { position: absolute; left: 0; white-space: nowrap; font-size: 18px; line-height: 24px; color: #fff; font-weight: 600;
  text-shadow: 0 0 2px #000, 0 0 4px rgba(0,0,0,.8); will-change: transform; }
.jl-dm-mine { border: 1px solid rgba(255,255,255,.85); border-radius: 4px; padding: 0 6px; }
.jl-cr-badge { position: absolute; top: 10px; left: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; }
.jl-cr-badge i,
.jl-cr-live-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; animation: jl-cr-pulse 1.4s ease-in-out infinite; }
@keyframes jl-cr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.jl-cr-tap { display: none; position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; z-index: 4; border: 0;
  background: rgba(0,0,0,.35); color: #fff; font-size: 18px; cursor: pointer; }
.jl-cr-needs-tap .jl-cr-tap { display: block; }

/* homepage window */
.jl-cr-home { display: flex; gap: 24px; align-items: center; margin: 16px auto 8px; padding: 18px; max-width: 1180px;
  background: linear-gradient(135deg, var(--jl-soft) 0%, #ffe8d8 100%); border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(255, 107, 74, 0.12); }
.jl-cr-home .jl-cr-stage { flex: 0 0 58%; }
.jl-cr-home .jl-dm-item { font-size: 15px; }
.jl-cr-info { flex: 1; min-width: 0; color: var(--jl-ink); }
.jl-cr-info h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; font-weight: 700; }
.jl-cr-info .jl-cr-sub { margin: 0 0 14px; color: var(--jl-muted); font-size: 15px; }
.jl-cr-info dl { margin: 0 0 16px; }
.jl-cr-info dt { font-size: 13px; color: #999; }
.jl-cr-info dd { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.jl-cr-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--jl-accent); color: #fff !important; border: 0; border-radius: 999px;
  padding: 10px 26px; font-size: 16px; font-weight: 600; text-decoration: none !important; cursor: pointer; line-height: 1.2; }
.jl-cr-btn:hover { filter: brightness(1.05); background: var(--jl-accent-deep); }
.jl-cr-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: 13px; color: #888; }
.jl-cr-steps span + span::before { content: '→ '; }

/* room page */
.jl-cr-share-seed { position: absolute; width: 400px; height: 400px; opacity: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.jl-cr-room {
  max-width: 720px; margin: 0 auto 40px; padding: 12px 14px 28px; color: var(--jl-ink);
  background:
    radial-gradient(120% 80% at 10% -10%, #ffe7d6 0%, transparent 55%),
    radial-gradient(90% 60% at 100% 0%, #ffd9c8 0%, transparent 45%),
    linear-gradient(180deg, #fffaf6 0%, #ffffff 40%, #fff8f2 100%);
  border-radius: 0 0 18px 18px;
}
.jl-cr-room-head { margin-bottom: 12px; }
.jl-cr-room-kicker { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.jl-cr-live-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--jl-accent-deep);
  border: 1px solid rgba(255, 107, 74, 0.35); font-size: 13px; font-weight: 700; padding: 4px 12px 4px 10px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(255, 107, 74, 0.12); }
.jl-cr-room-brand { font-size: 13px; color: var(--jl-muted); font-weight: 600; }
.jl-cr-room h1 { font-size: 22px; margin: 0 0 6px; font-weight: 800; letter-spacing: 0.01em; line-height: 1.35; }
.jl-cr-room .jl-cr-sub { margin: 0 0 10px; color: var(--jl-muted); font-size: 14px; line-height: 1.5; }
.jl-cr-meta { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jl-cr-meta li { background: rgba(255,255,255,.85); border: 1px solid var(--jl-line); border-radius: 12px; padding: 8px 10px; }
.jl-cr-meta span { display: block; font-size: 12px; color: #a08b7e; margin-bottom: 2px; }
.jl-cr-meta strong { font-size: 14px; font-weight: 700; color: var(--jl-ink); }
.jl-cr-now { margin: 10px 0 0; font-size: 14px; color: var(--jl-muted); }
.jl-cr-now-title { color: var(--jl-ink); font-weight: 600; }

.jl-cr-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jl-cr-chip {
  border: 1px solid var(--jl-line); background: #fff; color: var(--jl-ink); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 40px;
}
.jl-cr-chip:active { transform: scale(0.98); }
.jl-cr-sound.jl-on { border-color: var(--jl-accent); color: var(--jl-accent-deep); background: #fff4ef; }
.jl-cr-dm-toggle.jl-off { opacity: .55; text-decoration: line-through; }

.jl-cr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.jl-cr-form { display: flex; flex: 1 1 100%; gap: 8px; align-items: stretch; background: #fff; border: 1px solid var(--jl-line);
  border-radius: 999px; padding: 4px 4px 4px 14px; box-shadow: 0 4px 14px rgba(80, 40, 20, 0.06); }
.jl-cr-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 0; font-size: 15px; color: var(--jl-ink); }
.jl-cr-form input:disabled { color: #b0a39b; }
.jl-cr-form .jl-cr-btn,
.jl-cr-bar .jl-cr-btn {
  flex: 0 0 auto; padding: 10px 18px; font-size: 15px; min-width: 76px;
  background: var(--jl-accent) !important; color: #fff !important; border: 0 !important; border-radius: 999px;
}
.jl-cr-form .jl-cr-login { text-align: center; white-space: nowrap; }
.jl-cr-notice { min-height: 20px; margin-top: 8px; font-size: 13px; color: #d9534f; }
.jl-cr-room .jl-cr-stage:fullscreen,
.jl-cr-room .jl-cr-stage:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; height: 100%; box-shadow: none; }

/* share poster overlay */
.jl-cr-poster-overlay {
  position: fixed; inset: 0; z-index: 10050; background: rgba(20, 12, 8, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.jl-cr-poster-overlay[hidden] { display: none !important; }
.jl-cr-poster-sheet {
  position: relative; width: min(100%, 360px); background: #fffaf6; border-radius: 16px;
  padding: 36px 14px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.jl-cr-poster-close {
  position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #f3e7de; color: #5a463c; font-size: 24px; line-height: 1; cursor: pointer;
}
.jl-cr-poster-hint { margin: 0 0 10px; text-align: center; color: var(--jl-muted); font-size: 13px; }
.jl-cr-poster-img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }

@media (max-width: 768px) {
  .jl-cr-home { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; margin: 10px 8px; }
  .jl-cr-home .jl-cr-stage { flex: none; }
  .jl-cr-info h2 { font-size: 19px; }
  .jl-cr-info dl { display: flex; gap: 18px; margin-bottom: 10px; }
  .jl-cr-home .jl-cr-btn { display: block; text-align: center; }
  .jl-dm-item { font-size: 15px; }
  .jl-cr-room { padding: 10px 10px 24px; margin-bottom: 24px; }
  .jl-cr-room h1 { font-size: 19px; }
  .jl-cr-chip { flex: 1 1 calc(50% - 8px); text-align: center; }
  .jl-cr-form .jl-cr-btn { min-width: 88px; }
}

@media (min-width: 900px) {
  .jl-cr-room { max-width: 880px; padding: 20px 24px 36px; margin-top: 12px; border-radius: 18px; }
  .jl-cr-room h1 { font-size: 26px; }
}
