:root {
  --portal-bg: #f0eeec;
  --portal-surface: #fffaf6;
  --portal-text: #2c2926;
  --portal-muted: #756d66;
  --portal-brown: #59371d;
  --portal-caramel: #d28f59;
  --portal-border: rgba(89, 55, 29, 0.14);
  --portal-success: #4f7b61;
  --portal-danger: #9f3e38;
  --portal-font-title: "Cormorant Garamond", serif;
  --portal-font-body: "Montserrat", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(210, 143, 89, 0.18), transparent 28%),
    linear-gradient(130deg, #f7f2ed 0%, #f0eeec 55%, #e7ddd4 100%);
  color: var(--portal-text);
  font-family: var(--portal-font-body);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.client-portal-shell {
  min-height: 100vh;
  padding: 28px;
}

.client-login-panel {
  display: grid;
  align-content: center;
  width: min(100%, 430px);
  min-height: calc(100vh - 56px);
  margin-inline: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 250, 246, 0.94);
  box-shadow: 0 28px 90px rgba(44, 41, 38, 0.14);
  backdrop-filter: blur(14px);
}

.client-login-brand {
  display: block;
  width: fit-content;
  margin-inline: auto;
}

.client-login-brand img,
.client-dashboard-logo img {
  display: block;
  width: 188px;
  max-width: 100%;
}

.client-login-copy {
  margin-top: 24px;
  text-align: center;
}

.client-login-copy span,
.client-dashboard-header span,
.client-gallery-overview__heading span,
.client-password-panel span {
  color: var(--portal-caramel);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.client-login-copy h1,
.client-dashboard-header h1,
.client-gallery-overview__heading h2,
.client-password-panel h2 {
  margin-top: 8px;
  font-family: var(--portal-font-title);
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 500;
  line-height: 0.95;
}

.client-login-copy p,
.client-login-note,
.client-gallery-overview__heading p,
.client-password-panel p {
  margin-top: 12px;
  color: var(--portal-muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.client-login-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.client-login-form label,
.client-password-panel label {
  display: grid;
  gap: 7px;
}

.client-login-form label span,
.client-password-panel label span {
  color: var(--portal-brown);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.client-login-form input,
.client-password-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--portal-border);
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: var(--portal-text);
}

.client-login-form label .client-password-input,
.client-password-panel label .client-password-input {
  position: relative;
  display: block;
  color: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.client-password-input input {
  padding-right: 92px;
}

.client-password-input button {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(89, 55, 29, 0.16);
  border-radius: 4px;
  background: #fff8ef;
  color: var(--portal-brown);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-50%);
  cursor: pointer;
}

.client-login-form input:focus,
.client-password-panel input:focus {
  border-color: rgba(89, 55, 29, 0.5);
  box-shadow: 0 0 0 4px rgba(210, 143, 89, 0.14);
}

.client-primary-button,
.client-secondary-button,
.client-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.client-primary-button {
  background: var(--portal-brown);
  color: #fff;
}

.client-primary-button:disabled,
.client-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.client-secondary-button {
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-brown);
}

.client-text-button {
  width: fit-content;
  min-height: auto;
  margin-top: 14px;
  padding: 3px 0;
  background: transparent;
  color: var(--portal-brown);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.client-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: client-spin 0.75s linear infinite;
}

.client-primary-button.is-loading span:first-child {
  display: none;
}

.client-primary-button.is-loading .client-spinner {
  display: block;
}

.client-login-note {
  text-align: center;
  font-size: 0.7rem;
}

.client-dashboard {
  width: min(100%, 1180px);
  margin-inline: auto;
}

.client-dashboard-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0 28px;
}

.client-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-gallery-menu {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 9000;
  display: none;
  width: min(calc(100vw - 28px), 1080px);
  transform: translate(-50%, -100%);
  transition: transform 0.24s ease;
}

body.is-viewing-gallery .client-gallery-menu {
  display: block;
}

.client-gallery-menu.is-open {
  transform: translate(-50%, 0);
}

.client-gallery-menu__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 62px;
  align-items: center;
  gap: 18px;
  padding: 8px 14px 8px 18px;
  border: 1px solid rgba(89, 55, 29, 0.18);
  background: #fffaf6;
  box-shadow: 0 16px 48px rgba(44, 41, 38, 0.14);
}

.client-gallery-menu__brand img {
  display: block;
  width: 118px;
  max-width: 38vw;
}

.client-gallery-menu__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  gap: 8px;
  overflow: visible;
}

