:root {
  --bg: #f8f4f6;
  --card: #fff;
  --ink: #28202b;
  --muted: #6d6269;
  --line: #eae0e5;
  --accent: #a32e5a;
  --soft: #f8e9ee;
  --dark: #6e203e;
  --plum: #391e40;
  --lime: #e0f66a;
}
*,*::before,*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Pretendard","Malgun Gothic",system-ui,sans-serif;
}
button,input,textarea,select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none!important;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: #fff;
  padding: 8px;
}
.skip:focus {
  top: 8px;
}
.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--plum);
  position: sticky;
  top: 0;
  z-index: 3;
}
.top-inner {
  max-width: 1370px;
  margin: auto;
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(180px,228px) minmax(0,1fr) minmax(165px,278px);
  gap: 26px;
  align-items: center;
  padding: 0 26px;
}
.brand {
  font-family: Georgia,serif;
  text-decoration: none;
  font-size: 31px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.075em;
  white-space: nowrap;
}
.brand span,.brand b {
  color: var(--accent);
}
.brand b {
  font: 16px/1 system-ui;
  vertical-align: top;
  margin-left: 5px;
}
.search-trigger,.top-profile {
  border: 0;
  background: none;
}
.search-trigger {
  border-radius: 30px;
  background: var(--bg);
  color: var(--muted);
  text-align: left;
  padding: 9px 15px;
  max-width: 385px;
  width: 100%;
}
.search-trigger span {
  font-size: 20px;
  line-height: 1;
  margin-right: 5px;
}
.top-profile {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.shell {
  max-width: 1370px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(180px,228px) minmax(0,1fr) minmax(220px,278px);
  gap: 26px;
  padding: 28px 26px 50px;
}
.sidebar,.rail {
  min-width: 0;
}
.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}
.nav {
  display: grid;
  gap: 4px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.nav button span {
  width: 24px;
  text-align: center;
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}
.nav button:hover,.nav [aria-current] {
  background: var(--soft);
  color: var(--dark);
}
.primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 10px 15px;
  font-weight: 750;
}
.primary:hover {
  background: var(--dark);
}
.compose {
  width: 100%;
  margin-top: 18px;
}
.mobile-compose {
  display: none;
}
.sidebar-foot {
  margin-top: 22px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-foot p {
  margin: 5px 0;
}
.feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--plum);
}
h1,h2,h3,p {
  margin: 0;
}
h1 {
  font-size: clamp(23px,3vw,34px);
  letter-spacing: -.06em;
  line-height: 1.2;
}
.feed-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}
.pill {
  padding: 6px 13px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 700;
}
.pill:hover,.pill[aria-pressed=true] {
  border-color: #e2b9c8;
  background: var(--soft);
  color: var(--dark);
}
.feed,.rail {
  display: grid;
  gap: 16px;
  align-content: start;
}
.post,.rail-box,.view-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px;
}
.post {
  scroll-margin-top: 90px;
}
.post:first-child {
  border-top: 3px solid var(--accent);
}
.post-head,.person {
  display: flex;
  align-items: center;
  gap: 9px;
}
.post-head {
  margin-bottom: 10px;
}
.post-head strong,.person strong {
  display: block;
}
.post-head small,.person small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #f4dce5;
  color: #6c2543;
  font-weight: 800;
}
.avatar.me {
  width: 32px;
  height: 32px;
  background: #f0d3e0;
}
.category {
  margin-left: auto;
  flex: none;
  color: var(--accent);
  background: var(--soft);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 750;
}
.post h2 {
  font-size: 20px;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.post p {
  margin: 5px 0 11px;
  color: #51454d;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.media {
  display: flex;
  overflow: auto;
  scroll-snap-type: x mandatory;
  gap: 8px;
  border-radius: 13px;
  background: #f3e7eb;
}
.media img {
  width: 100%;
  max-height: 430px;
  aspect-ratio: 3/2;
  object-fit: cover;
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  padding: 1px 3px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 8px;
  margin-top: 9px;
  border-top: 1px solid var(--line);
}
.actions button,.plain {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 12px;
}
.actions button:hover,.plain:hover,.actions [aria-pressed=true] {
  background: var(--soft);
  color: var(--accent);
}
.comments {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.comment {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.comment.reply {
  margin-left: 18px;
}
.comment p {
  margin: 0;
  font-size: 13px;
}
.comment .accepted {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}
.inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.inline-form input {
  min-width: 0;
  flex: 1;
}
.inline-form .primary {
  flex: none;
  padding: 7px 10px;
}
.rail h2 {
  font-size: 16px;
  margin-bottom: 9px;
  letter-spacing: -.035em;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag-cloud button {
  background: #fbf2f5;
  border: 0;
  padding: 5px 9px;
  border-radius: 20px;
  color: var(--dark);
  font-size: 12px;
}
.person+.person {
  margin-top: 11px;
}
.person button {
  margin-left: auto;
}
.person .avatar {
  width: 32px;
  height: 32px;
}
.challenge {
  padding: 19px;
  border-radius: 18px;
  background: var(--plum);
  color: #fff;
  border-left: 5px solid var(--lime);
}
.challenge>span {
  font-size: 10px;
  letter-spacing: .13em;
  color: var(--lime);
}
.challenge h2 {
  font-size: 20px;
  margin-top: 4px;
}
.challenge p {
  font-size: 13px;
  color: #f7e6ef;
}
.challenge button {
  margin-top: 12px;
  border: 1px solid #d9b8c7;
  border-radius: 20px;
  background: var(--lime);
  color: var(--plum);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}
.view-box {
  margin-bottom: 14px;
}
.view-box ol,.view-box ul {
  padding-left: 20px;
}
.view-box p+p {
  margin-top: 8px;
}
.view-box h2 {
  font-size: 19px;
  margin-bottom: 6px;
}
form label {
  display: grid;
  gap: 5px;
  margin: 9px 0;
  font-weight: 650;
}
input,textarea,select {
  color: inherit;
  background: white;
  border: 1px solid #dfd2d7;
  border-radius: 8px;
  padding: 8px 9px;
  max-width: 100%;
}
input[type=file] {
  width: 100%;
}
.form-error {
  color: #8c1c41;
  margin: 7px 0;
}
dialog {
  width: min(500px,calc(100% - 26px));
  max-height: 88vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 19px;
  color: var(--ink);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #25172280;
}
.dialog-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-title h2 {
  font-size: 21px;
}
.dialog-title button {
  font-size: 24px;
  background: none;
  border: 0;
}
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 5;
  max-width: calc(100% - 36px);
  background: #3e2635;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
}
.empty {
  border: 1px dashed #dbccd2;
  border-radius: 14px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}
.poll {
  display: grid;
  gap: 5px;
  margin-block: 10px;
}
.poll button {
  text-align: left;
}
.journal-photo {
  width: min(100%,260px);
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 6px;
}
.compare {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 7px 0;
}
.compare figure {
  margin: 0;
}
.compare img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
}
@media(max-width:1040px) {
  .shell,.top-inner {
    grid-template-columns: 164px minmax(0,1fr) 209px;
    gap: 16px;
    padding-inline: 16px;
  }
  .rail-box {
    padding: 12px;
  }
}
@media(max-width:850px) {
  .shell {
    grid-template-columns: 155px minmax(0,1fr);
  }
  .rail {
    display: none;
  }
  .top-inner {
    grid-template-columns: 155px minmax(0,1fr) auto;
  }
}
@media(max-width:620px) {
  .top-inner {
    display: flex;
    gap: 10px;
    min-height: 58px;
    justify-content: space-between;
    padding-inline: 12px;
  }
  .brand {
    font-size: 26px;
  }
  .search-trigger {
    flex: 1;
    width: auto;
    font-size: 0;
    max-width: 42px;
    text-align: center;
    padding: 5px 0;
  }
  .search-trigger span {
    font-size: 24px;
    margin: 0;
  }
  .top-profile #top-name {
    display: none;
  }
  .shell {
    display: block;
    padding: 17px 10px 78px;
  }
  .sidebar {
    position: static;
  }
  .nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    grid-template-columns: repeat(6,minmax(0,1fr));
    gap: 0;
    background: white;
    border-top: 1px solid var(--line);
    padding: 5px 2px max(5px,env(safe-area-inset-bottom));
  }
  .nav button {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 3px;
    padding: 5px 0;
    font-size: 9px;
  }
  .nav button span {
    font-size: 19px;
  }
  .compose,.sidebar-foot {
    display: none;
  }
  .mobile-compose {
    display: block;
    font-size: 12px;
    padding: 7px 10px;
  }
  .post {
    padding: 12px;
  }
  .toast {
    bottom: 68px;
  }
}
