/* Font imports are handled locally in assets/css/fonts.css */
/* 浮窗样式 */
.font-cyrillic {
    font-family: "Noto Sans", "Segoe UI", "Arial", "Helvetica Neue", sans-serif;
}

.lazy-img {
    background-color: #d9d0c3;
    transition: background-color 0.3s ease;
}

.lazy-img-error {
    background-color: #c3b3a0;
}

#floating-panel,
#about-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: var(--app-vh);
    width: 37vw;
    border-radius: 8px 0 0 8px;
    background: transparent; /* 改为透明，因为子panel有自己的背景 */

    display: flex;
    flex-direction: row;
    /* 让slide在右�?*/
    z-index: 1000;
    transition: transform 0.45s ease-in-out, width 0.3s ease-in-out;
    transform: translateX(100%);
    /* overflow: hidden; */
    /* 防止溢出 */
    /* fixed元素可以作为absolute子元素的定位上下�?*/
}

#floating-panel.hidden,
#about-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

#floating-panel:not(.hidden),
#about-panel:not(.hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Panel容器样式 - 双层叠放 */
.panel-entry,
.panel-comment {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    z-index: 1;
    transition: transform 0.45s ease-in-out, z-index 0.3s ease-in-out;
    background: #43403B;
    border-radius: 8px 0 0 8px;
}

/* 笔记面板特殊样式 */
.panel-comment {
    background: #EEE9DB;
}

.panel-entry.active,
.panel-comment.active {
    z-index: 2;
    transform: translateX(0);
}

.panel-entry:not(.active),
.panel-comment:not(.active) {
    transform: translateX(-68px);
    cursor: pointer;
}

.panel-entry:not(.active):hover,
.panel-comment:not(.active):hover {
    transform: translateX(-88px);
}


/* Inactive panel should not allow inner interactions (tabs stay clickable) */
.panel-entry:not(.active) .panel-main,
.panel-entry:not(.active) .panel-bottom,
.panel-entry:not(.active) .panel-slide,
.panel-comment:not(.active) .panel-main,
.panel-comment:not(.active) .panel-bottom,
.panel-comment:not(.active) .panel-slide {
    pointer-events: none;
}

/* 主内容区�?- 包含top和bottom，可整体滚动 */
.panel-main {
    flex: 1;
    height: var(--app-vh);
    overflow-y: scroll;
    /* padding-right: 12px; */

    /* 隐藏原生滚动�?*/
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.panel-main::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
}

/* 上半部分 */
.panel-top {
    min-height: 200px;
    /* 改为min-height，让它可以根据内容调�?*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #FAF4E5;
    padding: 16px;
    padding-bottom: 70px;
}

/* 笔记面板的顶部边框颜�?*/
/* .panel-comment .panel-top {
    border-bottom: 1px solid #43403B;
} */

.panel-top p {
    margin: 0;
    padding: 0;

    /* ID距离顶端96px，减去padding 16px = 80px */
    padding-top: 80px;
    padding-bottom: 50px;
}


.panel-top div {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    /* 中英文之间的间距 */
}

.panel-top img {
    width: 541px;
    height: 339px;
    object-fit: cover;
    margin: 0;
    padding: 0;
    padding-bottom: 50px;
    /* img到div之间50px */
}

/* �?*/
.panel-top p {
    color: #FAF4E5;
    text-align: center;
    font-family: "Barlow Condensed";
    font-size: 20.735px;
    font-style: normal;
    font-weight: 600;
}
:lang(en) .panel-top p {
    color: #FAF4E5;
    text-align: center;
    font-family: "Barlow Condensed";
    font-size: 20.735px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px;
}

/* 笔记面板的文字颜�?*/
.panel-comment .panel-top p {
    color: #43403B;
}
:lang(en) .panel-comment .panel-top p {
    color: #43403B;
}

.panel-top .term-main {
    margin: 0;
    padding: 0;
    color: #FAF4E5;
    font-family: "ChillDINGothic";
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    text-align: center;
    line-height: 80px;
}
:lang(en) .panel-top .term-main {
    margin: 0;
    padding: 0;
    color: #FAF4E5;
    font-family: "Stint Ultra Condensed";
    font-size: 66px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 80px;
}

/* 笔记面板的term-main颜色 */
.panel-comment .panel-top .term-main {
    color: #43403B;
    text-align: center;
    font-family: "ChillDINGothic";
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 60px;
}
:lang(en) .panel-comment .panel-top .term-main {
    color: #43403B;
    font-family: "Stint Ultra Condensed";
    font-size: 66px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 80px;
}

.panel-top .term-ori {
    margin: 0;
    padding: 0;
    color: #FAF4E5;
    font-family: "Stint Ultra Condensed";
    font-size: 66px;
    font-style: normal;
    font-weight: 400;
    text-align: center;
    line-height: 50px;
}
:lang(en) #floating-panel .panel-top .term-ori,
:lang(en) #about-panel .panel-top .term-ori {
    display: none;
}

