:root {
  --green: #4b9b28;
  --green-2: #6fc43e;
  --green-soft: #edf8e9;
  --coral: #ff5a63;
  --sky: #64aee8;
  --ink: #1f2520;
  --muted: #7f877d;
  --line: #e3e8df;
  --page: #f4f7f2;
  --white: #fff;
  --shadow: 0 10px 28px rgba(31, 37, 32, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #dfe9dc;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(111, 196, 62, 0.2), transparent 28rem),
    linear-gradient(135deg, #eef7ea, #e4f1f6);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(31, 37, 32, 0.06), 0 24px 80px rgba(31, 37, 32, 0.18);
  padding: max(18px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
}

.topbar {
  display: grid;
  gap: 10px;
  padding: 8px 0 18px;
}

.brand-row,
.privacy-row {
  display: flex;
  align-items: center;
}

.privacy-row {
  justify-content: space-between;
  gap: 10px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.account-row span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row a,
.account-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--white);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.topbar h1 {
  margin: 0;
  color: #39871c;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 850;
}

.topbar p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  color: #3b8521;
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 700;
}

.lock-dot {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.lock-dot::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -7px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.invite-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #6db452;
  border-radius: 8px;
  background: var(--white);
  color: #3e9224;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-rail {
  display: flex;
  gap: 10px;
  margin: 0 -18px;
  padding: 0 18px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-rail::-webkit-scrollbar {
  display: none;
}

.story-card {
  position: relative;
  flex: 0 0 78px;
  height: 108px;
  overflow: hidden;
  border: 1px solid rgba(75, 155, 40, 0.25);
  border-radius: 8px;
  background: #f4fbf1;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(31, 37, 32, 0.08);
}

.story-compose {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--green);
  font-size: 13px;
  font-weight: 750;
}

.story-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
}

.story-card.photo {
  background-image: linear-gradient(to bottom, transparent 42%, rgba(0, 0, 0, 0.58)), url("./assets/summer-sheet.png");
  background-repeat: no-repeat;
  background-size: cover, 400% 200%;
}

.photo-1 { background-position: center, 0% 0%; }
.photo-2 { background-position: center, 33.333% 0%; }
.photo-3 { background-position: center, 66.666% 0%; }
.photo-4 { background-position: center, 100% 0%; }
.photo-5 { background-position: center, 0% 100%; }
.photo-6 { background-position: center, 33.333% 100%; }
.photo-7 { background-position: center, 66.666% 100%; }
.photo-8 { background-position: center, 100% 100%; }

.story-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
}

.story-compose .story-icon,
.story-compose > span:last-child {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  color: inherit;
  text-shadow: none;
}

.story-compose .story-icon {
  color: var(--white);
}

.composer,
.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(31, 37, 32, 0.07);
}

.composer {
  padding: 14px;
  margin-bottom: 14px;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: #9aa29a;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  padding: 0 3px;
  background: transparent;
  color: #444d43;
  font-size: 15px;
  font-weight: 700;
}

.tool-button svg {
  color: var(--green);
}

.tool-button:nth-child(2) svg {
  color: var(--sky);
}

.tool-button input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.publish-button,
.copy-button {
  margin-left: auto;
  min-width: 78px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(75, 155, 40, 0.22);
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}

.preview-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.feed {
  display: grid;
  gap: 12px;
}

.post-card {
  padding: 12px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  font-weight: 850;
  background: linear-gradient(135deg, #7cc768, #5aa9e6);
}

.post-meta {
  min-width: 0;
  flex: 1;
}

.post-meta strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
}

.class-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  color: #3f8926;
  background: #e9f7e3;
  font-size: 12px;
  font-weight: 800;
}

.post-meta time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.more-button,
.dialog-head button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #656d64;
}

.post-text {
  margin: 0 0 12px;
  color: #202720;
  font-size: 17px;
  line-height: 1.55;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.post-image {
  aspect-ratio: 1;
  border-radius: 8px;
  background-image: url("./assets/summer-sheet.png");
  background-size: 400% 200%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.post-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.post-grid.single .post-image {
  aspect-ratio: 1.45;
}

.reaction-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: #5f685e;
  font-size: 14px;
}

.reaction-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
}

.reaction-mark svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #eef1eb;
}

.post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #4c554c;
  font-size: 14px;
  font-weight: 700;
}

.post-actions button.liked {
  color: var(--coral);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100vw, 430px);
  transform: translateX(-50%);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: #9aa09a;
  font-size: 12px;
  font-weight: 750;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.nav-item.active {
  color: var(--green);
}

.floating-publish {
  position: fixed;
  left: calc(50% + min(100vw, 430px) / 2 - 104px);
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 9;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: var(--white);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 14px 26px rgba(75, 155, 40, 0.32);
}

.floating-publish svg {
  width: 26px;
  height: 26px;
  margin-bottom: -8px;
}

