/* Modal utilities and shared styling */
.modal-hidden {
  display: none !important;
}

.modal-icon-alert {
  font-size: 36px;
  color: #f87171;
  margin-bottom: 12px;
}

.modal-warning-text {
  color: #f87171;
  font-size: 16px;
  margin-top: 12px;
  font-weight: 500;
}

.modal-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-input {
  margin-top: 12px;
  padding: 8px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #2f2f2f;
  background: #0f0f0f;
  color: #fff;
}

.logo-40 {
  width: 40px;
  height: 40px;
}

.star-row {
  display: flex;
  gap: 3px;
  color: gold;
  font-size: 16px;
  margin-top: 4px;
  margin-bottom: 12px;
  justify-content: center;
}

.star-row span {
  line-height: 1;
}

.star-row.star-row--small {
  font-size: 12px;
  margin-top: 0;
  margin-bottom: 0;
}

.share-subheadline-muted {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 40px;
  margin-bottom: 0;
}

.share-note-compact {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 0;
}

.modal-title-accent {
  color: #00bcd4;
  text-align: center;
  margin-bottom: 10px;
}

.modal-content-large {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(90vw, 900px);
  min-height: 75vh;
  max-height: 90vh;
  margin: 0 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  background: #111;
  border-radius: 16px;
  border: 1px solid #00bcd4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 24px 24px 20px;
  color: #fff;
  gap: 8px;
}

.modal-content-large .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #ccc;
  cursor: pointer;
}

.modal-body {
  max-height: calc(90vh - 200px);
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

/* My animations + public gallery */
#myAnimationsModal .modal-content-large,
#publicGalleryModal .modal-content-large {
  width: min(90vw, 900px);
  height: auto;
  display: flex;
  flex-direction: column;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  max-height: 90vh;
}

#myAnimationsModal .modal-content-large {
  overflow: visible;
}

#myAnimationsModal .modal-content-large.export-busy {
  position: relative;
}

#myAnimationsModal .modal-content-large.export-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(1px);
  z-index: 6;
}

#myAnimationsModal .modal-content-large.export-busy .project-card {
  pointer-events: none;
  opacity: 0.9;
}

.my-animations-content {
  max-height: 90vh;
  overflow-y: auto;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
}

.my-animations-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 10px 8px 14px;
}

.my-animations-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 10px 0 6px;
  border: 1px solid rgba(0, 188, 212, 0.25);
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn {
  border: none;
  background: transparent;
  color: #a9c8d2;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: rgba(0, 188, 212, 0.18);
  color: #e8f7fa;
  box-shadow: inset 0 0 0 1px rgba(0, 188, 212, 0.35);
}

.tab-btn:hover {
  color: #e8f7fa;
}

.tab-panel {
  display: none;
}

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

.tab-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 6px 0 10px;
}

.tab-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 188, 212, 0.4);
  background: rgba(0, 188, 212, 0.08);
  color: #9cdce9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-action-btn svg,
.tab-action-btn i {
  pointer-events: none;
}

.tab-action-btn:hover {
  background: rgba(0, 188, 212, 0.14);
  color: #e8f7fa;
  box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.45);
}

.tab-action-btn:active {
  transform: translateY(1px);
}

.tab-action-btn-ready {
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.5), 0 0 12px rgba(0, 188, 212, 0.35);
  animation: tabReadyPulse 1.6s ease-in-out infinite;
}

@keyframes tabReadyPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.45), 0 0 10px rgba(0, 188, 212, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.25), 0 0 18px rgba(0, 188, 212, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.45), 0 0 10px rgba(0, 188, 212, 0.3); }
}

.modal-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  margin-bottom: 16px;
}

.modal-hero .modal-hero-label {
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 16px;
  color: #00bcd4;
  text-transform: uppercase;
}

#userGifGallery {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  overflow-y: auto;
  max-height: 50vh;
  padding-right: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#userGifGallery::-webkit-scrollbar {
  display: none;
}

#pullToRefreshIndicator {
  text-align: center;
  padding: 10px;
  color: #888;
  font-size: 14px;
  display: none;
}

#publicGalleryModal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  padding: clamp(10px, 4vw, 20px);
  box-sizing: border-box;
  overscroll-behavior-y: contain;
  height: 100vh;
  min-height: 100vh;
}

