#mainKv {
    aspect-ratio: 1440 / 320;
}
@media (max-width: 767px) {
    #mainKv {
        aspect-ratio: 375 / 160;
    }
}

.ticket .list{
    margin-bottom: 48px;
}
.ticket .list ul{
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 48px;
}
.ticket .list ul li{
    width: calc((100% - 96px) / 3);
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ticket .list ul li .table{
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ticket .list .city{
    text-align: center;
    color: #FFF;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    padding: 8px;
}
.ticket .list .table-inner{
    padding: 16px;
}
.ticket .list .table-inner .elected{
    width: 20px;
    height: 20px;
    vertical-align: middle;
}
.ticket .list .table-inner .elected img{
    display: none;
}
.ticket .list .table-inner .elected.show img{
    display: block;
}

.ticket .list .table-inner table{
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #DDE1E6;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}
.ticket .list .table-inner table thead th{
    color: #2786A2;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    padding: 8px 0;
}
.ticket .list .table-inner .no-box{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-right: 8px;
}
.ticket .list .table-inner .party{
    width: 20px;
    height: 20px;
    vertical-align: middle;
    border-radius: 50%;
    overflow: hidden;
}
.ticket .list .table-inner .pic{
    width: 36px;
    height: 36px;
    vertical-align: middle;
    border-radius: 50%;
    overflow: hidden;
}
.ticket .list .table-inner .party img{
    width: 100%;
    height: 100%;
}
.ticket .list .table-inner .name-box{
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
}
.ticket .list .table-inner .name-box .name{
    width: 95px;
}
.ticket .list .table-inner .party img{
    width: 20px;
    height: 20px;
}
.ticket .list .table-inner table tbody tr td{
    color: #000;
    font-size: 14px;
    font-weight: 500;
    line-height: 23px;
    padding: 8px 0;
}
.ticket .list .table-inner table tbody tr td,
.ticket .list .table-inner table thead th{
    text-align: center;
}
.ticket .list .table-inner table tbody tr td:first-child,
.ticket .list .table-inner table  thead th:first-child{
    width: 30px;
    text-align: center;
}
.ticket .list .table-inner table tbody tr td:nth-child(2),
.ticket .list .table-inner table  thead th:nth-child(2){
    width: 50%;
    text-align: left;
}
.ticket .list .table-inner table thead th:nth-child(3),
.ticket .list .table-inner table tbody tr td:nth-child(3){
    text-align: right;
}
/* 六都尚未全部出現當選戳記時，先隱藏得票率 */
.ticket .list .table-inner table thead th:nth-child(4),
.ticket .list .table-inner table tbody tr td:nth-child(4){
    display: none;
}
#mayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
#outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
#mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4),
#outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4){
    display: table-cell;
    text-align: right;
    padding-right: 8px;
}
@media (min-width: 1200px) {
    #mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(2),
    #outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(2),
    #mayor.show-rate .ticket .list .table-inner table thead th:nth-child(2),
    #outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(2){
        width: 42%;
    }
    #mayor.show-rate .ticket .list .table-inner table thead th:nth-child(3),
    #outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(3),
    #mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(3),
    #outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(3){
        white-space: nowrap;
        padding-right: 8px;
    }
    #mayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
    #outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
    #mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4),
    #outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4){
        white-space: nowrap;
        padding-left: 8px;
        text-align: right;
    }
}
.ticket .list .more{
    cursor: pointer;
    text-align: center;
    padding: 8px;
    color: #2786A2;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border-top: 1px solid #DDE1E6;
    margin-top: auto;
}
@media (max-width:1199px) {
    .ticket .list ul li{
        width: calc((100% - 48px) / 2);
    }
    .ticket .list .table-inner .name-box .name{
        width: 130px;
    }
}
@media (max-width:1023px) {
    .ticket .list ul{
        display: block;
    }
    .ticket .list ul li{
        width: 100%;
        margin-bottom: 24px;
    }
    .ticket .list ul li:last-child{
        margin-bottom: 0px;
    }
}
@media (max-width:767px) {
    .ticket .list .table-inner table tbody tr td:nth-child(2),
    .ticket .list .table-inner table  thead th:nth-child(2){
        width: 40%;
    }
    .ticket .list{
        margin-bottom: 24px;
    }
    .ticket .list ul{
        display: block;
    }
    .ticket .list ul li{
        width: 100%;
        margin-bottom: 24px;
    }
    .ticket .list .table-inner .name-box .name{
        width: 100px;
    }
}
@media (max-width:413px) {
    .ticket .list .table-inner .name-box .name {
        width: 70px;
    }
    .ticket .list .table-inner table tbody tr td{
        font-size: 14px;
        line-height: 20px;
    }
}