/* 笔记面板的term-ori颜色 */
.panel-comment .panel-top .term-ori {
    color: #43403B;
    text-align: center;
    font-family: "Stint Ultra Condensed";
    font-size: 66px;
    font-style: normal;
    font-weight: 400;
    line-height: 25.928px;
}

.panel-comment .panel-top {
    position: relative;
    min-height: 240px;
    padding: 0 36px 20px;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #43403B;
}

.panel-comment .panel-top .comment-top-id {
    position: absolute;
    top: 45px;
    left: 36px;
    display: block;
    margin: 0;
    padding: 0;
    color: #43403B;
    font-family: "Barlow Condensed";
    font-size: 20px;
    font-style: normal;
    font-weight: 575;
    line-height: 1;
}

.panel-comment .panel-top .comment-top-center {
    margin-top: calc(93px - 48px);
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.panel-comment .panel-top .comment-top-center .term-main {
    display: block;
    margin: 0;
    padding: 0;
    color: #43403B;
    text-align: center;
    font-family: "ChillDINGothic";
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 16px;
}

.panel-comment .panel-top .comment-top-echoes {
    display: block;
    margin: 0;
    color: #43403B;
    text-align: center;
    font-family: "ChillDIN";
    font-size: 60px;
    font-style: normal;
    font-weight: 575;
    line-height: 1.2;
}

:lang(en) .panel-comment .panel-top .comment-top-echoes {
    font-family: "Stint Ultra Condensed";
    font-size: 66px;
    font-style: normal;
    font-weight: 400;
}

.panel-comment .panel-top .comment-top-intro {
    margin: 0;
    padding: 0;
    color: #43403B;
    text-align: center;
    font-family: "Barlow Condensed";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.3;
}

:lang(en) .panel-comment .panel-top .comment-top-intro {
    font-style: italic;
}

/* 下半部分：其他标签内�?*/
.panel-bottom {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.panel-bottom section {
    padding: 32px 52px 0 36px;

    display: flex;
    flex-direction: row;
}

/* About panel: offset right-side text from left titles */
#about-panel .panel-bottom section > div {
    padding-top: 42px;
}

#about-panel .devlog-list {
    margin: 0;
    padding-left: 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: decimal;
    list-style-position: outside;
}

#about-panel .devlog-list li {
    padding-left: 12px;
}

#about-panel .devlog-list p {
    margin: 0;
}

/* 笔记panel的section默认折叠 */
.panel-comment .panel-bottom section {
    max-height: 260px;
    overflow: hidden;
    transition: transform 0.45s ease;
    cursor: pointer;
    position: relative;
    transform: translateY(0);
    background-color: #EEE9DB;
}

