:root {
  --bg: #09111f;
  --bg-2: #0a1326;
  --panel: #d7d7ce;
  --panel-edge-light: #ffffff;
  --panel-edge-dark: #555;
  --panel-edge-mid: #8f8f8f;
  --text: #09111f;
  --cyan: #16d5ff;
  --blue: #0d57ff;
  --pink: #ff3cc7;
  --yellow: #ffe66b;
  --green: #40ff8f;
  --red: #ff5872;
  --muted: #233753;
  --panel-fill: rgba(228, 232, 239, 0.92);
  --crt-glow: 0 0 8px rgba(22, 213, 255, 0.45), 0 0 18px rgba(255, 60, 199, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  font-family: "Verdana", "Tahoma", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 60, 199, 0.28), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(22, 213, 255, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(8, 20, 40, 0.92), rgba(6, 13, 28, 0.96)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 6px),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 96px),
    linear-gradient(180deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 96px);
  opacity: 0.08;
}

.wrap {
  width: min(1220px, calc(100% - 24px));
  margin: 0 auto;
}

.top-strip {
  background: linear-gradient(180deg, #001026, #07224e);
  border-bottom: 2px solid #87d6ff;
  color: #d8ffff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.28);
}

.top-strip-inner {
  min-height: 34px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  overflow: auto;
  white-space: nowrap;
}

.blink {
  animation: blink 1.1s steps(1) infinite;
  color: #7eff7e;
  font-weight: 700;
}

.portal-window {
  background: var(--panel);
  border-top: 2px solid var(--panel-edge-light);
  border-left: 2px solid var(--panel-edge-light);
  border-right: 2px solid var(--panel-edge-dark);
  border-bottom: 2px solid var(--panel-edge-dark);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.35), var(--crt-glow);
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 6px 10px;
  background: linear-gradient(90deg, #073dff 0%, #1ea3ff 45%, #ff3cc7 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.35);
}

.window-body {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.12) 22%, transparent 22%),
    linear-gradient(180deg, rgba(245,247,250,0.98), rgba(214,220,229,0.96));
}

.title-buttons {
  display: inline-flex;
  gap: 6px;
}

.title-buttons span {
  width: 16px;
  height: 16px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #454545;
  border-bottom: 2px solid #454545;
  background: #d9d9d9;
}

.hero-window {
  margin-top: 16px;
}

.hero-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.hero-body > *,
.hero-main,
.panel,
.window-body,
.panel-head > * {
  min-width: 0;
}

.hero-side {
  display: grid;
  gap: 10px;
}

.sticker,
.counter-box,
.pixel-badge,
.mode-chip,
.status-pill,
.tag {
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #575757;
  border-bottom: 2px solid #575757;
}

