:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #000000;
  --muted: #666666;
  --line: #dddddd;
  --select: #0a64e8;
  --select-text: #ffffff;
  --folder: #4a90e2;
  --link: #0000ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 16px 8px;
  flex: 0 0 auto;
}

.top-divider {
  flex: 0 0 auto;
  width: 100%;
  height: 14px;
  background: url("/icons/hearts1.gif") repeat-x center;
  image-rendering: pixelated;
}

.brand {
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.brand-letter {
  display: inline-block;
  animation: brand-bounce 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.08s);
  transform-origin: center bottom;
}

@keyframes brand-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(-4deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-2px) rotate(3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-letter {
    animation: none;
  }
}

.linkish {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.linkish:hover {
  text-decoration: underline;
}

.layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.browser {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: min(60vw, 720px);
  border-right: 1px solid var(--line);
}

.deco-divider {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
  margin: 10px 0 0;
  pointer-events: none;
  user-select: none;
}

.column {
  flex: 0 0 220px;
  width: 220px;
  border-right: 1px solid var(--line);
  overflow-x: hidden;
  overflow-y: auto;
}

.column:last-child {
  border-right: 0;
}

.column ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.item:hover {
  background: #f3f3f3;
}

.item.selected {
  background: var(--select);
  color: var(--select-text);
}

.icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-emoji {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

.empty {
  padding: 12px 10px;
  color: var(--muted);
  font-style: italic;
}

.player-pane {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.player-pane.is-empty .player-active {
  display: none;
}

.wmp {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: visible;
  font-family: "Lucida Grande", "Lucida Sans Unicode", "Segoe UI", Tahoma, sans-serif;
  background: transparent;
  box-shadow: none;
}

.wmp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 8px;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.wmp-title {
  font-size: 13px;
  font-weight: 600;
  color: #3a3a3a;
  text-shadow: 0 1px 0 #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.wmp-close {
  appearance: none;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #0a64e8;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.wmp-close:hover {
  background: none;
  color: #0648b0;
  text-decoration: underline;
}

.wmp-stage {
  position: relative;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
  box-shadow:
    inset 0 0 0 1px #c4c4c4,
    inset 0 1px 3px rgba(120, 120, 120, 0.2);
  min-height: 180px;
}

.subtitle-overlay {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 7%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-size: clamp(15px, 2.6vw, 30px);
  line-height: 1.35;
  text-align: center;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.85),
    1px 1px 0 rgba(0, 0, 0, 0.7);
  white-space: pre-line;
  pointer-events: none;
  z-index: 2;
}

#player {
  display: block;
  width: 100%;
  max-height: min(52vh, 520px);
  background: #000;
  vertical-align: top;
}

.wmp-stage:fullscreen,
.wmp-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000;
  min-height: 0;
}

.wmp-stage:fullscreen #player,
.wmp-stage:-webkit-full-screen #player {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.wmp-stage:fullscreen .subtitle-overlay,
.wmp-stage:-webkit-full-screen .subtitle-overlay {
  font-size: clamp(18px, 3.2vw, 42px);
  bottom: 5%;
}

.wmp-seek-row {
  padding: 10px 0 4px;
}

.wmp-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #cfcfcf, #e8e8e8);
  box-shadow:
    inset 0 1px 2px rgba(110, 110, 110, 0.45),
    0 1px 0 #fff;
  outline: none;
  cursor: pointer;
}

.wmp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #d8d8d8 45%, #a8a8a8 100%);
  box-shadow:
    0 0 0 1px #9a9a9a,
    0 1px 2px rgba(90, 90, 90, 0.35),
    inset 0 1px 0 #fff;
  border: 0;
}

.wmp-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #d8d8d8 45%, #a8a8a8 100%);
  box-shadow:
    0 0 0 1px #9a9a9a,
    0 1px 2px rgba(90, 90, 90, 0.35),
    inset 0 1px 0 #fff;
  border: 0;
}

.wmp-seek::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #cfcfcf, #e8e8e8);
}

