:root {
  --plum-950: #2b102a;
  --plum-900: #3d163c;
  --plum-700: #6f3f6f;
  --ink: #292332;
  --muted: #716b78;
  --line: #e2dfe7;
  --canvas: #f5f3f8;
  --surface: #ffffff;
  --coral: #f64f4a;
  --coral-dark: #d83b38;
  --coral-soft: #fff0ef;
  --gold: #e6962c;
  --shadow: 0 8px 30px rgba(41, 23, 47, 0.07);
  --radius: 18px;
  --ui: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Arial Rounded MT Bold", "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.42;
}
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.topbar {
  align-items: center;
  background: var(--plum-950);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 60px;
  padding: 0 clamp(18px, 3vw, 52px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  color: #fff;
  font-family: var(--display);
  font-size: clamp(23px, 2.25vw, 34px);
  font-weight: 800;
  letter-spacing: -1.4px;
  text-decoration: none;
}
.brand span { color: #f5a74d; font-size: 15px; letter-spacing: 0; }
.desktop-nav { display: flex; gap: clamp(24px, 4vw, 58px); }
.desktop-nav a {
  color: #f4edf4;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.desktop-nav a span { margin-right: 7px; }
.desktop-nav a:hover { color: #fff; }
.round-button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 36px;
  justify-content: center;
  justify-self: end;
  width: 36px;
}
.round-button svg, .feed-button svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.round-button svg { height: 18px; width: 18px; }

main { margin: 0 auto; max-width: 1540px; }
.profile-shell { background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.cover { height: clamp(250px, 20vw, 310px); overflow: hidden; position: relative; }
.cover img { height: 100%; object-fit: cover; object-position: center 51%; width: 100%; }
.cover::after {
  background: linear-gradient(90deg, rgba(31,16,31,.34), transparent 46%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.cover-quote {
  color: #fff;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 750;
  left: clamp(28px, 9vw, 140px);
  line-height: 1.13;
  margin: 0;
  position: absolute;
  text-shadow: 0 2px 20px rgba(25,13,25,.4);
  top: 29%;
  transform: rotate(-1.8deg);
  z-index: 1;
}
.cover-quote span { color: #ffd48e; font-size: 1.2em; }
.profile-header {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 190px 1fr auto;
  margin: 0 auto;
  max-width: 1400px;
  min-height: 104px;
  padding: 15px 34px 12px;
  position: relative;
}
.avatar {
  background: white;
  border: 7px solid white;
  border-radius: 50%;
  bottom: 16px;
  box-shadow: 0 5px 24px rgba(37, 20, 39, .18);
  height: 160px;
  object-fit: cover;
  position: absolute;
  width: 160px;
}
.identity { grid-column: 2; }
.identity h1 {
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 46px);
  letter-spacing: -1.4px;
  line-height: 1;
  margin: 0 0 8px;
}
.identity p { color: var(--muted); font-size: 16px; margin: 0; }
.identity p span { color: #c5bec9; margin: 0 5px; }
.feed-button {
  align-items: center;
  background: var(--coral);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(246,79,74,.23);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 750;
  gap: 9px;
  padding: 13px 23px;
}
.feed-button:hover { background: var(--coral-dark); transform: translateY(-1px); }
.feed-button svg { height: 22px; width: 22px; }
.profile-tabs {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 34px 0 224px;
}
.tab {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  padding: 14px 23px 13px;
  position: relative;
}
.tab.active { color: var(--ink); }
.tab.active::after { background: var(--coral); border-radius: 5px 5px 0 0; bottom: 0; content: ""; height: 4px; left: 14px; position: absolute; right: 14px; }

.page-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(230px, .82fr) minmax(430px, 1.42fr) minmax(260px, .9fr);
  margin: 0 auto;
  max-width: 1440px;
  padding: 22px 24px 52px;
}
.panel, .post, .sponsored-post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.left-rail, .right-rail { display: grid; gap: 18px; position: sticky; top: 82px; }
.section-heading { align-items: center; display: flex; justify-content: space-between; }
.section-heading h2 { font-family: var(--display); font-size: 21px; letter-spacing: -.4px; margin: 0; }
.doodle { color: var(--coral); font-size: 28px; transform: rotate(-10deg); }
.doodle.gold { color: var(--gold); }
.about-copy { font-size: 15px; margin: 13px 0 20px; }
.fact-list { border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 11px 0 0; }
.fact-list li { display: grid; gap: 11px; grid-template-columns: 20px 1fr; margin: 13px 0; }
.fact-list li > span:first-child { color: var(--plum-700); font-size: 18px; text-align: center; }
.fact-list strong { font-weight: 750; }

.feed { display: grid; gap: 10px; }
.post { overflow: hidden; padding: 11px 14px 0; }
.sponsored-post { overflow: hidden; }
.sponsor-header {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px 1fr auto;
  padding: 12px 15px;
}
.sponsor-header img { background: #f6ebd5; border-radius: 11px; height: 42px; object-fit: contain; padding: 3px; width: 42px; }
.sponsor-header h2 { font-family: var(--display); font-size: 15px; margin: 0; }
.sponsor-header p { color: var(--muted); font-size: 11.5px; margin: 1px 0 0; }
.sponsored-label { border: 1px solid #d5c8b0; border-radius: 6px; color: #75644f; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 6px; text-transform: uppercase; }
.ad-media { background: #f5ead3; display: block; height: 235px; overflow: hidden; position: relative; }
.ad-media img { height: 100%; object-fit: cover; width: 100%; }
.ad-joke {
  background: rgba(27, 48, 31, .93);
  border-radius: 11px;
  bottom: 12px;
  color: white;
  font-family: var(--display);
  font-size: 14px;
  left: 14px;
  line-height: 1.3;
  max-width: 72%;
  padding: 10px 12px;
  position: absolute;
}
.ad-joke span { color: #f3bd45; }
.ad-body { align-items: center; display: grid; gap: 16px; grid-template-columns: 1fr auto; padding: 14px 15px; }
.ad-domain { color: #82725c; font-size: 9px; font-weight: 800; letter-spacing: .11em; margin: 0 0 2px; }
.ad-copy h2 { font-family: var(--display); font-size: 20px; letter-spacing: -.4px; margin: 0 0 3px; }
.ad-copy > p:last-child { color: #5f5961; font-size: 12px; line-height: 1.42; margin: 0; max-width: 420px; }
.ad-cta {
  background: #cf4d27;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 13px;
  text-decoration: none;
  white-space: nowrap;
}
.ad-cta:hover { background: #ad3c1d; transform: translateY(-1px); }
.ad-social-proof { border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: 10.5px; justify-content: space-between; padding: 8px 15px; }
.ad-social-proof b { font-weight: 600; }
.post-header { align-items: center; display: grid; gap: 10px; grid-template-columns: 40px 1fr auto; }
.post-header img { border-radius: 50%; height: 40px; object-fit: cover; width: 40px; }
.post-header h2 { font-size: 15px; margin: 0 0 1px; }
.post-header p { color: var(--muted); font-size: 12.5px; margin: 0; }
.icon-only, .comment-count { background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.icon-only { align-self: start; font-size: 15px; font-weight: 800; }
.post-copy { font-size: 14.5px; line-height: 1.35; margin: 8px 5px 8px; }
.post-meta { align-items: center; color: var(--muted); display: flex; font-size: 12px; justify-content: space-between; padding: 0 4px 6px; }
.reactions { letter-spacing: -2px; }
.reactions b { font-weight: 500; letter-spacing: 0; margin-left: 5px; }
.comment-count:hover { text-decoration: underline; }
.post-actions { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.post-actions button { background: transparent; border: 0; border-radius: 8px; color: #5e5764; cursor: pointer; font-size: 12px; font-weight: 700; margin: 2px; padding: 6px; }
.post-actions button:hover { background: #f6f4f7; }
.post-actions .liked { color: var(--coral); }
.comments { border-top: 1px solid var(--line); display: none; padding: 8px 1px 0; }
.comments.open { display: block; }
.comment { align-items: start; display: grid; gap: 8px; grid-template-columns: 30px 1fr; margin: 8px 0; }
.comment-avatar { align-items: center; background: var(--plum-900); border-radius: 50%; color: white; display: flex; font-size: 11px; font-weight: 800; height: 30px; justify-content: center; width: 30px; }
.comment-avatar.flour { background: #d48727; }
.comment-avatar.bread { background: #9a5d2f; }
.comment-avatar.bagel { background: #b46e3e; }
.comment-avatar.pastry { background: #c98d47; }
.comment-avatar.toasted { background: #70422e; }
.comment-avatar.rye { background: #6f5a3c; }
.comment-avatar.dough { background: #668397; }
.comment-avatar.bun { background: #a54e68; }
.comment div { background: #f3f1f5; border-radius: 5px 14px 14px 14px; padding: 7px 11px; }
.comment strong { font-size: 12px; }
.comment p { font-size: 13px; margin: 1px 0 0; }
.comment-form { display: none; gap: 7px; padding: 10px 0 13px; }
.comment-form.open { display: flex; }
.comment-form input { background: #f4f2f6; border: 1px solid transparent; border-radius: 18px; flex: 1; font-size: 13px; min-width: 0; outline: 0; padding: 9px 13px; }
.comment-form input:focus { border-color: #bea9be; }
.comment-form button { background: transparent; border: 0; color: var(--coral-dark); cursor: pointer; font-size: 13px; font-weight: 800; }

.starter-pack dl { font-size: 12px; margin: 10px 0 0; }
.starter-pack dl div { display: grid; gap: 6px; grid-template-columns: 84px 1fr; margin: 5px 0; }
.starter-pack dt { color: var(--plum-900); font-weight: 800; }
.starter-pack dd { margin: 0; }
.music-panel h2 span { font-size: 16px; }
.track-list { display: grid; gap: 6px; margin-top: 10px; }
.track-card { background: #f8f6f9; border: 1px solid transparent; border-radius: 12px; overflow: hidden; }
.track {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  gap: 9px;
  grid-template-columns: 34px 1fr auto;
  padding: 8px;
}
.track-card:has(.track.playing) { background: var(--coral-soft); border-color: #ffd0cd; }
.track.playing { background: var(--coral-soft); border-color: #ffd0cd; }
.play-button { align-items: center; background: white; border: 1px solid #d4cfd7; border-radius: 50%; cursor: pointer; display: flex; font-size: 12px; height: 34px; justify-content: center; width: 34px; }
.track.playing .play-button { background: var(--coral); border-color: var(--coral); color: white; }
.track-copy { min-width: 0; }
.track-name { display: block; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wave { align-items: center; display: flex; gap: 2px; height: 12px; margin-top: 2px; overflow: hidden; }
.wave i { background: #c9c3cd; display: block; flex: 1; height: var(--h); max-width: 3px; min-width: 1px; }
.track.playing .wave i { background: var(--coral); }
.duration { color: var(--muted); font-size: 11px; }
.lyrics-panel { border-top: 1px solid #e5e0e7; }
.lyrics-panel summary {
  align-items: center;
  color: var(--plum-700);
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: space-between;
  list-style: none;
  padding: 7px 11px;
}
.lyrics-panel summary::-webkit-details-marker { display: none; }
.lyrics-panel summary:hover { background: rgba(111,63,111,.06); }
.lyrics-chevron { font-size: 16px; line-height: 1; transition: transform .18s ease; }
.lyrics-panel[open] .lyrics-chevron { transform: rotate(180deg); }
.lyrics-text {
  background: rgba(255,255,255,.72);
  border-top: 1px solid #ebe6ed;
  color: #514957;
  font-family: var(--ui);
  font-size: 11.5px;
  line-height: 1.55;
  margin: 0;
  max-height: 290px;
  overflow: auto;
  padding: 12px 13px 16px;
  white-space: pre-wrap;
}
.toast {
  background: var(--plum-950);
  border-radius: 11px;
  bottom: 24px;
  color: #fff;
  left: 50%;
  opacity: 0;
  padding: 11px 18px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: .25s ease;
  z-index: 30;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
footer { color: #807783; font-size: 12px; padding: 0 20px 30px; text-align: center; }
footer span { color: var(--coral); }
.sr-only { height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; clip: rect(0,0,0,0); }

body.cozy { --canvas: #f7f0e7; --surface: #fffdf9; --line: #e5d8ca; }
body.cozy .topbar { background: #412330; }

@media (max-width: 1060px) {
  .page-grid { grid-template-columns: minmax(230px, .72fr) minmax(430px, 1.28fr); }
  .right-rail { grid-column: 1; grid-row: 2; position: static; }
  .feed { grid-column: 2; grid-row: 1 / span 2; }
  .left-rail { position: static; }
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; height: 54px; padding: 0 16px; }
  .desktop-nav { display: none; }
  .brand { font-size: 25px; }
  .cover { height: 235px; }
  .cover img { object-position: 60% center; }
  .cover-quote { font-size: 25px; left: 22px; top: 22%; }
  .profile-header { display: block; min-height: 198px; padding: 92px 19px 18px; }
  .avatar { bottom: auto; height: 128px; top: -58px; width: 128px; }
  .identity h1 { font-size: 33px; }
  .identity p { font-size: 13px; padding-right: 120px; }
  .feed-button { bottom: 20px; padding: 10px 15px; position: absolute; right: 18px; }
  .profile-tabs { justify-content: center; padding: 0 8px; }
  .page-grid { display: flex; flex-direction: column; padding: 14px 12px 38px; }
  .feed { order: 1; width: 100%; }
  .left-rail { order: 2; width: 100%; }
  .right-rail { order: 3; width: 100%; }
  .panel, .post { border-radius: 14px; }
  .sponsored-post { border-radius: 14px; }
  .ad-media { height: 205px; }
  .ad-joke { font-size: 12px; max-width: calc(100% - 28px); }
  .ad-body { grid-template-columns: 1fr; }
  .ad-cta { text-align: center; }
  .ad-social-proof { align-items: start; flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: no-preference) {
  .feed-button, .post-actions button { transition: .18s ease; }
  .post { animation: settle .42s both; }
  .post:nth-child(2) { animation-delay: .06s; }
  .post:nth-child(3) { animation-delay: .12s; }
  @keyframes settle { from { opacity: 0; transform: translateY(8px); } }
}