.panel-comment .panel-bottom section .note-like-toggle {
    position: absolute;
    top: 32px;
    right: 63px;
    width: 20px;
    height: 18.35px;
    border: none;
    background-color: transparent;
    background-image: url("../images/unliked.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    z-index: 3;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
    transition: transform 0.2s ease;
}

.panel-comment .panel-bottom section .note-like-toggle .note-like-count {
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    display: none;
    color: #43403B;
    font-family: "Barlow Condensed", "ChillDIN";
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: none;
    padding: 0 !important;
    margin: 0 !important;
}

.panel-comment .panel-bottom section .note-like-toggle.is-liked {
    background-image: url("../images/liked.svg");
}

.panel-comment .panel-bottom section .note-like-toggle:hover {
    transform: scale(1.06);
}

.panel-comment .panel-bottom section .note-like-toggle:focus-visible {
    outline: 1px solid #43403B;
    outline-offset: 2px;
}

/* 仅前三个comment section显示上边阴影 */
.panel-comment .panel-bottom section:not(#section-contributors):not(#section-contact):not(#section-editors) {
    box-shadow: 0 -4px 4px 0 rgba(0, 0, 0, 0.10);
}

/* About panel devlog should be plain text without comment behaviors */
#about-panel .panel-comment .panel-bottom section {
    max-height: none;
    overflow: visible;
    cursor: default;
    background-color: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
}

#about-panel .panel-comment .panel-bottom section:hover {
    transform: none;
    box-shadow: none;
}

#about-panel .panel-comment .panel-bottom section:not(#section-contributors):not(#section-contact):not(#section-editors) {
    box-shadow: none !important;
}

#about-panel .panel-comment.active .panel-bottom section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors):hover {
    transform: none;
    box-shadow: none;
}

/* 展开状�?*/
.panel-comment .panel-bottom section.note-expanded {
    max-height: none;
}

/* Note panel layout when a note is expanded */
#floating-panel .panel-comment .panel-main.notes-fixed .panel-top {
    display: none;
}

#floating-panel .panel-comment .panel-main.notes-fixed {
    overflow: hidden;
}

#floating-panel .panel-comment .panel-bottom.notes-mode {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section {
    flex: 0 0 auto;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section.note-expanded {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 60vh;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section.note-expanded::-webkit-scrollbar,
#about-panel .panel-comment .panel-bottom.notes-mode section.note-expanded::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Allow carousel arrows to render fully inside expanded notes */
#floating-panel .panel-comment .panel-bottom.notes-mode section.note-expanded .note-images-carousel,
#about-panel .panel-comment .panel-bottom.notes-mode section.note-expanded .note-images-carousel {
    overflow: visible;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section.note-below-first {
    margin-top: auto;
}

/* Keep footer sections visible in notes-mode */
#floating-panel .panel-comment .panel-bottom.notes-mode #section-contributors,
#floating-panel .panel-comment .panel-bottom.notes-mode #section-contact,
#floating-panel .panel-comment .panel-bottom.notes-mode #section-editors {
    display: none !important;
}

#floating-panel .panel-comment .panel-bottom #section-contributors,
#floating-panel .panel-comment .panel-bottom #section-contact,
#floating-panel .panel-comment .panel-bottom #section-editors {
    display: block;
}

/* Collapsed notes stick to top/bottom and only show left title height */
#floating-panel .panel-comment {
    --note-title-line-height: 22px;
    --note-title-lines: 2;
    --note-title-pad: 16px;
}
html:lang(en) #floating-panel .panel-comment {
    --note-title-line-height: 22px;
    --note-title-lines: 2;
    --note-title-pad: 16px;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors) {
    align-items: center;
    height: calc((var(--note-title-line-height) * var(--note-title-lines)) + (var(--note-title-pad) * 2));
    padding: var(--note-title-pad) 64px var(--note-title-pad) 32px;
    overflow: hidden;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors) .note-body {
    display: none;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors) .left-title {
    line-height: var(--note-title-line-height);
    padding: 0;
}

#floating-panel .panel-comment .panel-bottom.notes-mode section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors) .note-like-toggle {
    top: var(--note-title-pad);
}

/* 折叠状�?hover 时向上位移，露出更多内容（不影响其他元素布局�?*/
.panel-comment.active .panel-bottom section:not(.note-expanded):not(#section-contributors):not(#section-contact):not(#section-editors):hover {
    transform: translateY(-20px);
}

/* 排除contributors和editors section，它们不需要折�?*/
.panel-comment .panel-bottom section#section-contributors,
.panel-comment .panel-bottom section#section-contact,
.panel-comment .panel-bottom section#section-editors {
    max-height: none;
    overflow: visible;
    cursor: default;
    background-color: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
}

