.gbook-page,
.gbook-page * {
    box-sizing: border-box;
}

.gbook-page {
    min-width: 0;
    padding-bottom: 24px;
}

.gbook-page [hidden] {
    display: none !important;
}

.gbook-breadcrumbs {
    color: #616161;
    font-size: 13px;
    margin: 12px 0 4px;
}

.gbook-breadcrumbs span + span,
.gbook-breadcrumbs a + span {
    margin-left: 5px;
}

.gbook-intro {
    border-radius: 6px;
    overflow: hidden;
}

.gbook-intro__content {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 24px;
}

.gbook-intro h1,
.gbook-discussion h2,
.gbook-notice h2,
.gbook-empty h3 {
    color: #212121;
    font-weight: 400;
    margin: 0;
}

.gbook-intro h1 {
    font-size: 30px;
    line-height: 1.25;
}

.gbook-intro p,
.gbook-notice p,
.gbook-empty p {
    color: #616161;
    line-height: 1.5;
    margin: 6px 0 0;
}

.gbook-mode {
    align-items: flex-start;
    border-left: 4px solid #757575;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.45;
    padding: 13px 20px;
}

.gbook-mode span {
    color: #555;
    font-size: 13px;
}

.gbook-mode--open {
    background: #edf7ee;
    border-left-color: #388e3c;
}

.gbook-mode--authenticated {
    background: #edf4fc;
    border-left-color: #1976d2;
}

.gbook-mode--readonly {
    background: #f4f4f4;
    border-left-color: #757575;
}

.gbook-notice {
    align-items: center;
    border-radius: 5px;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    line-height: 1.5;
    margin: 16px 0;
    padding: 16px 20px;
}

.gbook-notice--info {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    display: block;
}

.gbook-notice--login {
    background: #eaf3fd;
    border-left: 4px solid #1976d2;
}

.gbook-notice--readonly {
    background: #f1f1f1;
    border-left: 4px solid #757575;
}

.gbook-notice h2 {
    font-size: 19px;
    line-height: 1.35;
}

.gbook-login-button {
    flex: 0 0 auto;
    padding: 12px 22px;
}

.gbook-composer {
    border-radius: 6px;
    margin: 8px 0 16px;
    overflow: hidden;
}

.gbook-composer__summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    list-style: none;
    min-height: 62px;
    padding: 13px 18px;
    user-select: none;
}

.gbook-composer__summary::-webkit-details-marker {
    display: none;
}

.gbook-composer__summary:hover {
    background: #f7f9fc;
}

.gbook-composer[open] .gbook-composer__summary {
    background: #fafbff;
    border-bottom: 1px solid #e0e0e0;
}

.gbook-composer__summary-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gbook-composer__title {
    color: #243b64;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.gbook-composer__hint {
    color: #616161;
    font-size: 12px;
    line-height: 1.35;
}

.gbook-composer__chevron {
    border-bottom: 2px solid #52627a;
    border-right: 2px solid #52627a;
    flex: 0 0 auto;
    height: 9px;
    margin: -4px 3px 0 1px;
    transform: rotate(45deg);
    transition: transform .18s ease;
    width: 9px;
}

.gbook-composer[open] .gbook-composer__chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.gbook-composer__body {
    padding: 18px 24px 24px;
}

.gbook-composer__guidance {
    color: #616161;
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 16px;
}

.gbook-discussion h2 {
    font-size: 22px;
    line-height: 1.35;
}

.gbook-current-alias {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 16px;
    color: #2e7d32;
    flex: 0 1 auto;
    font-size: 13px;
    line-height: 1.3;
    max-width: 45%;
    overflow-wrap: anywhere;
    padding: 6px 11px;
}

.gbook-field {
    margin-bottom: 16px;
}

.gbook-field label {
    color: #333;
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.gbook-field .input-main {
    border-radius: 3px;
    display: block;
    line-height: 1.45 !important;
    max-width: 100%;
    width: 100%;
}

.gbook-field input.input-main {
    max-width: 520px;
}

.gbook-field textarea.input-main {
    min-height: 132px;
    resize: vertical;
}

.gbook-field .input-main:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, .13);
    outline: 0;
}

