* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: #f5f4f1;
    color: #171717;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* ==================================================
   PAGE
================================================== */

.page {
    width: 100%;
    max-width: 760px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 28px;
}

/* ==================================================
   HEADER
================================================== */

.header {
    position: relative;
    padding: 48px 0 35px;
    border-bottom: 1px solid #d8d6d0;
}

.brand-cn {
    font-family:
        Georgia,
        "Songti SC",
        "STSong",
        serif;
    font-size: 32px;
    letter-spacing: 4px;
}

.brand-en {
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 2.5px;
    color: #8b8983;
}


/* ==================================================
   MARKET
================================================== */

.market-section {
    padding: 80px 0 72px;
    text-align: center;
    border-bottom: 1px solid #d8d6d0;
}

/*
   指数大小保持原来的感觉
*/

.market-rate {
    margin-top: 25px;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: clamp(
        70px,
        15vw,
        112px
    );
    line-height: 1;
    font-weight: normal;
    letter-spacing: -3px;
}

/* +0.000 */

.market-change {
    margin-top: 18px;
    font-family:
        Georgia,
        serif;
    font-size: 18px;
}

/* 当前TBC结算指数 */

.market-description {
    margin-top:18px;
    font-size:12px;
    color:#999;
    letter-spacing:2px;
}

.market-observation {
    margin-top: 45px;
    padding: 0 15px;
    font-family:
        Georgia,
        "Songti SC",
        "STSong",
        serif;
    font-size: 22px;
    line-height: 1.8;
    color: #222;
    text-align: center;
    letter-spacing: 3px;
    font-weight: normal;
}

.market-observation {
    animation:
        observationFade 1.5s ease;
}

@keyframes observationFade {
    from {
        opacity:0;
        transform:
            translateY(8px);
    }

    to {
        opacity:1;
        transform:
            translateY(0);
    }
}

/* ==================================================
   SECTION
================================================== */

.my-section,
.notice-section {
    padding: 48px 0;
    border-bottom: 1px solid #d8d6d0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    letter-spacing: 1px;
}

/* ==================================================
   HOLDER SELECT
================================================== */

.holder-select-box {
    margin-top: 30px;
}

.select-title {
    margin-bottom: 11px;
    font-size: 13px;
    color: #88857e;
}

select,
input,
textarea {
    width: 100%;
    border: 1px solid #d2d0ca;
    border-radius: 0;
    background: #faf9f6;
    color: #222;
    outline: none;
}

select {
    height: 46px;
    padding: 0 12px;
    font-size: 14px;
}

input {
    height: 46px;
    padding: 0 12px;
    font-size: 14px;
}

textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
    font-size: 14px;
}

select:focus,
input:focus,
textarea:focus {
    border-color: #555;
}

/* ==================================================
   PLAYER ACCOUNT
================================================== */

.player-account {
    margin-top: 38px;
    padding-bottom: 35px;
}

.player-name {
    font-size: 15px;
    color: #777;
}

.player-balance {
    margin-top: 10px;
    font-family:
        Georgia,
        serif;
    font-size: 68px;
    line-height: 1;
}

.player-unit {
    margin-top: 9px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #999;
}

/* ==================================================
   TRANSACTIONS
================================================== */

.player-transactions {
    border-top: 1px solid #dedcd6;
    padding-top: 27px;
}

.transactions-title {
    margin-bottom: 7px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #999;
}

.transaction-item {
    display: grid;
    grid-template-columns:
        90px
        1fr
        auto;
    gap: 14px;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid #e0ded8;
}

.transaction-date {
    font-family:
        Georgia,
        serif;
    font-size: 12px;
    color: #999;
}

.transaction-reason {
    font-size: 14px;
}

.transaction-amount {
    font-family:
        Georgia,
        serif;
    font-size: 17px;
}

.transaction-amount.in {
    color: #222;
}

.transaction-amount.out {
    color: #777;
}

/* ==================================================
   NOTICE
================================================== */

.notice-list {
    margin-top: 30px;
}

.notice-card {
    padding: 25px 0;
    border-bottom: 1px solid #dedcd6;
}

.notice-card:first-child {
    padding-top: 0;
}

.notice-type {
    font-size: 11px;
    letter-spacing: 2px;
    color: #aaa79f;
}

.notice-title {
    margin-top: 13px;
    font-family:
        Georgia,
        "Songti SC",
        serif;
    font-size: 22px;
}

.notice-content {
    margin-top: 15px;
    font-size: 14px;
    line-height: 2;
    color: #686660;
}

.notice-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 21px;
    font-size: 10px;
    color: #aaa79f;
}

/* ==================================================
   FOOTER
================================================== */

.footer {
    display: flex;
    justify-content: space-between;
    padding: 35px 0 45px;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #aaa79f;
}

/* ==================================================
   HIDDEN
================================================== */

.hidden {
    display: none !important;
}

/* ==================================================
   ADMIN MODAL
================================================== */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 100;
}

.modal.show {
    display: block;
}

.modal-mask {
    position: absolute;
    inset: 0;
    background:
        rgba(20, 20, 20, 0.38);
    backdrop-filter:
        blur(2px);
}

