@import "tailwindcss";

/* ============================ 디자인 변수 ============================ */
:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f6f4f1;
  --fg:#17140f;
  --muted:#8b857c;
  --faint:#b9b2a8;
  --border:#e9e4dc;
  --elev:0 2px 14px rgba(30,24,14,.10);

  --joseon:#3b4cc0;
  --samgukji:#d63a2f;
  --greek:#0a8f6b;
  --greek-2:#e0a91b;

  --ig:linear-gradient(45deg,#f9a03f 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);

  --nav-h:58px;
  --top-h:52px;
  --r:14px;
  font-family:"Apple SD Gothic Neo","Pretendard","Malgun Gothic","Noto Sans KR",system-ui,-apple-system,sans-serif;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#000000; --surface:#0c0b0a; --surface-2:#161412;
    --fg:#f4f1ec; --muted:#9a938a; --faint:#5c564e; --border:#262320;
    --elev:0 2px 16px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"]{
  --bg:#000000; --surface:#0c0b0a; --surface-2:#161412;
  --fg:#f4f1ec; --muted:#9a938a; --faint:#5c564e; --border:#262320;
  --elev:0 2px 16px rgba(0,0,0,.6);
}
:root[data-theme="light"]{
  --bg:#ffffff; --surface:#ffffff; --surface-2:#f6f4f1;
  --fg:#17140f; --muted:#8b857c; --faint:#b9b2a8; --border:#e9e4dc;
  --elev:0 2px 14px rgba(30,24,14,.10);
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  background:var(--bg);
  color:var(--fg);
  overscroll-behavior:none;
}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}
img{display:block;max-width:100%}
ul{list-style:none}

/* ============================ 앱 셸 (반응형) ============================ */
#app{
  position:relative;
  width:100%;
  height:100dvh;
  background:var(--bg);
  display:flex;flex-direction:column;
  overflow:hidden;
}
.main{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;min-width:0;position:relative}
.brand{display:none}

/* ============================ 상단바 ============================ */
.topbar{
  height:var(--top-h);flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid var(--border);
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter:saturate(1.4) blur(8px);
  position:relative;z-index:5;
}
.wordmark{font-size:24px;font-weight:800;letter-spacing:-.02em;display:flex;align-items:center;gap:6px}
.wordmark b{background:var(--ig);-webkit-background-clip:text;background-clip:text;color:transparent}
.wordmark .dot{font-size:13px;color:var(--muted);font-weight:600;letter-spacing:0}
.topbar .actions{display:flex;gap:18px;align-items:center}
.topbar .actions button{color:var(--fg);display:grid;place-items:center}
.topbar .actions svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}
.topbar h2{font-size:16px;font-weight:700}

/* ============================ 스크린 ============================ */
.screen{
  flex:1 1 auto;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
}
.screen::-webkit-scrollbar{width:0}

/* ------ 피드 그리드 (모바일 2열) ------ */
.grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}
.card{
  position:relative;aspect-ratio:9/16;border-radius:var(--r);overflow:hidden;
  background:#222;isolation:isolate;transition:transform .12s ease;
}
.card:active{transform:scale(.975)}
.card .cover{position:absolute;inset:0;display:grid;place-items:center}
.card .cov-vid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.card .emoji{font-size:58px;filter:drop-shadow(0 3px 8px rgba(0,0,0,.35));opacity:.92}
.card .shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 42%,rgba(0,0,0,.72) 100%)}
.card .meta{position:absolute;left:9px;right:9px;bottom:8px;z-index:2}
.card .title{
  color:#fff;font-size:12.5px;font-weight:700;line-height:1.28;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  text-shadow:0 1px 3px rgba(0,0,0,.5);
}
.card .sub{display:flex;align-items:center;gap:4px;margin-top:5px;color:rgba(255,255,255,.9);font-size:11px;font-variant-numeric:tabular-nums}
.card .sub svg{width:12px;height:12px;fill:currentColor}
.badge{
  position:absolute;top:8px;left:8px;z-index:2;
  display:inline-flex;align-items:center;gap:4px;
  padding:3px 8px;border-radius:999px;
  font-size:10.5px;font-weight:700;color:#fff;
  background:rgba(0,0,0,.32);backdrop-filter:blur(3px);
}
.badge i{width:7px;height:7px;border-radius:50%;display:inline-block}
.play-fab{position:absolute;top:8px;right:8px;z-index:2;width:24px;height:24px;border-radius:50%;
  background:rgba(0,0,0,.35);backdrop-filter:blur(3px);display:grid;place-items:center}
