/* Companion Style (Orange Theme + New UI) */
.cp-wrap { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px){ .cp-wrap{ grid-template-columns: 1fr; } }

.cp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.cp-card:last-child { margin-bottom: 0; }
.cp-title { font-size: 18px; font-weight: 800; margin: 0 0 12px 0; color: #1e293b; }
.cp-subtitle { font-size: 14px; font-weight: 700; color: #64748b; margin-bottom: 8px; }

.cp-right { display: flex; flex-direction: column; }

.cp-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.cp-tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #cbd5e1; background: #fff; font-weight: 700; cursor: pointer; color: #64748b; }
.cp-tab.is-active { background: #ff7811; color: #fff; border-color: transparent; }

.cp-field { margin-bottom: 12px; }
.cp-label { font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.cp-input, .cp-select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; box-sizing: border-box; font-size: 14px; }
.cp-select.small { height: 32px; padding: 0 8px; font-size: 12px; border-radius: 8px; }

.cp-muted { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.cp-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.cp-btn { width: 100%; padding: 12px; border-radius: 12px; font-weight: 800; border: none; cursor: pointer; font-size: 15px; transition: opacity 0.2s; }
.cp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cp-btn.primary { background: #ff7811; color: #fff; }
.cp-btn.primary:hover { background: #f97316; }
.cp-btn.warn { background: #fee2e2; color: #ef4444; }
.cp-btn.share { background: #10b981; color: #fff; }

.cp-msg { margin-top: 10px; padding: 10px; border-radius: 8px; background: #f1f5f9; font-size: 13px; color: #64748b; text-align: center; }

/* Stats */
.cp-row { display: flex; gap: 16px; }
.cp-col { flex: 1; min-width: 0; }
@media (max-width: 600px){ .cp-row{ flex-direction: column; gap: 12px; } }

.cp-stat-box { background: #f8fafc; border-radius: 10px; padding: 10px; border: 1px solid #e2e8f0; }
.cp-stat-box .row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.cp-stat-box .l { color: #64748b; font-weight: 600; }
.cp-stat-box .v { color: #0f172a; font-weight: 800; }

.cp-list-box { margin: 0; padding: 0; list-style: none; height: 200px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 8px; }
.cp-list-box li { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #f1f5f9; font-size: 13px; }
.cp-list-box li:last-child { border-bottom: none; }

.cp-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cp-inv-box { height: 280px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 8px; font-size: 13px; }

.cp-log-card { flex: 1; display: flex; flex-direction: column; min-height: 200px; }
.cp-log { flex: 1; overflow-y: auto; background: #f8fafc; border-radius: 10px; padding: 12px; font-size: 12px; line-height: 1.6; max-height: 400px; border: 1px solid #e2e8f0; color: #64748b; white-space: pre-wrap; }

/* [New] Radio Button Group */
.cp-radio-group { display: flex; gap: 8px; }
.cp-radio-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    transition: all 0.2s;
}
.cp-radio-btn input { display: none; }
.cp-radio-btn.is-active {
    background: #fff7ed;
    border-color: #ff7811;
    color: #c2410c;
}

/* Checkbox Grid */
.cp-checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-opt { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: pointer; transition: all 0.2s; user-select: none; }
.sim-opt input { display: none; }
.sim-opt .sim-name { font-size: 12px; font-weight: 700; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-opt.is-checked { background: #fff7ed; border-color: #ff7811; color: #c2410c; }
.sim-opt.is-checked img { filter: brightness(1.05); }

/* Rarity Borders */
[data-rarity] { border-width: 2px !important; border-style: solid !important; box-sizing: border-box; }
[data-rarity="normal"] { border-color: #9ca3af !important; }
[data-rarity="rare"] { border-color: #3b82f6 !important; }
[data-rarity="epic"] { border-color: #a855f7 !important; }
[data-rarity="unique"] { border-color: #f59e0b !important; }
[data-rarity="legendary"] { border-color: #84cc16 !important; }