
:root{
  --bg:#F5F3EE; --surface:#FFFFFF; --ink:#15161A; --muted:#5A5C64; --line:#E4E0D6; --soft:#F8F6F1;
  --accent:#1B1C22; --accent-ink:#F7F5EF; --accent-soft:#ECE8DF;
  --money:#8C6A2E; --money-soft:#F3ECDC;
  --ok:#2F6B51; --ok-soft:#E1EFE7; --warn:#8A5A00; --warn-soft:#F7EDD3; --err:#B3261E; --err-soft:#FBE9E7;
  --scrim:rgb(20 20 24 / .55);
  --font:"Noto Sans KR","Pretendard",system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;
  --r-s:10px; --r-m:14px; --r-l:20px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#111215; --surface:#1A1B20; --ink:#F0EDE5; --muted:#A8A8A1; --line:#2C2D34; --soft:#202127;
    --accent:#E9E3D3; --accent-ink:#16171B; --accent-soft:#2A2A2F;
    --money:#D4B271; --money-soft:#2B2416; --ok:#7CC39D; --ok-soft:#18291F; --warn:#E5B95C; --warn-soft:#2E2614; --err:#FF8C8C; --err-soft:#2E1A1D;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#111215; --surface:#1A1B20; --ink:#F0EDE5; --muted:#A8A8A1; --line:#2C2D34; --soft:#202127;
  --accent:#E9E3D3; --accent-ink:#16171B; --accent-soft:#2A2A2F;
  --money:#D4B271; --money-soft:#2B2416; --ok:#7CC39D; --ok-soft:#18291F; --warn:#E5B95C; --warn-soft:#2E2614; --err:#FF8C8C; --err-soft:#2E1A1D;
  color-scheme:dark;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
html,body{margin:0}
body{background:var(--bg); color:var(--ink); font-family:var(--font); font-size:16px; line-height:1.6; word-break:keep-all; overflow-wrap:anywhere; -webkit-font-smoothing:antialiased}
a{color:inherit}
button,input,select,textarea{font:inherit; color:inherit}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--money); outline-offset:2px}
img{max-width:100%; display:block}
h1,h2,h3,p{margin:0}
h1,h2,h3{text-wrap:balance; line-height:1.35}
.wrap{width:100%; max-width:1080px; margin:0 auto; padding-left:max(16px, env(safe-area-inset-left, 0px)); padding-right:max(16px, env(safe-area-inset-right, 0px))}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.muted{color:var(--muted)}
.num{font-variant-numeric:tabular-nums}


.top{position:sticky; top:0; z-index:20; background:var(--bg); border-bottom:1px solid var(--line); padding-top:env(safe-area-inset-top, 0px)}
.top .wrap{display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:60px}
.logo{font-weight:800; font-size:22px; letter-spacing:.02em; text-decoration:none; white-space:nowrap}
.logo span{color:var(--money)}
.top nav{display:flex; gap:6px; align-items:center}
.top nav a{text-decoration:none; font-size:14px; font-weight:600; padding:8px 12px; border-radius:999px; border:1px solid var(--line); background:var(--surface); white-space:nowrap}
.top nav a:hover{border-color:var(--ink)}
.top nav a.back{background:var(--ink); border-color:var(--ink); color:var(--bg)}
.top nav a.back:hover{opacity:.88}
@media (max-width:360px){ .top nav a{padding:8px 10px} .logo{font-size:20px} }

.bar{background:var(--money-soft); border-bottom:1px solid var(--line)}
.bar .wrap{display:flex; align-items:center; justify-content:space-between; gap:10px; padding-block:10px; font-size:14px}
.bar b{color:var(--money)}
.bar a{font-weight:700; white-space:nowrap; text-decoration:none; color:var(--money)}
.bar a::after{content:" →"}
.testpay{background:var(--warn-soft); color:var(--warn); font-size:13px; font-weight:600; text-align:center; padding:6px 16px; border-bottom:1px solid var(--line)}

main{padding-block:24px 40px; min-height:50vh}


