/* Adventure Time hub chrome + Echo Tent overlays */

.karnival-hub-page,
.karnival-hub-page .hub-stage {
  min-height: 100dvh;
}
.karnival-hub-page .atmosphere { z-index: 1; pointer-events: none; }
.hub-canvas-host {
  position: fixed;
  inset: 0;
  z-index: 2;
}
.hub-canvas-host canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
}
.hub-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 72px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  pointer-events: none;
}
.hub-chrome > * { pointer-events: auto; }
.hub-chrome .back,
.hub-chrome .edit-avatar,
.hub-map-btn,
.hub-stand {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(243, 217, 164, 0.55);
  background: rgba(12, 6, 8, 0.82);
  color: #f3d9a4;
  text-decoration: none;
  cursor: pointer;
}
.hub-map-btn { margin-left: auto; }
.hub-hotspots { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.hub-hotspot {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -100%);
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #f3d9a4;
  background: rgba(10, 4, 8, 0.82);
  color: #fff6dc;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.35), 0 0 16px rgba(196, 30, 58, 0.55);
}
.hub-hotspot.is-path { font-size: 1.35rem; border-radius: 50%; width: 52px; min-width: 52px; }
.hub-hotspot:hover,
.hub-hotspot:focus-visible {
  outline: none;
  color: #fff;
  box-shadow: 0 0 0 2px #f3d9a4, 0 0 22px rgba(196, 30, 58, 0.85);
}
.hub-hotspot .pulse {
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(196, 30, 58, 0.8);
  border-radius: inherit;
  animation: hub-pulse 1.4s ease-out infinite;
  pointer-events: none;
}
@keyframes hub-pulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-hotspot .pulse { animation: none; opacity: 0.65; }
}

.hub-dest-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #c41e3a;
  box-shadow: 0 0 10px #c41e3a;
  animation: dest-flicker 0.9s steps(2, end) infinite;
  pointer-events: none;
  z-index: 9;
}
@keyframes dest-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-dest-marker { animation: none; }
}

.hub-arrival,
.hub-soon,
.hub-bubble,
#hub-map,
#seance-dialog {
  position: fixed;
  z-index: 30;
  background: linear-gradient(180deg, #221018, #12080c);
  border: 1px solid #c4a35a;
  color: #f3eee4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.hub-arrival, .hub-soon {
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(440px, 92vw);
  padding: 14px 16px 16px;
}
.hub-arrival h2, .hub-soon h2, #hub-map h2, #seance-dialog h2 {
  margin: 0 0 8px;
  font-family: "New Rocker", serif;
  color: #f3d9a4;
}
.hub-arrival p, .hub-soon p { margin: 0 0 12px; font-family: "Special Elite", monospace; }
.hub-arrival[hidden], .hub-soon[hidden], .hub-bubble[hidden],
#hub-map[hidden], #seance-dialog[hidden], .hub-stand[hidden] { display: none; }
.hub-arrival .hub-actions,
.hub-soon .hub-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-arrival button, .hub-soon button, #hub-map button, #seance-dialog button, .hub-stand {
  min-height: 44px;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  background: #4a0810;
  border: 1px solid #c41e3a;
  color: #f3d9a4;
}
.hub-bubble {
  padding: 10px 14px;
  max-width: min(360px, 86vw);
  font-family: "Special Elite", monospace;
  pointer-events: none;
}
.hub-stand {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 25;
}

#hub-map {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 94vw);
  max-height: 86dvh;
  overflow: auto;
  padding: 16px 18px 20px;
}
#seance-dialog {
  left: 50%;
  top: auto;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(520px, 94vw);
  max-height: 36dvh;
  overflow: auto;
  padding: 16px 18px 20px;
}
#hub-map ul { list-style: none; margin: 0; padding: 0; }
#hub-map li { margin: 0 0 8px; }
#hub-map a, #hub-map button.hub-map-link {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  min-height: 48px;
}
#hub-map .is-unknown { color: #c4a35a; }

