.desk .desk-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 80px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.desk-mast nav { display: flex; align-items: center; justify-content: end; gap: 9px clamp(13px, 3vw, 31px); flex-wrap: wrap; }
.desk-mast nav a { font-size: .88rem; font-weight: 700; text-decoration: none; }
.desk-mast nav a:hover { text-decoration: underline; }
.desk-mast .button { min-height: 41px; }
.desk-login {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 470px);
  align-items: start;
  gap: clamp(25px, 8vw, 90px);
  max-width: 1040px;
  padding-block: clamp(44px, 10vw, 110px);
}
.desk-login-copy > p, .desk-hint { color: var(--muted); }
.desk-login h1, .desk-page h1 { font-size: clamp(2.6rem, 6.5vw, 5.25rem); }
.desk-login-copy > p { max-width: 31ch; }
.desk-card {
  min-width: 0;
  padding: clamp(17px, 3.5vw, 37px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.desk-card h2 { font-size: clamp(1.65rem, 4vw, 2.65rem); }
.desk-card h3 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.desk-card > form { margin-top: 14px; }
.desk-login .desk-card > form { margin-top: 0; }
.desk-login form .button { margin-top: 4px; }
.desk-hint { margin: 0; font-size: .83rem; font-weight: 400; }
.desk-switch { margin: 23px 0 9px; font-size: .88rem; }
.desk-page { max-width: 1000px; padding-top: clamp(29px, 6vw, 65px); }
.desk-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 25px;
}
.desk-title .desk-hint { margin-top: 15px; overflow-wrap: anywhere; }
.desk-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 19px; }
.desk-tabs a { margin-bottom: -1px; padding: 6px 0 9px; font-weight: 700; text-decoration: none; border-bottom: 2px solid transparent; }
.desk-tabs a[aria-current] { border-bottom-color: var(--wine); }
.desk-title .eyebrow { margin-bottom: 8px; }
.desk-events { display: grid; gap: 10px; }
.desk-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  flex-wrap: wrap;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.desk-event-row h3 { overflow-wrap: anywhere; }
.desk-event-row .desk-hint { margin-top: 4px; }
.desk-event-row .button { min-height: 40px; }
.desk-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
#event-panel { margin-top: 18px; scroll-margin-top: 24px; }
.desk-state {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--pink);
  color: var(--wine);
  font-size: .76rem;
  font-weight: 700;
}
.desk-card-heading .desk-state { margin-top: 10px; }
.desk-state[data-tone="ok"], .desk-message[data-tone="ok"], .desk-result[data-tone="ok"] { color: #214b36; background: #e5f0e5; }
.desk-state[data-tone="error"], .desk-message[data-tone="error"], .desk-result[data-tone="error"] { color: #721d28; background: #f8e0db; }
.desk-state[data-tone="pending"], .desk-message[data-tone="pending"], .desk-result[data-tone="pending"] { color: #654315; background: #f7ebcf; }
.desk-message { margin: 8px 0 0; padding: 10px 13px; border-radius: 10px; background: #f0e8e0; color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.desk-form { margin-top: 14px; }
.desk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; min-width: 0; margin: 0; padding: 0; border: 0; }
.desk-fields:disabled input, .desk-fields:disabled textarea, .desk-fields:disabled select { background: #f4efe8; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.desk-full { grid-column: 1 / -1; }
.desk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.desk-event-actions { margin-top: 18px; }
.desk-agreement { align-items: start; font-weight: 400; }
.desk-agreement input { flex: 0 0 18px; margin-top: 2px; }
.desk-preview-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.desk-detail { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 19px; }
.desk-detail > form { margin-top: 12px; }
.desk-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin: 15px 0; }
.desk-counts div { padding: 8px 10px; border-radius: 10px; background: var(--paper); }
.desk-counts dt { color: var(--muted); font-size: .76rem; }
.desk-counts dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.desk-orders { display: grid; gap: 8px; margin-top: 12px; }
.desk-order-entry { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; }
.desk-order-entry .desk-order-select { align-self: start; font-size: .78rem; }
#bulk-order-actions { margin-top: 12px; }
#bulk-order-result-list { padding-left: 19px; overflow-wrap: anywhere; }
.desk-order { display: grid; gap: 5px; border: 1px solid var(--line); padding: 10px 13px; border-radius: 13px; }
.desk-order > summary, .desk-invitations > summary { cursor: pointer; overflow-wrap: anywhere; }
.desk-order > p { margin: 9px 0; overflow-wrap: anywhere; }
.desk-order ul { margin: 5px 0; overflow-wrap: anywhere; }
.desk-order .button { min-height: 38px; margin-top: 8px; }
.desk-profile { max-width: 620px; }
.desk-check-in { max-width: 750px; }
.desk-check-in #checkin-content { margin-top: 18px; }
.desk-check-in #checkin-event-info { margin: 6px 0 16px; }
.desk-invitations { margin-top: 12px; }
.desk-invitations summary { font-weight: 700; color: var(--wine); }
.desk-camera { position: relative; overflow: hidden; max-height: 350px; margin-top: 15px; border-radius: 18px; background: var(--dark-wine); }
.desk-camera video { display: block; width: 100%; max-height: 350px; aspect-ratio: 4 / 3; object-fit: cover; }
.desk-camera-frame { position: absolute; inset: 18% 25%; border: 2px solid #fff; border-radius: 12px; box-shadow: 0 0 0 160px #18081132; pointer-events: none; }
.desk-check-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.desk-result { margin-top: 17px; padding: 14px 16px; border-radius: 15px; background: #f0e8e0; }
.desk-result h3 { color: inherit; }
.desk-result p { margin: 6px 0 12px; }
.desk-result p:empty { display: none; }
.desk-result .button { min-height: 40px; }
#staff-invite .button { margin-top: 8px; }
#staff-link { font-size: .82rem; }
#staff-expires { margin-top: 8px; }
@media (max-width: 660px) {
  .desk-login { grid-template-columns: minmax(0, 1fr); padding-block: 32px; }
  .desk-mast .wordmark img { width: 80px; }
  .desk .desk-mast { min-height: 66px; }
  .desk-mast nav { gap: 8px 11px; }
  .desk-mast nav a { font-size: .78rem; }
}
@media (max-width: 440px) {
  .desk-fields, .desk-check-form { grid-template-columns: minmax(0, 1fr); }
  .desk-card .button { max-width: 100%; }
  .desk-title { align-items: start; }
}

.desk-inventory > summary {
  width: fit-content;
  color: var(--wine);
  font-weight: 700;
  cursor: pointer;
}
.desk-inventory-hint { margin-top: 9px; }
.desk-inventory-section { margin-top: 19px; }
.desk-inventory-section > .desk-card-heading { align-items: center; flex-wrap: wrap; }
.desk-inventory-section .button { min-height: 38px; }
.desk-inventory-list { display: grid; gap: 7px; margin-top: 9px; }
.desk-inventory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow-wrap: anywhere;
}
.desk-inventory-item p { margin: 4px 0 0; }
.desk-inventory-form {
  margin-top: 10px;
  padding: clamp(12px, 3vw, 19px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  scroll-margin-top: 20px;
}

.desk-cover { display: grid; gap: 10px; }
.desk-cover-hint { margin-top: 9px; }
.desk-cover .desk-cover-hint, .desk-cover .desk-message { margin: 0; }
.desk-cover > img, .desk .desk-preview-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  background: var(--paper);
  object-fit: cover;
}
.desk-cover > img { max-width: 480px; }
.desk-cover-controls { display: grid; max-width: 480px; gap: 8px; min-width: 0; }
.desk-cover-controls .desk-actions { margin-top: 3px; }
.desk .cover-crop-dialog { width: min(820px, calc(100% - 24px)); }
.cover-crop-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.cover-crop-controls, .cover-crop-previews { display: grid; align-content: start; gap: 10px; min-width: 0; }
.cover-crop-controls canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
}
.cover-crop-controls input[type="range"] { padding: 0; accent-color: var(--wine); }
.cover-crop-previews figure { margin: 0; }
.cover-crop-previews canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.cover-crop-previews figcaption { margin-top: 4px; font-size: .84rem; color: var(--muted); }
@media (max-width: 620px) {
  .cover-crop-layout { grid-template-columns: minmax(0, 1fr); }
  .cover-crop-previews { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.desk-gallery:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,175px),1fr)); gap: 12px; margin-block: 12px; }
.desk-gallery figure { margin: 0; min-width: 0; }
.desk-gallery img { display: block; width: 100%; height: auto; border-radius: 10px; }
.desk-gallery figcaption { margin-block: 6px; overflow-wrap: anywhere; }
.desk-cover-controls input::file-selector-button {
  margin-right: 8px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--wine);
  cursor: pointer;
}

