* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 14px;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.page-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
  max-width: 1280px;
}

.ad-slot {
  width: 300px;
  min-width: 300px;
  height: 600px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  position: sticky;
  top: 32px;
  margin-top: 45px;
}

@media (max-width: 1000px) { .ad-slot.ad-left { display: none; } }
@media (max-width: 1280px) { .ad-slot.ad-right { display: none; } }

.container {
  width: 100%;
  max-width: 640px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}
h1 span { color: #0078d4; }

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* 미리보기 */
.color-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.color-picker {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  background: none;
}
.color-swatch {
  flex: 1;
  height: 56px;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: background 0.1s;
}

/* 변환 행 */
.convert-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.convert-row:last-child { margin-bottom: 0; }

.unit-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: 'Consolas', monospace;
  text-align: right;
  transition: border-color 0.15s;
}
.unit-input:focus {
  outline: none;
  border-color: #0078d4;
}
.color-text-input { text-align: left; letter-spacing: 0.5px; }
.color-text-input[readonly] { background: #f8f8f8; color: #555; }

.unit-label {
  width: 110px;
  font-size: 13px;
  color: #555;
  flex-shrink: 0;
}
.unit-symbol {
  width: 52px;
  font-size: 12px;
  color: #999;
  text-align: right;
  flex-shrink: 0;
  font-family: 'Consolas', monospace;
}

.divider {
  border: none;
  border-top: 1px dashed #eee;
  margin: 10px 0;
}

/* 복사 버튼 */
.btn-copy {
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-copy:hover { background: #005fa3; }
.btn-copy.copied { background: #107c10; }