.invite-dialog {
  width: min(348px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.invite-dialog::backdrop {
  background: rgba(31, 37, 32, 0.38);
}

.invite-dialog form {
  padding: 16px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-head strong {
  font-size: 18px;
}

.invite-code {
  margin: 18px 0 8px;
  padding: 16px;
  border: 1px dashed #8bc874;
  border-radius: 8px;
  color: #347d1a;
  background: #f1faed;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
}

.invite-dialog p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.copy-button {
  width: 100%;
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(146px + env(safe-area-inset-bottom));
  z-index: 20;
  transform: translateX(-50%) translateY(10px);
  max-width: min(340px, calc(100vw - 48px));
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(31, 37, 32, 0.9);
  color: var(--white);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%);
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(236, 246, 232, 0.96);
}

.auth-panel {
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  margin: 0 0 8px;
  color: #347d1a;
  font-size: 26px;
}

.auth-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.auth-tabs button.active {
  border-color: #78bd62;
  background: var(--green-soft);
  color: var(--green);
}

.auth-form {
  display: grid;
  gap: 11px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #445043;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
}

.auth-submit {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-2), var(--green));
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
}

.auth-hint {
  margin: 14px 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px !important;
}

.auth-message {
  min-height: 20px;
  margin: 10px 0 0 !important;
  color: #d14343 !important;
  font-size: 13px !important;
  line-height: 1.45;
}

.auth-message[data-type="info"] {
  color: #4b9b28 !important;
}

.auth-submit:disabled {
  opacity: 0.68;
}

.admin-page {
  min-height: 100vh;
  background: #f7faf5;
  color: var(--ink);
}

.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-topbar h1 {
  margin: 0;
  color: #347d1a;
  font-size: 30px;
}

.admin-topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-topbar a,
.admin-topbar button,
.admin-card button {
  border: 1px solid #78bd62;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--white);
  color: var(--green);
  font-weight: 850;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(31, 37, 32, 0.06);
}

.admin-card.wide {
  grid-column: 1 / -1;
}

.admin-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.stat-box {
  border-radius: 8px;
  padding: 14px;
  background: var(--green-soft);
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 26px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #445043;
  font-size: 13px;
  font-weight: 800;
}

.admin-form input,
.admin-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}

.admin-form button {
  align-self: end;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.75fr 1fr 0.8fr 1.25fr 1.3fr;
  gap: 8px;
  align-items: center;
  border: 1px solid #edf1e8;
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
}

.admin-row strong {
  font-size: 14px;
}

.admin-row span {
  color: var(--muted);
}

.admin-post-row {
  grid-template-columns: 1fr 2fr auto;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-user-actions input {
  width: 54px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  font-size: 13px;
}

.admin-user-actions button {
  min-height: 34px;
  padding: 0 9px;
}

@media (max-width: 760px) {
  .admin-grid,
  .admin-stats,
  .admin-form,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .phone-shell {
    padding-inline: 14px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .invite-button {
    padding-inline: 9px;
    font-size: 14px;
  }

  .post-text,
  .composer textarea {
    font-size: 16px;
  }
}

/* Moments-style mobile feed */
body {
  background: #ededed;
}

.phone-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 24px;
  overflow-x: hidden;
  background: #ededed;
  box-shadow: none;
}

.moments-cover {
  position: relative;
  height: 230px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.34)),
    url("./assets/summer-sheet.png");
  background-size: cover, 200% 100%;
  background-position: center, 66% 0%;
}

.moments-cover h1 {
  position: absolute;
  right: 18px;
  bottom: 28px;
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.cover-camera {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
}

.cover-camera svg {
  width: 23px;
  height: 23px;
}

.profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px 14px;
  background: #fff;
}

.profile-name {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  padding-top: 10px;
}

.profile-name strong {
  max-width: 190px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transform: translateY(-54px);
}

.profile-name a,
.profile-name button {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #68706a;
  font-size: 13px;
  text-decoration: none;
}

.profile-avatar,
.composer-avatar,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: #6da06f;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  padding: 0;
}

.avatar.profile-trigger {
  border: 0;
  cursor: pointer;
}

.profile-avatar {
  border: 0;
  cursor: pointer;
}

.profile-avatar img,
.composer-avatar img,
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  margin-top: -32px;
  border: 2px solid #fff;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.composer,
.post-card {
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.profile-view {
  padding: 12px 16px 14px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #e7e7e7;
  background: #fff;
}

.profile-back {
  min-height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #576b95;
  font-size: 15px;
  font-weight: 600;
}

.profile-view-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.profile-view-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 6px;
  background: #6da06f;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.profile-view-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-view-info {
  min-width: 0;
}