.gallery-modal-content {
  position: relative;
  width: min(90vw, 900px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  align-self: center;
  top: auto;
  left: auto;
  transform: none;
  box-sizing: border-box;
}

#closePublicGalleryModal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  cursor: pointer;
  z-index: 6;
}

.gallery-action-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}

.gallery-action-row button {
  background: rgba(0, 188, 212, 0.08);
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-radius: 10px;
  cursor: pointer;
  margin: 0;
  padding: 8px 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gallery-action-row button:hover {
  transform: rotate(-10deg);
  border-color: #00bcd4;
  box-shadow: 0 8px 24px rgba(0, 188, 212, 0.15);
}

.gallery-action-row button:hover {
  transform: translateY(-1px);
}

.gallery-action-row button svg {
  display: block;
  fill: #00bcd4;
}

.gallery-action-row button img.gallery-action-icon {
  display: block;
  height: 24px;
  width: auto;
  border-radius: 6px;
}

.gallery-action-row button i {
  color: #00bcd4;
  font-size: 16px;
}

.gallery-action-row button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  border-color: rgba(0, 188, 212, 0.15);
}

.gallery-action-row button:disabled:hover {
  transform: none;
}

.my-projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.gallery-section-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.section-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7dc7d6;
}

.section-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.gallery-action-row--compact {
  margin-bottom: 0;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.project-limit-notice {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.16), rgba(0, 188, 212, 0.05));
  border: 1px solid rgba(0, 188, 212, 0.38);
  box-shadow: 0 10px 28px rgba(0, 188, 212, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.project-limit-eyebrow {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7dc7d6;
  font-weight: 700;
}

.project-limit-notice p {
  margin: 0;
  color: #d7f3f7;
  line-height: 1.45;
  max-width: 520px;
}

.project-limit-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.project-limit-count {
  background: rgba(0, 188, 212, 0.12);
  color: #e0f7fa;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 188, 212, 0.4);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.project-limit-notice .premium-upgrade-btn {
  box-shadow: 0 10px 26px rgba(0, 188, 212, 0.25);
  margin-top: 0 !important;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 188, 212, 0.35);
  box-shadow: 0 8px 26px rgba(0, 188, 212, 0.18);
}

.project-card-current {
  border-color: rgba(0, 188, 212, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.4), 0 0 18px rgba(0, 188, 212, 0.22);
  background: linear-gradient(130deg, rgba(0, 188, 212, 0.14), rgba(0, 188, 212, 0.04) 40%, rgba(255, 255, 255, 0.04));
  position: relative;
}

.project-card-highlight {
  animation: projectSavedPulse 1.2s ease-in-out;
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.45), 0 8px 24px rgba(0, 188, 212, 0.25);
}

@keyframes projectSavedPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.4); transform: scale(1); }
  40% { box-shadow: 0 0 0 6px rgba(0, 188, 212, 0.2); transform: scale(1.01); }
  100% { box-shadow: 0 0 0 0 rgba(0, 188, 212, 0.0); transform: scale(1); }
}

.project-card h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.2px;
  word-break: break-word;
}

.project-card--renaming {
  outline: 1px dashed rgba(0, 188, 212, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.28);
}

.project-card--renaming .project-card-actions {
  opacity: 0.6;
  pointer-events: none;
}

.project-rename-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(0, 188, 212, 0.4);
  background: rgba(0, 0, 0, 0.45);
  color: #e8f7fa;
  font-weight: 600;
  font-size: 15px;
}

.project-meta {
  margin: 2px 0 0;
  color: #9ab;
  font-size: 12px;
}

.project-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.35);
  color: #d7f3f7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.project-shared-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(0, 188, 212, 0.32), rgba(0, 188, 212, 0.08));
  border: 1px solid rgba(0, 188, 212, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.project-shared-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.project-shared-avatar--has-image img {
  opacity: 1;
}

.project-shared-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #e8f7fa;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.project-shared-avatar--has-image .project-shared-avatar-fallback {
  opacity: 0;
}

.project-shared-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-shared-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5fbff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.project-shared-from {
  color: #d7f3f7;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.project-shared-email {
  color: #9ab;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1px;
  word-break: break-all;
}

.project-shared-badge::before {
  content: "\f1d8";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #00bcd4;
  font-size: 12px;
}
#confirmProjectSaveBtn.btn-saving {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.92;
}
#confirmProjectSaveBtn.btn-saving::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #00bcd4;
  border-radius: 50%;
  animation: saveBtnSpin 0.9s linear infinite;
}