.desk-tabs { flex-wrap: wrap; column-gap: clamp(12px, 3vw, 22px); row-gap: 0; }
.desk-marketing-heading { flex-wrap: wrap; align-items: center; }
.desk-marketing-list { display: grid; gap: 10px; margin-top: 14px; }
.desk-marketing-form, .desk-marketing-item {
  padding: clamp(11px, 2vw, 20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.desk-marketing-form { background: var(--paper); }
.desk-marketing-item h3, .desk-marketing-item p { overflow-wrap: anywhere; }
.desk-marketing-item h3, .desk-marketing-item h4 { margin: 0; }
.desk-marketing-item > p { margin: 7px 0; white-space: pre-wrap; }
.desk-marketing-item .desk-actions { margin-top: 9px; }
.desk-marketing-item .desk-actions .button { min-height: 38px; }
.desk-collection-events { margin: 0; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.desk-collection-events legend { padding-inline: 4px; font-size: .86rem; color: var(--wine); font-weight: 700; }
.desk-collection-events label { align-items: start; gap: 8px; overflow-wrap: anywhere; }
.desk-collection-events input { flex: 0 0 18px; margin: 3px 0 0; }
.desk-collection-events small { display: block; font-weight: 400; color: var(--muted); }
.desk-share { display: grid; gap: 7px; margin-top: 11px; }
.desk-share input { font-size: .82rem; }
.desk-share .desk-actions { margin-top: 0; }
.desk-marketing-item .desk-counts { margin-block: 10px; }
#tracking-form { max-width: 420px; }

#promotion-form { margin-top: 12px; }
#promotion-list .desk-marketing-item { background: var(--surface); }

#partial-refund-form { margin-top: 12px; }
.desk-partial-actions { margin-top: 15px; }
.desk-partial-tickets { margin: 8px 0; padding-left: 18px; overflow-wrap: anywhere; }

.desk-finance-mode { margin-top: 9px; }
.desk-finance-scroll { max-width: 100%; overflow-x: auto; margin-top: 10px; }
#finance-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .86rem; }
#finance-table th, #finance-table td { padding: 9px; border-bottom: 1px solid var(--line); }
#finance-table th { text-align: left; }
#finance-table thead { color: var(--wine); background: var(--paper); }
#finance-table td { text-align: right; font-variant-numeric: tabular-nums; }
#finance-table tbody th { overflow-wrap: anywhere; }
#finance-table thead th:not(:first-child) { text-align: right; }
.reconciliation-values { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr)); gap: 8px 14px; }
.reconciliation-values dt { font-size: .78rem; color: var(--muted); }
.reconciliation-values dd { margin: 3px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.reconciliation-items { padding-left: 19px; overflow-wrap: anywhere; }
.reconciliation-items li + li { margin-top: 5px; }
#finance-empty { margin-top: 9px; }
@media print {
  body:has(#onsite-desk[open] #onsite-print-panel:not([hidden])) > :not(main),
  main:has(#onsite-desk[open] #onsite-print-panel:not([hidden])) > :not(#onsite-desk),
  #onsite-desk:has(#onsite-print-panel:not([hidden])) > :not(#onsite-print-panel) { display: none !important; }
  #onsite-desk[open] { position: static; margin: 0; padding: 0; border: 0; box-shadow: none; max-height: none; }
  #onsite-desk::backdrop { display: none; }
  #onsite-print-panel article { break-inside: avoid; }
  body:has(#checkin-roster[open]) > :not(main),
  main:has(#checkin-roster[open]) > :not(#checkin-roster),
  #checkin-roster #roster-onsite,
  #checkin-roster #roster-search-wrap,
  #checkin-roster .roster-action,
  #checkin-roster form { display: none !important; }
  #checkin-roster[open] { position: static; width: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  #checkin-roster::backdrop { display: none; }
  #checkin-roster table { border-collapse: collapse; width: 100%; }
  #checkin-roster th, #checkin-roster td { text-align: left; padding: 5px; border-bottom: 1px solid #ccc; }
}

.desk-cancellation-progress { flex-basis: 100%; }
.desk-cancellation-progress p { margin: 5px 0 0; }

#analytics-event-options { display: grid; gap: 6px; max-height: 14rem; overflow: auto; }
#analytics-event-options .consent { align-items: start; }
#analytics-event-options .consent span { overflow-wrap: anywhere; }
#analytics-content h3 { margin-top: 22px; }

.editor-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; scroll-margin-top: 14px; }
.editor-steps button { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: none; }
.editor-steps [aria-current="step"] { background: var(--wine); color: #fff; border-color: var(--wine); }
#event-panel[data-editor-stage="page"] [data-editor-section]:not([data-editor-section="page"]),
#event-panel[data-editor-stage="tickets"] [data-editor-section]:not([data-editor-section="tickets"]),
#event-panel[data-editor-stage="publish"] [data-editor-section]:not([data-editor-section="publish"]),
#event-panel[data-editor-stage]:not([data-editor-stage="page"]) #event-fields > :not([data-editor-section]) { display: none; }
#editor-review { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
#editor-review h3, #editor-review dl { margin: 0; }
#editor-review dl { display: grid; grid-template-columns: minmax(6rem, .35fr) minmax(0, 1fr); gap: 7px 12px; margin-top: 10px; }
#editor-review dd { margin: 0; overflow-wrap: anywhere; }

.desk-login.auth-page {
  display: block;
  max-width: 460px;
  padding-block: clamp(28px, 6vw, 64px);
}
.auth-page h1 {
  margin-bottom: 18px;
  font-size: clamp(1.95rem, 5vw, 2.65rem);
  letter-spacing: -.045em;
}
.auth-page .desk-switch { margin: 15px 0 0; }
.auth-page #auth-terms { margin-top: 12px; }