.sticker {
  background: linear-gradient(180deg, #fff58d, #ffc64d);
  color: #6b1600;
  padding: 10px 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.counter-box {
  background: #0b1020;
  color: #83f0ff;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.counter-box strong {
  font-size: 11px;
  text-transform: uppercase;
  color: #ffe66b;
  letter-spacing: 1px;
}

.counter-box span {
  font-family: "Courier New", monospace;
  font-size: 24px;
  color: #7effc5;
  text-shadow: 0 0 8px rgba(126,255,197,0.45);
}

.counter-box.mini span {
  font-size: 15px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 6px;
  color: #9e2f7a;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 0.92;
  color: #04246f;
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(255, 60, 199, 0.3);
}

h2 {
  margin-bottom: 4px;
  font-size: 1rem;
  color: #062560;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h3 {
  margin-bottom: 5px;
}

.hero-copy,
.subcopy,
.panel-intro p,
.location-notes,
.item-description,
.item-meta {
  color: var(--muted);
  line-height: 1.45;
}

.marquee-wrap {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 16px 0 14px;
  background: #040b1d;
  color: #8dffdf;
  padding: 9px 0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #505050;
  border-bottom: 2px solid #505050;
}

.marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  padding-left: 100%;
  animation: marquee 20s linear infinite;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.link-bar,
.form-actions,
.card-actions,
.toolbar,
.tags,
.stamp-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 0 22px;
}

.panel-list-wide { grid-column: 1 / -1; }

.panel-intro {
  margin-bottom: 14px;
  display: grid;
  gap: 8px;
}

.pixel-badge,
.mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  background: linear-gradient(180deg, #fff8a9, #ffcf49);
  color: #7c2600;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mode-chip {
  background: linear-gradient(180deg, #eef2f9, #bcc5d2);
  color: #10203b;
}

.mode-chip.alt {
  background: linear-gradient(180deg, #ffc0f2, #ff80da);
  color: #5f0743;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #153260;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  color: #05101c;
  background: #fff;
  border-top: 2px solid #707070;
  border-left: 2px solid #707070;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  background: #ffffea;
  box-shadow: 0 0 0 2px rgba(13,87,255,0.18);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.full { grid-column: 1 / -1; }

.btn {
  cursor: pointer;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f3f6fb, #b7c0cc);
  color: #0e2140;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.16);
}

.btn:hover {
  filter: brightness(1.04);
}

.btn:active {
  transform: translate(1px, 1px);
  border-top-color: #666;
  border-left-color: #666;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: none;
}

.btn.ghost {
  background: linear-gradient(180deg, #ffd5f6, #ff99e2);
  color: #5b0a48;
}

.btn.danger {
  background: linear-gradient(180deg, #ffafbc, #ff6f89);
  color: #651124;
}

.btn.small {
  padding: 8px 11px;
  font-size: 11px;
}

.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list {
  display: grid;
  gap: 12px;
}

.card {
  background: linear-gradient(180deg, #fafbfd, #dbe2ec);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #6c6c6c;
  border-bottom: 2px solid #6c6c6c;
  padding: 12px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.12);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.item-title,
.location-title {
  color: #052c89;
  font-size: 1rem;
  text-transform: uppercase;
}

.item-description {
  margin: 10px 0;
  white-space: pre-wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #eaf3ff, #bcd7ff);
  color: #08367b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.available { background: linear-gradient(180deg, #dfffe7, #86ffb5); color: #055f31; }
.status-pill.using { background: linear-gradient(180deg, #def6ff, #93e9ff); color: #005570; }
.status-pill.repair { background: linear-gradient(180deg, #fff1d9, #ffbf66); color: #814200; }
.status-pill.sold { background: linear-gradient(180deg, #f3deff, #d39fff); color: #5d1d88; }
.status-pill.reserved { background: linear-gradient(180deg, #fff8cf, #ffe678); color: #7a5a00; }

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  background: linear-gradient(180deg, #eef8ff, #cae1ff);
  color: #0b3d87;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
}

.empty {
  padding: 20px;
  text-align: center;
  background: #fff9de;
  color: #6e4e00;
  border: 2px dashed #a38935;
  font-weight: 700;
}

.footer-bar {
  margin-bottom: 20px;
}

.footer-body {
  display: grid;
  gap: 10px;
}

.stamp-row {
  font-size: 11px;
  text-transform: uppercase;
  color: #0f2d5b;
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 14px;
  right: 14px;
  max-width: min(360px, calc(100% - 28px));
  background: #0a1223;
  color: #dfffff;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #4f4f4f;
  border-bottom: 2px solid #4f4f4f;
  padding: 10px 12px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.3), 0 0 10px rgba(22,213,255,0.25);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.scanlines,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.scanlines {
  background: linear-gradient(rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.08) 50%);
  background-size: 100% 4px;
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

.noise {
  background-image: radial-gradient(rgba(255,255,255,0.07) 0.7px, transparent 0.7px);
  background-size: 5px 5px;
  opacity: 0.05;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}

@media (max-width: 980px) {
  .hero-body,
  .layout {
    grid-template-columns: 1fr;
  }

  .panel-list-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(1220px, calc(100% - 14px));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: auto;
  }

  .panel-head,
  .card-top,
  .toolbar,
  .top-strip-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .toolbar input,
  .toolbar select,
  .file-btn {
    width: 100%;
  }

  .counter-box span {
    font-size: 20px;
  }
}
