@import url("base.css");

/* Customer corner radii: var(--radius-sm|md|lg|pill|round) only — see tests/test_web_upload_radius_tokens.py */

body[data-photo-space] {
  transition: background-color 0.35s ease, background-image 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  body[data-photo-space] {
    transition: none;
  }
}

/* Safari 26+ samples fixed/sticky edge colors for toolbar tint (theme-color ignored).
   Mostly off-screen so Android/Chrome are unaffected when these nodes exist. */
.safari-chrome-tint {
  position: fixed;
  left: 0;
  width: 100%;
  min-height: 12px;
  pointer-events: none;
  z-index: 2;
}

.safari-chrome-tint-top {
  top: -8px;
}

.safari-chrome-tint-bottom {
  bottom: -8px;
}

:root {
  --select-pink: #e91e8c;
  --select-pink-dark: #c2185b;
  --select-pink-strong: #d5006d;
  --action-green: #1b8a3e;
  --action-green-dark: #146c30;
}

/* Single [hidden] rule replaces per-component display:none duplicates. */
[hidden] {
  display: none !important;
}

.page-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 18px;
  text-align: left;
}

.page-header-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.page-header h1 {
  margin: 0;
  width: auto;
}

.family-space-header-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.family-space-header-inline .family-space-select {
  flex: 1 1 auto;
}

.family-space-header-inline .family-space-status {
  width: 100%;
  margin: 0;
}

.header-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 8px;
  align-items: stretch;
}

.header-actions .header-btn {
  width: 100%;
  text-align: center;
}

.header-btn {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.header-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.header-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

a.header-btn {
  text-decoration: none;
  display: inline-block;
}

.login-form .primary {
  margin-top: 16px;
}

.guest-entry .login-form {
  margin-top: 0;
}

.guest-otp-block {
  margin: 0 0 8px;
}

.guest-otp-block .primary {
  width: 100%;
  margin-top: 4px;
}

.guest-otp-bypass {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.guest-otp-hint {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.guest-otp-countdown {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
}

.landing-mode-login .register-only,
.landing-mode-register .login-only {
  display: none !important;
}

#guidedUpload {
  position: relative;
}

.print-ready-preview {
  margin: 16px 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#printReadyPanel {
  text-align: center;
}

.print-ready-preview-title {
  margin: 16px 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.print-ready-preview img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #eef2f8;
}

.print-ready-wait {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  width: 100%;
}

.print-ready-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: var(--radius-round);
  animation: print-ready-spin 0.9s linear infinite;
}

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

.print-ready-wait-title {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--ink);
}

.print-ready-timer {
  margin: 0;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.resume-print-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #b7d0f5;
  border-radius: var(--radius-md);
  background: #eef5ff;
}

.resume-print-banner p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--ink);
}

.resume-print-banner button {
  width: 100%;
  margin-top: 0;
}

.voucher-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #b7e4c7;
  border-radius: var(--radius-md);
  background: #ecfdf3;
}

.voucher-banner-badge {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #065f46;
  background: #a7f3d0;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  text-transform: uppercase;
}

.voucher-banner-title {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.voucher-banner-text {
  margin: 0;
  font-size: 0.85rem;
  color: #475467;
}

.voucher-banner.is-unavailable {
  border-color: #f5c2c7;
  background: #fff1f2;
}

.voucher-banner.is-unavailable .voucher-banner-badge {
  color: #9f1239;
  background: #fecdd3;
}

.guided-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 4px;
}

.guided-pick-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.guided-actions button.primary,
.guided-pick-row button.primary {
  margin-top: 0;
}

.guided-pick-row button {
  flex: 1;
}

.guided-pick-row button.guided-pink,
.guided-actions>button.guided-pink {
  background: var(--select-pink-strong);
  border: 1px solid var(--select-pink-strong);
  color: #fff;
}

.guided-pick-row button.guided-pink:hover:not(:disabled),
.guided-actions>button.guided-pink:hover:not(:disabled) {
  background: var(--select-pink);
  border-color: var(--select-pink);
}

.guided-pick-row button.guided-green {
  background: var(--action-green);
  border: 1px solid var(--action-green);
  color: #fff;
  flex: 1.05;
}

.guided-pick-row button.guided-green:hover:not(:disabled) {
  background: var(--action-green-dark);
  border-color: var(--action-green-dark);
}

#printReadyDoneBtn.btn-blink-pink {
  background: var(--select-pink-strong);
  border: 1px solid var(--select-pink-strong);
  color: #fff;
  animation: print-ready-blink-pink 1.1s ease-in-out infinite;
}

@keyframes print-ready-blink-pink {

  0%,
  100% {
    background: var(--select-pink-strong);
    border-color: var(--select-pink-strong);
    box-shadow: 0 0 0 0 rgba(213, 0, 109, 0.55);
    opacity: 1;
  }

  50% {
    background: var(--select-pink);
    border-color: var(--select-pink);
    box-shadow: 0 0 18px 2px rgba(213, 0, 109, 0.45);
    opacity: 0.82;
  }
}

button.secondary {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

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

.guided-file-hosts {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.guided-file-hosts .file-input {
  position: static;
  width: 1px;
  height: 1px;
  font-size: 16px;
}

.modal-secondary-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

h2.section-title {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.sub {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.95rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 14px 0 6px;
}

input[type="tel"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  background: var(--card);
}

.phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-row select {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--card);
  color: var(--ink);
}

.phone-row input {
  flex: 1;
  min-width: 0;
}

.phone-row select:disabled {
  background: #eef2f8;
  color: var(--muted);
}

.phone-row.readonly select {
  background: #eef2f8;
  color: var(--muted);
  pointer-events: none;
}

.slots {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.slot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
}

.slot h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.slot-picker {
  position: relative;
  display: block;
  width: 100%;
  height: 300px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-md);
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

/* Real file input covers the whole box. Clipped/hidden inputs are ignored
   by Safari and some Chromium builds, so the picker never opens. */
.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 100px;
}

.slot-picker:hover,
.slot-picker:focus-visible {
  border-color: var(--brand);
  background: #eef4ff;
  outline: none;
}

.slot-picker.has-image {
  border-style: solid;
  background: #eef2f8;
}

/* display:block on img would override [hidden] and show a broken-image icon. */
.slot-picker img {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #eef2f8;
  z-index: 1;
  pointer-events: none;
}

.slot-picker.has-image img {
  display: block;
}

.slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px;
  text-align: center;
  user-select: none;
  z-index: 1;
  pointer-events: none;
}

.slot-picker.has-image .slot-placeholder {
  display: none;
}

/* Kept interaction-free while busy; only the photo/placeholder dims so the
   progress overlay on top stays crisp and readable. */
.slot-picker.is-optimizing {
  pointer-events: none;
}

