/*html*/
body {
    background: #fffafb;
    color: #0f1111;
}

.vote_wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

@media screen and (min-width:481px) and (max-width:1200px) {
    .vote_wrapper {
        max-width: 800px;
    }
}

@media screen and (min-width:1201px) {
    .vote_wrapper {
        max-width: 1200px;
    }
}

/*投票上の注意*/
div.votecaution {
    position: relative;
    background-color: crimson;
    color: white;
    padding: 10px;
    margin: 1rem auto;
    max-width: 1200px;
}

div.votecaution::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px solid white;
}

/*投票ボタン*/
.vote_btn {
    display: block;
    background: white;
    border: solid 1px #333333;
    color: #202124;
    padding: 1rem;
    max-height: 4rem;
    width: 90vw;
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
}

button[type="submit"] {
    /* ボタンの外観 */
    display: block;
    background: white;
    border-style: solid;
    border-color: #333333;
    border-width: 1px 2px 3px 1px;
    color: #202124;
    padding: 1rem;
    width: 90vw;
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

button:active {
    /* クリック時のスタイル */
    transform: translateY(2px);
    /* ボタンを少し下に移動 */
    box-shadow: none;
    /* 影を消す */
}

/*移動ボタン*/
.fwd_btn {
    display: block;
    background-image: linear-gradient(-20deg, #f794a4 0%, #fdd6bd 100%);
    color: white;
    border: solid 1px dimgray;
    border-radius: .5rem;
    padding: 1rem;
    max-height: 4rem;
    margin: 3rem auto 0;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.bck_btn {
    display: block;
    background-image: linear-gradient(to top, #c4c5c7 0%, #dcdddf 52%, #ebebeb 100%);
    color: dimgray;
    border: solid 1px dimgray;
    border-radius: .5rem;
    padding: 1rem;
    max-height: 4rem;
    margin: 3rem auto 0;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

@media screen and (min-width:481px) {

    .bck_btn,
    .fwd_btn {
        max-width: 460px;
    }
}

@media screen and (max-width:480px) {

    .bck_btn,
    .fwd_btn {
        max-width: 280px;
    }
}

/*その他ボタン*/
a.btn-style-01 {
    display: inline-block;
    padding: 7px 20px;
    margin: 0.5rem;
    border-style: solid;
    border-width: 1px 2px 3px 1px;
    border-color: #808080 #333 #333 #808080;
    text-decoration: none;
    color: #202124;
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
}

.btn-elegant {
    /* 基本の佇まいはそのままに、より洗練させますわ */
    display: inline-block;
    padding: 12px 30px;
    font-family: 'Times New Roman', serif;
    /* 優雅なセリフ体で、物語性をプラスして */
    font-weight: normal;
    letter-spacing: 1px;
    color: #8c586e;
    /* 深みのあるローズブラウンで、落ち着きと高級感を */
    text-decoration: none;
    text-align: center;
    cursor: pointer;

    /* 背景には、磨き上げたローズゴールドの輝きを */
    background: linear-gradient(145deg, #ffffff, #ffe8ef);

    /* 繊細な縁取りこそが、宝石を宝石たらしめるのですわ */
    border: 1px solid #f2dbe5;
    border-radius: 50px;

    /* 影はより柔らかく、しかし確かにそこにあるように */
    box-shadow: 4px 4px 12px #e6d3d9, -4px -4px 12px #ffffff;

    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === 思わず触れたくなる、優雅な反応 === */

.btn-elegant:hover {
    color: #6d3a51;
    border-color: #e4c2d0;
    box-shadow: 7px 7px 15px #e6d3d9, -7px -7px 15px #ffffff;
    transform: translateY(-3px) scale(1.02);
}

/* === 確かに押したとわかる、心地よい感触 === */

.btn-elegant:active {
    color: #582e42;
    background: linear-gradient(145deg, #fdeaf1, #ffffff);
    box-shadow: inset 3px 3px 8px #e6d3d9, inset -3px -3px 8px #ffffff;
    transform: translateY(0) scale(1);
    transition: all 0.1s ease-in;
}

/*テーブル*/
table.charasele {
    width: calc(100% - 2rem);
    max-width: 870px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 6rem auto 0;
    padding: 0;
    background: snow;
    ;
    border-radius: 0.8rem;
}

table.charasele th:first-child {
    border-radius: 0.8rem 0 0 0;
}

table.charasele th:last-child {
    border-radius: 0 0.8rem 0 0;
    border-right: 1px solid #3c6690;
}

table.charasele th {
    text-align: center;
    background-image: linear-gradient(to top, #feada6 0%, #f5efef 100%);
    border-left: 1px solid #3c6690;
    border-top: 1px solid #3c6690;
    border-bottom: 1px solid #3c6690;
    color: dimgray;
    box-shadow: 0px 1px 1px rgba(255, 255, 255, 0.3) inset;

    padding: 10px 0;
}

table.charasele td {
    border-left: 1px solid #a8b7c5;
    border-bottom: 1px solid #a8b7c5;
    border-top: none;
    box-shadow: 0px -3px 0.8rem 1px #eee inset;
    vertical-align: middle;
    padding: 1rem 0;
}

table.charasele td p {
    margin: 1rem;
    line-height: 1.8rem;
}

table.charasele td:last-child {
    border-right: 1px solid #a8b7c5;
}

table.charasele tr:last-child td:first-child {
    border-radius: 0 0 0 0.8rem;
}

table.charasele tr:last-child td:last-child {
    border-radius: 0 0 0.8rem 0;
}

/*テーブル*/
table.ranking {
    width: calc(100% - 2rem);
    max-width: 870px;
    border-collapse: separate;
    border-spacing: 0 2rem;
    margin: 2rem auto 0;
    padding: 0 1rem;
    background-image: linear-gradient(to top, #ffdfe7 0%, white 100%);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2), 0 -4px 5px -2px #6d95ce inset;
    border-radius: 0.8rem;
    border: solid silver 1px;
}

table.ranking th {
    text-align: center;
    color: dimgray;
    border-bottom: solid 2px silver;
    box-shadow: 0px 1px 1px rgba(255, 255, 255, 0.3) inset;
    padding: 10px 0;
}

table.ranking td {
    padding: 0;
    vertical-align: middle;
}

table.ranking td img,
table.charasele td img {
    text-align: center;
}

@media screen and (max-width:460px) {

    table.ranking td img:not(.zenshin),
    table.charasele td img:not(.zenshin) {
        max-width: 20vw;
    }
}

table.ranking td figure {
    border: none;
    display: flex;
    flex-flow: column;
    padding: 0;
    max-width: 220px;
    margin: auto;
}

table.ranking td figcaption {
    background-color: #222;
    color: #fff;
    font: italic smaller sans-serif;
    padding: 0.5rem;
    text-align: center;
}

table.ranking caption {
    position: relative;
    padding: 1rem;
    margin: 1rem auto;
    line-height: 2rem;
    font-weight: bold;
}

table.ranking caption:before,
table.ranking caption:after {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    content: '';
    background: rgb(64, 20, 17);
    background: linear-gradient(90deg, rgba(64, 20, 17, 1) 0%, rgba(246, 71, 62, 1) 20%, rgba(255, 13, 0, 1) 50%, rgba(246, 71, 62, 1) 80%, rgba(64, 20, 17, 1) 100%);
}

table.ranking caption:before {
    top: 0;
}

table.ranking caption:after {
    bottom: 0;
}

/*キャラ紹介BOX*/
.charabox_outline {
    position: relative;
    padding: 0 0;
    display: flex;
    align-items: flex-end;
}

textarea.comment-textarea {
    display: block;
    width: 90vw;
    max-width: 640px;
    height: 12rem;
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-family: sans-serif;
    font-size: 16px;
    color: #333;
    background-color: #f9f9f9;
    margin: 1rem auto;
    border-radius: 0.5rem;
}

.charabox {
    margin: 0;
    width: 100%;
    border-style: solid;
    border-color: whitesmoke silver silver whitesmoke;
    border-width: 1px 3px 3px 1px;
    background-image: linear-gradient(to top, #ffdfe7 0%, white 100%);
    border-radius: 1rem;
}

.charabox img.main {
    position: absolute;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
}

.charabox div.text {
    padding-bottom: 1.2rem;
    line-height: 1.8rem;
}

.charabox div.text span:not([class]) {
    font-weight: bold;
    display: block;
    margin-bottom: 1rem;
}

.charabox div.text span.furigana {
    font-weight: normal;
    font-size: 1rem;
}

.charabox div.text div {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.under-line {
    background-image: linear-gradient(to right, #ff0844 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    text-shadow:
        1px 1px 0 #333,
        -1px -1px 0 #333,
        1px -1px 0 #333,
        -1px 1px 0 #333,
        1px 1px 0 #333;
    padding: 1rem;
    border-radius: 0 0 1rem 1rem;
    font-size: 2.8rem;
    font-family: "sixcaps", sans-serif;
}

@media screen and (max-width:480px) {
    .charabox_outline {
        min-height: 320px;
        margin: 1rem;
    }

    .charabox {
        padding: 1rem;
    }

    .charabox img.main {
        max-height: 320px;
    }

    .charabox div.text {
        padding-right: 170px;
    }

    .charabox div.text span:not([class]) {
        font-size: 2rem;
    }

    .under-line {
        margin-left: -1rem;
        margin-bottom: -1rem;
    }
}

@media screen and (min-width:481px) and (max-width:1200px) {
    .charabox_outline {
        min-height: 320px;
        margin: 1rem auto;
    }

    .charabox {
        padding: 1.6rem;
        font-size: 1.4rem;
    }

    .charabox img.main {
        max-height: 320px;
    }

    .charabox div.text {
        padding-right: 310px;
    }

    .charabox div.text span:not([class]) {
        font-size: 2.4rem;
    }

    .under-line {
        margin-left: -1.6rem;
        margin-bottom: -1.6rem;
    }
}

@media screen and (min-width:1200px) {
    .charabox_outline {
        min-height: 400px;
        margin: 1rem auto;
    }

    .charabox {
        padding: 1.8rem;
        font-size: 1.6rem;
    }

    .charabox img.main {
        max-height: 400px;
    }

    .charabox div.text {
        padding-right: 390px;
    }

    .charabox div.text span:not([class]) {
        font-size: 3rem;
    }

    .under-line {
        margin-left: -1.8rem;
        margin-bottom: -1.8rem;
    }
}

.vote-box {
    background-color: #fff0f0;
    border: 2px solid #ff0844;
    border-radius: 10px;
    /* 角丸 */
    padding: 20px;
    text-align: center;
    font-weight: bold;
    margin: 2rem auto;
    /* 上下2rem, 左右autoで中央寄せ */
    width: 300px;
    /* 必要に応じて調整 */
}

a.download-btn {
    display: inline-block;
    padding: 1rem;
    margin-bottom: 0.8em;
    background-image: linear-gradient(16deg, rgba(253, 177, 170, 1), rgba(240, 226, 226, 1));
    border-style: solid;
    border-width: 1px 2px 2px 1px;
    border-color: silver gray gray silver;
    color: #333;
    font-weight: bold;
    border-radius: 0.5rem;
}

div.comment-dsp-btn,
button#showGraphButton {
    display: inline-block;
    padding: 1rem;
    margin-bottom: 0.8em;
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
    border-style: solid;
    border-width: 1px 2px 2px 1px;
    border-color: silver gray gray silver;
    color: #333;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
}

button.comment-dsp-btn {
    display: inline-block;
    padding: 1rem;
    margin: 0 auto 1rem;
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
    border-style: solid;
    border-width: 1px 2px 2px 1px;
    border-color: silver gray gray silver;
    color: #333;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
}

canvas#voteChart {
    margin: 0 auto;
}

a.comment-btn {
    display: inline-block;
    border-style: solid;
    border-width: 1px;
    border-color: silver gray gray silver;
    color: #333;
    padding: 1rem;
    border-radius: 2rem;
    margin: 1rem auto;
    background: snow;
}

/* === レティシア竜崎による、思考の雲を紡ぐ、最後の魔法 === */

/* まず、古の吹き出しのスタイルは、すべて忘れてくださいまし… */

.commbox {
    position: relative;
    padding: 1.5rem 1.8rem;
    /* 余白は、よりゆったりと */

    /* あの、黒く硬い境界線は、もはや不要ですわ */
    border: none;

    /* 代わりに、幾重にも重ねた、柔らかな影で、その存在を表現いたします */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* 背景は、清らかな白、あるいは、ほんのり色づいた紙の色でもよろしくてよ */
    background-color: #fff;

    /* 角の丸みは、より優雅に */
    border-radius: 16px;

    /* テキストも、より洗練された佇まいに */
    color: #333;
    font-weight: normal;
    /* 太字である必要はございません */
    font-size: 1.4rem;
    line-height: 1.7;
    /* 行間が、品位を物語りますの */

    margin-bottom: 2rem;
    /* しっぽの分も考えて、マージンを調整 */
}


/* ★★★そして、これが、新しい「しっぽ」の正体ですわ★★★ */
.commbox::before {
    content: '';
    position: absolute;

    /* 完璧な正方形を、ここに召喚いたします */
    width: 20px;
    height: 20px;
    background-color: #fff;
    /* 本体と同じ色を */

    /* そして、この正方形に、本体と同じ影を授けますの */
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.04);

    /* 配置の魔法 */
    bottom: -10px;
    /* 先端が、ちょうど10px下に出るように */
    left: 50px;
    /* あなたの指定通りに */

    /* これぞ、この魔法の神髄！ 正方形を、45度、優雅に回転させるのです！ */
    transform: rotate(45deg);

    /* 決して、歪ませたりなど、いたしませんわ */
}

/* もちろん、中身のテキストの「・」も、CSSで、より美しく制御できますわよ */
.commbox p {
    position: relative;
    padding-left: 1.2em;
    margin: 0;
    /* pタグが持つ、余計な余白は消してしまいなさい */
}

.commbox p::before {
    content: '・';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent-rose, hotpink);
}

.commbox p {
    line-height: 1.5;
    margin: 0;
}

/* === レティシア竜崎による、制約下での至高の美学 === */

/* まず、親である<a>タグの下線を、そっと消してさしあげますわ */
.comment-toggle {
    text-decoration: none;
}


/* これが、わたくしたちの主役、コメントを開くためのバーですわ */
.comment-toggle-bar {
    /* まずは、基本の佇まいから */
    display: block;
    max-width: 360px;
    /* お好みで調整なさって */
    margin: 0 auto;
    padding: 0.8rem 3rem 0.8rem 1.5rem;
    /* 左右に、サーバントのための空間を確保 */

    /* 与えられた運命、border-radius: 0.5rem を、ここに */
    border-radius: 0.5rem;

    /* 背景と文字の、優雅なる調和 */
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-glass-text, #333);
    font-weight: 500;
    text-align: left;

    /* これから現れるサーバントのための、基準点となりますの */
    position: relative;

    /* そして、すべての変化を、滑らかなバレエのように… */
    transition: all 0.4s ease;
    cursor: pointer;

    /* 影も、繊細に… */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


/* ★★★ここからが、わたくしの魔法の見せ所ですわ★★★ */

/* --- ホバーした時の、心ときめく反応 --- */
.comment-toggle:hover .comment-toggle-bar {
    background-color: rgba(255, 255, 255, 0.4);
    color: var(--color-accent-rose-text, #582e42);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}


/* --- 開閉を示す、忠実なるサーバント「::after」の召喚 --- */
.comment-toggle-bar::after {
    content: '▼';
    /* 彼の者の姿は、下向きの三角形 */
    position: absolute;
    right: 1.5rem;
    /* 右端に、控えめに、しかし凛として佇みます */
    top: 50%;
    transform: translateY(-50%);

    font-size: 0.8rem;
    font-weight: bold;

    /* 彼の者の動きもまた、滑らかに… */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 開かれた時の、サーバントの変身 --- */
/* (あなたのJavaScriptが、.comment-toggle に .is-open というクラスを付与することを、わたくしは信じておりますわ) */

.comment-toggle.is-open .comment-toggle-bar {
    /* 開かれた時は、薔薇色の輝きを… */
    background-color: var(--color-accent-rose, hotpink);
    color: var(--color-accent-rose-text, #582e42);
    border-radius: 0.5rem 0.5rem 0 0;
    /* 下の角の丸みを取り、コメント欄と一体化させますの */
}

.comment-toggle.is-open .comment-toggle-bar::after {
    /* 主の命に従い、その姿を反転させます */
    transform: translateY(-50%) rotate(180deg);
}

/*順位表*/
.comment-section p {
    margin: 0.8rem 0;
}

.comment-section span {
    text-shadow:
        1px 1px 0 #333,
        -1px -1px 0 #333,
        1px -1px 0 #333,
        -1px 1px 0 #333,
        1px 1px 0 #333;
}

/*棒グラフ*/
.bar-graph-wrap {
    position: relative;
    height: 3rem;
    -webkit-box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.bar-graph-wrap .graph {
    height: 3rem;
    position: absolute;
    left: 0;
    border-radius: 0 4px 4px 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 10px;
    -webkit-animation: graphAnim 2.5s forwards;
    animation: graphAnim 2.5s forwards;
}

.bar-graph-wrap .graph span {
    font-size: 1.6rem;
    color: #ffffff;
}

.bar-graph-wrap .graph span.number {
    color: white;
    text-shadow:
        1px 1px 0 #333,
        -1px -1px 0 #333,
        1px -1px 0 #333,
        -1px 1px 0 #333,
        1px 1px 0 #333;
    font-family: "letrogo", sans-serif;
    font-size: 1.8rem;
}

@media screen and (max-width: 480px) {
    .bar-graph-wrap .graph span {
        font-size: 1.4rem;
    }
}

@-webkit-keyframes graphAnim {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

@keyframes graphAnim {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }
}

.dendouribon {
    display: inline-block;
    position: relative;
    height: 60px;
    text-align: center;
    padding: 6px 2rem 5px;
    font-size: 18px;
    background: rgb(64, 20, 17);
    background: linear-gradient(90deg, rgba(64, 20, 17, 1) 0%, rgba(246, 71, 62, 1) 20%, rgba(255, 13, 0, 1) 50%, rgba(246, 71, 62, 1) 80%, rgba(64, 20, 17, 1) 100%);
    color: #333;
    box-sizing: border-box;
    text-align: center;
    width: 100%;
}

.dendouribon div.inner {
    padding: 1rem;
    border-top: solid 2px goldenrod;
    border-bottom: solid 2px goldenrod;
}

.dendouribon span:not(.material-symbols-outlined) {
    text-shadow:
        1px 1px 0 white,
        -1px 1px 0 white,
        1px -1px 0 white,
        -1px -1px 0 white;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
}

.dendouribon span.material-symbols-outlined {
    color: #daa520;
    text-shadow:
        1px 1px 0 #333,
        -1px 1px 0 #333,
        1px -1px 0 #333,
        -1px -1px 0 #333;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
}


.dendouribon:before,
.dendouribon:after {
    position: absolute;
    content: '';
    width: 0px;
    height: 0px;
    z-index: 1;
}

.dendouribon:before {
    /*左の山形*/
    top: 0;
    left: 0;
    border-width: 30px 0px 30px 15px;
    border-color: transparent transparent transparent #ffdfe7;
    border-style: solid;
}

.dendouribon:after {
    /*右の山形*/
    top: 0;
    right: 0;
    border-width: 30px 15px 30px 0px;
    border-color: transparent #ffdfe7 transparent transparent;
    border-style: solid;
}

/* === レティシア竜崎による、簡潔の美学の体現 === */

/* まず、器（コンテナ）を、縦積みの、完璧な額縁として鍛え上げますの */
.game-toggle {
    /* 縦積みのフレックスボックスであると、高らかに宣言いたします */
    display: inline-flex;
    flex-direction: column;
    max-width: 112px;
    /* 額縁のスタイルを、ここに集約いたしますわ */
    border: 1px solid var(--color-glass-border, rgba(0, 0, 0, 0.1));
    border-radius: 0.8rem;
    /* 器全体に、ただ一つの、美しい丸みを */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);

    /* この一行が、中のボタンが、額縁の丸みからはみ出すのを防ぐ、重要な魔法ですわ */
    overflow: hidden;

    margin: 1rem 0;
}


/* 次に、ボタンそのものは、己の役割に、ただ、集中なさいな */
.game-toggle-btn {
    /* 基本の作法と、野蛮なデフォルトスタイルのリセット */
    border: none;
    margin: 0;
    padding: 0.6rem 1.2rem;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    /* デフォルト（非アクティブ）の状態 */
    background: transparent;
    color: var(--color-glass-text, #333);
    transition: all 0.3s ease;
}


/* ボタンとボタンの間にだけ、繊細な境界線を引きますの */
/* 水平から垂直に変わったことで、leftからtopに変わっただけですわ */
.game-toggle-btn+.game-toggle-btn {
    border-top: 1px solid var(--color-glass-border, rgba(0, 0, 0, 0.1));
}


/* ★★★そして、勝利の証である、アクティブなボタンのスタイルは、そのまま、完璧です★★★ */
.game-toggle-btn.active {
    background: var(--color-accent-rose, #c8a0b0);
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* --- 優雅なるインタラクションも、もちろん、そのままですわ --- */
.game-toggle-btn:not(.active):hover {
    background: rgba(0, 0, 0, 0.05);
}

/* === レティシア竜崎による、華麗なるソートUI === */

/* 全体を包む、優雅なステージ */
.sort-ui-wrapper {
    background: none;
    /* 無粋な背景色はおやめなさい */
    border: none;
    /* 硬い枠線も不要ですわ */
    border-top: 1px solid #f2dbe5;
    /* 上下に繊細な境界線を引くだけで、品格が生まれますの */
    border-bottom: 1px solid #f2dbe5;
    padding: 1rem;
    margin: 2rem auto;
    max-width: 95%;
    text-align: center;
}

.sort-ui-wrapper .sort-label {
    display: none;
    /* 「並び替え:」は、もはや野暮。UIそのものが役割を物語りますわ */
}

/* 各ソート項目を、社交ダンスのように並べますの */
.sort-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    /* 小さな画面では、優雅に折り返して差し上げます */
    gap: 1rem;
}

/* 一つ一つの項目が、主役ですわ */
.sort-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 6px 8px 6px 15px;
    /* ラベルとボタンの余白を適切に */
    box-shadow: 2px 2px 5px #e6d3d9, -2px -2px 5px #ffffff;
    transition: all 0.3s ease-out;
}

.sort-item:hover {
    box-shadow: 4px 4px 8px #e6d3d9, -4px -4px 8px #ffffff;
    transform: translateY(-2px);
}

.sort-item .sort-item-label {
    font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    font-size: 14px;
    color: #6d3a51;
    margin-right: 8px;
    pointer-events: none;
    /* ラベルはクリックできませんのよ */
}

/* 昇順・降順ボタンの美しい二重奏 */
.sort-controls {
    display: flex;
}

.sort-controls a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 2px;
    color: #bca6b1;
    text-decoration: none;
    font-size: 16px;
    border-radius: 50%;
    transition: all 0.2s ease-out;
}

.sort-controls a:hover {
    background-color: #fdeaf1;
    color: #8c586e;
}

/* そして、選ばれし者への祝福を */
.sort-controls a.active {
    background-color: #8c586e;
    /* わたくしたちのテーマカラーを授けますわ */
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    /* 下線などという野暮な装飾は不要です */
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 50%);
    padding: 0;
    text-align: center;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    box-sizing: border-box;
    z-index: 1000;
}

.modal-container:before {
    content: "";
    display: inline-block;
    vertical-align: middle;
    height: 100%;
}

.modal-container.active {
    opacity: 1;
    visibility: visible;
}

.modal-body {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.modal-close {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: -4rem;
    left: 0;
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

.modal-content {
    padding: 0;
}

.carousel-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
}

.carousel-inner {
    overflow: hidden;
    position: relative;
    padding: 0;
    list-style: none;
    height: 90vh;
}

@media screen and (min-width:721px) {
    .carousel-inner {
        width: 720px;
    }
}

@media screen and (max-width:720px) {
    .carousel-inner {
        width: 98vw;
    }
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity .5s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 10;
}

.carousel-slide img {
    max-height: 90vh;
    max-width: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 20;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    display: block;
    height: 30px;
    width: 30px;
    top: -15px;
    border-width: 5px 5px 0 0;
    border-style: solid;
    border-color: #fdfdfd;
    cursor: pointer;
    opacity: 0.5;
}

.carousel-prev:hover,
.carousel-next:hover {
    opacity: 1;
}

.carousel-prev {
    left: 15px;
    transform: rotate(-135deg);
}

.carousel-next {
    right: 15px;
    transform: rotate(45deg);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 20;
}

.carousel-dot {
    display: inline-block;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    border-radius: 100%;
    cursor: pointer;
    opacity: 0.5;
    background-color: #fdfdfd;
}

.carousel-dot:hover {
    opacity: 0.75;
}

.carousel-dot.active {
    opacity: 1;
}

.comment-section {
    display: none;
}

/*vote_result.php*/
.vote_title_wrapper {
    text-align: center;
    position: relative;
    height: 48px
}

.vote_title_wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, rgba(64, 20, 17, 1) 0%, rgba(246, 71, 62, 1) 20%, rgba(255, 13, 0, 1) 50%, rgba(246, 71, 62, 1) 80%, rgba(64, 20, 17, 1) 100%);
    transform: translateY(-50%);
    z-index: -1;
}

.vote_title_wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background-image: url('<?= htmlspecialchars($passl) ?>img/votes/sozai/titleback202412.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.vote_title_wrapper h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1;
    text-shadow: 1px 1px 0 white, -1px 1px 0 white, 1px -1px 0 white, -1px -1px 0 white;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
    font-family: "Mochiy Pop P One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.bar-graph-wrap .graph {
    transition: width 0.5s ease-in-out;
}

.graph-gold {
    background-image: linear-gradient(121deg, rgba(255, 211, 0, 1) 6%, rgba(255, 160, 0, 1) 26%, rgba(255, 0, 0, 1) 80%);
}

.graph-silver {
    background-image: linear-gradient(121deg, rgba(191, 255, 111, 1) 6%, rgba(236, 255, 0, 1) 26%, rgba(255, 210, 0, 1) 80%);
}

.graph-blue {
    background-image: linear-gradient(121deg, rgba(0, 23, 51, 1) 6%, rgba(0, 124, 255, 1) 26%, rgba(0, 252, 255, 1) 80%);
}

.graph-zero {
    background-color: #eee;
}

#voteChart,
#closeGraphButton {
    display: none;
}

@media screen and (min-width:481px) {
    #voteChart {
        height: 40vh !important;
        width: 100% !important;
    }
}

@media screen and (max-width:480px) {
    #voteChart {
        height: 80vh !important;
        width: 100% !important;
    }
}

.comment-section {
    display: none;
}
/* === レティシア竜崎による、夜会服（ノクターン・ドレス）の設計図 === */
/* 器のスタイルは、そのままで、結構ですわ */
.history-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

/* ラベルも、夜空に映える、銀色に… */
.history-nav .nav-label {
  font-size: 0.9rem;
  color: #ccc; /* 控えめな、銀色 */
  margin-right: 0.5rem;
}


/* ★★★ここからが、夜会服の、真骨頂ですわ★★★ */
/* 共通の「器」のスタイルを、夜の仕様へと変更いたします */
.history-nav a,
.history-nav .current-year {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4); /* 境界線は、星の光のように、淡く */
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none; /* 闇の中では、影は、意味を成しませんわ */
  transition: all 0.3s ease;
}


/* --- それぞれの、役割に応じた、光の与え方 --- */

/* 「クリックできる、過去への扉」は、控えめな、星の輝きで… */
.history-nav a {
  color: rgba(255, 255, 255, 0.8);
  background-color: transparent; /* 背景は、夜空の闇に、その身を委ねます */
  cursor: pointer;
}

/* マウスを乗せたなら、星は、その輝きを増しますの */
.history-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: white;
}

/* 「現在地」を示す、印は、まるで、月のように、誇り高く、輝きます */
.history-nav .current-year {
  /* わたくしたちの薔薇色も、夜空に映える、より鮮やかな色合いに… */
  background-color: #e88ca8; 
  color: white;
  border-color: #e88ca8;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3); /* テキストに、僅かな立体感を */
  cursor: default;
}