.guestbook-page { grid-column: 1 / -1; width: min(100%, 52rem); min-height: 0; overflow-y: auto; box-sizing: border-box; margin: 0 auto; padding: 1.5rem clamp(.8rem, 3vw, 2rem) 3rem; line-height: 1.6; color: var(--pine-teal); }
.guestbook-heading { text-align: center; margin: .5rem 0 2rem; }
.guestbook-heading > p:first-child { text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; }
.guestbook-heading h1 { font: clamp(2rem, 5vw, 3rem) DynaPuff, sans-serif; margin: .4rem 0; }
.guestbook-form, .guestbook-entry { background: #f8f6ee; border: 1px solid var(--fern); border-radius: .3rem; padding: clamp(1rem, 3vw, 1.5rem); box-shadow: 3px 4px 0 #344e4115; margin-bottom: 1.3rem; }
.guestbook-form { display: grid; gap: .85rem; background: linear-gradient(135deg, #eef1e6, #f8f6ee); }
.guestbook-form[hidden] { display: none; }
.guestbook-form-toggle { margin-bottom: 1.3rem; }
.guestbook-form h2 { font: 1.15rem DynaPuff, sans-serif; }
.guestbook-form > p { font-size: .9rem; }
.guestbook-form label, .reaction-picker label { display: grid; gap: .3rem; font-size: .9rem; }
.guestbook-page input, .guestbook-page textarea, .reaction-picker input { width: 100%; padding: .6rem; color: var(--pine-teal); background: #fffef9; border: 1px solid var(--fern); border-radius: .2rem; font: inherit; box-sizing: border-box; }
.guestbook-page textarea { resize: vertical; }
.guestbook-page button { border: 1px solid var(--hunter-green); border-radius: .2rem; background: linear-gradient(#f5f3eb, var(--dust-grey)); padding: .35rem .7rem; color: var(--pine-teal); font: inherit; cursor: pointer; box-shadow: inset 1px 1px #fff; }
.guestbook-page button:disabled { opacity: .5; cursor: default; }
.guestbook-page :focus-visible { outline: 3px solid #7b5925; outline-offset: 3px; }
.guestbook-form-footer, .guestbook-pagination, .guestbook-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.guestbook-form-footer button { background: linear-gradient(var(--fern), var(--hunter-green)); color: white; padding: .55rem 1rem; }
.guestbook-toolbar { justify-content: flex-start; margin: 1.2rem 0; }
.guestbook-toolbar label { display: grid; gap: .3rem; }
.guestbook-toolbar [aria-pressed=true] { background: var(--hunter-green); color: #fff; }
.guestbook-entry > header, .guestbook-reply > header { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.guestbook-entry time { font-size: .75rem; color: #52624f; margin-left: auto; }
.guestbook-message { white-space: pre-wrap; overflow-wrap: anywhere; margin: .85rem 0 1rem; }
.guestbook-unread, .guestbook-owner { font-size: .7rem; border-radius: 1rem; background: #dce5cc; padding: .1rem .5rem; }
.guestbook-reply { margin-top: 1.3rem; border-left: 3px solid var(--fern); padding: .9rem 0 .3rem 1rem; }
.guestbook-pfp { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--fern); }
.reaction-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.reaction-image { width: 26px; height: 26px; object-fit: contain; }
.reaction-emoji { font-family: system-ui, sans-serif; font-size: 1.3rem; line-height: 1; }
.reaction-fallback { font-size: .7rem; }
.reaction-row .reaction-chip { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 3rem; min-height: 2.3rem; border-radius: 1.5rem; padding: .2rem .65rem; }
.reaction-row .my-reaction { background: #dce8d0; border: 2px solid var(--hunter-green); }
.reaction-row .has-admin-reaction { padding-left: .25rem; border-color: #a78649; background: #faf0d8; }
.admin-reaction-avatar { position: relative; display: inline-block; width: 32px; height: 32px; margin-right: .5rem; }
.admin-reaction-avatar > img { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; border: 2px solid #c3a467; }
.admin-reaction-overlay { position: absolute; bottom: -3px; right: -9px; display: flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; background: #fffdf5; border: 1px solid #c3a467; }
.admin-reaction-overlay .reaction-image { width: 19px; height: 19px; }
.admin-reaction-overlay .reaction-emoji { font-size: 1rem; }
.reaction-picker { margin-top: .8rem; border: 1px solid var(--dry-sage); background: #eff0e7; padding: .8rem; border-radius: .3rem; }
.reaction-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .4rem; margin-top: .6rem; max-height: 18rem; overflow: auto; }
.reaction-options button { display: flex; flex-direction: column; gap: .3rem; font-size: .7rem; }
.reaction-options [aria-pressed=true] { background: #dce8d0; border: 2px solid var(--hunter-green); }
.guestbook-admin-actions { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--dry-sage); }
.guestbook-notice { margin: 1rem 0; padding: .8rem; background: #edf2e5; border: 1px solid var(--fern); }
.guestbook-notice.error { color: #7e3027; background: #f8e9e3; border-color: #a2655b; }
.guestbook-empty { text-align: center; padding: 2rem; }
.reaction-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .75rem; }
.reaction-catalog-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; background: #f8f6ee; border: 1px solid var(--dry-sage); border-radius: .3rem; padding: 1rem; text-align: center; overflow-wrap: anywhere; }
.reaction-catalog-card .reaction-image { width: 48px; height: 48px; }
.reaction-catalog-card .reaction-emoji { font-size: 2.3rem; }
.dashboard-menu ul { flex-wrap: wrap; }

.guestbook-contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.guestbook-contact { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .3rem; font-size: .85rem; overflow-wrap: anywhere; }
.guestbook-contact a { color: var(--hunter-green); min-width: 0; }
@media (max-width: 36rem) { .guestbook-contact-fields { grid-template-columns: 1fr; } }

.guestbook-reactions { position: relative; }
.reaction-row .reaction-add { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0; border: 1px solid var(--fern); border-radius: 50%; background: #e9ecdf; color: var(--hunter-green); box-shadow: none; }
/* Center the smiley's visible pixels within its original transparent canvas. */
.reaction-add-icon { display: block; width: 32px; height: 32px; max-width: none; flex: none; image-rendering: pixelated; transform: translate(1px, -1px); }
.reaction-row .reaction-add:hover, .reaction-row .reaction-add[aria-expanded=true] { background: var(--hunter-green); color: #fff; }
.reaction-picker { position: absolute; top: 100%; left: 0; z-index: 20; width: min(20rem, calc(100vw - 6rem)); box-sizing: border-box; box-shadow: 0 5px 18px #344e4130; }
.guestbook-list > .guestbook-entry:last-child .reaction-picker { top: auto; bottom: 100%; margin-top: 0; margin-bottom: .8rem; }
.reaction-options { grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr)); gap: .25rem; }
.reaction-options button { width: 100%; min-height: 40px; padding: .3rem; align-items: center; justify-content: center; border-color: transparent; box-shadow: none; background: transparent; }
.reaction-options button:hover { background: #dce8d0; }
.reaction-empty { grid-column: 1 / -1; font-size: .85rem; }