.slot-picker.is-optimizing img,
.slot-picker.is-optimizing .slot-placeholder {
  opacity: 0.55;
}

.slot-progress {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 24px;
  text-align: center;
  background: rgba(244, 247, 251, 0.92);
  pointer-events: none;
}

.slot-progress-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  border-radius: var(--radius-round);
  animation: print-ready-spin 0.9s linear infinite;
}

.slot-progress-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.slot-progress-pct {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.slot-progress-bar {
  width: min(240px, 78%);
  height: 8px;
  border-radius: var(--radius-pill);
  background: #dbe4f0;
  overflow: hidden;
}

.slot-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand);
  transition: width 0.2s ease;
}

.slot-progress.is-indeterminate .slot-progress-pct {
  visibility: hidden;
}

.slot-progress.is-indeterminate .slot-progress-bar span {
  width: 40% !important;
  transition: none;
  animation: slot-progress-slide 1.1s ease-in-out infinite;
}

@keyframes slot-progress-slide {
  0% {
    margin-left: -40%;
  }

  100% {
    margin-left: 100%;
  }
}

.slot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  background: #e3ecf8;
  color: var(--brand);
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
}

.slot .state {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
  min-height: 1.2em;
}

.slot .state.ok {
  color: var(--ok);
  font-weight: 600;
}

.slot .state.err {
  color: var(--err);
  font-weight: 600;
}

button.primary {
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

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

button.primary.inline {
  width: auto;
  margin-top: 0;
}

.modal-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #eef4ff;
  color: var(--ink);
  font-size: 0.95rem;
  min-height: 1.4em;
}

.modal-status.ok {
  background: #e8f6ee;
  color: var(--ok);
  font-weight: 600;
}

.modal-status.err {
  background: #fdecea;
  color: var(--err);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

#generatingSheetModal.modal-overlay {
  align-items: flex-start;
  justify-content: center;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: 0;
  background: rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

#generatingSheetModal .modal {
  pointer-events: auto;
  max-width: 340px;
}

.modal {
  width: 100%;
  max-width: 400px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px 18px 18px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-round);
  background: #eef2f8;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* Family sheet look chooser */
#familyLookModal {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

#familyLookModal .family-look-modal {
  max-width: 390px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  text-align: center;
}

#familyLookModal .family-look-heading h2,
#familyShareModal .modal-header h2,
#familyShareAlbumModal .modal-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.family-look-header {
  position: relative;
  display: block;
  padding: 20px 20px 16px;
  margin: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
  border-bottom: 1px solid #e2e8f0;
}

.family-look-heading {
  display: block;
}

.family-look-heading-icon {
  margin: 0 auto 10px;
}

.family-look-heading h2,
.family-look-heading p {
  text-align: center;
}

#familyLookModal .modal-close,
#familyShareModal .modal-close,
#familyShareAlbumModal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.family-look-heading-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--brand);
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.12);
}

.family-look-body {
  padding: 16px 20px 20px;
}

.family-look-fields {
  display: grid;
  gap: 12px;
}

.family-look-field label,
.family-look-field-label {
  display: block;
  margin: 0 0 5px;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
}

.family-look-field select,
.family-share-field select,
.family-phone-field input,
.family-phone-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.family-look-field select:focus,
.family-share-field select:focus,
.family-phone-field input:focus,
.family-phone-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.family-look-default {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  justify-content: center;
}

.family-look-default input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.family-look-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.family-look-preview-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.family-look-preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

#familyLookModal .sheet-pick-layout-preview {
  min-height: 148px;
  margin: 0;
  padding: 8px;
  border: none;
  background: transparent;
}

#familyLookModal .sheet-pick-layout-grid {
  max-width: 86px;
  margin: 0 auto;
}

.family-look-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.family-look-actions button {
  min-height: 52px;
  margin: 0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
}

#familyLookModal .family-look-field select,
#familyShareModal .family-share-field select,
#familyShareAlbumModal .family-share-field select {
  text-align: center;
  text-align-last: center;
}

.family-look-actions .primary {
  flex: 1.45;
}

.family-look-actions .secondary {
  flex: 1;
}

/* Join success and family sharing dialogs */
.family-success-modal {
  max-width: 370px;
  text-align: center;
  padding: 26px 22px 22px;
}

.family-success-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: var(--radius-round);
  background: #dcfce7;
  color: #15803d;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 0 0 8px #f0fdf4;
}

.family-success-modal h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.family-success-modal p {
  margin: 0 0 18px;
  color: var(--muted);
}

.family-success-name {
  color: var(--ink);
  font-weight: 800;
}

.onboarding-success-modal {
  position: relative;
  overflow: hidden;
}

.onboarding-confetti {
  position: absolute;
  inset: 0 0 auto;
  height: 110px;
  overflow: hidden;
  pointer-events: none;
}

.onboarding-confetti-piece {
  position: absolute;
  top: -14px;
  left: var(--confetti-x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: #d12c72;
  animation: onboarding-confetti-fall 1.2s ease-out var(--confetti-delay) both;
}

.onboarding-confetti-piece:nth-child(3n) {
  background: #4b9953;
}

.onboarding-confetti-piece:nth-child(3n + 1) {
  background: #f3b52b;
}

.onboarding-confetti-piece:nth-child(4n) {
  width: 6px;
  height: 10px;
  border-radius: var(--radius-round);
}

@keyframes onboarding-confetti-fall {
  from {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  to {
    transform: translateY(115px) rotate(var(--confetti-rotate));
    opacity: 0;
  }
}

.family-form-modal {
  max-width: 380px;
}

#familyShareModal .family-form-modal,
#familyShareAlbumModal .family-form-modal {
  padding: 24px 20px 20px;
  text-align: center;
}

#familyDeleteModal .family-form-modal {
  max-width: 380px;
  padding: 28px 20px 22px;
  background: linear-gradient(180deg, #fff7fb 0%, #ffeaf3 100%);
  border: 1px solid #f4b6cf;
  box-shadow:
    0 0 0 2px rgba(255, 214, 230, 0.7),
    0 0 28px rgba(241, 126, 169, 0.42);
  text-align: center;
}

#familyDeleteModal .modal-header {
  position: relative;
  display: block;
  text-align: center;
}

#familyDeleteModal .modal-header h2 {
  margin: 0;
  text-align: center;
  font-size: 1.6rem;
  line-height: 1.2;
}

#familyShareModal .modal-header,
#familyShareAlbumModal .modal-header {
  position: relative;
  display: block;
  text-align: center;
}

#familyShareModal .family-share-info,
#familyShareModal .family-share-field label,
#familyShareAlbumModal .family-share-info,
#familyShareAlbumModal .family-share-field label {
  text-align: center;
}

.family-share-info {
  margin: 0 0 14px;
  padding: 13px 12px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: #334155;
  font-size: 1rem;
  font-weight: 700;
}