.profile-view-info h2 {
  margin: 0;
  overflow: hidden;
  color: #191919;
  font-size: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-view-info p {
  margin: 5px 0 0;
  color: #8c8c8c;
  font-size: 14px;
}

.profile-view-info p span {
  display: block;
  margin-top: 3px;
  line-height: 1.4;
}

.composer {
  display: flex;
  gap: 10px;
  margin: 8px 0;
  padding: 14px 16px;
}

.composer-body {
  min-width: 0;
  flex: 1;
}

.composer textarea {
  min-height: 48px;
  padding: 0;
  background: transparent;
  color: #1f1f1f;
  font-size: 16px;
  line-height: 1.55;
}

.composer-actions {
  gap: 12px;
  padding-top: 10px;
  border-top: 0;
}

.tool-button {
  min-height: 32px;
  color: #576b95;
  font-size: 14px;
  font-weight: 600;
}

.tool-button svg {
  color: #576b95;
}

.publish-button {
  min-width: 56px;
  min-height: 32px;
  border-radius: 4px;
  background: #07c160;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.feed {
  display: block;
  background: #fff;
}

.post-card {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e7e7e7;
}

.post-head {
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}

.post-content {
  min-width: 0;
  flex: 1;
}

.post-meta strong {
  color: #576b95;
  font-size: 16px;
  font-weight: 700;
}

.author-name {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: #576b95;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.post-text {
  margin: 4px 0 8px;
  color: #191919;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.post-grid {
  gap: 4px;
  margin: 8px 0;
}

.post-image {
  border-radius: 0;
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.post-foot time {
  color: #8c8c8c;
  font-size: 13px;
}

.more-button {
  width: 32px;
  height: 22px;
  border-radius: 3px;
  background: #f2f2f2;
  color: #576b95;
}

.more-button svg {
  width: 18px;
  height: 18px;
}

.reaction-line {
  margin-top: 8px;
  padding: 6px 8px;
  background: #f3f3f5;
  color: #576b95;
  font-size: 14px;
}

.comment-list {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding: 6px 8px;
  background: #f3f3f5;
  color: #191919;
  font-size: 14px;
  line-height: 1.45;
}

.comment-list p {
  margin: 0;
}

.comment-list strong {
  color: #576b95;
  font-weight: 600;
}

.empty-profile {
  padding: 34px 16px;
  border-bottom: 1px solid #e7e7e7;
  color: #8c8c8c;
  background: #fff;
  font-size: 15px;
  text-align: center;
}

.reaction-mark {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #576b95;
}

.reaction-mark svg {
  width: 14px;
  height: 14px;
}

.post-actions {
  justify-content: flex-start;
  gap: 18px;
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}

.post-actions button {
  min-height: 28px;
  color: #576b95;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 360px) {
  .phone-shell {
    padding-inline: 0;
  }

  .moments-cover h1 {
    font-size: 25px;
  }

  .profile-name strong,
  .post-text,
  .composer textarea {
    font-size: 15px;
  }
}

/* Remove cover header for the simplified moments feed */
.moments-cover,
.cover-camera {
  display: none;
}

.profile-row {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 92px;
  padding: max(12px, env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid #e7e7e7;
}

.profile-name {
  flex: 1;
  display: grid;
  gap: 6px;
  justify-content: flex-start;
  order: 1;
  padding-top: 0;
  min-width: 0;
}

.brand-kaomoji {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(174px, 100%);
  max-width: 174px;
  min-height: 38px;
  padding: 4px 11px 4px 5px;
  overflow: hidden;
  border: 1px solid #d7ead0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbfef8 0%, #eef8eb 100%);
  box-sizing: border-box;
  color: #255f20;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 14px rgba(47, 116, 43, 0.08);
  line-height: 1;
  text-shadow: none;
  transform: none;
}

.brand-seal {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: #2c7a30;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.brand-word {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-face {
  flex: 0 0 auto;
  color: #6f8f67;
  font-size: 13px;
  font-weight: 700;
}

.profile-name a,
.profile-name button {
  color: #576b95;
}

.profile-signature {
  display: block;
  width: 172px;
  min-height: 16px;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: #8c928c !important;
  font-size: 11px !important;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
}

.profile-actions a,
.profile-actions button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #9a9f9a !important;
  font-size: 12px !important;
  font-weight: 500;
  text-decoration: none;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: none;
}

.profile-self {
  order: 2;
  display: grid;
  justify-items: center;
  gap: 5px;
  flex: 0 0 172px;
}

.profile-self .profile-avatar {
  width: 46px;
  height: 46px;
  margin-top: 0;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: none;
}

.composer {
  margin: 0 0 8px;
}

.privacy-reminder {
  margin: 8px 0 0;
  color: #8c8c8c;
  font-size: 13px;
  line-height: 1.4;
}

.privacy-reminder.is-warning {
  color: #b45519;
  font-weight: 600;
}

.post-image {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.inline-comment {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  background: #f3f3f5;
}

.inline-comment input {
  min-width: 0;
  flex: 1;
  min-height: 34px;
  border: 1px solid #dde1da;
  border-radius: 4px;
  padding: 0 9px;
  background: #fff;
  color: #191919;
  font-size: 14px;
}

.inline-comment button {
  min-width: 50px;
  border: 0;
  border-radius: 4px;
  background: #07c160;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.88);
}

.image-viewer img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
}

.image-viewer-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}
