/*! CSS Portal — Online Color Picker / Color Wheel */
.cw { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cw [hidden] { display: none !important; }
.cw .gt-card__head { flex-wrap: wrap; gap: 8px 14px; }
.cw .gt-card__head h2 { margin: 0; }
.cw-check { background-color: #fff; background-image: linear-gradient(45deg, #d6dce5 25%, transparent 25%, transparent 75%, #d6dce5 75%), linear-gradient(45deg, #d6dce5 25%, transparent 25%, transparent 75%, #d6dce5 75%); background-size: 14px 14px; background-position: 0 0, 7px 7px; }

/* picker card */
.cw-pick { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 28px; padding: 20px; }
@media (max-width: 860px) { .cw-pick { grid-template-columns: minmax(0, 1fr); justify-items: center; } .cw-info { width: 100%; } }
.cw-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; max-width: 320px; }
.cw-wheel { position: relative; width: 100%; aspect-ratio: 1; touch-action: none; cursor: crosshair; }
.cw-wheel canvas { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px var(--ct-border), 0 10px 30px rgba(15, 23, 42, .12); }
.cw-thumb, .cw-mark { position: absolute; top: 0; left: 0; border-radius: 50%; pointer-events: none; }
.cw-thumb { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 3px 8px rgba(15, 23, 42, .35); outline: none; pointer-events: auto; cursor: grab; }
.cw-thumb:focus-visible { box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 0 0 5px var(--ct-accent-soft), 0 3px 8px rgba(15, 23, 42, .35); }
.cw-mark { width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .3); }
.cw-slider { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--ct-text); }
.cw-slider > span { display: flex; justify-content: space-between; padding: 0; }
.cw-slider output { font: 600 12.5px/1.4 var(--ct-mono); color: var(--ct-muted); }
.cw input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; padding: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12); cursor: pointer; }
.cw input[data-cw="value"] { background: linear-gradient(to right, #000, var(--cw-top, #fff)); }
.cw input[data-cw="alpha"] { background: linear-gradient(to right, transparent, var(--cw-top, #000)), linear-gradient(45deg, #d6dce5 25%, transparent 25%, transparent 75%, #d6dce5 75%) 0 0 / 12px 12px, linear-gradient(45deg, #d6dce5 25%, #fff 25%, #fff 75%, #d6dce5 75%) 6px 6px / 12px 12px; }
.cw input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: transparent; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .3); }
.cw input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: transparent; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .3); }
.cw input[type="range"]:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12), 0 0 0 3px var(--ct-accent-soft); }

/* info column */
.cw-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.cw-top { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 480px) { .cw-top { grid-template-columns: 88px minmax(0, 1fr); } }
.cw-swatch { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--ct-border); }
.cw-swatch::after { content: ""; position: absolute; inset: 0; background: var(--cw-c); }
.cw-topinfo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.cw-hexbig { margin: 0; font: 700 28px/1.1 var(--ct-mono); color: var(--ct-text); overflow-wrap: anywhere; }
.cw-inputrow { display: flex; gap: 6px; }
.cw .cw-input { box-sizing: border-box; flex: 1; min-width: 0; height: 38px; margin: 0; padding: 0 12px; font: 500 14px/1 var(--ct-mono); color: var(--ct-text); background: var(--ct-surface); border: 1px solid var(--ct-border); border-radius: 8px; outline: none; }
.cw .cw-input:focus { background: var(--ct-bg); border-color: var(--ct-accent); box-shadow: 0 0 0 3px var(--ct-accent-soft); }
.cw .cw-input.is-bad { border-color: var(--ct-err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct-err) 15%, transparent); }
.cw-hint { margin: 0; font-size: 12px; color: var(--ct-muted); }
.cw-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 14px; color: var(--ct-text); }
.cw-name small { font: 500 12px/1.4 var(--ct-mono); color: var(--ct-muted); }
.cw-dot { display: inline-block; width: 14px; height: 14px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(15, 23, 42, .2); }
.cw-namerow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 6px 8px 12px; background: var(--ct-surface); border-radius: 10px; }

.cw .cw-formats { display: grid; margin: 0; border: 1px solid var(--ct-border); border-radius: 10px; overflow: hidden; }
.cw-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--ct-border); }
.cw-row:last-child { border-bottom: 0; }
.cw-row dt { margin: 0; font-size: 12px; font-weight: 700; color: var(--ct-muted); }
.cw-row dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; margin: 0; }
.cw-row code { padding: 0; font: 500 13.5px/1.6 var(--ct-mono); color: var(--ct-text); background: none; overflow-wrap: anywhere; }
.cw-row small { font-size: 11.5px; color: var(--ct-muted); }
.cw-contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cw-con { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); }
.cw-con__sample { padding: 0; font-size: 22px; font-weight: 700; line-height: 1; }
.cw-con__txt { display: grid; padding: 0; font-size: 12px; line-height: 1.3; }
.cw-con__txt b { font-size: 14px; }
.cw .cw-badge { margin-left: auto; padding: 2px 8px; font-size: 11.5px; font-weight: 700; color: #14532d; background: #dcfce7; border-radius: 999px; }
.cw .cw-badge.is-fail { color: #7f1d1d; background: #fee2e2; }
@media (max-width: 420px) { .cw-contrast { grid-template-columns: minmax(0, 1fr); } }

/* harmonies */
.cw-harmonies { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; padding: 16px; }
.cw-h { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--ct-border); border-radius: 12px; }
.cw .cw-h h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ct-text); }
.cw-h p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ct-muted); }
.cw .cw-sws { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cw .cw-sws li { position: relative; flex: 1; min-width: 0; margin: 0; }
.cw .cw-sw { display: flex; align-items: flex-end; width: 100%; height: 72px; margin: 0; padding: 6px; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1); cursor: pointer; }
.cw .cw-sw span { padding: 0; font: 600 11px/1.2 var(--ct-mono); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.cw .cw-sw.is-light span { color: #0f172a; text-shadow: none; }
.cw .cw-sw:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .1), 0 6px 14px rgba(15, 23, 42, .18); }
.cw .cw-sw:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ct-accent-soft); }
.cw .cw-sw__copy { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; margin: 0; padding: 0; color: #0f172a; background: rgba(255, 255, 255, .85); border: 0; border-radius: 6px; opacity: 0; cursor: pointer; transition: opacity .15s; }
.cw .cw-sws li:hover .cw-sw__copy, .cw .cw-sw__copy:focus-visible { opacity: 1; }
.cw .cw-sw__copy.is-done { color: var(--ct-ok); opacity: 1; }
@media (hover: none) { .cw .cw-sw__copy { opacity: 1; } }
@media (max-width: 480px) {
	.cw .cw-sws { flex-wrap: wrap; }
	.cw .cw-sws li { flex: 1 1 calc(25% - 6px); }
	.cw .cw-sw { height: 60px; }
	.cw .cw-sw span { font-size: 10px; }
	.cw-harmonies { padding: 12px; }
	.cw-h { padding: 12px; }
	.cw-pick { padding: 16px; }
}
.cw-showon { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ct-text); }
.cw-showon select { height: 32px; margin: 0; padding: 0 8px; font: inherit; font-size: 13px; color: var(--ct-text); background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: 8px; }
