/* DearCurio — 보라 · 금빛 골동품점 (기획 04 확정 디자인 방향)
 * 화려한 배경과 달리 버튼 · 본문은 읽기 쉬운 대비와 충분한 여백 · 모바일은 인물/검색/추천 카드의 우선순위를 다시 놓는다 (데스크톱 그림을 줄이지 않는다).
 */
:root {
  --ink: #140b1c; --plum: #1f1229; --plum2: #2b1838; --plum3: #3a2149; --line: rgba(230, 195, 122, .22); --line2: rgba(255, 255, 255, .09);
  --gold: #e6c37a; --gold2: #f6dfa4; --gold3: #b98a3e; --cream: #f7ecd6; --cream2: #efe0c2; --paper-ink: #2a1a2e; --paper-muted: #6e5a62;
  --text: #f4ead8; --muted: #b9a7c2; --muted2: #8e7c99; --violet: #4b2c6b; --violet2: #6b3fa0; --red: #c44b4b; --green: #7fc59a;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; --script: 'Playfair Display', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --tab: 64px; --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body { margin: 0; min-height: 100vh; background: radial-gradient(140% 60% at 50% 0%, #2a1538 0%, var(--ink) 60%) fixed, var(--ink); color: var(--text); font: 15.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
input, textarea, select { font: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; padding-bottom: calc(var(--tab) + var(--safe-b) + 24px); min-height: 100vh; }
body.notab .app { padding-bottom: calc(var(--safe-b) + 24px); }
body.wide .app { max-width: none; }

/* ── 로고 ── */
.logo { font: italic 700 40px/1 var(--script); letter-spacing: -.01em; background: linear-gradient(180deg, #fff3cf 0%, var(--gold) 45%, #b4802f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(0,0,0,.45)); white-space: nowrap; }
.logo i { font-style: italic; }
.logo.sm { font-size: 26px; }
.tagline { font: italic 500 18px/1.25 var(--serif); color: var(--cream); text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.soft { font: 600 10px/1.2 var(--sans); letter-spacing: .1em; padding: 3px 8px; border-radius: 99px; border: 1px solid rgba(230,195,122,.55); background: rgba(20,11,28,.55); color: var(--gold); white-space: nowrap; }

/* ── 위 · 아래 내비게이션 ── */
.topnav { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: calc(var(--tab) + var(--safe-b)); padding: 0 6px var(--safe-b); background: linear-gradient(180deg, rgba(31,18,41,.92), rgba(20,11,28,.98)); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabbar a { display: grid; justify-items: center; gap: 3px; padding: 9px 0 10px; color: var(--muted); font-size: 11px; }
.tabbar a.on { color: var(--gold); }
.tabbar a.plus b { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f7dfa0, var(--gold) 50%, #a7762c); color: var(--ink); box-shadow: 0 4px 18px rgba(230,195,122,.35), 0 0 0 4px rgba(20,11,28,.9); }
.tabbar a.plus svg { width: 26px; height: 26px; stroke-width: 2.2; }
.tabbar .tab-face { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; border: 1.5px solid currentColor; }
.tabbar .tab-face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
body.notab .tabbar { display: none; }
.badge-dot { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font: 600 10px/16px var(--sans); text-align: center; }

/* ── 머리줄 ── */
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 56px; padding: calc(var(--safe-t) + 4px) 8px 4px; background: linear-gradient(180deg, rgba(20,11,28,.96), rgba(20,11,28,.82)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line2); }
.bar h1 { margin: 0; text-align: center; font-size: 22px; font-weight: 600; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.float { position: absolute; left: 0; right: 0; background: linear-gradient(180deg, rgba(20,11,28,.75), transparent); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ic { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--cream); }
.ic.glass { background: rgba(20,11,28,.5); border: 1px solid var(--line2); }

/* ── 단추 · 입력 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; letter-spacing: .01em; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-gold { background: linear-gradient(180deg, #f8e2a8, var(--gold) 55%, #c4943f); color: #2a1709; box-shadow: 0 6px 20px rgba(230,195,122,.25), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-plum { background: linear-gradient(180deg, #4a2a63, #2f1a40); color: var(--cream); border: 1px solid rgba(230,195,122,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--cream); border: 1px solid var(--line2); }
.btn-line { border: 1px solid rgba(230,195,122,.6); color: var(--gold); }
.btn-danger { background: #8c2f3a; color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.field { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); outline: none; font-size: 16px; }
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230,195,122,.15); }
textarea.field { resize: vertical; min-height: 120px; line-height: 1.5; }
label.lbl { display: block; margin: 18px 2px 6px; font-weight: 600; font-size: 14px; color: var(--cream); }
label.lbl em { color: var(--gold); font-style: normal; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.err { color: #ffb0a8; font-size: 14px; margin: 8px 2px 0; }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; min-height: 60vh; }

/* ── 칩 · 갈래 ── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: rgba(75,44,107,.9); color: #f1e3ff; border: 1px solid rgba(255,255,255,.15); white-space: nowrap; }
.chip.gold { background: rgba(230,195,122,.16); color: var(--gold2); border-color: rgba(230,195,122,.45); }
.chip.tale { background: rgba(20,11,28,.72); color: var(--gold2); border-color: rgba(230,195,122,.4); }
.chip.ai { background: rgba(20,11,28,.72); color: #e6dcff; }
.cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px 12px 2px; }
.cat { display: grid; justify-items: center; gap: 5px; padding: 6px 0; border-radius: 12px; color: var(--cream); font-size: 11.5px; }
.cat svg { width: 26px; height: 26px; color: var(--gold); stroke-width: 1.5; }
.cat.on { background: rgba(230,195,122,.12); }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow button { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--cream); font-size: 13.5px; }
.chiprow button.on { background: linear-gradient(180deg, #f8e2a8, var(--gold)); color: #2a1709; border-color: transparent; font-weight: 600; }

/* ── 첫 화면 (Splash) ── */
.splash { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--safe-t) + 30px) 24px calc(var(--safe-b) + 34px); background: #1a0f22 url('/img/keeper-splash.webp') center 30% / cover no-repeat; text-align: center; overflow: hidden; }
.splash::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,11,28,.75) 0%, rgba(20,11,28,0) 30%, rgba(20,11,28,0) 62%, rgba(20,11,28,.92) 100%); }
.splash > * { position: relative; }
.splash .logo { font-size: 54px; }
.splash .tagline { margin: 10px auto 0; max-width: 260px; }
.splash .btn { width: min(320px, 100%); margin: 0 auto; }
.splash .fine { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ── 홈 (Explore) ── */
.hero { position: relative; }
.hero-m { position: relative; height: 330px; background: #1a0f22 url('/img/keeper-bust.webp') 88% 12% / 122% auto no-repeat; }
.hero-m::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,11,28,.55) 0%, rgba(20,11,28,0) 26%, rgba(20,11,28,0) 60%, var(--ink) 100%); }
.hero-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 10px) 12px 0 16px; }
.hero-top .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hero-top .acts { display: flex; gap: 6px; }
.bubble { position: absolute; z-index: 2; right: 10px; top: 104px; max-width: 168px; padding: 14px 16px; border-radius: 22px 22px 22px 6px; background: linear-gradient(180deg, #fbf1dc, #ecd9b4); color: var(--paper-ink); font: italic 600 17px/1.25 var(--serif); box-shadow: 0 8px 26px rgba(0,0,0,.45); border: 1px solid #c9a660; }
.bubble::before { content: ''; position: absolute; left: -9px; bottom: 10px; border: 9px solid transparent; border-right-color: #ecd9b4; border-left: 0; }
.search { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; margin: -34px 16px 4px; height: 54px; padding: 0 8px 0 18px; border-radius: 999px; background: rgba(20,11,28,.88); border: 1.5px solid rgba(230,195,122,.65); box-shadow: 0 8px 30px rgba(0,0,0,.45), inset 0 0 18px rgba(230,195,122,.07); }
.search svg { color: var(--gold); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font: italic 500 18px var(--serif); }
.search input::placeholder { color: #cdbfa6; }
.search button[type=submit] { flex: none; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--gold); color: #2a1709; font-weight: 600; font-size: 14px; }
.gift { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 12px 14px; border-radius: 16px; background: linear-gradient(90deg, rgba(230,195,122,.16), rgba(75,44,107,.35)); border: 1px solid var(--line); }
.gift .coin { flex: none; }
.gift b { color: var(--gold2); }
.gift .btn { margin-left: auto; }
.sec { margin-top: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 16px; }
.sec-head h2 { margin: 0; font-size: 25px; color: var(--gold2); font-style: italic; }
.sec-head h2 .sp { color: var(--gold); font-style: normal; font-size: 16px; }
.sec-head a { font-size: 13.5px; color: var(--gold); white-space: nowrap; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; padding: 12px 16px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px 16px; }
.share-cta { display: flex; align-items: center; gap: 14px; margin: 24px 16px 0; padding: 16px; border-radius: 20px; background: linear-gradient(120deg, rgba(75,44,107,.85), rgba(31,18,41,.95)); border: 1px solid var(--line); overflow: hidden; position: relative; }
.share-cta img { flex: none; width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.share-cta b { display: block; font: 600 21px/1.2 var(--serif); color: var(--gold2); }
.share-cta span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.foot { padding: 26px 20px 8px; text-align: center; font-size: 12.5px; color: var(--muted2); }
.foot button { text-decoration: underline; color: var(--muted); }

/* ── 큐리오 카드 (양피지) ── */
.card { position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--cream); color: var(--paper-ink); box-shadow: 0 8px 24px rgba(0,0,0,.4); border: 1.5px solid #c9a660; }
.card .pic { position: relative; aspect-ratio: 1 / .82; background: #2b1838 center / cover no-repeat; }
.card .pic .chip { position: absolute; left: 8px; bottom: 8px; height: 22px; font-size: 11.5px; }
.card .pic .tale { position: absolute; right: 8px; top: 8px; height: 20px; font-size: 10px; padding: 0 7px; }
.card .pic .you { position: absolute; left: 8px; top: 8px; height: 20px; font-size: 10px; background: #2f7a4d; border-color: transparent; color: #fff; }
.card .pic .you.out { background: var(--red); }
.card .body { display: flex; flex-direction: column; flex: 1; padding: 9px 11px 10px; }
.card h3 { margin: 0; font: 700 17px/1.15 var(--serif); color: #24142a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.card .why { margin: 6px 0 0; font: italic 500 14px/1.3 var(--serif); color: #5a3d63; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid rgba(80,50,30,.18); font-size: 12px; color: var(--paper-muted); }
.card .row .cr { font: 700 17px var(--serif); color: #24142a; display: inline-flex; align-items: center; gap: 4px; }
.card .row .t { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card .row .t svg { width: 14px; height: 14px; }
.card .row .t.soon { color: #a3332f; font-weight: 600; }
.coin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1c4, #e6c37a 45%, #a7762c); box-shadow: inset 0 0 0 1.5px rgba(120,80,20,.5); position: relative; vertical-align: -2px; flex: none; }
.coin::after { content: '✦'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; color: #7a4d12; line-height: 1; }
.coin.lg { width: 22px; height: 22px; } .coin.lg::after { font-size: 11px; }

/* ── 큐리오 상세 ── */
.detail-pic { position: relative; aspect-ratio: 1 / .9; background: #2b1838 center / cover no-repeat; }
.detail-pic::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(247,236,214,1)); }
.paper { position: relative; margin-top: -40px; padding: 0 18px 22px; background: var(--cream); color: var(--paper-ink); border-radius: 0 0 22px 22px; }
.paper .chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.paper h1 { margin: 10px 0 8px; font: 700 30px/1.08 var(--serif); color: #22122a; }
.paper .story { font: 500 18px/1.5 var(--serif); color: #3a2840; white-space: pre-line; margin: 0; }
.paper .note { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--gold3); background: rgba(185,138,62,.1); border-radius: 0 12px 12px 0; font: italic 600 17px/1.35 var(--serif); color: #4a2f55; }
.paper .note small { display: block; margin-top: 4px; font: 500 12.5px var(--sans); color: var(--paper-muted); font-style: normal; }
.paper .meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--paper-muted); }
.paper .meta .face { width: 34px; height: 34px; }
.paper .disclaimer { margin: 12px 0 0; font-size: 12.5px; color: var(--paper-muted); line-height: 1.45; }
.paper .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.paper .tags span { font-size: 12.5px; color: #5a3d63; background: rgba(75,44,107,.1); padding: 3px 9px; border-radius: 99px; }
.face { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--plum3); color: var(--gold); font: 700 16px var(--serif); flex: none; border: 1.5px solid rgba(230,195,122,.6); }
.face img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.face.lg { width: 92px; height: 92px; font-size: 34px; border-width: 2px; }
.box { margin: 16px; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(58,33,73,.75), rgba(31,18,41,.9)); border: 1px solid var(--line); }
.box h2 { margin: 0 0 10px; font-size: 21px; color: var(--gold2); }
.stat2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat2 > div { padding: 12px; border-radius: 14px; background: rgba(20,11,28,.5); border: 1px solid var(--line2); }
.stat2 small { display: block; font-size: 12.5px; color: var(--muted); }
.stat2 b { display: flex; align-items: center; gap: 6px; font: 700 26px/1.2 var(--serif); color: var(--cream); }
.stat2 b.time { color: var(--gold2); }
.stat2 b.time.soon { color: #ff9b8f; }
.bidbar { position: sticky; bottom: calc(var(--tab) + var(--safe-b) + 8px); z-index: 10; margin: 0 16px; }
body.notab .bidbar { bottom: calc(var(--safe-b) + 10px); }
.status-line { margin: 10px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.status-line.good { color: var(--green); }
.status-line.warn { color: #ffb0a8; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line2); }
.hist li:last-child { border: 0; }
.hist .face { width: 32px; height: 32px; font-size: 13px; }
.hist .who { flex: 1; min-width: 0; }
.hist .who b { display: block; font-weight: 600; font-size: 14.5px; }
.hist .who span { font-size: 12px; color: var(--muted); }
.hist .amt { font: 700 18px var(--serif); display: inline-flex; gap: 5px; align-items: center; }
.hist li.top .amt { color: var(--gold2); }
.hist li.you .who b::after { content: ' · you'; color: var(--gold); font-weight: 500; }

/* ── 라이브 ── */
.live-top { position: relative; height: 300px; background: #2b1838 center / cover no-repeat; }
.live-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,11,28,.4), rgba(20,11,28,0) 30%, rgba(20,11,28,.95) 100%); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; background: #c23b3b; color: #fff; font: 700 12px var(--sans); letter-spacing: .06em; }
.live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.live-title { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 14px; }
.live-title h1 { margin: 8px 0 0; font-size: 28px; line-height: 1.1; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.bump { animation: bump .6s; }
@keyframes bump { 30% { transform: scale(1.08); color: #fff; } }

/* ── 입찰 시트 ── */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,5,14,.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 26px 20px calc(22px + var(--safe-b)); border-radius: 26px 26px 0 0; background: linear-gradient(180deg, #2f1b3e, #1d1027); color: var(--text); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
.sheet h2 { margin: 0 0 6px; padding-right: 34px; font: italic 600 26px/1.2 var(--serif); color: var(--gold2); }
.sheet p { margin: 0 0 14px; }
.sheet .btn { width: 100%; margin-top: 10px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--muted); }
.sheet .warn { color: #ffb0a8; font-size: 14px; }
.bid-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(20,11,28,.5); border: 1px solid var(--line2); margin: 12px 0; }
.bid-item .th { width: 58px; height: 58px; border-radius: 10px; background: center / cover; flex: none; }
.bid-item b { font: 600 18px/1.2 var(--serif); color: var(--cream); }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; font-size: 15px; }
.kv b { font: 700 20px var(--serif); display: inline-flex; gap: 6px; align-items: center; }
.bid-input { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--gold); background: rgba(230,195,122,.08); }
.bid-input input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--gold2); font: 700 26px var(--serif); text-align: right; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.quick button { height: 40px; border-radius: 99px; border: 1px solid rgba(230,195,122,.55); color: var(--gold2); font-weight: 600; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0; }
.avgrid button { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px transparent; }
.avgrid button.on { box-shadow: 0 0 0 3px var(--gold); }
.avgrid img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.nickrow { display: flex; gap: 8px; align-items: center; }
.nickrow .field { flex: 1; }
.radio { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 14px; margin: 8px 0; background: rgba(255,255,255,.04); }
.radio.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(230,195,122,.2); }
.radio b { display: block; color: var(--cream); }
.radio span { font-size: 13.5px; color: var(--muted); }
.radio i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted2); margin-top: 3px; }
.radio.on i { border: 5px solid var(--gold); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold); }
.fb-stars { display: flex; gap: 6px; margin: 10px 0; }
.fb-stars button { font-size: 30px; color: #5d4a69; }
.fb-stars button.on { color: var(--gold); }

/* ── 입장 암호 · 18세 ── */
.dw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, rgba(20,11,28,.6), rgba(20,11,28,.92)), #1a0f22 url('/img/shop-bg.webp') center / cover; color: var(--text); }
.gate-card { width: 100%; max-width: 360px; text-align: center; padding: 28px 22px; border-radius: 24px; background: rgba(20,11,28,.72); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gate-card .logo { font-size: 46px; margin-bottom: 8px; }
.gate-card .soft { display: inline-block; margin: 2px 0 8px; }
.gate-card .tagline { margin: 4px 0 18px; font-size: 17px; color: var(--gold2); }
.gate-card p { color: var(--muted); }
.gate-card input { width: 100%; height: 52px; margin: 12px 0 8px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-size: 16px; outline: none; text-align: center; }
.gate-card .btn { width: 100%; margin-top: 8px; }

/* ── 토스트 ── */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 16px); transform: translate(-50%, 20px); max-width: min(440px, 92vw); padding: 12px 18px; border-radius: 14px; background: #3a2149; border: 1px solid var(--line); color: #fff; font-size: 14.5px; box-shadow: 0 8px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: all .25s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.notab .toast { bottom: calc(var(--safe-b) + 90px); }

/* ── 탭 (세그먼트) · 목록 ── */
.seg { display: flex; gap: 6px; margin: 12px 16px 4px; padding: 4px; border-radius: 99px; background: rgba(20,11,28,.6); border: 1px solid var(--line2); }
.seg button { flex: 1; height: 38px; border-radius: 99px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: linear-gradient(180deg, #4a2a63, #34204a); color: var(--gold2); border: 1px solid rgba(230,195,122,.55); font-weight: 600; }
.subseg { display: flex; gap: 8px; padding: 6px 16px; }
.subseg button { height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; color: var(--cream); }
.subseg button.on { background: rgba(230,195,122,.16); border-color: var(--gold); color: var(--gold2); font-weight: 600; }
.list { display: grid; gap: 10px; padding: 10px 16px; }
.lrow { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(58,33,73,.6), rgba(31,18,41,.85)); border: 1px solid var(--line); }
.lrow .th { flex: none; width: 76px; height: 76px; border-radius: 12px; background: #2b1838 center / cover no-repeat; border: 1px solid rgba(230,195,122,.35); }
.lrow .mid { flex: 1; min-width: 0; }
.lrow .mid b { display: block; font: 600 18px/1.2 var(--serif); color: var(--cream); }
.lrow .mid small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.lrow .mid .cr { font: 700 18px var(--serif); color: var(--gold2); display: inline-flex; gap: 5px; align-items: center; }
.lrow .end { flex: none; text-align: right; font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: rgba(196,75,75,.85); color: #fff; white-space: nowrap; }
.pill.calm { background: rgba(255,255,255,.08); color: var(--cream); border: 1px solid var(--line2); }
.pill.good { background: rgba(47,122,77,.85); }
.pill svg { width: 13px; height: 13px; }
.empty { text-align: center; padding: 40px 28px; color: var(--muted); }
.empty h3 { margin: 0 0 6px; font-size: 24px; color: var(--cream); }
.empty .btn { margin-top: 16px; }
.empty img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 2px solid var(--gold); }

/* ── 프로필 ── */
.ptop { display: flex; gap: 16px; align-items: center; margin: 14px 16px 0; padding: 16px; border-radius: 20px; background: linear-gradient(120deg, rgba(75,44,107,.6), rgba(31,18,41,.9)); border: 1px solid var(--line); }
.ptop h1 { margin: 0; font-size: 28px; color: var(--cream); }
.ptop small { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 12px; gap: 6px; }
.stats b { display: block; font: 700 24px/1.1 var(--serif); color: var(--cream); }
.stats span { font-size: 12px; color: var(--muted); }
.purse { margin: 14px 16px 0; padding: 16px; border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, rgba(230,195,122,.22), rgba(31,18,41,.95) 60%); border: 1px solid rgba(230,195,122,.4); }
.purse .big { display: flex; align-items: center; gap: 10px; font: 700 34px/1 var(--serif); color: var(--gold2); }
.purse small { color: var(--muted); }
.menu { margin: 14px 16px 0; border-radius: 18px; overflow: hidden; background: rgba(31,18,41,.85); border: 1px solid var(--line); }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border-bottom: 1px solid var(--line2); text-align: left; color: var(--cream); }
.menu a:last-child, .menu button:last-child { border: 0; }
.menu svg { color: var(--gold); }
.menu .r { margin-left: auto; color: var(--muted); }
.coll { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 16px; }
.coll a { aspect-ratio: 1; border-radius: 12px; background: #2b1838 center / cover; border: 1.5px solid rgba(230,195,122,.55); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.soft-note { margin: 14px 24px 8px; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--muted2); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.ledger li span { color: var(--muted); }
.ledger .plus { color: var(--green); font-weight: 600; } .ledger .minus { color: #ffb0a8; font-weight: 600; }

/* ── 인터뷰 (Share Your Luck) ── */
.keeper-head { position: relative; display: flex; gap: 14px; align-items: flex-end; padding: 18px 16px 0; }
.keeper-head img { width: 112px; height: 140px; object-fit: cover; object-position: 50% 15%; border-radius: 18px; border: 1.5px solid rgba(230,195,122,.6); flex: none; }
.keeper-head .bubble { position: relative; top: auto; right: auto; max-width: none; flex: 1; margin-bottom: 18px; font-size: 18px; }
.chat { display: grid; gap: 12px; padding: 16px 16px 110px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; }
.msg .face { width: 34px; height: 34px; }
.msg p { margin: 0; padding: 12px 14px; border-radius: 18px; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; }
.msg.keeper p { background: linear-gradient(180deg, #fbf1dc, #ecd9b4); color: var(--paper-ink); border-bottom-left-radius: 6px; font: italic 600 17.5px/1.35 var(--serif); }
.msg.guest { margin-left: auto; flex-direction: row-reverse; }
.msg.guest p { background: rgba(75,44,107,.85); color: #fff; border-bottom-right-radius: 6px; border: 1px solid rgba(255,255,255,.12); }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #7a5a3a; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.composer { position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; z-index: 10; display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-b)); background: linear-gradient(180deg, rgba(20,11,28,0), rgba(20,11,28,.96) 30%); }
.composer textarea { flex: 1; min-height: 50px; max-height: 160px; padding: 13px 16px; border-radius: 24px; border: 1px solid var(--line); background: rgba(31,18,41,.95); color: var(--text); outline: none; resize: none; font-size: 16px; line-height: 1.4; }
.composer .send { flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--gold); color: #2a1709; display: grid; place-items: center; }
.composer .send svg { stroke-width: 2.2; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px; }
.kinds button { height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--cream); font-size: 14px; }
.kinds button.on { background: rgba(230,195,122,.18); border-color: var(--gold); color: var(--gold2); font-weight: 600; }
.workbench { text-align: center; padding: 36px 24px; }
.workbench img { width: 150px; height: 150px; margin: 0 auto 18px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 2px solid var(--gold); box-shadow: 0 0 40px rgba(230,195,122,.25); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 60px rgba(230,195,122,.5); } }
.form { padding: 4px 16px 20px; }
.photo-slot { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; border: 1.5px dashed rgba(230,195,122,.5); background: rgba(255,255,255,.03); }
.photo-slot .th { width: 96px; height: 96px; border-radius: 12px; background: #2b1838 center / cover; flex: none; display: grid; place-items: center; color: var(--gold); font: italic 600 13px var(--serif); text-align: center; padding: 6px; }
.price-row { display: flex; gap: 8px; align-items: center; }
.price-row .field { flex: 1; font: 700 20px var(--serif); color: var(--gold2); }

/* ── 낙찰 · 증서 ── */
.won { position: relative; min-height: 100vh; padding: calc(var(--safe-t) + 20px) 20px calc(var(--safe-b) + 30px); text-align: center; background: radial-gradient(80% 50% at 50% 30%, rgba(230,195,122,.25), transparent 70%); overflow: hidden; }
.won h1 { margin: 10px 0 4px; font: italic 700 38px/1.1 var(--script); background: linear-gradient(180deg, #fff3cf, var(--gold) 50%, #b4802f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.won .frame { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 18px auto; border-radius: 50%; background: center / cover; border: 4px solid var(--gold); box-shadow: 0 0 0 8px rgba(230,195,122,.18), 0 0 60px rgba(230,195,122,.45); }
.won h2 { margin: 6px 0; font-size: 26px; color: var(--cream); }
.won p { color: var(--muted); max-width: 360px; margin: 8px auto; }
.cert { margin: 18px auto 0; max-width: 380px; padding: 16px 18px; border-radius: 14px; background: var(--cream); color: var(--paper-ink); border: 2px solid #c9a660; box-shadow: inset 0 0 0 4px var(--cream), inset 0 0 0 5px #c9a660; text-align: left; }
.cert h3 { margin: 0 0 6px; font: italic 700 20px var(--serif); text-align: center; color: #3a2148; }
.cert dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 13.5px; }
.cert dt { color: var(--paper-muted); } .cert dd { margin: 0; font-weight: 600; }
.cert .fine { margin: 10px 0 0; font-size: 11.5px; color: var(--paper-muted); line-height: 1.4; }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px var(--gold); animation: fall linear infinite; opacity: .8; }
@keyframes fall { from { transform: translateY(-20px); } to { transform: translateY(105vh); } }
.msgbox { margin: 16px auto 0; max-width: 380px; text-align: left; padding: 14px; border-radius: 16px; background: rgba(31,18,41,.85); border: 1px solid var(--line); }
.msgbox q { display: block; font: italic 600 17px/1.4 var(--serif); color: var(--cream); quotes: '“' '”'; }
.msgbox small { color: var(--muted); }

/* ── 알림 ── */
.notes .lrow.fresh { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(230,195,122,.3); }
.notes .ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(230,195,122,.14); color: var(--gold); font-size: 20px; }

/* ── 자매품 ── */
.sister { padding: 26px 16px 0; }
.sister-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sister-home { text-decoration: underline; }
.sister-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sister-row::-webkit-scrollbar { display: none; }
.sister-card { flex: none; width: 124px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); }
.sister-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.sister-name { display: block; font-weight: 600; font-size: 14px; }
.sister-tag { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* ── 사용법 ── */
.prose { padding: 8px 20px 30px; }
.prose h2 { margin: 24px 0 6px; font-size: 23px; color: var(--gold2); }
.prose p, .prose li { color: var(--muted); }
.prose p b, .prose li b { color: var(--cream); }

/* ── PC 가로 줄 넘기기 (시리즈 sister/phase1.md 9절) ── */
.pcrail { position: relative; }
.pcnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(20,11,28,.8); color: var(--gold); font-size: 11px; display: grid; place-items: center; cursor: pointer; }
.pcnav.l { left: 4px; } .pcnav.r { right: 4px; }
.pcnav[hidden] { display: none; }
.pcrail.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
.pcrail.more-l > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%); mask-image: linear-gradient(90deg, transparent, #000 10%); }
.pcrail.more-l.more-r > :first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pcrail > .dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.pcrail > .dragging * { pointer-events: none; }

@media (max-width: 359px) {
  .cats { grid-template-columns: repeat(4, 1fr); }
  .bubble { max-width: 150px; font-size: 15px; top: 86px; }
  .logo { font-size: 34px; }
  .rail { grid-auto-columns: 62%; }
}

/* ══ 데스크톱: 메인 비주얼을 그대로 펼친다 (기획 04 — 줄이지 않고 다시 놓는다) ══ */
@media (min-width: 900px) {
  body { --tab: 0px; }
  .tabbar { display: none; }
  .topnav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 28px; background: linear-gradient(180deg, rgba(20,11,28,.95), rgba(20,11,28,.8)); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .topnav nav { display: flex; gap: 6px; margin-left: auto; }
  .topnav nav a { padding: 8px 16px; border-radius: 99px; color: var(--cream); font: 600 18px var(--serif); border: 1px solid transparent; }
  .topnav nav a.on { color: var(--gold2); border-color: rgba(230,195,122,.55); background: rgba(230,195,122,.08); }
  .topnav-r { display: flex; align-items: center; gap: 8px; }
  .me-chip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--gold); color: var(--gold); }
  .me-chip img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
  .me-chip svg { width: 22px; height: 22px; }
  body.notab .topnav { display: none; }
  .app { max-width: 760px; padding-bottom: 40px; }
  body.wide .app { max-width: 1280px; padding: 0 28px 40px; }
  .bar { top: 64px; }
  body.notab .bar { top: 0; }
  .bidbar { bottom: 16px; }
  .toast { bottom: 24px; }
  .sheet { border-radius: 26px; margin-bottom: 6vh; border-bottom: 1px solid var(--line); }
  .overlay { align-items: center; }

  /* 홈: 큰 장면 + 왼쪽 갈래 + 오른쪽 로고 · 말풍선 · 검색 */
  .hero-d { display: grid !important; position: relative; grid-template-columns: 200px 1fr; gap: 0; height: min(560px, 62vh); margin: 18px 0 0; border-radius: 28px; overflow: hidden; background: #1a0f22 url('/img/keeper-hero.webp') 18% 30% / cover no-repeat; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
  .hero-d::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,11,28,.55) 0%, rgba(20,11,28,0) 22%, rgba(20,11,28,0) 42%, rgba(20,11,28,.55) 70%, rgba(20,11,28,.8) 100%), linear-gradient(0deg, rgba(20,11,28,.85), transparent 30%); }
  .hero-d > * { position: relative; }
  .hero-d .side { margin: 22px 0 22px 22px; padding: 14px 10px; border-radius: 22px; background: rgba(20,11,28,.72); border: 1px solid var(--line); align-self: start; }
  .hero-d .side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--cream); font: 600 17px var(--serif); }
  .hero-d .side a svg { color: var(--gold); width: 22px; height: 22px; }
  .hero-d .side a.on, .hero-d .side a:hover { background: rgba(230,195,122,.14); }
  .hero-d .right { justify-self: end; width: min(520px, 52%); margin-right: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
  .hero-d .logo { font-size: 78px; }
  .hero-d .tagline { font-size: 24px; margin-top: -6px; }
  .hero-d .bubble { position: relative; top: auto; right: auto; max-width: 380px; padding: 18px 24px; font-size: 21px; border-radius: 28px; }
  .hero-d .bubble::before { display: none; }
  .hero-d .search { width: 100%; margin: 0; height: 60px; }
  .hero-m, .cats, .home-m-only { display: none !important; }
  .home .sec-head { padding: 0 4px; }
  .home .sec-head h2 { font-size: 32px; }
  .home .rail, .home .grid { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 14px 0; }
  .home .rail > :nth-child(n+9) { display: none; }
  .home .share-cta, .home .gift { margin-left: 0; margin-right: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  body.wide .grid { grid-template-columns: repeat(4, 1fr); }
  .detail-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; padding-top: 20px; }
  .detail-wrap .detail-pic { border-radius: 24px; overflow: hidden; aspect-ratio: 1; }
  .detail-wrap .detail-pic::after { display: none; }
  .detail-wrap .paper { margin-top: 0; border-radius: 24px; padding-top: 18px; }
  .detail-wrap .box { margin: 16px 0; }
  .detail-wrap .bidbar { margin: 0; position: static; }
  .sister { padding-left: 0; padding-right: 0; }
}
.hero-d { display: none; }
@media (min-width: 900px) {
  body.wide.notab .app { padding: 0; }
  .splash { align-items: flex-end; text-align: center; padding: 8vh 7vw; background-image: url('/img/keeper-hero.webp'); background-position: 20% 30%; }
  .splash::before { background: linear-gradient(90deg, rgba(20,11,28,0) 30%, rgba(20,11,28,.55) 60%, rgba(20,11,28,.85) 100%); }
  .splash > div { width: min(520px, 42vw); }
  .splash .logo { font-size: 92px; }
  .splash .tagline { font-size: 26px; max-width: none; }
}
body:has(.overlay) .toast, body:has(.dw-gate) .toast { bottom: auto; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -20px); }
body:has(.overlay) .toast.show, body:has(.dw-gate) .toast.show { transform: translate(-50%, 0); }
.paper .chip.gold { background: rgba(185,138,62,.16); color: #7a4d12; border-color: rgba(185,138,62,.55); }
.subseg { overflow-x: auto; scrollbar-width: none; }
.subseg::-webkit-scrollbar { display: none; }
.subseg button, .btn-sm { flex: none; white-space: nowrap; }