/* Comment panel: keep editors title in the left column */
.panel-comment .panel-bottom #section-editors {
    display: grid !important;
    grid-template-columns: 82px 1fr;
    /* column-gap: 20px; */
    align-items: start;
}
.panel-comment .panel-bottom .note-body,
.panel-comment .panel-bottom .note-body * {
    color: #43403B;
    text-align: justify;
    font-family: "ChillDINGothic Condensed";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 30px;
    letter-spacing: 1px;
}
html:lang(en) .panel-comment .panel-bottom .note-body,
html:lang(en) .panel-comment .panel-bottom .note-body * {
    color: #43403B;
    text-align: justify;
    font-family: "Barlow Condensed";
    font-size: 21px;
    font-style: normal;
    font-weight: 300;
    line-height: 26px;
    letter-spacing: 0.42px;
}
.panel-comment .panel-bottom .note-body .diagram-caption {
    color: #FAF4E5;
    text-align: justify;
    font-family: "ChillDINGothic";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.75px;
}

.panel-bottom section * {
    padding: 0 0 20px 0;
    margin: 0;
}

/* allow inline italics inside panel content */
.panel-bottom i,
.panel-bottom em {
    font-style: italic;
}

#section-brief {
    padding-top: 180px;
}

#section-brief h2 {
    padding: 0 0 76px 0;
}

.panel-bottom .left-title {
    width: 82px;
    flex-shrink: 0;
}

#section-example {
    padding-top: 55px;
}

#section-example .diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#section-example .diagram-carousel {
    width: 100%;
}

#section-example .diagram-stage {
    --diagram-arrow-slot: 52px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px var(--diagram-arrow-slot) 10px var(--diagram-arrow-slot);
}

#section-example .diagram-image {
    width: 100%;
    max-width: 100%;
    height: 300px;
    object-fit: contain;
    display: block;
}

#section-example .diagram-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#section-example .diagram-arrow img {
    width: 26px;
    height: 27.178px;
}

#floating-panel.expanded #section-example .diagram-arrow img,
#about-panel.expanded #section-example .diagram-arrow img {
    width: 26px !important;
    height: 27.178px !important;
}

#floating-panel.expanded .note-images-carousel .diagram-arrow img,
#about-panel.expanded .note-images-carousel .diagram-arrow img {
    width: 26px !important;
    height: 27.178px !important;
}

#floating-panel.expanded .panel-comment .note-body .note-images-carousel .diagram-arrow img,
#about-panel.expanded .panel-comment .note-body .note-images-carousel .diagram-arrow img {
    width: 26px !important;
    height: 27.178px !important;
}

#section-example .diagram-arrow-left {
    left: 0;
}

#section-example .diagram-arrow-right {
    right: 12px;
}

#section-example .diagram-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Comment panel: first note images carousel */
.panel-comment .note-images-carousel .diagram-carousel {
    width: 100%;
}

.panel-comment .note-images-carousel .diagram-stage {
    --diagram-arrow-slot: 52px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px var(--diagram-arrow-slot) 10px var(--diagram-arrow-slot);
}

.panel-comment .note-images-carousel .diagram-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 300px !important;
    object-fit: contain !important;
    padding: 0 !important;
    display: block;
}

.panel-comment .note-images-carousel .diagram-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.panel-comment .note-images-carousel .diagram-arrow img {
    width: 26px !important;
    height: 27.178px !important;
    padding: 0 !important;
}

.panel-comment .note-images-carousel .diagram-arrow-left {
    left: 0;
}

.panel-comment .note-images-carousel .diagram-arrow-right {
    right: 12px;
}

.panel-comment .note-images-carousel .diagram-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

#floating-panel.expanded .panel-comment .note-body img,
#about-panel.expanded .panel-comment .note-body img {
    width: 33vw !important;
    height: 33vh !important;
    object-fit: cover !important;
}

