@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ (復旧版)
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.2.1
*/

/* --------------------------------------------------
   📊 チャートを適切に表示するための高さ制御 (必須設定)
-------------------------------------------------- */
.chart-card {
    background-color: rgb(247 247 247 / 67%);
    border-radius: 0 0 10px 10px;
    padding: 15px;
    margin: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: auto;
    position: relative;
}

.chart-card2 {
    background-color: rgb(247 247 247 / 67%);
    border-radius: 0 0 10px 10px;
    padding: 15px;
    margin: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: auto;
    position: relative;
    height: 30vw;
}

/* グラフが非表示・潰れるバグを排除するためのコンテナ */
.canvas-container {
    position: relative;
    width: 100%;
    height: 380px; /* PCでの最適表示サイズ */
}

@media screen and (max-width: 480px) {
    .canvas-container {
        height: 260px; /* スマートフォンでの最適サイズ */
    }
    .chart-card2 {
        height: 80vw !important;
    }
    #totalScoreDisplay {
        font-size: 20px;
    }
}

/* --------------------------------------------------
   🎨 本来のデザインと色調の完全復元
-------------------------------------------------- */
.stock-title {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #d664a4;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title2 {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #58cab0;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title3 {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #f3bf3d;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title4 {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #a679e4;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title5 {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #f41364;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title6 {
    display: flex;
    width: auto;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #f41364;
    padding: 15px;
    margin: 50px auto 0;
}

.stock-title-n {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #648dd6;
    padding: 15px;
}

