/* Scoped additions only: existing ABE layout and global tokens stay unchanged. */
.abe-greeting { scroll-margin-top: 110px; }
.abe-greeting .abe-greeting-portrait { width: 154px; height: 150px; object-fit: contain; border: 0; border-radius: 10px; margin: auto; }
.abe-greeting .abe-greeting-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.abe-greeting .abe-greeting-download { display: inline-flex; align-items: center; padding: .75rem 0; text-decoration: underline; font-weight: 700; }
.abe-birthday-feature-photo { display: block; width: min(280px, 100%); height: auto; margin: auto; border-radius: 24px; box-shadow: 0 18px 45px rgba(62, 31, 72, .18); }
.abe-greeting-dialog { width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 2rem; border: 2px solid var(--primary); border-radius: 20px; color: var(--text-dark); background: var(--light-surface); overflow: auto; box-shadow: var(--shadow-lg); }
.abe-greeting-dialog::backdrop { background: rgba(15,23,42,.82); }
.abe-greeting-dialog { padding-top: 4.5rem; }
.abe-greeting-dialog .abe-greeting-close { position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-light); border-radius: 50%; background: #faf9f4; color: var(--text-dark); font: 30px/1 Arial, sans-serif; cursor: pointer; }
.abe-greeting-dialog .abe-greeting-close:hover { background: var(--primary); }
.abe-greeting-dialog h2 { font-family: var(--font-heading); line-height: 1.35; margin: 1rem 0; font-size: 1.65rem; }
.abe-greeting-dialog p { margin: .8rem 0; }
.abe-greeting-dialog .abe-greeting-author { display: flex; gap: 1rem; align-items: center; margin: 1.5rem 0 .5rem; }
.abe-greeting-dialog .abe-greeting-portrait { flex: 0 0 auto; width: 80px; height: auto; margin: 0; border-radius: 8px; box-shadow: 0 3px 12px rgba(15,23,42,.1); }
.abe-greeting-dialog .abe-greeting-author p { min-width: 0; font-size: .95rem; }
.abe-greeting-dialog .abe-greeting-author span { color: var(--text-muted); }
.abe-greeting-dialog a { margin-top: 1rem; }
.abe-birthday-dialog { border-color: #7b4b83; background: linear-gradient(145deg, #fff, #fbf7fc); }
.abe-birthday-dialog .exec-subtitle { color: #7b4b83; }
.abe-birthday-dialog .abe-greeting-portrait { width: 82px; height: 104px; object-fit: cover; object-position: center top; }
.abe-message-page { padding: 2rem 1rem 4rem; }
.abe-message-shell { max-width: 850px; margin: auto; }
.abe-message-brand { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--primary); font-family: var(--font-heading); font-weight: 700; }
.abe-message-brand img { width: 76px; height: auto; }
.abe-message-back { display: inline-block; margin: 1.5rem 0; text-decoration: underline; }
.abe-message-header h1 { font-family: var(--font-heading); font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.3; margin: .8rem 0 1.5rem; }
.abe-message-byline { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.5rem; }
.abe-message-byline img { width: 110px; height: auto; border-radius: 16px; }
.abe-message-byline span { display: block; color: var(--text-muted); }
.abe-message-article { background: white; border: 1px solid var(--border-light); border-radius: 20px; padding: clamp(1.25rem, 4vw, 3rem); margin: 2rem 0; font-size: 1.05rem; line-height: 1.85; }
.abe-message-article p { margin-bottom: 1.3rem; }
.abe-message-article > p { text-align: justify; text-align-last: left; hyphens: auto; }
.abe-message-article h2 { font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.45; margin: 2rem 0 1rem; }
.abe-message-article .abe-teachers-day-wish { display: grid; grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr); align-items: center; gap: 1rem; margin: 2.75rem auto 1.75rem; color: #9a7420; font-size: clamp(1.35rem, 4vw, 2rem); line-height: 1.35; text-align: center; }
.abe-teachers-day-wish::before, .abe-teachers-day-wish::after { content: ''; height: 1px; background: linear-gradient(90deg, transparent, #c8a84f); }
.abe-teachers-day-wish::after { background: linear-gradient(90deg, #c8a84f, transparent); }
.abe-teachers-day-wish span { text-wrap: balance; }
.abe-message-article figure { margin: 1.5rem 0 0; }
.abe-message-article .abe-message-group { display: block; width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.abe-message-signoff { position: relative; isolation: isolate; overflow: hidden; margin: 2.5rem 0 2rem; padding: 8rem 2rem; border: 1px solid #e6dcc2; border-radius: 16px; background: #fbf8f0; text-align: center; }
.abe-signoff-floral { position: absolute; width: 145px; height: 145px; object-fit: contain; pointer-events: none; z-index: -1; }
.abe-signoff-floral-top { top: 0; left: 0; transform-origin: top left; }
.abe-signoff-floral-bottom { bottom: 0; right: 0; transform: rotate(180deg); transform-origin: center; }
.abe-message-article .abe-signoff-wishes { margin: 0 0 2rem; color: #80652c; font: italic 1.35rem/1.5 Georgia, 'Times New Roman', serif; }
.abe-message-signatories { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
.abe-message-signature h3 { margin: 0 0 .35rem; font-family: Georgia, 'Times New Roman', serif; font-weight: 500; font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.4; text-transform: none; letter-spacing: 0; color: #171c2c; }
.abe-message-signature p { color: #80652c; font-size: .9rem; line-height: 1.5; margin: 0; }
.abe-message-article .abe-message-staff { max-width: 28rem; margin: 2rem auto 0; padding-top: 1.4rem; border-top: 1px solid #dfd3b6; color: #59606b; font-size: .9rem; line-height: 1.8; }
.abe-message-staff strong { color: #30394a; font-weight: 600; }
.abe-birthday-page { background: #fbf8fc; }
.abe-birthday-page .abe-message-brand { border-color: #80528a; }
.abe-birthday-page .abe-message-header { padding: 1.5rem 0 .5rem; }
.abe-birthday-page .abe-message-byline img { width: 132px; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; border-radius: 18px; box-shadow: 0 12px 30px rgba(62, 31, 72, .18); }
.abe-birthday-page .section-subtitle, .abe-birthday-page .abe-message-emphasis { color: #77427f; }
.abe-birthday-page .abe-message-article { position: relative; overflow: hidden; border-color: #e8dbea; }
.abe-birthday-opening { font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; }
.abe-birthday-refrain { margin: 2.5rem 0; padding: 1.5rem; border-block: 1px solid #d8bddc; color: #513057; font: 600 1.25rem/1.8 Georgia, 'Times New Roman', serif; text-align: center; }
.abe-birthday-blessing { position: relative; isolation: isolate; overflow: hidden; margin: 2.5rem 0; padding: 6.5rem 2rem; border: 1px solid #dfcce2; border-radius: 18px; background: #fcf8f2; text-align: center; }
.abe-birthday-blessing .abe-signoff-floral { opacity: .92; }
.abe-birthday-blessing h2 { color: #77427f; font-size: clamp(1.45rem, 4vw, 2.1rem); text-align: center; }
.abe-birthday-blessing p { margin: 1rem auto; max-width: 36rem; text-align: center; }
.abe-birthday-group { display: block; width: 100%; height: auto; margin-top: 2rem; border-radius: 16px; }
.abe-birthday-caption { margin-top: .65rem; color: var(--text-muted); font-size: .85rem; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .abe-message-header { animation: abe-message-arrive .65s ease-out both; }
  .abe-signoff-floral-top { animation: abe-floral-sway 4s ease-in-out 1; }
  .abe-signoff-floral-bottom { animation: abe-floral-sway-bottom 4s ease-in-out 1; }
}
@keyframes abe-message-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes abe-floral-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2deg); } }
@keyframes abe-floral-sway-bottom { 0%, 100% { transform: rotate(180deg); } 50% { transform: rotate(178deg); } }
.abe-message-page a:focus-visible, .abe-greeting a:focus-visible, .abe-greeting-dialog :focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 4px; }
@media(max-width: 600px) { .abe-greeting-dialog { padding: 4.5rem 1.2rem 1.2rem; } .abe-message-byline { align-items: flex-start; } .abe-message-article .abe-teachers-day-wish { grid-template-columns: 32px minmax(0, auto) 32px; gap: .65rem; } .abe-message-signoff, .abe-birthday-blessing { padding: 6.5rem 1rem; } .abe-signoff-floral { width: 110px; height: 110px; } }
@media print { .abe-message-back, .abe-message-header .btn-primary { display:none; } .abe-message-page { padding:0; } .abe-message-article { border:0; padding:0; } .abe-message-article h2 { break-after:avoid; } .abe-message-article figure { break-inside:avoid; } }
/* Justify message paragraphs without affecting the floral closing */
.abe-message-article > p {text-align: justify;text-align-last: left;hyphens: auto;}