.family-share-field {
  margin-bottom: 12px;
}

.family-share-field label,
.family-phone-field > label {
  display: block;
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 800;
  color: #334155;
}

.family-phone-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
}

.family-phone-field select {
  padding-right: 8px;
}

.family-phone-field input {
  padding-right: 12px;
}

.family-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

#familyDeleteModal #familyDeleteBothBtn {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

#familyDeleteModal #familyDeleteBothBtn:hover,
#familyDeleteModal #familyDeleteBothBtn:focus-visible {
  background: #a91f1f;
  border-color: #a91f1f;
  color: #fff;
}

#familyDeleteModal #familyDeleteSharedBtn {
  background: #fff;
  border-color: #c62828;
  color: #c62828;
}

#familyDeleteModal #familyDeleteSharedBtn:hover,
#familyDeleteModal #familyDeleteSharedBtn:focus-visible {
  background: #fff5f5;
  border-color: #a91f1f;
  color: #a91f1f;
}

.family-form-actions button {
  flex: 1;
  min-height: 52px;
  margin: 0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
}

.account-summary {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #eef4ff;
  font-weight: 600;
  margin-bottom: 16px;
}

.account-settings {
  margin-bottom: 18px;
}

.account-settings h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.settings-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.account-settings select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: var(--card);
  margin-bottom: 4px;
}

.account-settings select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.album-picker-modal label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 4px;
}

.album-picker-select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 42px 12px 14px;
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23152033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  cursor: pointer;
}

.album-picker-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.album-picker-modal input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  margin: 6px 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.album-picker-modal input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.setting-status {
  display: block;
  min-height: 1.1em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.setting-status.ok {
  color: var(--ok);
}

.setting-status.err {
  color: var(--err);
}

.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.gallery-pagination button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.gallery-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gallery-page-jump-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.gallery-page-jump {
  min-width: 3.2em;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.gallery-page-jump:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sheets-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}

#sheetsSelectToolbar {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}

#sheetsSelectToolbar .sheets-primary-actions,
#sheetsSelectToolbar #sheetsMoveBtnRow {
  display: flex;
  gap: 8px;
  width: 100%;
}

#sheetsSelectToolbar #sheetsPrintCodeBtn {
  flex: 7 1 0;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 6px 10px;
  background: var(--select-pink);
  border-color: var(--select-pink);
  color: #fff;
  line-height: 1.2;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sheetsSelectToolbar #sheetsDeleteBtn {
  flex: 3 1 0;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 6px 10px;
  line-height: 1.2;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photos-toolbar {
  flex-direction: column;
  flex-wrap: nowrap;
}

.photos-toolbar-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.sheets-toolbar button {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  box-sizing: border-box;
}

.photos-toolbar .photos-toolbar-sheet {
  flex: 1 1 100%;
  background: var(--select-pink);
  border: 1px solid var(--select-pink);
  color: #fff;
}

.photos-toolbar-actions-row {
  gap: 6px;
  align-items: stretch;
}

.photos-toolbar-actions-row > #photosBulkUploadBtn {
  flex: 2 1 0;
  min-width: 0;
}

.photos-toolbar-actions-row > .photos-toolbar-delete,
.photos-toolbar-actions-row > #photosShareFamilyRow {
  flex: 1 1 0;
  min-width: 0;
}

#photosShareFamilyRow {
  min-width: 0;
}

#photosShareFamilyRow button {
  width: 100%;
}

.photos-toolbar-actions-row button {
  font-size: 0.72rem;
  padding: 6px 4px;
  min-height: 48px;
  line-height: 1.15;
  white-space: normal;
  hyphens: auto;
}

.photos-toolbar #photosBulkUploadBtn {
  background: var(--select-pink);
  border: 1px solid var(--select-pink);
  color: #fff;
}

.photos-toolbar #photosShareFamilyBtn {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

#photosShareFamilyBtn.bulk-select-trigger--success,
#photosShareFamilyBtn.bulk-select-trigger--success:hover,
#photosShareFamilyBtn.bulk-select-trigger--success:focus-visible {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
}

.bulk-select-trigger--success {
  background: #eefbf3;
  border: 1px solid #86d6a3;
  color: #147a3b;
}

.bulk-select-trigger--success[aria-pressed="true"] {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.photos-toolbar #photosShareFamilyBtn[aria-pressed="true"] {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
}

.photos-toolbar #photosBulkUploadBtn[aria-pressed="true"] {
  background: #0d47a1;
  border-color: #0d47a1;
  color: #fff;
}

.photos-toolbar .photos-toolbar-sheet[aria-pressed="true"] {
  background: var(--select-pink-dark);
  border-color: var(--select-pink-dark);
  color: #fff;
}

.photos-toolbar .photos-toolbar-delete,
.photos-toolbar .photos-toolbar-delete.danger {
  background: #c62828;
  border: 1px solid #c62828;
  color: #fff;
}

.photos-toolbar .photos-toolbar-delete.danger:disabled {
  opacity: 0.45;
}

.photos-toolbar .photos-toolbar-delete.danger[aria-pressed="true"] {
  background: #8e1b1b;
  border-color: #8e1b1b;
  color: #fff;
}

#sheetsSelectToolbar #sheetsDeleteBtn,
#sheetsSelectToolbar #sheetsDeleteBtn.danger {
  background: #fff;
  border: 1px solid #f0c4c4;
  color: #b06a6a;
}

.sheets-toolbar button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.sheets-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sheets-toolbar button[aria-pressed="true"] {
  background: #eef4ff;
}

.sheets-toolbar button.danger {
  background: #fff5f5;
  border-color: #e53935;
  color: #c62828;
}

.sheets-toolbar button.danger:disabled {
  opacity: 0.45;
}

.gallery-card.selectable {
  cursor: pointer;
}

.gallery-card.selectable:not(.selected) {
  outline: 2px dashed rgba(233, 30, 140, 0.45);
  outline-offset: -2px;
}

.gallery-card.selected {
  outline: 3px solid var(--select-pink);
  outline-offset: -3px;
  box-shadow: 0 0 0 2px rgba(233, 30, 140, 0.2);
}

.gallery-card.select-disabled {
  opacity: 0.72;
}

.sheet-select-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 3px solid var(--select-pink);
  box-shadow: 0 3px 12px rgba(233, 30, 140, 0.35);
  cursor: pointer;
}

.sheet-select-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 3px solid var(--select-pink);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
}

.sheet-select-checkbox:checked {
  border-color: var(--select-pink-dark);
  background: var(--select-pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2 6.4 11 12.5 4.8' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.sheet-select-checkbox:focus-visible {
  outline: 2px solid #ff9800;
  outline-offset: 2px;
}

.photos-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

#photosLibraryControls .photos-library-controls-filters .filter-chip {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
}

