/* ============================================
   History Review Page - history.css
   Primary: #DC0000 | Dark: #1a1a1a
   ============================================ */

/* ---- Hero override for history page ---- */

.hist-page .cal-hero {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hist-page .cal-hero h1 {
    margin-bottom: 66px;
}

.hist-page .cal-hero-desc {
    margin-bottom: 0;
}

/* ---- Section 3: Filters ---- */

.hist-filters {
    background: #fff;
    padding: 56px 0 58px;
    border-top: 1px solid #EEEEEE;
}

.hist-filter-row {
    display: flex;
    align-items: center;
    gap: 44px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.hist-filter-row:last-child {
    margin-bottom: 0;
}

.hist-filter-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hist-filter-label {
    font-size: 16px;
    color: #666666;
    white-space: nowrap;
}

.hist-select {
    width: 178px;
    height: 44px;
    padding: 14px 20px 14px 20px;
    border: 1px solid #EEEEEE;
    border-radius: 6px;
    font-size: 16px;
    color: #383838;
    line-height: 1;
    background: #FFFFFF;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.hist-select:focus {
    border-color: #DC0000;
}

.hist-search-group {
    display: flex;
    gap: 0;
}

.hist-search-input {
    height: 44px;
    width: 357px;
    padding: 14px 20px 14px 20px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.hist-search-input:focus {
    border-color: #DC0000;
}

.hist-search-btn {
    height: 44px;
    padding: 0 24px;
    background: #DC0000;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.hist-search-btn:hover {
    background: #b00000;
}

.hist-date-input {
    height: 44px;
    padding: 14px 20px 14px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.hist-date-input:focus {
    border-color: #DC0000;
}

.hist-date-input::-webkit-calendar-picker-indicator {
    display: none;
}

.hist-date-sep {
    font-size: 14px;
    color: #999;
    padding: 0 4px;
}

.hist-range-btns {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 16px;
}

.hist-range-btn {
    width: 118px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    color: #383838;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hist-range-btn:hover {
    border-color: #DC0000;
    color: #DC0000;
}

.hist-range-btn.active {
    background: #DC0000;
    border-color: #DC0000;
    color: #fff;
}

.hist-range-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Section 4: Main Content ---- */

.hist-main {
    background: #f5f5f5;
    padding: 40px 0 60px;
}

.hist-content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.hist-left {
    flex: 1;
    min-width: 0;
}

/* ---- Chart Section ---- */

.hist-chart-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px 22px;
    margin-bottom: 31px;
}

.hist-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 22px;
    position: relative;
}

.hist-chart-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -30px;
    right: -30px;
    height: 1px;
    background: #EEEEEE;
}

.hist-chart-title {
    font-size: 20px;
    font-weight: 600;
    color: #383838;
    margin: 0;
}

.hist-chart-actions {
    display: flex;
    gap: 12px;
}

.hist-chart-btn {
    height: 38px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #383838;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hist-chart-btn:hover {
    border-color: #DC0000;
    color: #DC0000;
}

/* -- Fullscreen Price Header (hidden in normal mode) -- */
.hist-price-header {
    display: none;
}

/* Fullscreen Topbar */
.hist-fs-topbar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transform: translateY(-100%);
    transition: max-height .3s ease;
    overflow: hidden;
}
.hist-fs-topbar.open {
    transform: translateY(0);
}

.hist-chart-area.hist-fullscreen-active .hist-fs-topbar {
    display: block;
    transform: none;
    max-height: 0;
    transition: max-height .3s ease;
}
.hist-chart-area.hist-fullscreen-active .hist-fs-topbar.open {
    max-height: 200px;
}

.hist-fs-topbar .hist-price-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.hist-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hist-fs-symbol {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}

.hist-fs-price {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
}

.hist-fs-diff,
.hist-fs-pct {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}
.hist-fs-diff.up,
.hist-fs-pct.up {
    background: rgba(32, 181, 49, .15);
    color: #20B531;
}
.hist-fs-diff.down,
.hist-fs-pct.down {
    background: #eee;
    color: #F04945;
}

