.subsection {
  border: 2px solid black;
  padding: 10px;
  margin-bottom: 12px;
}

.subsection h3 {
  margin-top: 0;
}

button.entry:disabled {
  cursor: not-allowed;
}

button.entry:disabled:not(.selected) {
  opacity: 0.5;
}

button.entry.selected:disabled {
  opacity: 1;
}

body {
  font-family: "Courier New", Courier, monospace;
  background: white;
  color: black;

  margin: 0;
}

.page {
  max-width: 1200px;
  margin: 40px auto;
}
.sidebar {
  width: 320px;
}

.main-content {
  margin-left: 340px;
  max-width: 800px;
}

.sticky-panel {
  position: fixed;
  top: 20px;
  left: calc(50% - 600px + 160px); /* page center - half page + half sidebar */
  transform: translateX(-50%);
  width: 280px;

  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  box-sizing: border-box;
}

#current-setup {
  overflow-y: auto;
  min-height: 0;
  scrollbar-color: black white;
}

#current-setup::-webkit-scrollbar {
  width: 10px;
}

#current-setup::-webkit-scrollbar-track {
  background: white;
  border-left: 2px solid black;
}

#current-setup::-webkit-scrollbar-thumb {
  background: black;
}

.section {
  border: 3px solid black;
  padding: 15px;
  margin-bottom: 15px;
}

h1,
h2,
h3 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
button.entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;

  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;

  padding: 10px 12px;
  margin-bottom: 8px;

  border: 2px solid black;
  background: white;
  color: black;

  cursor: pointer;
}
button.entry:hover {
  background: #e0e0e0; /* subtle darkening */
}

button.entry:active {
  background: black;
  color: white;
}
button.entry.selected {
  background: black;
  color: white;
}

button.entry:hover {
  background: #d9d9d9;
}

button.entry.selected:hover {
  background: #222;
  color: white;
}

button.entry:active {
  background: black;
  color: white;
}
.top-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.top-controls input {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 2px solid black;
  background: white;
  color: black;
  width: 120px;
}

.top-controls button {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 2px solid black;
  background: white;
  color: black;
  cursor: pointer;
}

.top-controls button:hover {
  background: #d9d9d9;
}

.top-controls button:active {
  background: black;
  color: white;
}

.entry-text {
  flex: 1;
}

.entry-count {
  min-width: 28px;
  margin-left: 12px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  text-align: center;
  font-weight: bold;
  background: transparent;
}

.entry-count:hover {
  background: white;
  color: black;
}

button.entry.selected .entry-count:hover {
  background: white;
  color: black;
}
button.entry {
  line-height: 1.3;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

.section-error {
  animation: flash-error 0.4s ease;
}

@keyframes flash-error {
  0% {
    background: white;
  }
  50% {
    background: #ffd6d6; /* light pink */
  }
  100% {
    background: white;
  }
}

#title-text,
#options-intro,
.section-description,
.section-rules,
.entry-description,
.entry-requires {
  margin-top: 8px;
  line-height: 1.4;
}

#title-text,
#options-intro,
.section-description {
  color: #222;
}

.entry-description,
.entry-requires {
  color: inherit;
}

.section-rules {
  font-size: 0.95rem;
  color: #444;
}

.entry-requires {
  font-size: 0.95rem;
}

.entry-name {
  font-weight: bold;
}

.setup-section {
  font-weight: bold;
  margin-top: 10px;
}

.setup-item {
  margin-left: 16px;
}

.current-points {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid black;
  font-weight: bold;
}

button.entry.selected .entry-name,
button.entry.selected .entry-description,
button.entry.selected .entry-requires,
button.entry.selected .entry-count {
  color: white;
}

.top-controls button.active {
  background: black;
  color: white;
}
