/* ============================================================
   Vibe Board · Web UI kit — component styles
   Imports the shared design tokens, then recreates the
   desktop web component layer (header, hero, cards, forms…).
   Faithful to vibe/app/styles.css.
   ============================================================ */
@import url("colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
img, svg { display: block; max-width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }

/* ---------- Header ---------- */
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.85); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line-soft); }
.app-header__inner { max-width: var(--maxw); margin: 0 auto; height: var(--nav-h); padding: 0 var(--pad-x); display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-word { font-family: 'Inter', 'Pretendard', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.045em; color: var(--ink); white-space: nowrap; }
.brand-caret { display: inline-block; width: 0.12em; height: 0.78em; background: var(--blue); margin-left: 0.16em; border-radius: 1.5px; vertical-align: -0.04em; animation: vb-caret-blink 1.15s steps(1) infinite; }
.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 6px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: var(--r-md); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; transition: background var(--dur-fast), color var(--dur-fast), transform .06s, box-shadow var(--dur-fast); white-space: nowrap; user-select: none; }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(49,130,246,0.22); }
.btn--primary:hover { background: var(--blue-hover); }
/* outline primary — lighter blue action (border + tint on hover) */
.btn--primary-outline { background: transparent; color: var(--blue-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 38%, transparent); }
.btn--primary-outline:hover { background: var(--blue-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 55%, transparent); }
/* secondary is now a clean hairline outline, not a gray fill */
.btn--secondary { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn--secondary:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--muted-3); }
.btn--ghost { background: transparent; color: var(--ink-3); }
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn--outline { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--outline:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink-3); }
/* danger now reads as an outline, not a filled pink block */
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 32%, transparent); }
.btn--danger:hover { background: var(--danger-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 50%, transparent); }
.btn--kakao { background: var(--kakao); color: rgba(0,0,0,0.85); border-radius: 12px; font-weight: 700; gap: 8px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn--lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn svg { width: 15px; height: 15px; }

/* ---------- Hero ---------- */
.hero { padding-block: 56px 32px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: 18px; white-space: nowrap; }
.hero__eyebrow .pulse { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--blue); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(49,130,246,0.5); } 100% { box-shadow: 0 0 0 8px rgba(49,130,246,0); } }
.hero h1 { font-size: clamp(32px, 7vw, 56px); font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; }
.hero h1 em { font-style: italic; color: var(--blue); }
.hero p { margin: 0; font-size: 17px; color: var(--ink-3); max-width: 540px; line-height: 1.6; }
.hero__stats { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__stat { background: var(--surface); border-radius: var(--r-pill); padding: 8px 14px 8px 12px; font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-1); white-space: nowrap; }
.hero__stat b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__stat-ico { font-size: 14px; line-height: 1; }