@keyframes saveBtnSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.project-info {
  flex: 1;
  min-width: 180px;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-thumb {
  width: 90px;
  height: 56px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  aspect-ratio: 16 / 10;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.4);
  filter: saturate(1.05);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-thumb.thumb-loaded img {
  opacity: 1;
}

.project-thumb:not(.thumb-loaded):not(.project-thumb-empty)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 188, 212, 0.08), rgba(0, 188, 212, 0.18), rgba(0, 188, 212, 0.08));
  background-size: 200% 100%;
  animation: thumbShimmer 1.2s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes thumbShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.project-thumb-empty {
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.18), rgba(0, 188, 212, 0.05));
}

.project-card-actions .icon-btn {
  font-size: 18px;
  color: #b8c4d2;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.project-card-actions .icon-btn:hover {
  color: #00bcd4;
  transform: translateY(-1px);
}

.project-progress-inline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.project-progress-inline .fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00c853, #4caf50);
  transition: width 0.15s ease;
}

.project-progress-inline .label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #e8fbff;
}

.project-export-btn {
  border: 1px solid rgba(0, 188, 212, 0.4);
  background: rgba(0, 188, 212, 0.08);
  color: #c8f5ff;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.project-export-btn:hover {
  background: rgba(0, 188, 212, 0.16);
  color: #e8fbff;
  box-shadow: 0 0 0 1px rgba(0, 188, 212, 0.45);
}
.project-export-btn:active {
  transform: translateY(1px);
}

.project-share-status {
  min-height: 18px;
  margin: 6px 0 0;
  color: #a8c1cf;
}

.project-share-status.text-error {
  color: #ff8a80 !important;
}

.project-share-status.text-success {
  color: #7ee0a3 !important;
}

/* Project share modal — align with existing modal style */
#projectShareModal .project-share-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 720px;
  padding: 30px 28px 24px;
  border: 1px solid rgba(0, 188, 212, 0.32);
  border-radius: 14px;
  background: radial-gradient(circle at 18% 20%, rgba(0, 188, 212, 0.12), rgba(255, 255, 255, 0)) #0e1114;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 188, 212, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  backdrop-filter: blur(8px);
}

#projectShareModal .close {
  top: 12px;
  right: 14px;
  color: #c3d4de;
}

.project-share-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 4px 0 2px;
}

.project-share-logo {
  filter: drop-shadow(0 0 10px rgba(0, 188, 212, 0.35));
}

.project-share-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-share-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.project-share-subtitle {
  margin: 0 auto;
  max-width: 520px;
  color: #c1d5e2;
  font-size: 14px;
  line-height: 1.5;
}

.project-share-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(0, 188, 212, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  width: 100%;
  max-width: 660px;
  text-align: left;
}

.project-share-thumb {
  width: 108px;
  height: 76px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 28% 20%, rgba(0, 188, 212, 0.16), rgba(0, 188, 212, 0.02));
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.project-share-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.project-share-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: #e6f6fb;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 188, 212, 0.08));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-share-thumb.loaded .project-share-thumb-img {
  opacity: 1;
}

.project-share-thumb.loaded .project-share-thumb-fallback {
  opacity: 0;
  transform: scale(0.96);
}

.project-share-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.project-share-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #9ed9e7;
  font-weight: 700;
}

.project-share-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-share-name {
  font-size: 18px;
  font-weight: 700;
  color: #e9f7fb;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-share-note {
  margin: 0;
  font-size: 12px;
  color: #9fb3c1;
}

.project-share-hint {
  margin: 0;
  font-size: 12px;
  color: #9fb3c1;
  line-height: 1.5;
}

.project-share-peer-note {
  margin: 0 auto;
  max-width: 640px;
  font-size: 13px;
  line-height: 1.6;
  color: #c6d6e0;
}

.project-share-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 4px;
  align-items: center;
  width: 100%;
  text-align: left;
}