/* スライダー用 7段階カラー */
.yield-3   { background: #c1eec1; color: #333; }
.yield-35  { background: #a1f5a1; color: #333; }
.yield-4   { background: #80e880; color: #333; }
.yield-45  { background: #62d662; color: #333; }
.yield-5   { background: #48ce48; color: #333; }
.yield-55  { background: #4dbf4d; color: #fff; }
.yield-6   { background: #2da82d; color: #fff; }

/* --------------------------------------------------
   📊 その他の個別分析ページCSS
-------------------------------------------------- */
@media screen and (min-width: 800px){
    #radarChart{
        max-height: 600px;
    }
}

#stockTable th, #stockTable td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

@media screen and (max-width: 834px){
    #stockTable th, #stockTable td {
        font-size: 11px !important;
    }
}

.card-table {
    margin: 0 auto;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    width: 100%;
    overflow: auto;
    white-space: nowrap;
    margin-bottom: 50px;
}

#stockTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#stockTable th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#stockTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#stockTable a {
    color: #007bff;
    text-decoration: none;
}

#stockTable a:hover {
    text-decoration: underline;
}

/* head-card全体のスタイル */
.head-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(45deg, #7bbab9a1, #c4e0dc7a);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    width: auto;
    box-shadow: 0 4px 8px rgb(0 0 0 / 36%);
    font-weight: 700;
}

.stock-info {
    display: contents;
    justify-content: space-between;
    align-items: center;
    color: #000;
}

.stock-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.detail-card {
    background-color: rgb(247 247 247 / 67%);
    border-radius: 10px;
    padding: 10px;
    flex: 1;
    margin: 10px;
    color: #000;
    text-align: center;
    border-color: rgb(222 222 222);
}

.chart-title {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #59b9c6;
    padding: 5px 15px;
    margin: 0px auto;
}

.stats-cards {
    display: flex;
    justify-content: space-between;
    margin: 3px auto;
    width: auto;
}

.card {
    border-radius: 5px;
    padding: 5px;
    flex: 1;
    margin: 4px;
    text-align: center;
    color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgb(85 133 183 / 32%);
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
}

.stat-label {
    font-size: 14px;
    color: #666;
    background-color: rgb(241 242 244);
    border-radius: 10px;
}

.stats-cards2 {
    display: flex;
    justify-content: space-between;
    margin: 3px auto;
    width: auto;
}

.card2 {
    border-radius: 5px;
    padding: 5px;
    flex: 1;
    margin: 4px;
    text-align: center;
    color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: rgb(218 219 223 / 43%);
}

.stat-label2 {
    font-size: 14px;
    color: #666;
    background-color: rgb(241 242 244);
    border-radius: 10px;
}

.stock-item-lastupdate {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 5px;
    color: #000;
    font-weight: 100;
    max-width: fit-content;
    font-size: 12px;
}

.chart-title2 {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #be6fb3bf;
    padding: 5px 15px;
    margin: 0px auto;
    margin-top: 20px;
}

.chart-title3 {
     text-align: center;
     color: rgb(208 201 122);
     background-color: #0000004a;
     border-radius: 15px;
     font-size: 24px;
}

.chart-title4 {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #ffae00db;
    padding: 5px 15px;
    margin: 0px auto;
    margin-top: 20px;
}

.chart-title5 {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #7c2b9dbf;
    padding: 5px 15px;
    margin: 0px auto;
    margin-top: 20px;
}

.chart-title6 {
    display: flex;
    width: auto;
    position: relative;
    font-size: 20px;
    color: #ffffff;
    border-radius: 10px 10px 0px 0px;
    background-color: #2b4c9dbf;
    padding: 5px 15px;
    margin: 0px auto;
    margin-top: 20px;
}

#chart-container {
    justify-content: center;
    align-items: center;
    width: auto;
    margin-top: 40px;
    background: linear-gradient(135deg, #1a252d, #4e4376);
    margin: 40px 0 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 10px;
}

#radarChart {
    width: 80%;
    height: auto;
    max-height: 500px;
}

#totalScoreDisplay {
    text-align: center;
    font-weight: bold;
    color: rgb(208 201 122) !important;
    width: auto;
    margin: 10px 0 10px 0;
    border-radius: 10px;
    font-size: 20px;
    padding: 10px;
}

.totalgrade {
    font-size: 50px;
    background-color: #0000004a;
    padding: 2px 50px;
    border-radius: 50px;
}

/* --------------------------------------------------
   🕹️ RPG用スタイル・凡例
-------------------------------------------------- */
.game-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 10px 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.character-display {
    text-align: center;
    margin-bottom: 20px;
    background: radial-gradient(#b9b9b9, #ffffff);
    padding-top: 1rem;
}

.character-avatar {
    height: 512px;
    border-radius: 5%;
    object-fit: cover;
    background: #f0f0f0;
    margin: 0 auto 15px;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 1px solid #fff;
}

.character-name {
    font-family: monospace;
    background-color: #c6c6c6;
}

.job-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.job-card {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    flex: 1;
    margin: 0 5px;
}

.job-title {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.job-level {
    font-weight: bold;
    color: #4c7daf;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-dividend { background: linear-gradient(90deg, #2052b9, #63dde3); }
.progress-gain { background: linear-gradient(90deg, #b3439e, #e19fd5); }

/* スライダー凡例 */
.rarity-legend-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.rarity-legend {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    padding: 0 5px;
}

.rarity-tag-legend {
    font-size: 0.8em;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
}

.rarity-tag-legend.rarity-S { background-color: #dc3545; }
.rarity-tag-legend.rarity-A { background-color: #e83e8c; }
.rarity-tag-legend.rarity-B { background-color: #fd7e14; }
.rarity-tag-legend.rarity-C { background-color: #28a745; }
.rarity-tag-legend.rarity-D { background-color: #007bff; }
.rarity-tag-legend.rarity-E { background-color: #6f42c1; }
.rarity-tag-legend.rarity-F { background-color: #adb5bd; }

.rarity-legend .separator {
    font-size: 1.2em;
    font-weight: bold;
    color: #adb5bd;
    margin: 0 8px;
}

/* ==========================================================
   KABUSHIRA STOCK DISCOVERY SECTIONS
   5ショートコード共通UI
========================================================== */

:root {
    --ks-bg: #f8fafc;
    --ks-card: #ffffff;
    --ks-text: #0f172a;
    --ks-text-soft: #475569;
    --ks-muted: #94a3b8;
    --ks-border: #e2e8f0;
}

.ks-stock-section {
    --section-color: #2563eb;
    --section-soft: #eff6ff;
    margin: 52px 0;
    padding: 0;
}

.ks-theme-rose {
    --section-color: #db2777;
    --section-soft: #fdf2f8;
}

.ks-theme-green {
    --section-color: #059669;
    --section-soft: #ecfdf5;
}

.ks-theme-amber {
    --section-color: #d97706;
    --section-soft: #fffbeb;
}

.ks-theme-violet {
    --section-color: #7c3aed;
    --section-soft: #f5f3ff;
}

.ks-theme-blue {
    --section-color: #2563eb;
    --section-soft: #eff6ff;
}

/* ---------- Header ---------- */
.ks-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.ks-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.ks-section-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--section-color) 18%, transparent);
    border-radius: 14px;
    background: var(--section-soft);
    color: var(--section-color);
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}

.ks-section-heading-text {
    min-width: 0;
}

.ks-section-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.ks-section-title {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: var(--ks-text) !important;
    font-size: clamp(21px, 3vw, 27px) !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: -.025em;
}

.ks-section-title::before,
.ks-section-title::after {
    display: none !important;
    content: none !important;
}

.ks-section-sort {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.ks-section-description {
    margin: 6px 0 0 !important;
    max-width: 690px;
    color: var(--ks-text-soft);
    font-size: 13px;
    line-height: 1.75;
}

.ks-section-more,
.ks-section-more-mobile {
    text-decoration: none !important;
}

.ks-section-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 10px;
    color: var(--section-color) !important;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.ks-section-more:hover {
    background: var(--section-soft);
    transform: translateX(2px);
}

/* ---------- Grid ---------- */
.ks-stock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

/* ---------- Card ---------- */
.ks-stock-card {
    position: relative;
    min-width: 0;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--ks-border);
    border-radius: 18px;
    background: var(--ks-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .02), 0 5px 16px rgba(15, 23, 42, .035);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ks-stock-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--section-color);
    opacity: .88;
}

.ks-stock-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--section-color) 32%, #e2e8f0);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
}

.ks-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
}

.ks-card-rank {
    color: var(--section-color);
    font-size: 11px;
    font-weight: 800;
}

.ks-stock-code {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 3px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.ks-stock-name {
    margin: 0 0 15px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

.ks-stock-name::before,
.ks-stock-name::after {
    display: none !important;
    content: none !important;
}

.ks-stock-name a {
    color: var(--ks-text) !important;
    text-decoration: none !important;
}

.ks-stock-name a:hover {
    color: var(--section-color) !important;
}

.ks-stock-link-arrow {
    margin-left: 4px;
    color: var(--ks-muted);
    font-size: 12px;
}

/* ---------- Yield ---------- */
.ks-yield-area {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--section-color) 10%, #e2e8f0);
    border-radius: 13px;
    background: linear-gradient(135deg, var(--section-soft), #ffffff 80%);
}

.ks-yield-label {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.ks-yield-value {
    color: var(--ks-text);
    font-size: 29px;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}

.ks-yield-value span {
    margin-left: 2px;
    font-size: 15px;
    font-weight: 700;
}

.ks-yield-high { color: #dc2626; }
.ks-yield-mid { color: #d97706; }
.ks-yield-normal { color: var(--ks-text); }

/* ---------- Metrics ---------- */
.ks-card-metrics {
    margin: 0;
}

.ks-main-metric,
.ks-secondary-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin: 0;
    border-top: 1px solid #f1f5f9;
}

.ks-main-metric dt,
.ks-secondary-metric dt {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.ks-main-metric dd,
.ks-secondary-metric dd {
    margin: 0;
    text-align: right;
}

.ks-main-metric dd {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.ks-main-metric strong {
    color: var(--section-color);
    font-size: 15px;
    font-weight: 800;
}

.ks-main-metric small {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

.ks-secondary-metric dd {
    color: #334155;
    font-size: 13px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

/* ---------- Detail Link ---------- */
.ks-card-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 11px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease;
}

.ks-card-detail:hover {
    background: var(--section-soft);
    color: var(--section-color) !important;
}

/* ---------- Empty ---------- */
.ks-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 140px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
}

.ks-empty-icon {
    font-size: 22px;
}

.ks-section-more-mobile {
    display: none;
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
    .ks-stock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .ks-stock-section {
        margin: 42px 0;
    }

    .ks-section-header {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .ks-section-heading {
        gap: 11px;
    }

    .ks-section-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
        font-size: 18px;
    }

    .ks-section-title {
        font-size: 20px !important;
    }

    .ks-section-description {
        font-size: 12px;
        line-height: 1.65;
    }

    .ks-section-more {
        display: none;
    }

    .ks-stock-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 2px 22px 14px 2px;
        margin-right: -16px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .ks-stock-grid::-webkit-scrollbar {
        display: none;
    }

    .ks-stock-card {
        flex: 0 0 min(82vw, 315px);
        scroll-snap-align: start;
        padding: 16px;
    }

    .ks-yield-value {
        font-size: 27px;
    }

    .ks-section-more-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 5px;
        padding: 11px;
        border-radius: 10px;
        background: var(--section-soft);
        color: var(--section-color) !important;
        font-size: 12px;
        font-weight: 700;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ks-stock-card,
    .ks-section-more,
    .ks-card-detail {
        transition: none !important;
    }
}

