/* ========== Color Tool (ct-*) Styles ========== */
.ct-hero { padding: 1.5rem 0.75rem; }
.ct-section-title { text-align: center; font-size: 1.35rem; color: #222; margin-bottom: 0.5rem; padding-bottom: 0.5rem; position: relative; }
.ct-section-title::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: #c0392b; border-radius: 2px; }
.ct-section-sub { text-align: center; color: #777; font-size: 0.85rem; margin-bottom: 1.25rem; }
.ct-picker { display: flex; gap: 1.5rem; align-items: flex-start; max-width: 900px; margin: 0 auto; }
.ct-picker__upload { flex: 1; min-height: 280px; border: 2px dashed #ddd; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; position: relative; overflow: hidden; }
.ct-picker__upload:hover { border-color: #c0392b; background: #fafafa; }
.ct-picker__placeholder { text-align: center; color: #999; }
.ct-picker__placeholder p { margin-top: 0.75rem; font-size: 0.9rem; }
.ct-picker__canvas-wrap { position: relative; display: inline-block; line-height: 0; }
.ct-picker__canvas-wrap canvas { max-width: 100%; display: block; border-radius: 8px; cursor: crosshair; }
.ct-picker__cursor { position: absolute; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.3); pointer-events: none; transform: translate(-50%, -50%); display: none; z-index: 2; }
.ct-picker__result { width: 340px; flex-shrink: 0; background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,0.06); text-align: center; }
.ct-picker__swatch { width: 100%; height: 80px; border-radius: 8px; margin-bottom: 0.75rem; border: 1px solid rgba(0,0,0,0.08); }
.ct-picker__info { text-align: left; display: flex; flex-direction: column; gap: 0.35rem; }
.ct-picker__row { display: flex; align-items: center; gap: 0.5rem; }
.ct-picker__label { width: 42px; font-size: 0.78rem; font-weight: 700; color: #c0392b; flex-shrink: 0; text-align: right; }
.ct-picker__val { width: 250px; padding: 0.45rem 0.55rem; border: 2px solid #bbb; border-radius: 5px; font-size: 0.82rem; font-family: monospace; color: #222; outline: none; background: #fff; transition: border-color 0.2s; }
.ct-picker__val:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
.ct-picker__clear { margin-top: 0.75rem; padding: 0.5rem 1.5rem; background: #eee; border: 2px solid #ccc; border-radius: 6px; font-size: 0.9rem; color: #666; cursor: pointer; transition: background 0.2s; }
.ct-picker__clear:hover { background: #ddd; }
.ct-convert { display: flex; gap: 1.5rem; max-width: 900px; margin: 0 auto; align-items: flex-start; }
.ct-convert__panel { flex: 1; background: #fff; border-radius: 10px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); overflow: hidden; }
.ct-convert__panel-title { font-size: 0.85rem; font-weight: 700; color: #444; padding: 0.75rem 1.25rem; background: #f8f8f8; border-bottom: 1px solid #eee; margin: 0; }
.ct-convert__panel--input { min-width: 380px; }
.ct-convert__panel--output { min-width: 300px; }
.ct-convert-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid #eee; }
.ct-convert-tab { flex: 1; min-width: 0; padding: 0.45rem 0.35rem; border: none; background: transparent; font-size: 0.68rem; font-weight: 600; color: #999; cursor: pointer; transition: color 0.2s, border-color 0.2s; border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: 0.3px; }
.ct-convert-tab:hover { color: #555; }
.ct-convert-tab.active { color: #c0392b; border-bottom-color: #c0392b; }
.ct-convert-inputs { padding: 0.75rem 1.25rem; }
.ct-convert-fields { display: none; }
.ct-convert-fields.active { display: block; }
.ct-convert-field-item { display: flex; align-items: center; margin-bottom: 0.55rem; }
.ct-convert-field-item label { width: 40px; font-size: 0.78rem; font-weight: 600; color: #555; text-align: right; padding-right: 0.65rem; flex-shrink: 0; }
.ct-convert-field-item--hex { margin-bottom: 0.7rem; }
.ct-convert-field-item--hex label { width: 40px; }
.ct-convert-field-item--hex .ct-convert-field { max-width: 100%; flex: 1; }
.ct-stepper { display: flex; align-items: stretch; flex: 1; max-width: 90%; }
.ct-stepper__btn { display: flex; align-items: center; justify-content: center; width: 28px; border: 1px solid #ddd; cursor: pointer; user-select: none; font-size: 1.05rem; color: #888; background: #fafafa; transition: background 0.15s, color 0.15s; line-height: 1; }
.ct-stepper__btn:hover { background: #e8e8e8; color: #333; }
.ct-stepper__btn:active { background: #ddd; }
.ct-stepper__btn--dec { border-radius: 4px 0 0 4px; border-right: none; }
.ct-stepper__btn--inc { border-radius: 0 4px 4px 0; border-left: none; }
.ct-stepper .ct-convert-field { flex: 1; border-radius: 0; max-width: none; text-align: center; min-width: 0; }
.ct-convert-field { flex: 1; max-width: 90%; padding: 0.5rem 0.65rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.88rem; font-family: monospace; color: #333; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.ct-convert-field:focus { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192,57,43,0.12); }
.ct-convert-field--num { -moz-appearance: textfield; }
.ct-convert-field--num::-webkit-inner-spin-button, .ct-convert-field--num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ct-convert-btn { display: block; margin: 0 1.25rem 1rem; padding: 0.6rem 1.5rem; background: #c0392b; color: #fff; border: none; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.ct-convert-btn:hover { background: #a93226; }
.ct-convert-results { padding: 1rem 1.25rem; }
.ct-convert-swatch { width: 100%; height: 80px; border-radius: 8px; margin-bottom: 0.75rem; border: 1px solid rgba(0,0,0,0.08); background: #FF0059; }
.ct-convert-table { width: 100%; border-collapse: collapse; }
.ct-convert-table td { padding: 0.4rem 0.45rem; font-size: 0.8rem; font-family: monospace; color: #333; border-bottom: 1px solid #f0f0f0; text-align: center; }
.ct-convert-table tr:last-child td { border-bottom: none; }
.ct-convert-table__label { font-weight: 700 !important; color: #c0392b !important; text-align: left !important; width: 48px; }
.ct-cmyk-options { padding: 0 1.25rem; margin-bottom: 0.75rem; }
.ct-cmyk-toggle { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.ct-cmyk-toggle input[type="checkbox"] { display: none; }
.ct-cmyk-toggle__track { position: relative; width: 40px; height: 22px; background: #ccc; border-radius: 11px; transition: background 0.2s; flex-shrink: 0; }
.ct-cmyk-toggle input:checked + .ct-cmyk-toggle__track { background: #c0392b; }
.ct-cmyk-toggle__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.ct-cmyk-toggle input:checked + .ct-cmyk-toggle__track .ct-cmyk-toggle__thumb { left: 20px; }
.ct-cmyk-toggle__label { font-size: 0.82rem; color: #555; font-weight: 500; }
.ct-cmyk-options__body { margin-top: 0.5rem; padding: 0.75rem; background: #fafafa; border-radius: 6px; border: 1px solid #eee; }
.ct-cmyk-options__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ct-cmyk-options__label { font-size: 0.78rem; font-weight: 600; color: #555; white-space: nowrap; }
.ct-cmyk-options__select { padding: 0.35rem 0.5rem; border: 1px solid #d0d0d0; border-radius: 4px; font-size: 0.78rem; color: #333; background: #fff; outline: none; cursor: pointer; min-width: 110px; }
.ct-cmyk-options__select:focus { border-color: #c0392b; }
.ct-bars-section { background: #fff; }
.ct-bars-preview { display: flex; align-items: flex-start; gap: 1.5rem; max-width: 900px; margin: 0 auto 2rem; padding: 1.5rem; background: #f9f9f9; border-radius: 10px; }
.ct-bars-preview__swatch { width: 100px; height: 100px; border-radius: 8px; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.08); }
.ct-bars-preview__info { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.ct-bars-pv { font-size: 0.82rem; color: #555; font-family: monospace; display: flex; align-items: center; gap: 0.35rem; }
.ct-bars-pv__label { font-weight: 700; color: #c0392b; min-width: 36px; }
.ct-bars-pv__value { color: #222; }
.ct-bars-list { max-width: 960px; margin: 0 auto; }
.ct-bars-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; padding: 0.6rem; background: #fafafa; border-radius: 8px; border: 1px solid #eee; }
.ct-bars-row__label { width: 50px; font-size: 0.8rem; font-weight: 700; color: #c0392b; flex-shrink: 0; text-align: center; }
.ct-bars-row__items { display: flex; gap: 0.5rem; flex: 1; justify-content: center; }
.ct-bars-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ct-bars-item canvas { display: block; border-radius: 4px; cursor: pointer; border: 1px solid #ddd; }
.ct-bars-item span { font-size: 0.72rem; font-family: monospace; color: #555; text-align: center; }
.ct-bars-row__inputs { display: flex; gap: 0.35rem; margin-left: auto; }
.ct-bars-input { width: 68px; padding: 0.4rem 0.45rem; border: 2px solid #bbb; border-radius: 5px; font-size: 0.78rem; font-family: monospace; color: #222; outline: none; text-align: center; transition: border-color 0.2s, box-shadow 0.2s; }
.ct-bars-input:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
@media (max-width: 768px) {
  .ct-section-title { font-size: 1.2rem; }
  .ct-section-sub { font-size: 0.8rem; }
  .ct-picker { flex-direction: column; }
  .ct-picker__result { width: 100%; }
  .ct-picker__val { width: 100%; }
  .ct-convert { flex-direction: column; }
  .ct-convert__panel--input, .ct-convert__panel--output { min-width: 0; width: 100%; }
  .ct-convert-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ct-convert-tab { flex: 0 0 auto; min-width: 48px; padding: 0.4rem 0.5rem; font-size: 0.7rem; }
  .ct-bars-preview { flex-direction: column; align-items: center; gap: 0.75rem; padding: 1rem; }
  .ct-bars-preview__swatch { width: 64px; height: 64px; }
  .ct-bars-preview__info { width: 100%; }
  .ct-bars-pv__label { min-width: 32px; font-size: 0.7rem; }
  .ct-bars-pv { font-size: 0.72rem; flex-wrap: wrap; }
  .ct-bars-row { flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem; }
  .ct-bars-row__label { width: 42px; font-size: 0.72rem; }
  .ct-bars-row__items { flex-wrap: wrap; justify-content: flex-start; }
  .ct-bars-item canvas { height: auto; }
  .ct-bars-row__inputs { margin-left: auto; }
  .ct-bars-input { width: 48px; font-size: 0.7rem; padding: 0.32rem 0.3rem; }
}
@media (max-width: 480px) {
  .ct-section-title { font-size: 1.1rem; }
  .ct-section-sub { font-size: 0.75rem; margin-bottom: 1rem; }
  .ct-picker { gap: 1rem; }
  .ct-picker__upload { min-height: 200px; }
  .ct-picker__swatch { height: 60px; }
  .ct-picker__result { padding: 1rem; }
  .ct-convert-tab { min-width: 40px; padding: 0.35rem 0.4rem; font-size: 0.65rem; }
  .ct-convert__panel--input { min-width: 0; }
  .ct-convert-inputs { padding: 0.5rem 0.75rem; }
  .ct-convert-field { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
  .ct-convert-field-item label { width: 32px; font-size: 0.7rem; padding-right: 0.35rem; }
  .ct-stepper { max-width: 85%; }
  .ct-stepper__btn { width: 24px; font-size: 0.9rem; }
  .ct-convert-results { padding: 0.75rem; }
  .ct-convert-swatch { height: 56px; }
  .ct-convert-table td { padding: 0.3rem; font-size: 0.7rem; }
  .ct-bars-preview { padding: 0.75rem; gap: 0.5rem; }
  .ct-bars-preview__swatch { width: 48px; height: 48px; }
  .ct-bars-pv { font-size: 0.68rem; }
  .ct-bars-pv__label { min-width: 28px; font-size: 0.65rem; }
  .ct-bars-row { flex-direction: column; align-items: stretch; gap: 0.35rem; }
  .ct-bars-row__label { width: 100%; text-align: left; padding-left: 0.25rem; }
  .ct-bars-row__items { gap: 0.3rem; justify-content: flex-start; }
  .ct-bars-item canvas { max-width: 100%; }
  .ct-bars-item span { font-size: 0.65rem; }
  .ct-bars-row__inputs { margin-left: 0; gap: 0.25rem; flex-wrap: wrap; }
  .ct-bars-input { width: 48px; font-size: 0.68rem; padding: 0.28rem 0.25rem; }
}
