@import url("/fonts.css"); /* hub.css */

:root {
  --bg: #f3f4f6;
  --panel: #fff;
  --ink: #15181d;
  --mute: #636d82;
  --line: #e3e6eb;
  --up: #cc302b;
  --up-soft: #fdecea;
  --dn: #2257c9;
  --dn-soft: #e9effc;
  --now: #15181d;
  --now-ink: #fff;
  --sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --acc: #1d4ed8;
  --w-wood: #126b42;
  --w-fire: #b82723;
  --w-earth: #8c5800;
  --w-metal: #566070;
  --w-water: #1d56b8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #171a20;
    --ink: #e8eaee;
    --mute: #9099a8;
    --line: #262b33;
    --up: #ff6b63;
    --up-soft: #3a1d1c;
    --dn: #6f9bff;
    --dn-soft: #18233d;
    --now: #e8eaee;
    --now-ink: #0f1115;

    --acc: #6ca0ff;
    --w-wood: #4ade80;
    --w-fire: #ff7670;
    --w-earth: #eab340;
    --w-metal: #c2cbd8;
    --w-water: #6aa8ff;
  }
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* A. 상단 사이트 전환 줄(.bsw) 스타일은 공용 /topnav.css 에서 통합 관리 */

/* 공통 레이아웃 */
.cw {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 16px 56px;
}

.cw.wide {
  max-width: 960px;
}

.hd {
  margin-bottom: 22px;
}

.crumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--mute);
}

.crumb a {
  color: var(--mute);
  text-decoration: none;
  transition: color 150ms ease;
}

.crumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.hd h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.hd .lead {
  margin: 0;
  font-size: 15px;
  color: var(--mute);
  word-break: keep-all;
}

/* B. 허브 목록 & 카드 */
.search {
  display: block;
  width: 100%;
  max-width: 440px;
  min-height: 46px;
  margin-top: 16px;
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.4;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: none;
  transition: border-color 150ms ease;
}

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

.search:focus {
  border-color: var(--acc);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 16%, transparent);
}

.cat {
  margin-top: 28px;
}

.cat h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.cat h2 .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.card:hover {
  border-color: var(--acc);
  transform: translateY(-1px);
}

.card:active {
  transform: translateY(0);
}

.card .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 9px;
  background: var(--dn-soft);
  color: var(--dn);
  font: 700 15px/1 var(--mono);
  letter-spacing: -0.02em;
}

.card b {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  word-break: keep-all;
}

.card .d {
  font-size: 13px;
  line-height: 1.45;
  color: var(--mute);
  word-break: keep-all;
}

/* D. 운세·테스트 허브 대형 카드 */
.grid.big {
  grid-template-columns: 1fr;
  gap: 12px;
}

.card.hero {
  padding: 20px;
  gap: 6px;
}

.card.hero .ic {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  border-radius: 12px;
  font-size: 20px;
}

.card.hero b {
  font-size: 18px;
}

.card.hero .d {
  font-size: 14px;
}

/* C. 계산기 입력 폼 */
.cf {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fld > label,
.fld > .lbl {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.inp {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-right: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.inp:focus-within {
  background: var(--panel);
  border-color: var(--acc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 16%, transparent);
}

.inp input,
.inp select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 8px 10px 12px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.inp .unit {
  flex: 0 0 auto;
  padding-left: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  white-space: nowrap;
  user-select: none;
}

.fld > input:not([type="checkbox"]):not([type="radio"]),
.fld > select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fld > input:not([type="checkbox"]):not([type="radio"]):focus,
.fld > select:focus {
  background: var(--panel);
  border-color: var(--acc);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 16%, transparent);
}

.hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.quick button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.quick button:hover {
  background: var(--bg);
  border-color: var(--mute);
}

.quick button[data-clear] {
  color: var(--mute);
}

.row2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.seg button {
  flex: 1 1 70px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  word-break: keep-all;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-checked="true"],
.seg button.on {
  background: var(--now);
  color: var(--now-ink);
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

.chk input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--acc);
  cursor: pointer;
}

.go {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--acc);
  color: var(--now-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.go:hover {
  opacity: 0.92;
}

.go:active {
  transform: scale(0.99);
}

/* 계산기 결과 카드 */
.res {
  margin-top: 16px;
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--acc) 32%, var(--line));
  border-top: 3px solid var(--acc);
  border-radius: 12px;
  animation: fadeIn 150ms ease;
}

