/* PC用の上部余白調整（広告被り対策） */
@media (min-width: 768px) {
    .tcp-custom-wrapper { margin-top: 30px !important; padding-top: 15px !important; }
    .tcp-th-tsum { width: 45%; }
    .tcp-th-rate { width: 30%; }
    .tcp-th-eff  { width: 25%; }
    .tcp-sl-badge-wrap { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 4px !important; }
}

/* スマホ用（ツム名非表示など） */
@media (max-width: 767px) {
    /* 広告と被らないようにmargin-topを確保 */
    .tcp-custom-wrapper { margin-top: 15px !important; padding-top: 10px !important; }
    .tcp-tsum-name-text { display: none !important; }
    
    /* テーブルの列幅調整 */
    .tcp-th-tsum { width: 33% !important; }
    .tcp-th-rate { width: 35% !important; }
    .tcp-th-eff  { width: 32% !important; }
    
    /* アイコンの縮小 (はみ出し対策) */
    .tcp-custom-wrapper .tsum-icon { width: 1.8em; height: 1.8em; margin-right: 4px; }
    .tcp-custom-wrapper .tsum-icon-lg { width: 2.5em; height: 2.5em; margin-right: 4px; }

    /* バッジとSLを縦に並べる */
    .tcp-sl-badge-wrap { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: center !important; gap: 2px !important; margin-top: 0 !important; }
}