.hist-price-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}
.hist-price-sep { color: #ddd; }

.hist-fs-exit {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: .2s;
}
.hist-fs-exit:hover {
    border-color: #DC0000;
    color: #DC0000;
}

/* Pull-tab (fullscreen toggle) */
.hist-fs-tab {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    z-index: 201;
    width: 48px;
    height: 20px;
    border: none;
    border-radius: 0 0 10px 10px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    transition: top .3s ease, color .15s;
}
.hist-fs-tab:hover { color: #666; }
.hist-chart-area.hist-fullscreen-active .hist-fs-tab {
    display: flex;
}

/* Fullscreen active: fill screen, black bg */
.hist-chart-area.hist-fullscreen-active {
    padding: 0;
    overflow: hidden;
    background: #fff;
    position: relative;
    transition: padding-top .3s ease;
}

.hist-chart-area {
    width: 100%;
    height: 387px;
    background: #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 23px;
}

.hist-chart-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.hist-chart-placeholder {
    text-align: center;
    color: #ccc;
}

.hist-chart-placeholder p {
    margin-top: 12px;
    font-size: 14px;
    color: #999;
}

.hist-chart-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hist-stat-card {
    background: #FFFFFF;
    border-radius: 6px;
    padding: 25px 0 29px 22px;
    border: 1px solid #EEEEEE;
    border-left: 6px solid #FFC823;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.hist-stat-label {
    font-size: 14px;
    color: #888888;
    margin-bottom: 15px;
}

.hist-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #383838;
    margin-bottom: 18px;
    line-height: 1.2;
}

.hist-stat-date {
    font-size: 14px;
    color: #888888;
    font-weight: 200;
}

.hist-stat-change {
    font-size: 28px;
    color: #383838;
    font-weight: bold;
    margin-bottom: 4px;
}

.hist-stat-change.up {
    color: #DC0000;
}

.hist-stat-change.down {
    color: #20B531;
}

.hist-stat-note {
    font-size: 14px;
    color: #888888;
}

.hist-stat-note.up {
    color: #DC0000;
}

.hist-stat-note.down {
    color: #20B531;
}

/* ---- Data Table Section ---- */

.hist-table-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}

.hist-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 20px;
    position: relative;
}

.hist-table-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -30px;
    right: -30px;
    height: 1px;
    background: #EEEEEE;
}

.hist-table-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #383838;
    margin: 0;
}

.hist-export-btn {
    height: 38px;
    padding: 0 18px;
    border: 1px solid #EEEEEE;
    border-radius: 6px;
    font-size: 14px;
    color: #383838;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hist-export-btn svg {
    flex-shrink: 0;
}

.hist-export-btn:hover {
    border-color: #DC0000;
    color: #DC0000;
}

.hist-export-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: #eee;
    color: #999;
}

.hist-export-btn:disabled:hover {
    border-color: #eee;
    color: #999;
}

@keyframes hist-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.hist-btn-spin {
    animation: hist-spin 1s linear infinite;
}

.hist-table-wrap {
    overflow-x: auto;
    margin-bottom: 59px;
}

.hist-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.hist-data-table th {
    background: #E8ECF1;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #383838;
    text-align: left;
    border-bottom: none;
    white-space: nowrap;
}

.hist-data-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #383838;
    border-bottom: 1px solid #f5f5f5;
    white-space: nowrap;
}

.hist-data-table tr:hover {
    background: #fafafa;
}

.hist-data-table tr:last-child td {
    border-bottom: none;
}

.hist-val-up,
.hist-data-table td.hist-val-up {
    color: #DC0000;
    font-weight: 500;
}

.hist-val-down,
.hist-data-table td.hist-val-down {
    color: #20B531;
    font-weight: 500;
}

/* Pagination */

.hist-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hist-page-btn {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hist-page-btn:hover:not(.disabled) {
    border-color: #DC0000;
    color: #DC0000;
}

.hist-page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.hist-page-num {
    width: 37px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #383838;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hist-page-num:hover {
    border-color: #DC0000;
    color: #DC0000;
}

.hist-page-num.active {
    background: #DC0000;
    border-color: #DC0000;
    color: #fff;
}

.hist-page-ellipsis {
    padding: 0 15px;
    color: #383838;
    font-size: 14px;
}

.hist-page-info {
    font-size: 12px;
    color: #999;
    margin-left: 16px;
}

/* ---- Product Comparison Section ---- */

.hist-compare-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}

.hist-compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 27px;
}

.hist-compare-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #383838;
    margin: 0;
}

.hist-compare-period {
    height: 38px;
    padding: 0 18px;
    border: 1px solid #EEEEEE;
    border-radius: 17px;
    font-size: 14px;
    color: #383838;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.hist-compare-period::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 7.5px solid transparent;
    border-right: 7.5px solid transparent;
    border-top: 9px solid #E5E5E5;
    flex-shrink: 0;
}