/* Echo TV — old-TV on-screen display */
.echo-tv-dialog, .echo-juke-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.72);
  display: grid;
  place-items: center;
  padding: 12px;
}
.echo-tv-dialog[hidden], .echo-juke-dialog[hidden], .echo-juke-mini[hidden] { display: none; }
.echo-tv-set { width: min(860px, 100%); }
.echo-tv-bezel {
  background: linear-gradient(180deg, #2a2a2a, #111);
  border: 8px solid #1a1a1a;
  border-radius: 18px 18px 28px 28px;
  padding: 18px 18px 28px;
  box-shadow: inset 0 0 0 2px #444, 0 20px 50px rgba(0, 0, 0, 0.65);
}
.echo-tv-screen {
  background: #03140c;
  border: 3px solid #0a2a18;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 255, 120, 0.08);
}
.echo-tv-osd { color: #7cff9a; font-family: "Oswald", "Trebuchet MS", sans-serif; }
.echo-tv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(124, 255, 154, 0.35);
}
#echo-tv-title {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b8ffc8;
}
.echo-tv-bar button, .echo-tv-controls button {
  min-height: 48px;
  min-width: 48px;
  padding: 8px 12px;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #042010;
  color: #9affb0;
  border: 1px solid #3cff7a;
  cursor: pointer;
}
.echo-tv-channels, .echo-tv-videos {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.echo-tv-channels[hidden],
.echo-tv-videos[hidden],
.echo-tv-player[hidden],
.echo-tv-now[hidden],
.echo-tv-back[hidden],
.echo-tv-chup[hidden],
.echo-tv-chdown[hidden],
.echo-tv-next[hidden],
.echo-tv-next-random[hidden],
.echo-tv-stop-shuffle[hidden],
.echo-tv-poster[hidden] {
  display: none !important;
}
.echo-channel, .echo-video, .echo-juke-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  border: 2px solid rgba(124, 255, 154, 0.55);
  background: rgba(0, 30, 14, 0.8);
  color: #d4ffe0;
  font-family: "Oswald", sans-serif;
}
.echo-channel-num {
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9affb0;
}
.echo-channel-sub { font-size: 0.95rem; color: #f3d9a4; letter-spacing: 0.06em; }
.echo-channel:hover, .echo-channel:focus-visible,
.echo-video:hover, .echo-video:focus-visible,
.echo-juke-card:hover, .echo-juke-card:focus-visible {
  outline: none;
  background: rgba(0, 60, 24, 0.95);
  border-color: #f3d9a4;
  color: #fff;
}
.echo-tv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 14px;
}
.echo-knob {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.echo-knob-dial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #9affb0;
  background: conic-gradient(#0a2a14, #3cff7a, #0a2a14);
  box-shadow: inset 0 0 0 3px #03140c;
}
.echo-tv-now {
  margin: 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(124, 255, 154, 0.4);
  color: #f3d9a4;
}
.echo-tv-embed { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.echo-tv-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.echo-tv-static {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(0deg, #000, #000 1px, #8f8 2px, #000 3px);
  opacity: 0.55;
  pointer-events: none;
  animation: tv-static 0.18s steps(2, end) infinite;
}
@keyframes tv-static { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .echo-tv-static { animation: none; display: none; }
}
.echo-empty { margin: 16px; color: #b8ffc8; font-family: "Special Elite", monospace; }

/* Jukebox */
.echo-juke-cabinet {
  width: min(720px, 100%);
  max-height: 94dvh;
  overflow: auto;
  background: linear-gradient(180deg, #4a0810, #1a0206 40%, #2a0a10);
  border: 6px solid #c41e3a;
  box-shadow: inset 0 0 0 3px #f3d9a4, 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #f3eee4;
  padding: 14px 16px 18px;
}
#echo-juke-title {
  margin: 0;
  font-family: "New Rocker", serif;
  color: #f3d9a4;
  letter-spacing: 0.04em;
}
.echo-juke-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.echo-juke-ticker {
  margin: 10px 0;
  padding: 8px 10px;
  background: #0a0406;
  border: 1px solid #c4a35a;
  font-family: "Special Elite", monospace;
  color: #f3d9a4;
  overflow: hidden;
  white-space: nowrap;
}
.echo-juke-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.echo-juke-card {
  background: linear-gradient(180deg, #2a0a10, #120406);
  border-color: #c41e3a;
  color: #fff4dc;
  min-height: 88px;
}
.echo-juke-card.is-current { box-shadow: 0 0 0 2px #f3d9a4; }
.echo-juke-code { font-size: 1.4rem; color: #c41e3a; letter-spacing: 0.12em; }
.echo-juke-demo, .echo-juke-ex { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #c4a35a; }
.explicit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.15em;
  height: 1.15em;
  margin-left: 6px;
  padding: 0 3px;
  border: 1px solid #c4a35a;
  border-radius: 2px;
  background: rgba(18, 8, 10, 0.85);
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  vertical-align: middle;
}
.juke-menu-option .explicit-badge,
.ktv-menu-option .explicit-badge,
.echo-video .explicit-badge,
.walkman-menu-btn .explicit-badge {
  margin-left: 8px;
}
.echo-juke-deck, .echo-juke-seek-wrap, .echo-juke-vol-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.echo-juke-deck button, .echo-juke-close, .echo-juke-mini button {
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
  background: #4a0810;
  border: 1px solid #f3d9a4;
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.echo-juke-radio[aria-pressed="true"] { background: #c41e3a; color: #fff; }
.echo-juke-seek, .echo-juke-vol { flex: 1; min-width: 120px; min-height: 32px; }
.echo-juke-mini {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 26;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(12, 4, 6, 0.92);
  border: 1px solid #c41e3a;
  color: #f3d9a4;
}
.echo-juke-mini-now { flex: 1; margin: 0; font-family: "Special Elite", monospace; }

@media (max-width: 700px) {
  .echo-tv-screen { min-height: 70dvh; }
  .echo-channel, .echo-video { min-height: 72px; }
  .echo-juke-dialog, .echo-tv-dialog { padding: 0; }
  .echo-juke-cabinet, .echo-tv-set { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .hub-chrome { right: 60px; }
}

.echo-tv-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.echo-tv-embed {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.echo-tv-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.echo-tv-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
}
.echo-tv-poster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: #000;
}
.echo-tv-poster[hidden] { display: none; }
.echo-tv-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.echo-tv-tap-play {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #9affb0;
  background: rgba(4, 32, 16, 0.82);
  color: #9affb0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(60, 255, 122, 0.45);
}
.echo-tv-watch-wrap { margin: 8px 12px 0; }
.echo-tv-watch {
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.echo-tv-watch-inline {
  display: inline-block;
  margin: -4px 12px 8px;
  min-height: 36px;
}
.echo-video-title { font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) {
  .echo-tv-scan { display: none; }
}

/* Torn-ticket confirm (shared Enter / Cancel) */
#hub-ticket-confirm {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 16px;
}
#hub-ticket-confirm[hidden] { display: none; }
.hub-ticket {
  width: min(440px, 94vw);
  background:
    linear-gradient(90deg, transparent 0 12px, #e8dcc4 12px 14px, transparent 14px 100%),
    #e8dcc4;
  color: #1a0a0c;
  padding: 22px 24px 20px;
  clip-path: polygon(
    0 8px, 6px 0, 12px 8px, 18px 0, 24px 8px, 30px 0, 36px 8px, 42px 0,
    48px 8px, 54px 0, 100% 0, 100% 100%,
    54px calc(100% - 8px), 48px 100%, 42px calc(100% - 8px), 36px 100%,
    30px calc(100% - 8px), 24px 100%, 18px calc(100% - 8px), 12px 100%,
    6px calc(100% - 8px), 0 100%
  );
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.hub-ticket h2 {
  margin: 0 0 8px;
  font-family: "New Rocker", serif;
  color: #4a0810;
}
.hub-ticket p { margin: 0 0 16px; font-family: "Special Elite", monospace; }
.hub-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-ticket-actions button {
  min-height: 48px;
  padding: 8px 16px;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid #4a0810;
}
.hub-ticket-enter { background: #8a1020; color: #f3d9a4; }
.hub-ticket-cancel { background: transparent; color: #1a0a0c; }

#balloon-picker {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 32;
  width: min(520px, 94vw);
  padding: 14px 16px;
  background: linear-gradient(180deg, #221018, #12080c);
  border: 1px solid #c4a35a;
  color: #f3eee4;
}
#balloon-picker[hidden] { display: none; }
#balloon-picker h2 { margin: 0 0 8px; font-family: "New Rocker", serif; color: #f3d9a4; }
#balloon-picker .balloon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
#balloon-picker button {
  min-height: 48px;
  cursor: pointer;
  background: #2a0a10;
  border: 1px solid #c41e3a;
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#balloon-picker button:disabled { opacity: 0.5; cursor: not-allowed; }

#seance-dialog textarea {
  width: 100%;
  min-height: 80px;
  margin: 8px 0;
  background: #0a0406;
  color: #f3eee4;
  border: 1px solid #c4a35a;
  font-family: "Special Elite", monospace;
}
#seance-dialog .seance-log {
  max-height: 180px;
  overflow: auto;
  margin: 0 0 8px;
  font-family: "Special Elite", monospace;
}


/* Hub UI root + dest marker + path pulse already defined on .hub-hotspot .pulse */
#hub-ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
#hub-ui > .hub-chrome,
#hub-ui > .hub-stand,
#hub-ui > #hub-map,
#hub-ui > #hub-ticket-confirm,
#hub-ui > #balloon-picker,
#hub-ui > #seance-dialog,
#hub-ui > .hub-dpad { pointer-events: auto; }
.hub-dest-marker { position: fixed; }
.karnival-hub-page .credit,
.karnival-hub-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hub-hotspot.is-mystery .pulse { animation: none; }
}


/* KTV — Channel 2 station bug and video dropdown (original mark, not a third-party logo) */
.echo-channel-tag {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #9affb0;
  opacity: 0.85;
}
.ktv-menu {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 12px 10px;
  background: rgba(0, 16, 8, 0.72);
  border-bottom: 1px solid rgba(154, 255, 176, 0.25);
}
.ktv-menu[hidden] { display: none !important; }
.ktv-menu-label {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f3d9a4;
  padding: 12px 4px 0;
}
.ktv-menu-btn,
.ktv-menu-option {
  min-height: 48px;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8ffc8;
  background: #03140c;
  border: 1px solid rgba(154, 255, 176, 0.45);
  cursor: pointer;
}
.ktv-menu-btn:hover,
.ktv-menu-btn:focus-visible,
.ktv-menu-option:hover,
.ktv-menu-option:focus-visible {
  outline: none;
  color: #fff;
  border-color: #f3d9a4;
  background: rgba(0, 60, 24, 0.95);
}
.ktv-menu-list {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 2px);
  z-index: 6;
  margin: 0;
  padding: 6px;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: min(320px, 50dvh);
  overflow: auto;
  background: #03140c;
  border: 1px solid #9affb0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.ktv-menu-list[hidden] { display: none !important; }
.ktv-menu-option.is-shuffle { color: #f3d9a4; }
.ktv-menu-option.is-selected { box-shadow: inset 0 0 0 2px #f3d9a4; }
.ktv-bug {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.ktv-bug[hidden] { display: none !important; }
.ktv-bug svg { display: block; }
@media (prefers-reduced-motion: reduce) {
  .ktv-bug { opacity: 1; }
}
@media (max-width: 700px) {
  .ktv-menu { grid-template-columns: 1fr; }
  .ktv-menu-label { padding-top: 0; }
  .ktv-bug svg { width: 64px; height: 32px; }
}


/* KTV / Echo TV Koins lock badges */
.ktv-menu-option,
.echo-video {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
.ktv-menu-title,
.echo-video-title { flex: 1 1 auto; }
.ktv-lock-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #c4a35a;
  background: #1a080c;
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ktv-lock-icon {
  display: inline-block;
  width: 12px;
  height: 10px;
  border: 2px solid #f3d9a4;
  border-radius: 2px;
  position: relative;
  margin-top: 4px;
}
.ktv-lock-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: -7px;
  height: 6px;
  border: 2px solid #f3d9a4;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.ktv-menu-option.is-locked,
.echo-video.is-locked { opacity: 0.95; }
.ktv-lock-signin { color: #fff6dc; }
@media (max-width: 700px) {
  .ktv-lock-badge { min-height: 32px; }
}


.hub-chrome .koin-chip {
  margin-left: auto;
  min-height: 44px;
  pointer-events: auto;
}
.koin-unlock-short {
  color: #f3d9a4;
  font-weight: 700;
}


/* Jukebox track dropdown — vintage cabinet, same pattern as KTV */
.juke-menu {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin: 10px 0 12px;
}
.juke-menu[hidden] { display: none !important; }
.juke-menu-label {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3d9a4;
  padding: 12px 4px 0;
}
.juke-menu-btn,
.juke-menu-option {
  min-height: 48px;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff4dc;
  background: #2a0a10;
  border: 1px solid #c41e3a;
  cursor: pointer;
}
.juke-menu-btn:hover,
.juke-menu-btn:focus-visible,
.juke-menu-option:hover,
.juke-menu-option:focus-visible {
  outline: none;
  color: #fff;
  border-color: #f3d9a4;
  background: #4a0810;
}
.juke-menu-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 6;
  margin: 0;
  padding: 6px;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: min(320px, 50dvh);
  overflow: auto;
  background: #1a0206;
  border: 1px solid #c4a35a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.juke-menu-list[hidden] { display: none !important; }
.juke-menu-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
.juke-menu-title { flex: 1 1 auto; }
.juke-menu-option.is-shuffle { color: #f3d9a4; }
.juke-menu-option.is-selected { box-shadow: inset 0 0 0 2px #f3d9a4; }
.echo-juke-artist {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #f3d9a4;
  opacity: 0.85;
}
.echo-juke-card.is-locked { opacity: 0.95; }
@media (max-width: 700px) {
  .juke-menu { grid-template-columns: 1fr; }
  .juke-menu-label { padding-top: 0; }
}


/* Hub: no red curtain valance over the dusk sky; keep the top buttons. */
.karnival-hub-page .curtain-valance,
.karnival-hub-page .khaos-curtain .curtain-valance {
  display: none !important;
}

/* Compact glowing markers; full labels only when .is-labeled (near, hover, or focus). */
.hub-hotspot.is-marker {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
}
.hub-hotspot.is-marker .hub-hotspot-label { display: none; }
.hub-hotspot.is-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #c41e3a;
  box-shadow: 0 0 12px #c41e3a, 0 0 0 2px rgba(243, 217, 164, 0.85);
  pointer-events: none;
}
.hub-hotspot.is-marker.is-path,
.hub-hotspot.is-marker.is-mystery.is-path {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid #f3d9a4;
  background: rgba(10, 4, 8, 0.88);
  color: #fff6dc;
  font-size: 1.15rem;
  line-height: 38px;
  text-align: center;
}
.hub-hotspot.is-marker.is-path::before { display: none; }
.hub-hotspot.is-labeled {
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #f3d9a4;
  background: rgba(10, 4, 8, 0.9);
  color: #fff6dc;
  font-size: 0.85rem;
  line-height: 1.2;
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.35), 0 0 16px rgba(196, 30, 58, 0.55);
  white-space: nowrap;
  z-index: 9;
}
.hub-hotspot.is-labeled::before { display: none; }
.hub-hotspot.is-labeled .hub-hotspot-label { display: inline; }
.hub-hotspot.is-labeled.is-path { border-radius: 4px; width: auto; height: auto; line-height: 1.2; font-size: 0.85rem; }
.hub-hotspot.is-occluded,
.hub-hotspot.is-interior-hidden { visibility: hidden !important; pointer-events: none; }

/* Séance panel sits at the bottom so the parlor (table, candles, sitters) stays in view. */
#seance-dialog {
  top: auto;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 94vw);
  max-height: 36dvh;
  overflow: auto;
}


/* Koin confirm / sign-in must stack above Echo TV and the jukebox (z-index 80). */
#koin-unlock-dialog,
#koin-signin-dialog,
.save-dialog.koin-dialog {
  z-index: 90;
}

/* Portable Walkman / car radio HUD */
.walkman-hud {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 28;
  width: min(320px, calc(100vw - 24px));
  pointer-events: auto;
  font-family: "Oswald", sans-serif;
}
.walkman-hud[hidden] { display: none !important; }
.walkman-hud.is-above-mini { bottom: 76px; }
.walkman-shell {
  position: relative;
  overflow: visible;
  padding: 14px 12px 12px;
  color: #f3eee4;
}
.walkman-hud.is-walkman .walkman-shell {
  border-radius: 16px 16px 20px 20px;
  background:
    linear-gradient(180deg, #5a181c 0%, #2a080c 40%, #140406 100%);
  border: 3px solid #c41e3a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #f3d9a4;
}
.walkman-hud.is-radio .walkman-shell {
  border-radius: 8px 8px 10px 10px;
  background:
    linear-gradient(180deg, #3a3a40 0%, #1a1a1e 45%, #0c0c10 100%);
  border: 3px solid #c4a35a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 0 0 1px #f3d9a4;
}
.walkman-ears {
  position: absolute;
  left: 10px;
  right: 10px;
  top: -11px;
  height: 14px;
  pointer-events: none;
}
.walkman-hud.is-walkman .walkman-ears::before,
.walkman-hud.is-walkman .walkman-ears::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 16px;
  border: 3px solid #f3d9a4;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 0 2px #8a1020;
  background: #2a080c;
}
.walkman-hud.is-walkman .walkman-ears::before { left: 10px; }
.walkman-hud.is-walkman .walkman-ears::after { right: 10px; }
.walkman-hud.is-radio .walkman-ears {
  top: 6px;
  height: 6px;
  left: 16px;
  right: 16px;
  background: linear-gradient(90deg, #8a8a90, #f3d9a4 40%, #8a8a90);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(243, 217, 164, 0.4);
}
.walkman-hud.is-radio .walkman-face { padding-top: 8px; }
.walkman-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.walkman-brand {
  margin: 0;
  font-family: "New Rocker", serif;
  letter-spacing: 0.1em;
  color: #f3d9a4;
  font-size: 1.15rem;
  text-shadow: 0 0 8px rgba(196, 30, 58, 0.5);
}
.walkman-hud.is-radio .walkman-brand {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f3a020;
  text-shadow: 0 0 10px rgba(243, 160, 32, 0.55);
  font-size: 1.05rem;
}
.walkman-expand,
.walkman-compact-deck button,
.walkman-deck button {
  min-height: 40px;
  padding: 6px 10px;
  cursor: pointer;
  background: #4a0810;
  border: 1px solid #f3d9a4;
  color: #f3d9a4;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.walkman-hud.is-radio .walkman-expand,
.walkman-hud.is-radio .walkman-compact-deck button,
.walkman-hud.is-radio .walkman-deck button {
  background: #1a1a1e;
  border-color: #c4a35a;
  color: #f3d9a4;
  border-radius: 2px;
}
.walkman-ticker {
  margin: 0 0 8px;
  padding: 8px 10px;
  background: #0a0406;
  border: 1px solid #c4a35a;
  font-family: "Special Elite", monospace;
  font-size: 0.82rem;
  color: #f3d9a4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-height: 2.2em;
}
.walkman-hud.is-walkman .walkman-ticker {
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #8a1020;
}
.walkman-hud.is-radio .walkman-ticker {
  background: #041208;
  border: 2px solid #f3a020;
  color: #7dff6a;
  letter-spacing: 0.05em;
  border-radius: 2px;
  box-shadow: inset 0 0 12px rgba(125, 255, 106, 0.15);
}
.walkman-compact-deck {
  display: flex;
  gap: 6px;
}
.walkman-hud.is-expanded .walkman-compact-deck { display: none; }
.walkman-compact-deck button,
.walkman-deck button { flex: 1; }
.walkman-panel { margin-top: 8px; }
.walkman-panel[hidden] { display: none !important; }
.walkman-menu {
  margin: 0 0 8px;
  grid-template-columns: 1fr;
}
.walkman-hud .juke-menu-label { padding-top: 0; }
.walkman-hud .walkman-menu-list {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  max-height: min(28vh, 220px);
  margin-top: 6px;
}
.walkman-radio[aria-pressed="true"] { background: #c41e3a; color: #fff; }
.walkman-hud.is-radio .walkman-radio[aria-pressed="true"] {
  background: #f3a020;
  color: #140806;
}
.walkman-hud .echo-juke-seek-wrap,
.walkman-hud .echo-juke-vol-wrap {
  margin-top: 8px;
  font-size: 0.75rem;
}
.walkman-seek,
.walkman-vol { flex: 1; min-width: 80px; min-height: 28px; }
@media (max-width: 700px) {
  .walkman-hud { width: min(100vw - 16px, 360px); right: 8px; bottom: 8px; }
  .walkman-compact-deck button,
  .walkman-expand,
  .walkman-deck button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .walkman-ticker { text-overflow: ellipsis; }
}

/* Khaos Kiosk merch screen (items from assets/data/merch.json) */
#khaos-kiosk { position: fixed; inset: 0; z-index: 72; display: grid; place-items: center; background: rgba(0, 0, 0, 0.66); padding: 16px; }
#khaos-kiosk[hidden] { display: none; }
.kiosk-panel { width: min(860px, 96vw); max-height: 88vh; overflow: auto; background: #1a0a0c; color: #f3e9e4; border: 2px solid #c4a35a; border-radius: 14px; padding: 18px 20px 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
.kiosk-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kiosk-panel h2 { margin: 0; font-family: "New Rocker", serif; color: #e8c86a; font-size: 1.7rem; }
.kiosk-close { min-height: 40px; padding: 6px 14px; background: #3a0a10; color: #f3e9e4; border: 1px solid #c4a35a; border-radius: 8px; font-family: "Oswald", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.kiosk-close:focus-visible, .kiosk-buy:focus-visible { outline: 3px solid #e8c86a; outline-offset: 2px; }
.kiosk-lead { margin: 6px 0 14px; opacity: 0.8; font-family: "Special Elite", monospace; font-size: 0.9rem; }
.kiosk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kiosk-card { display: flex; flex-direction: column; background: #2a0f13; border: 1px solid #5a2a30; border-radius: 12px; padding: 12px; }
.kiosk-art { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #4a1a20, #1a0a0c); color: #e8dcc4; margin-bottom: 8px; overflow: hidden; }
.kiosk-art svg { width: 62%; height: 62%; }
.kiosk-art img { width: 100%; height: 100%; object-fit: cover; }
.kiosk-card h3 { margin: 0 0 2px; font-family: "Oswald", sans-serif; letter-spacing: 0.06em; font-size: 1.05rem; }
.kiosk-card p { margin: 0 0 8px; font-size: 0.82rem; opacity: 0.75; }
.kiosk-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kiosk-soon { font-family: "Oswald", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: #1a0a0c; background: #e8c86a; padding: 3px 10px; border-radius: 99px; }
.kiosk-price { font-weight: 700; color: #e8c86a; }
.kiosk-buy { min-height: 36px; display: inline-flex; align-items: center; padding: 4px 16px; border-radius: 8px; background: #8a1020; color: #fff; text-decoration: none; font-family: "Oswald", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; }
.kiosk-loading { opacity: 0.75; }


/* On-screen arrow keys (touch / coarse pointer only). Bottom right, nudged
   up if the Walkman or jukebox mini-bar is already occupying that corner. */
.hub-dpad {
  display: none;
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 22;
  width: 160px;
  height: 160px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  grid-template-columns: 52px 52px 52px;
  grid-template-rows: 52px 52px 52px;
  gap: 4px;
  justify-content: center;
  align-content: center;
  pointer-events: auto;
}
.hub-dpad-btn {
  box-sizing: border-box;
  width: 52px;
  height: 52px;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(243, 217, 164, 0.55);
  border-radius: 8px;
  background: rgba(12, 6, 8, 0.62);
  color: #f3d9a4;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(196, 30, 58, 0.28), 0 6px 16px rgba(0, 0, 0, 0.4);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  pointer-events: auto;
}
.hub-dpad-btn:active,
.hub-dpad-btn.is-held {
  background: rgba(74, 8, 16, 0.82);
  color: #fff6dc;
  box-shadow: 0 0 0 1px #c41e3a, 0 0 14px rgba(196, 30, 58, 0.45);
}
.hub-dpad-up { grid-column: 2; grid-row: 1; }
.hub-dpad-left { grid-column: 1; grid-row: 2; }
.hub-dpad-right { grid-column: 3; grid-row: 2; }
.hub-dpad-down { grid-column: 2; grid-row: 3; }

@media (hover: none), (pointer: coarse) {
  .hub-dpad { display: grid; }
  /* Camera switch is bottom-left and grows wide on a phone; sit just above it. */
  .hub-dpad { bottom: 62px; }
  body:has(.hub-stand:not([hidden])) .hub-dpad { bottom: 86px; }
  body:has(.walkman-hud:not([hidden])) .hub-dpad { bottom: 160px; }
  body:has(.walkman-hud:not([hidden]).is-expanded) .hub-dpad { bottom: 260px; }
  body:has(#echo-juke-mini:not([hidden])) .hub-dpad { bottom: 92px; }
  body:has(.walkman-hud:not([hidden])):has(#echo-juke-mini:not([hidden])) .hub-dpad {
    bottom: 230px;
  }
}

@media (hover: none) and (max-width: 700px), (pointer: coarse) and (max-width: 700px) {
  .hub-dpad { right: 8px; bottom: 62px; }
  body:has(.hub-stand:not([hidden])) .hub-dpad { bottom: 86px; }
  body:has(.walkman-hud:not([hidden])) .hub-dpad { bottom: 160px; }
  body:has(.walkman-hud:not([hidden]).is-expanded) .hub-dpad { bottom: 260px; }
  body:has(#echo-juke-mini:not([hidden])) .hub-dpad { bottom: 92px; }
  body:has(.walkman-hud:not([hidden])):has(#echo-juke-mini:not([hidden])) .hub-dpad {
    bottom: 230px;
  }
}
