* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #fff;
    color: #333;
    font-family: Arial, "Noto Sans JP", sans-serif;
    font-size: 12px;
}

.top-line {
    height: 3px;
    background: #f4dddd;
}

.site-header {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.top-mini {
    height: 43px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0 20px;
    color: #6b7280;
    font-size: 11px;
}

.top-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-links button {
    border: 0;
    background: #f97316;
    color: #fff;
    padding: 6px 17px;
    border-radius: 3px;
    font-size: 11px;
}

.header-main {
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.brand-icon {
    font-size: 34px;
}

.brand-name {
    font-size: 28px;
    font-weight: 700;
    color: #101827;
    line-height: 1;
}

.brand-en {
    margin-top: 7px;
    letter-spacing: 4px;
    color: #7890a6;
    font-size: 10px;
}

.market-boxes {
    display: flex;
    align-items: stretch;
}

.market-box {
    width: 150px;
    border-right: 1px solid #e4e7eb;
}

.market-box:last-child {
    border-right: 0;
}

.market-title {
    background: #68788c;
    color: #fff;
    height: 26px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 700;
}

.market-title span {
    float: right;
    color: #f6d663;
    font-size: 9px;
}

.market-value {
    display: inline-block;
    padding: 13px 0 0 9px;
    font-size: 14px;
    font-weight: 700;
    color: #263142;
}

.market-change {
    float: right;
    padding: 11px 8px 0 0;
    text-align: right;
    font-size: 9px;
    font-weight: 700;
}

.blue {
    color: #2563eb;
}

.red {
    color: #ef4444;
}

.main-nav {
    height: 50px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    background: #111827;
    padding-left: 20px;
}

.main-nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #d7dfeb;
    text-decoration: none;
    border-right: 1px solid #080d16;
    background: #1e293b;
    font-size: 11px;
    cursor: pointer;
}

.main-nav a.active {
    background: #fff;
    color: #111827;
    border-top: 3px solid #2c415d;
}

.search-bar {
    min-height: 92px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 15px 22px;
}

.search-bar input {
    width: 300px;
    height: 42px;
    border: 1px solid #d9dee6;
    border-radius: 4px;
    padding: 0 14px;
    color: #8a94a4;
    background: #fff;
}

.search-bar button {
    height: 42px;
    border: 1px solid #d9dee6;
    background: #fff;
    border-radius: 4px;
    color: #556274;
    font-size: 11px;
}

.search-bar .stock-search {
    color: #ef3340;
    border-color: #f2d9dc;
}

.search-bar .article-button {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    padding: 0 13px;
}

.search-links {
    margin-left: auto;
    color: #1764ba;
    white-space: nowrap;
    font-size: 10px;
}

.page-container {
    max-width: 1180px;
    margin: 80px auto 0;
}

.stock-card {
    border: 1px solid #cfcfcf;
    padding: 20px;
}

.dax-main-content {
    width: 100%;
}

.dax-header-row {
    margin-bottom: 8px;
}

.dax-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.dax-price-info {
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.dax-current-price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.dax-current-price {
    color: #ef4444;
    font-size: 38px;
    line-height: 1.1;
    font-weight: 700;
}

.dax-change-data {
    color: #ef4444;
    font-size: 14px;
}

.dax-data-status {
    margin-top: 8px;
    color: #777;
    font-size: 10px;
}

.dax-data-status span {
    color: #4a4a4a;
    text-decoration: underline;
}

.dax-chart-wrapper {
    margin-top: 12px;
}

.dax-chart-controls {
    display: flex;
    margin-bottom: 17px;
}

.dax-chart-controls button {
    min-width: 36px;
    height: 30px;
    background: #fff;
    border: 1px solid #bbb;
    border-right: 0;
    font-size: 11px;
    color: #444;
}

.dax-chart-controls button:last-child {
    border-right: 1px solid #bbb;
}

.dax-chart-controls .time-active {
    color: #fff;
    background: #1683f8;
    border-color: #1683f8;
}

.dax-chart-area {
    position: relative;
    width: 100%;
    height: 400px;
    border-bottom: 1px solid #bbb;
}

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

.dax-info-table-bottom {
    margin-top: 14px;
    border-top: 1px solid #ddd;
}

.dax-info-row {
    display: grid;
    grid-template-columns: 150px 1fr 150px 160px;
    min-height: 39px;
    align-items: center;
    border-bottom: 1px solid #e2e2e2;
    color: #666;
}

.dax-info-value,
.dax-info-value-right {
    color: #24354d;
    font-weight: 600;
}

.dax-info-value-right {
    text-align: right;
}

.dax-info-label-right {
    text-align: left;
}

.dax-custom-table-wrapper {
    display: grid;
    grid-template-columns: 1.55fr 1fr 1.55fr 1fr 1.55fr;
    margin-top: 16px;
    border-top: 1px solid #111;
    border-left: 1px solid #111;
}

.dax-custom-cell {
    min-height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #272727;
    color: #fff;
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    font-size: 12px;
}

.dax-custom-label {
    background: #353535;
}

.dax-session-label {
    font-weight: 700;
}

.dax-custom-value {
    font-size: 15px;
    font-weight: 700;
}

.dax-bottom-data-row {
    text-align: right;
    color: #999;
    font-size: 9px;
    padding-top: 11px;
}

.below-content {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 20px;
    padding: 18px 15px 0;
}

.ranking {
    border-bottom: 1px solid #ccc;
    padding-bottom: 13px;
    font-size: 10px;
}

.ranking a {
    color: #1260b3;
    text-decoration: underline;
    margin-left: 7px;
}

.news-block {
    margin-top: 23px;
}

.news-block h3 {
    font-size: 13px;
    margin: 0;
    border-bottom: 2px solid #1260b3;
    padding-bottom: 7px;
}

.news-content {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 35px;
    padding-top: 18px;
}

.news-image {
    height: 110px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: #555;
    padding-top: 6px;
}

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

.news-list a,
.flash-list a {
    color: #075aa9;
    text-decoration: underline;
    padding: 7px 0;
    border-bottom: 1px dotted #bbb;
    font-size: 11px;
}

.flash {
    margin-top: 35px;
}

.flash h3 small {
    color: #888;
    font-weight: 400;
    margin-left: 10px;
}

.flash-content {
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 18px;
    padding-top: 20px;
}

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

.flash-list b {
    color: #198b28;
    margin-right: 10px;
}

.small-chart {
    border: 1px solid #ccc;
    height: 110px;
    text-align: center;
    padding-top: 5px;
}

.right-sidebar {
    padding-top: 2px;
}

.side-chart > div:first-child {
    font-weight: 700;
    margin-bottom: 8px;
}

.side-image {
    width: 165px;
    height: 110px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
}

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

.notice-box h3 {
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #333;
    font-size: 12px;
}

.notice-box a {
    display: block;
    color: #075aa9;
    text-decoration: underline;
    border-bottom: 1px dotted #aaa;
    padding: 6px 0;
    line-height: 1.5;
}

.history-section {
    margin-top: 40px;
}

.history-table-container h2 {
    font-size: 27px;
    color: #263142;
    margin: 0 0 22px;
}

#loading-status {
    text-align: center;
    margin: 20px;
    font-weight: 700;
    display: none;
}

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

.history-table th {
    background: #353535;
    color: #fff;
    border: 1px solid #aaa;
    padding: 13px 7px;
    text-align: center;
    font-weight: 400;
}

.history-table thead tr:nth-child(2) th {
    background: #555;
}

.history-table td {
    border: 1px solid #c2c2c2;
    padding: 11px 7px;
    text-align: center;
    background: #fff;
}

.history-table tbody tr:nth-child(even) td {
    background: #f5f5f5;
}

.history-table .result-value {
    font-weight: 700;
    font-size: 13px;
}

.history-table th:first-child {
    width: 185px;
}

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

@media (max-width: 900px) {
    .site-header,
    .page-container {
        width: 100%;
    }

    .page-container {
        margin-top: 30px;
        padding: 0 10px;
    }

    .header-main {
        display: block;
    }

    .market-boxes {
        margin-top: 20px;
        overflow-x: auto;
    }

    .main-nav {
        overflow-x: auto;
        display: flex;
        padding-left: 0;
    }

    .main-nav a {
        min-width: 130px;
        height: 50px;
    }

    .search-links {
        display: none;
    }

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

    .right-sidebar {
        display: none;
    }

    .dax-info-row {
        grid-template-columns: 90px 1fr 100px 120px;
    }

    .history-table {
        min-width: 900px;
    }
}

@media (max-width: 600px) {
    .top-mini {
        display: none;
    }

    .header-main {
        min-height: auto;
        padding: 15px;
    }

    .brand-name {
        font-size: 23px;
    }

    .search-bar {
        overflow-x: auto;
    }

    .search-bar input {
        min-width: 230px;
    }

    .stock-card {
        padding: 12px;
    }

    .dax-current-price {
        font-size: 30px;
    }

    .dax-chart-area {
        height: 330px;
    }

    #myChart {
        height: 270px !important;
    }

    .dax-info-row {
        grid-template-columns: 80px 1fr;
        padding: 7px 0;
    }

    .dax-info-label-right,
    .dax-info-value-right {
        margin-top: 5px;
        text-align: left;
    }

    .dax-custom-table-wrapper {
        grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    }

    .dax-custom-cell {
        font-size: 10px;
        min-height: 40px;
    }

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

    .news-image,
    .small-chart {
        display: none;
    }
}