@font-face {
    font-family: "Cordata PPC-400";
    src: url("WebPlus_Cordata_PPC-400.woff") format("woff");
    font-display: swap;
}

:root {
    --paper: #fcf7fd;
    --ink: #000000;
    --sky: #7a9eec;
    --gap: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--sky);
    color: var(--ink);
    font-family: "Cordata PPC-400", Tahoma, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--ink); }

a:hover {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

.site {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    grid-template-areas: "side main" "foot foot";
    gap: 24px 28px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

.site > main { grid-area: main; min-width: 0; }
.site > .footer { grid-area: foot; }

.sidebar {
    grid-area: side;
    position: sticky;
    top: 16px;
}

.side ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.side a {
    display: inline-block;
    padding: 1px 4px;
    margin: 2px 0;
    text-decoration: none;
}

.side a.active {
    background: var(--ink);
    color: var(--paper);
}

.side-stats {
    margin: 14px 0 0;
    padding: 10px 4px 0;
    font-size: 13px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 2px) top / 100% 1px no-repeat;
}

.topbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-bottom: 9px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 2px) bottom / 100% 1px no-repeat;
}

.topbar .lang { text-decoration: none; }

.masthead { text-align: center; }

.logo {
    display: inline-block;
    margin: 56px 0 14px;
    font-size: clamp(2.4rem, 11vw, 7rem);
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.news {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.news-items { min-width: 0; }

.news-item { margin: 0; }

.news-arrow {
    flex: 0 0 auto;
    padding: 0 2px;
    font: inherit;
    color: var(--ink);
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
}

.news-arrow:hover:not(:disabled) {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.news-arrow:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.news-arrow:disabled {
    text-decoration: none;
    opacity: 0.35;
    cursor: default;
}

.news-arrow[hidden] { display: none; }

.post-head {
    margin: 0;
    padding: 5px 10px;
    border-bottom: 1px solid var(--ink);
    background: repeating-linear-gradient(var(--ink) 0 1px, var(--paper) 1px 2px);
    font-size: 18px;
    font-weight: normal;
}

.post-head h3,
.post-head span {
    padding: 0 8px;
    background: var(--paper);
}


/* ===== Посты ===== */
.thread {
    display: grid;
    gap: var(--gap);
    margin-top: 0;
}

.post {
    background: var(--paper);
    border: 1px solid var(--ink);
}

.post-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.post-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: normal;
}

.post-head span { font-size: 14px; flex: 0 0 auto; }

.post-body {
    display: flow-root;
    padding: 12px;
}

.post-image {
    float: left;
    margin: 0 14px 8px 0;
    border: 1px solid var(--ink);
}

.post-text > :first-child { margin-top: 0; }
.post-text > :last-child { margin-bottom: 0; }

.board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 8px;
}

.board-head h1 {
    margin: 0;
    font-size: 32px;
    font-weight: normal;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tabs a {
    padding: 4px 10px;
    border: 1px solid var(--ink);
    background: var(--paper);
    text-decoration: none;
    font-weight: bold;
}

.tabs a.active,
.tabs a:hover {
    background: var(--ink);
    color: var(--paper);
}

.board-desc { margin: 0 0 16px; }

.project-body {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    padding: 12px;
}

.project-stack {
    align-self: start;
    padding: 8px 10px;
    border: 1px dashed var(--ink);
    font-size: 14px;
}

.project-stack > :first-child { margin-top: 0; }
.project-stack > :last-child { margin-bottom: 0; }

.empty {
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--ink);
    text-align: center;
}

.footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 40px;
    font-size: 14px;
}

.post-media {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.post-media .post-image {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}

.post-media .post-text {
    flex: 1 1 auto;
    min-width: 0;
}

.events {
    margin: 0;
    padding: 0;
    list-style: none;
}
 
.event {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ink);
}
 
.event:last-child { border-bottom: none; }
 
.event-time {
    font-size: 22px;
    line-height: 1.2;
}
 
.event-time .local {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
}
 
.event-title b { font-size: 17px; }
 
.event-title .status { margin-left: 4px; vertical-align: 2px; }
 
.event-meta,
.event-desc {
    margin-top: 2px;
    font-size: 14px;
}
 
.event-desc > :first-child { margin-top: 4px; }
.event-desc > :last-child { margin-bottom: 0; }
 
.tag {
    display: inline-block;
    margin-right: 6px;
    padding: 0 5px;
    border: 1px solid var(--ink);
    font-size: 13px;
    vertical-align: 2px;
}
 
.archive { margin-top: 28px; }
 
.archive > summary {
    width: fit-content;
    cursor: pointer;
    font-weight: bold;
}
 
.archive .list { margin-top: 12px; }
 
.next-event {
    margin: 0 0 16px;
    text-align: center;
}
 
@media (max-width: 480px) {
    .event {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px;
    }
 
    .event-time { font-size: 18px; }
}

@media (max-width: 760px) {
    .site {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "side" "main" "foot";
        gap: 20px;
        padding: 20px 12px 32px;
    }

    .sidebar { position: static; }

    .side ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0 14px;
    }

    .side-stats { display: none; }
}

@media (max-width: 720px) {

    .logo { margin-top: 32px; }

    .project-body { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }

    .topbar { justify-content: center; text-align: center; }

    .post-image {
        float: none;
        display: block;
        margin: 0 0 10px;
    }

    .board-head h1 { font-size: 26px; }

    .post-media .post-image {
        width: 96px;
    }
}

.lang {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
}

.lang:hover { background: var(--ink); color: var(--paper); }

.lang:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--ink);
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--ink);
}

.row:last-child { border-bottom: none; }
.row-title { font-weight: bold; }
.row-sub { display: block; font-weight: normal; font-size: 14px; }
.row-meta { flex: 0 0 auto; font-size: 14px; text-align: right; }

