:root {
  --bg: #07111f;
  --panel: rgba(10, 22, 40, 0.78);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: #9eb0cb;
  --accent: #61c7ff;
  --accent-strong: #0f7ddf;
  --warm: #f5c76b;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --input-bg: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(65, 121, 255, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(84, 209, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #030914 0%, #09192e 42%, #06101b 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.28;
  pointer-events: none;
}

body::before {
  top: -120px;
  left: -90px;
  background: #2b8cff;
}

body::after {
  right: -120px;
  bottom: -120px;
  background: #e4b54b;
}

.page-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 20px auto;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.hero-panel,
.builder-card,
.preview-shell {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: sticky;
  top: 20px;
  padding: 28px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(245, 199, 107, 0.35), transparent 65%);
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: #d8e6ff;
}

.hero-panel h1,
.builder-card h2,
.preview-shell h2,
.panel-block h3 {
  margin: 14px 0 10px;
  font-family: "Sora", sans-serif;
  line-height: 1.15;
}

.hero-panel h1 {
  font-size: 2.3rem;
}

.hero-copy {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-points {
  display: grid;
  gap: 14px;
}

.point-card {
  position: relative;
  padding: 18px 18px 18px 58px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.point-card span {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #08203e;
  background: linear-gradient(135deg, #f5d17f, #fff3cd);
}

.point-card strong {
  display: block;
  font-size: 1rem;
}

.point-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.workspace {
  display: grid;
  gap: 22px;
}

.builder-card,
.preview-shell {
  padding: 26px;
  border-radius: var(--radius-xl);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3 {
  font-size: clamp(1.4rem, 1.9vw, 2rem);
}

.section-heading p {
  margin: 0;
}

.preview-note,
.csv-meta,
.upload-hint {
  color: var(--muted);
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 22px;
}

.mode-pill,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mode-pill {
  background: transparent;
  color: #dce8fd;
}

.mode-pill.active {
  color: #08162f;
  background: linear-gradient(135deg, #89d4ff, #f9d58d);
  box-shadow: 0 10px 22px rgba(137, 212, 255, 0.25);
}

.primary-button {
  color: #051224;
  background: linear-gradient(135deg, #89d4ff, #f6d17e);
  box-shadow: 0 14px 30px rgba(102, 164, 255, 0.18);
}

.ghost-button {
  color: #f7f9fd;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-pill:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

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

.field {
  grid-column: span 4;
  display: grid;
  gap: 8px;
}

.field.field-wide {
  grid-column: span 8;
}

.field span,
.csv-columns h4 {
  font-size: 0.9rem;
  color: #d6e3fb;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--input-bg);
  color: #fff;
  font: inherit;
}

input::placeholder {
  color: #8da0bd;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(137, 212, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(137, 212, 255, 0.14);
}

input[type="file"] {
  padding: 13px;
}

.panel-block {
  margin-top: 24px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.panel-block.hidden {
  display: none;
}

.field.hidden {
  display: none;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-card,
.csv-columns {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.csv-columns {
  margin-top: 16px;
}

.csv-columns p {
  margin: 12px 0 0;
  line-height: 1.8;
  color: var(--muted);
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f7ff;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.id-card-wrap {
  display: flex;
  justify-content: center;
}

.id-card-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 290px));
  gap: 22px;
  justify-content: center;
}

.id-card {
  --card-surface: linear-gradient(180deg, #fbfbfb 0%, #f1f1f1 58%, #e5e5e5 100%);
  --card-header: linear-gradient(135deg, #111111 0%, #1b1b1b 62%, #2d2d2d 100%);
  --card-accent-soft: rgba(212, 175, 55, 0.1);
  --card-text: #141414;
  --card-muted: #666666;
  --card-line: rgba(0, 0, 0, 0.1);
  --card-chip-bg: rgba(255, 255, 255, 0.08);
  --card-chip-text: #f7f7f7;
  --photo-radius: 16px;
  --bottom-bg: linear-gradient(135deg, #121212, #252525);
  width: min(290px, 100%);
  aspect-ratio: 54 / 85.6;
  border-radius: 24px;
  padding: 10px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(228, 228, 228, 0.98)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(190, 190, 190, 0.24));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.card-shell {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card-surface);
}

.card-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 122px;
  background: var(--card-header);
}

.card-shell::after {
  content: "";
  position: absolute;
  top: 0;
  right: -36px;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, transparent 36%, rgba(212, 175, 55, 0.95) 36%, rgba(212, 175, 55, 0.95) 40%, transparent 40%);
  transform: rotate(3deg);
}

.card-orb {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(6px);
}

.card-orb-one {
  right: -22px;
  top: 94px;
  width: 132px;
  height: 132px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 72%);
}

.card-orb-two {
  left: auto;
  right: -12px;
  bottom: 28px;
  width: 126px;
  height: 126px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08), transparent 72%);
}

.card-body {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  min-height: 82px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: #fff;
  flex: 1;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.98);
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  overflow-wrap: break-word;
  word-break: normal;
}

.brand-copy span {
  margin-top: 6px;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  overflow-wrap: break-word;
}

.type-chip {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-chip-text);
  background: var(--card-chip-bg);
  border: 1px solid rgba(212, 175, 55, 0.5);
  backdrop-filter: blur(8px);
  text-align: center;
}

.identity-panel {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 134px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 239, 239, 0.74));
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.photo-ring {
  width: 94px;
  height: 112px;
  border-radius: var(--photo-radius);
  padding: 5px;
  background: linear-gradient(145deg, #0e0e0e, #2a2a2a);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
  align-self: center;
}

.photo-ring img,
.photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--photo-radius) - 4px);
}

