/* =============================================================================
   LoomPilot wave 2 · Capsule Composer (site/capsule.html). Prefix: cc-
   A merchandiser's war room: a brief console, a curved brass rail on a boutique
   wall, a margin view and a dispatch line. Works in both modes, 360–1440 px.
   ============================================================================= */
html, html[data-mode="wholesale"] { --cc-cost: rgba(243, 234, 216, .42); --cc-glass: rgba(255, 255, 255, .035); }
html[data-mode="retail"] { --cc-cost: rgba(29, 31, 39, .3); --cc-glass: rgba(255, 255, 255, .5); }
.cc-mono { font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace; letter-spacing: 0; }
.cc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------- page head */
.cc-head .ph-grid { position: relative; }
.cc-head .ph-grid::before { content: "संग्रह" / ""; position: absolute; right: clamp(0px, 2vw, 30px); top: -18px; font: 400 clamp(5rem, 13vw, 11rem)/1 var(--f-deva); color: var(--accent); opacity: .07; pointer-events: none; z-index: -1; }

/* ---------------------------------------------------------------- retail note */
.cc-retail { padding: 22px 0 0; }
.cc-ret-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: 22px; border: 1px dashed var(--accent); background: var(--accent-soft); }
.cc-ret-ico { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 24px; }
.cc-ret-copy { flex: 1 1 320px; min-width: 0; }
.cc-ret-copy h2 { font-size: 1.55rem; margin: 0 0 4px; }
.cc-ret-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.cc-ret-acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- brief console */
.cc-brief-sec { padding: clamp(26px, 4vw, 46px) 0 clamp(34px, 5vw, 60px); }
.cc-console { position: relative; isolation: isolate; border: 1px solid var(--line2); border-radius: 28px; padding: clamp(16px, 3vw, 32px); background: linear-gradient(160deg, var(--bg3) -20%, var(--bg2) 38%, var(--bg) 100%); box-shadow: var(--shadow); overflow: hidden; }
.cc-console::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px); background-size: 30px 30px; -webkit-mask: radial-gradient(90% 80% at 70% 0%, #000, transparent 75%); mask: radial-gradient(90% 80% at 70% 0%, #000, transparent 75%); }
.cc-console::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brass); opacity: .85; }
.cc-console-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.cc-console-head p { margin: 0; }
.cc-ch { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.cc-ch .deva-inline { font-size: .8em; color: var(--accent); opacity: .8; }
.cc-led { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ccLed 2.4s ease-out infinite; }
@keyframes ccLed { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

.cc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "budget sizes" "store season" "story story"; gap: 14px; }
.cc-mod-budget { grid-area: budget; } .cc-mod-sizes { grid-area: sizes; } .cc-mod-store { grid-area: store; } .cc-mod-season { grid-area: season; } .cc-mod-story { grid-area: story; }
.cc-mod { position: relative; margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px 18px; background: var(--cc-glass); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cc-mh { float: left; width: 100%; padding: 0; margin: 0 0 12px; display: flex; align-items: baseline; gap: 9px; font: 500 1.15rem/1.2 var(--f-display); color: var(--text); }
.cc-mh + * { clear: both; }
.cc-mh span { font: 800 11px var(--f-ui); letter-spacing: .12em; color: var(--accent); }
.cc-mh small { font: 500 12px var(--f-ui); color: var(--muted); }

/* budget */
.cc-bud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-bud-big { flex: 1; min-width: 0; text-align: center; font: 500 clamp(2.3rem, 5vw, 3.6rem)/1.05 var(--f-display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; font-variation-settings: "opsz" 144; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-step { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font-size: 17px; cursor: pointer; transition: border-color .2s, color .2s, transform .2s; }
.cc-step:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cc-step:active:not(:disabled) { transform: scale(.94); }
.cc-step:disabled { opacity: .3; cursor: default; }
.cc-range-wrap { position: relative; margin: 14px 0 30px; }
.cc-ticks span { position: absolute; top: 32px; transform: translateX(-50%); font: 700 10.5px var(--f-ui); color: var(--muted); white-space: nowrap; }
.cc-ticks span:first-child { transform: translateX(-35%); }
.cc-ticks span:last-child { transform: translateX(-70%); }
.cc-ticks span::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 5px; background: var(--line2); }
.cc-est { margin: 0; font-size: 13px; color: var(--muted); }
.cc-est b { color: var(--text); }
.cc-est i { color: var(--accent); margin-right: 3px; }
.cc-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.cc-quick .lab { margin-right: 4px; }

/* range (budget + sell-through) */
input.cc-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; box-shadow: none; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; display: block; }
input.cc-range:focus { box-shadow: none; outline: none; }
input.cc-range::-webkit-slider-runnable-track { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line2) var(--p, 50%)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
input.cc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--brass); border: 2px solid #8a6420; box-shadow: 0 4px 12px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .6); cursor: grab; }
input.cc-range::-moz-range-track { height: 8px; border-radius: 6px; background: var(--line2); }
input.cc-range::-moz-range-progress { height: 8px; border-radius: 6px; background: var(--accent); }
input.cc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brass); border: 2px solid #8a6420; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
input.cc-range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--accent); outline-offset: 3px; }
input.cc-range:focus-visible::-moz-range-thumb { outline: 3px solid var(--accent); outline-offset: 3px; }

