:root {
  --orange: #f59a19;
  --orange-dark: #d9840c;
  --orange-soft: rgba(245, 154, 25, 0.08);
  --ink: #252724;
  --mute: #82847e;
  --line: #e9eae5;
  --paper: #fafbf8;
  --white: #ffffff;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.test-banner {
  background: #fff4e0;
  color: var(--orange-dark);
  text-align: center;
  font-size: 14px;
  padding: 6px 16px;
}

.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.brand {
  background: none;
  border: 0;
  font-weight: 700;
  font-size: 18px;
  padding: 0;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 64px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

h1 {
  font-size: 26px;
  margin: 8px 0 8px;
}

h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.mute {
  color: var(--mute);
}

.small {
  font-size: 14px;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  padding: 14px 24px;
  min-height: 52px;
}

.btn:hover {
  background: var(--orange-dark);
}

.btn:disabled {
  background: var(--line);
  color: var(--mute);
  cursor: default;
}

.btn.ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  background: var(--orange-soft);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.row.between {
  justify-content: space-between;
}

.home-actions .btn {
  flex: 1 1 220px;
  font-size: 19px;
  min-height: 72px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.check input {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--orange);
  flex: none;
}

.check ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--mute);
  font-size: 14px;
}

.input {
  width: 100%;
  font: inherit;
  font-size: 24px;
  letter-spacing: 1px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.input:focus,
.btn:focus-visible,
.choice:focus-visible,
.oil:focus-visible {
  outline: 3px solid rgba(245, 154, 25, 0.45);
  outline-offset: 2px;
}

.error {
  color: #c0392b;
  margin-top: 8px;
  min-height: 1.6em;
}

/* 진행 막대 */
.progress {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 20px;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--orange);
  width: 0;
  transition: width 0.2s;
}

.q-section {
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 15px;
}

.q-text {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0 20px;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  min-height: 56px;
}

.choice:hover {
  background: var(--orange-soft);
}

.choice.on {
  border-color: var(--orange);
  background: var(--orange-soft);
  font-weight: 700;
}

.scale10 {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
}

.scale10 .choice {
  text-align: center;
  padding: 12px 0;
  min-height: 56px;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 14px;
  margin-top: 8px;
}

@media (max-width: 560px) {
  .scale10 {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* 오일 고르기 */
.oils {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.oil {
  position: relative;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 12px;
  min-height: 120px;
  text-align: center;
}

.oil .dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--oil, var(--orange));
  margin: 0 auto 8px;
}

.oil .name {
  display: block;
  font-weight: 700;
  font-size: 18px;
}

.oil .kw {
  display: block;
  color: var(--mute);
  font-size: 13px;
}

.oil:hover {
  background: var(--orange-soft);
}

.oil.on {
  border-color: var(--oil, var(--orange));
}

.oil .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  line-height: 30px;
}

.order-line {
  margin-top: 16px;
  color: var(--mute);
  min-height: 1.6em;
}

/* 보고서 */
.report-head {
  border-top: 6px solid var(--orange);
}

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 14px;
  font-weight: 700;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 76px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.bar {
  height: 12px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--orange);
  width: var(--w, 0%);
}

.trait {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.trait:first-of-type {
  border-top: 0;
}

.oil-read {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.oil-read .rank {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--oil, var(--orange));
  color: #fff;
  font-weight: 700;
  text-align: center;
  line-height: 34px;
}

.oil-read.rejected .rank {
  opacity: 0.55;
}

.tag {
  font-size: 13px;
  color: var(--mute);
  margin-left: 6px;
}

.caution {
  background: #fff4e0;
  border-color: #f5c27a;
}

.list {
  margin: 0;
  padding-left: 20px;
}

.list li {
  margin: 6px 0;
}

table.compare,
table.history {
  width: 100%;
  border-collapse: collapse;
}

table.compare th,
table.compare td,
table.history th,
table.history td {
  border-bottom: 1px solid var(--line);
  padding: 10px 6px;
  text-align: left;
}

table.history tr.click {
  cursor: pointer;
}

table.history tr.click:hover {
  background: var(--orange-soft);
}

.up {
  color: #2e8b57;
}

.down {
  color: #c0392b;
}

@media print {
  .test-banner,
  .top,
  .no-print {
    display: none;
  }
  .card {
    break-inside: avoid;
  }
}

/* ---- 고객 화면 추가 ---- */
.slide {
  text-align: center;
  padding: 32px 20px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fade-in 0.35s ease;
}

.slide .emoji {
  font-size: 64px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.slide h2 {
  font-size: 24px;
}

.slide p {
  font-size: 18px;
  margin: 8px 0 0;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.dots span.on {
  background: var(--orange);
  width: 22px;
  border-radius: 99px;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide {
    animation: none;
  }
}

.code-input {
  text-align: center;
  font-size: 36px;
  letter-spacing: 12px;
}

.done {
  text-align: center;
  padding: 48px 24px;
}

.done .emoji {
  font-size: 64px;
}

.done .big {
  font-size: 22px;
  font-weight: 700;
  margin: 16px 0 8px;
}
