:root {
    --content-background: rgb(243, 243, 235);
    --primary-text: rgb(35, 35, 38);
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--primary-text);
}

.background {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    z-index: -1;
}

.sky {
    flex: 1;
    background: linear-gradient(
        to bottom,
        #87ceeb,
        #4fa3d1
    );
}

.grass {
    height: 60vh;
    background: linear-gradient(
        to top,
        #2e7d32,
        #66bb6a
    );
}

.nickname {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.02em;
    margin-top: 8vh;
    margin-bottom: 32px;
    width: 100%;
    box-sizing: border-box;
}

.letter {
    display: inline-block;
    font-family: 'Knewave', cursive;
    font-size: clamp(84px, 15vw, 220px);
    line-height: 1;
    color: white;
    will-change: transform;
}

.body {
    display: flex;
    flex-direction: column;
    width: min(95%, 860px);
    min-height: 300px;
    box-sizing: border-box;
    margin: 0 auto 24px;
    padding: 24pt;
    background: var(--content-background);
    color: var(--primary-text);
    border-radius: 16px;
}

.body-header {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.body-header a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 700;
}

.body-header-current {
    color: rgba(35, 35, 38, 0.45);
    font-weight: 700;
    cursor: default;
}

.body hr {
    width: 100%;
    margin: 12pt 0;
    border: 0;
    border-top: 1px solid rgba(35, 35, 38, 0.12);
}

.body-content {
    flex: 1;
}

.body-content h1,
.body-content h2,
.body-content h3,
.body-content h4,
.body-content h5,
.body-content h6 {
    margin-top: 0;
    color: var(--primary-text);
}

.body-content p,
.body-content li,
.body-content blockquote {
    line-height: 1.6;
}

.body-content .short-quote {
    margin: 20px 0 24px;
    padding: 14px 18px 14px 20px;
    border-left: 6px solid rgba(35, 35, 38, 0.7);
    border-radius: 0 12px 12px 0;
    background: rgba(255, 255, 255, 0.35);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
}

.body-content a {
    color: inherit;
}

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

.icons-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 24px;
}

.icons-line a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40pt;
    min-height: 40pt;
    padding: 0;
    border-radius: 999px;
    background: rgba(35, 35, 38, 0.08);
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 700;
    transition: transform 140ms ease, background-color 140ms ease;
    transform-origin: center;
}

.icons-line a svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.icons-line a:hover {
    transform: scale(1.04);
    background: rgba(35, 35, 38, 0.12);
}

.buttons-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

.buttons-table a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40pt;
    box-sizing: border-box;
    padding: 0 18px;
    border-radius: 8pt;
    background: rgba(35, 35, 38, 0.1);
    color: var(--primary-text);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 140ms ease, transform 140ms ease;
}

.buttons-table a:hover {
    background: rgba(35, 35, 38, 0.14);
    transform: translateY(-1px);
}

.friends-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, 88px);
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: calc(4 * 88px + 3 * 8px);
    margin: 20px auto 0;
}

.web-badge-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 31px;
    box-sizing: border-box;
    padding: 3px 6px;
    border: 2px solid rgba(35, 35, 38, 0.4);
    border-radius: 6px;
    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.55),
            rgba(255, 255, 255, 0.2)
        );
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 1px 0 rgba(35, 35, 38, 0.05);
    color: var(--primary-text);
    text-align: center;
    text-decoration: none;
    font-family: 'PT Mono', monospace;
    font-size: 0.58rem;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
    overflow: hidden;
}

.web-badge-text:hover {
    transform: translateY(-1px);
    border-color: rgba(35, 35, 38, 0.58);
    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.7),
            rgba(255, 255, 255, 0.28)
        );
}

.body-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 16px;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.5;
}

@media (max-width: 640px) {
    .nickname {
        margin-top: 5vh;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .body {
        width: min(100% - 20px, 860px);
        padding: 18pt;
        border-radius: 14px;
    }

    .body-header {
        gap: 12px 16px;
    }

    .icons-line {
        gap: 10px;
    }

    .icons-line a {
        width: 40pt;
    }

    .friends-table {
        grid-template-columns: repeat(auto-fit, 88px);
    }
}