.btn{display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:48px; padding:0 20px; border-radius:var(--r-m); border:1px solid var(--accent); background:var(--accent); color:var(--accent-ink); font-weight:700; font-size:16px; cursor:pointer; text-decoration:none; transition:filter .15s, transform .1s}
.btn:hover{filter:brightness(1.12)}
.btn:active{transform:scale(.99)}
.btn[disabled]{opacity:.55; cursor:not-allowed; filter:none}
.btn.ghost{background:transparent; color:var(--ink); border-color:var(--line)}
.btn.ghost:hover{border-color:var(--ink)}
.btn.wide{width:100%}
.btn.small{min-height:36px; padding:0 12px; font-size:14px; border-radius:var(--r-s)}
.btn.danger{background:transparent; color:var(--err); border-color:color-mix(in srgb, var(--err) 40%, var(--line))}
.linkbtn{background:none; border:0; padding:0; color:var(--muted); text-decoration:underline; text-underline-offset:3px; cursor:pointer; font-size:14px}



.creator{display:flex; align-items:center; gap:14px; margin-bottom:24px}
.creator .cav{flex:none; width:58px; height:58px; border-radius:50%; background:var(--accent); color:var(--accent-ink); display:grid; place-items:center; font-weight:800; font-size:14px; letter-spacing:.04em}
.creator .clab{display:block; font-size:13px; font-weight:600; color:var(--muted)}
.creator h1{font-size:24px; line-height:1.3; text-wrap:balance}
.section-h{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px}
.section-h h1, .section-h h2{font-size:22px}
.grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px}
@media (min-width:700px){ .grid{grid-template-columns:repeat(3, minmax(0,1fr)); gap:16px} }
@media (min-width:960px){ .grid{grid-template-columns:repeat(4, minmax(0,1fr))} }

@media (min-width:700px) and (max-width:959px){ .grid:not(:has(> :nth-child(3))){grid-template-columns:repeat(auto-fit, calc((100% - 32px) / 3)); justify-content:center} }
@media (min-width:960px){ .grid:not(:has(> :nth-child(4))){grid-template-columns:repeat(auto-fit, calc((100% - 48px) / 4)); justify-content:center} }
.pcard{display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m); overflow:hidden; text-decoration:none; min-width:0; transition:border-color .15s, transform .15s}
.pcard:hover{border-color:var(--ink); transform:translateY(-2px)}
.thumb{position:relative; aspect-ratio:1/1; width:100%; max-width:100%; background:var(--soft); overflow:hidden}
.thumb img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.thumb .so{position:absolute; inset:0; display:grid; place-items:center; background:rgb(0 0 0 / .45); color:#fff; font-weight:800; letter-spacing:.06em}
.pcard .meta{display:flex; flex-direction:column; gap:4px; padding:10px 12px 14px; min-width:0}
.pcard .shop{font-size:12.5px; color:var(--muted); font-weight:600}
.pcard .name{font-weight:600; font-size:15px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.pcard .price{font-weight:800; font-size:17px}
.pcard .ship{font-size:12.5px; color:var(--muted)}
.empty{background:var(--surface); border:1px dashed var(--line); border-radius:var(--r-l); padding:40px 20px; text-align:center; display:flex; flex-direction:column; gap:10px; align-items:center}
.empty b{font-size:18px}
.skel{background:linear-gradient(90deg, var(--soft), var(--accent-soft), var(--soft)); background-size:200% 100%; animation:sk 1.2s infinite; border-radius:var(--r-m); min-height:260px}
@keyframes sk{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){ .skel{animation:none} .pcard:hover{transform:none} }


.pd{display:grid; grid-template-columns:1fr; gap:24px}
@media (min-width:880px){ .pd{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:40px; align-items:start} .pd .buy{position:sticky; top:84px} }
.gallery{display:flex; flex-direction:column; gap:10px; min-width:0}
.gallery .main{aspect-ratio:1/1; width:100%; max-width:100%; background:var(--soft); border-radius:var(--r-l); overflow:hidden; border:1px solid var(--line)}
.gallery .main img{width:100%; height:100%; object-fit:cover}
.thumbs{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px}
.thumbs button{flex:0 0 64px; width:64px; height:64px; padding:0; border:2px solid transparent; border-radius:10px; overflow:hidden; background:var(--soft); cursor:pointer}
.thumbs button[aria-current="true"]{border-color:var(--ink)}
.thumbs img{width:100%; height:100%; object-fit:cover}
.buy{display:flex; flex-direction:column; gap:16px; min-width:0}
.buy .shopname{font-size:14px; color:var(--muted); font-weight:600}
.buy h1{font-size:24px}
.buy .price{font-size:28px; font-weight:800}
.facts{display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; margin:0; padding:14px 16px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m); font-size:14.5px}
.facts dt{color:var(--muted); white-space:nowrap}
.facts dd{margin:0; min-width:0}
.qty{display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:var(--r-s); background:var(--surface); overflow:hidden}
.qty button{width:44px; height:44px; border:0; background:transparent; font-size:20px; cursor:pointer}
.qty input{width:52px; height:44px; border:0; text-align:center; background:transparent; font-weight:700}
.total{display:flex; justify-content:space-between; align-items:baseline; padding-top:12px; border-top:1px solid var(--line)}
.total b{font-size:22px}
.info{display:flex; flex-direction:column; gap:12px; margin-top:32px}
.info section{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l); padding:20px; display:flex; flex-direction:column; gap:12px; min-width:0}
.info h2{font-size:18px}
.info .text{white-space:pre-line; font-size:15px; line-height:1.75}
.info .dimgs{display:flex; flex-direction:column; gap:0}
.info .dimgs img{width:100%}
.kv{display:grid; grid-template-columns:minmax(110px, 34%) minmax(0,1fr); border-top:1px solid var(--line); font-size:14.5px}
.kv > div{padding:10px 4px; border-bottom:1px solid var(--line); min-width:0}
.kv > div:nth-child(odd){color:var(--muted); padding-right:12px}
.kv .pre{white-space:pre-line}
.relay{font-size:13px; color:var(--muted); background:var(--soft); border-radius:var(--r-s); padding:10px 12px}
.tabs-jump{display:flex; gap:6px; overflow-x:auto; position:sticky; top:60px; z-index:5; background:var(--bg); padding-block:10px}
.tabs-jump a{flex:none; text-decoration:none; font-size:14px; font-weight:600; padding:7px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface)}