.project-share-note-row {
  width: clamp(280px, 82vw, 640px);
  max-width: 640px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-share-note-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-share-char {
  font-size: 12px;
  color: #9fb3c1;
  letter-spacing: 0.3px;
  font-weight: 700;
  white-space: nowrap;
}

.project-share-char.limit-near {
  color: #f6c344;
}

.project-share-fields label {
  width: 100%;
  max-width: 640px;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-transform: none;
  color: #c6d6e0;
  font-weight: 600;
  text-align: left;
}

.project-share-input {
  width: clamp(280px, 82vw, 640px);
  max-width: 640px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e8f7fa;
  font-size: 15px;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.project-share-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.project-share-input:focus {
  outline: none;
  box-shadow: 0 10px 30px rgba(0, 188, 212, 0.12);
  border-color: rgba(0, 188, 212, 0.5);
  background: rgba(0, 188, 212, 0.08);
}

.project-share-hint,
.project-share-note {
  text-align: left;
}

.project-share-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
  max-width: 460px;
}

.project-share-actions .btn-cancel,
.project-share-actions .btn-primary {
  flex: 1;
  max-width: none;
}

.project-share-actions .btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e3edf3;
}

.project-share-actions .btn-cancel:hover {
  border-color: rgba(0, 188, 212, 0.4);
  color: #e8fbff;
}

.project-share-actions .btn-primary {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 10px 40px rgba(0, 188, 212, 0.18);
}

/* Handoff modal */
#handoffMessageModal {
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 24px;
  background-color: rgba(0, 0, 0, 0.6);
}

.handoff-card {
  position: absolute;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 540px);
  background: linear-gradient(145deg, rgba(0, 188, 212, 0.16), rgba(18, 26, 33, 0.96) 50%, rgba(7, 11, 15, 0.98));
  border-radius: 18px;
  border: 1px solid rgba(0, 188, 212, 0.4);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #e8f7fa;
  padding: 16px 18px 18px;
  z-index: 100000;
  backdrop-filter: blur(10px);
}

.handoff-card--dragging {
  cursor: grabbing;
}

.handoff-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
  cursor: grab;
  user-select: none;
}

.handoff-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 188, 212, 0.28), rgba(0, 188, 212, 0.16));
  color: #ecfbff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.handoff-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dcebf3;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.handoff-close:hover {
  color: #fff;
  border-color: rgba(0, 188, 212, 0.6);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.22);
}

.handoff-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.handoff-sender {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row;
}

.handoff-sender-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.2;
}

.handoff-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(0, 188, 212, 0.3), rgba(0, 188, 212, 0.08));
  border: 1px solid rgba(0, 188, 212, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.handoff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.handoff-avatar--has-image img {
  opacity: 1;
}

.handoff-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #e8f7fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.handoff-avatar--has-image .handoff-avatar-fallback {
  opacity: 0;
}

.handoff-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.handoff-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.handoff-title-row h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.handoff-meta-muted {
  color: #a7c4d1;
  font-size: 12px;
}

.handoff-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
}

.handoff-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.handoff-meta-item.handoff-sender {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.handoff-meta-grid .handoff-meta-item:last-child {
  align-items: flex-end;
  text-align: right;
}

.handoff-meta-grid + .handoff-note {
  margin-top: 2px;
}

.handoff-label {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
  color: #9ed9e7;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.2;
}

.handoff-value {
  font-size: 15px;
  font-weight: 700;
  color: #e8f7fa;
  overflow-wrap: anywhere;
}

.handoff-note {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 188, 212, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.55;
  color: #eaf9ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
}

@media (max-width: 540px) {
  .handoff-meta-grid {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .handoff-meta-grid .handoff-meta-item:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .handoff-card {
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 14px 16px;
  }
}

@media (max-width: 520px) {
  .project-share-summary {
    grid-template-columns: 1fr;
  }

  .project-share-thumb {
    width: 100%;
    height: 150px;
  }
}

.gallery-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  margin: 12px 0 10px;
}

.gallery-subtitle {
  margin: 0 0 6px 2px;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #cddbf5;
}

.input-hint {
  margin: 8px 0 14px;
  color: #9ab;
  font-size: 13px;
}

#galleryCinemaOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(0, 188, 212, 0.08), transparent 35%), radial-gradient(circle at 80% 80%, rgba(0, 188, 212, 0.06), transparent 35%), rgba(0, 0, 0, 0.93);
  z-index: 100000;
  padding: 24px;
  box-sizing: border-box;
}

.gallery-cinema-frame {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  width: 100%;
  background: #0c0c0c;
  border: 1px solid #00bcd4;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 188, 212, 0.25);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-cinema-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.gallery-cinema-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 24px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-cinema-close:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.gallery-cinema-meta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: #b5f5ff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 188, 212, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
}

#publicGalleryModal .gallery-modal-content,
#galleryReviewModal .gallery-modal-content {
  width: min(92vw, 820px);
  padding: 20px 20px 16px;
}

