#background {
    width: 100%;
    height: 200vw;
    overflow: hidden;
}

#ad {
    position: relative;
    /* ↑ 让"整张可点"的透明遮罩层可以铺在上面 */
    height: 500px;
    border-radius: 5px;
    text-align: right;
    overflow: hidden;
    background: no-repeat;
    background-image: url(../source/novel-1.svg);
    background-size: contain;
    background-position: center;
}

#buttons {
    position: inherit;
    width: 7vmin;
    height: 100%;
    /* 用 flex 竖排：按钮数量由 config/ads.json 决定，不再是写死的 7 个 */
    display: inline-flex;
    flex-direction: column;
    background-color: rgba(7, 7, 7, 0.7);
    /* 必须浮在 #ad-link 遮罩之上，否则被挡住点不到 */
    z-index: 2;
}

#buttons button {
    width: 100%;
    /* flex: 1 让所有页码按钮平分高度，多少条都自动适应 */
    flex: 1 1 0;
    min-height: 0;
    padding: 0;
    background-color: rgba(199, 198, 137, 0.1);
    border: black solid 3px;
    font-size: 3vmin;
    text-align: center;
    color: rgb(255, 252, 0);
    cursor: pointer;
}

/* 左右箭头固定占一小段高度，不参与平分 */
#buttons button.arrow {
    flex: 0 0 8%;
    font-size: 2.4vmin;
}

#button0 {
    background-color: rgb(199, 198, 137);
}

/* ---------- 整张广告图可点击 → 直达最新一章 ---------- */
/* 一层透明遮罩铺满广告图（右侧让开页码按钮条）。
   href 由 index.html 里的脚本按 config/ads.json 里每一屏的 link 字段设置。 */

#ad-link {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 7vmin;                 /* 让开右侧竖排的页码按钮 */
    z-index: 1;
    display: block;
    border-radius: 5px 0 0 5px;
    background-color: transparent;
    transition: background-color 0.15s ease;
}

/* 悬停时铺一层极淡的黄色，提示"这里可以点" */
#ad-link:hover {
    background-color: rgba(255, 252, 0, 0.07);
}

#introduction {
    height: 500px;
    border-radius: 5px;
    /* 上下排布：跑马灯固定高度，列表占满剩余空间。
       条目数量由 config/info.json 决定，太多了也不会撑破这个 500px 的框 */
    display: flex;
    flex-direction: column;
}

#introduction marquee {
    flex: 0 0 auto;
    background-color: rgba(17, 17, 17);
}

#introduction ul {
    flex: 1 1 auto;
    /* flex 子项默认不肯收缩，必须显式设 min-height:0 才会出现滚动条 */
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(251, 255, 0, 0.35) transparent;
}

#introduction ul::-webkit-scrollbar {
    width: 6px;
}

#introduction ul::-webkit-scrollbar-thumb {
    background-color: rgba(251, 255, 0, 0.35);
    border-radius: 3px;
}

#introduction ul::-webkit-scrollbar-track {
    background-color: transparent;
}

#introduction ul li {
    width: 100%;
    line-height: 175%;
    font-size: 150%;
    /* border: red solid 1px; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    list-style-position: inside;
}

#introduction ul li a:hover {
    color: rgb(255, 252, 0)
}

#more {
    height: 2500px;
    /* border-radius: 5px; */
}

footer {
    background-color: rgb(190, 187, 0);
    text-align: center;
    line-height: 50px;
}

footer p {
    text-align: right;
    font-size: 10pt;
    background-color: rgb(190, 187, 0);
    margin: 0;
    padding: 0;
    color: rgb(7, 7, 7);
    /* border: red solid 3px; */
}

@media only screen and (min-width: 768px) {
    /* 针对电脑 */
}

@media only screen and (max-width: 768px) {
    /* 针对手机： */
    #buttons {
        width: 15vmin;
    }
    #buttons button {
        font-size: 1.8em;
    }
    .plate {
        height: 500px;
    }
    /* 手机屏幕窄，遮罩要避让更宽的按钮条 */
    #ad-link {
        right: 15vmin;
    }
}