/* 12-Month Anniversary Collage — Instagram Story 9:16 */

.yc-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(196, 92, 92, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(176, 141, 87, 0.15), transparent 45%),
    #12100e;
  color: #f7efe6;
  font-family: "Sora", system-ui, sans-serif;
  padding: 0 0 2rem;
}

.yc-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  background: rgba(18, 16, 14, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.yc-tool-link,
.yc-tool-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.yc-tool-link {
  color: rgba(247, 239, 230, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.yc-tool-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.yc-tool-btn {
  color: #1c1410;
  background: linear-gradient(180deg, #f3e4cf, #d8b887);
  border-color: rgba(176, 141, 87, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.yc-tool-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.yc-tool-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.yc-footnote {
  text-align: center;
  color: rgba(247, 239, 230, 0.65);
  font-size: 0.85rem;
  padding: 0 1rem 1.5rem;
  margin: 0;
}

.yc-stage {
  display: grid;
  place-items: center;
  padding: 1.25rem 0.75rem 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* Exact Story frame — CSS grid so middle always fills */
.yc-story {
  --yc-ink: #1c1410;
  --yc-paper: #f6efe6;
  --yc-blush: #c45c5c;
  --yc-gold: #b08d57;
  --yc-muted: rgba(28, 20, 16, 0.55);
  width: min(100%, 390px);
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: min(92vh, 780px);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.75rem 0.65rem 0.55rem;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(165deg, #f8f2ea 0%, #efe4d6 55%, #e8d8c6 100%);
  color: var(--yc-ink);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.yc-head {
  text-align: center;
  padding: 0.1rem 0.2rem 0.15rem;
}

.yc-brand {
  margin: 0 0 0.15rem;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--yc-gold);
}

.yc-title {
  margin: 0;
  font-family: "Cormorant Garamond", "Fraunces", Georgia, serif;
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.yc-names {
  margin: 0.15rem 0 0;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(1.05rem, 3.8vw, 1.3rem);
  color: var(--yc-blush);
  line-height: 1.1;
}

.yc-year {
  margin: 0.08rem 0 0;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--yc-muted);
}

.yc-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0.32rem;
  min-height: 0;
  height: 100%;
  align-content: stretch;
}

.yc-cell {
  margin: 0;
  min-height: 0;
  min-width: 0;
  height: 100%;
  position: relative;
}

.yc-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd2c4;
  box-shadow: inset 0 0 0 1px rgba(28, 20, 16, 0.06);
}

.yc-photo.is-empty {
  background:
    linear-gradient(145deg, rgba(176, 141, 87, 0.18), rgba(196, 92, 92, 0.1)),
    #e8ddd0;
  display: grid;
  place-items: center;
}

.yc-photo.is-empty::after {
  content: "";
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(28, 20, 16, 0.18);
  opacity: 0.7;
}

.yc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.yc-month {
  position: absolute;
  left: 0.28rem;
  top: 0.28rem;
  z-index: 2;
  padding: 0.14rem 0.36rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.94);
  color: var(--yc-ink);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(28, 20, 16, 0.12);
}

.yc-cell figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 1.1rem 0.28rem 0.28rem;
  font-size: 0.52rem;
  line-height: 1.2;
  text-align: center;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(20, 12, 10, 0.72));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.05rem 0.15rem 0;
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  color: var(--yc-muted);
  font-weight: 600;
}

.yc-demo-tag {
  color: var(--yc-blush);
  font-weight: 800;
}

/* Style: ribbon — dark romantic */
.yc-style-ribbon {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 180, 160, 0.12), transparent 40%),
    linear-gradient(180deg, #1f1814 0%, #2a211c 100%);
  color: #f7efe6;
}

.yc-style-ribbon .yc-brand,
.yc-style-ribbon .yc-year,
.yc-style-ribbon .yc-foot {
  color: rgba(247, 239, 230, 0.55);
}

.yc-style-ribbon .yc-title {
  color: #fff8f0;
}

.yc-style-ribbon .yc-names {
  color: #e8b4b4;
}

.yc-style-ribbon .yc-photo {
  box-shadow: inset 0 0 0 1px rgba(176, 141, 87, 0.4);
}

.yc-style-ribbon .yc-photo.is-empty {
  background:
    linear-gradient(145deg, rgba(176, 141, 87, 0.2), rgba(196, 92, 92, 0.15)),
    #2a221c;
}

.yc-style-ribbon .yc-month {
  background: rgba(32, 24, 20, 0.82);
  color: #f7efe6;
}

/* Style: polaroid — white frames + caption strip */
.yc-style-polaroid .yc-photo {
  border-radius: 4px;
  background: #fffaf4;
  box-shadow: 0 4px 10px rgba(42, 31, 26, 0.12);
  outline: 3px solid #fffaf4;
  outline-offset: -3px;
  padding-bottom: 0;
}

.yc-style-polaroid .yc-cell figcaption {
  position: absolute;
  bottom: 0;
  padding: 0.35rem 0.2rem 0.3rem;
  background: #fffaf4;
  color: var(--yc-ink);
  font-size: 0.48rem;
}

.yc-style-polaroid .yc-photo img {
  height: calc(100% - 1.15rem);
}

.yc-style-polaroid .yc-photo.is-empty::after {
  margin-bottom: 1rem;
}

/* Studio form */
.yc-studio {
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}

.yc-studio-preview {
  position: sticky;
  top: 5.5rem;
}

.yc-studio-preview .yc-story {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
}

.yc-months-form {
  display: grid;
  gap: 0.75rem;
}

.yc-month-card {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.03);
}

.yc-month-card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}

.yc-style-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.yc-style-pick label {
  display: block;
  text-align: center;
  padding: 0.7rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.yc-style-pick input {
  margin-bottom: 0.3rem;
}

.yc-style-pick label:has(input:checked) {
  border-color: #c45c5c;
  box-shadow: 0 0 0 1px #c45c5c;
}

@media (max-width: 900px) {
  .yc-studio {
    grid-template-columns: 1fr;
  }

  .yc-studio-preview {
    position: static;
  }

  .yc-story {
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .yc-style-pick {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .yc-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
  }

  .yc-tool-link,
  .yc-tool-btn {
    width: 100%;
    min-height: 48px;
  }
}

@media (max-width: 420px) {
  .yc-story {
    width: min(100% - 0.5rem, 360px);
    padding: 0.6rem 0.5rem 0.45rem;
    gap: 0.35rem;
  }

  .yc-months {
    gap: 0.26rem;
  }

  .yc-month {
    font-size: 0.46rem;
    padding: 0.1rem 0.28rem;
  }

  .yc-cell figcaption {
    font-size: 0.46rem;
    padding-top: 0.85rem;
  }
}
