html,
body {
  height: 100%;
  margin: 0;
  background: #0b0f14;
  color: #e7eef7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

#app {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

#topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

#title {
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 16px;
}

#subtitle {
  margin-top: 4px;
  color: #b7c7da;
  font-size: 12px;
}

#topActions {
  display: flex;
  gap: 10px;
}

button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #e7eef7;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

button:hover {
  border-color: rgba(159, 211, 255, 0.7);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#layout {
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 12px;
  padding: 12px;
  align-items: start;
}

@media (max-width: 1100px) {
  #layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
}

.panelTitle {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #cfe6ff;
  margin-bottom: 10px;
}

#statusGrid {
  display: grid;
  gap: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: baseline;
}

.k {
  color: #b7c7da;
  font-size: 12px;
}

.v {
  font-weight: 800;
}

#travelGrid {
  display: grid;
  gap: 8px;
}

.travelBtn {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
}

.travelName {
  font-weight: 800;
}

.travelDesc {
  color: #b7c7da;
  font-size: 12px;
  line-height: 1.25;
}

#travelHint {
  margin-top: 10px;
  color: #9fb0c4;
  font-size: 12px;
  line-height: 1.35;
}

#equipList {
  display: grid;
  gap: 10px;
}

.equipRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.equipName {
  font-weight: 800;
}

.equipDesc {
  color: #b7c7da;
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.25;
}

#marketNote {
  color: #b7c7da;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.35;
}

.tableWrap {
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.55);
  text-align: left;
  font-size: 12px;
  color: #b7c7da;
  letter-spacing: 0.04em;
}

.colGenre {
  width: 34%;
}
.colPrice {
  width: 16%;
}
.colOwned {
  width: 12%;
}
.colQty {
  width: 12%;
}
.colActions {
  width: 26%;
}

.genreName {
  font-weight: 900;
}

.genreTag {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cfe6ff;
  background: rgba(0, 0, 0, 0.25);
}

.muted {
  color: #b7c7da;
}

.money {
  font-weight: 900;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

input[type="number"] {
  width: 72px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: #e7eef7;
  padding: 8px 10px;
  font: inherit;
}

.rowActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.primary {
  border-color: rgba(125, 255, 183, 0.55);
}

.danger {
  border-color: rgba(255, 107, 107, 0.55);
}

#gigBox {
  display: grid;
  gap: 10px;
}

.gigTitle {
  font-weight: 900;
}

.gigReq {
  color: #b7c7da;
  font-size: 12px;
  line-height: 1.35;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
}

#invMeta {
  color: #b7c7da;
  font-size: 12px;
  margin-bottom: 10px;
}

#invList {
  display: grid;
  gap: 8px;
}

#stashMeta {
  color: #b7c7da;
  font-size: 12px;
  margin-bottom: 10px;
}

#stashList {
  display: grid;
  gap: 10px;
}

.recordCard {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.recordTitle {
  font-weight: 900;
  line-height: 1.25;
}

.recordMeta {
  color: #b7c7da;
  font-size: 12px;
  line-height: 1.35;
}

.recordActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shiny {
  border-color: rgba(255, 204, 0, 0.5);
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.18);
}

.shiny::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-22deg);
  animation: holo 2.6s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

@keyframes holo {
  0% {
    left: -120%;
    opacity: 0;
  }
  20% {
    opacity: 0.45;
  }
  55% {
    opacity: 0.25;
  }
  100% {
    left: 140%;
    opacity: 0;
  }
}

.invRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
}

.invGenre {
  font-weight: 900;
}

.invFlags {
  margin-top: 3px;
  color: #b7c7da;
  font-size: 12px;
}

#log {
  height: 260px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.logLine {
  color: #e7eef7;
  font-size: 12px;
  line-height: 1.35;
}

.logFaint {
  color: #9fb0c4;
}

#modalRoot {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  place-items: center;
  z-index: 50;
  padding: 18px;
}

#modalRoot:not(.hidden) {
  display: grid;
}

#modalCard {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #0b0f14;
  padding: 14px;
}

#modalTitle {
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

#modalBody {
  color: #b7c7da;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#modalActions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hidden {
  display: none;
}