#photosLibraryControls .photos-library-controls-actions > #photosToggleFoldersBtn,
#photosLibraryControls .library-move-btn-row button {
  min-height: 48px;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.15;
  white-space: normal;
  box-sizing: border-box;
}

#photosLibraryControls .library-move-btn-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.photos-library-controls-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.photos-library-controls-row .filter-chip,
.photos-library-controls-row .library-move-btn-row {
  flex: 1 1 0;
  min-width: 0;
}

#photosLibraryControls .photos-library-controls-actions > #photosToggleFoldersBtn {
  flex: 0 0 50%;
}

.library-move-btn-row {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.library-move-btn-row button {
  flex: 1 1 0;
  width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

#photosLibraryControls .library-move-btn-row button.bulk-select-trigger--success,
#photosLibraryControls .library-move-btn-row button.bulk-select-trigger--success:hover,
#photosLibraryControls .library-move-btn-row button.bulk-select-trigger--success:focus-visible {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
}

.library-move-btn-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.family-space-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  white-space: nowrap;
}

.family-space-title-icon {
  font-size: 1rem;
  line-height: 1;
}

.family-space-select {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 28px 0 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a7e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat calc(100% - 10px) center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.family-space-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

.family-space-select option[value="__create_new__"] {
  font-weight: 700;
  color: var(--brand);
}

.family-invite-buttons-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.family-action-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.family-action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--brand);
}

.family-action-btn:active {
  transform: scale(0.98);
}

.family-action-btn .btn-icon {
  font-size: 0.95rem;
  flex: 0 0 auto;
}

/* Invite display card */
.family-invite-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  position: relative;
}

.family-invite-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.family-invite-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand);
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}

.family-invite-dismiss-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.family-invite-dismiss-btn:hover {
  color: var(--ink);
}

.family-invite-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 4px 0 2px;
}

.family-invite-qr-wrap canvas,
.family-invite-qr-wrap img {
  display: block;
  margin: 0 auto;
  max-width: 180px;
  max-height: 180px;
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  background: #ffffff;
  padding: 8px;
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

.family-invite-qr-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.family-invite-link-row {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: center;
  margin-top: 4px;
}

.family-invite-link-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.76rem;
  font-family: monospace;
  outline: none;
}

.family-invite-link-input:focus {
  border-color: var(--brand);
}

.family-invite-copy-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.family-invite-copy-btn:hover {
  background: #0d47a1;
}

.family-invite-copy-btn:active {
  transform: scale(0.97);
}

.family-space-status {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
  margin: 0;
  min-height: 0;
  line-height: 1.35;
}

.photos-library-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

#photosLibraryControls {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: stretch;
}

.photos-library-controls-panel {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  box-shadow: 0 1px 4px rgba(21, 32, 51, 0.07);
}

.photos-album-chips-wrap {
  margin-bottom: 8px;
}

.photos-album-chips-wrap .photos-filter-row {
  max-height: 132px;
  overflow-y: auto;
  padding-right: 2px;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.filter-chip.filter-chip-new {
  border-style: dashed;
}

.gallery-date-header {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 2px 2px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}

.photos-toolbar #photosMoveBtn,
.sheets-toolbar #sheetsMoveBtn {
  flex: 1 1 100%;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 48px;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.photos-toolbar #photosMoveBtn:disabled,
.sheets-toolbar #sheetsMoveBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.account-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  font-size: 0.92rem;
  cursor: pointer;
}

.account-password input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
  box-sizing: border-box;
}

.account-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.slot-choice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.slot-choice-actions button {
  width: 100%;
}

.photo-source-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.photo-source-actions button {
  width: 100%;
  margin-top: 0;
}

.photo-source-actions .photo-source-library {
  background: var(--select-pink-strong);
}

.photo-source-actions .photo-source-library:hover:not(:disabled) {
  background: var(--select-pink);
}

.photo-source-actions .photo-source-camera {
  background: var(--action-green);
}

.photo-source-actions .photo-source-camera:hover:not(:disabled) {
  background: var(--action-green-dark);
}

.upload-pick-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fce4f3;
  border: 1px solid rgba(233, 30, 140, 0.35);
  color: #8a1456;
  font-size: 0.9rem;
  line-height: 1.45;
}

.upload-pick-banner strong {
  color: #6d1044;
}

.sheet-pick-layout-preview {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
}

.sheet-pick-sequence-preview {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff8fc 0%, #fff 100%);
  border: 1px solid rgba(233, 30, 140, 0.28);
  box-shadow: 0 4px 16px rgba(233, 30, 140, 0.1);
}

.sheet-pick-sequence-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.sheet-pick-sequence-title,
.sheet-pick-sequence-hint {
  margin: 0;
}

.sheet-pick-sequence-title {
  color: #8a1456;
  font-size: 0.86rem;
  font-weight: 700;
}

.sheet-pick-sequence-count {
  color: var(--select-pink-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.sheet-pick-sequence-hint {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.sheet-pick-sequence-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}

.sheet-pick-sequence-empty {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(233, 30, 140, 0.3);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.sheet-pick-sequence-item {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--select-pink);
  border-radius: var(--radius-sm);
  background: #2a3548;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233, 30, 140, 0.2);
}

.sheet-pick-sequence-item:hover,
.sheet-pick-sequence-item:focus-visible {
  border-color: var(--select-pink-dark);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.2);
  outline: none;
}

.sheet-pick-sequence-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-pick-sequence-number {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--select-pink);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.sheet-pick-sequence-remove {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 21px;
  height: 21px;
  border-radius: var(--radius-round);
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 0.9rem;
  line-height: 19px;
  text-align: center;
  pointer-events: none;
}

.sheet-pick-sequence-item.active {
  border-width: 3px;
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.2), 0 5px 14px rgba(233, 30, 140, 0.28);
}

.sheet-pick-sequence-item.drag-mode {
  cursor: grab;
  border-color: #b36b9a;
}

.sheet-pick-sequence-item.drag-mode:active {
  cursor: grabbing;
}

.sheet-pick-sequence-item.dragging {
  opacity: 0.42;
}

.sheet-pick-sequence-item.drop-target {
  border-color: var(--select-pink-dark);
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.3);
}

.sheet-pick-sequence-handle {
  position: absolute;
  right: 4px;
  top: 4px;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 0.85rem;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}

.sheet-pick-sequence-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(233, 30, 140, 0.18);
}

.sheet-pick-sequence-active-label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.sheet-pick-sequence-action-buttons {
  display: flex;
  gap: 6px;
}

.sheet-pick-sequence-action-buttons button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.sheet-pick-sequence-action-buttons button:hover:not(:disabled) {
  border-color: var(--select-pink);
  color: var(--select-pink-dark);
}

.sheet-pick-sequence-action-buttons button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sheet-pick-sequence-action-buttons .remove-action {
  border-color: #efb4b4;
  color: var(--err);
}