/* Note images in comment panel */
.panel-comment .note-body img {
    padding: 24px 0 18px 0;
    width: 406px !important;
    height: 270px !important;
    object-fit: cover !important;
    display: block;
}

#section-proposers {
    padding-top: 118px;
}

.panel-bottom .proposer-block {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.panel-bottom .proposer-block img {
    padding: 0;

    width: 81px !important;
    height: 112px !important;
    object-fit: cover !important;

    /* mix-blend-mode: screen; */
    filter: brightness(1.5) contrast(0.5) sepia(1.8) hue-rotate(0deg) saturate(2.2);
}

.panel-bottom .proposer-block p {
    padding: 4px 0;
    margin: 0;
}

#section-understanding-vote .entry-vote-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#section-understanding-vote .entry-vote-question {
    text-align: center;
    color: #E3DDD0;
    font-family: "ChillDINGothic";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 1px;
}

:lang(en) #section-understanding-vote .entry-vote-question {
    font-family: "ChillDINGothic";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 1px;
}

#section-understanding-vote .entry-vote-options {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
}

#section-understanding-vote .entry-vote-option {
    width: 183px;
    height: 34px;
    padding: 0;
    border: 1px solid #FAF4E5;
    background: transparent;
    color: #E3DDD0;
    font-family: "ChillDINGothic";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 1px;
    text-align: center;
    cursor: pointer;
}

#section-understanding-vote .entry-vote-option.is-selected {
    background: #FAF4E5;
    color: #1F1F1F;
}

#section-understanding-vote .entry-vote-option.is-voted {
    background: transparent;
    color: #FAF4E5;
}

#section-understanding-vote .entry-vote-submit {
    width: 77px;
    height: 34px;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    background: #F9D67A;
    color: #43403B;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: "ChillDINGothic";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 0.7px;
    transform: none;
    cursor: pointer;
}

:lang(en) #section-understanding-vote .entry-vote-submit {
    font-family: "ChillDINGothic";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 0.7px;
}

#section-understanding-vote .entry-vote-note {
    text-align: center;
    color: rgba(250, 244, 229, 0.75);
    font-family: "ChillDINGothic Condensed", "ChillDINGothic", "ChillDIN";
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    letter-spacing: 0.6px;
}

:lang(en) #section-understanding-vote .entry-vote-note {
    font-family: "Barlow Condensed", "ChillDINGothic";
    font-size: 14px;
    letter-spacing: 0.2px;
}

#section-related-works {
    /* padding-top:80px; */
    padding-bottom: 40px;
}

#section-understanding-vote {
    padding-top: 28px;
    padding-bottom: 36px;
}

#section-contributors {
    padding-top: 80px;
}

#section-contact p:last-child {
    text-decoration: underline;
    text-underline-offset: 2px;
}

#section-editors {
    padding-top: 160px;
}

#section-proposers,
#section-contributors {
    border-top: #FAF4E5 solid 1px;
}

/* 笔记面板的边框颜�?*/
.panel-comment #section-proposers,
.panel-comment #section-contributors {
    border-top: #43403B solid 1px;
}


/* �?*/
.panel-bottom p {
    color: #FAF4E5;
    font-family: "ChillDINGothic Condensed";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 23px;
    letter-spacing: 1px;
}
:lang(en) .panel-bottom p {
    color: #FAF4E5;
    font-family: "Barlow Condensed","ChillDINGothic";
    font-size: 21px;
font-style: normal;
font-weight: 300;
line-height: 26px; /* 123.81% */
letter-spacing: 0.42px;
}

/* 笔记面板的底部文字颜�?*/
.panel-comment .panel-bottom p {
    color: #43403B;
}
:lang(en) .panel-comment .panel-bottom p {
    color: #43403B;
}

.panel-bottom h2 {
    color: #FAF4E5;
    font-family: "ChillDINGothic";
    font-size: 40px;
    font-style: normal;
    font-weight: 600;
    line-height: 40px;
    letter-spacing: 2px;
}
:lang(en) .panel-bottom h2 {
    color: #FAF4E5;
    font-family: "Barlow Condensed";
font-size: 36px;
font-style: normal;
font-weight: 500;
line-height: 40px;
}

