:root {
  --cream: #f7f5f2;
  --ivory: #fafaf7;
  --white: #ffffff;
  --ink: #5a5957;
  --muted: #84827e;
  --line: #dfddda;
  --gold: #e2c670;
  --gold-deep: #927329;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shell { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--gold-deep);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); background: var(--ivory); }
.header-inner { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 24px; }

/* Allura is reserved for the product wordmark throughout the public experience. */
.brand-wordmark {
  display: inline-block;
  color: var(--gold-deep);
  font-family: "Allura", cursive;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.sign-out {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
  font-size: 14px;
}

.dashboard { padding: 66px 0 100px; }
.login-page { display: grid; min-height: calc(100vh - 95px); place-items: center; padding: 66px 0 100px; }
.login-panel { width: min(100%, 500px); padding: 42px; border: 1px solid var(--line); background: var(--white); }
.login-panel h1 { margin-bottom: 16px; }
.login-intro { max-width: 370px; margin-bottom: 29px; color: var(--muted); }
.login-status { min-height: 24px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 52px; }
.eyebrow { margin: 0 0 11px; color: var(--gold-deep); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: "Playfair Display", serif; font-weight: 500; letter-spacing: 0; line-height: 1.18; }
h1 { margin-bottom: 8px; font-size: clamp(40px, 5vw, 60px); }
h2 { margin-bottom: 0; font-size: 28px; }
.welcome-detail { margin: 0; color: var(--muted); font-size: 16px; }
.page-status { max-width: 270px; margin: 0; color: var(--muted); font-size: 13px; text-align: right; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(300px, 0.76fr); gap: 28px; align-items: start; }
.hero-panel, .details-panel { padding: 32px; background: var(--white); border: 1px solid var(--line); }
.panel-heading { margin-bottom: 25px; }

/* This creates a true square on screen at every viewport width. */
.hero-image-frame { aspect-ratio: 1 / 1; overflow: hidden; background: var(--cream); }
.hero-image-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 21px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 17px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background-color 160ms ease, border-color 160ms ease; }
.button-primary { background: var(--gold); color: #201b10; }
.button-primary:hover, .button-primary:focus-visible { background: #c9ac4e; }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-secondary:hover, .button-secondary:focus-visible { border-color: var(--gold-deep); }
.field-status { margin: 0; color: var(--muted); font-size: 12px; }

.event-details { padding: 0; margin: 0; }
.event-details > div { display: grid; grid-template-columns: minmax(125px, 0.85fr) minmax(0, 1fr); gap: 20px; padding: 19px 0; border-top: 1px solid var(--line); }
.event-details > div:last-child { border-bottom: 1px solid var(--line); }
.event-details dt { color: var(--muted); font-size: 13px; }
.event-details dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 500; text-align: right; }

.sharing-section { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); gap: clamp(46px, 9vw, 135px); padding: 74px 0 0; margin-top: 74px; border-top: 1px solid var(--line); }
.sharing-intro > p:not(.eyebrow) { max-width: 350px; margin: 17px 0 0; color: var(--muted); font-size: 15px; }
.sharing-content { display: grid; gap: 26px; }
.link-box label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.copy-row { display: flex; }
.copy-row input { width: 100%; min-width: 0; height: 48px; padding: 0 13px; border: 1px solid var(--line); border-right: 0; border-radius: 4px 0 0 4px; background: var(--white); color: var(--ink); font-size: 13px; }
.icon-button { min-width: 67px; padding: 0 12px; border: 1px solid var(--gold-deep); border-radius: 0 4px 4px 0; background: var(--ivory); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 500; }
.icon-button:hover, .icon-button:focus-visible { background: var(--cream); }
.link-box .field-status { min-height: 20px; padding-top: 5px; }
.share-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.qr-panel { min-width: 0; }
.qr-panel-heading { margin-bottom: 15px; }
.qr-panel-heading h3 { margin: 0 0 3px; font-family: "Playfair Display", serif; font-size: 19px; font-weight: 500; line-height: 1.25; }
.qr-panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }

/* The white surround is part of the QR quiet zone and must remain uncoloured
   so phone cameras can identify the code reliably on screens and in print. */
.qr-preview { width: min(100%, 218px); padding: 12px; border: 1px solid var(--line); background: var(--white); }
.qr-preview span { display: block; color: var(--muted); font-size: 12px; }
.qr-preview svg { display: block; width: 100%; height: auto; }
.qr-colour-controls { margin: 18px 0 0; padding: 0; border: 0; }
.qr-colour-controls legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: 12px; }
.qr-colour-options { display: flex; align-items: center; gap: 10px; }
.qr-colour-swatch { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--gold-deep); cursor: pointer; }
.qr-colour-swatch-black { background: #000000; }
.qr-colour-swatch.is-selected { outline: 2px solid var(--ink); outline-offset: 3px; }
.qr-colour-swatch:focus-visible, .qr-custom-colour-button:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.qr-custom-colour-button { display: inline-grid; width: 29px; height: 29px; place-items: center; padding: 0; border: 1px solid var(--gold-deep); border-radius: 50%; background: var(--white); color: var(--gold-deep); cursor: pointer; }
.qr-custom-colour-button:hover { background: var(--cream); }
.qr-custom-colour-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.qr-download-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 19px; }
.qr-download-actions .button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
.qr-panel .field-status { min-height: 20px; margin-top: 7px; }

/* Test uploads are deliberately an unframed operational section, rather than
   another dashboard card. The controls remain close to the explanation while
   leaving the image-management panel as the dominant first task. */
.test-upload-section { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); gap: clamp(46px, 9vw, 135px); padding: 74px 0 0; margin-top: 74px; border-top: 1px solid var(--line); }
.test-upload-intro > p:not(.eyebrow) { max-width: 370px; margin: 17px 0 0; color: var(--muted); font-size: 15px; }
.test-upload-controls { display: flex; max-width: 460px; align-items: flex-start; flex-direction: column; gap: 12px; }
.test-upload-controls .field-status { min-height: 20px; }
.test-upload-controls .button[disabled] { cursor: not-allowed; opacity: 0.55; }

@media (max-width: 780px) {
  .shell { width: min(calc(100% - 36px), var(--max-width)); }
  .header-inner { min-height: 80px; }
  .dashboard { padding: 43px 0 74px; }
  .login-page { min-height: calc(100vh - 81px); padding: 43px 0 74px; }
  .welcome { align-items: start; flex-direction: column; margin-bottom: 37px; }
  .page-status { text-align: left; }
  .dashboard-grid, .sharing-section, .test-upload-section { grid-template-columns: 1fr; }
  .dashboard-grid { gap: 18px; }
  .hero-panel, .details-panel { padding: 24px; }
  .sharing-section, .test-upload-section { gap: 34px; padding-top: 53px; margin-top: 53px; }
  .share-actions { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 460px) {
  .sign-out { font-size: 13px; }
  .login-panel { padding: 29px 24px; }
  .event-details > div { grid-template-columns: 1fr; gap: 3px; }
  .event-details dd { text-align: left; }
  .copy-row { flex-direction: column; }
  .copy-row input { border-right: 1px solid var(--line); border-radius: 4px 4px 0 0; }
  .icon-button { min-height: 42px; border-radius: 0 0 4px 4px; }
}