@media (max-width:374px) {    
    .ticket .list .table-inner table tbody tr td:first-child,
    .ticket .list .table-inner table  thead th:first-child{
        width: 40px;
        padding-right: 4px;
        text-align: center;
    }
    .ticket .list .table-inner table tbody tr td,
    .ticket .list .table-inner table thead th{
        padding: 4px 0;
    }
    .ticket .list .table-inner .pic {
        width: 30px;
        height: 30px;
    }
}
@media (max-width:359px) {
    .ticket .list .table-inner table tbody tr td:nth-child(2), 
    .ticket .list .table-inner table thead th:nth-child(2) {
        width: 35%;
    }
    .ticket .list .table-inner .pic,.ticket .list .table-inner .party{
        display: none;
    }
    #mayor.show-rate .ticket .list .table-inner table thead th:nth-child(3),
    #outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(3),
    #mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(3),
    #outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(3){
        white-space: nowrap;
        padding-right: 8px;
    }
    #mayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
    #outerMayor.show-rate .ticket .list .table-inner table thead th:nth-child(4),
    #mayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4),
    #outerMayor.show-rate .ticket .list .table-inner table tbody tr td:nth-child(4){
        white-space: nowrap;
        padding-left: 8px;
        text-align: right;
    }
}

#councillor .title{
    margin-bottom: 24px;
}
#councillor .type{
    margin-bottom: 24px;
}
#councillor .type ul{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}
#councillor .type li{
    list-style: none;
    padding: 8px 12px;
    border-radius: 16px;
    color: #161719;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    cursor: pointer;
    white-space: nowrap;
}
#councillor .type li.act{
    background: #2786A2;
    color: #fff;
}
#councillor .areaBoxSelect{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}
#councillor .areaBoxSelect .inner{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 20px;
    box-sizing: border-box;
    background-color: #E0EFF3;
    border-radius: 16px;
    border: 1px solid #2786A2;
}
#councillor.is-mayor .areaBoxSelect .select.district,
#councillor.is-mayor .areaBoxSelect .subArea{
    display: none;
}
#councillor .areaBoxSelect .select{
    position: relative;
}
#councillor .areaBoxSelect .btn{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #161719;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    cursor: pointer;
    white-space: nowrap;
}
#councillor .areaBoxSelect .district .btn{
    gap: 12px;
}
#councillor .areaBoxSelect .arraw{
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("../images/triangle.svg") no-repeat center;
    background-size: 16px 16px;
    transition: transform 0.3s;
}
#councillor .areaBoxSelect .subArea{
    width: 100%;
    margin: 0;
    color: #2786A2;
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
    text-align: center;
    word-break: break-word;
}
#councillor .areaBoxSelect .select.open .arraw{
    transform: rotate(180deg);
}
#councillor .areaBoxSelect ul{
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 100%;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(8, 27, 32, 0.12);
    z-index: 3;
}
#councillor .areaBoxSelect .select.open ul{
    display: block;
}
#councillor .areaBoxSelect li{
    padding: 8px 16px;
    color: #081B20;
    font-size: 16px;
    font-weight: 500;
    line-height: 23px;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
}
#councillor .areaBoxSelect li.act,
#councillor .areaBoxSelect li:hover{
    color: #2786A2;
}