.field{display:flex; flex-direction:column; gap:6px; min-width:0}
.field > label, .field > .lab{font-size:14px; font-weight:700}
.req{color:var(--money); margin-left:2px}
.opt-t{color:var(--muted); font-weight:500; font-size:13px; margin-left:4px}
.hint{font-size:13px; color:var(--muted)}
.input, select.input, textarea.input{width:100%; min-width:0; font-size:16px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-s); padding:11px 13px; min-height:48px; outline:none; transition:border-color .15s, box-shadow .15s}
textarea.input{min-height:96px; resize:vertical; line-height:1.6}
.input:focus{border-color:var(--ink); box-shadow:0 0 0 3px var(--accent-soft)}
.input[aria-invalid="true"]{border-color:var(--err); box-shadow:0 0 0 3px var(--err-soft)}
.row2{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px}
.row3{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px}
@media (max-width:620px){ .row2, .row3{grid-template-columns:1fr} }
.inline{display:flex; gap:8px; align-items:stretch}
.inline .input{flex:1}
.choice{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px}
@media (max-width:420px){ .choice{grid-template-columns:1fr} }
.choice label{position:relative; cursor:pointer}
.choice input{position:absolute; opacity:0; width:1px; height:1px; left:10px; top:10px}
.choice span{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; min-height:56px; padding:8px; border:1px solid var(--line); border-radius:var(--r-s); background:var(--surface); font-weight:700; font-size:15px; line-height:1.3}
.choice span small{font-weight:500; font-size:12px; color:var(--muted)}
.choice input:checked + span{border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); background:var(--accent-soft)}
.choice input:focus-visible + span{outline:3px solid var(--money); outline-offset:2px}
.choice.inv span{border-color:var(--err)}
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l); padding:20px; display:flex; flex-direction:column; gap:16px; min-width:0}
.card h2{font-size:18px}
.consent{border:1px solid var(--line); border-radius:var(--r-m); overflow:hidden; background:var(--surface)}
.consent .row{display:flex; gap:10px; align-items:center; padding:12px 14px; border-top:1px solid var(--line)}
.consent .row:first-child{border-top:0}
.consent .row.all{background:var(--soft); font-weight:700}
.consent input[type=checkbox]{width:20px; height:20px; accent-color:var(--accent); flex:none; margin:0}
.consent label{flex:1; font-size:14.5px; cursor:pointer}
.consent details{border-top:1px solid var(--line); background:var(--soft)}
.consent summary{cursor:pointer; padding:9px 14px 9px 44px; font-size:13px; color:var(--muted)}
.consent .terms{padding:0 14px 12px 44px; font-size:13px; color:var(--muted); line-height:1.7}
.consent .terms p + p{margin-top:6px}
.consent.inv{border-color:var(--err)}
.tg{font-size:12px; font-weight:800; color:var(--money); margin-right:6px}
.err{display:flex; gap:8px; align-items:flex-start; background:var(--err-soft); color:var(--err); border-radius:var(--r-s); padding:11px 13px; font-size:14px; font-weight:600}
.okbox{background:var(--ok-soft); color:var(--ok); border-radius:var(--r-s); padding:11px 13px; font-size:14px; font-weight:600}
.warnbox{background:var(--warn-soft); color:var(--warn); border-radius:var(--r-s); padding:11px 13px; font-size:14px}


