@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;
}

/* ===========================
   STOCK CARD GRID
=========================== */

.stock-card-container{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
    gap:20px;
    margin:30px 0;
}

/* ===========================
   CARD
=========================== */

.stock-card{
    position:relative;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    padding:20px;
    overflow:hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;

    box-shadow:
        0 4px 12px rgba(0,0,0,.04);

    display:flex;
    flex-direction:column;
    gap:12px;
}

.stock-card:hover{
    transform:translateY(-5px);

    box-shadow:
        0 15px 35px rgba(0,0,0,.12);

    border-color:#2563eb;
}

/* ===========================
   CODE
=========================== */

.stock-code{
    display:inline-flex;
    align-items:center;

    width:max-content;

    font-size:12px;
    font-weight:700;

    padding:5px 10px;

    border-radius:999px;

    background:#eff6ff;
    color:#2563eb;

    letter-spacing:.05em;
}

/* ===========================
   STOCK NAME
=========================== */

.stock-name{
    font-size:20px;
    font-weight:700;
    line-height:1.4;
}

.stock-name a{
    color:#111827;
    text-decoration:none;
}

.stock-name a:hover{
    color:#2563eb;
}

.stock-name .fa-external-link{
    margin-left:6px;
    font-size:12px;
}

/* ===========================
   VALUE AREA
=========================== */

.stock-value{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:12px 0;

    border-top:1px solid #f1f5f9;

    font-size:15px;
    font-weight:600;
}

.stock-label{
    color:#6b7280;
    font-weight:500;
}

/* ===========================
   DIVIDEND YIELD COLOR
=========================== */

.stock-value[class*="yield-"]{
    font-weight:700;
}

/* 5%以上 */

.yield-5{
    color:#dc2626;
}

/* 4.5%以上 */

.yield-45{
    color:#ea580c;
}

/* 4%以上 */

.yield-4{
    color:#d97706;
}

/* 3.5%以上 */

.yield-35{
    color:#0284c7;
}

/* 3%以上 */

.yield-3{
    color:#16a34a;
}

/* ===========================
   RANK BADGE
=========================== */

.stock-card:nth-child(1)::before,
.stock-card:nth-child(2)::before,
.stock-card:nth-child(3)::before{
    position:absolute;
    top:15px;
    right:15px;

    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    font-size:16px;
    font-weight:700;

    color:#fff;
}

.stock-card:nth-child(1)::before{
    content:"🥇";
}

.stock-card:nth-child(2)::before{
    content:"🥈";
}

.stock-card:nth-child(3)::before{
    content:"🥉";
}

/* ===========================
   CARD TOP BORDER
=========================== */

.stock-card::after{
    content:"";

    position:absolute;

    left:0;
    top:0;

    width:100%;
    height:4px;

    background:
    linear-gradient(
        90deg,
        #2563eb,
        #7c3aed
    );
}

/* ===========================
   MOBILE
=========================== */

@media(max-width:768px){

    .stock-card-container{
        grid-template-columns:1fr;
        gap:16px;
    }

    .stock-card{
        padding:16px;
    }

    .stock-name{
        font-size:18px;
    }

    .stock-value{
        font-size:14px;
    }
}