/* 笔记面板的h2颜色 */
.panel-comment .panel-bottom h2 {
    color: #43403B;
}
:lang(en) .panel-comment .panel-bottom h2 {
    color: #43403B;
}

.panel-bottom h3 {
    color: #FAF4E5;
    text-align: justify;
    font-family: "ChillDINGothic";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 34px;
    /* 125% */
    letter-spacing: 0.4px;
}
/* Entry panel: brief definition subheadings (zh) */
.panel-entry #section-brief h3 {
    color: #FAF4E5;
    font-family: "ChillDINGothic Condensed";
    font-size: 36px;
    font-style: normal;
    font-weight: 600;
    line-height: 42px;
    letter-spacing: 2px;
    
}
/* Entry panel: brief definition body (en) */
:lang(en) .panel-entry #section-brief h3 {
    text-align: left;
    color: #FAF4E5;
    font-family: "Barlow Condensed";
    font-size: 36px;
    font-style: normal;
    font-weight: 500;
    line-height: 40px; /* 111.111% */
    letter-spacing: 0;
}

:lang(en) .panel-entry section div p {
    color: #FAF4E5;
    /* body */
    font-family: "Barlow Condensed";
    font-size: 21px;
    font-style: normal;
    font-weight: 300;
    line-height: 26px; /* 123.81% */
    letter-spacing: 0.42px;
}

/* Entry panel body text (Chinese) */
.panel-entry .panel-bottom div p {
    color: #FAF4E5;
    font-family: "ChillDINGothic Condensed", "ChillDINGothic", "ChillDIN";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 30px;
    letter-spacing: 1px;
}



/* 笔记面板的h3颜色 */
.panel-comment .panel-bottom h3 {
    color: #43403B;
}

.panel-bottom .left-title {
    color: #FAF4E5;
    font-family: "ChillDINGothic Condensed", "ChillDINGothic", "ChillDIN";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    width: 82px !important;
}

/* 笔记面板的left-title颜色 */
.panel-comment .panel-bottom .left-title {
    color: #43403B;
}
:lang(en) .panel-comment .panel-bottom .left-title {
    color: #43403B;
    font-family: "Barlow Condensed";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px; 
}

.panel-bottom .diagram-caption {
    color: #FAF4E5;
    text-align: justify;
    font-family: "ChillDINGothic";
    font-size: 15px !important;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    /* 133.333% */
    letter-spacing: 0.75px;
}

.panel-bottom .diagram-source {
    color: #FAF4E5;
    text-align: justify;
    font-family: "ChillDINGothic", "ChillDIN";
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;
    letter-spacing: 0.6px;
}

/* 笔记面板的diagram-caption颜色 */
.panel-comment .panel-bottom .diagram-caption {
    color: #FAF4E5;
}

.panel-comment .panel-bottom .diagram-source {
    color: #43403B;
}

.panel-bottom .proposer-name {
    color: #FAF4E5;
    font-family: "ChillDINGothic","ChillDIN";
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    /* line-height: 20px; */
    letter-spacing: 1.2px;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

/* 笔记面板的proposer-name颜色 */
.panel-comment .panel-bottom .proposer-name {
    color: #43403B;
}

.panel-bottom .proposer-year p {
    color: #FAF4E5;
    font-family: "ChillDINGothic", "ChillDIN";
    font-size: 20px;
    font-style: normal;
    font-weight: 325;
    line-height: 20px;
    letter-spacing: 1px;
}

/* 笔记面板的proposer-year p颜色 */
.panel-comment .panel-bottom .proposer-year p {
    color: #43403B;
}

.panel-bottom #editors-container p {
    color: #FAF4E5;
    font-family: "ChillDINGothic Condensed";
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 16px;
    /* 114.286% */
    letter-spacing: 0.7px;

    margin: 0;
    padding: 0;
}

:lang(en) .panel-entry .panel-bottom #editors-container p {
    color: #FAF4E5;
    font-family: "Barlow Condensed";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