.client-gallery-menu__actions .client-secondary-button {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.client-gallery-menu__back {
  flex: 0 0 auto;
}

.client-gallery-menu__icon-button {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(89, 55, 29, 0.16);
  border-radius: 4px;
  background: #fff;
  color: var(--portal-brown);
  cursor: pointer;
}

.client-gallery-menu__icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-gallery-menu__tab {
  position: absolute;
  bottom: -34px;
  left: 50%;
  display: grid;
  width: 112px;
  min-height: 35px;
  grid-template-columns: repeat(3, 14px) auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(89, 55, 29, 0.24);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #d28f59;
  color: #fff;
  box-shadow: 0 12px 30px rgba(44, 41, 38, 0.16);
  transform: translateX(-50%);
  cursor: grab;
}

.client-gallery-menu__tab:active {
  cursor: grabbing;
}

.client-gallery-menu__tab span {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
}

.client-gallery-menu__tab strong {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.is-viewing-gallery .client-portal-shell {
  padding: 0;
}

body.is-viewing-gallery .client-dashboard {
  width: 100%;
  max-width: none;
}

body.is-viewing-gallery .client-dashboard-header,
body.is-viewing-gallery .client-password-panel,
body.is-viewing-gallery .client-gallery-overview {
  display: none !important;
}

.client-password-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 250, 246, 0.88);
  box-shadow: 0 18px 60px rgba(44, 41, 38, 0.09);
}

.client-password-panel form {
  display: grid;
  gap: 12px;
}

.client-gallery-overview {
  padding: 34px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 250, 246, 0.88);
  box-shadow: 0 22px 70px rgba(44, 41, 38, 0.11);
}

.client-gallery-overview__heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.client-gallery-overview__heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

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

.portal-gallery-card {
  display: grid;
  align-content: start;
  min-height: 330px;
  padding: 20px;
  border: 1px solid var(--portal-border);
  background: #fff;
}

.portal-gallery-card__cover {
  aspect-ratio: 16 / 10;
  margin: -20px -20px 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #efe6dd, #d9c8b9);
}

.portal-gallery-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-gallery-card__cover.has-no-cover img {
  opacity: 0.35;
  filter: grayscale(1);
}

.portal-gallery-card.is-expired {
  opacity: 0.78;
}

.portal-gallery-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.portal-gallery-card__type,
.portal-gallery-card__status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(210, 143, 89, 0.14);
  color: var(--portal-brown);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-gallery-card__status {
  background: rgba(79, 123, 97, 0.12);
  color: var(--portal-success);
}

.portal-gallery-card.is-expired .portal-gallery-card__status {
  background: rgba(159, 62, 56, 0.1);
  color: var(--portal-danger);
}

.portal-gallery-card h3 {
  margin-top: 18px;
  font-family: var(--portal-font-title);
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 0.98;
}

.portal-gallery-card__job {
  margin-top: 9px;
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.portal-gallery-card dl {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-border);
}

.portal-gallery-card dt {
  color: var(--portal-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-gallery-card dd {
  margin-top: 2px;
  color: var(--portal-text);
  font-size: 0.72rem;
}

.portal-gallery-card__notice {
  margin-top: 18px;
  padding: 13px;
  background: #fff8ef;
  color: var(--portal-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.portal-gallery-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.portal-gallery-card__expired {
  color: var(--portal-danger);
  font-size: 0.72rem;
  font-weight: 700;
}

.client-empty-state {
  padding: 56px 22px;
  border: 1px dashed rgba(89, 55, 29, 0.25);
  text-align: center;
}

.client-empty-state h2 {
  font-family: var(--portal-font-title);
  font-size: 2.4rem;
  font-weight: 500;
}

.client-empty-state p {
  max-width: 520px;
  margin: 10px auto 0;
  color: var(--portal-muted);
}

.client-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 36px));
}

.client-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border-left: 4px solid var(--portal-muted);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(21, 19, 18, 0.18);
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.client-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.client-toast--success { border-left-color: var(--portal-success); }
.client-toast--error { border-left-color: var(--portal-danger); }
.client-toast--warning { border-left-color: var(--portal-caramel); }

.client-toast p {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.client-toast > div {
  min-width: 0;
}

.client-toast strong,
.client-toast p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.client-toast button {
  align-self: start;
  width: 26px;
  height: 26px;
  background: transparent;
  color: var(--portal-muted);
  cursor: pointer;
}

@keyframes client-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 940px) {
  .client-dashboard-header,
  .client-password-panel,
  .client-gallery-overview__heading {
    grid-template-columns: 1fr;
  }

  .client-dashboard-actions,
  .client-gallery-overview__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .client-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .client-portal-shell {
    padding: 12px;
  }

  .client-login-panel {
    min-height: calc(100vh - 24px);
    padding: 26px 20px;
  }

  .client-dashboard-header {
    gap: 16px;
  }

  .client-dashboard-actions {
    display: grid;
  }

  .client-gallery-menu {
    width: min(calc(100vw - 16px), 620px);
  }

  .client-gallery-menu__bar {
    min-height: 58px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    padding: 7px 8px;
  }

  .client-gallery-menu__brand img {
    width: 74px;
    max-width: 22vw;
  }

  .client-gallery-menu__actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .client-gallery-menu__actions .client-secondary-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.58rem;
  }

  .client-gallery-menu__icon-button {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .client-gallery-menu__icon-button svg {
    width: 18px;
    height: 18px;
  }

  .client-gallery-menu__tab {
    bottom: -32px;
    width: 104px;
    min-height: 33px;
  }

  .client-gallery-overview {
    padding: 22px 16px;
  }

  .client-gallery-grid {
    grid-template-columns: 1fr;
  }

  .client-toast-container {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }
}

.client-gallery-viewer {
  position: relative;
  padding: 34px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 250, 246, 0.92);
  box-shadow: 0 22px 70px rgba(44, 41, 38, 0.11);
}

