.lv {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 8px; background: #101830; color: #fff;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.lv.is-narrow { aspect-ratio: 4 / 3; }
.lv.is-playing .lv-canvas { touch-action: none; }
.lv-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: manipulation; outline: none; cursor: pointer;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.lv-panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; overflow-y: auto;
  padding: 16px; background: rgba(12, 18, 36, 0.82); text-align: center; z-index: 2;
}
.lv-panel[data-lv-cover] { background: linear-gradient(180deg, rgba(10, 16, 36, 0.86) 0%, rgba(12, 20, 42, 0.62) 48%, rgba(10, 16, 36, 0.86) 100%); }
.lv-panel[hidden] { display: none; }
.lv-box { display: grid; justify-items: center; gap: 8px; max-width: 540px; margin: auto 0; }
.lv-box p { margin: 0; }
.lv-kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #c4e86b; }
.lv-title { font-family: "Rubik", system-ui, sans-serif; font-weight: 800; font-size: 42px; line-height: 1.1; color: #fff; text-shadow: 0 2px 12px rgba(4,8,18,0.85); }
.lv-text { font-size: 16px; line-height: 1.5; color: #e8edf8; max-width: 48ch; text-shadow: 0 1px 8px rgba(4,8,18,0.9); }
.lv-keys { font-size: 14px; color: #b7c6e0; }
.lv-best { font-size: 14px; font-weight: 600; color: #ffc93c; }
.lv-btn {
  min-height: 48px; padding: 0 32px; margin-top: 8px; border: 0; border-radius: 999px;
  background: #ff6b1a; color: #1a2436; font-family: "Rubik", system-ui, sans-serif; font-weight: 800; font-size: 20px;
  box-shadow: 0 4px 0 #a8461a; cursor: pointer;
}
.lv-btn:hover { filter: brightness(1.06); }
.lv-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #a8461a; }
.lv-btn:focus-visible, .lv-ctl:focus-visible { outline: 3px solid #ffc93c; outline-offset: 3px; }
.lv-goals { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 15px; text-align: left; }
.lv-goals li { display: flex; gap: 8px; align-items: center; color: #b7c6e0; }
.lv-goals li::before { content: "\2606"; color: #b7c6e0; font-size: 18px; line-height: 1; }
.lv-goals li.is-done { color: #fff; }
.lv-goals li.is-done::before { content: "\2605"; color: #ffc93c; }
.lv-score { display: flex; gap: 24px; font-size: 16px; color: #e8edf8; }
.lv-score b { font-family: "Rubik", system-ui, sans-serif; font-size: 22px; color: #fff; }
.lv-ctls { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; z-index: 3; }
.lv-ctl {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; padding: 0;
  background: rgba(12, 18, 36, 0.72); color: #fff; cursor: pointer;
}
.lv-ctl[hidden] { display: none; }
.lv-ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lv-ctl .i-off { display: none; }
.lv-ctl[aria-pressed="true"] .i-on { display: none; }
.lv-ctl[aria-pressed="true"] .i-off { display: block; }
.lv-result { display: grid; justify-items: center; gap: 8px; }
.lv-btn2 {
  min-height: 44px; padding: 0 20px; border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  background: transparent; color: #fff; font-family: "Rubik", system-ui, sans-serif; font-weight: 700; font-size: 16px; cursor: pointer;
}
.lv-btn2:hover { background: rgba(255, 255, 255, 0.12); }
.lv-btn2:disabled { opacity: 0.6; cursor: default; }
.lv-btn2:focus-visible, .lv-link:focus-visible, .lv-input:focus-visible { outline: 3px solid #ffc93c; outline-offset: 2px; }
.lv-link { background: none; border: 0; padding: 4px 8px; color: #c4e86b; font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lv-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 4px; }
.lv-actions .lv-btn { margin-top: 0; }
.lv-post { display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 400px; }
.lv-post[hidden] { display: none; }
.lv-post-label { font-size: 14px; color: #b7c6e0; }
.lv-post-row { display: flex; gap: 8px; width: 100%; }
.lv-input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 16px;
}
.lv-input::placeholder { color: #b7c6e0; }
.lv-post-msg { min-height: 20px; font-size: 14px; font-weight: 600; color: #c4e86b; }
.lv-post-msg.is-error { color: #ffc93c; }
.lv-stars { display: none; color: #ffc93c; font-size: 18px; letter-spacing: 2px; }
.lv-board-panel { z-index: 4; background: rgba(12, 18, 36, 0.95); }
.lv-board-box { width: 100%; max-width: 440px; }
.lv-board-title { font-family: "Rubik", system-ui, sans-serif; font-weight: 800; font-size: 28px; color: #fff; }
.lv-board-list { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; max-height: 240px; overflow-y: auto; display: grid; gap: 2px; text-align: left; }
.lv-board-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 12px; border-radius: 8px; font-size: 15px; color: #e8edf8; }
.lv-board-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.06); }
.lv-board-list li.is-me { background: rgba(196, 232, 107, 0.22); color: #fff; font-weight: 600; }
.lv-board-list li.is-note { display: block; text-align: center; background: none; color: #b7c6e0; }
.lv-rank { font-family: "Rubik", system-ui, sans-serif; font-weight: 800; color: #ffc93c; }
.lv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-pts { font-family: "Rubik", system-ui, sans-serif; font-weight: 700; }
.lv-board-me { font-size: 14px; color: #c4e86b; min-height: 20px; }

.lv-full.is-full { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; background: #0a1020; }
.lv-full.is-pseudo { position: fixed; inset: 0; z-index: 2147483000; width: 100vw; height: 100vh; height: 100dvh; }
.lv-full.is-full .lv { width: min(100%, calc(100vh * 16 / 9)); border-radius: 0; }
.lv-full.is-full .lv.is-narrow { width: min(100%, calc(100vh * 4 / 3)); }
.lv-full.is-pseudo .lv { width: min(100%, calc(100dvh * 16 / 9)); }
.lv-full.is-pseudo .lv.is-narrow { width: min(100%, calc(100dvh * 4 / 3)); }
.lv-rotate { display: none; margin: 0; color: #b7c6e0; font-size: 15px; text-align: center; padding: 0 16px; }
@media (orientation: portrait) and (pointer: coarse) { .lv-full.is-full .lv-rotate { display: block; } }
html.lv-lock, html.lv-lock body { overflow: hidden; }
.lv-cover-top { font-size: 15px; font-weight: 600; color: #c4e86b; }
.lv-cover-top[hidden] { display: none; }

.lv.is-narrow .lv-title { font-size: 28px; }
.lv.is-narrow .lv-goals, .lv.is-narrow .lv-post-label, .lv.is-narrow .lv-board-panel .lv-keys { display: none; }
.lv.is-narrow .lv-stars { display: inline; }
.lv.is-short .lv-goals, .lv.is-short .lv-post-label, .lv.is-short .lv-text, .lv.is-short .lv-kicker { display: none; }
.lv.is-short .lv-stars { display: inline; }
.lv.is-short .lv-title { font-size: 30px; }
.lv.is-short .lv-box { gap: 6px; }
.lv.is-short .lv-panel { padding: 8px; }
.lv.is-short .lv-ctls { top: 4px; right: 6px; gap: 4px; }
.lv.is-short .lv-ctl { width: 32px; height: 32px; }
.lv.is-short .lv-ctl svg { width: 16px; height: 16px; }
.lv.is-narrow .lv-btn2 { min-height: 40px; padding: 0 14px; font-size: 15px; }
.lv.is-narrow .lv-input { min-height: 40px; }
.lv.is-narrow .lv-board-title { font-size: 22px; }
.lv.is-narrow .lv-board-list { max-height: none; }
.lv.is-narrow .lv-board-panel { justify-content: flex-start; }
.lv.is-narrow .lv-text, .lv.is-narrow .lv-kicker { display: none; }
.lv.is-narrow .lv-goals { font-size: 13px; gap: 2px; }
.lv.is-narrow .lv-btn { min-height: 44px; font-size: 18px; }
.lv.is-narrow .lv-panel { padding: 48px 8px 8px; }
.lv.is-narrow .lv-box { gap: 4px; width: 100%; }
.lv-panel.is-victory { background: rgba(12, 20, 44, 0.72); }
.lv-panel.is-victory .lv-box { animation: lv-panel-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.lv-panel.is-defeat .lv-box { animation: lv-panel-shake 0.45s ease-out both; }
.lv-panel.is-victory .lv-stars { display: inline-flex; gap: 3px; }
.lv-star-anim { display: inline-block; color: #ffc93c; animation: lv-star-pop 0.48s cubic-bezier(0.22, 1.4, 0.36, 1) backwards; animation-delay: calc(0.18s + var(--si, 0) * 0.22s); }
.lv-star-empty { display: inline-block; color: #667896; opacity: 0.75; }
.lv-panel.is-victory .lv-goals li { animation: lv-goal-in 0.38s ease-out backwards; animation-delay: calc(0.28s + var(--gi, 0) * 0.14s); }
@keyframes lv-panel-rise {
  0% { opacity: 0; transform: translateY(22px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lv-panel-shake {
  0% { opacity: 0; transform: translateY(-6px); }
  25% { opacity: 1; transform: translateX(-6px); }
  55% { transform: translateX(5px); }
  80% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
@keyframes lv-star-pop {
  0% { opacity: 0; transform: scale(2.2) rotate(-22deg); }
  70% { opacity: 1; transform: scale(0.9) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes lv-goal-in {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lv-panel.is-victory .lv-box, .lv-panel.is-defeat .lv-box,
  .lv-star-anim, .lv-panel.is-victory .lv-goals li { animation: none !important; }
}
.lv.is-tiny .lv-goals { display: none; }
.lv.is-narrow .lv-title { font-size: 24px; }
.lv.is-narrow .lv-score { gap: 12px; font-size: 14px; }
.lv.is-narrow .lv-score b { font-size: 18px; }
.lv.is-narrow .lv-post-msg:empty { display: none; }
.lv.is-narrow .lv-actions .lv-btn { min-height: 40px; padding: 0 20px; font-size: 17px; }
.lv.is-narrow .lv-actions [data-lv-open-board] { display: none !important; }
.lv.is-narrow .lv-post { max-width: 100%; }
.lv.is-narrow .lv-post-row .lv-btn2 { padding: 0 12px; flex: none; }
.lv.is-narrow .lv-ctls { top: 4px; right: 6px; gap: 4px; }
.lv.is-narrow .lv-ctl { width: 32px; height: 32px; }
.lv.is-narrow .lv-ctl svg { width: 16px; height: 16px; }