.photo-ring img {
  object-fit: cover;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #d4af37;
  background: linear-gradient(135deg, #111111, #2a2a2a);
}

.identity-copy {
  padding: 4px 2px 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  align-items: flex-start;
  align-self: center;
}

.identity-label {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.42);
}

.person-name {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
  line-height: 1.12;
  color: var(--card-text);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-wrap: balance;
}

.person-primary,
.person-secondary,
.person-contact {
  max-width: 100%;
}

.person-primary {
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--card-text);
  overflow-wrap: break-word;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.2;
}

.person-secondary {
  margin-top: 5px;
  font-size: 0.72rem;
  color: var(--card-muted);
  overflow-wrap: break-word;
  line-height: 1.25;
}

.person-contact {
  margin-top: 8px;
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #202020;
  background: linear-gradient(180deg, rgba(244, 244, 244, 0.95), rgba(222, 222, 222, 0.92));
  border: 1px solid rgba(192, 192, 192, 0.9);
  overflow-wrap: anywhere;
}

.detail-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.64rem;
  color: var(--card-muted);
  align-content: start;
  margin-top: 0;
  grid-auto-rows: 1fr;
}

.detail-stack::after {
  content: "";
  border-radius: 16px;
  background: transparent;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: none;
  justify-content: center;
}

.detail-row span:first-child {
  font-weight: 800;
  color: #232323;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.5rem;
}

.detail-row span:last-child {
  line-height: 1.28;
  overflow-wrap: break-word;
  color: #3e3e3e;
}

.bottom-badge {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 12px;
  border-radius: 18px;
  background: var(--bottom-bg);
  color: #f8f8f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.18);
  text-align: center;
}

.card-id {
  font-family: "Sora", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.bottom-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.54rem;
  opacity: 0.94;
}

.bottom-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-note {
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  opacity: 0.8;
}

.id-card-back .card-shell::after {
  top: auto;
  bottom: -18px;
  right: -26px;
  width: 170px;
  height: 170px;
  transform: rotate(0deg);
}

.back-card-body {
  justify-content: flex-start;
  gap: 16px;
}