.hist-compare-period:hover {
    border-color: #DC0000;
    color: #DC0000;
}

.hist-compare-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hist-compare-card {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hist-compare-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hist-compare-label {
    font-size: 14px;
    color: #383838;
    margin-bottom: 18px;
}

.hist-compare-value {
    font-size: 24px;
    font-weight: bold;
    color: #111;
    margin-bottom: 17px;
    line-height: 1.2;
}

.hist-compare-change {
    font-size: 14px;
    font-weight: 600;
}

.hist-compare-change.up {
    color: #DC0000;
}

.hist-compare-change.down {
    color: #20B531;
}

/* ---- SEO Content Section ---- */

.hist-seo-section {
    background: #fff;
    border-radius: 12px;
    padding: 36px 30px 0px 30px;
    border-bottom: 2px solid #EEEEEE;
    margin-bottom: 124px;
}

.hist-seo-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #383838;
    margin-bottom: 36px;
    line-height: 1.4;
}

.hist-seo-section h3 {
    font-size: 20px;
    font-weight: 400;
    color: #383838;
    margin-top: 36px;
    margin-bottom: 34px;
}

.hist-seo-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin-top: 20px;
    margin-bottom: 10px;
}

.hist-seo-section p {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* ---- Bottom Tags ---- */

.hist-bottom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 27px 0 46px;
    border-top: 2px solid #EEEEEE;
    margin-top: 28px;
}