#publicGalleryModal .gallery-modal-content {
  --public-gallery-header-height: auto;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  max-height: 90vh;
}

#publicGalleryContent {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: none;
  padding: 0 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  width: 100%;
  will-change: transform;
}

#publicGalleryContent::-webkit-scrollbar {
  display: none;
}

#publicGalleryModal .public-gallery-header {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 6px 4px;
  margin: 0 0 14px;
  position: sticky;
  top: 22px;
  z-index: 3;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#publicGalleryModal .gallery-modal-content.gallery-header-hidden .public-gallery-header {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin-bottom: 6px;
  padding-top: 0;
  padding-bottom: 0;
}

#publicGalleryModal .public-gallery-header .modal-hero {
  margin: 6px auto 6px;
  padding: 0;
}

#publicGalleryModal .public-gallery-header .gallery-action-row {
  margin: 0 0 4px;
  gap: 8px;
  padding-right: 4px;
}

#publicGalleryLoadMore {
  margin: 4px 0 0;
  align-self: center;
  padding: 10px 16px;
  background: #00bcd4;
  color: #001018;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}

#publicGalleryLoadMore.hidden {
  display: none;
}

#publicGalleryLoadMore:disabled {
  opacity: 0.6;
  cursor: default;
}

#publicGalleryLoadMore:not(:disabled):hover {
  transform: translateY(-1px);
}

.gif-card-img {
  width: 100%;
  border-radius: 8px;
}

.gif-card-download {
  color: #0bf;
}

.public-gallery-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
  pointer-events: none;
  max-width: 820px;
  display: block;
}

.public-gallery-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 6px 4px 0;
}

.rating-stars {
  display: flex;
  gap: 6px;
}

.rating-stars--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.rating-star {
  background: transparent;
  border: none;
  color: #1fd1f9;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.1s ease, color 0.15s ease;
}

.rating-star:hover {
  transform: translateY(-1px);
  color: #00bcd4;
}

.rating-star.active {
  color: #ffce4f;
}

.rating-summary {
  color: #c8f7ff;
  font-weight: 600;
  font-size: 14px;
  margin-left: auto;
  text-align: right;
}

.icon-btn.icon-shared {
  color: #1fe1b0;
}

.public-gallery-card {
  width: 100%;
  max-width: 820px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.public-gallery-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 0;
}

.public-gallery-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(0, 188, 212, 0.3), rgba(0, 188, 212, 0.08));
  border: 1px solid rgba(0, 188, 212, 0.45);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.public-gallery-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.public-gallery-avatar--has-image img {
  opacity: 1;
}

.public-gallery-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #e8f7fa;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.public-gallery-avatar--has-image .public-gallery-avatar-fallback {
  opacity: 0;
}

.public-gallery-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.public-gallery-author {
  color: #e7f8fb;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 13px;
}

.public-gallery-date {
  color: #9ab;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.public-gallery-comments {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-gallery-comments-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #e7f8fb;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.15s ease, transform 0.12s ease;
}

.public-gallery-comments-toggle:hover {
  background: rgba(0, 188, 212, 0.06);
  border-color: rgba(0, 188, 212, 0.35);
  transform: translateY(-1px);
}

.public-gallery-comments--open .public-gallery-comments-toggle {
  border-color: rgba(0, 188, 212, 0.5);
}

.public-gallery-comments-count {
  color: #9ab;
  font-size: 12px;
  font-weight: 600;
}

.public-gallery-comments-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-gallery-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-gallery-comment {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.public-gallery-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.public-gallery-comment-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.public-gallery-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d6e9f0;
  font-weight: 800;
  font-size: 12px;
}

.public-gallery-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.public-gallery-comment-avatar--has-image img {
  display: block;
}

.public-gallery-comment-avatar--has-image .public-gallery-comment-avatar-fallback {
  display: none;
}

.public-gallery-comment-avatar-fallback {
  pointer-events: none;
}

.public-gallery-comment-author {
  font-weight: 800;
  color: #e7f8fb;
}

.public-gallery-comment-date {
  color: #89a7b5;
  font-size: 11px;
}

.public-gallery-comment-text {
  color: #e8f7fa;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

.public-gallery-comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.public-gallery-comment-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #e8f7fa;
  min-height: 64px;
  resize: vertical;
  font-family: inherit;
}

.public-gallery-comment-input::placeholder {
  color: #9ab;
}