.sheet-pick-sequence-trash {
  margin-top: 9px;
  padding: 9px;
  border: 1px dashed #d85a72;
  border-radius: var(--radius-sm);
  background: #fff4f5;
  color: #a22f4b;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.sheet-pick-sequence-trash.drag-over {
  background: #ffe1e7;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(216, 90, 114, 0.18);
}

.sheet-pick-layout-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.sheet-pick-layout-grid {
  display: grid;
  gap: 2px;
  width: min(100%, 156px);
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  background: #1a2230;
  padding: 3px;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.sheet-pick-layout-grid.layout-2x3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
}

.sheet-pick-layout-grid.layout-3x3 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.sheet-pick-layout-cell {
  position: relative;
  min-height: 0;
  min-width: 0;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #2a3548;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-pick-layout-cell.filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.35);
}

.sheet-pick-layout-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #2a3548;
}

.sheet-pick-layout-cell.duplicate-styled {
  opacity: 0.72;
}

.sheet-pick-layout-cell .cell-pick-label {
  position: absolute;
  left: 2px;
  bottom: 2px;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.sheet-pick-layout-cell.next-pick {
  box-shadow: 0 0 0 2px var(--select-pink);
}

.sheet-pick-order {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-round);
  background: var(--select-pink);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(233, 30, 140, 0.45);
  border: 2px solid #fff;
  pointer-events: none;
}

.gallery-card.sheet-pick-selected {
  outline: 3px solid var(--select-pink);
  outline-offset: -3px;
}

#panel-photos.active,
#panel-sheets.active {
  display: flex;
  flex-direction: column;
}

#photosGallery,
#sheetsGallery {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tab-panel-action-fab {
  position: sticky;
  bottom: 8px;
  z-index: 10;
  align-self: center;
  width: min(92%, 320px);
  margin-top: 16px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--action-green);
  border: 1px solid var(--action-green);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(27, 138, 62, 0.45);
}

.tab-panel-action-fab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tab-panel-action-fab.btn-blink-green {
  animation: tab-fab-blink-green 1.1s ease-in-out infinite;
}

@keyframes tab-fab-blink-green {

  0%,
  100% {
    background: var(--action-green-dark);
    border-color: var(--action-green-dark);
    box-shadow: 0 0 0 0 rgba(27, 138, 62, 0.55);
    opacity: 1;
  }

  50% {
    background: var(--action-green);
    border-color: var(--action-green);
    box-shadow: 0 0 18px 2px rgba(27, 138, 62, 0.45);
    opacity: 0.92;
  }
}

.tab-panel-action-fab.btn-blink-pink {
  background: var(--select-pink-strong);
  border-color: var(--select-pink-strong);
  animation: tab-fab-blink-pink 1.1s ease-in-out infinite;
}

@keyframes tab-fab-blink-pink {

  0%,
  100% {
    background: var(--select-pink-dark);
    border-color: var(--select-pink-dark);
    box-shadow: 0 0 0 0 rgba(213, 0, 109, 0.58);
    opacity: 1;
  }

  50% {
    background: var(--select-pink);
    border-color: var(--select-pink);
    box-shadow: 0 0 20px 3px rgba(233, 30, 140, 0.52);
    opacity: 0.92;
  }
}

.bulk-upload-panel {
  margin: 0 0 10px;
  padding: 8px 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid #f0b8d4;
  background: linear-gradient(180deg, #fff8fc 0%, #fff0f7 100%);
  box-shadow: 0 1px 4px rgba(233, 30, 140, 0.08);
}

.bulk-upload-heading {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1a2744;
}

.bulk-upload-status {
  margin-bottom: 0;
  min-height: 0;
  max-height: none;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #ffe4f0;
  border: 1px solid #f5a8cc;
  color: #9c1458;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  display: block;
  white-space: pre-line;
  overflow: visible;
}

.bulk-upload-status.err {
  background: #fff5f5;
  border-color: #ffcdd2;
  color: #c62828;
}

.bulk-upload-status.ok {
  background: #edf7ed;
  border-color: #c8e6c9;
  color: #2e7d32;
}

.bulk-upload-status.warn {
  background: #fff8e8;
  border-color: #ffe0a3;
  color: #8a5a00;
}

.bulk-upload-status-detail {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid #d6e4ff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line;
  max-height: 9.5rem;
  overflow: auto;
}

.bulk-upload-status-detail.err {
  border-color: #ffcdd2;
  color: #8b1c1c;
}

.bulk-upload-status-detail.warn {
  border-color: #ffe0a3;
  color: #6b4a00;
}

.bulk-upload-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid #c7d9ff;
  border-radius: var(--radius-md);
  background: #fff;
}

.bulk-upload-list:empty,
.bulk-upload-list[hidden] {
  display: none;
}

.bulk-upload-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.4;
  border-bottom: 1px solid #eef2f8;
}

.bulk-upload-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.bulk-upload-size {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.bulk-upload-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: #e2e8f0;
  overflow: hidden;
}

.bulk-upload-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b9bd5, #1565c0);
  transition: width 0.15s ease-out;
}

.bulk-upload-bar.is-indeterminate > span {
  width: 35% !important;
  animation: bulk-upload-indeterminate 1.1s ease-in-out infinite;
}

@keyframes bulk-upload-indeterminate {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(320%);
  }
}

.bulk-upload-item.is-queued {
  background: #fafbff;
}

.bulk-upload-item.is-preparing,
.bulk-upload-item.is-uploading {
  background: #f3f8ff;
}

.bulk-upload-item.is-uploaded {
  background: #f6fbf6;
}

.bulk-upload-item:last-child {
  border-bottom: 0;
}

.bulk-upload-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a2744;
}

.bulk-upload-phase {
  color: #4a5568;
}

.bulk-upload-item.is-uploaded .bulk-upload-phase {
  color: #2e7d32;
}

.bulk-upload-item.is-failed .bulk-upload-phase {
  color: #c62828;
}

.bulk-upload-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.bulk-upload-action-btn {
  flex: 0 1 auto;
  min-width: min(100%, 16rem);
  max-width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bulk-upload-action-primary {
  background: var(--select-pink);
  border-color: var(--select-pink);
  color: #fff;
}

.bulk-upload-action-dismiss {
  background: var(--card);
  border-color: var(--line);
  color: var(--brand);
}

/* Bulk CTA — only customer buttons that use --radius-pill (see design-system.html). */
.bulk-cta {
  position: sticky;
  bottom: 8px;
  z-index: 10;
  align-self: center;
  width: min(92%, 320px);
  margin-top: 16px;
  min-height: 48px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bulk-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Sticky bulk CTAs sit over centered modals on small screens — hide while any modal is open. */
body.upload-modal-open #photosBulkSelectCta,
body.upload-modal-open #sheetsBulkSelectCta,
body.upload-modal-open #createSheetFab {
  visibility: hidden;
  pointer-events: none;
}

/* Pin confirm/generate pills to the viewport while the tab panel is active (avoids lost CTAs below long grids). */
#panel-photos.active #createSheetFab:not([hidden]),
#panel-photos.active #photosBulkSelectCta:not([hidden]),
#panel-sheets.active #sheetsBulkSelectCta:not([hidden]),
#panel-sheets.active #createSheetcodeFab:not([hidden]) {
  position: fixed;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  width: min(calc(100vw - 36px), 320px);
  z-index: 12;
  margin-top: 0;
}