.hist-tag-item {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.hist-tag-item:hover {
    background: #DC0000;
    border-color: #DC0000;
    color: #fff;
}

/* ---- Sidebar ---- */

.hist-sidebar {
    width: 450px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hist-sidebar-block {
    background: #fff;
    border-radius: 12px;
    padding: 34px 32px 31px 33px;
}

.hist-sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: #383838;
    margin-bottom: 23px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

/* Live Quotes */

.hist-quote-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hist-quote-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 26px 23px 25px 23px;
    background: #F8F9FA;
    border-radius: 6px;
}

.hist-quote-info {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.hist-quote-name {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.hist-quote-code {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.hist-quote-data {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.hist-quote-price {
    font-size: 20px;
    font-weight: bold;
    color: #111;
}

.hist-quote-price.up {
    color: #DC0000;
}

.hist-quote-price.down {
    color: #20B531;
}

.hist-quote-change {
    font-size: 16px;
    font-weight: 500;
}

.hist-quote-change.up {
    color: #DC0000;
}

.hist-quote-change.down {
    color: #20B531;
}

/* Hot Tags */

.hist-hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hist-hot-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 20px;
    font-size: 16px;
    color: #666666;
    transition: all 0.2s;
}

.hist-hot-tag:hover {
    background: #DC0000;
    color: #fff;
}

/* Hot Articles */

.hist-hot-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hist-hot-articles li a {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 19px 0;
    font-size: 16px;
    color: #717171;
    line-height: 1.5;
    transition: color 0.2s;
}

.hist-hot-articles li:last-child a {
    border-bottom: none;
}

.hist-hot-articles li a:hover {
    color: #DC0000;
}

.hist-article-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #D4AF37;
    flex-shrink: 0;
    margin-top: 1px;
}

.hist-article-num.hot {
    background: #FF4444;
}

/* History Prices */

.hist-price-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hist-price-list li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    transition: color 0.2s;
}

.hist-price-list li:last-child a {
    border-bottom: none;
}

.hist-price-list li a:hover {
    color: #DC0000;
}

.hist-price-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #DC0000;
    margin-top: 6px;
    flex-shrink: 0;
}

/* ============================================
   Responsive: max-width 1080px (Tablet + Mobile)
   ============================================ */

@media (max-width: 1080px) {

    /* ---- Hero ---- */
    .hist-page .cal-hero h1 {
        margin-bottom: 30px;
    }

    /* ---- Filters ---- */
    .hist-filters {
        padding: 4vw 0;
    }

    .hist-filter-row {
        gap: 3vw;
        margin-bottom: 3vw;
    }

    .hist-filter-group {
        gap: 2vw;
    }

    .hist-filter-label {
        font-size: 3.2vw;
    }

    .hist-select {
        width: auto;
        min-width: 0;
        height: 9vw;
        font-size: 3vw;
        padding: 0 7vw 0 2.5vw;
        border-radius: 1.2vw;
    }

    .hist-search-group {
        width: 100%;
        margin-left: 0;
    }

    .hist-search-input {
        flex: 1;
        width: auto;
        height: 9vw;
        font-size: 3vw;
        padding: 0 3vw;
        border-radius: 1.2vw 0 0 1.2vw;
    }

    .hist-search-btn {
        height: 9vw;
        padding: 0 4vw;
        font-size: 3vw;
        border-radius: 0 1.2vw 1.2vw 0;
    }

    .hist-date-input {
        height: 9vw;
        font-size: 3vw;
        padding: 0 2vw;
        border-radius: 1.2vw;
        max-width: 30vw;
    }

    .hist-date-sep {
        font-size: 3vw;
    }

    .hist-range-btns {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 2vw;
        width: 100%;
    }

    .hist-range-btn {
        width: auto;
        height: auto;
        padding: 1.5vw 3.5vw;
        font-size: 3vw;
        border-radius: 1.2vw;
    }

    /* ---- Main Content ---- */
    .hist-main {
        padding: 4vw 0 8vw;
    }

    .hist-content-wrapper {
        flex-direction: column;
        gap: 4vw;
    }

    .hist-left {
        width: 100%;
    }

    /* ---- Chart Section ---- */
    .hist-chart-section {
        padding: 4vw;
        border-radius: 3vw;
        margin-bottom: 4vw;
    }

    .hist-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3vw;
        padding-bottom: 3vw;
        margin-bottom: 3vw;
    }

    .hist-chart-header::after {
        left: -4vw;
        right: -4vw;
    }

    .hist-chart-title {
        font-size: 4.2vw;
    }

    .hist-chart-actions {
        gap: 2vw;
        flex-wrap: wrap;
    }

    .hist-chart-btn {
        height: auto;
        padding: 1.5vw 3vw;
        font-size: 3vw;
        border-radius: 1.2vw;
    }

    .hist-chart-area {
        height: 55vw;
        margin-bottom: 4vw;
        border-radius: 1.5vw;
    }

    .hist-chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 3vw;
    }

    .hist-stat-card {
        padding: 3vw;
        border-radius: 1.5vw;
        border-left-width: 4px;
    }

    .hist-stat-label {
        font-size: 3vw;
        margin-bottom: 2vw;
    }

    .hist-stat-value {
        font-size: 5vw;
        margin-bottom: 2vw;
    }

    .hist-stat-date {
        font-size: 2.8vw;
    }

    .hist-stat-change {
        font-size: 5vw;
        margin-bottom: 1vw;
    }

    .hist-stat-note {
        font-size: 2.8vw;
    }

    /* ---- Table Section ---- */
    .hist-table-section {
        padding: 4vw;
        border-radius: 3vw;
        margin-bottom: 4vw;
    }

    .hist-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3vw;
        padding-bottom: 3vw;
        margin-bottom: 3vw;
    }

    .hist-table-header::after {
        left: -4vw;
        right: -4vw;
    }

    .hist-table-header h3 {
        font-size: 4.2vw;
    }

    .hist-export-btn {
        height: auto;
        padding: 1.5vw 3vw;
        font-size: 3vw;
        border-radius: 1.2vw;
    }

    .hist-export-btn svg {
        width: 3.5vw;
        height: 3.5vw;
    }

    .hist-table-wrap {
        margin-bottom: 4vw;
        -webkit-overflow-scrolling: touch;
    }

    .hist-data-table {
        min-width: 600px;
    }

    .hist-data-table th,
    .hist-data-table td {
        padding: 2.5vw 2vw;
        font-size: 3vw;
    }

    .hist-pagination {
        gap: 1.5vw;
    }

    .hist-page-btn {
        height: auto;
        padding: 1.5vw 3vw;
        font-size: 3vw;
    }

    .hist-page-num {
        width: 8vw;
        height: 8vw;
        font-size: 3vw;
    }

    .hist-page-ellipsis {
        padding: 0 2vw;
        font-size: 3vw;
    }

    .hist-page-info {
        font-size: 2.8vw;
        margin-left: 2vw;
    }

    /* ---- Compare Section ---- */
    .hist-compare-section {
        padding: 4vw;
        border-radius: 3vw;
        margin-bottom: 4vw;
    }

    .hist-compare-header {
        margin-bottom: 3vw;
    }

    .hist-compare-header h3 {
        font-size: 4.2vw;
    }

    .hist-compare-period {
        height: auto;
        padding: 1.5vw 3vw;
        font-size: 3vw;
        border-radius: 4vw;
        gap: 2vw;
    }

    .hist-compare-period::after {
        border-left-width: 5px;
        border-right-width: 5px;
        border-top-width: 6px;
    }

    .hist-compare-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 3vw;
    }

    .hist-compare-card {
        padding: 3.5vw 3vw;
        border-radius: 2.5vw;
    }

    .hist-compare-label {
        font-size: 3vw;
        margin-bottom: 2.5vw;
    }

    .hist-compare-value {
        font-size: 5.5vw;
        margin-bottom: 2.5vw;
    }

    .hist-compare-change {
        font-size: 3.2vw;
    }

    /* ---- SEO Section ---- */
    .hist-seo-section {
        padding: 4vw 4vw 0;
        border-radius: 3vw;
        margin-bottom: 8vw;
    }

    .hist-seo-section h2 {
        font-size: 4.5vw;
        margin-bottom: 4vw;
    }

    .hist-seo-section h3 {
        font-size: 4vw;
        margin-top: 4vw;
        margin-bottom: 3vw;
    }

    .hist-seo-section h4 {
        font-size: 3.6vw;
    }

    .hist-seo-section p {
        font-size: 3.2vw;
        line-height: 1.9;
    }

    /* ---- Bottom Tags ---- */
    .hist-bottom-tags {
        gap: 2vw;
        padding: 4vw 0;
        margin-top: 4vw;
    }

    .hist-tag-item {
        padding: 1.8vw 3.5vw;
        font-size: 3vw;
        border-radius: 4vw;
    }

    /* ---- Sidebar ---- */
    .hist-sidebar {
        width: 100%;
        gap: 4vw;
    }

    .hist-sidebar-block {
        padding: 4vw;
        border-radius: 3vw;
    }

    .hist-sidebar-title {
        font-size: 4.2vw;
        margin-bottom: 3.5vw;
        padding-bottom: 3vw;
    }

    /* Live Quotes */
    .hist-quote-list {
        gap: 3vw;
    }

    .hist-quote-item {
        padding: 3.5vw 3vw;
        border-radius: 1.5vw;
    }

    .hist-quote-info {
        gap: 2vw;
    }

    .hist-quote-name {
        font-size: 3.5vw;
    }

    .hist-quote-code {
        font-size: 2.8vw;
    }

    .hist-quote-data {
        gap: 2vw;
    }

    .hist-quote-price {
        font-size: 4.5vw;
    }

    .hist-quote-change {
        font-size: 3vw;
    }

    /* Hot Tags */
    .hist-hot-tags {
        gap: 2vw;
    }

    .hist-hot-tag {
        padding: 1.5vw 3vw;
        font-size: 3vw;
    }

    /* Hot Articles & Price List */
    .hist-hot-articles li a,
    .hist-price-list li a {
        font-size: 3.2vw;
        padding: 3vw 0;
        gap: 2.5vw;
    }

    .hist-article-num {
        width: 5vw;
        height: 5vw;
        min-width: 5vw;
        font-size: 2.8vw;
        border-radius: 1vw;
    }

    .hist-price-dot {
        width: 2vw;
        height: 2vw;
        min-width: 2vw;
        margin-top: 1.5vw;
    }

    /* ---- Fullscreen Mode ---- */
    .hist-chart-area.hist-fullscreen-active .hist-fs-topbar.open {
        max-height: 300px;
    }

    .hist-fs-topbar .hist-price-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 3vw;
        gap: 2vw;
    }

    .hist-price-info {
        flex-wrap: wrap;
        gap: 2vw;
    }

    .hist-fs-symbol {
        font-size: 3.5vw;
    }

    .hist-fs-price {
        font-size: 4vw;
    }

    .hist-fs-diff,
    .hist-fs-pct {
        font-size: 2.8vw;
        padding: 0.5vw 1.5vw;
    }

    .hist-price-extra {
        font-size: 3vw;
        gap: 1.5vw;
        flex-wrap: wrap;
    }

    .hist-fs-exit {
        font-size: 3vw;
        padding: 1vw 3vw;
    }

    .hist-fs-tab {
        width: 10vw;
        height: 5vw;
        border-radius: 0 0 2vw 2vw;
        font-size: 3vw;
    }
}