body.is-viewing-gallery .client-gallery-viewer {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  padding: 0 0 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: clip;
}

.client-gallery-cover {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  margin: 0 0 34px;
  overflow: hidden;
  background: linear-gradient(135deg, #efe6dd, #d9c8b9);
}

.client-gallery-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-gallery-viewer.is-full-width {
  width: 100%;
  max-width: none;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
  transform: none;
}

.client-gallery-viewer.is-full-width .client-gallery-viewer__header,
.client-gallery-viewer.is-full-width .client-gallery-viewer__notice,
.client-gallery-viewer.is-full-width .client-download-panel,
.client-gallery-viewer.is-full-width .client-selection-bar {
  margin-right: 34px;
  margin-left: 34px;
}

.client-gallery-viewer__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

.client-gallery-viewer.has-cover .client-gallery-viewer__header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  margin: 0;
  padding: clamp(74px, 10vh, 130px) clamp(22px, 7vw, 92px);
  color: #fff;
  pointer-events: none;
  transform: none;
}

.client-gallery-viewer.has-cover[data-cover-text-position="center"] .client-gallery-viewer__header {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.client-gallery-viewer.has-cover[data-cover-text-position="bottom-left"] .client-gallery-viewer__header {
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
}

.client-gallery-viewer.has-cover[data-cover-text-position="bottom-center"] .client-gallery-viewer__header {
  align-items: flex-end;
  justify-content: center;
  text-align: center;
}

.client-gallery-viewer.has-cover[data-cover-text-position="top-left"] .client-gallery-viewer__header {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

.client-gallery-viewer.has-cover[data-cover-overlay="dark-gradient"] .client-gallery-cover::after,
.client-gallery-viewer.has-cover[data-cover-overlay="soft-blur"] .client-gallery-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.client-gallery-viewer.has-cover[data-cover-overlay="dark-gradient"] .client-gallery-cover::after {
  background: linear-gradient(180deg, rgba(16, 14, 13, 0.28), rgba(16, 14, 13, 0.08) 42%, rgba(16, 14, 13, 0.48));
}

.client-gallery-viewer.has-cover[data-cover-overlay="soft-blur"] .client-gallery-cover::after {
  background: radial-gradient(circle at 50% 48%, rgba(16, 14, 13, 0.08), rgba(16, 14, 13, 0.42));
}

.client-gallery-viewer.has-cover .client-gallery-viewer__header > div {
  max-width: min(760px, 88vw);
  padding: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.38);
}

.client-gallery-viewer__header span {
  color: var(--portal-caramel);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.client-gallery-viewer__header h2 {
  margin-top: 6px;
  font-family: var(--portal-font-title);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 0.92;
}

.client-gallery-viewer__header p {
  margin-top: 10px;
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.client-gallery-viewer.has-cover .client-gallery-viewer__header span,
.client-gallery-viewer.has-cover .client-gallery-viewer__header p {
  color: rgba(255, 255, 255, 0.9);
}

.client-gallery-viewer__notice {
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid rgba(210, 143, 89, 0.24);
  background: #fff8ef;
  color: var(--portal-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.client-download-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.client-download-panel__copy,
.client-download-panel__progress,
.client-download-panel__parts {
  display: none;
}

.client-download-panel__copy span {
  display: block;
  color: var(--portal-caramel);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.client-download-panel__copy strong {
  display: block;
  margin-top: 4px;
  font-family: var(--portal-font-title);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

.client-download-panel__copy p,
.client-download-panel__progress p {
  margin-top: 6px;
  color: var(--portal-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.client-download-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.client-download-panel__progress {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--portal-border);
}

.client-download-panel__progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--portal-brown);
  font-size: 0.7rem;
  font-weight: 700;
}

.client-download-panel__bar {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(89, 55, 29, 0.1);
}

.client-download-panel__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-caramel), var(--portal-brown));
  transition: width 0.2s ease;
}

.client-download-panel__parts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--portal-border);
}

.client-gallery-viewer__grid {
  column-count: 3;
  column-gap: var(--viewer-gap, 8px);
}

.client-viewer-empty {
  display: block;
  padding: 52px 24px;
  border: 1px dashed rgba(89, 55, 29, 0.22);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  break-inside: avoid;
}

.client-viewer-empty strong {
  display: block;
  font-family: var(--portal-font-title);
  font-size: 2rem;
  font-weight: 500;
}

.client-viewer-empty p {
  margin-top: 8px;
  color: var(--portal-muted);
}

.client-photo-tile {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0 0 var(--viewer-gap, 8px);
  border: 0;
  background: transparent;
  break-inside: avoid;
}

.client-photo-tile__button {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #ded8d2;
  cursor: pointer;
}

.client-photo-tile__button img {
  width: 100%;
  height: auto;
  min-height: 120px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.client-photo-tile__button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.client-photo-tile__watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.8rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
  text-transform: uppercase;
  transform: rotate(-18deg);
  pointer-events: none;
}

.client-photo-tile__selected {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: none;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--portal-success);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-photo-tile__index {
  position: absolute;
  top: 9px;
  left: 9px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(16, 14, 13, 0.48);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.client-photo-tile.is-selected {
  outline: 4px solid #c77d4b;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 246, 0.96), 0 12px 32px rgba(199, 125, 75, 0.26);
}

.client-photo-tile.is-selected .client-photo-tile__selected {
  display: inline-flex;
  background: #c77d4b;
}

.client-photo-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
}

.client-photo-tile__meta strong {
  color: var(--portal-muted);
  font-size: 0.68rem;
}

.client-photo-tile__meta button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-brown);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.client-photo-tile__download {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.93);
  color: var(--portal-brown);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 26px rgba(16, 14, 13, 0.18);
  cursor: pointer;
}

