html.guestbook-modal-open { overflow: hidden; }
.guestbook-modal {
  width: min(900px, calc(100% - 32px));
  height: min(850px, calc(100dvh - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--theme-border, #dbe5e2);
  border-radius: 16px;
  background: var(--theme-modal, #f3f7f6);
  color: var(--text, #263839);
  box-shadow: 0 24px 80px var(--theme-shadow, rgba(30, 60, 50, .2));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}
.guestbook-modal[open] { display: flex; flex-direction: column; }
.guestbook-modal::backdrop { background: rgba(var(--theme-backdrop-rgb, 30, 45, 40), .5); backdrop-filter: blur(5px); }
.guestbook-modal :is(h2, p, button, a) { font-family: inherit; }
.guestbook-modal-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--theme-border, #dbe5e2); flex-shrink: 0; }
.guestbook-modal-header h2 { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 650; }
.guestbook-modal-description { margin: 6px 0 0; color: var(--theme-muted, #657a77); font-size: 14px; line-height: 1.6; }
.guestbook-modal-close { width: 40px; height: 40px; border: 0; flex: 0 0 40px; border-radius: 8px; color: inherit; background: var(--theme-hover, #e5eee2); font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.guestbook-modal-body { flex: 1; min-height: 0; position: relative; }
.guestbook-modal-frame { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.guestbook-modal-frame[hidden] { display: none; }
.guestbook-modal-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; justify-content: center; align-items: center; padding: 28px; color: var(--theme-muted, #657a77); font-size: 15px; text-align: center; }
.guestbook-modal-loading[hidden] { display: none; }
.guestbook-modal-loading p { margin: 0; }
.guestbook-modal-retry { min-height: 40px; padding: 7px 16px; color: var(--theme-accent, #286d65); background: var(--theme-hover, #e5eee2); border: 1px solid var(--theme-border, #dbe5e2); border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.guestbook-modal-footer { flex-shrink: 0; padding: 9px 24px; text-align: right; border-top: 1px solid var(--theme-border, #dbe5e2); }
.guestbook-modal-footer a { color: var(--theme-muted, #657a77); font-size: 12px; text-underline-offset: 3px; }
.guestbook-modal :is(button, a):focus-visible { outline: 3px solid var(--theme-accent, #286d65); outline-offset: 3px; }
@media (max-width: 600px) {
  .guestbook-modal { width: calc(100% - 20px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
  .guestbook-modal-header { padding: 16px 18px; gap: 12px; }
  .guestbook-modal-header h2 { font-size: 20px; }
  .guestbook-modal-description { font-size: 13px; }
  .guestbook-modal-footer { padding-inline: 18px; }
}