.co{display:grid; grid-template-columns:1fr; gap:16px}
@media (min-width:880px){ .co{grid-template-columns:minmax(0,1fr) 360px; align-items:start} .co .sum{position:sticky; top:84px} }
.line{display:flex; gap:12px; align-items:center}
.line img{width:72px; height:72px; border-radius:10px; object-fit:cover; background:var(--soft); flex:none}
.line .t{display:flex; flex-direction:column; gap:2px; min-width:0}
.money{display:flex; flex-direction:column; gap:8px; font-size:15px}
.money div{display:flex; justify-content:space-between; gap:12px}
.money .grand{padding-top:10px; border-top:1px solid var(--line); font-size:18px; font-weight:800}


.rowh{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap}
.status{display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; padding:4px 10px; border-radius:999px; background:var(--accent-soft)}
.status.paid, .status.confirmed, .status.delivered{background:var(--ok-soft); color:var(--ok)}
.status.awaiting_deposit, .status.cancel_requested{background:var(--warn-soft); color:var(--warn)}
.status.canceled, .status.failed, .status.expired{background:var(--err-soft); color:var(--err)}
.status.shipped{background:var(--money-soft); color:var(--money)}
.vbank{display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 14px; background:var(--money-soft); border-radius:var(--r-m); padding:16px; font-size:15px}
.vbank dt{color:var(--muted)} .vbank dd{margin:0; font-weight:700}


.scrim{position:fixed; inset:0; background:var(--scrim); z-index:40}
.modal{position:fixed; z-index:41; left:50%; top:50%; transform:translate(-50%,-50%); width:min(520px, calc(100vw - 24px)); max-height:min(88vh, 720px); background:var(--surface); border-radius:var(--r-l); overflow:hidden; display:flex; flex-direction:column; box-shadow:0 24px 60px rgb(0 0 0 / .35)}
.modal-h{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line)}
.modal-b{overflow:auto; flex:1; min-height:420px}

.toast{position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%); background:var(--ink); color:var(--bg); font-weight:700; font-size:14.5px; padding:12px 18px; border-radius:12px; z-index:60; max-width:calc(100vw - 32px); text-align:center}


.foot{border-top:1px solid var(--line); background:var(--surface); margin-top:24px}
.foot .wrap{padding-block:24px calc(28px + env(safe-area-inset-bottom, 0px)); font-size:12.5px; color:var(--muted); line-height:1.85; display:flex; flex-direction:column; gap:10px}
.foot .links{display:flex; flex-wrap:wrap; gap:4px 16px}
.foot .links a{font-weight:700; color:var(--ink); text-decoration:none; font-size:13px}
.foot .links a.strong{color:var(--money)}
.foot .biz .it{white-space:nowrap}
.foot .biz .it + .it::before{content:" · "; color:var(--muted)}
.foot .biz b{font-weight:500; color:var(--ink)}
@media (max-width:520px){ .foot .biz .it{white-space:normal} .foot .biz .it{display:block} .foot .biz .it + .it::before{content:none} }
.foot .relay{font-size:12.5px}
.foot .escrow b{font-weight:700; color:var(--ink); margin-right:6px}
.foot .escrow a{color:var(--ink); font-weight:600}


.doc{max-width:760px}
.doc h1{font-size:28px; margin-bottom:6px}
.doc h2{font-size:18px; margin:28px 0 10px}
.doc p, .doc li{font-size:15px; line-height:1.8}
.doc ul, .doc ol{padding-left:22px; margin:8px 0}
.doc .tbl{overflow-x:auto; border:1px solid var(--line); border-radius:12px; margin:10px 0; background:var(--surface)}
.doc table{border-collapse:collapse; width:100%; min-width:560px; font-size:14px}
.doc th, .doc td{border-bottom:1px solid var(--line); padding:10px 12px; text-align:left; vertical-align:top}
.doc th{background:var(--soft); white-space:nowrap}
.doc td:first-child{min-width:6.5em; word-break:keep-all}