.wmp-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  margin-top: 2px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f4f4f4 0%, #e0e0e0 55%, #d4d4d4 100%);
  border: 1px solid #bdbdbd;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(110, 110, 110, 0.15);
}

.wmp-transport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
}

.wmp-transport-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wmp-fs {
  appearance: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #9a9a9a;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 45%, #cfcfcf 100%);
  color: #3a3a3a;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 1px rgba(100, 100, 100, 0.25);
}

.wmp-fs:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 45%, #d8d8d8 100%);
  color: #0a64e8;
}

.wmp-fs:active {
  background: linear-gradient(180deg, #cfcfcf 0%, #e0e0e0 100%);
  box-shadow: inset 0 1px 2px rgba(100, 100, 100, 0.35);
  transform: translateY(calc(-50% + 1px));
}

.wmp-fs-exit {
  display: none;
}

.wmp-fs.is-fullscreen .wmp-fs-enter {
  display: none;
}

.wmp-fs.is-fullscreen .wmp-fs-exit {
  display: block;
}

.wmp-btn {
  appearance: none;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #9a9a9a;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 45%, #cfcfcf 100%);
  color: #3a3a3a;
  font: 11px/1 "Lucida Grande", "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 1px rgba(100, 100, 100, 0.25);
  text-shadow: 0 1px 0 #fff;
}

.wmp-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 45%, #d8d8d8 100%);
}

.wmp-btn:active {
  background: linear-gradient(180deg, #cfcfcf 0%, #e0e0e0 100%);
  box-shadow: inset 0 1px 2px rgba(100, 100, 100, 0.35);
}

.wmp-play {
  appearance: none;
  width: 52px;
  height: 52px;
  margin: 0 4px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #9af0ff 0%, #2ad0f0 28%, #0a88c8 62%, #065a90 100%);
  color: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 1px #7a9ab8,
    0 0 0 3px #d0d8e0,
    0 2px 6px rgba(80, 80, 80, 0.28),
    0 0 12px rgba(40, 180, 230, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.55),
    inset 0 -4px 8px rgba(0, 80, 140, 0.35);
}

.wmp-play:hover {
  box-shadow:
    0 0 0 1px #7a9ab8,
    0 0 0 3px #d8e0e8,
    0 2px 8px rgba(80, 80, 80, 0.3),
    0 0 16px rgba(60, 200, 255, 0.55),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -4px 8px rgba(0, 80, 140, 0.35);
}

.wmp-play:active {
  transform: translateY(1px);
}

.wmp-play-icon {
  display: block;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(40, 80, 120, 0.35);
  transform: translateX(1px);
}

.wmp-play.is-paused .wmp-play-icon {
  transform: translateX(1px);
}

.wmp-play:not(.is-paused) .wmp-play-icon {
  transform: translateX(0);
  letter-spacing: 1px;
}

.wmp-vol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  color: #555;
  font-size: 12px;
  text-shadow: 0 1px 0 #fff;
}

.wmp-vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, #c8c8c8, #e4e4e4);
  box-shadow: inset 0 1px 2px rgba(110, 110, 110, 0.4);
  outline: none;
  cursor: pointer;
}

.wmp-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #c8c8c8);
  border: 1px solid #9a9a9a;
  box-shadow: 0 1px 1px rgba(90, 90, 90, 0.25);
}

.wmp-vol input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #c8c8c8);
  border: 1px solid #9a9a9a;
}

.wmp-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid #c0c0c0;
  box-shadow: inset 0 1px 0 #eee;
  color: #555;
  font-size: 11px;
  text-shadow: 0 1px 0 #fff;
}