.client-gallery-viewer__grid.is-delivery .client-photo-tile__watermark {
  display: none;
}

.client-gallery-viewer__grid.is-selection[data-reveal="press"] .client-photo-tile__button img {
  filter: blur(14px);
  transform: scale(1.04);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.client-gallery-viewer__grid.is-selection[data-reveal="press"] .client-photo-tile__button:hover img,
.client-gallery-viewer__grid.is-selection[data-reveal="press"] .client-photo-tile__button:active img,
.client-gallery-viewer__grid.is-selection[data-reveal="press"] .client-photo-tile__button:focus-visible img {
  filter: none;
  transform: none;
}

.client-gallery-viewer__grid.is-selection[data-reveal="press"] .client-photo-tile__button::after {
  background: rgba(44, 41, 38, 0.14);
}

.client-gallery-viewer__grid.is-selection[data-reveal="half-blur"] .client-photo-tile__button::after {
  left: 50%;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(9px);
}

.client-gallery-viewer__grid.is-selection[data-reveal="striped"] .client-photo-tile__button::after {
  background: repeating-linear-gradient(
    -35deg,
    rgba(255, 255, 255, 0.18) 0,
    rgba(255, 255, 255, 0.18) 12px,
    rgba(44, 41, 38, 0.08) 12px,
    rgba(44, 41, 38, 0.08) 24px
  );
}

.client-selection-bar {
  position: sticky;
  bottom: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 55px rgba(21, 19, 18, 0.18);
  backdrop-filter: blur(14px);
}

.client-selection-bar strong,
.client-selection-bar p {
  display: block;
}

.client-selection-bar p {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.client-selection-bar > div:last-child {
  display: flex;
  gap: 10px;
}

.client-zip-modal {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  place-items: center;
  padding: 20px;
}

.client-zip-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 13, 0.52);
}

.client-zip-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: #fffaf6;
  box-shadow: 0 28px 86px rgba(16, 14, 13, 0.34);
}

.client-zip-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.client-zip-modal__header span {
  color: var(--portal-caramel);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.client-zip-modal__header h2 {
  margin-top: 5px;
  font-family: var(--portal-font-title);
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 500;
  line-height: 0.96;
}

.client-zip-modal__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(89, 55, 29, 0.08);
  color: var(--portal-brown);
  font-size: 1.4rem;
  cursor: pointer;
}

