/* =============================================================
   SOS メインスタイルシート
   style.css — 整理版
============================================================= */


/* =====================
   基本レイアウト
===================== */

body {
    font-family: sans-serif;
    margin: 30px;
    background: #f5f7fa;
    color: #222;
}

h1 {
    margin-bottom: 10px;
}

h1 > span {
    display: inline-block;
    margin-left: 8px;
    margin-top: 0;
    font-size: 14px;
}

@media (min-width: 901px) {
    body {
        max-width: 1280px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        margin: 14px;
    }

    h1 {
        font-size: 28px;
    }
}


/* =====================
   共通ボックス
===================== */

.box {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .box {
        padding: 14px;
        border-radius: 12px;
        overflow: hidden;
    }
}

/* Manual page用カード */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.page-header p {
    margin: 0;
    color: #555;
    font-weight: 600;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    margin: 22px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.card h2 {
    margin-top: 0;
    font-size: 26px;
}

.card h3 {
    margin-top: 24px;
}

.card p,
.card li {
    line-height: 1.9;
    font-size: 16px;
}

.card ul,
.card ol {
    padding-left: 24px;
}

.card.warning {
    background: #fff7f7;
    border: 1px solid #ffd6d6;
}

@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .page-header,
    .card {
        padding: 22px;
        border-radius: 18px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .card h2 {
        font-size: 24px;
    }
}


/* =====================
   テーブル共通
===================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: right;
}

th {
    background: #f0f2f5;
}

th:first-child, td:first-child,
th:nth-child(2), td:nth-child(2),
.left {
    text-align: left;
}

@media (max-width: 768px) {
    table {
        font-size: 13px;
    }
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* =====================
   バッジ・ステータス
===================== */

.badge {
    display: inline-block;
    flex-shrink: 0;
    min-width: 72px;
    text-align: center;
    line-height: 1.3;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: bold;
    background: #eee;
}

.buy {
    background: #ffe2e2;
    color: #b00020;
}

.watch {
    background: #fff3cd;
    color: #7a5a00;
}

.skip {
    background: #e9ecef;
    color: #555;
}


/* =====================
   リンク
===================== */

.accent {
    color: #c62828;
    font-weight: bold;
}

.stock-link {
    color: #16a34a;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed #86efac;
    padding-bottom: 1px;
    transition: all .15s;
}
.stock-link::after {
    content: " \1F4CA";
    font-size: 0.85em;
    opacity: .7;
    margin-left: 2px;
}
.stock-link:hover {
    color: #15803d;
    border-bottom-color: #16a34a;
}

.back-link {
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    color: #d90000;
}

/* manual.phpのback-link */
.back-link a {
    display: inline-block;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
}

.data-link {
    display: inline-block;
    margin-left: 10px;
    color: #d90000;
    font-weight: 700;
    text-decoration: none;
}

.data-link:hover {
    text-decoration: underline;
}


/* =====================
   サマリーグリッド（chart.php）
===================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.summary-grid div {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 15px;
}

.summary-grid span {
    display: block;
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
}

.summary-grid strong {
    font-size: 24px;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.chart-wrap {
    height: 420px;
}

@media (max-width: 768px) {
    .chart-wrap {
        height: 320px;
    }
}


/* =====================
   ユーティリティ
===================== */

.hide-mobile {
    display: none; /* モバイルのみ */
}

.scroll-hint {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .scroll-hint {
        display: block;
        font-size: 12px;
        color: #777;
        margin: 6px 0 8px;
    }
}

.update-date {
    font-size: 14px;
    color: #666;
    margin: 10px 0 18px;
    font-weight: 600;
}

.intro-box {
    line-height: 1.7;
    font-size: 14px;
    color: #333;
}

.mini-summary {
    margin: 10px 0 0;
    color: #555;
    font-weight: 600;
}


/* =====================
   AIコメント
===================== */

.ai-comment {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    background: #f5f9ff;
    border-left: 4px solid #4da3ff;
    padding: 8px 10px;
    border-radius: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-label {
    display: inline-block;
    margin-right: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #dbeeff;
    color: #005bbb;
    font-weight: 700;
    font-size: 12px;
}

.ai-detail-box {
    margin: 16px 0 18px;
    padding: 16px 18px;
    background: #f5f9ff;
    border-left: 5px solid #4da3ff;
    border-radius: 12px;
}

.ai-detail-title {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dbeeff;
    color: #005bbb;
    font-weight: 700;
    font-size: 13px;
}

.ai-detail-box p {
    margin: 0;
    line-height: 1.7;
    color: #222;
}

@media (max-width: 600px) {
    .ai-comment {
        max-height: none;
        overflow: visible;
        -webkit-line-clamp: unset;
        display: block;
        font-size: 14px;
        line-height: 1.7;
    }

    .ai-label {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 4px;
    }
}


/* =====================
   サマリーボックス（index.php）
===================== */

.summary-box {
    background: #fff;
    border-radius: 20px;
    padding: 18px 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 16px;
}

.summary-stats span {
    background: #f7f8fc;
    border-radius: 999px;
    padding: 8px 14px;
}

.summary-stats strong {
    font-size: 20px;
    margin-left: 4px;
}

.summary-stats.summary-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.summary-stats.summary-stats-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f7f8fc;
    color: #222;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    box-sizing: border-box;
}

.summary-stats.summary-stats-grid span.highlight {
    background: #fde8ee;
    color: #c43d5a;
}

.summary-stats.summary-stats-grid strong {
    margin-left: 6px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 768px) {
    .summary-box {
        padding: 16px 18px;
        margin-bottom: 20px;
    }

    .summary-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .summary-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        font-size: 14px;
        gap: 10px;
    }

    .summary-stats span {
        display: block;
        border-radius: 14px;
        padding: 14px 10px;
        text-align: center;
    }

    .summary-stats strong {
        font-size: 17px;
        margin-left: 3px;
    }
}