.admin-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: min(
        480px,
        92vw
    );
    height: 100vh;
    overflow-y: auto;
    padding: 35px 28px 60px;
    background: #f5f4f1;
    box-shadow:
        -10px 0 30px
        rgba(0, 0, 0, 0.08);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 28px;
    border-bottom: 1px solid #d8d6d0;
}

.admin-title {
    font-family:
        Georgia,
        "Songti SC",
        serif;
    font-size: 22px;
}

.admin-subtitle {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 2px;
    color: #999;
}

.close-button {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #777;
    cursor: pointer;
}

/* ==================================================
   ADMIN BLOCK
================================================== */

.admin-block {
    padding: 30px 0;
    border-bottom: 1px solid #d8d6d0;
}

.admin-block-title {
    margin-bottom: 18px;
    font-size: 12px;
    letter-spacing: 1.5px;
}

.admin-block label {
    display: block;
    margin: 15px 0 7px;
    font-size: 11px;
    color: #8a8881;
}

.admin-row {
    display: grid;
    grid-template-columns:
        1fr
        auto;
    gap: 8px;
}

.button {
    min-width: 80px;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #bdbab2;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}

.button-dark {
    width: 100%;
    margin-top: 15px;
    border-color: #222;
    background: #222;
    color: white;
}

.admin-block input,
.admin-block select {
    margin-bottom: 4px;
}

/* ==================================================
   ADMIN LEDGER
================================================== */

.admin-ledger {
    overflow-x: auto;
}

.ledger-row {
    display: grid;
    grid-template-columns:
        70px
        70px
        minmax(100px, 1fr)
        55px
        55px;

    gap: 8px;
    align-items: center;

    min-width: 430px;

    padding: 13px 0;

    border-bottom: 1px solid #dedcd6;

    font-size: 11px;
}

.ledger-header {
    color: #999;
    font-size: 10px;
}

.ledger-date {
    font-family:
        Georgia,
        serif;

    font-size: 10px;

    color: #999;
}

.ledger-holder {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.ledger-reason {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #666;
}

.ledger-amount {
    font-family:
        Georgia,
        serif;

    text-align: right;
}

.ledger-income {
    color: #222;
}

.ledger-expense {
    color: #777;
}

.ledger-balance {
    font-family:
        Georgia,
        serif;

    text-align: right;
}

.ledger-header {
    color: #999;
    font-size: 10px;
}

.ledger-amount {
    font-family:
        Georgia,
        serif;
    text-align: right;
}

.ledger-balance {
    font-family:
        Georgia,
        serif;
    text-align: right;
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {
    .page {
        padding: 0 20px;
    }

    .header {
        padding-top: 35px;
    }

    .brand-cn {
        font-size: 29px;
    }

    .brand-en {
        font-size: 11px;
    }

    .market-section {
        padding: 65px 0 55px;
    }

    .section-label {
        font-size: 12px;
    }

    /*
       指数大小不改
    */

    .market-rate {
        font-size: 78px;
    }

    .market-change {
        font-size: 17px;
    }

    .market-description {
        font-size: 13px;
    }

    .market-status {
        font-size: 11px;
    }

    .section-heading {
        font-size: 16px;
    }

    .section-number {
        font-size: 11px;
    }

    .select-title {
        font-size: 13px;
    }

    select {
        height: 50px;
        font-size: 15px;
    }

    .player-name {
        font-size: 16px;
    }

    .player-balance {
        font-size: 76px;
    }

    .player-unit {
        font-size: 13px;
    }

    .transactions-title {
        font-size: 13px;
    }

    .transaction-item {
        grid-template-columns:
            75px
            1fr
            auto;
        gap: 10px;
    }

    .transaction-date {
        font-size: 12px;
    }

    .transaction-reason {
        font-size: 14px;
    }

    .transaction-amount {
        font-size: 17px;
    }

    .notice-type {
        font-size: 11px;
    }

    .notice-title {
        font-size: 21px;
    }

    .notice-content {
        font-size: 14px;
        line-height: 2;
    }

    .notice-footer {
        font-size: 10px;
    }

    .admin-panel {
        width: 100%;
    }
}

/* ==================================================
   RANKING
================================================== */

.ranking-section{
    padding:48px 0;
}

.ranking-list{
    margin-top:30px;
}

.ranking-item{
    display:grid;
    grid-template-columns:70px 1fr auto;
    align-items:center;
    min-height:58px;
    padding:16px 0;
    border-bottom:1px solid #dedcd6;
}

.ranking-number{
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:13px;
    color:#aaa79f;
}

.ranking-name{
    font-size:14px;
    letter-spacing:.5px;
}

.ranking-balance{
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:17px;
    text-align:right;
    white-space:nowrap;
}

.ranking-unit{
    margin-left:5px;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size:9px;
    letter-spacing:1px;
    color:#aaa79f;
}

/* 第一名 */

.ranking-item.rank-first{
    min-height:76px;
    padding:20px 0;
}

.rank-first .ranking-number{
    font-size:22px;
    color:#222;
}

.rank-first .ranking-name{
    font-family:
        Georgia,
        "Songti SC",
        "STSong",
        serif;
    font-size:19px;
}

.rank-first .ranking-balance{
    font-size:25px;
}

.rank-first .ranking-unit{
    font-size:10px;
    color:#777;
}

.rank-label{
    margin-top:5px;
    font-size:8px;
    letter-spacing:2px;
    color:#aaa79f;
}

/* 第二名 */

.ranking-item.rank-second .ranking-number{
    font-size:17px;
    color:#555;
}

.ranking-item.rank-second .ranking-balance{
    font-size:20px;
}

/* 第三名 */

.ranking-item.rank-third .ranking-number{
    font-size:15px;
    color:#777;
}

.ranking-item.rank-third .ranking-balance{
    font-size:19px;
}

/* 其余 */

.ranking-item.rank-normal .ranking-number{
    font-size:12px;
    color:#aaa79f;
}

.ranking-item.rank-normal .ranking-balance{
    font-size:16px;
}

/* ==================================================
   ADMIN HOLDER LIST
================================================== */

.admin-holder-list{
    border-top:1px solid #dedcd6;
}

.admin-holder-item{
    padding:18px 0;
    border-bottom:1px solid #dedcd6;
}

.admin-holder-main{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
}

.admin-holder-name{
    font-size:14px;
}

.admin-holder-balance{
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size:18px;
}

.admin-holder-controls{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
}

.admin-holder-controls input{
    grid-column:1 / -1;
}

.admin-holder-controls button{
    height:40px;
    border:1px solid #c8c5be;
    background:transparent;
    cursor:pointer;
    font-size:11px;
}

.admin-holder-controls button:last-child{
    border-color:#222;
    background:#222;
    color:#fff;
}

.admin-sub-block-title{
    margin-bottom:15px;
    font-size:11px;
    letter-spacing:1.5px;
    color:#999;
}

.admin-create-holder{
    margin-top:28px;
    padding-top:28px;
    border-top:1px solid #dedcd6;
}

.admin-create-holder input{
    margin-bottom:8px;
}

/* ==================================================
   RATE CHART
================================================== */

.chart-section {
    padding: 45px 0 50px;
    border-bottom: 1px solid #d8d6d0;
}

.chart-wrapper {
    margin-top: 30px;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

#rateChart {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-grid {
    stroke: #dedcd6;
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke: #222;
    stroke-width: 2;
}

.chart-point {
    fill: #f5f4f1;
    stroke: #222;
    stroke-width: 2;
}

.chart-label {
    fill: #999;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "PingFang SC",
        "Microsoft YaHei",
        sans-serif;
    font-size: 11px;
}

.chart-value {
    fill: #555;
    font-family:
        Georgia,
        serif;
    font-size: 11px;
}

@media (max-width: 600px) {
    .chart-section {
        padding: 40px 0 45px;
    }

    .chart-wrapper {
        height: 230px;
    }
}

/* ==================================================
   NOTICE HISTORY
================================================== */

.notice-history-button {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 14px 0;

    border: 0;
    border-top: 1px solid #dedcd6;
    border-bottom: 1px solid #dedcd6;

    background: transparent;
    color: #777;

    font-size: 11px;
    letter-spacing: 1.5px;

    cursor: pointer;
}

.notice-history-button:hover {
    color: #222;
}

.notice-history {
    margin-top: 10px;
}

.notice-history .notice-card {
    padding: 25px 0;
}

.notice-history .notice-card:first-child {
    padding-top: 25px;
}

.notice-history-button.active {
    color: #222;
}

/* ==================================================
   ADMIN HOLDER SELECTOR
================================================== */

.selected-holder-panel {
    margin-top: 28px;
    padding: 22px 0;
    border-top: 1px solid #dedcd6;
    border-bottom: 1px solid #dedcd6;
}

.selected-holder-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.selected-holder-name {
    font-size: 15px;
}

.selected-holder-balance {
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 24px;
}

.selected-holder-unit {
    margin-left: 5px;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    color: #999;
}

.selected-holder-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
}

.selected-holder-controls input {
    grid-column: 1 / -1;
}

.selected-holder-controls button {
    height: 42px;
    border: 1px solid #c8c5be;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
}

.selected-holder-controls button:last-child {
    border-color: #222;
    background: #222;
    color: #fff;
}

@media (max-width: 600px) {
    .selected-holder-balance {
        font-size: 22px;
    }
}

/* ==================================================
   ADMIN NOTICE
================================================== */

.admin-notice-item{
    padding:18px 0;
    border-bottom:
        1px solid #dedcd6;
}


.admin-notice-title{
    font-family:
        Georgia,
        "Songti SC",
        serif;
    font-size:16px;
}

.admin-notice-date{
    margin-top:6px;
    font-size:10px;
    color:#999;
}

.admin-notice-content{
    margin-top:12px;
    font-size:12px;
    line-height:1.8;
    color:#666;
}

.admin-notice-delete{
    margin-top:15px;
    height:35px;
    padding:0 15px;
    border:
        1px solid #999;
    background:
        transparent;
    font-size:11px;
    cursor:pointer;
}


.admin-notice-delete:hover{
    background:#222;
    color:white;
}