/* take.crowny.org — 밝은 명품(Bright Luxury) 디자인 시스템
   크림/아이보리 베이스 · 골드 액센트 · 세리프 디스플레이 · 부드러운 그림자 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500;600;700&display=swap');

:root {
  --ivory: #FAF7F0;
  --cream: #F3EDE1;
  --paper: #FFFFFF;
  --gold: #C2A14D;
  --gold-deep: #A8842F;
  --gold-soft: #E6D6A8;
  --ink: #2B2018;
  --ink-soft: #6B5E50;
  --line: #ECE3D2;
  --ok: #4F8A5B;
  --warn: #C7892F;
  --bad: #B5524A;
  --shadow: 0 8px 30px rgba(80, 62, 28, 0.08);
  --shadow-sm: 0 2px 10px rgba(80, 62, 28, 0.06);
  --radius: 18px;
  --maxw: 520px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}
.serif { font-family: 'Noto Serif KR', serif; }
.app { max-width: var(--maxw); margin: 0 auto; padding: 0 0 96px; min-height: 100vh; position: relative; }

/* ── 헤더 ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 247, 240, 0.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 20px; display: flex; align-items: center; gap: 10px;
}
.brand { font-family: 'Noto Serif KR', serif; font-weight: 700; font-size: 20px; letter-spacing: .5px; }
.brand .dot { color: var(--gold); }
.brand-sub { font-size: 11px; color: var(--ink-soft); letter-spacing: 2px; margin-left: 2px; }

/* ── 섹션/카드 ── */
.view { padding: 18px 18px 8px; display: none; animation: fade .35s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 16px;
}
.card.hero {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(230,214,168,.35) 0%, rgba(255,255,255,0) 55%),
    var(--paper);
  border: 1px solid var(--gold-soft);
}
.eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--gold-deep); text-transform: uppercase; font-weight: 700; }
h1.title { font-family: 'Noto Serif KR', serif; font-size: 26px; margin: 8px 0 6px; line-height: 1.25; font-weight: 700; }
h2.sec { font-family: 'Noto Serif KR', serif; font-size: 19px; margin: 4px 0 14px; font-weight: 600; }
.muted { color: var(--ink-soft); font-size: 13.5px; }
.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); margin: 16px 0; }

/* ── 폼 ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field label .req { color: var(--gold-deep); margin-left: 3px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #FCFAF5; font-size: 15px; font-family: inherit; color: var(--ink);
  transition: border .2s, background .2s; -webkit-appearance: none; appearance: none;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
input.miss, textarea.miss { border-color: var(--bad); background: #FCF3F2; }
textarea { resize: vertical; min-height: 64px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px; border: none; border-radius: 14px; font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.985); }
.btn.gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff; box-shadow: 0 6px 20px rgba(168,132,47,.35);
}
.btn.gold:disabled { background: #D9CFB8; box-shadow: none; cursor: default; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.sm { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 11px; }

/* ── 캡처 업로드 ── */
.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload {
  position: relative; border: 1.5px dashed var(--gold-soft); border-radius: 16px;
  background: #FCFAF5; aspect-ratio: 3/4; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; cursor: pointer; overflow: hidden; text-align: center; padding: 10px;
}
.upload.filled { border-style: solid; border-color: var(--gold); }
.upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload .badge {
  position: absolute; top: 8px; left: 8px; background: rgba(43,32,24,.78); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 20px; z-index: 2;
}
.upload .cam { font-size: 30px; }
.upload .lab { font-size: 13px; font-weight: 700; }
.upload .sub { font-size: 11px; color: var(--ink-soft); }
.upload input { display: none; }

