* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: #f6f2fa;
  color: #1d2440;
  font: 1rem/1.5 system-ui, sans-serif;
}

.entrance {
  width: min(100%, 24rem);
  padding: clamp(1.5rem, 7vw, 2.5rem);
  border: 1px solid #dce0f4;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 20px 60px #273c8014;
}

h1 {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: 2rem;
  letter-spacing: -.05em;
}

form { display: grid; gap: .75rem; }
label { font-weight: 650; }

input, button {
  width: 100%;
  min-height: 3rem;
  padding: .65rem .85rem;
  border-radius: .75rem;
  font: inherit;
}

input { border: 1px solid #aab2ce; }
input[aria-invalid="true"] { border-color: #ad253d; }

button {
  border: 0;
  background: #3d4bb6;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover { background: #303d9b; }
:focus-visible { outline: 3px solid #535fc7; outline-offset: 3px; }
p { margin: 0; text-align: center; }
#error { color: #ad253d; text-align: left; }

.feed-page {
  display: block;
  padding: 0;
  background: #f7f5f9;
  color: #26212c;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e9e1ed;
  background: #fffdff;
}

.topbar nav { display: flex; align-items: center; justify-content: space-between; gap: .65rem; width: min(100% - 1.5rem, 36rem); margin-inline: auto; padding: .65rem 0; }
.wordmark { color: #26212c; font: 850 1.65rem/1 system-ui, sans-serif; letter-spacing: -.075em; text-decoration: none; }
.entrance .wordmark { margin-bottom: 1.75rem; }
.wordmark span { color: #8b58be; }
.compose-link { display: inline-flex; align-items: center; gap: .25rem; min-height: 2.6rem; padding: .35rem .75rem; border-radius: 2rem; background: #f0e8f9; color: #5c3c81; font-weight: 750; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.compose-link:hover { background: #e8dbf5; }
.feed { width: min(100% - 1.5rem, 36rem); margin: 1.4rem auto 3rem; }
.feed-title { margin: 0 0 .7rem; text-align: left; font-size: 1.3rem; letter-spacing: -.045em; }

.composer, .post, .empty { border: 1px solid #eae6e4; border-radius: 1rem; background: #fff; }
.composer { margin: 0 0 1rem; scroll-margin-top: 4.3rem; }
.composer > summary { display: block; padding: .95rem 1.2rem; font-weight: 800; color: #59419a; }
.composer > summary::-webkit-details-marker { display: none; }
.composer > summary span { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-right: .35rem; border-radius: .5rem; background: #eee6ff; }
summary { cursor: pointer; }
.composer form { max-width: 42rem; padding: 0 1.2rem 1.2rem; }
.composer label { display: grid; gap: .3rem; }
.author-picker { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.author-picker legend { padding: 0; margin-bottom: .45rem; font-weight: 750; }
.author-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.composer .author-option {
  position: relative;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  border: 1px solid #e8e1ee;
  border-radius: .85rem;
  background: #fcfafc;
  cursor: pointer;
}
.author-option input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.author-option:has(input:checked) { border-color: #9271bd; background: #f2ebfb; box-shadow: inset 0 0 0 1px #9271bd; }
.author-option:has(input:focus-visible) { outline: 3px solid #7956ab; outline-offset: 2px; }
.author-portrait {
  --silhouette: #6a5085;
  position: relative;
  display: block;
  width: 2.65rem;
  height: 2.65rem;
  overflow: hidden;
  border-radius: 50%;
  background: #eee5f9;
}
.author-portrait::before, .author-portrait::after, .author-portrait i, .author-portrait i::after {
  position: absolute;
  content: "";
  background: var(--silhouette);
}
.author-portrait::before { width: 1.29rem; left: .68rem; top: .38rem; border-radius: 55% 48% 28% 32%; }
.long-hair::before { height: 1.8rem; transform: rotate(8deg); }
.bob-hair { --silhouette: #8c526b; background: #f8e5eb; }
.bob-hair::before { height: 1.17rem; border-radius: 55% 55% 30% 28%; transform: rotate(-7deg); }
.author-portrait::after { width: .43rem; height: .55rem; left: 1.14rem; top: 1.27rem; }
.author-portrait i { width: .82rem; height: 1rem; left: .94rem; top: .55rem; border-radius: 47% 50% 50% 55%; }
.author-portrait i::after { width: 1.65rem; height: .92rem; top: 1.15rem; left: -.42rem; border-radius: 55% 55% 0 0; }
.feed input, .feed textarea { border: 1px solid #ded5eb; color: #302748; background: #fcfbfe; }
textarea { width: 100%; padding: .7rem .85rem; border-radius: .75rem; font: inherit; resize: vertical; }
.photo-label input { min-height: auto; font-size: .9rem; }
.notice { color: #645080; text-align: left; font-size: .9rem; }
.notice:empty { display: none; }
.feed button { width: auto; background: #eee6ff; color: #59419a; }
.feed .primary { justify-self: start; padding-inline: 1.35rem; background: #6344a4; color: #fff; }
.feed button:hover { background: #e8dbff; }
.feed .primary:hover { background: #52358c; }
.feed button:disabled { opacity: .6; cursor: wait; }

.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.post { overflow: hidden; box-shadow: 0 5px 16px #4d344609; scroll-margin-top: 4.3rem; }
.post-head { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.15rem; }
.post-head div { display: grid; overflow-wrap: anywhere; }
.post-head time { color: #6d5f80; font-size: .875rem; }
.avatar { display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: #60468e; background: #f0e8ff; font-weight: 800; }
.post:nth-child(even) .avatar { color: #91496c; background: #fce9f0; }
.post-body { margin: .8rem 0 0; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-photo { display: block; width: 100%; max-height: min(45rem, 80vh); object-fit: contain; background: #f6f3f2; }
.post-footer { padding: .85rem 1.15rem 1rem; }
.reactions { display: flex; flex-wrap: wrap; gap: .35rem; }
.feed .reactions button { display: inline-flex; justify-content: center; align-items: center; gap: .2rem; min-width: 2.8rem; min-height: 2.75rem; padding: .25rem .55rem; border-radius: 1.5rem; background: #faf8fa; border: 1px solid #eee8ef; }
.feed .reactions button[aria-pressed="true"] { background: #eadcff; border-color: #af90e4; }
.emoji-picker[open] { flex-basis: 100%; }
.emoji-picker summary {
  display: grid;
  width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border: 1px solid #e9dfef;
  border-radius: 50%;
  background: #f5eef9;
  color: #5c3c81;
  font-size: 1.2rem;
  font-weight: 750;
  list-style: none;
}
.emoji-picker summary::-webkit-details-marker { display: none; }
.emoji-picker[open] summary { background: #eadcff; border-color: #af90e4; }
.emoji-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.55rem, 1fr));
  gap: .2rem;
  max-width: 22rem;
  margin-top: .45rem;
  padding: .45rem;
  border: 1px solid #e9dfef;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 .35rem 1rem #462c6112;
}
.feed .emoji-panel button { min-width: 0; border: 1px solid transparent; border-radius: .6rem; padding: .15rem; background: transparent; font-size: 1.2rem; }
.feed .emoji-panel button:hover { background: #f5eef9; }
.comments { margin-top: .7rem; }
.comments summary { width: fit-content; padding-block: .4rem; color: #685583; font-weight: 700; }
.comments ul { display: grid; gap: .35rem; padding: 0; list-style: none; }
.comments li { display: flex; flex-wrap: wrap; gap: 0 .45rem; padding: .55rem .7rem; border-radius: .6rem; background: #f8f5fb; overflow-wrap: anywhere; }
.comments form { margin: .4rem 0 0; gap: .4rem; }
.comment-row { display: flex; gap: .4rem; }
.comment-row input { min-width: 0; }
.comment-row button { flex: none; }
.empty { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; border-style: dashed; }
.empty span { color: #a880da; font-size: 2rem; }
.empty h2 { margin: .15rem 0 .35rem; font-size: 1.25rem; }
.empty p { color: #6d5f80; }
.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; }
.pagination a { color: #59419a; }