.status {
    display: inline-block;
    padding: 0 5px;
    border: 1px solid var(--ink);
    font-size: 13px;
    white-space: nowrap;
}

.status.on { background: var(--ink); color: var(--paper); }

.post.reply { margin-left: 28px; }

.server-card {
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px dashed var(--ink);
}

.server-card dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 2px 14px;
    margin: 0;
}

.server-card dt { font-weight: bold; }
.server-card dd { margin: 0; overflow-wrap: anywhere; }

.reply-form {
    margin-top: 22px;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--ink);
}

.reply-form label { display: block; font-size: 14px; margin: 8px 0 3px; }

.reply-form input,
.reply-form textarea {
    width: 100%;
    padding: 6px;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
}

.reply-form textarea { min-height: 90px; resize: vertical; }

.reply-form button {
    margin-top: 10px;
    padding: 6px 14px;
    font: inherit;
    font-weight: bold;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--ink);
    cursor: pointer;
}

.reply-form button:hover { background: var(--ink); color: var(--paper); }

.note { font-size: 14px; margin: 8px 0 0; }

div.site {
    grid-template-areas:
        "side  main"
        "extra main"
        "foot  foot";
    grid-template-rows: auto 1fr auto;
}

.side-extra {
    grid-area: extra;
    align-self: start;
    font-size: 13px;
}

.pet,
.buttons88 {
    padding-top: 10px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 2px) top / 100% 1px no-repeat;
}

.pet { margin-top: -10px; }

.pet-window {
    position: relative;
    border: 1px solid var(--ink);
    background: var(--paper);
}

.pet-window::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(5px, 5px);
    z-index: -1;
    background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
    pointer-events: none;
}

.pet-title {
    padding: 3px 6px;
    border-bottom: 1px solid var(--ink);
    background: repeating-linear-gradient(var(--ink) 0 1px, var(--paper) 1px 2px);
    text-align: center;
    line-height: 1.2;
}

.pet-title > span {
    padding: 0 6px;
    background: var(--paper);
}

.pet-stage {
    display: block;
    width: 100%;
    padding: 8px 0 6px;
    background: var(--paper);
    border: none;
    cursor: pointer;
}

.pet-stage:hover { background: var(--paper); }

.pet-stage:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -4px;
}

.pet-stage canvas {
    display: block;
    width: 96px;
    height: 120px;
    margin: 0 auto;
    image-rendering: pixelated;
}

.pet-status { margin: 10px 0 6px; }

.pet-needs,
.pet-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    margin: 0;
    align-items: center;
}

.pet-needs dd { margin: 0; text-align: right; }

.pet-bar {
    display: inline-flex;
    gap: 1px;
    padding: 1px;
    border: 1px solid var(--ink);
    background: var(--paper);
    vertical-align: middle;
}

.pet-bar i {
    width: 5px;
    height: 7px;
}

.pet-bar i.on {
    background: repeating-conic-gradient(var(--ink) 0 25%, var(--paper) 0 50%) 0 0 / 2px 2px;
}

.pet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 6px 0 0;
}

.pet-actions button {
    padding: 0 2px;
    font: inherit;
    font-weight: bold;
    color: var(--ink);
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.pet-actions button:hover:not(:disabled) {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.pet-actions button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.pet-actions button:disabled {
    text-decoration: none;
    opacity: 0.45;
    cursor: default;
}

.pet-msg {
    min-height: 1.4em;
    margin: 2px 0 4px;
    font-style: italic;
}

.pet-stats dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.buttons88 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.buttons88 a {
    display: block;
    line-height: 0;
}

.buttons88 a:hover {
    background: none;
    outline: 1px solid var(--ink);
    outline-offset: 1px;
}

.buttons88 img {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
}

@media (max-width: 760px) {
    div.site {
        grid-template-areas: "side" "main" "extra" "foot";
        grid-template-rows: none;
    }

    .pet {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 0 14px;
        align-items: center;
        margin-top: 0;
    }

    .pet-window { grid-row: span 6; align-self: start; }
    .pet-title { font-size: 11px; white-space: nowrap; overflow: hidden; }
    .pet-status { margin: 0 0 4px; }
}

@media (max-width: 560px) {
    .row { flex-direction: column; gap: 2px; }
    .row-meta { text-align: left; }
    .post.reply { margin-left: 12px; }
}

.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }

.hero {
    position: relative;
    background: var(--paper);
    padding-bottom: 64px;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: var(--dither-band, var(--sky)) repeat-x 0 0 / 16px 64px;
    image-rendering: pixelated;
}

.hero .wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px 0;
}

.post,
.list,
.reply-form,
.empty {
    position: relative;
}

.post::after,
.list::after,
.reply-form::after,
.empty::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(6px, 6px);
    z-index: -1;
    background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
    pointer-events: none;
}

img.dithered {
    image-rendering: pixelated;
}

@media (max-width: 480px) {
    .hero { padding-bottom: 48px; }
    .hero::after { height: 48px; background-size: 12px 48px; }
    .hero .wrap { padding: 10px 12px 0; }
    .post::after,
    .list::after,
    .reply-form::after,
    .empty::after { transform: translate(4px, 4px); }
}

.post-pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.reply-form button:disabled { opacity: 0.6; cursor: wait; }

.messages {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.messages li {
    padding: 8px 12px;
    background: var(--paper);
    border: 1px solid var(--ink);
}

.errorlist {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: bold;
}

.errorlist.nonfield { margin: 0 0 8px; }

.post:target .post-head span { background: var(--ink); color: var(--paper); }

.topbar .lang:hover { text-decoration: none; }