.public-gallery-comment-submit {
  align-self: flex-end;
  background: #00bcd4;
  color: #001018;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.18s ease, background 0.18s ease;
}

.public-gallery-comment-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.public-gallery-comment-submit:not(:disabled):hover {
  transform: translateY(-1px);
}

.public-gallery-comment-status {
  min-height: 16px;
  font-size: 12px;
  color: #9ab;
}

.public-gallery-comment-status--error {
  color: #ffb8b8;
}

body.mobile-gallery-only {
  background: #040b10;
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100vw;
}

body.mobile-gallery-only #app {
  display: none !important;
}

body.mobile-gallery-only #publicGalleryModal {
  position: static;
  inset: 0;
  display: block !important;
  padding: 0;
  margin: 0;
  width: 100vw;
  max-width: 100vw;
  min-height: 100svh;
  height: auto;
  max-height: none;
  background: #0c0f13;
  align-items: stretch;
  backdrop-filter: none;
  overflow: visible;
  box-sizing: border-box;
  -webkit-overflow-scrolling: auto;
  z-index: auto;
}

body.mobile-gallery-only #publicGalleryModal .gallery-modal-content {
  width: 100vw;
  max-width: 100vw;
  min-height: 100svh;
  height: auto;
  max-height: none;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border: 1px solid #00bcd4;
  border-radius: 14px;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
  background: #0c0f13;
  margin: 0;
}

body.mobile-gallery-only #publicGalleryContent {
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
  gap: 16px;
  align-items: stretch;
  scroll-behavior: smooth;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

body.mobile-gallery-only #publicGalleryModal .public-gallery-header {
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  padding: 10px 12px 8px;
  margin: 0 0 10px;
  background: transparent;
  border: none;
  border-radius: 14px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.mobile-gallery-only #publicGalleryModal .gallery-modal-content.gallery-header-hidden .public-gallery-header {
  transform: translateY(-6px);
  margin: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

body.mobile-gallery-only .gallery-action-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.mobile-gallery-only .public-gallery-card {
  width: 100%;
  max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 18px);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 12px;
}

body.mobile-gallery-only #publicGalleryContent .public-gallery-card:first-of-type {
  margin-top: 6px;
}

body.mobile-gallery-only .public-gallery-img {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: pointer;
}

body.mobile-gallery-only .public-gallery-rating {
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  min-width: 0;
}

body.mobile-gallery-only .public-gallery-comments-toggle {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

body.mobile-gallery-only .public-gallery-comments-count {
  margin-left: auto;
}

body.mobile-gallery-only .public-gallery-meta {
  min-width: 0;
  flex-wrap: wrap;
}

body.mobile-gallery-only .public-gallery-meta-text {
  min-width: 0;
}

body.mobile-gallery-only .rating-summary {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

body.mobile-gallery-only .rating-stars {
  flex-shrink: 0;
}

body.mobile-gallery-only #closePublicGalleryModal {
  display: none;
}

@media (max-width: 768px) {
  html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto;
    min-height: 100svh;
  }

  body.mobile-gallery-only {
    display: block;
    overflow-y: auto !important;
    height: auto;
    min-height: 100svh;
    width: 100vw;
  }

  body.mobile-gallery-only #app {
    display: none !important;
  }

  body.mobile-gallery-only #publicGalleryModal {
    display: block !important;
  }

  #publicGalleryModal {
    position: static;
    inset: 0;
    display: block;
    padding: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    min-height: 100svh;
    height: auto;
    max-height: none;
    background: #0c0f13;
    align-items: stretch;
    backdrop-filter: none;
    overflow: visible;
    box-sizing: border-box;
    -webkit-overflow-scrolling: auto;
    z-index: auto;
  }

  #publicGalleryModal .gallery-modal-content {
    width: 100vw;
    max-width: 100vw;
    min-height: 100svh;
    height: auto;
    max-height: none;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
    border: 1px solid #00bcd4;
    border-radius: 14px;
    box-shadow: none;
    overflow: visible;
    box-sizing: border-box;
    background: #0c0f13;
    margin: 0;
  }

  #publicGalleryContent {
    padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
    gap: 16px;
    align-items: stretch;
    scroll-behavior: smooth;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  #publicGalleryModal .public-gallery-header {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    padding: 10px 12px 8px;
    margin: 0 0 10px;
    background: transparent;
    border: none;
    border-radius: 14px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #publicGalleryModal .gallery-modal-content.gallery-header-hidden .public-gallery-header {
    transform: translateY(-6px);
    margin: 0;
    padding: 0;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
  }

  .gallery-action-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .public-gallery-card {
    width: 100%;
    max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 18px);
    box-sizing: border-box;
    margin: 0 auto;
    padding: 12px;
  }

  #publicGalleryContent .public-gallery-card:first-of-type {
    margin-top: 6px;
  }

  .public-gallery-img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    pointer-events: auto;
    cursor: pointer;
  }

  .public-gallery-rating {
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    min-width: 0;
  }

  .public-gallery-comments-toggle {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .public-gallery-comments-count {
    margin-left: auto;
  }

  .public-gallery-meta {
    min-width: 0;
    flex-wrap: wrap;
  }

  .public-gallery-meta-text {
    min-width: 0;
  }

  .rating-summary {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
  }

  .rating-stars {
    flex-shrink: 0;
  }

  #closePublicGalleryModal {
    top: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
  }

  body.mobile-gallery-only #closePublicGalleryModal {
    display: none;
  }
}