/* 笔记面板的editors-container p颜色 */
.panel-comment .panel-bottom #editors-container p {
    color: #43403B;
    font-family: "ChillDINGothic";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 25px;
}
:lang(en) .panel-comment .panel-bottom #editors-container p {
    color: #43403B;
    font-family: "Barlow Condensed";
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

#section-editors {
    opacity: 0.7;
}



/* 展开按钮样式 */
#expand-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: #36322A;
    border: 1px solid #FAF4E5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all 0.3s ease;
    color: #FAF4E5;
}

#expand-btn:hover {
    background: #E2DCC9;
    transform: scale(1.05);
}

#expand-btn:active {
    transform: scale(0.95);
}


/* 展开状态的样式 */
#floating-panel.expanded,
#about-panel.expanded {
    width: 70vw;
}

/* 展开状态下底部section的padding调整 */
#floating-panel.expanded .panel-bottom .left-title,
#about-panel.expanded .panel-bottom .left-title {
    width: 160px;
}

#floating-panel.expanded .panel-bottom section,
#about-panel.expanded .panel-bottom section {
    padding: 32px 140px 0 64px;
}
#floating-panel.expanded .panel-bottom #section-brief,
#about-panel.expanded .panel-bottom #section-brief {
    padding-top: 180px;
}
#floating-panel.expanded .panel-bottom #section-example,
#about-panel.expanded .panel-bottom #section-example {
    padding-top: 55px;
}
#floating-panel.expanded .panel-bottom #section-proposers,
#about-panel.expanded .panel-bottom #section-proposers {
    padding-top: 118px;
}
#floating-panel.expanded .panel-bottom #section-related-works,
#about-panel.expanded .panel-bottom #section-related-works {
    /* padding-top:80px; */
    padding-bottom: 40px;
}

#floating-panel.expanded .panel-bottom #section-understanding-vote,
#about-panel.expanded .panel-bottom #section-understanding-vote {
    padding-top: 28px;
    padding-bottom: 36px;
}

#floating-panel.expanded .panel-bottom #section-contributors,
#about-panel.expanded .panel-bottom #section-contributors {
    padding-top: 80px;
}

#floating-panel.expanded .panel-bottom #section-editors,
#about-panel.expanded .panel-bottom #section-editors {
    padding-top: 160px;
}

/* 展开状态下的图片调�?*/
#floating-panel.expanded .panel-top img,
#about-panel.expanded .panel-top img {
    width: 60vw; /* 比默认的541px更大 */
    height: 36vh; /* 比默认的339px更大 */
    object-fit: cover;
    margin: 0;
    padding: 0;
    margin-bottom: 50px;
}
#floating-panel.expanded #section-example img,
#about-panel.expanded #section-example img {
    width: 33vw !important; /* 比默认的406px更大 */
    height: 33vh !important; /* 比默认的270px更大 */
    object-fit: cover !important;
}

/* 展开状态下笔记面板的颜�?*/
#floating-panel.expanded .panel-comment .panel-bottom p,
#about-panel.expanded .panel-comment .panel-bottom p {
    color: #43403B;
}
#floating-panel.expanded .panel-comment .panel-bottom .left-title,
#about-panel.expanded .panel-comment .panel-bottom .left-title {
    color: #43403B;
}
#floating-panel.expanded .panel-comment .panel-bottom h2,
#about-panel.expanded .panel-comment .panel-bottom h2 {
    color: #43403B;
}
#floating-panel.expanded .panel-comment .panel-bottom h3,
#about-panel.expanded .panel-comment .panel-bottom h3 {
    color: #43403B;
}
#floating-panel.expanded .panel-comment .panel-bottom .diagram-caption,
#about-panel.expanded .panel-comment .panel-bottom .diagram-caption {
    color: #FAF4E5;
}
#floating-panel.expanded .panel-comment .panel-bottom .proposer-name,
#about-panel.expanded .panel-comment .panel-bottom .proposer-name {
    color: #43403B;
}
#floating-panel.expanded .panel-comment .panel-bottom .proposer-year p,
#about-panel.expanded .panel-comment .panel-bottom .proposer-year p {
    color: #43403B;
}