/* ============================================
   Responsive: max-width 480px (Small Mobile)
   ============================================ */

@media (max-width: 480px) {

    /* ---- Hero ---- */
    .hist-page .cal-hero h1 {
        margin-bottom: 16px;
    }

    /* ---- Filters: stack vertically ---- */
    .hist-filter-row {
        flex-direction: column;
        gap: 3vw;
        margin-bottom: 4vw;
    }

    .hist-filter-group {
        width: 100%;
    }

    .hist-filter-label {
        font-size: 3.4vw;
        min-width: 14vw;
    }

    .hist-select {
        flex: 1;
        height: 10vw;
        font-size: 3.4vw;
        padding: 0 8vw 0 3vw;
    }

    .hist-search-input {
        height: 10vw;
        font-size: 3.4vw;
    }

    .hist-search-btn {
        height: 10vw;
        font-size: 3.4vw;
        padding: 0 5vw;
    }

    .hist-date-input {
        flex: 1;
        height: 10vw;
        font-size: 3.4vw;
        max-width: none;
    }

    .hist-date-sep {
        font-size: 3.4vw;
        padding: 0 1vw;
    }

    .hist-range-btns {
        gap: 2vw;
    }

    .hist-range-btn {
        padding: 2vw 3vw;
        font-size: 3.2vw;
    }

    /* ---- Chart ---- */
    .hist-chart-section {
        padding: 3.5vw;
    }

    .hist-chart-header::after {
        left: -3.5vw;
        right: -3.5vw;
    }

    .hist-chart-title {
        font-size: 4.5vw;
    }

    .hist-chart-actions {
        width: 100%;
    }

    .hist-chart-btn {
        flex: 1;
        text-align: center;
        padding: 2vw 0;
        font-size: 3.2vw;
    }

    .hist-chart-area {
        height: 60vw;
    }

    .hist-chart-stats {
        grid-template-columns: 1fr;
        gap: 3vw;
    }

    .hist-stat-card {
        padding: 3.5vw;
    }

    .hist-stat-value {
        font-size: 6vw;
    }

    .hist-stat-change {
        font-size: 6vw;
    }

    /* ---- Table ---- */
    .hist-table-section {
        padding: 3.5vw;
    }

    .hist-table-header::after {
        left: -3.5vw;
        right: -3.5vw;
    }

    .hist-table-header h3 {
        font-size: 4.5vw;
    }

    .hist-export-btn {
        padding: 2vw 4vw;
        font-size: 3.2vw;
    }

    .hist-data-table {
        min-width: 550px;
    }

    .hist-data-table th,
    .hist-data-table td {
        padding: 3vw 2vw;
        font-size: 3.2vw;
    }

    .hist-page-btn {
        padding: 2vw 3vw;
        font-size: 3.2vw;
    }

    .hist-page-num {
        width: 9vw;
        height: 9vw;
        font-size: 3.2vw;
    }

    .hist-page-info {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 2vw;
    }

    /* ---- Compare ---- */
    .hist-compare-section {
        padding: 3.5vw;
    }

    .hist-compare-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3vw;
    }

    .hist-compare-header h3 {
        font-size: 4.5vw;
    }

    .hist-compare-cards {
        grid-template-columns: 1fr 1fr;
        gap: 2.5vw;
    }

    .hist-compare-value {
        font-size: 6vw;
    }

    /* ---- SEO ---- */
    .hist-seo-section {
        padding: 3.5vw 3.5vw 0;
    }

    .hist-seo-section h2 {
        font-size: 5vw;
    }

    .hist-seo-section h3 {
        font-size: 4.2vw;
    }

    .hist-seo-section p {
        font-size: 3.4vw;
    }

    /* ---- Sidebar ---- */
    .hist-sidebar-block {
        padding: 3.5vw;
    }

    .hist-sidebar-title {
        font-size: 4.5vw;
    }

    .hist-quote-item {
        padding: 4vw 3.5vw;
    }

    .hist-quote-name {
        font-size: 3.8vw;
    }

    .hist-quote-price {
        font-size: 5vw;
    }

    .hist-quote-change {
        font-size: 3.2vw;
    }

    /* ---- Fullscreen ---- */
    .hist-fs-topbar .hist-price-header {
        padding: 3.5vw;
        gap: 2.5vw;
    }

    .hist-fs-symbol {
        font-size: 4vw;
    }

    .hist-fs-price {
        font-size: 4.5vw;
    }

    .hist-fs-diff,
    .hist-fs-pct {
        font-size: 3vw;
    }

    .hist-price-extra {
        font-size: 3.2vw;
    }

    .hist-fs-exit {
        font-size: 3.2vw;
        padding: 1.5vw 3vw;
    }
}