.client-zip-modal__dialog > p {
  margin-top: 14px;
  color: var(--portal-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.client-zip-modal__details {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.client-zip-modal__details span {
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--portal-brown);
  font-size: 0.74rem;
  line-height: 1.4;
}

.client-zip-modal__progress {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.86);
}

.client-zip-modal__progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--portal-brown);
  font-size: 0.72rem;
  font-weight: 700;
}

.client-zip-modal__bar {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(89, 55, 29, 0.1);
}

.client-zip-modal__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-caramel), var(--portal-brown));
  transition: width 0.2s ease;
}

.client-zip-modal__progress p {
  margin-top: 8px;
  color: var(--portal-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.client-zip-modal__parts {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.client-zip-part {
  display: grid;
  width: 100%;
  min-height: 54px;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  border-radius: 6px;
  background: #fff;
  color: var(--portal-brown);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 14, 13, 0.08);
}

.client-zip-part__name,
.client-zip-part strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-zip-part__name {
  font-size: 0.72rem;
}

.client-zip-part strong {
  color: var(--portal-caramel);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.client-zip-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.client-zip-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9700;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: var(--portal-brown);
  color: #fff;
  box-shadow: 0 16px 48px rgba(16, 14, 13, 0.26);
  cursor: pointer;
}

.client-download-panel > .client-download-panel__parts {
  display: none !important;
}

.client-zip-mini span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-zip-mini strong {
  font-size: 0.82rem;
}

.client-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 14, 13, 0.9);
}

.client-lightbox img {
  display: block;
  max-width: min(1180px, 100%);
  max-height: calc(100vh - 138px);
  object-fit: contain;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

.client-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--portal-brown);
  font-size: 1.8rem;
  cursor: pointer;
}

.client-lightbox__nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--portal-brown);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.client-lightbox__nav--prev {
  left: 22px;
}

.client-lightbox__nav--next {
  right: 22px;
}

.client-lightbox__actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
}

body.is-lightbox-open {
  overflow: hidden;
}

@media print {
  body.is-protected-gallery .client-gallery-viewer,
  body.is-protected-gallery .client-lightbox {
    display: none !important;
  }

  body.is-protected-gallery::before {
    content: "Esta galeria de seleção não permite impressão.";
    display: block;
    margin: 80px auto;
    width: 80%;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 24px;
    text-align: center;
  }
}

@media (max-width: 940px) {
  .client-gallery-viewer__grid {
    column-count: 2;
  }

  .client-selection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-selection-bar > div:last-child {
    display: grid;
  }
}

@media (max-width: 640px) {
  .client-gallery-viewer {
    padding: 22px 16px 92px;
  }

  .client-gallery-cover {
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    margin-top: 0;
    margin-bottom: 24px;
  }

  .client-gallery-viewer.has-cover .client-gallery-viewer__header {
    margin-top: 0;
    padding: 86px 20px 70px;
  }

  .client-gallery-viewer.is-full-width {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .client-gallery-viewer.is-full-width .client-gallery-viewer__header,
  .client-gallery-viewer.is-full-width .client-gallery-viewer__notice,
  .client-gallery-viewer.is-full-width .client-download-panel {
    margin-right: 16px;
    margin-left: 16px;
  }

  .client-gallery-viewer.is-full-width.has-cover .client-gallery-viewer__header {
    margin-right: 0;
    margin-left: 0;
  }

  .client-download-panel {
    grid-template-columns: 1fr;
  }

  .client-download-panel__actions {
    display: grid;
    justify-content: stretch;
  }

  .client-download-panel__parts {
    display: grid;
  }

  .client-zip-modal {
    padding: 12px;
  }

  .client-zip-modal__dialog {
    width: 100%;
    max-height: calc(100svh - 24px);
    padding: 18px;
  }

  .client-zip-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-zip-modal__actions .client-primary-button,
  .client-zip-modal__actions .client-secondary-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .client-zip-mini {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-between;
    border-radius: 8px;
  }

  .client-gallery-viewer.is-full-width .client-selection-bar {
    margin-right: 0;
    margin-left: 0;
  }

  .client-gallery-viewer__header {
    grid-template-columns: 1fr;
  }

  .client-gallery-viewer__grid {
    column-count: 2;
  }

  .client-selection-bar {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .client-lightbox {
    padding: 12px;
  }

  .client-lightbox__actions {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .client-lightbox__actions .client-secondary-button {
    width: 100%;
  }

  .client-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .client-lightbox__nav--prev {
    left: 10px;
  }

  .client-lightbox__nav--next {
    right: 10px;
  }
}