/* 确保按钮在展开状态下仍然可见 */
#floating-panel.expanded #expand-btn {
    left: 20px; /* 保持在左上角 */
}

/* 隐藏状态保持不�?*/
#floating-panel.hidden,
#about-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
}

#floating-panel:not(.hidden),
#about-panel:not(.hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}



/* tabs 样式 */
.panel-tabs {
    position: absolute;
    bottom: 40px;
    left: -38px;
    display: flex;
    flex-direction: column;
    gap: 45px;
    z-index: 10;
    pointer-events: none; /* 确保tab按钮在panel内容之上 */
}

.panel-tabs button {
    width: 39px;
    height: 110px;
    border: none;
    border-radius: 6px 0 0 6px;
    background: #43403B;
    box-shadow: -2px 2px 2px rgba(79, 70, 45, 0.25);
    cursor: pointer;
    padding: 25px 14px;

    color: #FAF4E5;
    font-family: "ChillDIN";
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 26px;
    /* 144.444% */

    /* �?SVG path 裁剪 */
    -webkit-clip-path: path("M4 25.6222C4 18.6955 8.20257 12.4615 14.6236 9.86337L39 0V106L15.1311 97.22C8.44371 94.7601 4 88.3907 4 81.2652V25.6222Z");
    clip-path: path("M4 25.6222C4 18.6955 8.20257 12.4615 14.6236 9.86337L39 0V106L15.1311 97.22C8.44371 94.7601 4 88.3907 4 81.2652V25.6222Z");

    
    transition: background 0.2s;
    pointer-events: auto;
}
:lang(en) .panel-tabs button {
    color: #43403B;
    font-family: "Barlow Condensed";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
}
:lang(en) .panel-entry .panel-tabs button[data-tab="entry"] {
    color: #FAF4E5;
}
:lang(en) #about-panel .panel-entry .panel-tabs button {
    color: #FAF4E5;
}

:lang(en) .panel-entry .panel-bottom .left-title {
    color: #FAF4E5;
    font-family: "Barlow Condensed";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
}

.panel-tabs button.active {
    background:#43403B ;
}

/* 笔记面板的tab按钮样式 */
.panel-comment .panel-tabs button {
    background: #EEE9DB;
    color: #43403B;
}

.panel-comment .panel-tabs button.active {
    background: #EEE9DB;
}

/* 自定义滚动条容器 */
.panel-slide {
    width: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    /* 防止被压�?*/
}

/* 未激活panel的滚动条隐藏 */
.panel-entry:not(.active) .panel-slide,
.panel-comment:not(.active) .panel-slide {
    opacity: 0;
    pointer-events: none;
}

/* 笔记panel完全隐藏滚动�?*/
.panel-comment .panel-slide {
    display: none;
}
.panel-slide .scroll-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-50%);
    width: 1px;
    background: #FAF4E5;
    border-radius: 1px;
}
.panel-slide .scroll-thumb {
    position: absolute;
    top: 0;
    /* 初始位置设在上边距处 */
    left: 0%;
    transform: translate(-50%, 0);
    width: 14px;
    height: 14px;
    background: #FCF8EF;
    border-radius: 50%;
    border: solid 1px #474132;
    cursor: grab;
}

/* 笔记面板的滚动条颜色 */
.panel-comment .panel-slide .scroll-track {
    background: #43403B;
}
.panel-comment .panel-slide .scroll-thumb {
    background: #43403B;
    border: solid 1px #43403B;
}
.panel-slide .scroll-thumb:active {
    cursor: grabbing;
}
.scroll-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: #F0B549;
    border-radius: 50%;
    cursor: pointer;
}
.scroll-marker:hover {
    background-color: #333;
}
.scroll-tooltip {
    position: absolute;
    right: 100%;
    margin-right: 8px;
    top: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    text-align: left;
    white-space: normal;
    min-width: 72px;
    max-width: 140px;
    line-height: 1.2;
    word-break: break-word;
    line-break: normal;
    transform: translateY(calc(-50% + var(--tooltip-shift, 0px)));
    display: none;
}
.scroll-marker:hover .scroll-tooltip {
    display: block;
}