.play-fab svg{width:12px;height:12px;fill:#fff;margin-left:1px}

/* ------ 섹션 헤더 ------ */
.sec-h{display:flex;align-items:baseline;justify-content:space-between;padding:16px 14px 4px}
.sec-h h3{font-size:16px;font-weight:800;letter-spacing:-.01em}
.sec-h span{font-size:12px;color:var(--muted)}

/* ------ 검색 ------ */
.searchbar{position:sticky;top:0;z-index:4;background:var(--bg);padding:10px 12px;border-bottom:1px solid var(--border)}
.searchbox{display:flex;align-items:center;gap:8px;background:var(--surface-2);border-radius:11px;padding:9px 12px}
.searchbox svg{width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:2;flex:0 0 auto}
.searchbox input{flex:1;background:none;border:none;outline:none;color:var(--fg);font-size:14px}
.searchbox input::placeholder{color:var(--faint)}
.chips{display:flex;gap:8px;overflow-x:auto;padding:10px 12px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;padding:7px 13px;border-radius:999px;background:var(--surface-2);
  font-size:13px;font-weight:600;color:var(--muted);border:1px solid transparent;transition:.15s}
.chip[aria-pressed="true"]{background:var(--fg);color:var(--bg)}
.empty{padding:60px 24px;text-align:center;color:var(--muted);font-size:14px;line-height:1.6}

/* ------ 내 채널 ------ */
.profile{padding:20px 16px 6px}
.profile .row{display:flex;align-items:center;gap:18px}
.avatar{width:74px;height:74px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;overflow:hidden;
  color:#fff;font-size:30px;font-weight:800;background:var(--ig)}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.avatar.lg{width:92px;height:92px;font-size:38px}
.nav-av{overflow:hidden}
.nav-av img{width:100%;height:100%;object-fit:cover;display:block}
.stats{flex:1;display:flex;justify-content:space-around;text-align:center}
.stats b{display:block;font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.stats span{font-size:12px;color:var(--muted)}
.bio{margin-top:12px}
.bio .name{font-weight:700;font-size:14px}
.bio .bio-txt{font-size:13px;color:var(--fg);margin-top:3px;line-height:1.45;white-space:pre-wrap}
.bio .bio-txt.muted{color:var(--faint)}

/* 프로필 편집 시트 */
.pe-avatar{display:flex;flex-direction:column;align-items:center;gap:10px;padding:6px 0 14px}
.pe-av-btns{display:flex;gap:8px}
.pe-av-btns button{font-size:13px;font-weight:700;color:var(--samgukji);padding:6px 12px;border-radius:9px;background:var(--surface-2)}
.pe-av-btns button.rm{color:var(--muted)}
.pe-bio{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:11px 13px;
  color:var(--fg);outline:none;font-size:14px;font-family:inherit;resize:none;line-height:1.5}
.pe-bio:focus{border-color:var(--samgukji)}
.token-card{display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:14px 0 2px;padding:14px 16px;border-radius:14px;border:1px solid var(--border);
  background:linear-gradient(135deg,rgba(220,39,67,.06),rgba(188,24,136,.06))}
.token-card .tk-left{display:flex;flex-direction:column;gap:1px;min-width:0}
.token-card .tk-left span{font-size:11.5px;color:var(--muted);font-weight:600}
.token-card .tk-left b{font-size:23px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.15}
.token-card .tk-left em{font-size:11px;color:var(--muted);font-style:normal;margin-top:2px}
.token-card .tk-btn{flex:0 0 auto;padding:11px 20px;border-radius:11px;color:#fff;font-weight:800;font-size:13px;
  background:var(--ig);box-shadow:0 4px 12px rgba(220,39,67,.28)}
.pf-actions{display:flex;gap:8px;margin:12px 0 4px}
.pf-actions button{flex:1;padding:8px;border-radius:9px;background:var(--surface-2);font-size:13px;font-weight:700}
.pf-tabs{display:flex;border-top:1px solid var(--border);margin-top:12px}
.pf-tabs button{flex:1;padding:11px;display:grid;place-items:center;color:var(--faint);border-bottom:2px solid transparent}
.pf-tabs button[aria-selected="true"]{color:var(--fg);border-bottom-color:var(--fg)}
.pf-tabs svg{width:22px;height:22px;fill:currentColor}

/* ============================ 하단 탭바 ============================ */
.nav{
  position:absolute;left:0;right:0;bottom:0;z-index:20;
  height:calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  display:flex;align-items:stretch;
  background:color-mix(in srgb,var(--bg) 92%,transparent);
  backdrop-filter:saturate(1.4) blur(10px);
  border-top:1px solid var(--border);
}
.nav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted)}
.nav button .lbl{font-size:10px;font-weight:600}
.nav button svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9}
.nav button[aria-current="true"]{color:var(--fg)}
.nav button[aria-current="true"] svg{fill:currentColor;stroke:currentColor}
.nav .create{flex:0 0 64px;position:relative}
.nav .create .plus{
  width:44px;height:32px;border-radius:11px;background:var(--ig);
  display:grid;place-items:center;box-shadow:0 4px 12px rgba(220,39,67,.35);
}
.nav .create .plus svg{width:22px;height:22px;stroke:#fff;stroke-width:2.4;fill:none}
.nav .create .lbl{color:var(--fg)}

/* ============================ 만들기 바텀시트 ============================ */
.scrim{position:absolute;inset:0;z-index:40;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .22s}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{
  position:absolute;left:0;right:0;bottom:0;z-index:50;
  background:var(--surface);border-radius:22px 22px 0 0;
  transform:translateY(101%);transition:transform .28s cubic-bezier(.22,1,.36,1);
  max-height:92%;display:flex;flex-direction:column;
  padding-bottom:env(safe-area-inset-bottom);
  box-shadow:0 -8px 40px rgba(0,0,0,.35);
  pointer-events:none;   /* 닫혔을 땐 뒤 콘텐츠 클릭을 가로막지 않음 */
}
.sheet.on{transform:translateY(0);pointer-events:auto}
.sheet .grab{width:38px;height:4px;border-radius:2px;background:var(--faint);margin:9px auto 4px}
.sheet-h{display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px;border-bottom:1px solid var(--border)}
.sheet-h h3{font-size:17px;font-weight:800}
.sheet-h button{color:var(--muted);font-size:22px;line-height:1;padding:4px}
.sheet-body{overflow-y:auto;padding:16px}
.step-label{font-size:13px;font-weight:700;color:var(--muted);margin:2px 2px 10px}
.step-label b{color:var(--fg)}

.scn-list{display:flex;flex-direction:column;gap:10px}
.scn{
  display:flex;align-items:center;gap:14px;padding:14px;border-radius:16px;
  border:1.5px solid var(--border);background:var(--surface);text-align:left;transition:.14s;width:100%;
}
.scn:active{transform:scale(.99)}
.scn[aria-pressed="true"]{border-color:var(--sc);background:color-mix(in srgb,var(--sc) 8%,var(--surface))}
.scn .ic{width:48px;height:48px;border-radius:13px;display:grid;place-items:center;font-size:26px;flex:0 0 auto;
  background:color-mix(in srgb,var(--sc) 15%,var(--surface))}
.scn .tx{flex:1}
.scn .tx .t{font-weight:800;font-size:15px}
.scn .tx .d{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.4}
.scn .ck{width:22px;height:22px;border-radius:50%;border:2px solid var(--border);flex:0 0 auto;display:grid;place-items:center}
.scn[aria-pressed="true"] .ck{background:var(--sc);border-color:var(--sc)}
.scn[aria-pressed="true"] .ck::after{content:"";width:7px;height:11px;border:2.5px solid #fff;border-top:0;border-left:0;transform:rotate(42deg) translateY(-1px)}

.field{margin-top:20px}
.field > label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}
.input{display:flex;align-items:center;gap:8px;background:var(--surface-2);border-radius:12px;padding:12px 14px;border:1.5px solid transparent}
.input:focus-within{border-color:var(--fg)}
.input svg{width:17px;height:17px;color:var(--muted);flex:0 0 auto}
.input input{flex:1;background:none;border:none;outline:none;color:var(--fg);font-size:15px}
.input input::placeholder{color:var(--faint)}
.hint{font-size:11.5px;color:var(--muted);margin-top:7px;line-height:1.5;padding:0 2px}

.sheet-foot{padding:12px 16px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface)}
.cta{width:100%;padding:15px;border-radius:14px;font-size:15px;font-weight:800;color:#fff;background:var(--ig);
  transition:.15s;box-shadow:0 6px 18px rgba(220,39,67,.32)}