#panel-photos.active #photosGallery:has(#createSheetFab:not([hidden])),
#panel-photos.active #photosGallery:has(#photosBulkSelectCta:not([hidden])),
#panel-sheets.active #sheetsGallery:has(#sheetsBulkSelectCta:not([hidden])),
#panel-sheets.active #sheetsGallery:has(#createSheetcodeFab:not([hidden])) {
  padding-bottom: 80px;
}

.bulk-cta--primary {
  background: var(--select-pink);
  border-color: var(--select-pink);
  color: #fff;
  box-shadow: 0 8px 28px rgba(233, 30, 140, 0.35);
}

.bulk-cta--danger {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
  box-shadow: 0 8px 28px rgba(198, 40, 40, 0.35);
}

.bulk-cta--success {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
  box-shadow: 0 8px 28px rgba(27, 138, 62, 0.45);
}

.bulk-cta.btn-blink-green {
  animation: tab-fab-blink-green 1.1s ease-in-out infinite;
}

.bulk-cta.btn-blink-pink {
  animation: tab-fab-blink-pink 1.1s ease-in-out infinite;
}

.bulk-cta.btn-blink-red {
  animation: tab-fab-blink-red 1.1s ease-in-out infinite;
}

@keyframes tab-fab-blink-red {
  0%,
  100% {
    background: #8e1b1b;
    border-color: #8e1b1b;
    box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.55);
    opacity: 1;
  }

  50% {
    background: #c62828;
    border-color: #c62828;
    box-shadow: 0 0 20px 3px rgba(198, 40, 40, 0.52);
    opacity: 0.92;
  }
}

/* Toolbar control that enters multi-select mode (not the Bulk CTA itself). */
.bulk-select-trigger--primary {
  background: var(--select-pink);
  border: 1px solid var(--select-pink);
  color: #fff;
}

.bulk-select-trigger--primary[aria-pressed="true"] {
  background: var(--select-pink-dark);
  border-color: var(--select-pink-dark);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.bulk-select-trigger[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px rgba(21, 101, 192, 0.22);
}

.photos-toolbar .bulk-select-trigger[aria-pressed="true"] {
  background: #eef4ff;
}

.photos-toolbar .bulk-select-trigger.danger[aria-pressed="true"] {
  background: #8e1b1b;
  border-color: #8e1b1b;
  color: #fff;
}

.photos-toolbar .bulk-select-trigger--success[aria-pressed="true"] {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
}

#photosShareFamilyBtn.bulk-select-trigger[aria-pressed="true"] {
  background: var(--action-green);
  border-color: var(--action-green);
  color: #fff;
}

.filter-chip.bulk-select-trigger[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.filter-chip.bulk-select-trigger--primary,
.filter-chip.bulk-select-trigger--primary[aria-pressed="true"] {
  background: var(--select-pink);
  border-color: var(--select-pink);
  color: #fff;
}

.filter-chip.bulk-select-trigger--primary[aria-pressed="true"] {
  background: var(--select-pink-dark);
  border-color: var(--select-pink-dark);
}

.gallery-card .thumb-wrap img,
.gallery-card .thumb-wrap .thumb-placeholder {
  position: relative;
  z-index: 1;
}

.print-code-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.print-code-qr-wrap canvas,
.print-code-qr-wrap img {
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(21, 32, 51, 0.08);
}

.print-code-qr-label {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
}

.generating-sheet-message {
  margin: 0 0 16px;
  text-align: center;
  line-height: 1.5;
  color: var(--ink);
}

.generating-sheet-countdown {
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  margin: 0 0 18px;
  border-radius: var(--radius-md);
  background: #fff5f8;
  color: #6d1044;
  font-variant-numeric: tabular-nums;
}

.print-code-display {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 18px 12px;
  margin: 8px 0 12px;
  border-radius: var(--radius-md);
  background: #eef4ff;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.print-code-meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
  min-height: 1.2em;
}

.print-code-actions {
  display: flex;
  gap: 8px;
}

.print-code-actions button {
  flex: 1;
  margin-top: 0;
}

.print-code-actions button.danger {
  background: #fff5f5;
  border: 1px solid #e53935;
  color: #c62828;
}

.print-code-limit-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  color: #7a5b00;
  font-size: 0.88rem;
  line-height: 1.45;
}

.print-code-limit-banner strong {
  color: #5c4500;
}

.print-codes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.print-code-card-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.print-code-card-wrap .print-code-card {
  flex: 1;
  min-width: 0;
}

.print-code-card-delete {
  flex-shrink: 0;
  align-self: center;
  width: 44px;
  height: 44px;
  border: 1px solid #f0c4c4;
  border-radius: var(--radius-md);
  background: #fff5f5;
  color: #c62828;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.print-code-card-delete:active {
  transform: scale(0.97);
}

.print-code-card-delete svg {
  width: 20px;
  height: 20px;
}

.print-code-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.print-code-card:active {
  transform: scale(0.995);
}

.print-code-card-thumb {
  position: relative;
  width: 72px;
  height: 96px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef2f8;
  border: 1px solid var(--line);
}

.print-code-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.print-code-card-thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 6px;
  text-align: center;
}

.print-code-card-thumb .sheet-count-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.print-code-card-code {
  font-family: ui-monospace, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.print-code-card-meta {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.print-code-card-expiry {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.print-code-sheets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px 0 8px;
}

@media (min-width: 480px) {
  .print-code-sheets-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.print-code-sheet-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.print-code-sheet-card .thumb-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  background: #eef2f8;
  padding: 8px;
  text-align: center;
  box-sizing: border-box;
}

.print-code-sheet-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #eef2f8;
}

.print-code-sheet-card .meta {
  padding: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.sheet-detail-preview {
  margin: 0 0 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #eef2f8;
  border: 1px solid var(--line);
}

.sheet-detail-preview img {
  display: block;
  width: 100%;
  max-height: 42vh;
  object-fit: contain;
}

.sheet-detail-preview .thumb-placeholder {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.sheet-detail-preview .thumb-placeholder.processing {
  color: var(--brand);
  font-weight: 600;
}

.sheet-detail-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 14px;
  line-height: 1.45;
}

.sheet-detail-status.warn {
  color: #7a5b00;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.sheet-detail-modal {
  text-align: center;
}

.sheet-detail-modal .modal-header {
  position: relative;
  justify-content: center;
  text-align: center;
  padding-right: 40px;
  padding-left: 40px;
}

.sheet-detail-modal .modal-header h2 {
  width: 100%;
}

.sheet-detail-modal .modal-close {
  position: absolute;
  right: 0;
  top: 0;
}

.sheet-detail-modal .sheet-detail-qr-headline {
  text-align: center;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.35;
}

.sheet-detail-modal .settings-hint {
  text-align: center;
}

#printCodeSheetsModal .print-code-sheets-grid {
  max-height: 34vh;
}

#printReadyPanel .print-ready-preview {
  margin-top: 12px;
}