.gbook-field .input-main[readonly] {
    background: #f5f5f5;
    color: #424242;
}

.gbook-field .input-main[aria-invalid="true"] {
    border-color: #c62828;
}

.gbook-field small,
.gbook-field__meta {
    color: #6b6b6b;
    font-size: 12px;
    line-height: 1.45;
}

.gbook-field > small {
    display: block;
    margin-top: 5px;
}

.gbook-field__meta {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 5px;
}

#gbook-character-counter {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

#gbook-character-counter.is-near-limit {
    color: #b45309;
    font-weight: 500;
}

.gbook-captcha {
    margin: 4px 0 16px;
    max-width: 100%;
    overflow: hidden;
}

.gbook-submit {
    min-width: 152px;
    padding: 12px 20px;
    position: relative;
}

.gbook-submit__pending {
    display: none;
}

.gbook-form.is-submitting .gbook-submit__default {
    display: none;
}

.gbook-form.is-submitting .gbook-submit__pending {
    display: inline;
}

.gbook-reply-preview {
    background: #f4f7fb;
    border-left: 4px solid #5c6bc0;
    border-radius: 3px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.gbook-reply-preview__header {
    align-items: baseline;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.gbook-reply-preview__meta {
    color: #616161;
    font-size: 12px;
    margin-top: 4px;
}

.gbook-reply-preview p {
    color: #424242;
    line-height: 1.45;
    margin: 8px 0 0;
    max-height: 4.4em;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.gbook-form-message {
    border-radius: 3px;
    line-height: 1.45;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.gbook-form-message:empty {
    display: none;
}

.gbook-form-message--error {
    background: #ffebee;
    border-left: 4px solid #c62828;
    color: #8e1010;
}

.gbook-form-message--status {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    color: #1b5e20;
}

.gbook-discussion {
    min-width: 0;
}

.gbook-discussion__header {
    align-items: baseline;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 20px 0 8px;
}

.gbook-discussion__header > span {
    color: #616161;
    font-size: 13px;
}

.gbook-pagination {
    overflow-x: auto;
    padding: 8px 12px;
    text-align: center;
    -webkit-overflow-scrolling: touch;
}

.gbook-pagination .btn {
    margin: 2px;
    padding: 9px 12px;
}

.gbook-empty {
    border-radius: 6px;
    padding: 36px 24px;
    text-align: center;
}

.gbook-empty h3 {
    font-size: 20px;
}

.gbook-message {
    min-width: 0;
    position: relative;
}

.gbook-legacy-anchor {
    left: 0;
    position: absolute;
    top: -72px;
}

.gbook-message--root {
    border-radius: 6px;
    overflow: hidden;
}

.gbook-message__header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    padding: 14px 16px 8px;
}

.gbook-message__identity {
    align-items: center;
    display: flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    gap: 5px 8px;
    min-width: 0;
}

.gbook-message__name {
    color: #303030;
    overflow-wrap: anywhere;
}

.gbook-message__name--registered {
    color: #2e7d32;
}

.gbook-message__name--admin {
    color: #303f9f;
}

.gbook-message__name--deleted {
    color: #757575;
    font-style: italic;
}

.gbook-author-badge {
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.2;
    padding: 3px 7px;
    text-transform: uppercase;
}

.gbook-author-badge--registered {
    background: #e8f5e9;
    color: #2e7d32;
}

.gbook-author-badge--admin {
    background: #e8eaf6;
    color: #303f9f;
}

.gbook-author-badge--guest {
    background: #eeeeee;
    color: #5f6368;
}

.gbook-message__time {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.gbook-message__time a {
    color: #666;
    text-decoration: none;
}

.gbook-message__time a:hover {
    text-decoration: underline;
}

.gbook-message__actions {
    align-items: center;
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.gbook-text-button,
.gbook-delete-button {
    background: transparent;
    border: 0;
    border-radius: 2px;
    cursor: pointer;
    font: inherit;
    line-height: 1.35;
    padding: 3px 0;
}

.gbook-text-button,
.gbook-message__login {
    color: #1460aa;
    font-size: 12px;
}

.gbook-delete-button {
    color: #b71c1c;
    font-size: 12px;
}

.gbook-delete-button[disabled] {
    cursor: wait;
    opacity: .55;
}

.gbook-message__actions .add-to-fav {
    font-size: 15px;
    line-height: 1;
    margin: 0;
    min-height: 24px;
    padding: 2px 4px;
}

.gbook-message__ip {
    color: #777;
    flex: 0 0 auto;
    font-family: monospace;
    font-size: 11px;
}

.gbook-message__body {
    color: #292929;
    line-height: 1.55;
    overflow-wrap: anywhere;
    padding: 2px 16px 15px;
    white-space: normal;
}

.gbook-replies {
    border-top: 1px solid #eeeeee;
    min-width: 0;
    overflow: hidden;
    padding: 4px 12px 14px 0;
}

.gbook-message--reply {
    border-left: 2px solid #c5cae9;
    margin-top: 10px;
    min-width: 0;
}

.gbook-depth-1 {
    margin-left: 14px;
}

.gbook-depth-2 {
    margin-left: 28px;
}

.gbook-depth-3 {
    margin-left: 42px;
}

.gbook-depth-4 {
    margin-left: 56px;
}

.gbook-message--reply .gbook-message__header {
    padding: 9px 12px 4px;
}

.gbook-message--reply .gbook-message__body {
    padding: 4px 12px 10px;
}

.gbook-parent-link {
    color: #686868;
    display: inline-block;
    font-size: 11px;
    margin: 0 12px 2px;
    text-decoration: none;
}

.gbook-parent-link:hover {
    text-decoration: underline;
}

.gbook-page a:focus,
.gbook-page button:focus,
.gbook-page summary:focus,
.gbook-page input:focus,
.gbook-page textarea:focus {
    outline: 2px solid #283593;
    outline-offset: 2px;
}

.gbook-page .reply-message {
    background: #fff9c4;
    transition: background-color .6s ease;
}

@media (max-width: 640px) {
    .gbook-intro__content,
    .gbook-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .gbook-intro__content {
        padding: 17px;
    }

    .gbook-intro h1 {
        font-size: 25px;
    }

    .gbook-mode {
        padding: 12px 16px;
    }

    .gbook-notice {
        gap: 14px;
        padding: 14px 16px;
    }

    .gbook-login-button {
        align-self: flex-start;
    }

    .gbook-current-alias {
        max-width: 42%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gbook-composer {
        margin-bottom: 12px;
    }

    .gbook-composer__summary {
        gap: 10px;
        min-height: 54px;
        padding: 10px 13px;
    }

    .gbook-composer__hint {
        display: none;
    }

    .gbook-composer__body {
        padding: 15px 16px 18px;
    }

    .gbook-composer__guidance {
        margin-bottom: 13px;
    }

    .gbook-reply-preview__header,
    .gbook-field__meta,
    .gbook-discussion__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .gbook-pagination {
        padding: 6px;
        text-align: left;
        white-space: nowrap;
    }

    .gbook-message__header {
        align-items: flex-start;
        padding: 12px 12px 7px;
    }

    .gbook-message__identity,
    .gbook-message__actions {
        flex-basis: 100%;
    }

    .gbook-message__body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .gbook-replies {
        padding-right: 6px;
    }

    .gbook-depth-1 {
        margin-left: 6px;
    }

    .gbook-depth-2 {
        margin-left: 10px;
    }

    .gbook-depth-3 {
        margin-left: 14px;
    }

    .gbook-depth-4 {
        margin-left: 18px;
    }
}

@media (max-width: 380px) {
    .gbook-captcha .g-recaptcha {
        margin-bottom: -12px;
        transform: scale(.88);
        transform-origin: 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gbook-page *,
    .gbook-page *::before,
    .gbook-page *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
