:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #151820;
  --muted: #6b7280;
  --line: #dfe3ea;
  --accent: #ec4899;
  --accent2: #7c3aed;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, filter .16s ease;
}
button:hover { background: #db2777; }
button:active { filter: brightness(.96); }
button.ghost, button.small {
  background: #eef2ff;
  color: var(--accent);
  box-shadow: none;
}
button.small { padding: 7px 10px; font-size: 12px; }
button.active { background: #fee2e2; color: #dc2626; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, #fff);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, .13);
  background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.hidden { display: none !important; }
.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark, .avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f97316 48%, var(--accent2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.hero-logo {
  width: min(500px, 90vw);
  height: auto;
  display: block;
  margin: 0 0 14px;
  border-radius: 8px;
}
.brand span, .session-card span, .post-head span, .composer-head span { color: var(--muted); font-size: 13px; display: block; }
.rail nav { display: grid; gap: 8px; }
.rail nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}
.rail nav a[aria-current="page"], .rail nav a:hover { background: #eef2ff; color: var(--accent); }
.main { max-width: 1080px; width: 100%; margin: 0 auto; padding: 28px; }
body.auth-mode { background: #fff; }
body.auth-mode .app-shell { grid-template-columns: 1fr; }
body.auth-mode .rail { display: none; }
body.auth-mode .main { max-width: none; padding: 0; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
.muted { color: var(--muted); }
.auth-panel {
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 0;
  align-items: stretch;
  background: #fff;
}
.auth-hero {
  min-height: 100vh;
  border-right: 1px solid #dfe3ea;
  padding: 38px clamp(42px, 6vw, 86px) 44px;
  display: grid;
  align-content: start;
  justify-items: start;
  overflow: hidden;
}
.hero-logo {
  width: min(112px, 18vw);
  height: auto;
  display: block;
  border-radius: 8px;
}
.auth-hero h1 {
  justify-self: center;
  max-width: 620px;
  margin: 20px 0 0;
  text-align: center;
  font-size: clamp(34px, 4.1vw, 46px);
  line-height: 1.42;
  letter-spacing: 0;
  font-weight: 500;
}
.auth-hero h1 span {
  color: #ff2f6d;
}
.story-collage {
  position: relative;
  justify-self: center;
  width: min(500px, 76vw);
  height: 390px;
  margin-top: 46px;
}
.story-card {
  position: absolute;
  border-radius: 28px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, .14);
  overflow: hidden;
}
.story-card::before {
  content: "";
  position: absolute;
  inset: 0;
}
.story-card-left {
  left: 36px;
  top: 88px;
  width: 190px;
  height: 270px;
  transform: rotate(-8deg);
  background: linear-gradient(145deg, #17c964, #9b5cff 52%, #ff2f6d);
}
.story-card-back {
  right: 40px;
  top: 88px;
  width: 198px;
  height: 266px;
  transform: rotate(5deg);
  background: linear-gradient(145deg, #f97316, #f9d423 48%, #f43f5e);
}
.story-card-main {
  left: 50%;
  top: 34px;
  width: 230px;
  height: 330px;
  transform: translateX(-50%);
  background: linear-gradient(160deg, #fff7ad, #fb7185 44%, #5b21b6);
  z-index: 2;
}
.story-card-main::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 34px;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 999px;
}
.story-line {
  position: absolute;
  left: 28px;
  right: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  z-index: 3;
}
.story-line-top { top: 22px; }
.story-line-bottom { bottom: 28px; right: 64px; }
.story-heart {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
  z-index: 3;
}
.reaction-bubble {
  position: absolute;
  left: 86px;
  top: 56px;
  z-index: 4;
  display: flex;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
}
.reaction-bubble span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: block;
  background: linear-gradient(135deg, #ec4899, #facc15);
}
.reaction-bubble span:nth-child(2) { background: linear-gradient(135deg, #7c3aed, #22d3ee); }
.reaction-bubble span:nth-child(3) { background: linear-gradient(135deg, #f97316, #f43f5e); }
.status-badge {
  position: absolute;
  right: 38px;
  top: 138px;
  z-index: 4;
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 10px 24px rgba(34, 197, 94, .24);
}
.status-badge::before,
.status-badge::after {
  content: "";
  position: absolute;
  background: #fff;
}
.status-badge::before {
  width: 14px;
  height: 14px;
  left: 15px;
  top: 10px;
  clip-path: polygon(50% 0, 62% 34%, 100% 36%, 70% 58%, 80% 100%, 50% 74%, 20% 100%, 30% 58%, 0 36%, 38% 34%);
}
.status-badge::after {
  width: 12px;
  height: 7px;
  right: 12px;
  top: 12px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  background: transparent;
  transform: rotate(45deg);
}
.profile-orbit {
  position: absolute;
  right: 46px;
  bottom: 62px;
  z-index: 4;
  width: 64px;
  height: 64px;
  border: 3px solid #f9d423;
  border-radius: 50%;
  background: linear-gradient(135deg, #dcfce7, #f0abfc);
  box-shadow: 0 12px 28px rgba(236, 72, 153, .18);
}
.auth-side {
  min-height: 100vh;
  padding: 56px clamp(34px, 5.2vw, 72px);
  display: grid;
  align-content: center;
  justify-items: center;
}
.auth-form-wrap {
  width: 100%;
  max-width: 545px;
  margin: 0;
}
.panel, .composer, .post, .session-card, .empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.panel { display: grid; gap: 12px; }
.auth-card {
  align-content: start;
  padding: 0;
  gap: 14px;
  border: 0;
  background: transparent;
}
.form-head { margin-bottom: 10px; display: grid; gap: 8px; }
.form-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}
.form-head .muted {
  margin: 4px 0 0;
  font-size: 12px;
}
.panel label {
  position: relative;
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.panel label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.auth-card button[type="submit"] {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 999px;
  background: #8bbcf1;
  box-shadow: none;
  color: #fff;
}
.auth-card button[type="submit"]:hover { background: #75abe7; }
.auth-card input {
  min-height: 58px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
  background: #fff;
}
.auth-card .auth-back,
.auth-card .auth-switch {
  width: auto;
  margin: 0;
  padding: 0;
  justify-self: start;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.auth-card .auth-switch {
  justify-self: center;
  color: var(--muted);
  font-weight: 700;
}
.auth-card .auth-back:hover,
.auth-card .auth-switch:hover {
  background: transparent;
  color: #db2777;
}
.auth-secondary {
  width: 100%;
  max-width: 545px;
  margin-top: 112px;
}
.auth-create {
  width: 100%;
  min-height: 44px;
  border: 1px solid #0064e0;
  border-radius: 999px;
  background: #fff;
  color: #0064e0;
  box-shadow: none;
}
.auth-create:hover {
  background: #f7fbff;
  color: #0057c2;
}
.topline { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.session-card { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.composer { display: grid; gap: 12px; margin-bottom: 18px; }
.composer-head { display: flex; justify-content: space-between; gap: 12px; }
.media-picker {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.media-picker input {
  padding: 10px 12px;
  color: var(--muted);
}
.feed { display: grid; gap: 18px; }
.post { padding: 0; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.post-head .small { margin-left: auto; }
.post-media {
  width: 100%;
  display: block;
  background: #111827;
  max-height: 760px;
}
.post-img {
  object-fit: contain;
  background: #eef2f7;
}
.post-video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.post-badge {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}
.post-ad .post-badge {
  border-color: rgba(37, 99, 235, .22);
  color: #2563eb;
  background: #eff6ff;
}
.post-influencer .post-badge {
  border-color: rgba(236, 72, 153, .22);
  color: #db2777;
  background: #fdf2f8;
}
.post-actions { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.post-actions-curated { justify-content: space-between; }
.ad-cta {
  text-decoration: none;
  color: #fff;
  background: #2563eb;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}
.ad-cta:hover { background: #1d4ed8; }
.influencer-tag {
  color: #db2777;
  background: #fdf2f8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}
.counts { color: var(--muted); font-size: 13px; }
.caption { padding: 0 16px 14px; white-space: pre-wrap; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 16px 16px; }
.load-more { width: 100%; margin-top: 16px; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .2);
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .auth-panel { min-height: auto; grid-template-columns: 1fr; }
  .auth-hero {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 24px 22px 26px;
  }
  .hero-logo { width: min(92px, 28vw); }
  .auth-hero h1 { font-size: 30px; line-height: 1.34; margin-top: 18px; }
  .story-collage { width: min(360px, 92vw); height: 285px; margin-top: 24px; }
  .story-card-left { left: 16px; top: 70px; width: 140px; height: 195px; }
  .story-card-back { right: 18px; top: 70px; width: 145px; height: 195px; }
  .story-card-main { width: 168px; height: 240px; top: 28px; }
  .reaction-bubble { left: 50px; top: 46px; }
  .status-badge { right: 24px; top: 104px; }
  .profile-orbit { right: 34px; bottom: 38px; width: 52px; height: 52px; }
  .auth-side { min-height: auto; padding: 32px 22px 42px; }
  .auth-secondary { margin-top: 42px; }
  .topline { align-items: stretch; flex-direction: column; }
}