.simulation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f8dfe5;
    color: #c43d5a;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
}

.simulation-link span {
    font-size: 18px;
    line-height: 1;
}

.simulation-link:hover {
    opacity: 0.9;
}


/* =====================
   フィルタータブ
===================== */

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-tabs button {
    border: none;
    background: #eee;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
}

.filter-tabs button.active {
    background: #d90000;
    color: #fff;
}

.data-summary {
    font-size: 14px;
    color: #555;
    margin: 8px 0 12px;
    line-height: 1.7;
}


/* =====================
   検索フォーム
===================== */

input,
select,
textarea,
button {
    font-size: 16px;
}

.search-form,
.price-search-form,
.filter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
    max-width: 100%;
    box-sizing: border-box;
}

.search-form input,
.price-search-form input,
.filter-form input {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

.search-form button,
.price-search-form button,
.filter-form button {
    border: none;
    background: #222;
    color: #fff;
    border-radius: 8px;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
}

.search-form a {
    color: #666;
    font-weight: 700;
    text-decoration: none;
    padding: 9px 0;
}

@media (max-width: 768px) {
    .search-form,
    .price-search-form,
    .filter-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .search-form button,
    .price-search-form button,
    .filter-form button {
        width: 100%;
    }

    .card,
    .box,
    .summary-box {
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
}

.pager {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    font-weight: 700;
}

.pager a {
    color: #d90000;
    text-decoration: none;
}


/* =====================
   買いプランフォーム
===================== */

.buy-plan-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0;
}

.buy-plan-form label {
    font-weight: 700;
}

.buy-plan-form input {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 180px;
    font-size: 16px;
}

.buy-plan-form button {
    border: none;
    background: #d90000;
    color: #fff;
    border-radius: 8px;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
}


/* =====================
   トップバー
===================== */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.top-button {
    display: inline-block;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 14px;
    white-space: nowrap;
}

.top-button:hover {
    background: #d90000;
}

@media (max-width: 768px) {
    .top-bar {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .top-button {
        font-size: 13px;
        padding: 8px 12px;
        margin-top: 4px;
    }
}

@media (max-width: 600px) {
    .top-bar h1 {
        width: 100%;
    }
}


/* =====================
   ロジックテーブル（logic.php）
===================== */

.logic-cards {
    display: none;
}

@media (max-width: 768px) {
    .logic-table {
        display: none;
    }

    .logic-cards {
        display: grid;
        gap: 10px;
        margin-top: 12px;
    }

    .logic-cards div {
        background: #f7f8fc;
        border-radius: 12px;
        padding: 12px 14px;
    }

    .logic-cards strong {
        display: block;
        font-size: 15px;
        margin-bottom: 6px;
    }

    .logic-cards span {
        display: inline-block;
        background: #ffe2e2;
        color: #b00020;
        font-weight: 700;
        border-radius: 999px;
        padding: 3px 9px;
        margin-bottom: 6px;
    }

    .logic-cards p {
        margin: 0;
        color: #555;
        line-height: 1.6;
        font-size: 14px;
    }
}


/* =====================
   バックテストグリッド（logic.php）
===================== */

.backtest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.backtest-item {
    background: #f7f8fc;
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
}

.backtest-item span {
    display: block;
    color: #555;
    font-size: 13px;
    margin-bottom: 6px;
}

.backtest-item strong {
    display: block;
    font-size: 22px;
}

@media (max-width: 768px) {
    .backtest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .backtest-item {
        padding: 12px 8px;
    }

    .backtest-item strong {
        font-size: 18px;
    }
}


/* =====================
   シグナルテーブル（signals.php / index.php）
===================== */

.signal-table {
    font-size: 14px;
}

.signal-table th,
.signal-table td {
    padding: 8px 7px;
}

.reason {
    min-width: 360px;
}

@media (max-width: 768px) {
    .signal-table {
        font-size: 13px;
    }

    .signal-table th,
    .signal-table td {
        font-size: 14px;
        padding: 10px 12px;
    }

    .signal-table td:nth-child(2),
    .signal-table th:nth-child(2) {
        min-width: 140px;
        width: 140px;
        white-space: normal;
    }

    .signal-table td:nth-child(1) {
        min-width: 70px;
    }

    .signal-table td.signal-stock-name {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.35;
        min-width: 120px;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .signal-table th,
    .signal-table td {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* 銘柄名折り返し（prices.php等） */
.table-wrap table td:nth-child(2),
.table-wrap table th:nth-child(2) {
    max-width: 160px;
    word-break: break-word;
    white-space: normal;
}


/* =====================
   シグナルカード（index.php）
===================== */

.signal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.signal-card {
    display: block;
    background: #f5f7fa;
    border-radius: 14px;
    padding: 16px;
    color: #222;
    text-decoration: none;
    border: 1px solid #e5e7eb;
}

.signal-card:hover {
    border-color: #d90000;
}

.signal-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.signal-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.signal-card-metrics span {
    background: #fff;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.signal-card p {
    margin: 0;
    line-height: 1.6;
    color: #444;
}

@media (max-width: 768px) {
    .signal-card {
        padding: 14px;
    }
}

.mobile-signal-cards {
    display: none;
}

.mobile-tp-sl {
    display: none;
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .mobile-tp-sl {
        display: block;
    }
}

.tp-sl {
    font-size: 12px;
    line-height: 1.4;
}

.login-cta {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.login-cta a {
    display: inline-block;
    margin-top: 5px;
    color: #d32f2f;
    font-weight: bold;
}


/* =====================
   ランクバッジ
===================== */

.rank-badge {
    display: inline-block;
    min-width: 36px;
    padding: 3px 7px;
    margin-right: 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}

.rank-1 {
    background: #d60000;
    color: #fff;
}

.rank-2 {
    background: #111827;
    color: #fff;
}

.rank-3 {
    background: #6b7280;
    color: #fff;
}

@media (max-width: 768px) {
    .rank-badge {
        min-width: 32px;
        padding: 3px 6px;
        margin-right: 5px;
        font-size: 11px;
    }
}


/* =====================
   共通ヘッダー
===================== */

.site-header {
    margin-bottom: 25px;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    color: #111;
    text-decoration: none;
    font-weight: 900;
    font-size: 46px;
    line-height: 1;
}

.site-logo > span {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 4px;
    font-weight: 800;
}

.site-logo .accent {
    color: #e60033;
}


/* ナビはheader.phpのスタイルで管理 */


    .top-bar {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 18px;
    }

    .top-bar h1 {
        margin-right: auto;
    }
}


/* =====================
   ステータスガイド（buy_plan.php）
===================== */

.status-guide {
    margin: 18px 0 22px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 14px;
}

.status-guide-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 10px;
}

.status-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.status-guide-item {
    padding: 12px;
    border-radius: 12px;
    background: #fff;
}

.status-guide-item p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
}

.status-guide-item.status-expire { background: #fff7d6; }
.status-guide-item.status-loss   { background: #ffe3df; }
.status-guide-item.status-profit { background: #e2f7df; }
.status-guide-item.status-hold   { background: #eef4ff; }

@media (max-width: 768px) {
    .status-guide {
        padding: 12px;
        margin: 12px 0 16px;
        border-radius: 12px;
    }

    .status-guide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .status-guide-item {
        padding: 9px 10px;
    }

    .status-guide-item .status-badge {
        margin-bottom: 6px;
    }

    .status-guide-item p {
        margin: 6px 0 0;
        font-size: 11px;
        line-height: 1.4;
    }
}


/* =====================
   ホールドサマリー（buy_plan.php / user_trades.php）
===================== */

.hold-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 16px 0 18px;
}

.hold-summary span {
    display: block;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    font-weight: 700;
}

.hold-summary strong {
    font-size: 22px;
    margin: 0 3px;
}

.hold-summary-detail {
    grid-template-columns: repeat(2, 1fr);
}

.hold-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
}

.hold-summary-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
}

.hold-summary-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.hold-summary-card.status-expire { background: #fff7d6; }
.hold-summary-card.status-loss   { background: #ffe3df; }
.hold-summary-card.status-profit { background: #e2f7df; }
.hold-summary-card.status-hold   { background: #eef4ff; }

@media (max-width: 768px) {
    .hold-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 12px 0 16px;
    }

    .hold-summary span {
        padding: 10px;
        font-size: 13px;
    }

    .hold-summary strong {
        font-size: 20px;
    }

    .hold-summary-card {
        display: block;
        padding: 12px;
    }

    .hold-summary-card strong {
        font-size: 14px;
        margin-top: 8px;
    }

    .hold-summary-card p {
        font-size: 11px;
    }
}


/* =====================
   ページ説明（buy_plan.php / user_trades.php / admin.php）
===================== */

.page-description {
    margin: 14px 0 18px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    line-height: 1.7;
}

.page-description strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.page-description p {
    margin: 4px 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .page-description {
        padding: 12px;
        margin: 12px 0 16px;
    }

    .page-description p {
        font-size: 13px;
    }
}


/* =====================
   バックテストカード（index.php）
===================== */

.bt-hero {
    padding: 0;
    margin: 30px 0;
}

.bt-card {
    position: relative;
    background: linear-gradient(135deg, #fff9d8, #fff2b8);
    border: 1px solid #f2d86b;
    border-radius: 22px;
    padding: 18px 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.bt-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 4px;
    line-height: 1.35;
}

.bt-title::before {
    content: "👑 最有力条件";
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 999px;
    margin-right: 8px;
    vertical-align: middle;
}

.bt-rule {
    font-size: 15px;
    font-weight: 800;
    color: #4b5563;
    margin: 8px 0 8px;
    line-height: 1.5;
    text-align: center;
}

.bt-main {
    text-align: center;
    margin: 4px 0 8px;
}

.bt-label-top {
    display: inline-block;
    width: fit-content;
    margin: 8px auto 6px;
    padding: 5px 16px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.bt-expect {
    font-size: clamp(46px, 12vw, 82px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    margin: 0 auto 2px;
}

.bt-expect.profit {
    color: #16a34a;
}

.bt-money {
    width: fit-content;
    max-width: 100%;
    margin: 6px auto 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    color: #15803d;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.bt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.bt-grid > div {
    background: rgba(255,255,255,.92);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 92px;
}

.bt-grid > div * {
    text-align: center;
}

.bt-grid strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #111827;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.bt-grid .down {
    color: #dc2626;
    font-weight: 900;
}

.bt-footer {
    margin-top: 6px;
    text-align: right;
    font-size: 11px;
    color: #6b7280;
    opacity: 0.7;
}

.bt-card .data-summary {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
}

@media (max-width: 480px) {
    .bt-card {
        padding: 18px 14px;
    }

    .bt-title {
        font-size: 20px;
    }

    .bt-title::before {
        display: block;
        width: fit-content;
        margin: 0 0 10px;
    }

    .bt-expect {
        font-size: 48px;
    }

    .bt-grid {
        gap: 8px;
    }

    .bt-grid > div {
        padding: 10px 9px;
        min-height: 84px;
    }

    .bt-grid strong {
        font-size: 20px;
    }
}


/* =====================
   共通フッター
===================== */

.site-footer {
    margin: 48px auto 0;
    padding: 28px 18px 34px;
    background: #111827;
    color: #ffffff;
    border-radius: 28px 28px 0 0;
}

.site-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.site-footer-logo {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

.site-footer-name {
    font-size: 13px;
    font-weight: 800;
    color: #e5e7eb;
    margin-top: 4px;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin: 20px 0 16px;
}

.site-footer-links a {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.site-footer-links a:hover {
    color: #ffffff;
}

.site-footer-note {
    max-width: 720px;
    margin: 0 auto 12px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.7;
}

.site-footer-copy {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}


/* =====================
   buy_plan.php 専用テーブル
===================== */

@media (max-width: 768px) {
    .plan-table {
        font-size: 13px;
    }

    .plan-table th,
    .plan-table td {
        padding: 9px 10px;
    }

    .plan-table th:first-child,
    .plan-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: inherit;
    }

    .plan-table th:first-child {
        background: #f0f2f5;
    }

    .plan-table td:nth-child(4) {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .status-badge {
        min-width: 34px;
        text-align: center;
    }
}


/* =====================
   user_trades.php ステータス色
===================== */

.trade-row-sub .status-profit { color: #16a34a; font-weight: 700; }
.trade-row-sub .status-loss   { color: #dc2626; font-weight: 700; }
.trade-row-sub .status-expire { color: #d97706; font-weight: 700; }
.trade-row-sub .status-hold   { color: #6b7280; font-weight: 700; }