/* The live player (live.js). Skin pixels are drawn at a whole-ish scale
   (--s) with nearest-neighbour sampling so the sprites stay crisp. */
.amp {
  position: relative; display: flex; flex-direction: column;
  image-rendering: pixelated; image-rendering: crisp-edges;
  outline: none; max-width: 100%;
}
.amp[hidden], .amp-win[hidden], .amp-menu[hidden], .amp-credits[hidden] { display: none; }
.amp-win { position: relative; flex: none; }
.amp-main { overflow: hidden; }
.amp-abs, .amp .spr { position: absolute; }
.amp .spr {
  padding: 0; margin: 0; border: 0; cursor: pointer; background-repeat: no-repeat;
  background-color: transparent;
}
.amp .spr:active:not(:disabled) { background-position: var(--down) !important; }
.amp .spr:focus-visible, .amp-range:focus-visible + *, .amp-hot:focus-visible, .amp-css-btn:focus-visible {
  outline: 2px solid #D7A03D; outline-offset: 1px; z-index: 2;
}
.amp .amp-inert { cursor: default; }

/* volume: the sprite underneath is the picture; this is the control */
.amp-range {
  position: absolute; margin: 0; padding: 0; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.amp-range:focus-visible { opacity: 1; background: transparent; outline: 2px solid #D7A03D; }
.amp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 22px; }
.amp-thumb { pointer-events: none; }

/* 5x6 skin font */
.amp-text { display: block; overflow: hidden; position: relative; white-space: nowrap; }
.amp-text-in { display: flex; position: absolute; left: 0; top: 0; }
.amp-glyph { display: block; flex: none; background-repeat: no-repeat; }
.amp-css-text {
  display: block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700; letter-spacing: .04em; image-rendering: auto; white-space: pre;
}
.amp-marquee .amp-text-in { will-change: transform; }

.amp-css-btn {
  border: 1px solid rgba(0,0,0,.45); border-radius: 2px; padding: 0; cursor: pointer;
  font: 700 8px/1 ui-monospace, Menlo, monospace; letter-spacing: .04em;
  background: linear-gradient(#fafafc, #c4c8ce); color: #3a1a00;
}
.amp-css-btn[aria-pressed="true"] { background: linear-gradient(#ffba54, #e2760a); }

/* playlist-style frames (video + chat) */
.amp-frame { display: flex; flex-direction: column; }
.amp-row { display: flex; flex: none; }
.amp-piece { flex: none; background-repeat: no-repeat; position: relative; }
.amp-fill { flex: 1 1 0; min-width: 0; }
.amp-mid { flex: 1 1 auto; align-items: stretch; }
.amp-mid > .amp-piece { height: auto; }
.amp-body { flex: 1 1 0; min-width: 0; position: relative; background: var(--pl-bg, #000); overflow: hidden; }
.amp-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 12px/1 ui-monospace, Menlo, monospace; letter-spacing: .3em;
  color: var(--pl-normal); text-shadow: 0 1px 0 rgba(0,0,0,.35); pointer-events: none;
  image-rendering: auto;
}
.amp-screen { background: #000; display: flex; align-items: center; justify-content: center; color: #8B8578;
  font: 13px/1.4 system-ui, sans-serif; text-align: center; padding: 0; image-rendering: auto; }
.amp-mount, .amp-mount iframe { width: 100%; height: 100%; border: 0; display: block; }

.amp-rows {
  list-style: none; margin: 0; padding: 3px 0; height: 100%; box-sizing: border-box;
  overflow-y: auto; overscroll-behavior: contain;
  font-family: var(--pl-font); color: var(--pl-normal); background: var(--pl-bg);
  scrollbar-width: thin; scrollbar-color: var(--pl-normal) var(--pl-bg); image-rendering: auto;
}
.amp-rows li {
  display: flex; gap: 0; padding: 0 4px; line-height: 1.45; min-width: 0;
}
.amp-rows li:nth-child(odd) { }
.amp-rows .amp-host { color: var(--pl-current); background: var(--pl-sel); }
.amp-n { flex: none; opacity: .8; margin-right: .35em; }
.amp-who { flex: none; font-weight: 700; margin-right: .35em; }
.amp-msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.amp-at { flex: none; padding-left: .6em; opacity: .75; }
.amp-hint { opacity: .85; padding: 2px 6px !important; }
.amp-hot {
  position: absolute; display: block; overflow: hidden; color: transparent; font-size: 1px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
}
.amp-hot:hover { background: rgba(255,255,255,.18); }

/* skin menu */
.amp-menu {
  position: absolute; z-index: 5; display: flex; flex-direction: column; min-width: 150px;
  background: #15191B; border: 1px solid #333A3D; border-radius: 4px; padding: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); image-rendering: auto;
}
.amp-menu button {
  min-height: 40px; text-align: left; padding: 0 12px; border: 0; border-radius: 3px; cursor: pointer;
  background: transparent; color: #CFC8BA; font: 13px/1 ui-monospace, Menlo, monospace; letter-spacing: .08em;
}
.amp-menu button:hover, .amp-menu button:focus-visible { background: #242A2C; color: #D7A03D; outline: none; }
.amp-menu button[aria-checked="true"]::before { content: "\25CF  "; color: #D7A03D; }
.amp-menu button[aria-checked="false"]::before { content: "\25CB  "; }

.amp-credits { margin: .75rem 0 0; font: .68rem/1.6 ui-monospace, Menlo, monospace; color: var(--muted, #8B8578); max-width: 34rem; }
.live-off { font-family: var(--mono, ui-monospace, monospace); font-size: .8rem; color: var(--body, #B0AA9C);
  padding: 1rem 1.1rem; border: 1px dashed var(--rule-strong, #333A3D); border-radius: 8px; margin: 0; }
.live-off a { color: var(--accent, #D7A03D); }
.live-popped { font-family: var(--mono, monospace); font-size: .8rem; color: var(--body, #B0AA9C); }
.live-popped button {
  margin-left: .6rem; min-height: 44px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--accent, #D7A03D); background: transparent; color: var(--accent, #D7A03D);
  font: inherit; letter-spacing: .08em;
}

/* pop-out window (Document PiP and /live/pop/) */
body.amp-pop { margin: 0; background: #000; overflow-x: hidden; }
body.amp-pop .amp { margin: 0; }
body.amp-pop .amp-credits { display: none; }

.live { margin: 0 0 2.25rem; }
.live h2 { margin-bottom: .8rem; }
