*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8f9fa;
  margin: 0;
  padding: 32px 16px 64px;
  color: #111827;
}

#ptconv-root {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

#ptconv-root h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
  margin: 0 0 1.5rem;
  line-height: 1.2;
}

.ptconv-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 11px 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ptconv-search-wrap:focus-within {
  border-color: #6b7280;
  box-shadow: 0 0 0 3px rgba(107,114,128,0.12);
}

.ptconv-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
  font-family: inherit;
  padding: 0;
  outline: none;
}

.ptconv-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  line-height: 1;
}

.ptconv-search-icon {
  flex-shrink: 0;
  color: #9ca3af;
}

.ptconv-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.13);
  overflow: hidden;
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  animation: ptconv-drop 0.14s ease;
}

.ptconv-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.ptconv-dd-item:hover,
.ptconv-dd-item.ptconv-active {
  background: #f3f4f6;
}

.ptconv-dd-swatch {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}

.ptconv-dd-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ptconv-dd-meta {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ptconv-dd-alias {
  color: #9ca3af;
}

.ptconv-panel {
  animation: ptconv-rise 0.28s ease;
}

.ptconv-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 6px 28px rgba(0,0,0,0.09);
}

.ptconv-cols {
  display: flex;
}

.ptconv-swatch-col {
  min-width: 260px;
  width: 260px;
  padding: 36px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.ptconv-pantone-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ptconv-pantone-number {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.ptconv-pantone-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.ptconv-alias-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ptconv-alias-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 2px 7px;
}

.ptconv-hex-area {
  margin-top: 32px;
}

.ptconv-hex-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.ptconv-hex-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 12px;
}

.ptconv-hex-value {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex: 1;
}

.ptconv-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
  line-height: 1;
}

.ptconv-copy-btn:hover { opacity: 0.65; }
.ptconv-copy-btn:active { transform: scale(0.93); }

.ptconv-right-col {
  flex: 1;
  background: #fff;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ptconv-cmyk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ptconv-cmyk-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #374151;
  text-transform: uppercase;
}

.ptconv-approx-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 3px 8px;
}

.ptconv-approx-badge span {
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  letter-spacing: 0.04em;
}

.ptconv-bars {
  flex: 1;
}

.ptconv-bar-row {
  margin-bottom: 14px;
}

.ptconv-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.ptconv-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ptconv-bar-letter {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-radius: 4px;
  padding: 1px 5px;
}

.ptconv-bar-label {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}

.ptconv-bar-val {
  font-family: system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  min-width: 48px;
  text-align: right;
}

.ptconv-bar-val span {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
}

.ptconv-track {
  height: 5px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.ptconv-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.4,0,0.2,1);
}

.ptconv-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 14px;
}

.ptconv-chip {
  border-radius: 10px;
  padding: 10px 8px 8px;
  text-align: center;
  position: relative;
  border-width: 1.5px;
  border-style: solid;
}

.ptconv-chip-letter {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.ptconv-chip-val {
  font-size: 22px;
  font-weight: 900;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ptconv-chip-pct {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 1px;
}

.ptconv-chip-copy {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #d1d5db;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}

.ptconv-copy-all {
  width: 100%;
  padding: 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.ptconv-copy-all:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.ptconv-disclaimer {
  font-size: 10px;
  color: #9ca3af;
  margin: 10px 0 0;
  line-height: 1.5;
  text-align: center;
}

.ptconv-cousins {
  border-top: 1.5px solid #f3f4f6;
  padding: 18px 24px 20px;
  background: #fafafa;
}

.ptconv-cousins-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ptconv-cousin-grid {
  display: grid;
  gap: 8px;
}

.ptconv-cousin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.ptconv-cousin:hover {
  transform: translateY(-3px);
}

.ptconv-cousin-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ptconv-cousin-label {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.ptconv-empty {
  padding: 56px 24px;
  text-align: center;
  border: 1.5px dashed #e5e7eb;
  border-radius: 16px;
  color: #9ca3af;
}

.ptconv-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #6b7280;
}

.ptconv-empty-sub {
  font-size: 12px;
  margin-top: 5px;
  color: #9ca3af;
}

@keyframes ptconv-drop {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ptconv-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .ptconv-cols { flex-direction: column !important; }
  .ptconv-swatch-col { min-width: unset !important; width: 100% !important; }
  .ptconv-cousin-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