.doc td{word-break:keep-all; overflow-wrap:break-word; min-width:6.5em}
.doc tr:last-child td{border-bottom:0}


.dash-tabs{display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; margin-bottom:16px}
.dash-tabs button{flex:none; min-height:40px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface); font-weight:700; font-size:14px; cursor:pointer}
.dash-tabs button[aria-pressed="true"]{background:var(--ink); color:var(--bg); border-color:var(--ink)}
.dash-tabs .count{display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px; margin-left:6px; border-radius:999px; background:var(--money); color:#fff; font-size:12px}
.stats{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px}
@media (min-width:760px){ .stats{grid-template-columns:repeat(4, minmax(0,1fr))} }
.stat{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m); padding:14px 16px; min-width:0}
.stat b{display:block; font-size:24px; line-height:1.25}
.stat span{font-size:13px; color:var(--muted)}
.list{display:flex; flex-direction:column; gap:10px}
.item{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-m); padding:14px 16px; display:flex; flex-direction:column; gap:10px; min-width:0}
.item .head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap}
.item .acts{display:flex; gap:8px; flex-wrap:wrap}
.item .sub{font-size:13.5px; color:var(--muted)}
.prow{display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:12px; align-items:center}
.prow img, .prow .noimg{width:64px; height:64px; border-radius:10px; object-fit:cover; background:var(--soft)}
@media (max-width:560px){ .prow{grid-template-columns:56px minmax(0,1fr)} .prow img, .prow .noimg{width:56px; height:56px} .prow .acts{grid-column:1 / -1} }
.formsec{display:flex; flex-direction:column; gap:14px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l); padding:20px}
.formsec h2{font-size:17px; display:flex; align-items:center; gap:8px}
.formsec h2 .num{width:24px; height:24px; border-radius:50%; background:var(--ink); color:var(--bg); display:grid; place-items:center; font-size:13px; flex:none}
.imgs{display:flex; gap:8px; flex-wrap:wrap}
.imgs .im{position:relative; width:88px; height:88px; border-radius:10px; overflow:hidden; background:var(--soft); border:1px solid var(--line)}
.imgs .im img{width:100%; height:100%; object-fit:cover}
.imgs .im .x{position:absolute; top:4px; right:4px; width:26px; height:26px; border-radius:50%; border:0; background:rgb(0 0 0 / .6); color:#fff; cursor:pointer; font-size:14px; line-height:1}
.imgs .im .first{position:absolute; left:4px; bottom:4px; font-size:11px; font-weight:800; background:var(--ink); color:var(--bg); padding:1px 6px; border-radius:6px}
.imgs .add{width:88px; height:88px; border-radius:10px; border:1.5px dashed var(--line); background:transparent; display:grid; place-items:center; cursor:pointer; color:var(--muted); font-size:13px; font-weight:700; text-align:center; line-height:1.3}
.optrow{display:grid; grid-template-columns:minmax(0,1fr) 130px auto auto; gap:8px; align-items:center}
@media (max-width:560px){ .optrow{grid-template-columns:minmax(0,1fr) 110px; } .optrow .chk, .optrow .del{grid-column:auto} }
.chk{display:inline-flex; align-items:center; gap:6px; font-size:14px; white-space:nowrap}
.chk input{width:18px; height:18px; accent-color:var(--accent)}
.tblwrap{overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-m); background:var(--surface)}
.tbl2{border-collapse:collapse; width:100%; min-width:760px; font-size:13.5px}
.tbl2 th, .tbl2 td{padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top}
.tbl2 th{background:var(--soft); white-space:nowrap; font-weight:700}
.tbl2 tr:last-child td{border-bottom:0}
.pill{display:inline-block; font-size:12px; font-weight:700; padding:2px 8px; border-radius:999px; background:var(--accent-soft)}
.pill.ok{background:var(--ok-soft); color:var(--ok)} .pill.warn{background:var(--warn-soft); color:var(--warn)} .pill.err{background:var(--err-soft); color:var(--err)}
.copybox{display:flex; gap:8px; align-items:center; background:var(--soft); border:1px solid var(--line); border-radius:var(--r-s); padding:8px 10px; font-size:13px; word-break:break-all}
.copybox code{flex:1; min-width:0}
