/* Public collection and shared editor: scoped additions preserve historical sites. */
.site-header {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 20px max(24px, 4vw);
  gap: 28px;
  z-index: 10;
}
.site-header .brand-public {
  width: 280px;
  padding: 8px;
}
.public-menu {
  margin-left: auto;
}
.public-menu summary {
  display: none;
}
.site-header nav {
  gap: 28px;
  max-width: none;
  flex-wrap: nowrap;
}
.site-header nav a {
  font-size: 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-footer {
  flex-wrap: wrap;
}
.site-footer nav {
  justify-content: center;
}
.site-footer p,
.site-footer nav a {
  font-size: 14px;
}
.hero-description {
  font-size: 19px;
  line-height: 1.7;
  max-width: 36ch;
}
.hero-copy .hero-description {
  color: #443d39;
}
.story-copy p,
.feature-grid p,
.collection-heading > p,
.detail-intro > p,
.collection-details p,
.process-list p,
.privacy-content p {
  font-size: 16px;
  line-height: 1.75;
}
.collection-heading .eyebrow {
  font-size: 16px;
}
.theme-meta p,
.theme-meta > span {
  font-size: 15px;
}
.theme-meta h3 {
  font-size: 34px;
}
.mini-paper {
  color: var(--card-accent);
}
.theme-card.uliveto .theme-preview {
  background: #dce2d3;
}
.theme-card.uliveto .mini-paper {
  border-radius: 48% 48% 2px 2px / 20% 20% 2px 2px;
  padding-top: 36px;
}
.theme-card.uliveto .mini-paper img {
  width: 90%;
  margin-bottom: 22px;
}
.theme-card.riviera .theme-preview {
  background: #dfe8ec;
}
.theme-card.riviera .mini-paper {
  display: flex;
  flex-direction: column;
  border-block: 2px solid #254b6440;
  box-shadow: none;
  background: #fffdf8;
  padding-top: 36px;
}
.theme-card.riviera .mini-paper strong {
  order: 0;
}
.theme-card.riviera .mini-paper small {
  order: 1;
}
.theme-card.riviera .mini-paper img {
  order: 2;
  width: 90%;
  margin: 26px auto 0;
}
.theme-uliveto {
  --theme-paper: #f7f6ef;
  --theme-ink: #304332;
  --accent: #3e513c;
  --theme-wash: #dce2d3;
}
.theme-riviera {
  --theme-paper: #faf7ef;
  --theme-ink: #254b64;
  --accent: #254b64;
  --theme-wash: #dfe8ec;
}
.invitation-format-uliveto .envelope,
.invitation-format-riviera .envelope {
  display: none;
}
.invitation-format-uliveto .invitation-card {
  border-radius: 46% 46% 2px 2px / 15% 15% 2px 2px;
  background: #fffef8;
  border: 1px solid #3e513c26;
  box-shadow: 0 12px 36px #3043320b;
}
.invitation-format-uliveto .invitation-illustration {
  width: 82%;
  margin: 0 auto 32px;
}
.invitation-format-riviera .invitation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-block: 2px solid #254b6440;
  box-shadow: none;
  background: #fffdf8;
}
.invitation-format-riviera .invitation-illustration {
  order: 10;
  width: 78%;
  margin: 30px auto 0;
}
.theme-riviera .invitation-section {
  background: linear-gradient(180deg, #dfe8ec66, transparent);
}
.theme-uliveto .wedding-section,
.theme-riviera .wedding-section {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}
.theme-uliveto .wedding-header,
.theme-riviera .wedding-header {
  color: var(--theme-ink);
}
.demo-nav {
  flex-wrap: wrap;
}
.demo-nav .button {
  margin-left: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.legal-table {
  overflow-x: auto;
  margin: 28px 0;
}
.legal-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  vertical-align: top;
}
.legal-table caption {
  text-align: left;
  margin-bottom: 12px;
  font-weight: 600;
}
.creation-page {
  max-width: 1500px;
  margin: auto;
  padding: 44px 40px 80px;
}
.creation-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.creation-heading h1 {
  font-size: clamp(44px, 5vw, 72px);
  margin-bottom: 18px;
}
.creation-heading p {
  max-width: 58ch;
}
.creation-storage {
  max-width: 85ch;
  font-size: 14px;
  color: var(--muted);
}
.creation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.creation-view-switch {
  display: flex;
  gap: 10px;
}
.creation-view-switch [aria-pressed='true'] {
  background: var(--accent);
  color: var(--surface);
}
.creation-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.creation-fields {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.creation-fields fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}
.creation-fields label {
  font-size: 15px;
}
.creation-fields textarea {
  font-size: 16px;
}
.creation-fields .field-help {
  font-size: 13px;
}
.creation-fields h2,
.transfer-form h2 {
  font-size: 36px;
}
.creation-photos {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 28px;
}
.creation-photos p,
.creation-save p {
  font-size: 14px;
  color: var(--muted);
}
.creation-save {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.creation-save .button {
  width: 100%;
}
.transfer-form {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.creation-preview {
  min-width: 0;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  background: var(--paper);
}
.preview-label {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding: 12px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.draft-preview {
  min-width: 0;
}
.draft-preview .wedding-header {
  padding: 24px 20px;
  flex-direction: column;
  gap: 14px;
}
.draft-preview .wedding-header nav {
  gap: 8px 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.draft-preview .invitation-section {
  padding: 40px 20px 64px;
  min-height: 0;
}
.draft-preview .invitation-stage {
  width: 100%;
}
.draft-preview .invitation-card {
  padding: 40px 28px;
}
.draft-preview .invitation-names {
  font-size: clamp(40px, 4.5vw, 64px);
}
.draft-preview .invitation-text {
  font-size: 19px;
}
.draft-preview .wedding-sections {
  padding: 0 24px;
}
.draft-preview .wedding-section {
  padding: 36px 0;
  display: block;
}
.draft-preview .wedding-section h2 {
  font-size: 36px;
}
.draft-preview .wedding-section p {
  font-size: 16px;
}
.draft-preview .wedding-intro {
  padding: 36px 24px;
}
.draft-preview .wedding-intro p {
  font-size: 28px;
}
.draft-preview .wedding-gallery {
  padding: 30px 24px;
}
.draft-photo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.draft-photo-list img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 12px;
}
.draft-photo-list .button {
  width: 100%;
  padding: 10px 8px;
  font-size: 12px;
}
@media (min-width: 1024px) {
  .creation-view-switch {
    display: none;
  }
}
@media (max-width: 1023px) {
  .site-header {
    flex-direction: row;
    padding: 16px 24px;
    align-items: center;
  }
  .site-header .brand-public {
    width: 240px;
  }
  .public-menu summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    font-size: 16px;
    list-style: none;
  }
  .public-menu summary::-webkit-details-marker {
    display: none;
  }
  .public-menu nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 24px 24px;
    background: var(--paper);
    box-shadow: 0 14px 20px #302c2a10;
    border-bottom: 1px solid var(--line);
  }
  .site-header nav a {
    font-size: 18px;
    padding: 12px 14px;
    min-height: 48px;
  }
  .site-header .nav-couples {
    padding: 12px 14px;
  }
  .hero-description {
    font-size: 18px;
  }
  .creation-grid {
    display: block;
  }
  .creation-grid[data-mode='edit'] .creation-preview,
  .creation-grid[data-mode='preview'] .creation-fields {
    display: none;
  }
  .creation-preview {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .draft-preview .invitation-names {
    font-size: clamp(48px, 8vw, 76px);
  }
}
@media (max-width: 700px) {
  .hero-copy h1 br {
    display: none;
  }
  .site-header {
    padding: 12px 14px;
    gap: 8px;
  }
  .site-header .brand-public {
    width: min(220px, 60vw);
    padding: 6px;
  }
  .public-menu summary {
    padding: 8px 10px;
    gap: 8px;
  }
  .hero-description {
    font-size: 17px;
    max-width: 35ch;
    line-height: 1.7;
  }
  .hero-copy h1 {
    font-size: clamp(54px, 15vw, 70px);
  }
  .collection-heading > p {
    font-size: 16px;
  }
  .theme-grid {
    gap: 40px;
  }
  .theme-preview {
    min-height: 350px;
  }
  .creation-page {
    padding: 30px 16px 50px;
  }
  .creation-heading {
    display: block;
  }
  .creation-heading h1 {
    font-size: 48px;
  }
  .creation-fields {
    padding: 20px 16px;
  }
  .creation-toolbar {
    gap: 8px;
    align-items: flex-start;
  }
  .creation-toolbar .button {
    padding: 10px 14px;
  }
  .creation-toolbar .text-button {
    font-size: 13px;
    padding: 10px 4px;
  }
  .creation-fields .form-row {
    grid-template-columns: 1fr;
  }
  .draft-preview .invitation-card {
    padding: 36px 18px;
  }
  .draft-preview .invitation-names {
    font-size: clamp(40px, 12vw, 64px);
  }
  .draft-preview .invitation-venue {
    font-size: 13px;
  }
  .privacy-content p {
    font-size: 16px;
  }
}
.invitation-custom-color {
  --theme-ink: var(--accent);
}
.theme-uliveto,
.theme-riviera {
  --theme-ink: var(--accent);
}
.site-footer nav a,
.wedding-header nav a,
.demo-nav > a,
.wedding-footer > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.wedding-section summary {
  min-height: 44px;
  padding-block: 12px;
}
.invitation-names,
.wedding-header > span,
.dashboard-top h1 {
  overflow-wrap: anywhere;
}

/* Shared frame: every format reserves identical paper and metadata tracks. */
.theme-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.theme-grid .theme-preview {
  height: 420px;
  min-height: 420px;
  padding: 32px;
}
.theme-grid .mini-paper {
  height: 356px;
  min-height: 356px;
  padding: 32px 16px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-block-width: 2px;
}
.theme-grid .mini-paper img {
  width: 82%;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 20px;
  flex-shrink: 0;
}
.theme-grid .mini-paper strong {
  font-size: 44px;
  margin: 0 0 20px;
}
.theme-grid .mini-paper small {
  line-height: 1.5;
}
.theme-grid .riviera .mini-paper img {
  margin: 20px auto 0;
}
.theme-meta {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.theme-meta > span {
  min-height: 44px;
}
.collection-title {
  text-wrap: initial;
  overflow-wrap: normal;
}
.feedback-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}
.feedback-section figure {
  margin: 0;
}
.feedback-section img {
  width: 100%;
  height: auto;
}
.feedback-section h2 {
  font-size: clamp(32px, 3.6vw, 48px);
}
.feedback-section a {
  display: inline-block;
  padding-block: 10px;
  overflow-wrap: anywhere;
  min-height: 44px;
}
.cookie-notice {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 20px max(24px, calc((100vw - 1136px) / 2));
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-notice p {
  margin: 0;
  max-width: 60ch;
  flex: 1 1 320px;
}
.cookie-notice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.app-header,
.dashboard-top,
.panel,
.stack-form,
fieldset,
.editor-layout > *,
.guest-list li {
  min-width: 0;
}
.stack-form input,
.stack-form textarea,
.stack-form select {
  max-width: 100%;
}
.app-header .brand {
  flex-shrink: 1;
}
.app-header a,
.auth-foot a,
.rsvp-bottom a,
.dashboard-tabs a,
.site-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.radio-card {
  min-height: 44px;
}
.request-history {
  padding: 0;
  list-style: none;
}
.request-history li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.request-history p {
  white-space: pre-wrap;
}
.hero-envelope-front {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 0;
  right: 0;
  height: 48%;
  pointer-events: none;
  background:
    linear-gradient(30deg, #e5d8c8 49.8%, transparent 50.1%),
    linear-gradient(-30deg, #e0d2c1 49.8%, transparent 50.1%);
  opacity: 0.85;
  transform: rotate(-5deg);
}
.invitation-hero-motion .envelope {
  z-index: 1;
}
.invitation-hero-motion.hero-playing .envelope-flap {
  animation: hero-flap 1.8s ease-in-out both;
}
.invitation-hero-motion.hero-playing .invitation-card {
  animation: hero-extract 2.8s cubic-bezier(0.22, 1, 0.36, 1) 1.8s both;
}
.invitation-hero-motion.hero-playing .hero-envelope-front {
  animation: hero-front 2.8s ease 1.8s both;
}
.invitation-hero-motion .hero-envelope-front {
  opacity: 0;
}
.invitation-hero-motion.hero-settled .invitation-card,
.invitation-hero-motion.hero-settled .envelope-flap,
.invitation-hero-motion.hero-settled .hero-envelope-front {
  animation: none;
}
@keyframes hero-flap {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(180deg);
  }
}
@keyframes hero-extract {
  from {
    transform: translateY(100px) scale(0.94);
  }
  to {
    transform: translateY(0) scale(1);
  }
}
@keyframes hero-front {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@media (max-width: 1023px) {
  .atelier-hero,
  .atelier-story,
  .feature-grid,
  .feedback-section {
    grid-template-columns: minmax(0, 1fr);
  }
  .atelier-hero {
    max-width: 760px;
    gap: 48px;
    padding: 40px 32px 64px;
    min-height: 0;
  }
  .hero-object {
    max-width: 520px;
    width: 100%;
    margin: auto;
  }
  .theme-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 540px;
    margin-inline: auto;
  }
  .theme-grid .theme-preview {
    height: 440px;
    min-height: 440px;
  }
  .theme-grid .mini-paper {
    height: 376px;
    min-height: 376px;
    max-width: 360px;
  }
  .feature-grid,
  .feedback-section {
    gap: 32px;
  }
  .atelier-story,
  .feedback-section {
    max-width: 760px;
  }
  .collection-heading {
    display: block;
  }
  .collection-heading h2 {
    margin-bottom: 20px;
  }
  .feedback-section {
    padding: 48px 32px 64px;
  }
}
@media (max-width: 479px) {
  .atelier-hero {
    padding: 24px 20px 48px;
    gap: 28px;
  }
  .hero-copy h1 {
    font-size: clamp(48px, 14vw, 66px);
  }
  .hero-object {
    padding: 0 8px;
  }
  .themes-section,
  .feature-section,
  .atelier-story,
  .feedback-section {
    padding: 48px 20px;
  }
  .theme-grid .theme-preview {
    height: 400px;
    min-height: 400px;
    padding: 24px;
  }
  .theme-grid .mini-paper {
    height: 352px;
    min-height: 352px;
  }
  .theme-grid .mini-paper strong {
    font-size: 40px;
  }
  .app-header {
    flex-wrap: wrap;
    padding: 16px 20px;
  }
  .app-header > div {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .dashboard-tabs {
    flex-wrap: wrap;
  }
  .cookie-notice {
    padding: 20px;
    gap: 12px;
  }
  .cookie-notice p {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-hero-motion .invitation-card,
  .invitation-hero-motion .envelope-flap,
  .invitation-hero-motion .hero-envelope-front {
    animation: none !important;
  }
  .invitation-hero-motion .hero-envelope-front {
    opacity: 0;
  }
}

.theme-meta p {
  min-height: 4.95em;
}
.cookie-notice > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.radio-card {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.draft-toolbar,
.creation-actions {
  flex-wrap: wrap;
}
@media (max-width: 479px) {
  .hero-invite-link .invitation-stage,
  .invitation-stage .envelope,
  .hero-envelope-front {
    transform: none;
  }
  .draft-toolbar .text-button {
    white-space: normal;
    max-width: 100%;
  }
}

.creation-toolbar,
.creation-view-switch {
  flex-wrap: wrap;
  min-width: 0;
}
.creation-toolbar .text-button {
  white-space: normal;
  max-width: 100%;
}