.mobile-account-trigger {
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-image: linear-gradient(120deg, rgba(0, 188, 212, 0.55), rgba(255, 255, 255, 0.08)) 1;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: #e9f8ff;
  cursor: pointer;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  z-index: 4;
  backdrop-filter: blur(10px);
  text-align: left;
}

.mobile-account-trigger__avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1016;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.mobile-account-trigger__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mobile-account-trigger__glow {
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  border: 1px solid rgba(0, 188, 212, 0.6);
  box-shadow: 0 0 16px rgba(0, 188, 212, 0.45);
  opacity: 0.8;
  pointer-events: none;
}

.mobile-account-trigger__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.mobile-account-trigger__text .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: #8de7ff;
  margin: 0;
}

.mobile-account-trigger__text .title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-account-trigger__text .meta {
  margin: 0;
  color: #9bb6c6;
  font-size: 13px;
}

.mobile-account-trigger__cta {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 700;
  font-size: 13px;
  color: #e9f8ff;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .mobile-account-trigger {
    display: flex;
  }

  body.mobile-gallery-only .mobile-account-trigger {
    margin-top: 6px;
  }
}

@media (min-width: 901px) {
  .mobile-account-trigger {
    display: none !important;
  }
}

.mobile-account-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100000;
  pointer-events: none;
}

.mobile-account-sheet.is-visible {
  pointer-events: auto;
}

.mobile-account-sheet.hidden {
  display: none !important;
}

.mobile-account-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 14, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
}

.mobile-account-sheet__card {
  position: relative;
  width: min(640px, calc(100% - 20px));
  margin: 0 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
  padding: 18px 18px 16px;
  background: radial-gradient(circle at 12% 20%, rgba(0, 188, 212, 0.12), transparent 40%), #0b0f13;
  border-radius: 18px;
  border: 1px solid rgba(0, 188, 212, 0.3);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.65);
  color: #eef7ff;
  transform: translateY(120%);
  transition: transform 0.28s ease, opacity 0.28s ease;
  opacity: 0.98;
  pointer-events: auto;
}

.mobile-account-sheet__handle {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto 12px;
}

.mobile-account-sheet__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-account-sheet__avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 188, 212, 0.45);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.mobile-account-sheet__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mobile-account-sheet__identity .eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #89dff0;
}

.mobile-account-sheet__identity .title {
  margin: 2px 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.mobile-account-sheet__identity .meta {
  margin: 0;
  color: #9ec5d2;
  font-size: 13px;
  word-break: break-word;
}

.mobile-account-sheet__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mobile-account-logout-btn,
.mobile-account-close-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
}

.mobile-account-logout-btn {
  flex: 1 1 220px;
  background: linear-gradient(135deg, #00e0ff, #00bcd4 60%, #0088a2);
  color: #031015;
  box-shadow: 0 14px 26px rgba(0, 188, 212, 0.35);
}

.mobile-account-logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0, 188, 212, 0.45);
}

.mobile-account-close-btn {
  flex: 1 1 140px;
  background: rgba(255, 255, 255, 0.08);
  color: #e6f7ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-account-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-account-sheet.is-visible .mobile-account-sheet__backdrop {
  opacity: 1;
}

.mobile-account-sheet.is-visible .mobile-account-sheet__card {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 540px) {
  .mobile-account-sheet__card {
    padding: 16px 14px 14px;
  }
}