#councillor .listBox{
    margin-bottom: 48px;
    background-color: #fff;
    border-radius: 16px;
    padding: 16px;
}
#councillor .listBox .list,
#councillor .listBox .listTitle{
    gap: 24px;
}
#councillor .listBox .list ul,
#councillor .listBox .listTitle ul{
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
#councillor .listBox .list ul li,
#councillor .listBox .listTitle ul li{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: calc((100% - 24px) / 2);
    border-bottom: 1px solid #DDE1E6;
    padding: 10px 0;
}
@media (min-width: 768px) {
    #councillor .listBox .list,
    #councillor .listBox .listTitle ul{
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
    #councillor .listBox .list ul{
        flex-direction: column;
        flex-wrap: nowrap;
        min-width: 0;
    }
    #councillor .listBox .list ul li,
    #councillor .listBox .listTitle ul li{
        width: 100%;
    }
    #councillor .listBox .list ul li:last-child{
        border-bottom: none;
    }
}
#councillor .listBox .listTitle ul li{
    border-bottom: none;
    padding: 0;
    padding-bottom: 10px;
}
#councillor .listBox .list ul li .item,
#councillor .listBox .listTitle ul li .item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
}
#councillor .listBox .list ul li .no,
#councillor .listBox .list ul li .nameBox,
#councillor .listBox .list ul li .ticket,
#councillor .listBox .list ul li .elected{
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    line-height: 23px;
}
#councillor .listBox .listTitle ul li .item span{
    text-align: center;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    line-height: 23px;
    white-space: nowrap;
}
#councillor .listBox .list ul li .no,
#councillor .listBox .listTitle ul li span:nth-child(1){
    width: 12%;
    flex: 0 0 12%;
}
#councillor .listBox .list ul li .nameBox,
#councillor .listBox .listTitle ul li span:nth-child(2){
    width: 38%;
    flex: 1 1 auto;
    text-align: left;
}
#councillor .listBox .list ul li .ticket,
#councillor .listBox .listTitle ul li span:nth-child(3){
    width: 28%;
    flex: 0 0 28%;
}
#councillor .listBox .list ul li .elected,
#councillor .listBox .listTitle ul li span:nth-child(4){
    width: 22%;
    flex: 0 0 22%;
}
#councillor .listBox .list ul li .nameBox{
    justify-content: flex-start;
}
#councillor .listBox .list ul li .party img{
    width: 20px;
    aspect-ratio: 1/1;
}
#councillor .listBox .list ul li .elected img{
    width: 28px;
    aspect-ratio: 1/1;
}
#councillor .listBox .list ul li .item .nameBox{
    display: flex;
    align-items: center;
    gap: 8px;
}
#councillor .listBox .list ul li .nameBox{
    display: flex;
    align-items: center;
    gap: 8px;
}
#councillor .listBox .list ul li .ticket{
    display: flex;
    align-items: center;
    gap: 4px;
}
@media (max-width:1199px) {
    #councillor .listBox .list ul li .nameBox .name{
        width: 70%;
        overflow-wrap: break-word;
        word-break: normal;
        text-wrap: balance; 
    }
    #councillor .listBox .list ul li .item, #councillor .listBox .listTitle ul li .item{
        padding: 0;
    }
}
@media (max-width:1023px) {
    #councillor .areaBoxSelect{
        margin-bottom: 24px;
    }
    #councillor .areaBoxSelect li:hover{
        color: #081B20;
    }
    #councillor .areaBoxSelect li.act,
    #councillor .areaBoxSelect li.act:hover{
        color: #2786A2;
    }
}
@media (max-width:767px) {
    #councillor .listBox{
        margin-bottom: 24px;
        padding: 16px 8px;
    }
    #councillor .listBox .list ul li .item,
    #councillor .listBox .listTitle ul li .item{
        padding: 0;
    }
    #councillor .listBox .list ul, 
    #councillor .listBox .listTitle ul {
        display: block;
    }
    #councillor .listBox .list ul li,
    #councillor .listBox .listTitle ul li{
        width: 100%;
    }
    #councillor .listBox .listTitle ul li:last-child{
        display: none;
    }
    #councillor .areaBoxSelect .inner{
        width: 100%;
        flex-wrap: wrap;
        padding: 8px 20px;
        gap: 8px 12px;
        border-radius: 12px;
    }
    #councillor .areaBoxSelect .btn,
    #councillor .areaBoxSelect .district .btn{
        gap: 4px;
        font-size: 16px;
        line-height: 32px;
    }
    #councillor .listBox .list ul li .no,
    #councillor .listBox .listTitle ul li span:nth-child(1){
        width: 14%;
        flex: 0 0 14%;
    }
    #councillor .listBox .list ul li .nameBox,
    #councillor .listBox .listTitle ul li span:nth-child(2){
        width: 34%;
    }
    #councillor .listBox .list ul li .ticket,
    #councillor .listBox .listTitle ul li span:nth-child(3){
        width: 28%;
        flex: 0 0 28%;
    }
    #councillor .listBox .list ul li .elected,
    #councillor .listBox .listTitle ul li span:nth-child(4){
        width: 20%;
        flex: 0 0 20%;
    }

    #councillor .listBox .list ul li .no,
    #councillor .listBox .list ul li .nameBox,
    #councillor .listBox .list ul li .ticket,
    #councillor .listBox .list ul li .elected{
        font-size: 14px;
    }
    #councillor .listBox .listTitle ul li .item span{
        font-size: 13px;
    }
    #councillor .listBox .list ul:last-child li:last-child{
        border-bottom: none;
    }    
}
#referendum .frameBox .box{
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 32px 16px;
    gap: 64px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 16px;
}
#referendum .frameBox .box.end{
    background-color: #fff;
    display: flex;
    justify-content: space-between;
}
#referendum .frameBox .box.end .result{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#referendum .frameBox .box.end .result p{
    padding: 8px;
    border: 2px solid #EE1D23;
    border-radius: 16px;
    color: #EE1D23;
    font-size: 24px;
    font-weight: 700;
    line-height: 35px;
    letter-spacing: -0.48px;
    white-space: nowrap;
    transform: rotate(-10deg);
}
#referendum .frameBox .box.end .result.pass p{
    padding: 8px;
    border: 2px solid #0FAC37;
    border-radius: 16px;
    color: #0FAC37;
}
#referendum .frameBox .box.end .content{
    width: 55%;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
}
#referendum .frameBox .box.end .data{
    width: 40%;
}
#referendum .frameBox .box.end .data .percentage{
    color: #2786A2;
    font-size: 64px;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: -1.28px;
}
#referendum .frameBox .box.end .data p{
    color: #161719;
    font-size: 24px;
    font-weight: 700;
    line-height: 35px;
    letter-spacing: -0.48px;
}
#referendum .frameBox .box.ready .content,
#referendum .frameBox .box.start .content{
    width: 85%;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
}
#referendum .frameBox .box.ready .state,
#referendum .frameBox .box.start .state{
    width: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#referendum .frameBox .box.ready .state p,
#referendum .frameBox .box.start .state p{
    width: max-content;
    color: #2786A2;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    padding: 8px 12px;
    border-radius: 8px;
    background-color: #fff;
    border: 2px solid #2786A2;
}
#referendum .frameBox .box.ready .state p{
    color: #858C94;
    border: 2px solid #858C94;
}

@media (max-width:767px) {
    #referendum .frameBox .box.end,
    #referendum .frameBox .box.start,
    #referendum .frameBox .box.start .state,
    #referendum .frameBox .box.ready,
    #referendum .frameBox .box.ready .state
    {
        display: block;
    }
    #referendum .frameBox .box.end .result,
    #referendum .frameBox .box.end .content,
    #referendum.frameBox .box.end .data,
    #referendum .frameBox .box.start .content,
    #referendum .frameBox .box.start .state,
    #referendum .frameBox .box.ready .content,
    #referendum .frameBox .box.ready .state{
        width: 100%;
        margin-bottom: 32px;
    }
    #referendum .frameBox .box.end .result{
        width: auto;
        justify-content: flex-start;
    }
    #referendum .frameBox .box.end .data{
        width: 100%;
        margin-bottom: 0px;
    }
}