.tcp-custom-wrapper { font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; color: #333; line-height: 1.6; max-width: 800px; margin: 0 auto; background: #f9f9f9; padding: 15px; border-radius: 12px; }
.tcp-custom-wrapper .tsumk-wrap { display: flex; flex-direction: column; gap: 20px; }
.tcp-custom-wrapper .tsumk-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.tcp-custom-wrapper .tsumk-card-title { font-size: 1.25rem; font-weight: bold; margin-top: 0; margin-bottom: 16px; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; color: #111; }
.tcp-custom-wrapper .tsumk-profile-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tcp-custom-wrapper .tsumk-row { display: flex; flex-direction: column; }
.tcp-custom-wrapper .tsumk-row label { font-size: 0.85rem; font-weight: bold; color: #666; margin-bottom: 4px; }
.tcp-custom-wrapper .tsumk-row input, .tcp-custom-wrapper .tsumk-row select, .tcp-custom-wrapper textarea { padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; background: #fff; box-sizing: border-box; }
.tcp-custom-wrapper .tsumk-row input:focus, .tcp-custom-wrapper .tsumk-row select:focus, .tcp-custom-wrapper textarea:focus { outline: none; border-color: #007cba; box-shadow: 0 0 0 2px rgba(0,124,186,0.2); }
.tcp-custom-wrapper .tsumk-btn { background: #eee; color: #333; border: none; padding: 12px 20px; border-radius: 8px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: all 0.2s; text-align: center; display: inline-block; box-sizing: border-box; }
.tcp-custom-wrapper .tsumk-btn:hover { background: #e0e0e0; transform: translateY(-1px); }
.tcp-custom-wrapper .tsumk-btn.primary { background: #007cba; color: #fff; box-shadow: 0 4px 10px rgba(0,124,186,0.3); }
.tcp-custom-wrapper .tsumk-btn.primary:hover { background: #006ba1; }
.tcp-custom-wrapper .tsumk-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.tcp-custom-wrapper .tsumk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.tcp-custom-wrapper .tsumk-kv-label { font-size: 0.85rem; color: #888; text-transform: uppercase; font-weight: bold; }
.tcp-custom-wrapper .tsumk-kv { font-size: 1.4rem; font-weight: bold; color: #111; }
.tcp-custom-wrapper .tsumk-val.pos { color: #007cba; }
.tcp-custom-wrapper .tsumk-val.neg { color: #dc3545; }
.tcp-custom-wrapper .tsumk-scroll { overflow-x: auto; overflow-y: auto; max-height: 480px; -webkit-overflow-scrolling: touch; border-radius: 8px; border: 1px solid #eee; }
.tcp-custom-wrapper .tcp-sub-scroll { max-height: 250px; overflow-y: auto; border-left: 4px solid #007cba; }
.tcp-custom-wrapper .tsumk-table { width: 100%; border-collapse: collapse; min-width: 300px; text-align: center; table-layout: fixed; }
.tcp-custom-wrapper .tsumk-table th, .tcp-custom-wrapper .tsumk-table td { padding: 12px 10px; border-bottom: 1px solid #eee; word-wrap: break-word; }
.tcp-custom-wrapper .tsumk-table th { background: #fdfdfd; font-weight: bold; color: #555; font-size: 0.85rem; }
.tcp-custom-wrapper .tsumk-btn-sm { padding: 4px 8px; font-size: 0.8rem; border-radius: 4px; }
.tcp-custom-wrapper .chip { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; border: 1px solid #ddd; }

/* 共通：画像のマイナスマージンを削除して高さを揃える */
.tcp-custom-wrapper .tsum-icon { width: 2em; height: 2em; border-radius: 50%; object-fit: cover; margin-right: 8px; vertical-align: baseline; margin-top: 0; }
.tcp-custom-wrapper .tsum-icon-lg { width: 3.5em; height: 3.5em; border-radius: 50%; object-fit: cover; margin-right: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); flex-shrink: 0; }

.tcp-custom-wrapper details > summary { list-style: none !important; cursor: pointer; position: relative; }
.tcp-custom-wrapper details > summary::-webkit-details-marker { display: none !important; }
.tcp-custom-wrapper .tcp-accordion-summary::before, 
.tcp-custom-wrapper .tcp-accordion-summary::after { display: none !important; content: "" !important; background: none !important; width: 0 !important; height: 0 !important; }

/* サジェスト（プルダウン）内のアイテム調整 */
.tcp-custom-wrapper .tcp-suggest-list { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #007cba; border-radius: 8px; max-height: 260px; overflow-y: auto; z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: none; margin: 4px 0 0 0; padding: 0; list-style: none; }
.tcp-custom-wrapper .tcp-suggest-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 1rem; display: flex; align-items: center; line-height: 1; }
.tcp-custom-wrapper .tcp-suggest-item .tsum-icon { margin-top: 0; vertical-align: baseline; }
.tcp-custom-wrapper .tcp-suggest-item:hover { background: #f0f7ff; color: #007cba; }

.tcp-custom-wrapper .tcp-item-card { background: transparent; perspective: 1000px; cursor: pointer; }
.tcp-custom-wrapper .tcp-item-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; }
.tcp-custom-wrapper .tcp-item-card.active .tcp-item-card-inner { transform: rotateY(180deg); }
.tcp-custom-wrapper .tcp-item-front, .tcp-custom-wrapper .tcp-item-back { position: absolute; top: 0; left: 0; width: 100%; height: 100%; backface-visibility: hidden; box-sizing: border-box; }
.tcp-custom-wrapper .tcp-item-back { transform: rotateY(180deg); }
.tcp-custom-wrapper .tcp-item-desc::-webkit-scrollbar { width: 4px; }
.tcp-custom-wrapper .tcp-item-desc::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
.tcp-custom-wrapper .tcp-item-back .tcp-item-desc::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); }

.tcp-modal-overlay { font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 100000; display: none; justify-content: center; align-items: center; padding: 15px; box-sizing: border-box; }
.tcp-modal-content { background: #fff; width: 100%; max-width: 500px; max-height: 90vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.tcp-modal-header { padding: 15px; background: #f0f7ff; border-bottom: 1px solid #cce5ff; display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 1.1rem; color: #0056b3; }
.tcp-modal-body { padding: 15px; overflow-y: auto; flex: 1; background: #fafafa; }
.tcp-modal-close { cursor: pointer; color: #999; font-size: 1.5rem; line-height: 1; border: none; background: transparent; }
.tcp-modal-close:hover { color: #d11; }
.tcp-comment-box { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 10px; margin-bottom: 10px; position: relative; }
.tcp-comment-reply { margin-left: 20px; border-left: 3px solid #007cba; background: #f9f9f9; }
.tcp-comment-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: #666; margin-bottom: 5px; }
.tcp-comment-actions { margin-top: 8px; display: flex; justify-content: flex-end; gap: 10px; }
.tcp-like-btn { background: transparent; border: 1px solid #ccc; border-radius: 20px; padding: 2px 10px; font-size: 0.8rem; cursor: pointer; color: #666; display: flex; align-items: center; gap: 5px; }
.tcp-like-btn.liked { background: #ffebee; border-color: #ffc107; color: #d32f2f; font-weight: bold; }
.tcp-reply-btn { background: transparent; border: none; color: #007cba; cursor: pointer; font-size: 0.8rem; text-decoration: underline; }