@import url('./marks.css');
/*
  앱 화면 목업 공용 — apps/app 의 RN 스타일을 수치 그대로 옮긴 것.
  화면 한 장 = 390×844(iPhone 14 · safe-area 위 47 / 아래 34). 랜딩은 이 페이지를 iframe 으로 끼운다.
  출처는 규칙마다 주석으로 남긴다. 값을 "비슷하게" 고르지 않는다.
*/

html,
body {
  width: 390px;
  height: 844px;
  overflow: hidden;
}

body.screen {
  position: relative;
  background: var(--bg-subtle);
  font-size: 14px;
  line-height: 20px;
}

/* ── 상태바(iOS) ─────────────────────────────────────────── */
.statusbar {
  position: absolute;
  inset: 0 0 auto;
  height: 47px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 26px 0 34px;
  font-family: -apple-system, 'SF Pro Text', var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
}
.statusbar .sb-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 스크롤 영역 — 헤더는 위에 떠 있고 목록이 그 밑으로 지나간다 */
.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-top: 95px; /* 47 + 헤더 48 */
  padding-bottom: 112px; /* LIST_TAIL */
}
.page::-webkit-scrollbar {
  display: none;
}

/* ── 머리줄(홈·탭 제호) — index.tsx HEADER_H 48 ────────── */
.appbar {
  position: absolute;
  inset: 0 0 auto;
  height: 95px;
  padding-top: 47px;
  z-index: 20;
  background: var(--bg-subtle);
}
.appbar-row {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}
.appbar .title {
  font-size: 20px;
  line-height: 25px;
  font-weight: 700;
}
.appbar .actions, .shead .actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  margin-right: 0;
}
/* IconBar — 36×40, 바탕 없음 */
.iconbtn {
  width: 36px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--body);
}

/* ── 탭바 — tab-bar.tsx ───────────────────────────────── */
.tabbar {
  position: absolute;
  inset: auto 0 0;
  height: 88px; /* 54 + safe-area 34 */
  z-index: 25;
  background: var(--bg);
  border-top: 0.5px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}
.tabbar .bar {
  height: 54px;
  display: flex;
}
.tabbar .tab {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
}
.tabbar .tab .dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--text);
}
.tabbar .tab .badge {
  position: absolute;
  top: 11px;
  left: calc(50% + 8px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid var(--bg);
}
/* 홈 인디케이터 */
.home-ind {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #000;
  z-index: 40;
}

/* ── 공용 글자 역할 — theme.ts type ───────────────────── */
.rowtitle {
  font-size: 14.5px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text);
}
.rowline {
  font-size: 11.5px;
  line-height: 16px;
  color: var(--text-muted);
}
.chev {
  color: var(--icon-off);
  flex: none;
}
.ellip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 홈 패널 — home-layout.ts ─────────────────────────── */
.panels {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}
.panel {
  background: var(--card);
  border-radius: 24px;
  padding: 16px;
  overflow: hidden;
}
.panel.thin {
  padding: 12px 16px;
}
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.sec-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}
.sec-head .cap {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-faint);
}
.sec-head .chev {
  height: 20px;
  display: grid;
  place-items: center;
}
/* 패널 안 가로 레일 — 패널 끝까지 번진다 */
.rail {
  display: flex;
  gap: 10px;
  margin: 0 -16px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail > * {
  flex: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row .txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ibox {
  flex: none;
  display: grid;
  place-items: center;
}

/* ── 홈 카드 — HomeAuctionCard 156 폭 ─────────────────── */
.hcard {
  width: 156px;
}
.hcard .ph {
  position: relative;
  height: 104px;
  border-radius: 12px;
  background: var(--bg-subtle);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hcard .ph > img.fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pill-date {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pill-date.today {
  background: var(--danger);
}
.heart {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.hcard .mark-wrap {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: 90%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.hcard .match {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hcard.has-match .mark-wrap {
  max-width: 52%;
}
.hcard .name {
  margin-top: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}
.hcard .meta {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-faint);
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.hcard .price-row {
  margin-top: 4px;
}
.hcard .price {
  font-size: 14px;
  line-height: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fails {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: var(--rise);
  font-variant-numeric: tabular-nums;
}

/* ── 목록 카드 — auction-card.tsx compact ─────────────── */
.lcard {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  background: var(--card);
  border-radius: 16px;
}
.lcard .thumb {
  flex: none;
  position: relative;
  width: 88px;
  height: 70px;
  border-radius: 12px;
  background: var(--bg-subtle);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.lcard .thumb img.fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lcard .thumb .sold-band {
  position: absolute;
  inset: auto 0 0;
  padding: 2px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 9.5px;
  line-height: 12px;
  font-weight: 700;
  text-align: center;
}
.lcard .main {
  flex: 1;
  min-width: 0;
}
.lcard .name {
  font-size: 14px;
  line-height: 19px;
  font-weight: 600;
}
.lcard .where {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.lcard .price-row {
  margin-top: 6px;
}
.lcard .price {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lcard .marks {
  margin-top: 4px;
  display: flex;
  gap: 4px;
  min-width: 0;
}
.lcard .side {
  flex: none;
  align-self: stretch;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}
.dday {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dday.today {
  color: var(--danger);
}

/* ── 전면 탭 — ui/pager-tabs.tsx ──────────────────────── */
.pager {
  display: flex;
  height: 50px;
  border-bottom: 1px solid var(--line);
}
.pager > div {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.65;
}
.pager > div.on {
  font-weight: 700;
  color: var(--text);
  opacity: 1;
}
.pager > div.on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--text);
}

/* ── BAR 칩 — control-skin.ts (canvas 면) ─────────────── */
.chip {
  flex: none;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--chip-canvas);
  color: var(--body);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.chip.on {
  background: #000;
  border-color: #000;
  color: #fff;
}
/* 흰 면 위 칩(BAR_OFF) */
.chip.plain {
  background: var(--bg-subtle);
}

/* 떠 있는 둥근 단추 — floating-bar.tsx */
.fab {
  position: absolute;
  z-index: 22;
  padding: 4px;
  border-radius: 999px;
  border: 0.5px solid var(--line);
  background: rgba(246, 248, 250, 0.97);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
}
.fab > div {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

/* 먹색 반전 단추 · 흰 단추 — ui/button.tsx */
.btn {
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}
.btn.accent {
  background: var(--accent);
  color: #fff;
}
.btn.ink {
  background: #000;
  color: #fff;
}
.btn.soft {
  background: var(--bg-subtle);
  color: var(--text);
}
