:root {
  --rg-blush: #f4d7d8;
  --rg-rose: #c77d7f;
  --rg-rose-deep: #9f5d66;
  --rg-cream: #fff8f4;
  --rg-warm: #f5efe9;
  --rg-sand: #d9c8bc;
  --rg-ink: #4f4343;
  --rg-muted: #7a6c6c;
  --rg-shadow: 0 20px 45px rgba(105, 78, 79, 0.12);
  --rg-radius: 24px;
}

html,
body {
  min-height: 100%;
}

body.rg-app {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #fffaf8 0%, #f7f1ee 100%);
  color: var(--rg-ink);
}

.brand-mark,
.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  color: var(--rg-rose-deep);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.eyebrow {
  color: var(--rg-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.soft-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(199, 125, 127, 0.14);
  border-radius: var(--rg-radius);
  box-shadow: var(--rg-shadow);
  padding: 1.5rem;
}

.button.is-rg-accent {
  background: linear-gradient(135deg, var(--rg-rose) 0%, var(--rg-rose-deep) 100%);
  border-color: transparent;
  color: #fff;
}

.button.is-rg-accent:hover,
.button.is-rg-accent:focus {
  color: #fff;
  background: linear-gradient(135deg, #b66f76 0%, #8f4d57 100%);
}

.button.is-rg-outline {
  border-color: rgba(159, 93, 102, 0.35);
  color: var(--rg-rose-deep);
}

.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  width: min(24rem, calc(100vw - 2rem));
}

.toast-stack .notification {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.landing-hero {
  background:
    radial-gradient(circle at top left, rgba(244, 215, 216, 0.85), transparent 36%),
    radial-gradient(circle at bottom right, rgba(217, 200, 188, 0.7), transparent 30%),
    linear-gradient(180deg, #fffdfc 0%, #f4ece7 100%);
}

.landing-shell {
  max-width: 1120px;
}

.landing-title {
  color: var(--rg-ink);
}

.landing-subtitle {
  color: var(--rg-muted);
  max-width: 30rem;
}

.landing-card {
  padding: 2rem;
}

.landing-note {
  background: var(--rg-cream);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
}

.landing-note ul {
  margin: 0.75rem 0 0 1.2rem;
}

.landing-footer {
  padding: 1.25rem 1.5rem 2rem;
  color: var(--rg-muted);
}

.dashboard-shell,
.share-shell {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.dashboard-topbar {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.dashboard-actions {
  width: auto;
  max-width: 100%;
  margin-left: auto;
}

.dashboard-actions .buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-card,
.summary-card,
.album-card,
.gallery-header,
.welcome-card {
  height: 100%;
}

.summary-cards .column {
  display: flex;
}

.summary-card {
  width: 100%;
}

.empty-state {
  text-align: center;
  color: var(--rg-muted);
  padding: 2rem;
}

.album-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.album-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.album-meta .meta-block {
  background: var(--rg-cream);
  border-radius: 18px;
  padding: 0.85rem;
}

.share-field {
  display: flex;
  gap: 0.5rem;
}

.share-field .input {
  min-width: 0;
}

.password-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.password-actions {
  gap: 0.5rem;
}

.password-display {
  font-family: Consolas, "Courier New", monospace;
}

.password-note {
  background: var(--rg-cream);
  border-radius: 16px;
  color: var(--rg-muted);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
}

.password-reset-form .field {
  margin-bottom: 0;
}

.password-reset-form .help {
  margin-top: 0.35rem;
}

.upload-state {
  background: #faf5f4;
  border-radius: 18px;
  padding: 0.9rem;
}

.progress.is-rg {
  color: var(--rg-rose-deep);
}

.progress.is-rg::-webkit-progress-value {
  background-color: var(--rg-rose);
}

.progress.is-rg::-moz-progress-bar {
  background-color: var(--rg-rose);
}

.modal-card-large {
  width: min(960px, calc(100vw - 2rem));
}

.thumb-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.thumb-card {
  background: #fff;
  border: 1px solid rgba(199, 125, 127, 0.16);
  border-radius: 22px;
  overflow: hidden;
}

.thumb-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--rg-warm);
}

.thumb-card .card-content {
  padding: 1rem;
}

.photo-filename {
  word-break: break-word;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(199, 125, 127, 0.12);
  color: var(--rg-rose-deep);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
}

.share-container {
  max-width: 1080px;
}

.share-heading {
  margin-bottom: 2rem;
}

.welcome-card {
  padding: 2rem;
}

.status-panel {
  border-radius: 18px;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
}

.status-panel.is-danger {
  background: #fff1f2;
  color: #a03d4d;
}

.status-panel.is-warning {
  background: #fff7e8;
  color: #9a6414;
}

.status-panel.is-info {
  background: #f7f2ff;
  color: #694d87;
}

#gallery-section.gallery-hidden {
  display: none !important;
}

.gallery-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.memory-card {
  overflow: hidden;
  padding: 0;
}

.memory-card button {
  border: 0;
  background: none;
  padding: 0;
  width: 100%;
  cursor: pointer;
}

.memory-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--rg-warm);
}

.memory-card .memory-card-body {
  padding: 1rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(52, 34, 36, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
}

.lightbox.is-active {
  display: flex;
}

.lightbox-content {
  max-width: min(960px, 100%);
  width: 100%;
}

.lightbox-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 24px;
  background: #1f1617;
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #fff;
  padding-top: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .landing-actions,
  .dashboard-actions .buttons,
  .gallery-actions,
  .share-field,
  .password-reset-controls,
  .lightbox-caption {
    flex-direction: column;
    align-items: stretch;
  }

  .album-meta {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    width: 100%;
  }

  .share-field .button,
  .dashboard-actions .button,
  .gallery-actions .button,
  .landing-actions .button {
    width: 100%;
  }
}
