* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ffffff;
  color: #ccc;
  font-family: monospace;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

#bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #0c0c0c;
  border-bottom: 1px solid #181818;
  flex-wrap: wrap;
  flex-shrink: 0;
}

#bar .tag {
  font-size: 10px;
  color: #ff3366;
  font-weight: bold;
  margin-right: 2px;
}

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  cursor: crosshair;
}

#glitch-canvas,
#overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#glitch-canvas {
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

#overlay-canvas {
  z-index: 1;
}

#panel {
  width: 248px;
  background: #0c0c0c;
  border-left: 1px solid #181818;
  padding: 8px;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

.sec {
  border-bottom: 1px solid #161616;
  padding-bottom: 6px;
}

.stit {
  font-size: 9px;
  color: #303030;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.ctrl {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 2px;
}

label {
  font-size: 11px;
  color: #555;
  display: block;
}

.val {
  color: #ff3366;
  float: right;
}

input[type="range"] {
  width: 100%;
  accent-color: #ff3366;
  cursor: pointer;
}

input[type="color"] {
  width: 28px;
  height: 18px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

input[type="file"] {
  display: none;
}

input[type="checkbox"] {
  accent-color: #ff3366;
  cursor: pointer;
  background-color: white;
}

.row {
  display: flex;
  align-items: center;
  gap: 6px;
}

button {
  padding: 3px 8px;
  background: #111;
  border: 1px solid #222;
  color: #888;
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  border-radius: 2px;
  white-space: nowrap;
}

button:hover {
  border-color: #ff3366;
  color: #fff;
  background: #1a1a1a;
}

button.active {
  background: #ff3366;
  border-color: #ff3366;
  color: #fff;
}

button.gold {
  border-color: #ffcc00;
  color: #ffcc00;
}

button.gold:hover {
  background: #ffcc00;
  color: #000;
}

button.wide {
  width: 100%;
  margin-top: 2px;
}

.sep {
  width: 1px;
  height: 14px;
  background: #1c1c1c;
}

.img-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.img-thumb {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: 1px solid #222;
  background: #111;
  flex-shrink: 0;
}

.img-name {
  font-size: 9px;
  color: #444;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

#hud {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 10px;
  color: #1e1e1e;
  z-index: 5;
  pointer-events: none;
  line-height: 1.8;
}

#chaos-bar {
  height: 2px;
  background: #ff3366;
  width: 0%;
  margin-top: 3px;
  transition: width 0.08s;
}

#xfade-bar {
  height: 2px;
  background: #33ccff;
  width: 0%;
  margin-top: 2px;
  transition: none;
}

#hud,
#panel {
  display: none !important;
}

.window-modal {
  position: absolute;
  width: 100%;
  /*max-width: 396px;*/
  max-width: 489px;
  user-select: none;
  background: #fff3e3;
  border: 4px solid var(--modal-col, #000);
  border-radius: 12px;
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.1);
  /*box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);*/
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window-modal * {
  font-family: "fantabular-mvb", mono, monospace;
  color: var(--modal-col, #000);

  box-sizing: border-box;
}

.window-modal .cf-header {
  background: var(--modal-col, #000);
  color: #fff3e3;
  padding: 5px;
  display: flex;
  justify-content: flex-end;
  cursor: grab;
}

.cf-header:active {
  cursor: grabbing;
}

.close {
  cursor: pointer;
  padding: 0 5px;
  font-weight: bold;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #fff3e3;
  font-style: italic;
  line-height: 1;
}

.cf-body {
  padding: 8px 16px 16px;
}

.cf-img img {
  width: 100%;
  height: auto;
  display: block;
}

.cf-title {
  font-weight: 700;
  font-style: italic;
  font-size: 32px;
  line-height: 100%;
  text-transform: uppercase;
  text-align: left;
  margin-bottom: 8px;
  letter-spacing: 0;
}
.window-modal .cf-divider {
  height: 3px;
  background: var(--modal-col, #000);
  margin-bottom: 8px;
}

.cf-hero {
  font-weight: 500;
  font-size: 10px;
  line-height: 140%;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-align: left;
}

.cf-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 6px;
}

.cf-label {
  width: 70px;
  text-align: left;
  font-weight: 500;
  font-style: italic;
  font-size: 10px;
  line-height: 140%;
  text-transform: none;
  text-align: right;
}

.window-modal .cf-input {
  flex: 1;
  border: 2px solid var(--modal-col, #000);
  border-radius: 8px;
  background: transparent;
  background: white;
  padding: 6px 10px;
  font-weight: 500;
  font-size: 10px;
  line-height: 140%;
  outline: none;
  text-transform: none;
}

.window-modal .cf-input::placeholder {
  color: var(--modal-col, #000);
  opacity: 0.8;
}

.cf-select {
  cursor: pointer;
  appearance: none;
  background: url('data:image/svg+xml;utf8,<svg fill="%23FF0000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>')
    no-repeat right 5px center;
  background-color: white;
}

.cf-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 12px;
  padding-left: 10px;
}

.cf-check-text {
  font-weight: 500;
  font-size: 10px;
  line-height: 140%;
}

.window-modal .cf-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--modal-col, #000);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.window-modal .cf-checkbox:checked::after {
  content: "✔";
  position: absolute;
  top: -3px;
  left: 2px;
  font-size: 14px;
  color: var(--modal-col, #000);
  font-family: sans-serif;
}

.cf-submit-container {
  text-align: right;
  margin-right: 15px;
}

.window-modal .cf-submit {
  background: #fff3e3;
  border: 2px solid var(--modal-col, #000);
  border-radius: 8px;
  padding: 6px 20px;
  font-weight: 500;
  font-style: italic;
  font-size: 14px;
  line-height: 140%;
  box-shadow: 4px 4px 0 var(--modal-col, #000);
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.window-modal .cf-submit:active {
  box-shadow: 0px 0px 0 var (--modal-col, #000);
  transform: translate(4px, 4px);
}

ul.icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 11;
}

ul.icons li {
  list-style: none;
  width: 80px;
  height: 94px;
}

ul.icons li img {
  width: 100%;
  height: 100%;
}

#tour-dates-list {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
}

.tour-row {
  display: flex;
  flex-direction: row;
  padding: 12px 0;
  gap: 12px;
  font-family: inherit; /* Use your Adobe Typekit font */
}

.tour-date {
  /*width: 80px;*/
  /*font-weight: bold;*/
  font-size: 10px;
}

.tour-info {
  flex-grow: 1;
}

.tour-city {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.tour-venue {
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
}

.tour-btn {
  background: #fff3e3;
  border: 2px solid var(--modal-col, #000);
  border-radius: 8px;
  padding: 6px 20px;
  font-weight: 500;
  font-style: italic;
  font-size: 14px;
  line-height: 140%;
  box-shadow: 4px 4px 0 var(--modal-col, #000);
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-decoration: none;
  display: inline-block;
}

.tour-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--modal-col);
}

footer {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 4px;
}

footer a {
  text-decoration: none;
  color: #d0d0d0;
  font-size: 10px;
  font-weight: 500;
}

@media (max-width: 480px) {
  .window-modal {
    max-width: 310px;
  }
  ul.icons {
    top: 10px;
    left: 10px;
    gap: 10px;
  }
  .cf-title {
    font-size: 28px;
    margin-bottom: 6px;
  }
  .tour-row {
    flex-direction: column;
    /*gap: 16px;*/
    gap: 8px;
  }
}