.res .rl {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
}

.res .big {
  margin: 0;
  font-size: clamp(30px, 8.5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.res .big small {
  margin-left: 3px;
  font-size: 0.52em;
  font-weight: 600;
  color: var(--ink);
}

.res .sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.rows dt {
  font-size: 14px;
  color: var(--mute);
}

.rows dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar {
  display: flex;
  gap: 2px;
  width: 100%;
  height: 10px;
  margin-top: 16px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  transition: width 150ms ease;
}

.b1 {
  background: var(--acc);
}

.b2 {
  background: var(--up);
}

.legend {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.5;
}

.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
  vertical-align: -1px;
}

.legend i:not(:first-child) {
  margin-left: 12px;
}

/* 회차별 상환표 */
.tbl {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tbl summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.tbl summary::-webkit-details-marker {
  display: none;
}

.tbl summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--mute);
  transition: transform 150ms ease;
}

.tbl[open] summary::after {
  transform: rotate(180deg);
}

.tbl .scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
}

.tbl table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tbl th,
.tbl td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.tbl th {
  font-weight: 600;
  color: var(--mute);
  background: var(--panel);
}

.tbl th:first-child,
.tbl td:first-child {
  padding-left: 14px;
  color: var(--mute);
}

.tbl th:last-child,
.tbl td:last-child {
  padding-right: 14px;
}

.tbl tbody tr:last-child td {
  border-bottom: 0;
}

/* 결과 하단 액션 버튼 */
.acts {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.acts button,
.acts a {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.acts .copy {
  background: var(--now);
  border-color: var(--now);
  color: var(--now-ink);
}

.acts .copy:hover {
  opacity: 0.9;
}

.acts .reset:hover,
.acts .retry:hover {
  border-color: var(--mute);
}

/* 설명·FAQ·계산 기준·관련 계산기·면책 */
.ex {
  margin-top: 24px;
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ex h2 {
  margin: 24px 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.ex h2:first-child {
  margin-top: 0;
}

.ex p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--mute);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq:last-of-type {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  font: 500 18px/1 var(--mono);
  color: var(--mute);
}

.faq[open] summary::after {
  content: "−";
}

.faq p {
  margin: 0 0 14px;
}

.basis {
  margin-top: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.basis h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.basis ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute);
}

.basis .asof {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.rel {
  margin-top: 28px;
}

.rel h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.disc {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mute);
}

/* E. 사주 결과 */
.pillars,
.ohaeng,
.read {
  margin-top: 16px;
  padding: 18px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pt {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 6px;
}

.pt th {
  padding: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  text-align: center;
}

.pt td {
  padding: 0;
  text-align: center;
}

.pt .w {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 76px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.pt .w small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.w.wood {
  color: var(--w-wood);
  background: color-mix(in srgb, var(--w-wood) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--w-wood) 30%, var(--line));
}

.w.fire {
  color: var(--w-fire);
  background: color-mix(in srgb, var(--w-fire) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--w-fire) 30%, var(--line));
}

.w.earth {
  color: var(--w-earth);
  background: color-mix(in srgb, var(--w-earth) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--w-earth) 30%, var(--line));
}

.w.metal {
  color: var(--w-metal);
  background: color-mix(in srgb, var(--w-metal) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--w-metal) 30%, var(--line));
}

.w.water {
  color: var(--w-water);
  background: color-mix(in srgb, var(--w-water) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--w-water) 30%, var(--line));
}

.me {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--mute);
  text-align: center;
}

