* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #dff5f7;
    color: #111;
    font-family: Arial, "Noto Sans JP", sans-serif;
    font-size: 13px;
}

a {
    color: #075aa5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-wrapper {
    width: 1000px;
    max-width: calc(100% - 20px);
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

.top-header {
    height: 38px;
    padding: 7px 14px;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.header-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 11px;
}

.premium-btn {
    padding: 5px 10px;
    background: #ff9e1c;
    color: #fff;
    font-weight: bold;
}

.market-ticker {
    min-height: 68px;
    padding: 10px;
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.ticker-box {
    width: 145px;
    border: 1px solid #aaa;
    background: #fff;
}

.ticker-title {
    height: 23px;
    padding: 4px 6px;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(#555, #333);
    color: #fff;
    font-size: 10px;
}

.ticker-title b {
    color: #ffeb00;
    font-size: 9px;
}

.ticker-value {
    display: inline-block;
    padding: 8px 5px;
    font-size: 13px;
    font-weight: bold;
}

.ticker-change {
    float: right;
    padding: 5px;
    text-align: right;
    font-size: 8px;
    font-weight: bold;
}

.ticker-change.red {
    color: red;
}

.ticker-change.blue {
    color: #0069c2;
}

.main-nav {
    margin: 20px 10px 0;
    display: flex;
    justify-content: flex-end;
    border-bottom: 2px solid #143b64;
}

.main-nav a {
    height: 37px;
    min-width: 110px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(#174c7d, #082f55);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

.main-nav a.active {
    background: #fff;
    border: 1px solid #173e67;
    border-bottom: 0;
    color: #133e69;
}

.search-section {
    margin: 15px 10px 0;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #e9e9e9;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #bbb;
}

.search-label {
    width: 45px;
    color: red;
    font-weight: bold;
}

.search-section input {
    height: 30px;
    flex: 1;
    padding: 0 10px;
    border: 1px solid #777;
}

.search-section button {
    height: 30px;
    padding: 0 13px;
    border: 1px solid #ccc;
    background: #fff;
    font-weight: bold;
    font-size: 10px;
}

.search-section .search-btn {
    color: #c00000;
}

.search-section .theme-btn {
    color: #d41a5c;
}

.search-section .article-btn {
    background: #0b5c9b;
    color: #fff;
}

.breadcrumb {
    margin: 3px 15px 0;
    color: #075aa5;
    font-size: 9px;
}

.content-grid {
    padding: 16px 22px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
}

.ranking {
    height: 35px;
    padding: 8px 0;
    border-top: 1px solid #999;
    border-bottom: 1px solid #ccc;
    font-size: 10px;
}

.ranking a {
    margin-right: 10px;
}

.news-section {
    margin-top: 15px;
}

.news-section h2 {
    padding: 0 0 8px;
    border-bottom: 2px solid #0056a3;
    font-size: 14px;
}

.top-news-content {
    padding-top: 15px;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 15px;
}

.fake-chart {
    height: 95px;
    position: relative;
    border: 1px solid #999;
    background:
        linear-gradient(to right, #ddd 1px, transparent 1px),
        linear-gradient(to bottom, #ddd 1px, transparent 1px);
    background-size: 25px 20px;
}

.fake-chart span {
    position: absolute;
    top: -18px;
    left: 45px;
    font-size: 8px;
    font-weight: bold;
}

.fake-chart svg {
    width: 100%;
    height: 100%;
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-list a {
    min-height: 26px;
    padding: 4px 0;
    border-bottom: 1px dotted #999;
    font-size: 10px;
}

.news-list a::after {
    content: "NEW";
    margin-left: 10px;
    padding: 1px 4px;
    background: red;
    color: #fff;
    font-size: 7px;
    font-weight: bold;
}

.flash-news {
    margin-top: 25px;
}

.section-heading {
    padding-bottom: 5px;
    border-bottom: 2px solid #0056a3;
    font-size: 14px;
    font-weight: bold;
}

.section-heading span {
    margin-left: 5px;
    color: #888;
    font-size: 9px;
    font-weight: normal;
}

.flash-row {
    padding: 9px 0;
    border-bottom: 1px dotted #aaa;
    font-size: 10px;
}

.flash-row b {
    margin-right: 12px;
    color: #00922e;
}

.side-chart-box {
    margin-top: 2px;
    text-align: center;
    font-size: 9px;
}

.side-chart {
    height: 90px;
    margin-top: 5px;
    border: 1px solid #aaa;
    background:
        linear-gradient(to right, #ddd 1px, transparent 1px),
        linear-gradient(to bottom, #ddd 1px, transparent 1px);
    background-size: 25px 18px;
}

.side-chart svg {
    width: 100%;
    height: 100%;
}

.notice-box {
    margin-top: 40px;
    padding: 12px;
    border: 1px solid #ccc;
}

.notice-box h3 {
    padding-bottom: 9px;
    border-bottom: 1px solid #222;
    font-size: 11px;
}

.notice-box p {
    margin-top: 12px;
    color: #075aa5;
    font-size: 9px;
    line-height: 1.6;
}

.new-label {
    padding: 1px 4px;
    background: red;
    color: #fff;
    font-weight: bold;
}

.vvip-stock-box {
    margin-top: 55px;
    padding: 0 25px;
}

.vvip-stock-box h2 {
    font-size: 24px;
    font-weight: 700;
}

.vvip-price-row {
    margin-top: 5px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}

#last-price {
    font-size: 46px;
    font-weight: 700;
    line-height: 1.1;
}

.vvip-change-box {
    color: #0da75c;
    font-size: 20px;
    font-weight: 700;
}

.vvip-subtext {
    margin-top: 5px;
    color: #666;
    font-size: 10px;
}

.vvip-subtext a {
    color: #666;
    text-decoration: underline;
}

.vvip-time-tabs {
    margin-top: 20px;
    display: flex;
    gap: 3px;
}

.tab-btn {
    width: 55px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background: #fff;
    color: #333;
    font-size: 10px;
    cursor: pointer;
}

.tab-btn.active {
    border-color: #5c00ff;
    background: #5c00ff;
    color: #fff;
}

.vvip-chart-container {
    width: 100%;
    height: 330px;
    margin-top: 20px;
    position: relative;
}

#myChart {
    width: 100% !important;
    height: 330px !important;
}

.vvip-data-table {
    width: 100%;
    margin-top: 25px;
    border-collapse: collapse;
    table-layout: fixed;
}

.vvip-data-table td {
    height: 42px;
    padding: 8px;
    border: 1px solid #aaa;
    font-size: 11px;
}

.vvip-data-table .lbl {
    width: 15%;
    background: #fafafa;
    color: #888;
}

.vvip-data-table .val {
    width: 35%;
    text-align: right;
    font-weight: bold;
}

.summary-section {
    padding: 65px 60px 0;
}

.vvip-summary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.vvip-summary-table th,
.vvip-summary-table td {
    height: 44px;
    padding: 8px;
    border: 1px solid #222;
    text-align: center;
}

.vvip-summary-table th {
    background: #fafafa;
    font-size: 12px;
}

.vvip-summary-table th:first-child {
    width: 36%;
}

.vvip-summary-table td {
    font-size: 13px;
}

.vvip-summary-number {
    font-size: 15px !important;
    font-weight: bold;
}

.vvip-history-container {
    margin-top: 55px;
    padding: 0 10px 25px;
}

.vvip-history-container h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.history-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.vvip-history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.vvip-history-table th,
.vvip-history-table td {
    height: 36px;
    padding: 7px;
    border: 1px solid #333;
    text-align: center;
    font-size: 11px;
}

.vvip-history-table th {
    background: #fafafa;
    font-weight: bold;
}

.site-footer {
    height: 38px;
    padding: 12px 15px;
    background: #050505;
    color: #fff;
    text-align: right;
    font-size: 10px;
}

@media (max-width: 800px) {
    .page-wrapper {
        max-width: 100%;
    }

    .market-ticker {
        overflow-x: auto;
    }

    .ticker-box {
        min-width: 140px;
    }

    .main-nav {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .main-nav a {
        min-width: 125px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .vvip-stock-box {
        padding: 0 15px;
    }

    #last-price {
        font-size: 38px;
    }

    .vvip-change-box {
        font-size: 16px;
    }

    .vvip-time-tabs {
        overflow-x: auto;
    }

    .tab-btn {
        min-width: 55px;
    }

    .summary-section {
        padding: 40px 15px 0;
        overflow-x: auto;
    }

    .vvip-summary-table {
        min-width: 600px;
    }

    .vvip-history-table {
        min-width: 650px;
    }
}

@media (max-width: 500px) {
    .header-links a:not(.premium-btn) {
        display: none;
    }

    .top-news-content {
        grid-template-columns: 1fr;
    }

    .mini-chart {
        display: none;
    }

    .vvip-price-row {
        flex-wrap: wrap;
        gap: 5px 12px;
    }

    #last-price {
        font-size: 34px;
    }

    .vvip-chart-container,
    #myChart {
        height: 260px !important;
    }

    .vvip-data-table td {
        padding: 6px 4px;
        font-size: 9px;
    }
}