.wmp-extras label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wmp-extras select {
  font: inherit;
  color: #333;
  background: linear-gradient(180deg, #ffffff, #e4e4e4);
  border: 1px solid #9a9a9a;
  border-radius: 4px;
  padding: 1px 4px;
  box-shadow: inset 0 1px 0 #fff;
}

video::cue {
  background: rgba(40, 40, 40, 0.55);
  color: #fff;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-size: 1.05em;
  line-height: 1.35;
}

.login-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-weight: 700;
  font-size: clamp(8rem, 36vw, 28rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-align: center;
  opacity: 0.8;
  padding: 0;
  overflow: hidden;
}

.login-bg-line {
  display: flex;
  justify-content: center;
  width: max-content;
}

.login-bg-stream {
  transform: translateX(-1vw);
}

.login-bg span {
  display: inline-block;
}

.login-anime {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-anime img {
  position: absolute;
  image-rendering: auto;
  opacity: 0.95;
  transform-origin: center center;
}

.login {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 16px;
  text-align: center;
}

.login-blinks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-blinks img {
  display: block;
  image-rendering: auto;
}

.login-error {
  color: #b00000;
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
}

.login-error[hidden] {
  display: none;
}

.pin-form {
  position: fixed;
  z-index: 5;
  margin: 0;
  top: 10px;
  right: 10px;
  left: auto;
  touch-action: none;
}

.pin-form.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.locker {
  width: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Helvetica, Arial, sans-serif;
}

.locker-drag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(220, 220, 220, 0.55);
  cursor: grab;
  user-select: none;
  background: rgba(20, 20, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pin-form.is-dragging .locker-drag {
  cursor: grabbing;
}

.locker-shell {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f2f2f2 0%, #c8c8c8 42%, #9e9e9e 100%);
}

.locker-ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #d8d8d8 0%, #b5b5b5 65%, #9a9a9a 100%);
  pointer-events: none;
}

.locker-marker {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 1px;
  background: linear-gradient(180deg, #5a5a5a 0%, #2e2e2e 100%);
  z-index: 5;
  pointer-events: none;
}

.locker-dial {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ebebeb 0%, #c0c0c0 50%, #a0a0a0 100%);
  border: 1px solid #b0b0b0;
  cursor: grab;
  overflow: hidden;
  touch-action: none;
  z-index: 2;
}

.locker-dial.is-spinning {
  cursor: grabbing;
}

.locker-dial-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.locker-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-origin: center center;
}

.locker-tick::before {
  content: "";
  position: absolute;
  left: -0.5px;
  top: -56px;
  width: 1px;
  height: 6px;
  background: rgba(60, 60, 60, 0.55);
}

.locker-tick.is-major::before {
  left: -1px;
  width: 2px;
  height: 10px;
  top: -58px;
  background: #3a3a3a;
}

.locker-tick.is-number span {
  position: absolute;
  left: -8px;
  top: -50px;
  width: 16px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #2e2e2e;
}

.locker-knob {
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
}

.locker-knurl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      #b8b8b8 0deg 4deg,
      #d4d4d4 4deg 7deg,
      #a8a8a8 7deg 10deg
    );
}

.locker-knob-face {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f0f0f0 0%, #c4c4c4 50%, #a8a8a8 100%);
  display: block;
}

.locker-keyhole {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ececec 0%, #b8b8b8 50%, #8e8e8e 100%);
}

.locker-keyhole::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 5px;
  transform: translateX(-50%);
  background: #5a5a5a;
  border-radius: 0 0 1px 1px;
}

.locker-current {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: rgba(40, 40, 40, 0.85);
  pointer-events: none;
  z-index: 2;
}

.locker-knob:active {
  transform: translate(-50%, -49%);
}

.locker-slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 1.2em;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(40, 40, 40, 0.75);
  line-height: 1;
}

.pin-slot {
  display: inline-block;
  width: 0.85em;
  text-align: center;
}

.pin-slot.is-filled {
  color: rgba(20, 20, 20, 0.9);
}

.locker.is-shake {
  animation: pin-shake 0.42s ease;
}

@keyframes pin-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@media (max-width: 720px) {
  .layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 49px);
  }

  .browser {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    max-height: 40vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .column {
    max-height: 40vh;
  }

  #player {
    max-height: 38vh;
  }

  .wmp {
    width: 100%;
  }

  .wmp-vol {
    margin-left: 0;
  }

  .locker {
    width: 140px;
  }

  .locker-shell {
    width: 132px;
    height: 132px;
  }

  .locker-knob {
    width: 52px;
    height: 52px;
  }
}
