:root {
  --navy: #122b4f;
  --blue: #0b5b89;
  --teal: #1599a8;
  --gold: #d8a43a;
  --ink: #172033;
  --muted: #64748b;
  --line: #dbe5ee;
  --surface: #ffffff;
  --background: #eef4f7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #edf5f7, #f8fafc);
}
button, input, textarea { font: inherit; }
button, .button { cursor: pointer; }
[hidden] { display: none !important; }

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

.intro-panel, .preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(15, 35, 60, .10);
}
.intro-panel { padding: 30px; }
.preview-panel { padding: 20px; overflow: hidden; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); }
.intro-copy { color: var(--muted); line-height: 1.65; margin: 14px 0 22px; }

.connection-row, .download-row, .input-row, .photo-actions, .control-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.connection-row, .download-row { margin: 16px 0 22px; }
.button, .photo-controls button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.button:hover, .photo-controls button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button-primary, .button-download { background: var(--navy); color: white; }
.button-linkedin, .button-linkedin-share { background: #0a66c2; color: white; }
.button-secondary, .photo-controls button { background: #e8f0f5; color: var(--navy); }

.form-grid { display: grid; gap: 10px; }
.field-label { font-weight: 800; color: var(--navy); margin-top: 8px; }
input[type="text"], input[type="file"], textarea {
  width: 100%;
  border: 1px solid #cbd8e3;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
}
.input-row input { flex: 1 1 220px; }
textarea { min-height: 210px; resize: vertical; line-height: 1.5; }
.photo-actions { margin-top: 14px; }
.photo-controls {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}
.control-group + .control-group { margin-top: 10px; }
.share-message-section { margin-top: 22px; }
.message-note { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.status-message {
  border-radius: 10px;
  padding: 12px 14px;
  background: #edf4f8;
  color: var(--navy);
}
.status-message[data-status-type="success"] { background: #e6f7ef; color: #17613c; }
.status-message[data-status-type="error"] { background: #fff0f0; color: #9a1f1f; }

.card-stage { width: 100%; position: relative; overflow: hidden; }
.personalised-card {
  position: relative;
  width: 1619px;
  height: 971px;
  transform-origin: top left;
  overflow: hidden;
  background: white;
}
.card-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-photo-area {
  position: absolute;
  left: 122px;
  top: 445px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,.92);
  border: 12px solid rgba(255,255,255,.95);
  box-shadow: 0 12px 35px rgba(5,30,55,.22);
  touch-action: none;
}
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7b8da0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: .08em;
}
#profile-picture {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  user-select: none;
  max-width: none;
}
.attendee-name {
  position: absolute;
  left: 55px;
  top: 835px;
  width: 500px;
  text-align: center;
  color: var(--navy);
  font-size: 45px;
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(255,255,255,.7);
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .page-shell { grid-template-columns: 1fr; }
  .preview-panel { order: -1; }
}
@media (max-width: 620px) {
  .page-shell { width: min(100% - 18px, 1500px); margin: 10px auto 20px; gap: 14px; }
  .intro-panel, .preview-panel { border-radius: 14px; }
  .intro-panel { padding: 20px; }
  .preview-panel { padding: 8px; }
  .button { width: 100%; text-align: center; }
  .input-row { display: grid; grid-template-columns: 1fr; }
}

.card-choice {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
.card-choice legend {
  margin-bottom: 10px;
  color: var(--navy);
  font-weight: 800;
}
.card-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.card-choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.card-choice-option:has(input:checked) {
  border-color: var(--teal);
  background: #eefafa;
}
.card-choice-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}
.card-choice-option span {
  display: grid;
  gap: 3px;
}
.card-choice-option strong {
  color: var(--navy);
}
.card-choice-option small {
  color: var(--muted);
}
@media (max-width: 620px) {
  .card-choice-grid { grid-template-columns: 1fr; }
}
