:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #f7d9ff;
  --panel: rgba(10, 4, 16, 0.94);
  --accent: #ff00b8;
  --cyan: #14b8d8;
  --mint: #37ffb0;
  --yellow: #ffcc00;
  --field: #09020d;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: #000;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78)),
    url('../RetroGamerTeefs.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
}

.hero,
.bulk-panel,
.editor-panel,
.preview-panel {
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: 8px 8px 0 var(--cyan);
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 0, 184, 0.36), rgba(20, 184, 216, 0.24)),
    var(--panel);
}

.site-kicker {
  margin: 0 0 10px;
}

.site-kicker a {
  display: inline-block;
  padding: 8px 11px;
  background: var(--cyan);
  color: #fff;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.site-kicker a:hover {
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--cyan);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

h2,
h3 {
  margin-bottom: 0;
  color: var(--mint);
  text-transform: uppercase;
}

h2 {
  font-size: 1rem;
}

h3 {
  font-size: 0.92rem;
}

.hero-actions,
.bulk-actions,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bulk-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) 1fr minmax(210px, 0.28fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(20, 184, 216, 0.16), rgba(255, 0, 184, 0.2)),
    var(--panel);
}

.bulk-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.bulk-actions {
  align-items: stretch;
  flex-direction: column;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(340px, 0.62fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.editor-panel,
.preview-panel {
  padding: 18px;
}

.save-status,
#label-count,
label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.address-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.address-card {
  display: grid;
  gap: 14px;
  border: 3px solid #000;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 0, 184, 0.2), rgba(20, 184, 216, 0.14)),
    rgba(0, 0, 0, 0.82);
  box-shadow: 5px 5px 0 rgba(255, 0, 184, 0.78);
}

.address-card:nth-child(even) {
  box-shadow: 5px 5px 0 rgba(20, 184, 216, 0.82);
}

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

.enabled-toggle {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.enabled-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

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

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.span-2 {
  grid-column: span 2;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 3px solid #000;
  border-radius: 0;
  background: var(--field);
  color: #fff;
  outline: none;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

input {
  height: 44px;
  padding: 0 11px;
}

textarea {
  resize: vertical;
  min-height: 110px;
  padding: 12px;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: #f7d9ff;
  opacity: 0.72;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--cyan);
}

.button {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 42px;
  border: 3px solid #000;
  border-radius: 0;
  padding: 0 14px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: inherit;
}

.button.primary {
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--cyan);
}

.button.primary:hover {
  background: var(--cyan);
  box-shadow: 5px 5px 0 var(--accent);
}

.button.secondary {
  background: #050005;
  box-shadow: 5px 5px 0 var(--accent);
}

.button.secondary:hover {
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--cyan);
}

.preview-stage {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.label-preview,
.print-label {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 1.8%;
  align-items: stretch;
  justify-content: stretch;
  padding: 4%;
  background: #fff;
  color: #000;
  border: 3px solid #000;
  text-shadow: none;
}

.label-preview {
  box-shadow: 5px 5px 0 var(--yellow);
}

.address-on-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #000;
  padding: 3.4%;
  background: #fff;
}

.empty-slot {
  visibility: hidden;
}

.label-text {
  display: block;
  width: max-content;
  max-width: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  overflow: visible;
  text-shadow: none;
}

.empty-preview {
  padding: 24px;
  border: 3px dashed var(--cyan);
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.print-area {
  display: none;
}


.copied {
  background: var(--mint) !important;
  color: #000 !important;
  text-shadow: none;
}

@media (max-width: 1040px) {
  .hero,
  .bulk-panel,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding: 10px 0;
  }

  .hero,
  .bulk-panel,
  .editor-panel,
  .preview-panel {
    padding: 14px;
  }

  .bulk-actions,
  .panel-heading,
  .address-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid,
  .span-2 {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

@page {
  size: 4in 6in;
  margin: 0;
}

@media print {
  html,
  body {
    width: 4in;
    height: 6in;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #fff !important;
    color: #000 !important;
    text-shadow: none !important;
  }

  .hero,
  .bulk-panel,
  .editor-panel,
  .panel-heading,
  .print-area {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .preview-panel,
  .preview-stage {
    display: block !important;
    width: 4in !important;
    height: 6in !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .preview-panel {
    position: fixed;
    inset: 0;
  }

  .preview-stage {
    position: static;
  }

  .label-preview {
    width: 4in !important;
    height: 6in !important;
    aspect-ratio: auto;
    border: 0;
    box-shadow: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 0.055in;
    padding: 0.14in;
  }

  .address-on-label {
    border: 1px dotted #888;
    padding: 0.035in;
  }

  .empty-slot {
    visibility: hidden;
  }

  .label-text {
    font-size: 9pt;
    line-height: 1.02;
  }
}