:root {
  --card-bg: #ececff;
  --card-border: #e5e7eb;
  --muted: #6b7280;

  --modal-backdrop: rgba(0, 0, 0, 0.45);
  --modal-bg: #ffffff;
  --modal-border: #e5e7eb;
}

/* 공통 */
* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  line-height: 1.5;
}

/* 전체 가운데 정렬 컨테이너 */
.page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 10px;
  text-align: center;
}
.lead {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

label,
input,
button,
select {
  font-size: 16px;
}

/* 컨트롤 영역 (12V 계산기 스타일) */
.controls {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}
.controls .full {
  grid-column: 1 / -1;
}

input[type="number"],
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

/* 결과 영역 래퍼 */
.result {
  margin: 20px auto 0;
  width: 100%;
  max-width: 720px;
}

/* 텍스트 톤 */
.rank-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

/* 버튼 톤 (네가 준 톤 그대로) */
button {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cfd2ff;
  border-radius: 10px;
  background: #f1f3ff;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.12s ease-in-out, transform 0.02s ease-in-out;
}
button:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
button:active {
  transform: translateY(1px);
}

/* 설치 방식 선택 버튼 톤 */
#pickSerial,
#pickParallel,
#pickSquare {
  background-color: white;
  color: #333;
  border: 0.1px solid #000000;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
  padding: 12px;
}
#pickSerial:hover,
#pickParallel:hover,
#pickSquare:hover {
  background-color: #3b4cd2;
  color: #fff;
}

/* 계산하기/처음으로 버튼 세로 배열 */
#actionButtons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 카드 (파란 배경 카드 포함) */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(12, 12, 12, 0.337);
  width: 100%;
  max-width: 100%;
  text-align: left;
}
.card.totals {
  background: #fff4e5;
  border-color: #f3b673;
}
.total-line {
  margin-top: 6px;
  font-size: 1.05rem;
}

/* 라벨과 입력칸 간격(요청대로 더 촘촘) */
#lengthInputsArea label {
  display: block;
  margin-bottom: 4px;
}
#lengthInputsArea input {
  margin-bottom: 10px;
}

/* 반응형 */
@media (max-width: 560px) {
  body {
    padding: 16px;
  }
  .controls {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .controls label {
    margin-top: 6px;
  }
  input,
  select,
  button {
    width: 100%;
  }
  .result {
    max-width: 100%;
  }
}
/* 카드 안에서 일반 크기, 세로 배치용 */
.list-plain {
  color: inherit; /* 회색톤(x) -> 본문색 */
  font-size: 1rem; /* 작은 글씨(x) */
  margin-top: 6px;
}
.list-plain .item {
  display: block; /* 세로 줄바꿈 */
  margin: 2px 0;
  font-weight: normal; /* 굵게(x) */
}
.rank-title--plain {
  font-weight: inherit; /* 굵기 변경 없이 상속 */
}