/* ---------- Filter bar ---------- */
.filter-bar { position: sticky; top: var(--nav-h); z-index: 20; background: rgba(242,244,246,0.92); backdrop-filter: saturate(140%) blur(10px); padding: 12px 0; }
.filter-bar__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
/* bare: 부모가 이미 컨테이너일 때 자체 패딩/센터링 제거 → 칩이 콘텐츠 좌측에 정렬 */
.filter-bar__inner--bare { max-width: none; margin: 0; padding: 0; }
.filter-bar__inner::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast), transform .06s; flex-shrink: 0; }
.chip:hover { background: var(--surface-pressed); }
.chip:active { transform: scale(0.97); }
.chip.is-active { background: var(--ink); color: #fff; }
.chip__count { font-size: 12px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.is-active .chip__count { color: rgba(255,255,255,0.55); }

/* ---------- Section ---------- */
.section { padding-block: 40px 16px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.section__title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 10px; }
.section__badge { display: inline-flex; align-items: center; gap: 4px; background: var(--coral-soft); color: var(--coral-ink); font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.section__link { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.section__link:hover { color: var(--ink); }

/* ---------- Post grid + card ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--surface); border-radius: var(--r-xl); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform var(--dur) ease, box-shadow var(--dur) ease; box-shadow: var(--shadow-1); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.post-card:active { transform: translateY(-1px); }
.post-card__thumb { position: relative; aspect-ratio: 16/11; background: var(--surface-3); overflow: hidden; }
.post-card__thumb--image { background: #111827; }
.post-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.post-card:hover .post-card__image { transform: scale(1.035); }
.post-card__thumb-fill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.96); font-weight: 700; font-size: 28px; letter-spacing: -0.03em; text-align: center; line-height: 1.1; padding: 16px; }
.post-card__cat { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(255,255,255,0.92); color: var(--ink); font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); z-index: 1; }
.post-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.post-card__title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__desc { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__meta { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.post-card__meta span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar--lg { width: 44px; height: 44px; font-size: 16px; }
.dot { width: 2.5px; height: 2.5px; border-radius: var(--r-pill); background: var(--muted-3); flex-shrink: 0; }
.post-card--hero { grid-column: span 2; grid-row: span 2; }
.post-card--hero .post-card__thumb-fill { font-size: 48px; }
.post-card--hero .post-card__title { font-size: 22px; }
.post-card--hero .post-card__desc { font-size: 14.5px; -webkit-line-clamp: 3; }
.post-card--hero .post-card__body { padding: 22px 24px 26px; }

/* ---------- Like button ---------- */
.like-btn { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px 0 10px; border-radius: var(--r-pill); background: rgba(255,255,255,0.94); color: var(--ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); transition: transform .1s, background .15s, color .15s; z-index: 1; white-space: nowrap; }
.like-btn:hover { background: #fff; }
.like-btn:active { transform: scale(0.92); }
.like-btn.is-liked { background: var(--coral); color: #fff; }
.like-btn.is-liked .like-heart { animation: heartPop .32s ease; }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.like-btn svg { width: 14px; height: 14px; }
.like-btn--lg { position: static; height: 52px; padding: 0 22px; border-radius: 14px; font-size: 15px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: none; gap: 8px; }
.like-btn--lg.is-liked { background: var(--coral-soft); color: var(--coral-ink); box-shadow: inset 0 0 0 1px var(--coral-soft); }
.like-btn--lg svg { width: 18px; height: 18px; }

/* ---------- Detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(300px,0.88fr); gap: 52px; padding: 40px 0 60px; }
.detail__crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.detail__crumbs .sep { color: var(--muted-3); }
.detail__title { font-size: clamp(26px,5.4vw,38px); font-weight: 700; line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; }
.detail__byline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.detail__byline b { color: var(--ink); font-weight: 600; }
.detail__thumb { aspect-ratio: 16/11; border-radius: var(--r-2xl); overflow: hidden; position: relative; background: var(--surface-3); box-shadow: var(--shadow-1); }
.detail__thumb img { position: absolute; }
.detail__thumb--image { background: color-mix(in srgb, var(--surface) 82%, #111827 18%); }
.detail__image-bg { inset: -18px; width: calc(100% + 36px); height: calc(100% + 36px); object-fit: cover; filter: blur(22px) saturate(1.12); opacity: 0.38; transform: scale(1.04); }
.detail__image { inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; border-radius: calc(var(--r-2xl) - 14px); background: color-mix(in srgb, var(--surface) 88%, #111827 12%); box-shadow: 0 12px 36px rgba(25,31,40,0.12), 0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent); }
.detail__thumb .post-card__thumb-fill { font-size: clamp(26px,8vw,58px); padding: 24px; }
.detail__content { max-width: 760px; margin-top: 28px; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }
.detail__content p { margin: 0 0 18px; }
.detail-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.detail-card { background: var(--surface); border-radius: var(--r-xl); padding: 18px 20px; box-shadow: var(--shadow-1); }
.detail-card__grid { display: grid; gap: 10px; }
.author-card__row { display: flex; align-items: center; gap: 12px; }
.author-card__name { font-weight: 700; font-size: 15px; }
.author-card__sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.meta-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.meta-row:last-child { border-bottom: none; }
.meta-row dt { color: var(--muted); margin: 0; }
.meta-row dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
.meta-link { color: var(--blue); font-weight: 700; }
.tech-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--blue-soft); color: var(--blue-ink); font-size: 12.5px; font-weight: 700; }

/* ---------- Forms ---------- */
.form-page { max-width: 680px; margin: 0 auto; padding: 56px var(--pad-x) 80px; }
.form-head { margin-bottom: 28px; }
.form-head h1 { font-size: clamp(26px,5vw,34px); font-weight: 700; letter-spacing: -0.035em; margin: 0 0 8px; }
.form-head p { margin: 0; color: var(--ink-3); font-size: 15px; }
.form-fields { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field-label .req { color: var(--coral); margin-left: 2px; }
.field-label .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, .textarea, .select { width: 100%; background: var(--surface); border: none; border-radius: var(--r-md); padding: 14px 16px; font-size: 16px; color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .textarea:hover, .select:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.input:focus, .textarea:focus, .select:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%238B95A1' stroke-width='1.8' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px; }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cat-radio { display: flex; align-items: center; justify-content: center; height: 48px; background: var(--surface); border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); transition: all .12s; cursor: pointer; }
.cat-radio.is-active { background: var(--blue-soft); color: var(--blue-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 45%, transparent); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: box-shadow .15s; text-align: center; }
.dropzone:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.dropzone__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.dropzone__title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dropzone__sub { font-size: 12.5px; color: var(--muted); }
.form-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; margin-top: 12px; border-top: 1px solid var(--line-soft); gap: 12px; }
.form-foot__hint { flex: 1; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Auth ---------- */
.auth-page { max-width: 460px; margin: 0 auto; padding: 64px var(--pad-x) 90px; display: grid; gap: 28px; }
.auth-hero { text-align: center; }
.auth-hero h1 { margin: 0 0 12px; font-size: clamp(30px,6vw,42px); line-height: 1.12; letter-spacing: -0.04em; }
.auth-hero p { margin: 0; color: var(--ink-3); font-size: 16px; line-height: 1.65; }
.auth-card { background: var(--surface); border-radius: var(--r-2xl); padding: 28px; box-shadow: var(--shadow-2); }
.auth-divider { position: relative; margin: 24px 0; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.auth-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-soft); }
.auth-divider span { position: relative; padding: 0 12px; background: var(--surface); }
.oauth-btn { width: 100%; height: 44px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 600; }
.oauth-btn--google { border: 1px solid #747775; background: #fff; color: #1f1f1f; }
.oauth-btn--kakao { background: var(--kakao); color: rgba(0,0,0,0.85); border-radius: 12px; font-weight: 700; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--blue); font-weight: 700; }

/* ---------- Footer ---------- */
.app-footer { border-top: 1px solid var(--line-soft); margin-top: 40px; }
.app-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 32px var(--pad-x); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.app-footer__brand { font-size: 13px; color: var(--muted); line-height: 1.7; }
.app-footer__brand b { color: var(--ink-2); }
.app-footer__links { display: flex; gap: 20px; font-size: 13px; color: var(--muted); font-weight: 600; }
.app-footer__links a:hover { color: var(--ink); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty-state span { display: block; }
.empty-state--card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-xl); box-shadow: var(--shadow-1); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