@media (min-width: 901px) {
  .mobile-account-sheet {
    display: none !important;
  }
}

body.mobile-account-open {
  overflow: hidden;
}


.gallery-review-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.gallery-review-card {
  width: 100%;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-review-header {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.gallery-review-meta {
  color: #9ab;
  font-size: 13px;
}

.gallery-review-img {
  width: 100%;
  border-radius: 10px;
  background: #0f0f11;
  object-fit: contain;
  max-height: 320px;
}

.gallery-review-img--error {
  opacity: 0.5;
}

.gallery-review-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-compact {
  padding: 8px 14px;
  font-size: 14px;
}

.gif-card {
  text-align: center;
  margin: 10px;
}
.gif-card-img-user {
  width: 200px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
}
.gif-card-caption {
  font-size: 14px;
  color: #ccc;
  margin-top: 5px;
  overflow-wrap: break-word;
}

.gif-card-rating {
  font-size: 13px;
  color: #8ce0f0;
  margin-top: 4px;
}

.gallery-status {
  margin: 10px 0;
  text-align: center;
}
.gallery-status-muted {
  color: #aaa;
}
.gallery-status-error {
  color: #f44;
}

/* About modal */
#aboutModal .modal-content {
  max-width: 500px;
  padding: 48px 36px;
  border-radius: 18px;
  background: linear-gradient(145deg, #111111, #1a1a1a);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  font-family: 'Inter', sans-serif;
  position: relative;
}

#aboutModal .close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 26px;
  color: #888;
  cursor: pointer;
}

.about-logo {
  width: 90px;
  height: 90px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(0, 188, 212, 0.5);
}

.about-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.about-version {
  font-size: 13px;
  color: #666;
  margin-bottom: 28px;
}

.about-paragraph {
  color: #ccc;
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.about-highlight {
  background-color: #1a1a1a;
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 28px;
  color: #bbb;
  font-size: 13.5px;
  line-height: 1.6;
  border-left: 3px solid #00bcd4;
  text-align: left;
}

.about-footer {
  border-top: 1px solid #222;
  padding-top: 20px;
}

.about-footer p {
  color: #666;
  font-size: 13px;
}

.about-link {
  color: #00bcd4;
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
}

/* Contact modal */
#contactModal .modal-content {
  max-width: 520px;
  width: min(92vw, 520px);
  text-align: left;
  align-items: stretch;
  gap: 10px;
}

#contactModal .modal-hero {
  margin-bottom: 6px;
}

#contactModal .contact-greeting {
  font-size: 16px;
  margin: 0;
  color: #c7c7c7;
}

#contactModal .contact-lead {
  margin: 4px 0 0 0;
  color: #9ca3af;
  text-align: center;
}

#contactModal .contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#contactModal label {
  font-size: 14px;
  color: #c7c7c7;
}

#contactModal input,
#contactModal textarea {
  width: 100%;
  max-width: none;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #2f2f2f;
  background: #0f0f0f;
  color: #fff;
  box-sizing: border-box;
}

#contactModal textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

#contactModal .select-plan-btn {
  width: 100%;
  max-width: none;
  margin-top: 2px;
}

.contact-footer-note {
  font-size: 13px;
  color: #8d949f;
  text-align: center;
  margin: 6px 0 4px 0;
}

.contact-status {
  font-size: 13px;
  min-height: 18px;
  color: #8fd18f;
}

.contact-status.error {
  color: #f87171;
}

/* GIF delete modal */
#gifDeleteConfirmModal.delete-confirm-modal {
  z-index: 2147483647;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

#gifDeleteConfirmModal .delete-confirm-content {
  background: rgba(20, 20, 20, 0.95);
  padding: 32px 40px;
  border-radius: 18px;
  max-width: 90%;
  width: 400px;
  text-align: center;
}

#gifDeleteConfirmModal .modal-actions button {
  padding: 10px 20px;
  border-radius: 14px;
}

#gifOverwriteModal.delete-confirm-modal {
  z-index: 2147483647;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

#gifOverwriteModal .delete-confirm-content {
  background: rgba(20, 20, 20, 0.95);
  padding: 32px 40px;
  border-radius: 18px;
  max-width: 90%;
  width: 400px;
  text-align: center;
}

#gifOverwriteModal .modal-actions button {
  padding: 10px 20px;
  border-radius: 14px;
}

/* Set new password modal defaults */
#setNewPasswordModal {
  display: none;
}
