body {
    background: #000;
    color: #fff;
    margin: 0;
    font-family: "Fira Code", monospace;
}

.ascii-wrap {
    display: flex;
    justify-content: center;
    margin: 16px;
}

.ascii-box {
    width: clamp(40ch, 100ch, 100%);
    font-size: clamp(10px, 1.6vw, 14px);
}

.ascii-top,
.ascii-bottom {
    white-space: pre;
    overflow: hidden;
    line-height: 1;
    text-indent: -0.5ch;
}

.ascii-top::before,
.ascii-bottom::before {
    content: " + ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── +";
    display: block;
}

.ascii-middle {
    position: relative;
    padding: 1em 3ch 1em 3ch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ascii-middle::-webkit-scrollbar {
    height: 6px;
}

.ascii-middle::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.ascii-middle::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.ascii-middle::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== ASCII MIDDLE BORDERS (PIPES) ===== */
.ascii-middle::before,
.ascii-middle::after {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1ch;
    overflow: hidden;
    content: "";
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: inherit;
    line-height: 1;
    white-space: pre;
}

.ascii-middle::before {
    left: 0;
}

.ascii-middle::after {
    right: 0;
}

.ascii-title {
    font-weight: bold;
    margin-bottom: 4px;
    word-break: break-word;
}

.ascii-meta {
    opacity: .8;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.ascii-body {
    line-height: 1.5;
    margin-bottom: 12px;
}

.ascii-body p {
    margin: 8px 0;
}

.ascii-body figure {
    margin: 16px 0;
    max-width: 100%;
}

.ascii-body figure img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ascii-body figcaption {
    text-align: center;
    font-size: 0.85em;
    color: #aaa;
    margin-top: 8px;
}

.ascii-body a {
    color: #4fc3f7;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.ascii-body a:hover {
    opacity: 0.8;
}

.ascii-body code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.95em;
    color: #4fc3f7;
    word-break: break-word;
}

.ascii-body pre {
    background-color: rgb(13, 17, 23);
    color: rgb(201, 209, 217);
    padding: 12px;
    border-radius: 4px;
    font-size: 0.85em;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    margin: 12px 0;
    border-left: 3px solid #4fc3f7;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.ascii-body pre::-webkit-scrollbar {
    height: 6px;
}

.ascii-body pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.ascii-body pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.ascii-back {
    margin-top: 20px;
    text-transform: uppercase;
}

.ascii-back a {
    color: #fff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.ascii-back a:hover {
    color: #4fc3f7;
}

@media(max-width:480px) {

    .ascii-wrap {
        margin: 8px;
    }

    .ascii-middle {
        padding: 1em 1em 1em 1em;
        border-left: 1px dashed #fff;
        border-right: 1px dashed #fff;
    }

    .ascii-middle::before,
    .ascii-middle::after {
        display: none;
    }

    .ascii-top,
    .ascii-bottom {
        white-space: pre;
        overflow: hidden;
        line-height: 1;
        text-indent: -0.7ch;
    }

    .ascii-top::before,
    .ascii-bottom::before {
        content: " +------------------------------------------------------------------+";
        display: block;
    }

    .ascii-body pre {
        font-size: 0.75em;
        padding: 8px;
    }

    .ascii-body code {
        font-size: 0.85em;
    }
}