.guestbook {
    margin: 1em 0;
    color: rgba(var(--phosphor-rgb), 0.9);
    font-family: var(--font-primary);
    overflow-wrap: anywhere;
}

.guestbook-title {
    margin: 0 0 0.75em;
    font-size: 1em;
    font-weight: 700;
}

.guestbook-count,
.gb-date,
.guestbook-label,
.guestbook-counter {
    color: rgba(var(--phosphor-rgb), 0.6);
    font-weight: 400;
}

.guestbook-row {
    padding: 0.25em 0;
    border-bottom: 1px dashed rgba(var(--phosphor-rgb), 0.15);
}

.gb-name {
    color: rgba(var(--phosphor-rgb), 1);
    font-weight: 700;
}

.gb-text {
    overflow-wrap: anywhere;
}

.guestbook-form {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 0.75em 1em;
    margin-top: 1.25em;
}

.guestbook-field {
    display: grid;
    gap: 0.35em;
    min-width: 0;
}

.guestbook-label,
.guestbook-counter {
    font-size: 0.8em;
}

.guestbook-field input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    appearance: none;
    background: rgba(9, 36, 21, 0.92);
    border: 1px solid rgba(var(--phosphor-rgb), 0.3);
    border-radius: 2px;
    color: rgba(var(--phosphor-rgb), 1);
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.guestbook-field input::placeholder {
    color: rgba(var(--phosphor-rgb), 0.6);
    opacity: 1;
}

.guestbook-field input:focus {
    outline: none;
    border-color: rgba(var(--phosphor-rgb), 0.6);
    box-shadow: 0 0 12px rgba(var(--phosphor-rgb), 0.35);
}

.guestbook-website {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
}

.guestbook-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1em;
}

.guestbook-submit {
    min-height: 44px;
    border: 1px solid rgba(var(--phosphor-rgb), 0.3);
    padding: 0.4em 0.8em;
    text-decoration: none;
}

.guestbook-submit:disabled {
    opacity: 0.5;
    cursor: wait;
}

.guestbook-status,
.guestbook-signed {
    margin: 0.75em 0 0;
}

.guestbook-status:empty {
    margin: 0;
}

.guestbook-row.recent {
    animation: guestbook-signed 300ms ease-out;
}

@keyframes guestbook-signed {
    from { background: rgba(var(--phosphor-rgb), 0.18); }
    to { background: transparent; }
}

@media (max-width: 640px) {
    .guestbook-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .guestbook-row.recent {
        animation: none;
    }

    .guestbook-field input,
    .guestbook-submit {
        transition: none;
    }
}