/* ── 안내/배지 ── */
.note { background: var(--cream); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.65; }
.note b { color: var(--gold-deep); }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin: 10px 0; }
.alert.warn { background: #FCF6E8; border: 1px solid var(--gold-soft); color: #6b531a; }
.alert.bad { background: #FCF1F0; border: 1px solid #F0D6D3; color: #8a3b34; }
.alert.ok { background: #EFF6F0; border: 1px solid #D6E8DA; color: #2f6038; }
.badge-status { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.s0 { background: #F0E9DA; color: #7a6a4a; }
.s1 { background: #FCF6E8; color: var(--gold-deep); }
.s2 { background: #EAF2FB; color: #3a6aa8; }
.s3 { background: #EFF6F0; color: var(--ok); }
.s9 { background: #FCF1F0; color: var(--bad); }

/* ── 계좌 카드 ── */
.acct { background: linear-gradient(135deg,#2B2018,#43352a); color: #fff; border-radius: 16px; padding: 20px; }
.acct .bank { font-size: 13px; color: var(--gold-soft); letter-spacing: 1px; }
.acct .no { font-family: 'Noto Serif KR', serif; font-size: 22px; font-weight: 700; margin: 6px 0; letter-spacing: 1px; }
.acct .copy { background: rgba(255,255,255,.14); border: none; color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ── 주문 리스트 ── */
.order-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.order-item:last-child { border-bottom: none; }
.order-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: var(--cream); }
.order-meta { flex: 1; min-width: 0; }
.order-meta .oid { font-size: 12px; color: var(--ink-soft); }
.order-meta .oname { font-weight: 700; font-size: 15px; margin: 2px 0; }

/* ── 문의 스레드 ── */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.msg { max-width: 80%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.msg.customer { align-self: flex-end; background: linear-gradient(135deg,var(--gold),var(--gold-deep)); color: #fff; border-bottom-right-radius: 5px; }
.msg.admin { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg .who { font-size: 10.5px; opacity: .8; margin-bottom: 3px; font-weight: 700; }
.msg-input { display: flex; gap: 8px; align-items: flex-end; }
.msg-input textarea { min-height: 44px; }

/* ── CS 메뉴(테이크서비스) ── */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px;
  cursor: pointer; transition: transform .12s, box-shadow .2s, border .2s; box-shadow: var(--shadow-sm);
}
.menu-tile:active { transform: scale(.97); }
.menu-tile:hover { border-color: var(--gold-soft); box-shadow: var(--shadow); }
.menu-tile .ic { font-size: 22px; }
.menu-tile .t { font-weight: 700; font-size: 14.5px; margin-top: 8px; }
.menu-tile .d { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }

/* ── 하단 탭 ── */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; max-width: var(--maxw); margin: 0 auto;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4,1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tabbar.tabbar-5 { grid-template-columns: repeat(5,1fr); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: none; background: none; cursor: pointer; color: var(--ink-soft); }
.tab .ti { font-size: 19px; }
.tab .tl { font-size: 11px; font-weight: 600; white-space: nowrap; }
.tabbar-5 .tab .tl { font-size: 10px; }
.tab.active { color: var(--gold-deep); }

/* ── 모달 ── */
.modal-bg { position: fixed; inset: 0; background: rgba(43,32,24,.45); z-index: 60; display: none; align-items: flex-end; justify-content: center; }
.modal-bg.show { display: flex; }
.modal { background: var(--ivory); width: 100%; max-width: var(--maxw); border-radius: 22px 22px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; animation: slideup .3s ease; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.modal .grab { width: 40px; height: 4px; background: var(--line); border-radius: 4px; margin: 0 auto 16px; }
.modal h3 { font-family: 'Noto Serif KR', serif; margin: 0 0 12px; font-size: 19px; }
.toast { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 30px; font-size: 14px; z-index: 80; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.show { opacity: 1; }
/* ── 회원 게이트 ── */
.gate {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(230,214,168,.45) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}
.gate-card { width: 100%; max-width: 380px; background: var(--paper); border: 1px solid var(--gold-soft);
  border-radius: 22px; box-shadow: var(--shadow); padding: 30px 24px; }
.seg { display: flex; background: var(--cream); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg-btn { flex: 1; border: none; background: none; padding: 10px; border-radius: 9px; font-weight: 700;
  font-size: 14px; color: var(--ink-soft); font-family: inherit; cursor: pointer; transition: .2s; }
.seg-btn.active { background: #fff; color: var(--gold-deep); box-shadow: var(--shadow-sm); }
.center { text-align: center; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty .ic { font-size: 40px; opacity: .5; }