/* tiles */
.cc-tiles { display: grid; gap: 8px; }
.cc-tiles-store { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cc-tiles-season { grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); }
.cc-tiles-story { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cc-tile { position: relative; display: block; cursor: pointer; min-width: 0; }
.cc-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.cc-tile-in { position: relative; display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 13px; border-radius: 15px; border: 1px solid var(--line2); background: var(--bg); transition: border-color .25s, background-color .25s, box-shadow .3s, transform .3s var(--ease); }
.cc-tile:hover .cc-tile-in { border-color: var(--accent); transform: translateY(-2px); }
.cc-tile-in > i { font-size: 20px; line-height: 1; color: var(--accent); margin-bottom: 4px; }
.cc-tile-in b { font: 600 15px/1.2 var(--f-display); }
.cc-tile-in small { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.cc-tile input:checked + .cc-tile-in { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent), 0 14px 28px -18px var(--accent); }
.cc-tile input:checked + .cc-tile-in::after { content: "\2713"; position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 11px/1 var(--f-ui); }
.cc-tile input:focus-visible + .cc-tile-in { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc-tile.thak .cc-tile-in { animation: ccThak .34s ease-out; }
@keyframes ccThak { 40% { transform: scale(.955); } }
.cc-pal { display: flex; margin-bottom: 6px; }
.cc-pal i { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .45), transparent 45%), var(--c); margin-left: -7px; border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .4s var(--ease); }
.cc-pal i:first-child { margin-left: 0; }
.cc-tile:hover .cc-pal i, .cc-tile input:checked + .cc-tile-in .cc-pal i { transform: translateX(calc(var(--i) * 3px)); }

