/* HOLIDAY — public template polish, 2026-08-09
   Pure presentation layer: no admin/DB/AI logic. */

/* ---------- Global heading rhythm ---------- */
.date-layout h1 {
  max-width: 760px;
  font-size: clamp(38px, 3.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.022em;
}
.month-shell h1,
.simple-shell > h1 {
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.08;
}
.holiday-groups > h2,
.nearby-section > h2 {
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.16;
}

/* ---------- Date page: main card ---------- */
.featured-card {
  min-height: 0;
  grid-template-columns: 1fr;
  overflow: hidden;
}
.featured-card.has-image {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
}
.featured-copy {
  min-width: 0;
  padding: 32px 34px 30px;
}
.featured-card h2 {
  max-width: 720px;
  margin: 16px 0 14px;
  font-size: clamp(30px, 2.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.featured-card .featured-summary {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.68;
}
.featured-card.no-image .featured-copy {
  padding-right: clamp(34px, 7vw, 74px);
}
.featured-card .detail-link {
  margin-top: 22px;
  padding-top: 0;
}
.featured-image {
  object-fit: cover;
  min-height: 100%;
}

/* ---------- Date page right rail ---------- */
.date-layout > .right-rail {
  display: grid !important;
  visibility: visible !important;
  align-self: start;
  gap: 20px;
  position: sticky;
  top: 112px;
}
.right-rail .calendar-card {
  border: 1px solid var(--line);
  background: rgba(255,253,248,.70);
  border-radius: 12px;
  padding: 22px;
}
.right-rail .calendar-heading {
  margin-bottom: 16px;
  font-size: 21px;
}
.right-rail .calendar-heading span {
  font-size: 25px;
}
.right-rail .calendar-grid a,
.right-rail .calendar-grid span {
  font-size: 13px;
}

/* ---------- Full holiday article layout ---------- */
.article-shell {
  grid-template-columns: minmax(0, 840px) minmax(280px, 320px);
  gap: 38px;
  align-items: start;
}
.holiday-article {
  padding: clamp(30px, 4vw, 44px);
}
.article-hero-copy {
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(217,205,184,.72);
}
.holiday-article h1 {
  max-width: 760px;
  margin: 16px 0 20px;
  font-size: clamp(38px, 4.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.article-lead {
  max-width: 720px;
  margin: 4px 0 20px;
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(180,147,85,.10), transparent 68%);
  padding: 16px 20px 16px 22px;
  color: #38352f;
  font-size: 18px;
  line-height: 1.68;
}
.article-lead p {
  margin: 0;
}
.article-hero-copy .meta {
  margin-top: 4px;
}
.article-image {
  margin: 30px 0 4px;
}

/* AI article HTML is inserted as bare p/h2, so style the wrapper itself. */
.article-body {
  max-width: 720px;
  padding-top: 30px;
  color: #33302b;
  font-size: 17px;
  line-height: 1.82;
}
.article-body p {
  margin: 0 0 18px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.article-body h2 {
  margin: 34px 0 14px;
  padding-top: 2px;
  color: var(--navy);
  font-size: clamp(25px, 2.3vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.012em;
}
.article-body h2:first-child {
  margin-top: 0;
}
.article-body h3 {
  margin: 28px 0 12px;
  color: var(--burgundy);
  font: 600 21px/1.25 Georgia, serif;
}
.article-body ul,
.article-body ol {
  margin: 16px 0 20px 1.35em;
  padding: 0;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li {
  margin: 8px 0;
  padding-left: 4px;
}
.article-body a {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-sources {
  max-width: 720px;
  margin-top: 38px !important;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.article-sources h2 {
  margin: 0 0 14px !important;
  font-size: 25px !important;
}
.article-sources p {
  margin: 0;
  line-height: 1.75;
}

/* ---------- Holiday page sidebar ---------- */
.article-aside {
  position: sticky;
  top: 112px;
  gap: 20px;
}
.article-related {
  border: 1px solid var(--line);
  background: rgba(255,253,248,.70);
  border-radius: 12px;
  padding: 22px;
}
.article-related h2 {
  font-size: 23px;
  line-height: 1.18;
}
.article-aside .calendar-card {
  display: block !important;
  visibility: visible !important;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.70);
  border-radius: 12px;
  padding: 22px;
}
.article-aside .calendar-heading {
  margin-bottom: 16px;
  font-size: 21px;
}
.article-aside .calendar-heading span {
  font-size: 25px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .date-layout > .right-rail,
  .article-aside {
    position: static;
  }
  .featured-card.has-image {
    grid-template-columns: 1fr;
  }
  .featured-image {
    max-height: 360px;
  }
  .article-body,
  .article-lead,
  .article-sources {
    max-width: none;
  }
}

@media (max-width: 680px) {
  .date-layout h1 {
    font-size: 37px;
  }
  .featured-copy {
    padding: 26px 24px;
  }
  .featured-card h2 {
    font-size: 31px;
  }
  .holiday-article h1 {
    font-size: 38px;
  }
  .article-lead {
    padding: 14px 16px 14px 18px;
    font-size: 17px;
  }
  .article-body {
    font-size: 16.5px;
    line-height: 1.78;
  }
  .article-body p {
    text-align: left;
  }
  .article-body h2 {
    font-size: 25px;
  }
}


/* ---------- Stage 12: real calendar navigation ---------- */
.calendar-heading .calendar-month-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  font: 28px/1 Arial, sans-serif;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.calendar-heading .calendar-month-arrow:hover,
.calendar-heading .calendar-month-arrow:focus-visible {
  background: #eee3d0;
  color: var(--burgundy);
  transform: translateY(-1px);
}
.date-layout > .right-rail .calendar-card,
.article-aside .calendar-card {
  display: block !important;
}

/* Stage 17: human-readable rule for movable holidays. */
.date-rule-note{
  margin:14px 0 0;
  padding:10px 14px;
  border-left:3px solid #b99045;
  background:rgba(185,144,69,.07);
  font-size:.96rem;
  line-height:1.55;
}

/* FINAL: full calendar registry layer */
.registry-section{margin-top:42px;border-top:1px solid var(--line);padding-top:30px}
.registry-section>h2{margin:0 0 12px;font-size:34px;line-height:1.15}
.registry-note{max-width:900px;color:var(--muted);margin:0 0 20px;font-size:14px;line-height:1.6}
.registry-list{columns:2;column-gap:18px}
.registry-item{break-inside:avoid;border:1px solid var(--line);background:#fffdf8a8;border-radius:9px;margin:0 0 10px;padding:13px 15px}
.registry-item strong{color:var(--navy);font:500 17px/1.3 Georgia,serif;display:block}
.registry-item span{color:var(--muted);margin-top:6px;font-size:12px;line-height:1.35;display:block}
.search-registry{margin-top:38px}
.search-registry>h2{margin:0 0 18px;font-size:34px}
.registry-search-result{margin-bottom:10px}
@media (width<=680px){.registry-list{columns:1}.registry-section>h2,.search-registry>h2{font-size:29px}}
.year-tail-links{border-top:1px solid var(--line);margin-top:34px;padding-top:26px}
.year-tail-links h2{margin:0 0 14px!important;font-size:28px!important}
.year-tail-links>div{display:grid;gap:9px}
.year-tail-links a{color:var(--burgundy);font-weight:700}

/* SEO AUTOPILOT entity layer */
.registry-item-link{display:grid;grid-template-columns:1fr auto;gap:.35rem 1rem;text-decoration:none;color:inherit;align-items:center}
.registry-item-link strong,.registry-item-link span{grid-column:1}
.registry-item-link b{grid-column:2;grid-row:1 / span 2;font-size:1.1rem;color:var(--accent,#9a6f2f)}
.registry-item-link:hover strong{text-decoration:underline;text-underline-offset:3px}
.seo-related{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #e8e0d2}
.seo-related h2{margin-top:0}
.seo-related-list{display:grid;gap:.65rem}
.seo-related-list a{display:block;padding:.75rem .9rem;border:1px solid #e8e0d2;border-radius:10px;text-decoration:none;color:inherit;background:#fff}
.seo-related-list a:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- Stage 20: date page layout polish ---------- */
.date-main-column{
  min-width:0;
}
.date-main-stack{
  display:grid;
  gap:24px;
}
.page-section-card{
  margin-top:0;
  border:1px solid var(--line);
  background:rgba(255,253,248,.84);
  border-radius:14px;
  padding:28px 30px 30px;
  box-shadow:0 10px 28px rgba(64,47,26,.08);
}
.section-head-inline{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:8px;
}
.section-head-inline .eyebrow{
  margin-bottom:10px;
}
.section-head-inline > div{
  min-width:0;
}
.section-kicker{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  text-align:right;
  max-width:240px;
}
.section-intro{
  color:#5f594f;
  margin:0 0 18px;
  font-size:15px;
  line-height:1.65;
}
.featured-card{
  background:linear-gradient(180deg, rgba(255,253,248,.97) 0%, rgba(255,251,245,.92) 100%);
  border-radius:16px;
}
.featured-card .meta.meta-chips{
  gap:8px;
}
.featured-card .meta.meta-chips span,
.article-hero-copy .meta span{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 12px;
  border:1px solid rgba(217,205,184,.9);
  background:rgba(247,242,232,.72);
  border-radius:999px;
}
.detail-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:13px 18px;
  border:1px solid rgba(122,38,58,.22);
  background:rgba(122,38,58,.06);
  border-radius:11px;
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
}
.detail-button:hover,
.detail-button:focus-visible{
  background:rgba(122,38,58,.1);
  border-color:rgba(122,38,58,.35);
  transform:translateY(-1px);
}
.holiday-groups.page-section-card > h2,
.registry-section.page-section-card > h2,
.nearby-section.page-section-card > h2,
.section-head-inline h2{
  margin:0;
}
.holiday-groups.page-section-card,
.registry-section.page-section-card,
.nearby-section.page-section-card{
  border-top:none;
  padding-top:28px;
}
.holiday-category:first-of-type{
  border-top:1px solid var(--line);
}
.holiday-category{
  padding-top:18px;
}
.holiday-category + .holiday-category{
  margin-top:8px;
}
.holiday-category > a{
  margin-top:10px;
}
.registry-section .registry-note{
  max-width:none;
  margin:0 0 18px;
}
.registry-list{
  columns:auto;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.registry-item{
  margin:0;
  min-height:100%;
  padding:14px 16px;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}
.registry-item-link:hover,
.registry-item-link:focus-visible{
  background:#fffdf8;
  border-color:#ccb98f;
  transform:translateY(-1px);
}
.registry-item-link b{
  align-self:center;
}
.nearby-grid.nearby-grid-compact{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.nearby-grid.nearby-grid-compact > a{
  min-height:116px;
}

@media (max-width: 980px) {
  .registry-list{
    grid-template-columns:1fr;
  }
  .section-head-inline{
    align-items:flex-start;
    flex-direction:column;
  }
  .section-kicker{
    max-width:none;
    text-align:left;
  }
}

@media (max-width: 680px) {
  .page-section-card{
    padding:24px 20px;
  }
  .nearby-grid.nearby-grid-compact{
    grid-template-columns:1fr;
  }
  .detail-button{
    width:100%;
    justify-content:center;
  }
}


/* ---------- Date page: nameday special block ---------- */
.nameday-section {
  background: linear-gradient(180deg, rgba(255,251,243,.98), rgba(255,248,237,.96));
  border-color: rgba(214, 196, 162, .9);
}
.nameday-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.nameday-card {
  position: relative;
  display: block;
  padding: 18px 54px 16px 20px;
  border: 1px solid rgba(214, 196, 162, .82);
  border-radius: 14px;
  background: rgba(255, 252, 246, .92);
  box-shadow: 0 10px 30px rgba(91, 64, 41, .04);
  text-decoration: none;
  color: inherit;
}
.nameday-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.3;
}
.nameday-card span {
  display: block;
  color: #8f7d67;
  font-size: 14px;
  line-height: 1.45;
}
.nameday-card b {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 20px;
}
.nameday-card:hover {
  border-color: rgba(180,147,85,.9);
  box-shadow: 0 14px 36px rgba(91, 64, 41, .08);
}
.nameday-card:hover strong {
  color: var(--burgundy);
}

@media (max-width: 680px) {
  .nameday-card {
    padding: 16px 44px 14px 16px;
  }
  .nameday-card strong {
    font-size: 20px;
  }
}

/* ---------- Stage 24: rebuilt standalone homepage ---------- */
.home-shell{
  max-width:1320px;
  margin:0 auto;
  padding:46px 32px 90px;
}
.home-hero{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);
  gap:34px;
  align-items:stretch;
}
.home-hero-copy,
.home-today-card,
.home-section{
  border:1px solid var(--line);
  background:rgba(255,253,248,.88);
  border-radius:16px;
  box-shadow:0 12px 34px rgba(64,47,26,.07);
}
.home-hero-copy{
  padding:42px 44px;
}
.home-hero h1{
  max-width:900px;
  margin:0;
  color:var(--navy);
  font:500 clamp(44px,5.2vw,70px)/1.03 Georgia,serif;
  letter-spacing:-.035em;
  text-wrap:balance;
}
.home-lead{
  max-width:830px;
  margin:24px 0 0;
  color:#474139;
  font-size:20px;
  line-height:1.7;
}
.home-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:30px;
}
.home-primary-action,
.home-secondary-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 18px;
  border-radius:11px;
  font-weight:700;
}
.home-primary-action{
  background:var(--burgundy);
  color:#fff;
}
.home-secondary-action{
  border:1px solid var(--line);
  background:#fffdf8;
  color:var(--burgundy);
}
.home-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:34px;
}
.home-stats>div{
  border-top:1px solid var(--line);
  padding-top:16px;
}
.home-stats strong{
  display:block;
  color:var(--navy);
  font:500 31px/1 Georgia,serif;
}
.home-stats span{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}
.home-today-card{
  padding:30px;
}
.home-today-card h2{
  margin:0 0 18px;
  font-size:34px;
  line-height:1.08;
}
.home-today-holiday{
  display:block;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:18px 0;
}
.home-today-holiday>span{
  display:block;
  margin-bottom:8px;
  color:var(--burgundy);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:11px;
  font-weight:700;
}
.home-today-holiday strong{
  display:block;
  color:var(--navy);
  font:500 24px/1.25 Georgia,serif;
}
.home-today-holiday small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.home-section{
  margin-top:28px;
  padding:34px 36px 38px;
}
.home-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:24px;
}
.home-section-head h2{
  margin:0;
  font-size:clamp(31px,3.2vw,42px);
  line-height:1.1;
}
.home-section-head>p{
  max-width:480px;
  margin:0;
  color:var(--muted);
  line-height:1.6;
}
.home-month-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.home-month-grid>a{
  position:relative;
  display:block;
  min-height:112px;
  padding:19px 46px 18px 18px;
  border:1px solid var(--line);
  background:#fffdf8;
  border-radius:12px;
  transition:.18s ease;
}
.home-month-grid>a:hover{
  transform:translateY(-2px);
  border-color:#c8ae7a;
  box-shadow:0 9px 24px rgba(64,47,26,.07);
}
.home-month-grid strong{
  display:block;
  color:var(--navy);
  font:500 24px/1.15 Georgia,serif;
}
.home-month-grid span{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}
.home-month-grid b{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  color:var(--gold);
}
.home-info-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.home-info-grid article{
  border:1px solid rgba(217,205,184,.85);
  background:rgba(255,255,255,.34);
  border-radius:12px;
  padding:22px;
}
.home-info-grid h3,
.home-prose-columns h3{
  margin:0 0 10px;
  color:var(--navy);
  font:500 23px/1.2 Georgia,serif;
}
.home-info-grid p,
.home-prose-columns p,
.home-longread p{
  color:#484239;
  font-size:16px;
  line-height:1.78;
}
.home-info-grid p,
.home-prose-columns p{
  margin:0;
}
.home-prose-columns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px;
}
.home-prose-columns>div{
  border-top:1px solid var(--line);
  padding-top:20px;
}
.home-prose-columns p+p{
  margin-top:16px;
}
.home-longread{
  max-width:1040px;
}
.home-longread p{
  margin:0 0 17px;
}
.home-longread p:last-child{
  margin-bottom:0;
}
.home-longread a{
  color:var(--burgundy);
  text-decoration:underline;
  text-underline-offset:3px;
}
.home-date-index{
  display:grid;
  gap:18px;
}
.home-date-month{
  border:1px solid var(--line);
  background:#fffdf8b8;
  border-radius:13px;
  padding:20px;
}
.home-date-month-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:15px;
}
.home-date-month-head h3{
  margin:0;
  color:var(--navy);
  font:500 26px/1.15 Georgia,serif;
}
.home-date-month-head>a{
  color:var(--burgundy);
  font-size:13px;
  font-weight:700;
}
.home-date-links{
  display:grid;
  grid-template-columns:repeat(16,minmax(0,1fr));
  gap:6px;
}
.home-date-links a{
  display:grid;
  place-items:center;
  min-height:34px;
  border:1px solid rgba(217,205,184,.78);
  background:#fff;
  border-radius:8px;
  color:#4c453d;
  font-size:13px;
}
.home-date-links a:hover,
.home-date-links a:focus-visible{
  color:#fff;
  background:var(--burgundy);
  border-color:var(--burgundy);
}
.home-faq-list{
  display:grid;
  gap:10px;
}
.home-faq-list details{
  border:1px solid var(--line);
  background:#fffdf8;
  border-radius:11px;
  padding:16px 18px;
}
.home-faq-list summary{
  cursor:pointer;
  color:var(--navy);
  font-weight:700;
}
.home-faq-list p{
  margin:12px 0 0;
  color:#514b43;
  line-height:1.7;
}
@media (max-width:1050px){
  .home-hero{grid-template-columns:1fr}
  .home-month-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .home-date-links{grid-template-columns:repeat(10,minmax(0,1fr))}
}
@media (max-width:700px){
  .home-shell{padding:28px 18px 60px}
  .home-hero-copy,.home-today-card,.home-section{padding:24px 20px}
  .home-hero h1{font-size:42px}
  .home-lead{font-size:18px}
  .home-stats{grid-template-columns:1fr}
  .home-section-head{align-items:flex-start;flex-direction:column;gap:10px}
  .home-month-grid,.home-info-grid,.home-prose-columns{grid-template-columns:1fr}
  .home-date-links{grid-template-columns:repeat(7,minmax(0,1fr))}
}

/* ---------- Stage 25: free postcard generator ---------- */
.postcard-generator{
  overflow:hidden;
  background:linear-gradient(145deg, rgba(255,253,248,.98), rgba(247,242,232,.96));
  border-color:rgba(180,147,85,.5);
}
.postcard-generator-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}
.postcard-generator-head h2{
  margin:0;
  color:var(--navy);
  font-size:clamp(28px,3vw,38px);
  line-height:1.13;
}
.postcard-intro{
  max-width:760px;
  margin:12px 0 0;
  color:#5b554c;
  font-size:15px;
  line-height:1.65;
}
.postcard-free-badge{
  flex:0 0 auto;
  padding:8px 12px;
  border:1px solid rgba(36,95,150,.2);
  border-radius:999px;
  background:#edf5fa;
  color:#245f96;
  font-size:12px;
  font-weight:700;
}
.postcard-presets{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-bottom:22px;
}
.postcard-chip,
.postcard-style-options button,
.postcard-segmented button{
  border:1px solid var(--line);
  background:#fffdf8;
  color:#4d463e;
  border-radius:999px;
  padding:9px 14px;
  cursor:pointer;
  font-size:14px;
  transition:.16s ease;
}
.postcard-chip:hover,
.postcard-style-options button:hover,
.postcard-segmented button:hover{
  border-color:#b49355;
}
.postcard-chip.is-active,
.postcard-style-options button.is-active,
.postcard-segmented button.is-active{
  border-color:var(--burgundy);
  background:rgba(122,38,58,.07);
  color:var(--burgundy);
  font-weight:700;
}
.postcard-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px 18px;
  align-items:end;
}
.postcard-name-field{
  display:grid;
  gap:7px;
  grid-column:1/-1;
}
.postcard-name-field>span,
.postcard-control-group>span{
  color:#5d564d;
  font-size:13px;
  font-weight:700;
}
.postcard-name-field input{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:11px;
  padding:14px 16px;
  color:var(--ink);
  outline:none;
  font-size:16px;
}
.postcard-name-field input:focus{
  border-color:var(--burgundy);
  box-shadow:0 0 0 3px rgba(122,38,58,.08);
}
.postcard-name-heading{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.postcard-limit-hint,
.postcard-char-counter{
  color:#8a7d6d;
  font-size:12px;
  font-weight:600;
}
.postcard-char-counter{
  justify-self:end;
  line-height:1;
}
.postcard-char-counter.is-near-limit{
  color:var(--burgundy);
}
.postcard-control-group{
  display:grid;
  gap:8px;
}
.postcard-segmented,
.postcard-style-options{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.postcard-generate-button,
.postcard-primary-action,
.postcard-photo-upsell button{
  border:0;
  border-radius:11px;
  background:var(--burgundy);
  color:#fff;
  cursor:pointer;
  padding:13px 18px;
  font-weight:700;
}
.postcard-generate-button{
  min-height:48px;
  min-width:190px;
}
.postcard-result{
  margin-top:28px;
  padding-top:26px;
  border-top:1px solid var(--line);
}
.postcard-preview-wrap{
  display:grid;
  place-items:center;
  min-height:420px;
  padding:22px;
  border-radius:14px;
  background:rgba(235,228,214,.52);
}
.postcard-canvas{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:680px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 46px rgba(39,30,22,.18);
}
.postcard-result-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:16px;
}
.postcard-secondary-action{
  border:1px solid var(--burgundy);
  border-radius:10px;
  background:transparent;
  color:var(--burgundy);
  cursor:pointer;
  padding:11px 15px;
  font-weight:700;
}
.postcard-photo-upsell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:24px;
  padding:18px 20px;
  border:1px solid rgba(180,147,85,.45);
  border-radius:13px;
  background:rgba(255,248,235,.8);
}
.postcard-photo-upsell strong,
.postcard-photo-upsell span{
  display:block;
}
.postcard-photo-upsell strong{
  color:var(--navy);
  font-size:17px;
}
.postcard-photo-upsell span{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}
.postcard-photo-upsell button{
  flex:0 0 auto;
  background:var(--navy);
}
.postcard-photo-note{
  margin:12px 0 0;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
@media(max-width:760px){
  .postcard-generator-head{flex-direction:column}
  .postcard-controls{grid-template-columns:1fr}
  .postcard-name-field{grid-column:auto}
  .postcard-generate-button{width:100%}
  .postcard-photo-upsell{align-items:stretch;flex-direction:column}
  .postcard-photo-upsell button{width:100%}
  .postcard-preview-wrap{min-height:320px;padding:14px}
}

/* ---------- Stage 26: context-aware postcard generator ---------- */
.postcard-context-line{
  display:inline-flex;
  flex-wrap:wrap;
  gap:5px;
  max-width:100%;
  margin:12px 0 0;
  padding:9px 12px;
  border:1px solid rgba(180,147,85,.28);
  border-radius:10px;
  background:rgba(255,248,235,.68);
  color:#6a5c4c;
  font-size:13px;
  line-height:1.45;
}
.postcard-context-line strong{
  color:var(--burgundy);
}


/* Stage 26.1 — reset button */
.postcard-actions-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.postcard-reset{
  min-height:48px;
  padding:0 22px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,253,248,.9);
  color:var(--burgundy);
  font-weight:700;
  cursor:pointer;
}
.postcard-reset:hover,
.postcard-reset:focus-visible{
  border-color:var(--burgundy);
  background:#fffdf8;
}
@media (max-width:680px){
  .postcard-actions-row{
    align-items:stretch;
  }
  .postcard-actions-row .postcard-generate{
    flex:1 1 100%;
  }
  .postcard-reset{
    flex:1 1 100%;
  }
}

/* ---------- Stage 26.2: separate scenario / recipient controls ---------- */
.postcard-choice-block{
  margin:18px 0 0;
}
.postcard-choice-label{
  display:block;
  margin:0 0 9px;
  color:#5d564d;
  font-size:13px;
  font-weight:700;
}
.postcard-choice-block .postcard-presets{
  margin-bottom:0;
}
.postcard-recipients{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}
.postcard-recipient-chip{
  border:1px solid rgba(180,147,85,.55);
  background:rgba(255,250,241,.9);
  color:#554b40;
  border-radius:999px;
  padding:9px 14px;
  cursor:pointer;
  font-size:14px;
  transition:.16s ease;
}
.postcard-recipient-chip:hover,
.postcard-recipient-chip:focus-visible{
  border-color:var(--gold);
  background:#fffdf8;
}
.postcard-recipient-chip.is-active{
  border-color:var(--navy);
  background:rgba(24,50,74,.07);
  color:var(--navy);
  font-weight:700;
}
.postcard-recipient-chip.is-nameday{
  background:rgba(237,245,250,.72);
  border-color:rgba(36,95,150,.24);
}
.postcard-recipient-chip.is-nameday.is-active{
  border-color:#245f96;
  color:#245f96;
  background:#edf5fa;
}
.postcard-controls{
  margin-top:22px;
}
.postcard-actions-row{
  grid-column:1/-1;
}
.postcard-actions-row .postcard-generate-button{
  min-width:240px;
}
@media (max-width:680px){
  .postcard-actions-row .postcard-generate-button,
  .postcard-reset{
    flex:1 1 100%;
    width:100%;
  }
}


/* ---------- Stage 27: postcard visual quality ---------- */
.postcard-preview-wrap{background:linear-gradient(135deg,rgba(236,229,217,.72),rgba(247,243,235,.86))}
.postcard-canvas{border:1px solid rgba(180,147,85,.22);box-shadow:0 24px 64px rgba(39,30,22,.20),0 2px 8px rgba(39,30,22,.08)}
.postcard-result-actions{margin-top:18px}
.postcard-primary-action,.postcard-secondary-action{min-height:44px}


/* ---------- Stage 28: local photo postcard mode ---------- */
.postcard-photo-editor{
  margin-top:18px;
  padding:18px;
  border:1px solid rgba(180,147,85,.38);
  border-radius:14px;
  background:rgba(255,253,248,.96);
}
.postcard-photo-editor-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.postcard-photo-editor-head strong,
.postcard-photo-editor-head span{display:block}
.postcard-photo-editor-head strong{
  color:var(--navy);
  font-size:18px;
}
.postcard-photo-editor-head span{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}
.postcard-photo-close{
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  color:var(--muted);
  width:36px;
  height:36px;
  cursor:pointer;
  font-size:24px;
  line-height:1;
}
.postcard-photo-file{
  display:grid;
  gap:7px;
  margin-bottom:18px;
}
.postcard-photo-file>span{
  font-size:13px;
  font-weight:700;
  color:#5d564d;
}
.postcard-photo-file input{
  width:100%;
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.postcard-photo-file small{
  color:var(--muted);
  font-size:12px;
}
.postcard-photo-layouts,
.postcard-photo-position{
  margin-top:15px;
}
.postcard-photo-layout-buttons,
.postcard-photo-position-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.postcard-photo-layout-buttons button,
.postcard-photo-position-buttons button{
  border:1px solid rgba(180,147,85,.55);
  background:#fffaf2;
  color:#554b40;
  border-radius:999px;
  padding:9px 13px;
  cursor:pointer;
}
.postcard-photo-layout-buttons button.is-active,
.postcard-photo-position-buttons button.is-active{
  border-color:var(--burgundy);
  color:var(--burgundy);
  background:rgba(122,38,58,.06);
  font-weight:700;
}
.postcard-photo-status{
  margin:16px 0 0;
  padding:10px 12px;
  border-radius:9px;
  background:rgba(237,245,250,.65);
  color:#4f6270;
  font-size:13px;
}
.postcard-photo-preview-wrap{
  display:grid;
  place-items:center;
  margin-top:18px;
  min-height:360px;
  padding:18px;
  border-radius:13px;
  background:linear-gradient(135deg,rgba(235,228,214,.58),rgba(247,243,235,.90));
}
.postcard-photo-canvas{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:720px;
  border-radius:14px;
  background:#fff;
  box-shadow:0 20px 54px rgba(39,30,22,.20);
}
.postcard-photo-result-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:15px;
}
@media(max-width:680px){
  .postcard-photo-editor{padding:14px}
  .postcard-photo-editor-head{gap:10px}
  .postcard-photo-preview-wrap{min-height:280px;padding:10px}
  .postcard-photo-result-actions .postcard-primary-action,
  .postcard-photo-result-actions .postcard-secondary-action{width:100%}
}