#status,
#guestStatus {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #eef4ff;
  color: var(--ink);
  font-size: 0.95rem;
  min-height: 1.4em;
}

#status:empty,
#guestStatus:empty {
  display: none;
}

#status.ok,
#guestStatus.ok {
  background: #e8f6ee;
  color: var(--ok);
  font-weight: 600;
}

#status.err,
#guestStatus.err {
  background: #fdecea;
  color: var(--err);
}

footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

#panel-photos[data-photos-chrome="library"] .photos-toolbar-sheet-row {
  display: none;
}

#panel-photos[data-photos-chrome="create-sheet"] .photos-toolbar-sheet-row,
#panel-photos[data-photos-chrome="create-sheet"] .photos-toolbar-library-row,
#panel-photos[data-photos-chrome="create-sheet"] #photosBulkUploadPanel {
  display: none;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ff6eb4 0%, var(--select-pink) 45%, var(--select-pink-dark) 100%);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 14px rgba(233, 30, 140, 0.45),
    0 0 28px rgba(213, 0, 109, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(120, 0, 60, 0.35);
}

.tabs button.active {
  background: var(--card);
  color: var(--select-pink-dark);
  text-shadow: none;
  box-shadow:
    0 1px 4px rgba(21, 32, 51, 0.12),
    0 0 12px rgba(233, 30, 140, 0.35);
}

.tabs .tab-account {
  color: rgba(255, 255, 255, 0.95);
}

.tabs .tab-account.active {
  color: var(--select-pink-dark);
}

.tabs.tabs-many button[data-tab] {
  font-size: 0.74rem;
  padding: 9px 4px;
}

.family-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.family-tab-card {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 1px 4px rgba(21, 32, 51, 0.05);
}

.family-tab-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.family-members-heading {
  margin-top: 16px !important;
}

.family-tab-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.family-defaults-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.family-default-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.family-default-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.family-default-item select {
  width: 100%;
  min-height: 38px;
  padding: 0 24px 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  text-align: center;
  text-align-last: center;
}

.family-defaults-save {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.family-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.family-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.family-member-row.is-self {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.family-member-row.is-pending {
  border-style: dashed;
  opacity: 0.92;
}

.family-member-main {
  flex: 1;
  min-width: 0;
}

.family-member-phone {
  font-weight: 700;
  font-size: 0.9rem;
}

.family-member-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.family-member-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: #e0e7ff;
  color: #3730a3;
}

.family-member-badge.owner {
  background: #fef3c7;
  color: #92400e;
}

.family-member-badge.pending {
  background: #fce7f3;
  color: #9d174d;
}

.family-member-actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.family-member-actions button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.family-member-actions button.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.family-tab-leave-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border-radius: var(--radius-md);
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font-weight: 600;
  cursor: pointer;
}

.sheets-print-codes {
  margin-bottom: 14px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  border-radius: var(--radius-md);
}

.sheets-print-codes .section-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.sheets-print-codes .print-code-limit-banner {
  margin-bottom: 8px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.sheets-print-codes .print-codes-list {
  gap: 6px;
}

.sheets-print-codes .print-code-card {
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-md);
}

.sheets-print-codes .print-code-card-thumb {
  width: 56px;
  height: 72px;
  border-radius: var(--radius-sm);
}

.sheets-print-codes .print-code-card-code {
  font-size: 1.1rem;
}

.sheets-print-codes .print-code-card-meta,
.sheets-print-codes .print-code-card-expiry {
  font-size: 0.74rem;
}

.sheets-print-codes .print-code-card-delete {
  width: 38px;
  height: 38px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.gallery-placeholder {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-card .thumb-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #eef2f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.gallery-card .thumb-placeholder {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 12px;
  text-align: center;
}

.gallery-card .meta {
  padding: 8px 10px 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.photo-uploader {
  font-size: 0.72rem;
  font-weight: 600;
  color: #2b6cb0;
  line-height: 1.25;
  margin-top: 2px;
}

.photo-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge.date-chip {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.72rem;
  background: #eef0f4;
  color: #4a5568;
}

.badge.date-chip-taken {
  background: var(--brand);
  color: #fff;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-right: 4px;
}

.badge.sheet-used {
  background: #e8f0ff;
  color: #1a4a8a;
}

.badge.printed {
  background: #e8f6ee;
  color: var(--ok);
}

.badge.processing {
  background: #fff6e5;
  color: #b26a00;
}

.badge.failed {
  background: #fdecea;
  color: var(--err);
}

.badge.ready {
  background: #eef4ff;
  color: var(--brand);
}

.gallery-loading {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  touch-action: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in;
}

.lightbox img.is-zoomed {
  cursor: grab;
}

.lightbox img.is-zoomed:active {
  cursor: grabbing;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 0.78rem;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.phone-row.readonly input {
  background: #eef2f8;
  color: var(--muted);
  pointer-events: none;
}

body.landing-simple .header-actions,
body.landing-simple .tabs {
  display: none !important;
}

body.guest-flow .tabs {
  display: none !important;
}

/* First-login Quick Sheet tutorial */
.onboarding-active .tabs button[data-tab]:not([data-tab="upload"]) {
  display: none !important;
}

.onboarding-active #accountBtn,
.onboarding-active #installAppBtn {
  display: none !important;
}

.onboarding-active #printReadyDoneBtn {
  display: none !important;
}

.onboarding-active #printReadyClose {
  display: none !important;
}

.onboarding-active #familySpaceHeaderWrap {
  display: none !important;
}

#onboardingOverlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

#onboardingSpotlight {
  position: fixed;
  z-index: 9001;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.62);
  pointer-events: none;
}

#onboardingCard {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9002;
  margin: 0 auto;
  max-width: 420px;
  padding: 22px 20px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fff8fc 100%);
  border: 2px solid rgba(233, 30, 140, 0.4);
  box-shadow:
    0 0 18px rgba(233, 30, 140, 0.5),
    0 0 36px rgba(213, 0, 109, 0.28),
    0 14px 44px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  text-align: center;
}

#onboardingCard.onboarding-compact-card {
  max-width: 360px;
  padding: 12px 14px 14px;
  border-radius: var(--radius-md);
}

