:root {
  --w95: #c0c0c0;
  --navy: #000080;
  --teal: #008080;
  --white: #fff;
  --gray: #808080;
  --dark: #000;
  --lime: #78ff00;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: #000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  background:
    radial-gradient(circle at 14% 20%, rgba(255,255,255,.08), transparent 18%),
    linear-gradient(135deg, #007979, #009393 55%, #006d6d);
  padding-bottom: 43px;
}
button, a { font: inherit; }
button { color: inherit; }

.desktop { padding: 14px; min-height: calc(100vh - 43px); }
.program-window {
  width: min(1180px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  background: var(--w95);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 1px 1px 0 #000;
}
.title-bar {
  min-height: 30px;
  padding: 3px 4px 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 14px;
}
.title-left { display: flex; align-items: center; gap: 7px; }
.tiny-icon { display: grid; place-items: center; width: 18px; height: 18px; background: #fff; color: #000080; }
.window-controls { display: flex; gap: 2px; }
.window-controls span {
  width: 20px; height: 20px; display: grid; place-items: center;
  color: #000; background: var(--w95); font-weight: 700;
  border: 2px solid; border-color: #fff #404040 #404040 #fff;
}
.menu-bar { display: flex; gap: 24px; padding: 6px 10px; font-size: 13px; border-bottom: 1px solid #808080; }
.app-body { padding: 20px; }

.game-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.eyebrow { font-family: "Courier New", monospace; font-size: 12px; margin-bottom: 5px; }
h1 {
  margin: 0 0 8px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(44px, 7vw, 92px);
  letter-spacing: .01em;
  line-height: .92;
}
.game-head p { max-width: 720px; margin: 0; font-size: 15px; line-height: 1.4; }
.round-box {
  min-width: 130px;
  padding: 10px 12px;
  text-align: center;
  background: #000;
  color: var(--lime);
  font-family: "Courier New", monospace;
  border: 3px inset #e7e7e7;
}
.round-box span { display: block; font-size: 11px; }
.round-box strong { font-size: 26px; }

.workspace { display: grid; grid-template-columns: .95fr 1.45fr; gap: 16px; align-items: start; }
.left-column, .right-column { display: grid; gap: 16px; }
.panel {
  background: var(--w95);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
}
.panel-title {
  padding: 5px 7px;
  color: #fff;
  background: #000080;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.constraints-panel, .lineup-panel, .candidate-panel, .result-panel { padding-bottom: 8px; }
.constraints-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px; }
.constraint-box {
  padding: 10px;
  background: #e8e8e8;
  border: 2px inset #fff;
}
.constraint-box label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; }
.constraint-value {
  min-height: 52px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 7px;
  background: #000;
  color: var(--lime);
  font-family: "Courier New", monospace;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
  border: 2px inset #ddd;
}
.system-strip {
  margin: 0 10px 4px;
  padding: 6px 8px;
  background: #ffffe2;
  border: 1px solid #777;
  font-size: 11px;
  min-height: 28px;
}

.win-button, .start-button, .task-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--w95);
  color: #000;
  text-decoration: none;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: none;
  cursor: pointer;
}
.win-button { min-height: 34px; padding: 6px 12px; font-weight: 700; }
.win-button.small { min-height: 29px; padding: 4px 8px; font-size: 11px; }
.win-button:active, .start-button:active, .task-item:active { border-color: #404040 #fff #fff #404040; }
.win-button:disabled { color: #777; text-shadow: 1px 1px #fff; cursor: not-allowed; }

.lineup { display: grid; gap: 7px; padding: 10px; }
.lineup-slot {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 6px 8px;
  background: #e8e8e8;
  border: 2px inset #fff;
}
.slot-name { font-size: 11px; font-weight: 700; }
.slot-artist { font-family: "Courier New", monospace; font-weight: 700; }
.slot-era { color: #555; font-size: 10px; }
.empty-copy { color: #777; font-family: "Courier New", monospace; }

.subline { padding: 10px 12px 4px; font-size: 12px; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 8px 10px 12px; }
.candidate-card {
  position: relative;
  min-height: 145px;
  padding: 12px;
  text-align: left;
  background: #e7e7e7;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}
.candidate-card:hover { background: #d8d8d8; }
.candidate-card:active { border-color: #404040 #fff #fff #404040; }
.artist-index { position: absolute; right: 8px; top: 7px; color: #777; font-size: 11px; }
.artist-name { display: block; margin-right: 30px; font-family: Impact, "Arial Black", sans-serif; font-size: 28px; line-height: 1; }
.artist-meta { display: block; margin: 9px 0; font-family: "Courier New", monospace; font-size: 11px; }
.role-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.role-tag { padding: 2px 5px; background: #000080; color: #fff; font-size: 9px; }

.role-chooser { padding: 14px; }
.chooser-copy { margin-bottom: 12px; padding: 10px; background: #fff; border: 2px inset #fff; }
.chooser-copy span { display: block; font-size: 10px; }
.chooser-copy strong { font-family: "Courier New", monospace; font-size: 22px; }
.role-buttons { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }

.result-screen { margin: 10px; padding: 14px; min-height: 420px; background: #000; color: var(--lime); border: 3px inset #ddd; font-family: "Courier New", monospace; }
.loading-lines { display: grid; gap: 7px; font-size: 13px; }
.final-result { text-align: center; }
.result-label { font-size: 12px; }
.ticket-number { margin-top: 4px; font-size: clamp(60px, 10vw, 118px); line-height: .9; font-weight: 700; }
.ticket-word { font-size: 22px; letter-spacing: .25em; }
.venue-tier { margin: 14px auto 22px; width: fit-content; padding: 5px 10px; background: var(--lime); color: #000; font-weight: 700; }
.band-name-label { margin-top: 4px; font-size: 10px; color: #baff84; }
.band-name { margin: 4px 0 15px; color: #fff; font-size: clamp(24px, 4vw, 42px); font-weight: 700; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 15px 0; }
.score-cell { padding: 7px 5px; border: 1px solid #39a800; }
.score-cell span { display: block; color: #a8ff8e; font-size: 9px; }
.score-cell strong { color: #fff; font-size: 18px; }
.disclaimer { margin: 14px auto; max-width: 520px; color: #c8c8c8; font-family: Tahoma, sans-serif; font-size: 10px; line-height: 1.4; }
.result-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.hidden { display: none !important; }

.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  height: 43px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: var(--w95);
  border-top: 2px solid #fff;
}
.start-button { height: 33px; padding: 0 10px; font-weight: 700; }
.start-mark { margin-right: 5px; }
.task-item { height: 33px; width: 170px; padding: 0 9px; justify-content: flex-start; font-size: 12px; }
.task-item.active { border-color: #404040 #fff #fff #404040; background: #d4d4d4; font-weight: 700; }
.tray { margin-left: auto; height: 33px; display: flex; align-items: center; gap: 10px; padding: 0 9px; border: 2px inset #fff; font-size: 11px; }

@media (max-width: 780px) {
  .desktop { padding: 6px; }
  .app-body { padding: 11px; }
  .game-head { display: block; }
  .round-box { width: 130px; margin-top: 12px; }
  .workspace { grid-template-columns: 1fr; }
  .candidate-grid { grid-template-columns: 1fr; }
  .constraints-grid { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2,1fr); }
  .task-item { width: auto; max-width: 125px; }
  .task-item:nth-of-type(2) { display: none; }
}