.me .w {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.ohaeng h2,
.read h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.oh {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oh .o {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 10px;
}

.oh .o::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: 100%;
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
}

.oh .o span {
  grid-column: 1;
  grid-row: 1;
  font-size: 13px;
  font-weight: 700;
}

.oh .o i {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: block;
  height: 10px;
  border-radius: 999px;
  transition: width 150ms ease;
}

.oh .o b {
  grid-column: 3;
  grid-row: 1;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.oh .o.wood span { color: var(--w-wood); }
.oh .o.wood i { background: var(--w-wood); }
.oh .o.fire span { color: var(--w-fire); }
.oh .o.fire i { background: var(--w-fire); }
.oh .o.earth span { color: var(--w-earth); }
.oh .o.earth i { background: var(--w-earth); }
.oh .o.metal span { color: var(--w-metal); }
.oh .o.metal i { background: var(--w-metal); }
.oh .o.water span { color: var(--w-water); }
.oh .o.water i { background: var(--w-water); }

.read p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
}

.read p:last-child {
  margin-bottom: 0;
}

/* F. 16가지 성격 유형 테스트 */
.qz {
  padding: 20px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  animation: fadeIn 150ms ease;
}

.prog {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.prog i {
  display: block;
  height: 100%;
  background: var(--acc);
  border-radius: 999px;
  transition: width 150ms ease;
}

.qn {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.qt {
  margin: 14px 0 22px;
  min-height: 3em;
  font-size: clamp(18px, 4.8vw, 21px);
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
}

.scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.scale button:hover {
  border-color: var(--acc);
  background: var(--panel);
}

.scale button:active,
.scale button[aria-checked="true"],
.scale button.on {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--now-ink);
  transform: scale(0.99);
}

.back {
  margin-top: 16px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.back:hover {
  color: var(--ink);
  border-color: var(--mute);
}

.rs {
  padding: 24px 16px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--acc) 32%, var(--line));
  border-top: 3px solid var(--acc);
  border-radius: 12px;
  animation: fadeIn 150ms ease;
}

.rs .code {
  margin: 0;
  text-align: center;
  font: 700 clamp(34px, 10vw, 44px)/1.1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--acc);
}

.rs .nick {
  margin: 8px 0 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  word-break: keep-all;
}