#onboardingCard h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  text-align: center;
}

#onboardingCard.onboarding-compact-card h2 {
  margin-bottom: 6px;
  font-size: 1.12rem;
}

#onboardingBody {
  margin: 0 0 18px;
  color: var(--text-muted, #555);
  font-size: 1.12rem;
  line-height: 1.5;
  text-align: center;
}

#onboardingCard.onboarding-compact-card #onboardingBody {
  margin-bottom: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
}

#onboardingCta {
  width: 100%;
}

#onboardingSkipBtn {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 9011;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 7px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.2;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}

.onboarding-active main.onboarding-inert * {
  pointer-events: none !important;
}

.onboarding-active main.onboarding-inert .onboarding-focus,
.onboarding-active main.onboarding-inert .onboarding-focus *,
.onboarding-active.showing-print-ready main.onboarding-inert #printReadyPanel,
.onboarding-active.showing-print-ready main.onboarding-inert #printReadyPanel *,
.onboarding-active #onboardingCard,
.onboarding-active #onboardingCard *,
.onboarding-active .modal-overlay:not([hidden]),
.onboarding-active .modal-overlay:not([hidden]) * {
  pointer-events: auto !important;
}

.onboarding-active #onboardingCard.onboarding-coach-hidden {
  display: none !important;
}

.onboarding-active.showing-print-ready #printReadyPanel {
  position: relative;
  z-index: 1;
}

.onboarding-active.showing-print-ready #onboardingCard:not(.onboarding-coach-hidden) {
  z-index: 9010;
}

.onboarding-active .modal-overlay:not([hidden]),
body.generating-sheet-open .modal-overlay:not([hidden]) {
  z-index: 9100;
}

.onboarding-active.showing-print-ready #printReadyPanel {
  z-index: 9005;
}

.onboarding-active.generating-sheet-open #onboardingCard {
  display: none !important;
}

/* Stop infinite spin/blink animations when the user prefers reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .print-ready-spinner,
  .slot-progress-spinner,
  .slot-progress.is-indeterminate .slot-progress-bar span,
  #printReadyDoneBtn.btn-blink-pink,
  .tab-panel-action-fab.btn-blink-green,
  .tab-panel-action-fab.btn-blink-pink,
  .bulk-cta.btn-blink-green,
  .bulk-cta.btn-blink-pink,
  .bulk-cta.btn-blink-red {
    animation: none !important;
  }
}

.auth-debug-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  max-height: 38vh;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #e8f5e9;
  background: rgba(0, 0, 0, 0.88);
  border-top: 2px solid #66bb6a;
  pointer-events: none;
}

.auth-debug-line + .auth-debug-line {
  margin-top: 0.15rem;
}

.sheet-price-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface2, #f8fafc);
}

.sheet-price-total {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--accent2, #0f766e);
}

.sheet-price-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted, #64748b);
}

.sheet-price-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed var(--border, #e2e8f0);
}

.sheet-price-lines li:last-child {
  border-bottom: none;
}

.sheet-price-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted, #64748b);
}

.print-ready-price {
  display: block;
  margin: 14px auto 10px;
  padding: 12px 18px;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  background: #fffbeb;
  box-shadow:
    0 0 8px rgba(245, 158, 11, 0.65),
    0 0 22px rgba(245, 158, 11, 0.35);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent2, #0f766e);
}

.sheet-detail-price {
  text-align: center;
  width: fit-content;
  max-width: 100%;
}

.sheet-price-badge {
  color: var(--accent2, #0f766e);
  background: #e6fffb;
  font-weight: 700;
}

/* —— Sheet look customizer —— */
.sheet-look-modal {
  max-width: 440px;
  width: calc(100% - 24px);
  max-height: min(92vh, 820px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sheet-look-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

#sheetLookTitle {
  margin: 0;
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}

.sheet-look-body {
  padding: 14px 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-look-last-row {
  margin: 0 0 12px;
}

.sheet-look-last-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
  background: #eef4ff;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.sheet-look-section {
  margin: 0 0 16px;
}

.sheet-look-section h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sheet-look-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sheet-look-cards-layout,
.sheet-look-cards-theme,
.sheet-look-cards-style {
  grid-template-columns: 1fr 1fr;
}

.sheet-look-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.sheet-look-card:hover:not(:disabled) {
  border-color: #90caf9;
}

.sheet-look-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.18);
  background: #f3f8ff;
}

.sheet-look-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sheet-look-card strong {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.sheet-look-card-blurb,
.sheet-look-card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}

.sheet-look-card-meta {
  font-weight: 700;
  color: #475569;
}

.sheet-look-media {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
}

.sheet-look-preview {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-muted, #e8e8e8);
}

.sheet-look-card-price {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  margin: 0.1rem 0 0.15rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: var(--radius-pill);
  background: #e6fffb;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-strong, #0d6b4f);
}

.sheet-look-card-price.on-preview {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  margin: 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  background: rgba(230, 255, 251, 0.96);
}

.sheet-look-swatch {
  display: block;
  width: 100%;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.12);
  margin-bottom: 4px;
}

.sheet-look-swatch.pattern {
  background-image: repeating-linear-gradient(
    -40deg,
    rgba(255, 255, 255, 0.35) 0 6px,
    transparent 6px 14px
  );
}

.sheet-look-diagram {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.sheet-look-cards-layout .sheet-look-diagram {
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.sheet-look-diagram-row {
  display: flex;
  flex: 1;
  gap: 2px;
}

.sheet-look-diagram-cell {
  display: grid;
  place-items: center;
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: #e2e8f0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.sheet-look-price {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #f8fafc;
}

.sheet-look-price-total {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -0.02em;
}

.sheet-look-price-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.sheet-look-price-lines li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
}

.sheet-look-price-lines li:last-child {
  border-bottom: none;
}

.sheet-look-price-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.sheet-look-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}

.sheet-look-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.sheet-look-actions {
  display: flex;
  gap: 8px;
}

.sheet-look-actions .primary {
  flex: 1.5;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 800;
}

.sheet-look-actions .secondary {
  flex: 1;
  min-height: 52px;
  font-weight: 700;
}

.sheet-pick-layout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sheet-pick-change-look {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 2px solid var(--select-pink);
  border-radius: var(--radius-md);
  background: var(--select-pink);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.sheet-pick-change-look:hover,
.sheet-pick-change-look:focus-visible {
  background: var(--select-pink-dark);
  border-color: var(--select-pink-dark);
  color: #fff;
}

.sheet-pick-layout-header .sheet-pick-layout-title {
  margin: 0;
}

@media (max-width: 420px) {
  .sheet-look-modal {
    width: 100%;
    max-width: none;
    max-height: 96vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-top: auto;
  }

  .modal-overlay:has(.sheet-look-modal) {
    align-items: flex-end;
  }
}

