/* Guestbook (js/guestbook.js): a list of signed entries above a small form,
   with an LCD-style visitor counter in the status bar. */
.guestbook { gap: 4px; }
.gb-entries {
    flex: 1 1 auto; min-height: 80px; overflow: auto; padding: 4px 8px;
    background: #fff; box-shadow: var(--bevel-in); line-height: 1.5; user-select: text;
}
.gb-entries:focus { outline: none; }
.gb-entries:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.gb-entry { padding: 6px 0; border-bottom: 1px dotted var(--grey, #808080); }
.gb-entry:last-child { border-bottom: 0; }
.gb-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; color: #444; }
.gb-who b { color: var(--navy, #000080); overflow-wrap: anywhere; }
.gb-who time { margin-left: auto; white-space: nowrap; }
.gb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-empty { padding: 16px 4px; color: #444; text-align: center; }

.gb-form { flex: none; }
.gb-form fieldset { display: grid; gap: 6px; margin: 0; padding: 8px 10px; }
.gb-fields { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.3fr); gap: 4px 6px; align-items: center; }
.gb-fields input { width: 100%; min-width: 0; }
.gb-form textarea { width: 100%; resize: none; padding: 4px; font: 13px/1.4 "Courier New", Courier, monospace; -webkit-font-smoothing: auto; }
.gb-actions { display: flex; align-items: center; gap: 8px; }
.gb-note { flex: 1; min-width: 0; color: #444; }
.gb-left { flex: none; color: #444; white-space: nowrap; }

.gb-counter { flex: none; display: flex; align-items: center; gap: 6px; overflow: visible; }
.gb-digits {
    padding: 1px 4px; background: #000; color: var(--accent, #f78cbd);
    font: 12px/1 "Courier New", Courier, monospace; letter-spacing: 2px;
}

@media (max-width: 640px), (max-height: 480px) {
    .gb-fields { grid-template-columns: auto minmax(0, 1fr); }
    .gb-note { display: none; }
    .gb-left { margin-right: auto; }
}
