:root {
    --bulma-link: hsl(204, 100%, 48%);
    --bulma-link-text: hsl(204, 100%, 48%);
    --bulma-focus-h: 204deg;
    --bulma-focus-s: 100%;
    --bulma-focus-l: 48%;

    --py-border-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.04);

    --py-body-bg: rgb(250, 250, 250);
    --py-main-bg: rgb(255, 255, 255);
    --py-main-outline: rgb(213, 213, 213);

    --py-emphasize-text: rgb(255, 255, 255);
    --py-emphasize-bg: rgb(20, 20, 20);

    --py-downplay-text: rgb(150, 150, 150);
    --py-downplay-bg: rgb(40, 40, 40);
}
input:focus,
textarea:focus,
select:focus {
    --bulma-input-focus-h: 204deg;
    --bulma-input-focus-s: 100%;
    --bulma-input-focus-l: 48%;
}

/* ----------dark model------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --py-body-bg: rgb(10, 10, 10);
        --py-main-bg: rgb(24, 24, 24);
        --py-emphasize-text: rgb(20, 20, 20);
        --py-emphasize-bg: rgb(255, 255, 255);
        --py-downplay-text: rgb(60, 60, 60);

        --py-main-outline: rgb(40, 40, 40);
    }
}

/* ----------from tailwindcss------------------------------------------- */
.cursor-pointer {
    cursor: pointer;
}
.h-full {
    height: 100%;
}
.min-h-full {
    min-height: 100%;
}
.h-screen {
    height: 100vh;
}
.min-h-screen {
    min-height: 100vh;
}

html,body{ background-color: var(--py-body-bg); }
.footer{ background-color: transparent}

/* ----------common element------------------------------------------- */
.flex-content-center {
    align-content: center;
}
.field-sizing {
    field-sizing: content;
    resize: none;
    height: auto;
    min-height: 3em;
}
.circle {
    border-radius: 50%;
    overflow: hidden;
}
.emphasize {
    color: var(--py-emphasize-text);
    background-color: var(--py-emphasize-bg);
}
.emphasize-text {
}
.emphasize-bg {
}
.downplay {
}
.downplay-text {
    color: var(--py-downplay-text);
}
.downplay-bg {
}

/* ----------login page------------------------------------------- */
.login-panel {
    padding: 1rem;
    border-radius: 1rem;
    max-width: 30rem;
    margin: 0 auto 10%;
}
.halo-outer {
    position: absolute;
    z-index: -10;
    top: 0%;
    right: 10%;
    left: 10%;
    filter: blur(64px);
}
.halo {
    aspect-ratio: 3/1;
    opacity: 0.2;
    background-image: linear-gradient(to right, rgb(0 193 106), white);
}
@media (prefers-color-scheme: dark) {
    .halo {
        opacity: 0.1;
    }
}

/* ----------index page------------------------------------------- */
html,
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

.body-bg {
    background-color: var(--py-body-bg);
}
.main-bg {
    background-color: var(--py-main-bg);
}

.main-block-wrap {
    width: 100%;
    margin: auto;
}
.main-block {
    border-radius: 0;
    border-top: 0.5px solid var(--py-main-outline);
}
@media screen and (min-width: 641px) {
    .main-block-wrap {
        width: 640px;
    }
    .main-block {
        border: 0.5px solid var(--py-main-outline);
        box-shadow: var(--py-border-shadow);
        border-radius: 24px;
    }
}

.main-title {
    padding: 24px;
}
.media-left {
    margin-inline-end: 0;
}
.media .content {
    margin: 0 1rem;
    line-height: 1.6;
}

.media figure p {
    margin: 0.25rem 0 0 1rem;
}
@media screen and (max-width: 641px) {
    .media .content {
        margin: 0 1rem;
    }
    .media figure p {
        margin: 0.5rem 0 0 0.5rem;
    }
}

.post-form{ padding: 0 1rem 1rem}
.tags-wrap{ position: absolute; z-index: 2;top:32px;left: 0; width: 400px; max-height: 400px; overflow: scroll }
.tags{ padding: 1rem}
.tags-children > *{ cursor: pointer}

/*--------------scroll-images---------------------------------------------*/
.scroll-container {
    width: 100%; /* 容器宽度随屏幕自适应 */
    max-width: 550px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;

}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.image-list {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    /* 防止子元素换行 */
    white-space: nowrap;
}

.image-item {
    /* 图片容器宽度自适应，最大不超过250px */
    flex: 0 0 auto;
    width: calc(30% - 12px); /* 占容器30%宽度，减去间距 */
    max-width: 450px;
    min-width: 300px; /* 最小宽度，避免过窄 */
}

.image-item img {
    width: 100%; /* 图片宽度填满容器 */
    height: 180px; /* 固定高度，保持统一 */
    object-fit: cover; /* 裁剪多余部分，保持比例 */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}