body {
    background: #f0f0f0;
    color: black;
    font-family: PT Sans Caption, Arial, sans-serif;
    font-size: 85%;
    padding: 0;
    margin: 0;
}
html,
body {
    width: 100%;
}
* {
    box-sizing: border-box;
}
img,
iframe,
object,
embed {
    max-width: 100%;
}
#fb-root,
#fb-root iframe,
iframe[id^="fb_xdm_frame"] {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}
div.content {
    padding: 0.5em 3em;
}
.column {
    width: 57%;
    margin-bottom: 3em;
}
div.caption {
    padding: 0.5em 3em;
}
div.caption span.title {
    font-family: PT Sans Caption, Arial, sans-serif;
    font-weight: bold;
    font-size: 240%;
    letter-spacing: 3px;
}
div.caption span.version {
    color: #d52d2d;
    position: relative;
    font-size: 130%;
    top: -0.7em;
    left: 0.2em;
}
div.caption a,
div.caption a:link,
div.caption a:visited {
    color: black;
    text-decoration: none;
}
div.caption a:hover {
    color: #691414;
    text-decoration: none;
}
.caption-inner {
    display: flex;
    align-items: center;
    gap: 1.5em;
}
.caption-title {
    flex: 1;
    min-width: 0;
    text-shadow: 1px 1px 1px white;
}
.caption-search {
    flex: 0 1 28em;
    min-width: 18em;
}
.caption-search form {
    align-items: center;
    background: white;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    display: flex;
    overflow: hidden;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.caption-search form:focus-within {
    background: white;
    border-color: #2293db;
    box-shadow: 0 0 0 3px rgba(34, 147, 219, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.caption-search input[type="text"] {
    background: transparent;
    border: 0;
    color: #222;
    flex: 1;
    font-size: 16px;
    outline: none;
    padding: 0.75em 0.9em;
    width: 100%;
}
.caption-search input[type="text"]::placeholder {
    color: #777;
}
.caption-search button {
    background: #2293db;
    border: 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 100%;
    font-weight: bold;
    height: auto;
    line-height: 1;
    margin: 0.35em;
    min-height: 2.6em;
    outline: none;
    padding: 0 1em;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}
.caption-search button:hover,
.caption-search button:focus {
    background: #d52d2d;
}
.caption-search button:active {
    transform: scale(0.96);
}
div.intro {
    font-size: 150%;
    line-height: 140%;
    margin: 0.5em 0 3em 0;
}
div.intro a,
div.intro a:link,
div.intro a:visited {
    color: #001e9e;
}
div.intro a:hover {
    color: #691414;
}
div.footer {
    border-top: 1px solid #dedede;
}
div.footer {
    padding: 0.5em 3em;
}
div.clear {
    clear: both;
}
h1 {
    font-weight: normal;
    font-size: 250%;
    padding: 0;
    margin: 0;
}
table {
    border-collapse: collapse;
    border-spacing: none;
}
td,
th {
    padding: 0.3em 1.5em 0.7em 0.3em;
    font-size: 85%;
    text-align: left;
    vertical-align: top;
}
h2 {
    font-weight: normal;
    margin-top: 1.5em;
    font-size: 200%;
}
h3 {
    font-weight: normal;
    margin: 0.3em 0 0 0;
    padding: 0;
}
.error {
    color: red;
}
.private-pad {
    background: #fff8cf;
    border: 1px solid #eadf9a;
    border-radius: 4px;
    display: inline-block;
    padding: 0.45em 0.7em;
}
.private-pad p {
    margin: 0.15em 0;
}
.read-check {
    color: #168a31;
}
.thmb,
.thmb_t {
    width: 300px;
    height: 350px;
    float: left;
    text-align: center;
}
.thmb img,
.thmb_t img {
    border: none;
}
.thmb img:hover,
.thmb_t img:hover {
    box-shadow: 10px 10px 18px #aaaaaa;
}
.thmb_m {
    width: 180px;
    height: 200px;
    float: left;
    text-align: center;
}
.thmb_m img {
    border: none;
}
.thmb_m img:hover {
    box-shadow: 7px 7px 12px #aaaaaa;
}
.large {
    text-align: center;
}
.path {
    padding: 0.5em 0 1em 0;
    line-height: 200%;
}
.top-menu {
    margin-bottom: 1.5em;
}
.path span {
    margin: 0 0.7em 0 0;
    padding: 2px 3px;
}
a {
    color: #2293db;
}
a:visited {
    color: #824faa;
}
a:hover {
    color: #d52d2d;
}
.path a,
.path a:visited,
.path a:link {
    color: #2293db;
}
.path a:hover {
    color: #d52d2d;
}
.path span.current {
    background: #2293db;
    color: white;
}
.path .nowrap {
    white-space: nowrap;
    border: 1px solid #f0f0f0;
}
.path span.label {
    display: inline;
}
.path span.more {
    display: none;
}
a.extlink:visited {
    color: #a028d7;
}
.short span {
    display: none;
}
.short span.current {
    display: inline;    
}
.short span.more {
    display: inline;
    color: #2293db;
    border-bottom: 1px dashed #2293db;
    cursor: pointer;
    padding-left: 0;
    padding-right: 0;
}
.book {
    display: grid;
    grid-template-columns: 57% 1fr;
    gap: 2em;
    margin: 2em 0 1em 0;
    width: 100%;
}
.book .cover img {
    max-width: 85%;
}
.book-details {
    min-width: 0;
}
.extra-photos {
    margin: 1em 0 2em 0;
}
.extra-photos a {
    display: inline-block;
    margin: 0 1em 1em 0;
}
.extra-photos img {
    border: none;
    max-width: 100%;
}
.book-photo {
    margin: 2em 0;
    text-align: center;
}
.book-photo img {
    border: none;
    max-width: 95%;
    height: auto;
}
.book div.buttons {
    margin-top: 1em;
    padding-top: 1em;
}
div.section-title {
    margin-bottom: 2em;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul li {
    margin: 0;
    padding: 0;
}
ol {
    margin: 0 0 0 3em;
    padding: 0;
}
ol li {
    margin-bottom: 1em;
    padding: 0;
}
.count {
    color: gray;
    font-size: 80%;
    padding-left: 1em;
}
.search-book-results {
    margin-left: 0;
}
.search-book-result {
    align-items: flex-start;
    display: flex;
    gap: 1em;
    margin-bottom: 1.1em;
}
.search-book-cover {
    flex: 0 0 54px;
    line-height: 0;
}
.search-book-cover img {
    border: none;
    border-radius: 3px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
    height: auto;
    max-width: 54px;
}
.search-book-info {
    min-width: 0;
}
#prev_book,
#next_book {
    position: absolute;
    top: 46%;
    display: inline;
    padding: 0.3em;
    font-size: 220%;
}
#prev_book {
    left: 0;
}
#next_book {
    right: 0;
}
#prev_book a,
#next_book a,
#prev_book a:visited,
#next_book a:visited {
    text-decoration: none;
    opacity: 0.2;
    color: #001e9e;
}
#prev_book a:hover,
#next_book a:hover {
    text-decoration: none;
    opacity: 1;
    color: #691414;
    text-shadow: 4px 4px 7px #aaaaaa;
}
div.fblogin {
    padding-top: 1em;
}
.field_comment {
    padding-top: 0.3em;
    color: gray;
    font-size: 80%;
}
.isbn-alt {
    font-size: 60%;
    color: gray;
    padding-left: 2em;
    display: none;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

@media (max-width: 1000px) {
    /* Document */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }
    body {
        background: #f7f7f7;
        font-size: 118%;
        line-height: 1.62;
        -webkit-text-size-adjust: 100%;
    }

    /* Section padding */
    .content,
    .caption,
    .footer {
        max-width: 100vw;
        overflow-x: hidden;
    }
    div.content,
    div.caption,
    div.footer {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    /* Header */
    div.caption {
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e2e2e2;
    }
    div.caption span.title {
        display: block;
        font-size: 195%;
        letter-spacing: 0.5px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
    .caption-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75em;
    }
    .caption-search {
        flex: none;
        min-width: 0;
        width: 100%;
    }
    .caption-search form {
        width: 100%;
        border-radius: 10px;
    }
    .caption-search input[type="text"] {
        flex: 1;
        font-size: 16px;
        width: 100%;
        min-height: 3em;
    }
    .caption-search button {
        min-height: 3em;
    }

    /* Typography */
    h1 {
        font-size: 205%;
        line-height: 1.2;
        margin-top: 0.2em;
        overflow-wrap: anywhere;
    }
    h2 {
        font-size: 165%;
        line-height: 1.25;
        margin-top: 1.35em;
        margin-bottom: 0.75em;
    }
    h3 {
        font-size: 120%;
        line-height: 1.35;
    }
    div.intro {
        font-size: 125%;
        margin-bottom: 1.5em;
        line-height: 1.5;
    }

    /* Breadcrumb / path / tag list */
    .path {
        line-height: 1.65;
        padding: 0.7em 0 1em 0;
    }
    .path span {
        display: inline-block;
        margin: 0 0.4em 0.45em 0;
    }
    .path .nowrap {
        white-space: normal;
        border-color: transparent;
    }
    .path span.current {
        border-radius: 6px;
        padding: 0.25em 0.55em;
    }
    .top-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45em;
        margin-bottom: 1.5em;
        padding-top: 0.35em;
    }
    .top-menu span {
        background: white;
        border: 1px solid #dfe4ea;
        border-radius: 8px;
        line-height: 1.2;
        margin: 0;
        padding: 0.6em 0.75em;
    }
    .top-menu span.current {
        border-color: #2293db;
        padding: 0.6em 0.75em;
    }

    /* Author/publisher list columns */
    .column {
        width: auto;
        margin-bottom: 1.5em;
    }
    .column p {
        font-size: 110%;
        line-height: 1.45;
        margin: 0 0 0.65em 0;
    }

    /* Book detail page */
    .book {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.8em;
        margin-top: 1.15em;
        width: 100%;
    }
    .book .cover,
    .book-details {
        width: 100%;
    }
    .book .cover {
        text-align: center;
        padding-bottom: 0.7em;
    }
    .book-details {
        padding: 0.4em 0;
        font-size: 112%;
    }
    .book-details p {
        margin: 0.5em 0;
    }
    .book .cover img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
        border-radius: 4px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }
    .large {
        text-align: center;
    }

    /* Thumbnails */
    .thmb,
    .thmb_t {
        float: none;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 0 0 1.65rem 0;
        text-align: center;
    }
    .thmb img,
    .thmb_t img {
        display: block;
        margin: 0 auto;
        max-width: 92%;
        height: auto;
        border-radius: 3px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    .thmb_m {
        width: 50%;
        height: auto;
        min-height: 0;
        padding: 0 0.4em 1em 0;
    }
    .thmb_m img {
        max-width: 100%;
        height: auto;
    }

    /* Extra photos on book page */
    .extra-photos a {
        width: 48%;
        margin: 0 4% 1em 0;
    }
    .extra-photos a:nth-child(2n) {
        margin-right: 0;
    }
    .extra-photos img {
        border-radius: 3px;
    }
    .book-photo {
        text-align: center;
    }
    .book-photo img {
        max-width: 100%;
        border-radius: 4px;
    }

    /* Forms (search results, upload, admin) */
    form table,
    form tbody,
    form tr,
    form td,
    form th {
        display: block;
        width: 100%;
    }
    form td,
    form th {
        padding: 0.2em 0 0.5em 0;
        font-size: 105%;
    }
    input[type="text"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px !important;
        width: 100% !important;
        padding: 0.55em 0.75em;
        border: 1px solid #ccc;
        border-radius: 6px;
        background: white;
    }
    input[type="text"]:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: #2293db;
        box-shadow: 0 0 0 3px rgba(34, 147, 219, 0.18);
    }
    input[type="submit"],
    button {
        font: inherit;
        font-size: 16px;
        min-height: 2.75em;
        max-width: 100%;
        white-space: normal;
        padding: 0.55em 1.25em;
        border-radius: 6px;
        cursor: pointer;
    }

    /* Lists */
    ol {
        margin-left: 1.5em;
    }
    ol li {
        margin-bottom: 0.85em;
        line-height: 1.5;
    }
    .search-book-result {
        gap: 0.9em;
        margin-bottom: 1.3em;
    }
    .search-book-cover {
        flex-basis: 68px;
    }
    .search-book-cover img {
        max-width: 68px;
    }
    .search-book-info {
        padding-top: 0.1em;
    }

    /* Previous/next book navigation */
    #prev_book,
    #next_book {
        position: static;
        display: inline-block;
        font-size: 170%;
        padding: 0.2em 0.5em 0.2em 0;
    }
    #prev_book a,
    #next_book a,
    #prev_book a:visited,
    #next_book a:visited {
        opacity: 0.6;
    }

    /* Footer */
    div.footer {
        padding-top: 1.25em;
        padding-bottom: 1.25em;
        font-size: 100%;
        line-height: 1.55;
    }
    div.footer p {
        margin: 0.4em 0;
    }
}

@media (max-width: 430px) {
    div.caption span.title {
        font-size: 185%;
    }
    .thmb img,
    .thmb_t img {
        max-width: 90%;
    }
    .thmb_m {
        width: 50%;
    }
    .extra-photos a {
        width: 100%;
        margin: 0 0 1em 0;
    }
    h1 {
        font-size: 195%;
    }
    h2 {
        font-size: 160%;
    }
}
