:root{
  --border:#e5e7eb;
  --bg:#f9fafb;
  --card:#fff;
  --muted:#6b7280;
  --text:#111;
  --active:#111;
}
body{
  margin:0;
  font-family:"Pretendard","Noto Sans KR",system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* ===== Page Layout ===== */
.wrap{
  max-width:1100px;
  margin:14px auto 90px;
  padding:0 14px;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:0 1px 0 rgba(0,0,0,0.02);
}
.row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.section-title{
  font-size:28px;
  font-weight:900;
  margin:0;
}

.btn{
  border:1px solid var(--border);
  background:#111;
  color:#fff;
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:900;
  font-size:14px;
}
.btn.secondary{
  background:#fff;
  color:#111;
}
.btn:disabled{ opacity:0.6; cursor:not-allowed; }

.btn-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.tabs{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}
.tab{
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  padding:10px 16px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.tab.active{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* Keyword Panel */
.kw-panel{
  margin-top:12px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:16px;
  padding:12px;
  display:none;
}
.kw-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.kw-userline{
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.kw-row{
  display:flex;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
  align-items:center;
}
.kw-row input{
  flex:1;
  min-width:220px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  font-weight:800;
  outline:none;
  background:#fff;
}

.kw-chips{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.kw-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--border);
  background:#f9fafb;
  color:#111;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  line-height:1;
}
.kw-chip.active{
  background:#111;
  color:#fff;
  border-color:#111;
}
.kw-del{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  font-weight:900;
  font-size:14px;
  line-height:1;
}
.kw-chip.active .kw-del{ border-color:#fff; }

.muted{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  margin-top:8px;
}

/* Posts */
.posts{ margin-top:16px; }
.post{
  padding:14px 0;
  border-bottom:1px solid var(--border);
}
.post:last-child{ border-bottom:none; }
.post .h{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.post .t{
  margin:0;
  font-weight:900;
  font-size:16px;
  line-height:1.35;
  word-break:break-word;
  flex:1;
  min-width:0;
}
.post .t a{
  color:#111;
  text-decoration:none;
  display:inline-block;
  max-width:100%;
}
.post .t a:hover{ text-decoration:underline; }
.post .d{
  color:#777;
  font-size:12px;
  white-space:nowrap;
  margin-top:2px;
}
.post .s{
  margin-top:6px;
  color:#555;
  font-size:13px;
  line-height:1.45;
  word-break:break-word;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:block;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--border);
  padding:4px 10px;
  border-radius:999px;
  background:#f9fafb;
  font-size:12px;
  font-weight:900;
  color:#111;
}

/* Login Modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:16px;
}
.modal{
  width:100%;
  max-width:520px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,0.25);
  overflow:hidden;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
}
.modal-header h3{
  margin:0;
  font-size:16px;
  font-weight:900;
}
.modal-body{ padding:14px; }
.modal-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* Toast */
.toast-wrap{
  position:fixed;
  left:50%;
  bottom:76px;
  transform:translateX(-50%);
  z-index:2000;
  display:flex;
  flex-direction:column;
  gap:8px;
  pointer-events:none;
}
.toast{
  pointer-events:none;
  background:rgba(17,17,17,0.92);
  color:#fff;
  border:1px solid rgba(255,255,255,0.12);
  padding:10px 12px;
  border-radius:14px;
  font-weight:900;
  font-size:13px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  opacity:0;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease;
  max-width:86vw;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.toast.show{ opacity:1; transform:translateY(0); }

#swipe-root { height: 100%; }