.back-header {
  min-height: 88px;
  display: flex;
  align-items: flex-start;
}

.back-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #ffffff;
}

.back-brand-copy {
  min-width: 0;
}

.back-brand-copy strong,
.back-brand-copy span {
  display: block;
}

.back-brand-copy strong {
  font-family: "Sora", sans-serif;
  font-size: 0.98rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.back-brand-copy span {
  margin-top: 4px;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.back-panel {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.98), rgba(238, 238, 238, 0.95));
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
  width: 100%;
}

.back-label {
  margin-bottom: 7px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #262626;
}

.back-panel p {
  margin: 0;
  font-size: 0.67rem;
  line-height: 1.5;
  color: #575757;
  overflow-wrap: anywhere;
}

.back-panel p + p {
  margin-top: 4px;
}

.back-badge {
  margin-top: auto;
  justify-items: center;
}

.id-card.school {
  --card-surface: linear-gradient(180deg, #fcfcfc 0%, #f0f0f0 60%, #e4e4e4 100%);
  --card-header: linear-gradient(135deg, #111111 0%, #1a1a1a 62%, #303030 100%);
  --card-accent-soft: rgba(212, 175, 55, 0.08);
  --card-text: #141414;
  --card-muted: #666666;
  --card-line: rgba(0, 0, 0, 0.1);
  --card-chip-bg: rgba(255, 255, 255, 0.08);
  --bottom-bg: linear-gradient(135deg, #111111, #252525);
}

.id-card.college {
  --card-surface: linear-gradient(180deg, #fbfbfb 0%, #efefef 58%, #e3e3e3 100%);
  --card-header: linear-gradient(135deg, #151515 0%, #222222 62%, #373737 100%);
  --card-accent-soft: rgba(192, 192, 192, 0.14);
  --card-text: #151515;
  --card-muted: #686868;
  --card-line: rgba(0, 0, 0, 0.1);
  --photo-radius: 14px;
  --card-chip-bg: rgba(255, 255, 255, 0.08);
  --bottom-bg: linear-gradient(135deg, #141414, #2b2b2b);
}

.id-card.employee {
  --card-surface: linear-gradient(180deg, #f9f9f9 0%, #eeeeee 58%, #e2e2e2 100%);
  --card-header: linear-gradient(135deg, #0c0c0c, #1d1d1d 64%, #4a4a4a 100%);
  --card-accent-soft: rgba(212, 175, 55, 0.12);
  --card-text: #121212;
  --card-muted: #656565;
  --card-line: rgba(0, 0, 0, 0.12);
  --card-chip-bg: rgba(212, 175, 55, 0.14);
  --card-chip-text: #f7f2e3;
  --photo-radius: 12px;
  --bottom-bg: linear-gradient(135deg, #111111, #2a2a2a);
}

.id-card.employee .brand-row {
  color: #ffffff;
}

.id-card.employee .photo-ring {
  background: linear-gradient(135deg, #111111, #383838);
}

.id-card.employee .photo-placeholder {
  color: #d4af37;
  background: linear-gradient(135deg, #101010, #303030);
}

.id-card.employee .identity-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(232, 232, 232, 0.9));
  border-color: rgba(0, 0, 0, 0.08);
}

.id-card.employee .detail-row {
  background: linear-gradient(180deg, rgba(249, 249, 249, 0.98), rgba(230, 230, 230, 0.95));
  border-color: rgba(192, 192, 192, 0.65);
}

.id-card.employee .person-contact {
  color: #1f1f1f;
  background: linear-gradient(180deg, rgba(244, 244, 244, 0.95), rgba(221, 221, 221, 0.92));
  border-color: rgba(192, 192, 192, 0.9);
}

.id-card.employee .bottom-badge {
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: #f6f6f6;
}

.id-card.compact .card-body {
  gap: 12px;
  padding: 14px;
}

.id-card.compact .brand-copy strong {
  font-size: 0.92rem;
}

.id-card.compact .brand-copy span,
.id-card.compact .type-chip,
.id-card.compact .identity-label {
  font-size: 0.52rem;
}

.id-card.compact .identity-panel {
  grid-template-columns: 84px 1fr;
  min-height: 118px;
  gap: 12px;
  padding: 10px;
}

.id-card.compact .photo-ring {
  width: 84px;
  height: 100px;
}

.id-card.compact .person-name {
  font-size: 0.96rem;
}

.id-card.compact .person-primary {
  font-size: 0.68rem;
}

.id-card.compact .person-secondary {
  font-size: 0.66rem;
}

.id-card.compact .detail-stack {
  gap: 8px;
  font-size: 0.6rem;
}

.id-card.compact .detail-row {
  padding: 8px 9px;
  min-height: 54px;
}

.id-card.compact .detail-row span:first-child {
  font-size: 0.46rem;
}

.id-card.compact .card-id {
  font-size: 0.68rem;
}

.id-card.compact .bottom-meta,
.id-card.compact .footer-note {
  font-size: 0.49rem;
}

.id-card.compact .back-card-body {
  gap: 10px;
}

.id-card.compact .back-panel {
  padding: 12px;
}

.id-card.compact .back-panel p {
  font-size: 0.61rem;
}

.id-card.ultra-compact .card-body {
  gap: 10px;
  padding: 12px;
}

.id-card.ultra-compact .card-shell::before {
  height: 114px;
}

.id-card.ultra-compact .brand-logo {
  width: 42px;
  height: 42px;
}

.id-card.ultra-compact .brand-copy strong {
  font-size: 0.84rem;
}

.id-card.ultra-compact .brand-copy span,
.id-card.ultra-compact .type-chip,
.id-card.ultra-compact .identity-label {
  font-size: 0.48rem;
}

.id-card.ultra-compact .identity-panel {
  grid-template-columns: 74px 1fr;
  min-height: 106px;
  gap: 10px;
  padding: 9px;
}

.id-card.ultra-compact .photo-ring {
  width: 74px;
  height: 90px;
}

.id-card.ultra-compact .person-name {
  font-size: 0.88rem;
  line-height: 1.1;
}

.id-card.ultra-compact .person-primary {
  font-size: 0.6rem;
}

.id-card.ultra-compact .person-secondary {
  font-size: 0.58rem;
}

.id-card.ultra-compact .detail-stack {
  gap: 6px;
  font-size: 0.54rem;
}

.id-card.ultra-compact .detail-row {
  padding: 6px 7px;
  border-radius: 12px;
  min-height: 48px;
}

.id-card.ultra-compact .detail-row span:first-child {
  font-size: 0.45rem;
}

.id-card.ultra-compact .bottom-badge {
  gap: 4px;
  padding: 10px;
}

.id-card.ultra-compact .card-id {
  font-size: 0.62rem;
}

.id-card.ultra-compact .bottom-meta,
.id-card.ultra-compact .footer-note {
  font-size: 0.45rem;
}

.id-card.ultra-compact .back-card-body {
  gap: 8px;
}

.id-card.ultra-compact .back-header {
  min-height: 76px;
}

.id-card.ultra-compact .back-brand-copy strong {
  font-size: 0.82rem;
}

.id-card.ultra-compact .back-brand-copy span,
.id-card.ultra-compact .back-label {
  font-size: 0.47rem;
}

.id-card.ultra-compact .back-panel {
  padding: 10px;
}

.id-card.ultra-compact .back-panel p {
  font-size: 0.56rem;
}

.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .builder-card,
  .preview-shell,
  .hero-panel {
    padding: 20px;
  }

  .field,
  .field.field-wide {
    grid-column: span 12;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-pill {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    margin: 10px auto 24px;
    gap: 16px;
  }

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