.cc-main { display:flex; flex-direction:column; max-width:1200px; gap:16px; }
.cc-main [hidden] { display:none!important; }
.cc-heading h1 { margin:0; color:var(--ink); font-size:32px; line-height:1.2; letter-spacing:-.8px; }
.cc-heading p { margin:8px 0 0; font-size:14px; color:var(--muted); }
.cc-main button,.cc-main input,.cc-main select { font:inherit; }
.cc-main button { min-height:44px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); padding:9px 14px; cursor:pointer; font-size:13px; line-height:1.3; }
.cc-main button:hover { border-color:var(--accent-text); color:var(--accent-text); }
.cc-main button:disabled { opacity:.5; cursor:default; }
.cc-main :focus-visible { outline:2px solid var(--accent-text); outline-offset:3px; }
.cc-main input[type="checkbox"] { accent-color:var(--accent-text); width:17px; height:17px; flex-shrink:0; margin:0; }
.cc-form { min-width:0; }
.cc-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px 20px; margin-bottom:20px; }
.cc-target { display:flex; flex-direction:column; gap:7px; font-size:12px; color:var(--muted); min-width:0; }
.cc-target-control { position:relative; display:block; min-width:0; }
.cc-target select { display:block; appearance:none; -webkit-appearance:none; min-height:46px; width:100%; min-width:0; padding:10px 40px 10px 12px; color:var(--ink); background:var(--panel); border:1px solid var(--border); border-radius:8px; font-size:14px; }
.cc-target-control > svg { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.cc-bonus { display:flex; gap:9px; align-items:center; min-height:46px; font-size:13px; }
.cc-bonus:has(input:disabled) { color:var(--muted); }
.cc-bonus small { font:inherit; }
.cc-main .cc-primary { min-height:46px; margin-left:auto; padding:11px 20px; background:var(--accent-text); color:var(--panel); border-color:var(--accent-text); font-weight:600; }
.cc-main .cc-primary:hover { background:var(--accent-hover); color:var(--panel); }
.cc-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; align-items:start; gap:20px; }
.cc-slots { grid-column:1; grid-row:1; display:flex; flex-direction:column; gap:10px; min-width:0; }
.cc-slot { display:grid; grid-template-columns:48px minmax(0,1fr); gap:2px 12px; padding:10px 14px; border:1px solid var(--border); border-radius:10px; background:var(--panel); min-width:0; }
.cc-slot-image { display:flex; justify-content:center; align-items:center; grid-row:1 / 3; width:48px; height:48px; background:var(--bg-soft); border:1px dashed var(--border); border-radius:8px; color:var(--muted); font:400 22px var(--font-mono); }
.cc-slot.is-filled .cc-slot-image { background:var(--well); border-style:solid; }
.cc-slot-image a { display:flex; width:100%; height:100%; align-items:center; justify-content:center; }
.cc-slot-image img { display:block; width:100%; height:100%; object-fit:contain; padding:4px; }
.cc-slot-body { grid-column:2; position:relative; min-width:0; }
.cc-slot-heading .cc-item-name { flex:1; min-width:0; }
.cc-main .cc-edit { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; border:1px solid color-mix(in srgb,var(--accent-text) 35%,var(--border)); padding:8px 12px; border-radius:7px; background:var(--bg-soft); color:var(--ink); text-align:left; }
.cc-main .cc-edit:hover,.cc-main .cc-edit[aria-expanded="true"] { border-color:var(--accent-text); background:var(--accent-tint); color:var(--accent-text); }
.cc-edit-label { flex-shrink:0; color:var(--accent-text); font-size:12px; }
.cc-edit svg { flex-shrink:0; color:var(--accent-text); }
.cc-edit[aria-expanded="true"] svg { transform:rotate(180deg); }
.cc-slot-footer { grid-column:2; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 12px; min-width:0; }
.cc-item-name { margin:0; font-size:14px; font-weight:600; color:var(--ink); line-height:1.4; overflow-wrap:anywhere; }
.cc-picker { position:relative; min-width:0; }
.cc-search { width:100%; min-width:0; min-height:44px; padding:9px 11px; border:1px solid var(--border); border-radius:7px; background:var(--panel); color:var(--ink); font-size:14px!important; }
.cc-search::placeholder { color:var(--muted); }
.cc-search[aria-expanded="true"] { border-color:var(--accent-text); }
.cc-options { position:absolute; top:calc(100% + 5px); left:0; right:0; z-index:25; min-height:44px; max-height:360px; overflow-y:auto; overscroll-behavior:contain; background:var(--panel); border:1px solid var(--border); border-radius:9px; box-shadow:0 8px 30px #0002; padding:6px; font-size:13px; }
.cc-picker.is-above .cc-options { top:auto; bottom:calc(100% + 5px); }
.cc-slot.is-filled .cc-picker { position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:30; display:flex; flex-direction:column; gap:6px; padding:8px; border:1px solid var(--border); border-radius:9px; background:var(--panel); box-shadow:0 8px 30px #0002; }
.cc-slot.is-filled .cc-picker.is-above { top:auto; bottom:calc(100% + 6px); }
.cc-slot.is-filled .cc-search { flex-shrink:0; }
.cc-slot.is-filled .cc-options { position:static; flex:0 1 auto; border:0; border-radius:4px; padding:0; box-shadow:none; }
.cc-main .cc-option { display:flex; align-items:center; gap:10px; width:100%; padding:8px; border:0; border-radius:5px; text-align:left; }
.cc-main .cc-option:hover,.cc-main .cc-option.is-active { background:var(--accent-tint); color:var(--ink); }
.cc-option img,.cc-option-image { flex-shrink:0; width:40px; height:40px; object-fit:contain; background:var(--well); border-radius:4px; }
.cc-option-image { display:flex; align-items:center; justify-content:center; color:var(--muted); }
.cc-option-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.cc-option-copy strong { font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.cc-option-copy > span { font-size:11px; color:var(--muted); }
.cc-search-empty { padding:12px; color:var(--muted); }
.cc-item-stats { display:flex; flex-wrap:wrap; gap:6px 16px; margin:0; }
.cc-item-stats div { display:flex; flex-direction:column; gap:2px; }
.cc-item-stats dt { color:var(--muted); font-size:11px; }
.cc-item-stats dd { margin:0; font:500 13px var(--font-mono); color:var(--ink); }
.cc-reason { grid-column:1 / -1; margin:4px 0 0; font-size:12px; color:var(--danger); line-height:1.45; overflow-wrap:anywhere; }
.cc-slot-controls { display:flex; align-items:center; flex-wrap:wrap; column-gap:10px; }
.cc-slot-controls label { display:flex; align-items:center; gap:7px; min-height:44px; font-size:12px; color:var(--muted); cursor:pointer; }
.cc-slot-controls label:has(input:checked) { color:var(--accent-text); }
.cc-slot-controls label:has(input:disabled) { opacity:.45; cursor:default; }
.cc-slot-controls button { border:0; padding:0; min-width:44px; font-size:23px; color:var(--muted); }
.cc-slot-actions { position:relative; margin-left:auto; }
.cc-slot-actions > summary { display:flex; align-items:center; justify-content:center; width:44px; height:44px; list-style:none; cursor:pointer; border-radius:6px; font-size:23px; color:var(--muted); }
.cc-slot-actions > summary::-webkit-details-marker { display:none; }
.cc-slot-actions > summary:hover { color:var(--accent-text); background:var(--accent-tint); }
.cc-slot-actions[open] { z-index:26; }
.cc-slot-menu { position:absolute; right:0; top:100%; width:230px; max-width:calc(100vw - 32px); padding:5px; background:var(--panel); border:1px solid var(--border); border-radius:8px; box-shadow:0 6px 20px #0002; }
.cc-slot-controls .cc-slot-menu button { width:100%; padding:10px; font-size:13px; text-align:left; white-space:normal; }
.cc-slot-controls .cc-slot-menu button:hover { background:var(--accent-tint); }
.cc-sidebar { grid-column:2; grid-row:1; display:flex; flex-direction:column; min-width:0; border:1px solid var(--border); border-radius:10px; background:var(--panel); position:sticky; top:16px; max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; }
.cc-summary { flex-shrink:0; min-width:0; padding:16px; }
.cc-summary dl { margin:0; }
.cc-summary dl > div { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:10px; }
.cc-summary dt { color:var(--muted); font-size:12px; }
.cc-summary dd { margin:0; color:var(--ink); font:500 18px var(--font-mono); white-space:nowrap; }
.cc-summary .cc-main-total { gap:8px; margin-bottom:12px; }
.cc-summary .cc-main-total dd { font-size:26px; letter-spacing:-.6px; }
.cc-progress { height:5px; background:var(--bg-soft); border-radius:8px; overflow:hidden; }
.cc-progress span { display:block; height:100%; background:var(--accent-text); border-radius:8px; }
.cc-outcome { display:flex; align-items:baseline; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; margin-top:9px; }
.cc-threshold { margin:0; font-size:12px; color:var(--muted); }
.cc-threshold.is-reached { color:var(--success-text); }
.cc-duration { margin:0; color:var(--muted); font:500 13px var(--font-mono); }
.cc-result { margin:10px 0; font-size:12px; line-height:1.5; color:var(--muted); }
.cc-result.is-invalid,.cc-result.is-error,.cc-result.is-infeasible,.cc-network { color:var(--danger); }
.cc-result.is-pending { color:var(--accent-text); }
.cc-network { font-size:12px; line-height:1.5; }
.cc-timing { flex-shrink:0; min-width:0; margin:0 16px 16px; padding-top:16px; border-top:1px solid var(--border); }
.cc-timing table { width:100%; border-collapse:collapse; color:var(--ink); font-family:inherit; font-size:13px; line-height:20px; font-variant-numeric:tabular-nums; }
.cc-timing caption { padding:0 0 10px; text-align:left; color:var(--ink); font-size:14px; font-weight:600; }
.cc-timing th,.cc-timing td { padding:5px 0; text-align:left; border-bottom:1px solid var(--border); }
.cc-timing thead th { padding:0 0 8px; color:var(--muted); font-size:12px; font-weight:500; }
.cc-timing thead th:last-child,.cc-timing tbody td { text-align:right; }
.cc-timing tbody th { font-weight:400; }
.cc-timing tbody td { padding-left:12px; white-space:nowrap; }
.cc-timing .cc-timing-quest > * { padding-bottom:4px; border-bottom:0; }
.cc-timing .cc-timing-note td { padding:4px 0 0; border:0; text-align:left; color:var(--muted); font-size:12px; line-height:1.5; white-space:normal; }
.cc-excluded { margin-top:8px; border-top:1px solid var(--border); font-size:12px; color:var(--muted); }
.cc-excluded > summary { min-height:44px; align-content:center; color:var(--ink); cursor:pointer; }
.cc-excluded ul { list-style:none; margin:0; padding:0; max-height:240px; overflow-y:auto; }
.cc-excluded li { display:flex; align-items:center; gap:8px; justify-content:space-between; border-top:1px solid var(--border); }
.cc-excluded-name { min-width:0; overflow-wrap:anywhere; }
.cc-excluded-name a { color:var(--text); text-decoration:none; }
.cc-excluded-name a:hover { color:var(--accent-text); }
.cc-excluded button,.cc-exclusion-notice button { flex-shrink:0; padding:7px 0; border:0; color:var(--accent-text); font-size:12px; }
.cc-exclusion-notice { margin-top:8px; font-size:12px; color:var(--text); overflow-wrap:anywhere; }
.cc-exclusion-notice button { margin-left:4px; }
.cc-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media(max-width:1050px) {
  .cc-slot-footer { grid-column:1 / -1; }
  .cc-slot-image { grid-row:1; }
}
@media(max-width:850px) {
  .cc-layout { grid-template-columns:minmax(0,1fr) 275px; gap:14px; }
  .cc-summary { padding:14px; }
  .cc-timing { margin:0 14px 14px; padding-top:14px; }
  .cc-slot { padding:10px 12px; }
  .cc-toolbar { gap:10px 15px; }
}
@media(max-width:680px) {
  .cc-heading h1 { font-size:27px; }
  .cc-layout { grid-template-columns:minmax(0,1fr); gap:12px; }
  .cc-sidebar { display:contents; }
  .cc-summary { grid-column:1; grid-row:1; position:sticky; top:8px; z-index:10; padding:12px 16px; border:1px solid var(--border); border-radius:10px; background:var(--panel); max-height:calc(100dvh - 16px); overflow-y:auto; overscroll-behavior:contain; }
  .cc-timing { grid-column:1; grid-row:3; margin:0; padding:16px; border:1px solid var(--border); border-radius:10px; background:var(--panel); }
  .cc-main:has(.cc-search:focus) .cc-summary { position:static; }
  .cc-slots { grid-column:1; grid-row:2; }
  .cc-summary .cc-main-total { margin-bottom:7px; }
  .cc-summary .cc-main-total dd { font-size:25px; }
  .cc-summary dd { font-size:16px; }
  .cc-outcome { margin-top:7px; }
  .cc-toolbar { display:grid; grid-template-columns:minmax(0,1fr); margin-bottom:12px; gap:8px; }
  .cc-main .cc-primary { margin:0; width:100%; }
  .cc-target select { font-size:13px; }
  .cc-bonus { min-height:44px; }
  .cc-slot-footer { gap:4px 10px; }
  .cc-search { font-size:16px!important; }
  .cc-slot-controls { width:100%; justify-content:space-between; column-gap:6px; }
  .cc-slot-controls label { font-size:12px; gap:5px; }
  .cc-slot-actions { margin-left:auto; }
  .cc-item-stats { justify-content:space-between; width:100%; gap:6px 12px; }
  .cc-item-stats div { flex-direction:row; flex-wrap:wrap; align-items:baseline; gap:4px; }
  .cc-item-stats dt { font-size:11px; }
  .cc-options { left:-60px; }
}