/* size curve */
.cc-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cc-curve { position: relative; height: 178px; }
.cc-curve-svg { position: absolute; left: 0; right: 0; top: 26px; bottom: 22px; width: 100%; height: calc(100% - 48px); overflow: visible; z-index: 2; pointer-events: none; }
.cc-curve-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 5 4; opacity: .75; vector-effect: non-scaling-stroke; }
.cc-curve-area { fill: var(--accent); opacity: .08; }
.cc-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.cc-bar { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 4px; }
.cc-bar-v { height: 26px; font: 600 17px/26px var(--f-display); font-variant-numeric: tabular-nums; }
.cc-bar.zero .cc-bar-v { color: var(--muted); opacity: .6; }
.cc-bar-t { position: relative; flex: 1; width: 100%; max-width: 48px; border-radius: 11px 11px 5px 5px; border: 1px solid var(--line2); background: repeating-linear-gradient(0deg, transparent 0 calc(100% / 6 - 1px), var(--line) calc(100% / 6 - 1px) calc(100% / 6)), var(--bg); cursor: ns-resize; touch-action: none; overflow: hidden; outline-offset: 2px; }
.cc-bar-t:hover, .cc-bar-t.drag { border-color: var(--accent); }
.cc-bar-f { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent)); transition: height .28s var(--ease); }
.cc-bar-t.drag .cc-bar-f { transition-duration: .08s; }
.cc-bar-f::before { content: ""; position: absolute; inset: 0; background-color: rgba(0, 0, 0, .16); -webkit-mask: var(--bp) 50% 100% / 18px 18px repeat; mask: var(--bp) 50% 100% / 18px 18px repeat; }
.cc-bar-f::after { content: ""; position: absolute; left: 50%; top: 3px; width: 56%; height: 4px; transform: translateX(-50%); border-radius: 3px; background: rgba(255, 250, 230, .85); }
.cc-bar.plus .cc-bar-f { background: linear-gradient(180deg, #c2453a, color-mix(in srgb, #c2453a 45%, transparent)); }
.cc-bar.plus .cc-bar-s { color: #e0776d; }
.cc-bar-s { height: 22px; font: 800 11px/22px var(--f-ui); letter-spacing: .08em; color: var(--muted); }
.cc-curve-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; margin-top: 6px; }
.cc-curve-foot .toggle { margin: 6px 0; font-size: 13.5px; }
.cc-pps { margin: 0; font-size: 13px; color: var(--muted); }
.cc-pps b { color: var(--text); font: 600 16px var(--f-display); }

/* compose */
.cc-go { display: flex; align-items: center; justify-content: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-top: 18px; }
.cc-go-note { margin: 0; font-size: 13px; color: var(--muted); max-width: 52ch; }
.cc-compose { font-size: 17px; padding: 1.05em 1.9em; overflow: hidden; isolation: isolate; }
.cc-compose i { font-size: 1.1em; }
.cc-thread { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) 0 0 / 220% 100% no-repeat; background-position: 160% 0; }
.cc-compose:hover .cc-thread, .cc-compose.cc-weaving .cc-thread, .cc-compose.cc-dirty .cc-thread { animation: ccSheen 1.3s var(--ease) infinite; }
@keyframes ccSheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.cc-compose.cc-dirty { animation: ccPulse 1.8s ease-out infinite; }
@keyframes ccPulse { 0% { box-shadow: 0 12px 30px -12px var(--accent), 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 12px 30px -12px var(--accent), 0 0 0 14px transparent; } }
.cc-compose.cc-weaving { transform: scale(.97); }

/* ---------------------------------------------------------------- wall section */
.cc-wall-sec { padding: clamp(26px, 4vw, 50px) 0 clamp(30px, 4vw, 48px); scroll-margin-top: 70px; outline: none; }
.cc-wall-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 28px; align-items: end; margin-bottom: 18px; }
.cc-wall-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin: 0 0 10px; letter-spacing: -.03em; }
.cc-brief-chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); font: 700 12px/1.3 var(--f-ui); }
.cc-chip.cc-mono { font-weight: 600; font-size: 11.5px; }
.cc-log { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: color-mix(in srgb, var(--bg) 60%, transparent); font: 600 12px/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.cc-log:empty { display: none; }
.cc-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cc-log li { display: flex; gap: 8px; color: var(--muted); opacity: 0; transform: translateY(5px); transition: opacity .35s, transform .35s var(--ease); }
.cc-log li.on { opacity: 1; transform: none; }
.cc-log li:last-child { color: var(--text); }
.cc-tick { flex: none; color: var(--accent); }

.cc-meter-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 28px; margin-bottom: 20px; }
.cc-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.cc-meter-top b { font: 600 1.15rem var(--f-display); }
.cc-pct { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 800 11px var(--f-ui); }
.cc-meter-bar { position: relative; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.cc-meter-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--brass); transition: width 1s var(--ease); }
.cc-meter-bar i.over { background: var(--bad); }
.cc-warn { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.cc-warn:empty { display: none; }
.cc-warn .bi-exclamation-triangle { color: var(--bad); }
.cc-warn .bi-info-circle { color: var(--accent); }
.cc-mixbar { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.cc-mixbar i { min-width: 4px; transition: flex .7s var(--ease); }
.cc-mixleg { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.cc-mixleg span { display: inline-flex; align-items: center; gap: 5px; }
.cc-mixleg i { width: 9px; height: 9px; border-radius: 50%; }
.cc-mixmeta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.cc-mixmeta i { color: var(--accent); }

/* the boutique wall + curved brass rail */
.cc-wall { position: relative; overflow: hidden; padding: 30px 0 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    background: radial-gradient(22% 60% at 18% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), radial-gradient(26% 70% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%), radial-gradient(22% 60% at 82% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--bg2), var(--bg) 92%); }
.cc-wall::before { content: ""; position: absolute; inset: 0; background-color: var(--text); opacity: .035; -webkit-mask: var(--jaal) 0 0 / 120px 120px repeat; mask: var(--jaal) 0 0 / 120px 120px repeat; pointer-events: none; }
.cc-wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(180deg, transparent, color-mix(in srgb, #000 16%, var(--bg))); pointer-events: none; }
.cc-wall-in { position: relative; z-index: 1; }
.cc-row { position: relative; margin-bottom: 30px; }
.cc-row:last-child { margin-bottom: 0; }
.cc-rail { position: absolute; left: 0; top: 0; width: 100%; height: 60px; overflow: visible; pointer-events: none; z-index: 1; }
.cc-row-in { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-start; gap: var(--gap, 18px); }
.cc-hang { position: relative; flex: none; width: var(--slot, 180px); display: flex; flex-direction: column; align-items: center; padding-top: var(--hy, 14px); }
.cc-fig { position: relative; width: 100%; height: calc(var(--slot, 180px) * 1.4); display: flex; justify-content: center; }
.cc-swing { width: calc(var(--f, .86) * 100%); transform-origin: 50% 3%; transition: width .7s var(--ease); will-change: transform; }
.cc-g { display: block; }
.cc-g svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .42)); transition: transform .5s var(--ease); }
.cc-fig:hover .cc-g svg { transform: translateY(-4px) scale(1.02); }
.cc-lockb { position: absolute; top: 12%; right: calc((1 - var(--f, .86)) * 50% + 6%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brass); color: #3a2a08; font-size: 13px; box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .6); transform: scale(0) rotate(-30deg); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); z-index: 3; }
.cc-hang.locked .cc-lockb { transform: none; }
.cc-glint { position: absolute; left: 50%; top: 0; width: 46px; height: 46px; margin-left: -23px; margin-top: -14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 246, 210, .95), rgba(246, 220, 142, .45) 45%, transparent); opacity: 0; transform: scale(.3); pointer-events: none; z-index: 3; }
.cc-hang.landed .cc-glint { animation: ccGlint .75s ease-out; }
@keyframes ccGlint { 20% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.6); } }
.cc-hang.cc-drop { animation: ccDrop 1s cubic-bezier(.22, 1.3, .42, 1) both; animation-delay: var(--d, 0ms); }
@keyframes ccDrop { 0% { opacity: 0; transform: translateY(-170px) rotate(-4deg); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.cc-hang.cc-lift { transition: transform .32s var(--ease), opacity .32s; transform: translateY(-60px) scale(.94); opacity: 0; pointer-events: none; }

/* hang tag */
.cc-tag { position: relative; width: 100%; margin-top: 4px; padding: 11px 11px 10px; border-radius: 10px; background: var(--paper); color: var(--paper-ink); font-size: 12px; line-height: 1.35; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6); transition: box-shadow .3s; }
.cc-tag::before { content: ""; position: absolute; left: 50%; top: -12px; width: 1px; height: 14px; background: color-mix(in srgb, var(--paper) 60%, transparent); }
.cc-hang.locked .cc-tag { box-shadow: 0 0 0 2px #d9a21b, 0 12px 26px -10px rgba(217, 162, 27, .55); }
.cc-tag-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cc-tag-top b { font: 800 11px var(--f-ui); letter-spacing: .1em; color: var(--madder); }
.cc-tag h3 { font: 600 15px/1.15 var(--f-display); margin: 4px 0 4px; letter-spacing: -.01em; }
.cc-tag h3 a { text-decoration: none; }
.cc-tag h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.cc-cw { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 11px; color: #6a6156; min-width: 0; }
.cc-cw span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-why { margin: 0 0 6px; font-size: 10.5px; font-style: italic; color: #7a6f60; }
.cc-nums { margin: 0; display: grid; gap: 3px; padding-top: 6px; border-top: 1px dashed rgba(0, 0, 0, .14); }
.cc-nums div { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.cc-nums dt { font: 800 9.5px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #7a6f60; }
.cc-nums dd { margin: 0; text-align: right; font-size: 11px; color: #4a443c; }
.cc-nums dd b { font: 600 14.5px var(--f-display); color: var(--paper-ink); font-variant-numeric: tabular-nums; }
.cc-nums dd small { display: block; font-size: 10px; color: #7a6f60; }
.cc-ratio { margin: 5px 0 0; font-size: 10px; color: #7a6f60; }
.cc-share { margin-top: 6px; }
.cc-share i { position: relative; display: block; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.cc-share i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--s, 0%); border-radius: 2px; background: linear-gradient(90deg, #a8322a, #d9a21b); transition: width .8s var(--ease); }
.cc-share span { display: block; margin-top: 3px; font: 700 10px var(--f-ui); color: #7a6f60; }
.cc-acts { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(0, 0, 0, .14); }
.cc-act { flex: 1; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(0, 0, 0, .16); background: transparent; color: var(--paper-ink); font-size: 14px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.cc-act:hover:not(:disabled) { background: rgba(0, 0, 0, .06); }
.cc-act[data-act="remove"]:hover:not(:disabled) { color: #a8322a; border-color: #a8322a; }
.cc-act[aria-pressed="true"] { background: #d9a21b; border-color: #a77a10; color: #2a1d02; }
.cc-act:disabled { opacity: .3; cursor: not-allowed; }
.cc-act:focus-visible { outline: 2px solid var(--madder); outline-offset: 2px; }

/* empty / ghost */
.cc-ghost .cc-fig svg { width: calc(var(--f, .86) * 100%); height: auto; color: var(--line2); animation: ccFloat 4s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s); }
@keyframes ccFloat { 50% { transform: rotate(1.5deg); } }
.cc-empty { position: relative; z-index: 2; margin-top: -40px; padding: 0 20px; text-align: center; color: var(--muted); }
.cc-empty i { font-size: 24px; color: var(--accent); }
.cc-empty p { margin: 6px 0 0; }
.cc-empty b { color: var(--text); font: 500 1.25rem var(--f-display); }

/* summary strip + actions */
.cc-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); overflow: hidden; }
.cc-strip > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-right: 1px solid var(--line); }
.cc-strip > div:last-child { border-right: 0; }
.cc-strip b { font: 500 1.45rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-strip small { font-size: 11.5px; color: var(--muted); }
.cc-strip .lab small { font: inherit; letter-spacing: 0; text-transform: none; }
.cc-strip-disp { background: var(--accent-soft); }
.cc-strip-disp b { color: var(--accent); white-space: normal; font-size: 1.3rem; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.cc-actions .btn.cc-done { background: var(--ok); color: #fff; box-shadow: none; }

/* ---------------------------------------------------------------- numbers: margin + dispatch */
.cc-numbers { padding-top: clamp(10px, 2vw, 24px); }
.cc-num-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cc-margin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.cc-margin-head .h3 { margin-bottom: 10px; }
.cc-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px dashed var(--accent); color: var(--accent); font: 800 11px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.cc-margin-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: center; margin-top: 6px; }
.cc-donut-wrap { position: relative; width: 220px; max-width: 100%; aspect-ratio: 1; }
.cc-donut { width: 100%; height: 100%; display: block; transform: rotate(0deg); animation: ccDonut 1.1s var(--ease) both; }
@keyframes ccDonut { from { opacity: 0; transform: rotate(-110deg) scale(.82); } }
.cc-seg { transition: stroke .3s; }
.cc-donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 40px; }
.cc-donut-c b { font: 500 1.75rem/1.1 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cc-donut-c b.neg { color: var(--bad); }
.cc-donut-c small { font-size: 12px; color: var(--muted); }
.cc-mstats { margin: 0; display: grid; }
.cc-mstats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.cc-mstats div:last-child { border-bottom: 0; }
.cc-mstats dt { font-size: 13.5px; color: var(--muted); }
.cc-mstats dd { margin: 0; font: 600 1.12rem var(--f-display); font-variant-numeric: tabular-nums; text-align: right; }
.cc-mstats dd small { font: 700 12px var(--f-ui); color: var(--muted); margin-left: 4px; }
.cc-mstats .hi dd { color: var(--accent); }
.cc-st { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.cc-st-lab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 700 13px var(--f-ui); margin-bottom: 6px; }
.cc-st-lab output { font: 500 1.8rem/1 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cc-ribbon { display: flex; gap: 2px; height: 30px; margin: 12px 0 4px; border-radius: 8px; overflow: hidden; }
.cc-rb { min-width: 0; display: flex; align-items: center; padding: 0 9px; transition: flex .45s var(--ease); }
.cc-rb em { font: 800 10.5px var(--f-ui); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-rb.full { background: var(--accent); color: var(--accent-ink); }
.cc-rb.md { background: var(--madder); color: #fff; }
.cc-rb.unsold { background: repeating-linear-gradient(45deg, var(--line2) 0 3px, transparent 3px 8px); color: var(--muted); }
.cc-st .toggle { margin: 12px 0 4px; }
.cc-be { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.cc-be b { color: var(--text); }
.cc-be > i { color: var(--accent); margin-right: 3px; }
.cc-leg { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; font-size: 12px; }
.cc-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cc-leg i.hatch { background: repeating-linear-gradient(45deg, var(--line2) 0 2px, transparent 2px 4px); border: 1px solid var(--line2); }
.cc-disc { margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.cc-disc i { color: var(--accent); }
.cc-disp .h3 small { font-size: 13px; }
.cc-disp .gantt .g-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.cc-disp-note { margin: 14px 0 0; }

/* ---------------------------------------------------------------- print: the capsule sheet */
.cc-sheet { display: none; }
.cc-sheet-p { font-size: 11.5px; margin: 12px 0 0; }
@media print {
    body[data-page="capsule"] main > :not(#ccSheet) { display: none !important; }
    body[data-page="capsule"] .cc-sheet { display: block !important; color: #1d1f27; }
    .cc-sheet-g svg { width: 38px; height: auto; display: block; }
    .cc-sheet-tbl td { vertical-align: middle; }
    .cc-sheet h2 { color: #1d1f27; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .cc-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cc-strip > div { border-bottom: 1px solid var(--line); }
    .cc-strip > div:nth-child(4n) { border-right: 0; }
    .cc-strip-disp { grid-column: span 2; }
}
@media (max-width: 1020px) {
    .cc-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "budget" "store" "season" "story" "sizes"; }
    .cc-wall-head, .cc-meter-row, .cc-num-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .cc-margin-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }
    .cc-mstats { width: 100%; }
    .cc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-strip > div:nth-child(4n) { border-right: 1px solid var(--line); }
    .cc-strip > div:nth-child(2n) { border-right: 0; }
    .cc-strip b { font-size: 1.25rem; }
    .cc-go { justify-content: stretch; }
    .cc-compose { width: 100%; }
    .cc-actions .btn { width: 100%; }
    .cc-tiles-story { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-tiles-season { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cc-mod { padding: 14px 14px 16px; }
    .cc-tile-in { padding: 11px 11px; }
    .cc-tile-in small { font-size: 11px; }
    .cc-ret-acts .btn { flex: 1 1 auto; }
    .cc-disp .gantt .g-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .cc-tag { padding: 9px 9px 8px; }
    .cc-tag h3 { font-size: 14px; }
    .cc-nums dd b { font-size: 13.5px; }
    .cc-act { height: 30px; font-size: 13px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cc-led, .cc-ghost .cc-fig svg, .cc-compose.cc-dirty, .cc-compose .cc-thread { animation: none !important; }
    .cc-hang.cc-drop, .cc-donut { animation: none !important; opacity: 1; transform: none; }
    .cc-log li { opacity: 1; transform: none; }
}