.axis {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ax {
  display: grid;
  grid-template-columns: 48px 1fr 48px 36px;
  align-items: center;
  gap: 8px;
}

.ax .l {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ax .r {
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  text-align: right;
  white-space: nowrap;
}

.ax .tr {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.ax .tr i {
  display: block;
  height: 100%;
  background: var(--acc);
  border-radius: 999px;
  transition: width 150ms ease;
}

.ax b {
  font-size: 12px;
  font-weight: 700;
  color: var(--acc);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rs h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.rs > p:not(.code):not(.nick) {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
}

/* 반응형 */
@media (max-width: 359px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) {
  .cf,
  .res,
  .ex,
  .pillars,
  .ohaeng,
  .read,
  .qz,
  .rs {
    padding: 24px;
  }

  .pt {
    border-spacing: 10px;
  }

  .pt .w {
    min-height: 86px;
    font-size: 30px;
  }

  .scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .scale button {
    min-height: 54px;
    padding: 10px 6px;
    font-size: 13px;
    text-align: center;
    word-break: keep-all;
  }

  .ax {
    grid-template-columns: 56px 1fr 56px 40px;
    gap: 10px;
  }

  .ax .l,
  .ax .r,
  .ax b {
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .cw {
    padding: 32px 16px 72px;
  }

  .cw.wide .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .cw.wide .grid.big {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 768px) and (pointer: fine) {
  .quick button {
    min-height: 34px;
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 2026-11-25 Claude 보정(화면 점검): 바닥글·주식 평단 줄 지우기 버튼 */
.ft { max-width: 960px; margin: 0 auto; padding: 8px 16px 40px; font-size: 12px; color: var(--mute); line-height: 1.9; }
.ft a { color: var(--mute); text-decoration: none; }
.ft a:hover { text-decoration: underline; }
.lots { display: grid; gap: 8px; }
.lot .inp { position: relative; }
.lot .inp:has(.dellot) .unit { margin-right: 34px; }
.dellot { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); font-size: 18px; line-height: 1; cursor: pointer; }
.dellot:hover { background: var(--line); color: var(--ink); }

/* 2026-11-25 사주 운세 탭·분야 카드·행운·대운 — 제미나이 디자인 */
/* ===== 사주 결과 추가 UI (hub.css 확장) ===== */

/* 1) 결과 탭 & 패널 */
.ftabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
}

.ftabs [role="tab"] {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 6px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--mute);
  font: 600 14px/1.25 inherit;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

@media (hover: hover) {
  .ftabs [role="tab"]:hover {
    border-color: var(--acc);
    color: var(--ink);
  }
}

.ftabs [role="tab"][aria-selected="true"] {
  background: var(--now);
  color: var(--now-ink);
  border-color: var(--acc);
  font-weight: 700;
}

.ftabs [role="tab"]:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

.fpane {
  display: grid;
  gap: 12px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.fpane[hidden] {
  display: none;
}

.fpane > * {
  min-width: 0;
}

/* 오행 색상 매핑 (기존 토큰 유지) */
.fdate .w,
.daeun .w {
  --wc: var(--ink);
  color: var(--wc);
}
.fdate .w.wood,  .daeun .w.wood  { --wc: var(--w-wood); }
.fdate .w.fire,  .daeun .w.fire  { --wc: var(--w-fire); }
.fdate .w.earth, .daeun .w.earth { --wc: var(--w-earth); }
.fdate .w.metal, .daeun .w.metal { --wc: var(--w-metal); }
.fdate .w.water, .daeun .w.water { --wc: var(--w-water); }

/* 2) 운세 머리 */
.fhead {
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.fdate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mute);
}

.fdate .w {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--wc) 32%, var(--line));
  border-radius: 6px;
  background: var(--bg);
  background: color-mix(in srgb, var(--wc) 12%, var(--panel));
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fscore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fscore .star {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: var(--line);
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 56%,
    79% 91%, 50% 69%, 21% 91%, 32% 56%,
    2% 35%, 39% 35%
  );
}

.fscore .star.on {
  background: var(--acc);
}

.fscore b {
  margin-left: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fscore small {
  font-size: 13px;
  line-height: 1;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.fkey {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
  word-break: keep-all;
}

.fkey b {
  color: var(--ink);
  font-weight: 700;
}

.ftip {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--acc);
  border-radius: 0 8px 8px 0;
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 3) 분야 카드 묶음 */
.fcats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.fc {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.fc-h {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fc-i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--acc);
  font-size: 14px;
  line-height: 1;
}

.fc-h b {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.fc-s {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--acc);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fc p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 4) 행운 요소 */
.lucky {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.lucky > div {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.lucky dt {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--mute);
}

.lucky dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 5) 대운 표 (가로 스크롤은 .scroll 내부만 허용) */
.scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.daeun {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.daeun li {
  box-sizing: border-box;
  flex: 1 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: center;
  scroll-snap-align: start;
}

.daeun .age {
  font-size: 12px;
  line-height: 1.25;
  color: var(--mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.daeun .w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--wc) 32%, var(--line));
  border-radius: 9px;
  background: var(--bg);
  background: color-mix(in srgb, var(--wc) 12%, var(--panel));
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.daeun small {
  font-size: 12px;
  line-height: 1.25;
  color: var(--mute);
  white-space: nowrap;
}

.daeun li.now {
  background: var(--now);
  color: var(--now-ink);
  border-color: var(--acc);
  box-shadow: inset 0 0 0 1px var(--acc);
}

.daeun li.now .age,
.daeun li.now small {
  color: var(--now-ink);
  font-weight: 700;
}

.daeun li.now .w {
  background: var(--panel);
}

/* 6) 입력 저장 체크박스 */
.chk.save {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 2px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  word-break: keep-all;
}

.chk.save input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--acc);
  cursor: pointer;
}

.chk.save input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}

/* PC 브레이크포인트 */
@media (min-width: 640px) {
  .ftabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ftabs [role="tab"] {
    flex: 1 1 auto;
    padding: 8px 14px;
  }

  .fhead {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .fscore {
    justify-self: end;
  }

  .fkey,
  .ftip {
    grid-column: 1 / -1;
  }

  .fcats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .fc:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }

  .lucky {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
}

/* 2026-11-25 Claude 보정: 성격 유형 직업 칩 */
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}.chips .ch{font:600 13px var(--sans);padding:6px 10px;border-radius:999px;background:var(--dn-soft);color:var(--dn);border:0}

/* 상단 전환 줄(.bsw) 브레이크포인트는 공용 /topnav.css 에서 통합 관리 */
