* { 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; }

/* 카테고리 탭 */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tab-btn {
  padding: 7px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  color: #555;
}
.tab-btn:hover { border-color: #0078d4; color: #0078d4; }
.tab-btn.active {
  background: #0078d4;
  border-color: #0078d4;
  color: #fff;
  font-weight: 600;
}

.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: 14px;
}

/* 변환 행 */
.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;
}

.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;
}