.cta:disabled{background:var(--surface-2);color:var(--faint);box-shadow:none;cursor:not-allowed}

/* 생성중 상태 */
.making{padding:30px 20px;text-align:center}
.making .spin{width:52px;height:52px;border-radius:50%;border:4px solid var(--surface-2);border-top-color:var(--sc,#dc2743);margin:0 auto 18px;animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.making h4{font-size:17px;font-weight:800}
.making p{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.6}
.making .job{margin-top:16px;background:var(--surface-2);border-radius:12px;padding:12px 14px;font-size:12.5px;text-align:left;color:var(--muted);line-height:1.7}
.making .job b{color:var(--fg)}

/* ============================ 릴스형 뷰어 ============================ */
.viewer{position:absolute;inset:0;z-index:60;background:#000;display:none;flex-direction:column}
.viewer.on{display:flex}
.viewer .vtop{position:absolute;top:0;left:0;right:0;z-index:3;display:flex;align-items:center;gap:14px;
  padding:14px 16px;padding-top:calc(14px + env(safe-area-inset-top));
  background:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}
.viewer .vtop button{color:#fff;display:flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:50%;background:rgba(0,0,0,.4);flex:0 0 auto}
.viewer .vtop button svg{width:22px;height:22px}
.viewer .vtop h2{color:#fff;font-size:16px;font-weight:700}
.vframe{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden}
.vstage{flex:1;position:relative;display:grid;place-items:center;overflow:hidden}
.vstage .cover{position:absolute;inset:0;display:grid;place-items:center}
.vstage .cover .emoji{font-size:120px;opacity:.9;filter:drop-shadow(0 6px 20px rgba(0,0,0,.5))}
.vstage video{width:100%;height:100%;object-fit:contain;background:#000}
.vbig{position:relative;z-index:2;width:74px;height:74px;border-radius:50%;background:rgba(255,255,255,.14);
  backdrop-filter:blur(4px);display:grid;place-items:center;border:1.5px solid rgba(255,255,255,.5)}
.vbig svg{width:30px;height:30px;fill:#fff;margin-left:4px}
.vrail{position:absolute;right:10px;bottom:120px;z-index:3;display:flex;flex-direction:column;gap:20px;align-items:center}
.vrail button{color:#fff;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}
.vrail svg{width:29px;height:29px;fill:#fff}
.vbottom{position:absolute;left:0;right:64px;bottom:0;z-index:3;padding:16px;
  padding-bottom:calc(20px + env(safe-area-inset-bottom));
  background:linear-gradient(0deg,rgba(0,0,0,.6),transparent)}
.vbottom .vt{color:#fff;font-weight:800;font-size:17px;line-height:1.3}
.vbottom .vn{color:rgba(255,255,255,.86);font-size:13px;margin-top:8px;line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vbottom .vbadge{margin-bottom:10px}
.note-pill{display:inline-block;margin-top:12px;font-size:11px;color:rgba(255,255,255,.7);
  background:rgba(255,255,255,.12);padding:5px 10px;border-radius:8px}

/* ============================ 데스크톱(웹): 좌측 사이드바 + 4열 피드 ============================ */
@media (min-width:860px){
  #app{flex-direction:row}
  .nav{
    position:static;flex:0 0 244px;height:100%;
    flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;
    padding:18px 14px;border-top:none;border-right:1px solid var(--border);
    background:var(--bg);backdrop-filter:none;
  }
  .brand{display:flex;align-items:baseline;gap:7px;padding:8px 12px 22px;font-size:25px;font-weight:800;letter-spacing:-.02em}
  .brand b{background:var(--ig);-webkit-background-clip:text;background-clip:text;color:transparent}
  .brand span{font-size:11px;color:var(--muted);font-weight:600}
  .nav button{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:16px;padding:12px 12px;border-radius:12px;transition:background .15s}
  .nav button:hover{background:var(--surface-2)}
  .nav button .lbl{font-size:15px;font-weight:600}
  .nav button svg{width:24px;height:24px}
  .nav button[aria-current="true"]{background:var(--surface-2)}
  .nav button[aria-current="true"] .lbl{font-weight:800}
  .nav .create{flex:0 0 auto;margin-top:4px}
  .nav .create .plus{width:30px;height:30px;border-radius:9px}
  .nav .create .plus svg{width:19px}
  .nav-foot{display:block;margin-top:auto;padding-top:12px;border-top:1px solid var(--border)}
  .nav-login{width:100%;padding:12px;border-radius:12px;background:var(--samgukji);color:#fff;font-size:15px;font-weight:800}
  .nav-me{display:flex;align-items:center;gap:10px;padding:6px 4px}
  .nav-av{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--ig);color:#fff;font-weight:800;font-size:14px;flex:0 0 auto}
  .nav-nm{flex:1;font-size:14px;font-weight:700;color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nav-logout{font-size:12px;font-weight:700;color:var(--muted);flex:0 0 auto}
  .topbar{display:none}
  .screen{padding-bottom:24px}
  .grid{grid-template-columns:repeat(4,1fr);gap:18px;padding:22px 26px;max-width:1240px;margin:0 auto}
  .sec-h{padding:24px 26px 2px;max-width:1240px;margin:0 auto}
  .sec-h h3{font-size:22px}
  .searchbar{padding:16px 26px;max-width:1240px;margin:0 auto}
  .chips{padding:6px 26px 14px;max-width:1240px;margin:0 auto}
  .ch-wrap{max-width:1240px;margin:0 auto}
  .sheet{left:50%;right:auto;bottom:auto;top:50%;width:min(460px,92vw);max-height:86vh;
    border-radius:22px;transform:translate(-50%,-46%);opacity:0;
    transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s}
  .sheet.on{transform:translate(-50%,-50%);opacity:1}
  .sheet .grab{display:none}
  .viewer.on{align-items:center;justify-content:center}
  .vframe{position:relative;inset:auto;width:min(430px,26vw);height:min(90vh,780px);
    border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.6)}
}

/* 좋아요 눌림 상태 */
.vrail button.liked svg{fill:#ff3b5c}

/* 댓글 패널 (뷰어 하단 시트) */
.cmts{position:absolute;left:0;right:0;bottom:0;z-index:5;max-height:64%;display:flex;flex-direction:column;
  background:var(--surface);border-radius:18px 18px 0 0;color:var(--fg);box-shadow:0 -8px 30px rgba(0,0,0,.4)}
.cmts-h{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--border);font-weight:800;font-size:14px}
.cmts-h button{color:var(--muted);font-size:20px;line-height:1}
.cmts-list{flex:1;overflow-y:auto;padding:6px 16px}
.cmts-empty{color:var(--muted);font-size:13px;text-align:center;padding:30px 0}
.cmt{padding:9px 0;border-bottom:1px solid var(--border)}
.cmt .who{font-size:12px;color:var(--muted);font-weight:700}
.cmt .bd{font-size:14px;margin-top:2px;line-height:1.4}
.cmt .del{font-size:11px;color:var(--faint);float:right}
.cmt .rep{margin:8px 0 0 16px;padding-left:10px;border-left:2px solid var(--border)}
.cmts-in{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--border);align-items:center}
.cmts-in input{flex:1;background:var(--surface-2);border:none;border-radius:20px;padding:10px 14px;color:var(--fg);outline:none;font-size:14px}
.cmts-in button{color:var(--samgukji);font-weight:800;padding:0 8px;font-size:14px}
.cmts-in button:disabled{color:var(--faint)}

/* 업장 검색 → 후보 선택 */
.lbl-sub{font-weight:500;color:var(--muted);font-size:11px}
.input.search{align-items:center}
.srch-btn{flex:0 0 auto;padding:8px 14px;border-radius:9px;background:var(--fg);color:var(--bg);font-size:13px;font-weight:800}
.srch-btn:disabled{opacity:.4}
.places{margin:8px 0 0;list-style:none;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--surface);max-height:230px;overflow-y:auto}
.places li+li{border-top:1px solid var(--border)}
.places button{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;padding:11px 13px;background:none}
.places button:hover{background:var(--surface-2)}
.places b{font-size:14px;font-weight:700;color:var(--fg)}
.places span{font-size:12px;color:var(--muted)}
.picked{margin:8px 0 0;display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;
  border:1.5px solid color-mix(in srgb,var(--sc,#22c55e) 55%,var(--border));background:color-mix(in srgb,var(--sc,#22c55e) 8%,var(--surface))}
.picked .pk-body{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.picked .pk-body b{font-size:15px;font-weight:800;color:var(--fg)}
.picked .pk-body b::before{content:"✓ ";color:#22c55e}
.picked .pk-body span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pk-change{flex:0 0 auto;font-size:12.5px;font-weight:800;color:var(--muted);padding:6px 10px;border-radius:8px;background:var(--surface-2)}
.place-loading{margin:10px 2px 0;display:flex;align-items:center;gap:9px;font-size:13px;color:var(--muted)}
.spin.sm{width:16px;height:16px;border-width:2px;margin:0}
.hint.ok{color:#16a34a}
.hint.warn{color:#d97706}

/* SNS 연동 카드 (내 채널) */
.sns-card{margin:14px 16px 4px;border:1px solid var(--border);border-radius:16px;background:var(--surface);overflow:hidden}
.sns-h{display:flex;align-items:baseline;gap:8px;padding:13px 16px 9px;border-bottom:1px solid var(--border)}
.sns-h span{font-size:14px;font-weight:800}
.sns-h em{font-style:normal;font-size:11.5px;color:var(--muted)}
.sns-row{display:flex;align-items:center;gap:11px;padding:11px 16px}
.sns-row+.sns-row{border-top:1px solid var(--border)}
.sns-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:color-mix(in srgb,var(--sc) 16%,transparent)}
.sns-ic svg{width:20px;height:20px;fill:var(--sc);stroke:var(--sc)}
.sns-name{flex:1;font-size:14px;font-weight:600;display:flex;align-items:center;gap:6px}
.sns-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;display:inline-block}
.sns-soon{font-style:normal;font-size:10.5px;font-weight:800;color:var(--muted);background:var(--surface-2);padding:2px 7px;border-radius:10px}
.sns-btn{padding:7px 15px;border-radius:20px;font-size:13px;font-weight:800;background:var(--fg);color:var(--bg)}
.sns-btn.on{background:var(--surface-2);color:var(--muted)}
.sns-btn:disabled{opacity:.5}

/* SNS 업로드 시트 (뷰어) — .cmts 레이아웃 재사용 */
.cmts.share .share-list{flex:1;overflow-y:auto;padding:8px 12px}
.share-row{display:flex;align-items:center;gap:12px;width:100%;padding:13px 8px;background:none}
.share-row+.share-row{border-top:1px solid var(--border)}
.share-name{flex:1;text-align:left;font-size:15px;font-weight:700;color:var(--fg)}
.share-state{font-size:12.5px;font-weight:800;color:var(--samgukji)}
.share-row:disabled .share-state{color:var(--faint)}
.share-hint{padding:10px 16px 14px;font-size:12px;color:var(--muted);line-height:1.5}
.share-hint b{color:var(--fg)}

/* 토스트 */
.toast{position:fixed;left:50%;bottom:86px;z-index:60;transform:translate(-50%,14px);opacity:0;pointer-events:none;
  max-width:min(88vw,420px);padding:12px 18px;border-radius:14px;background:rgba(20,18,16,.94);color:#fff;
  font-size:13.5px;font-weight:600;line-height:1.45;text-align:center;box-shadow:0 10px 34px rgba(0,0,0,.4);
  transition:opacity .2s,transform .2s}
.toast.on{opacity:1;transform:translate(-50%,0)}
@media (min-width:860px){.toast{bottom:32px}}

/* 로그인 모달 */
.login{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.5)}
.login-card{position:relative;width:100%;max-width:340px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px;
  background:var(--surface);border-radius:20px;padding:34px 26px 26px;box-shadow:0 24px 70px rgba(0,0,0,.45)}
.login-x{position:absolute;top:12px;right:14px;color:var(--muted);font-size:19px;line-height:1}
.login-brand{display:flex;align-items:baseline;gap:9px}
.login-brand b{font-size:34px;font-weight:800;letter-spacing:-.02em;color:var(--fg)}
.login-brand span{font-size:12px;font-weight:700;color:var(--muted)}
.login-tag{font-size:14px;line-height:1.6;color:var(--muted)}
.login-actions{width:100%;display:flex;flex-direction:column;gap:10px;margin-top:4px}
.login-actions button{width:100%;padding:14px;border-radius:13px;font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px}
.login-actions .kakao{background:#FEE500;color:#191600}
.login-actions .kakao .ki{width:18px;height:18px;border-radius:50%;background:#191600;position:relative}
.login-actions .kakao .ki::after{content:"";position:absolute;left:4px;top:5px;width:10px;height:7px;border-radius:50%;background:#FEE500}
.login-actions .guest{background:var(--surface-2);color:var(--fg)}
.login-actions button:disabled{opacity:.6}
.login-note{font-size:11.5px;color:var(--faint)}

/* 크레딧 충전 상품 */
.prods{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.prod{position:relative;display:grid;grid-template-columns:1fr auto;grid-template-areas:"cr price" "bonus price" "name price";
  align-items:center;gap:2px 12px;text-align:left;padding:14px 16px;border-radius:14px;border:1.5px solid var(--border);background:var(--surface)}
.prod:hover{border-color:var(--samgukji)}
.prod.best{border-color:var(--samgukji);background:color-mix(in srgb,var(--samgukji) 7%,var(--surface))}
.prod:disabled{opacity:.55}
.prod-tag{position:absolute;top:-9px;left:14px;background:var(--samgukji);color:#fff;font-size:10.5px;font-weight:800;padding:2px 8px;border-radius:10px}
.prod-cr{grid-area:cr;font-size:15px;color:var(--muted);font-weight:600}
.prod-cr b{font-size:22px;color:var(--fg);font-weight:800;margin-right:3px}
.prod-bonus{grid-area:bonus;font-size:11.5px;color:var(--samgukji);font-weight:700}
.prod-name{grid-area:name;font-size:12px;color:var(--faint)}
.prod-price{grid-area:price;font-size:16px;font-weight:800;color:var(--fg);white-space:nowrap}

/* 탑바 로그인 버튼(모바일) */
.tb-login{background:var(--samgukji);color:#fff;font-size:13px;font-weight:800;padding:8px 15px;border-radius:20px}
/* 사이드바 하단 로그인/프로필 — 모바일 바텀바에선 숨김(데스크톱 규칙과 충돌 없게 max-width로) */
@media (max-width:859px){.nav-foot{display:none}}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
:focus-visible{outline:2px solid var(--samgukji);outline-offset:2px}
