:root {
  --bg: #fff0f3;
  --card: #fffafd;
  --text: #412d36;
  --muted: #826673;
  --line: #f0cbd8;
  --accent: #d86f9b;
  --accent-soft: #ffd2e3;

  --glow-1: #ffddea;
  --glow-2: #efe6ff;

  --card-bg: rgba(255, 250, 253, 0.84);
  --card-hover-bg: #fff7fb;
  --card-shadow: rgba(120, 60, 85, 0.08);
  --pill-text: #7b4059;

  --page-bg:
    radial-gradient(circle at top left, var(--glow-1) 0, transparent 34rem),
    radial-gradient(circle at bottom right, var(--glow-2) 0, transparent 28rem),
    var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 18px;
}

main {
  width: min(920px, 100%);
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/** heading line **********************************************************/

.hero {
  margin-bottom: 28px;
}

.kicker {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(38px, 8vw, 72px);
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: -0.05em;
}

.intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  margin: 0;
}

/** tabs ******************************************************************/

.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 24px 0;
}

.tab {
  position: relative;
  padding: 6px 18px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.tab + .tab::before {
  content: "|";
  position: absolute;
  left: 0;
  color: var(--line);
}

.tab:hover {
  color: var(--accent);
}

.tab.active {
  color: var(--accent);
  font-weight: 600;
}

/* .tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.grid.tab-panel.active {
  display: grid;
} */

/** grid ******************************************************************/

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px var(--card-shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

a.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--card-hover-bg);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-title span:last-child {
  color: var(--accent);
  font-weight: 400;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/** friend ********************************************************************/

.card.friend-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.card.friend-card .friend-avatar {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: cover;
  border-radius: 18px;
}

.card.friend-card .friend-info {
  min-width: 0;
}

.card.friend-card .friend-info h2 {
  margin: 0 0 6px;
}

.card.friend-card .friend-info p {
  margin: 0;
}

.card.friend-card .friend-url {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.85rem;
}

.card.friend-card .card-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 1.5rem;
}

/** footer ********************************************************************/

footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pillow {
  background: var(--accent-soft);
  color: var(--pill-text);
  padding: 4px 10px;
  border-radius: 999px;
}

/** small window **********************************************************/

@media (max-width: 640px) {
  body {
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  a.card {
    border-radius: 18px;
    padding: 18px;
  }

  .friend-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .friend-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

/** tab ***********************************************************************/
section.tab-panel {
  display: none;
}

section.tab-panel.active {
  display: block;
}

section.grid.tab-panel.active {
  display: grid;
}