:root {
  --paper: #f7f3ec;
  --paper-deep: #eee6da;
  --card: rgba(255, 255, 255, 0.82);
  --ink: #2c2b29;
  --muted: #8d877e;
  --line: #ded6ca;
  --terracotta: #c86f4a;
  --terracotta-dark: #a95030;
  --sage: #6f826d;
  --shadow: 0 18px 55px rgba(88, 69, 48, 0.09);
}

/* Messaging, friends, and synchronized profile interactions */
.profile-library-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 0;
}

.profile-social-tabs button,
.profile-social-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #f7f3f1;
  color: #3c302d;
  font: inherit;
}

.profile-library-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: #f4f6f3;
  color: #3c4642;
  font: inherit;
}

.profile-social-section {
  width: min(100%, 760px);
  margin: 20px auto 0;
  padding: 16px;
  border: 1px solid #eaded8;
  border-radius: 20px;
  background: #fffdfb;
  box-shadow: 0 12px 30px rgba(91, 64, 52, 0.06);
}

.profile-social-heading > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.profile-social-heading h2 {
  margin: 0;
  font-size: 18px;
  color: #3d312d;
  font-weight: 700;
}

.profile-social-heading span {
  color: #8b7a73;
  font-size: 11px;
}

.profile-social-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 14px;
  background: #f5ece8;
}

.profile-social-tabs button.active {
  background: #fffaf7;
  color: #6f4b41;
  box-shadow: 0 4px 12px rgba(106, 70, 58, 0.1);
  font-weight: 700;
}

.profile-social-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.profile-social-actions button {
  flex: 1;
  color: #6f554c;
  border: 1px solid #eaded8;
  background: #fbf5f2;
}

.profile-social-list {
  min-height: 220px;
  margin-top: 12px;
}

.social-empty-state,
.message-chat-empty,
.video-forward-empty,
.profile-interactions-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  text-align: center;
  color: #8b7a73;
}

.social-empty-state strong,
.message-chat-empty strong,
.video-forward-empty strong,
.profile-interactions-empty strong {
  margin-bottom: 8px;
  color: #3d312d;
  font-size: 18px;
}

.social-list-row,
.friend-request-row,
.circle-invitation-row,
.video-forward-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #e6eaee;
  border-radius: 14px;
  background: #fafbfc;
  background: #fff;
  color: #302724;
  text-align: left;
}

.social-avatar,
.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background-color: #f4ddd6;
  background-position: center;
  background-size: cover;
  color: #6f4b41;
  font-weight: 700;
}

.social-list-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.social-list-copy span {
  overflow: hidden;
  color: #8b7a73;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-unread {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #a96353;
  color: #fff;
  font-size: 11px;
}

.social-row-actions {
  display: flex;
  gap: 6px;
}

.social-row-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #fbf5f2;
  color: #654d45;
}

.message-chat-dialog {
  width: min(760px, calc(100vw - 24px));
  height: min(760px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.message-chat-dialog::backdrop,
.compact-action-dialog::backdrop {
  background: rgb(40 28 24 / 42%);
}

.message-chat-card {
  height: 100%;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 64px;
  background: #fff;
}

.message-chat-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid #eaded8;
  background: #fff;
}

.message-chat-header > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-chat-header span {
  color: #8b7a73;
  font-size: 11px;
}

.message-chat-back {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #3d312d;
  font-size: 30px;
}

.message-chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-width: 0;
  padding: 14px 16px 20px;
  background: #fff;
}

.message-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.message-row.mine {
  flex-direction: row-reverse;
}

.message-row > .message-avatar {
  flex: 0 0 36px;
}

.message-bubble {
  box-sizing: border-box;
  min-width: 0;
  max-width: min(78%, 480px);
  flex: 0 1 auto;
  overflow: hidden;
  padding: 10px 12px 7px;
  border: 1px solid #eaded8;
  border-radius: 8px;
  background: #fffdfb;
  color: #3d312d;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-row.mine .message-bubble {
  border-color: transparent;
  background: #f3ddd5;
}

.message-sender {
  display: block;
  max-width: 100%;
  margin-bottom: 5px;
  color: #6f4b41;
  font-size: 11px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-bubble > div:not(.message-meta) {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-bubble img,
.message-bubble video {
  display: block;
  width: min(260px, 100%);
  max-width: 100%;
  max-height: 340px;
  margin-bottom: 7px;
  border-radius: 6px;
  object-fit: contain;
  background: #111;
}

.message-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  color: #8b7a73;
  font-size: 10px;
}

.message-meta > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-recall-button {
  flex: 0 0 48px;
  min-width: 48px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #7b6259;
}

.message-chat-composer {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid #eaded8;
  background: #fff;
}

.message-media-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #7b6259;
  font-size: 18px;
}

.message-chat-composer textarea {
  min-width: 0;
  height: 44px;
  resize: none;
  padding: 11px 13px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: #fbf5f2;
  font: inherit;
}

.message-chat-composer button,
.compact-action-card > .primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #ead0c7;
  color: #493832;
}

.compact-action-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
}

.compact-action-card {
  max-height: min(720px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: 20px;
  background: #fff;
}

.compact-action-card > label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: #6f5b55;
  font-size: 13px;
}

.compact-action-card input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #dfd4d0;
  border-radius: 8px;
  font: inherit;
}

.compact-action-card h3 {
  margin: 18px 0 10px;
  font-size: 14px;
}

.group-chat-friend-list,
.video-forward-list,
.profile-interactions-list {
  max-height: 420px;
  overflow-y: auto;
}

.group-chat-friend-list label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eee8e5;
}

.group-chat-friend-list input {
  width: 20px;
  min-height: 20px;
}

.profile-interaction-item {
  padding: 12px 0;
  border-bottom: 1px solid #eaded8;
}

.profile-interaction-item span {
  display: block;
  margin-top: 4px;
  color: #8b7a73;
  font-size: 12px;
}

@media (max-width: 720px) {
  .message-chat-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .profile-social-section {
    padding-inline: 14px;
  }

  .message-bubble {
    max-width: min(82%, 480px);
  }
}

.confirm-action-dialog {
  width: min(90vw, 420px);
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.confirm-action-dialog::backdrop {
  background: rgba(34, 29, 27, 0.42);
}

.confirm-action-sheet {
  padding: 24px;
  border: 1px solid rgba(88, 70, 62, 0.12);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(38, 29, 25, 0.22);
}

.confirm-action-handle {
  display: none;
}

.confirm-action-copy h2,
.confirm-action-copy p {
  margin: 0;
}

.confirm-action-copy h2 {
  color: #302927;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
}

.confirm-action-copy p {
  margin-top: 9px;
  color: #746965;
  font-size: 14px;
  line-height: 1.65;
}

.confirm-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
  gap: 10px;
}

.confirm-action-buttons button {
  min-height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.confirm-action-cancel {
  border: 1px solid #e2d9d5;
  color: #685e5a;
  background: #f8f4f2;
}

.confirm-action-confirm {
  border: 1px solid var(--md-primary, #a96353);
  color: #ffffff;
  background: var(--md-primary, #a96353);
}

.confirm-action-confirm.danger {
  border-color: #a84f43;
  background: #a84f43;
}

.confirm-action-dialog[open] .confirm-action-sheet {
  animation: confirm-dialog-in 180ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes confirm-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 780px) {
  .confirm-action-dialog {
    width: 100%;
    max-height: none;
    margin: auto 0 0;
  }

  .confirm-action-sheet {
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 36px rgba(38, 29, 25, 0.16);
  }

  .confirm-action-handle {
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 20px;
    border-radius: 999px;
    background: #d2c8c3;
  }

  .confirm-action-copy h2 {
    font-size: 20px;
  }

  .confirm-action-buttons {
    margin-top: 22px;
  }

  .confirm-action-dialog[open] .confirm-action-sheet {
    animation-name: confirm-sheet-in;
    animation-duration: 240ms;
  }
}

@keyframes confirm-sheet-in {
  from {
    opacity: 0.72;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

.ambient-one {
  top: -160px;
  right: 8%;
  width: 430px;
  height: 430px;
  background: rgba(220, 166, 121, 0.13);
}

.ambient-two {
  bottom: -220px;
  left: 18%;
  width: 560px;
  height: 560px;
  background: rgba(132, 155, 126, 0.1);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
}

.auth-screen[hidden],
.app-shell[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(129, 113, 92, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-brand {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
  gap: 15px;
}

.auth-brand p,
.auth-brand h1,
.auth-brand span {
  margin: 0;
}

.auth-brand p {
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.auth-brand h1 {
  margin: 6px 0;
  font-family: SimSun, serif;
  font-size: 27px;
  font-weight: 500;
}

.auth-brand > div > span {
  color: var(--muted);
  font-size: 11px;
}

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

.auth-form label,
.register-panel label {
  margin-top: 7px;
  color: #736b62;
  font-size: 11px;
}

.auth-form input,
.register-panel input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #ded5c9;
  border-radius: 12px;
  outline: 0;
  background: #fff;
}

.auth-form input:focus,
.register-panel input:focus {
  border-color: rgba(200, 111, 74, 0.65);
  box-shadow: 0 0 0 3px rgba(200, 111, 74, 0.08);
}

.auth-submit {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  font-size: 12px;
}

.emulator-test-login {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 1px dashed rgba(169, 99, 83, 0.5);
  border-radius: 14px;
  color: #8d4f42;
  background: rgba(255, 249, 246, 0.94);
  cursor: pointer;
  font-size: 12px;
}

.emulator-test-login:disabled {
  cursor: wait;
  opacity: 0.58;
}

.auth-link-button {
  width: 100%;
  margin-top: 9px;
  border: 0;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.number-auth-tip {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
}

.auth-code-button {
  border: 1px solid rgba(200, 111, 74, 0.3);
  border-radius: 12px;
  color: var(--terracotta-dark);
  background: #fff5ec;
  cursor: pointer;
  font-size: 11px;
}

.auth-code-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.register-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.register-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

#cadRegisterPanel {
  display: grid;
  gap: 10px;
}

.phone-auth-link {
  display: block;
  padding: 11px;
  border-radius: 11px;
  color: var(--terracotta-dark);
  background: #fff5ec;
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}

.auth-message {
  min-height: 19px;
  margin: 14px 0 0;
  color: var(--terracotta-dark);
  font-size: 11px;
  text-align: center;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 270px minmax(0, 820px);
  justify-content: center;
  min-height: 100vh;
  gap: 74px;
  padding: 0 48px;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 44px 0 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px 15px 15px 5px;
  color: #fffaf3;
  background: var(--terracotta);
  font-family: SimSun, serif;
  font-size: 23px;
  box-shadow: 0 8px 20px rgba(200, 111, 74, 0.25);
}

.brand-mark.brand-icon {
  overflow: hidden;
  background: transparent;
  box-shadow: 0 7px 18px rgba(111, 98, 92, 0.13);
}

.brand-mark.brand-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  margin-bottom: 3px;
  font-family: SimSun, serif;
  font-size: 21px;
  letter-spacing: 3px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.nav-list {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 64px;
}

.records-nav-wrap {
  position: relative;
}

.records-menu {
  position: absolute;
  z-index: 4;
  top: 0;
  left: calc(100% + 10px);
  display: grid;
  min-width: 108px;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(113, 93, 70, 0.12);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.97);
  box-shadow: 0 12px 30px rgba(77, 58, 39, 0.16);
  backdrop-filter: blur(14px);
}

.records-menu[hidden] {
  display: none;
}

.records-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: #716b63;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.records-menu button:hover,
.records-menu button:focus-visible {
  color: var(--terracotta-dark);
  background: rgba(200, 111, 74, 0.09);
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 16px;
  gap: 13px;
  border: 0;
  border-radius: 13px;
  color: #716b63;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.54);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--terracotta-dark);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 26px rgba(83, 65, 45, 0.06);
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  font-size: 20px;
}

.circle-switcher {
  position: relative;
  margin-top: 22px;
}

.circle-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  gap: 11px;
  border: 1px solid #e3e8ec;
  border-radius: 15px;
  color: #3c4a56;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.circle-button:hover,
.circle-button[aria-expanded="true"] {
  border-color: #c9d4dc;
  background: #f7fafb;
  box-shadow: 0 10px 28px rgba(55, 74, 92, 0.08);
}

.circle-button-icon {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: #6a7b8f;
  font-size: 15px;
}

.circle-button-copy {
  min-width: 0;
}

.circle-button-copy small,
.circle-button-copy strong {
  display: block;
}

.circle-button-copy small {
  margin-bottom: 2px;
  color: #7c8a96;
  font-size: 9px;
  letter-spacing: 1px;
}

.circle-button-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-chevron {
  margin-left: auto;
  color: #8795a1;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.circle-button[aria-expanded="true"] .circle-chevron {
  transform: rotate(180deg);
}

.circle-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 9px);
  left: 0;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fffdf9;
  box-shadow: 0 18px 45px rgba(60, 48, 35, 0.14);
}

.circle-menu[hidden] {
  display: none;
}

.circle-menu-heading {
  padding: 7px 8px 10px;
}

.circle-menu-heading strong,
.circle-menu-heading span {
  display: block;
}

.circle-menu-heading strong {
  font-family: SimSun, serif;
  font-size: 13px;
  font-weight: 500;
}

.circle-menu-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.circle-list {
  display: grid;
  gap: 4px;
}

.circle-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 11px;
}

.circle-list-item.active {
  background: #f7f0e8;
}

.circle-select-button {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 9px 8px;
  gap: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.circle-select-button > span:first-child {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(111, 130, 109, 0.1);
  font-size: 13px;
}

.circle-select-copy {
  min-width: 0;
}

.circle-select-copy strong,
.circle-select-copy small {
  display: block;
}

.circle-select-copy strong {
  overflow: hidden;
  color: #5c554d;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-select-copy small {
  margin-top: 2px;
  color: #a49c91;
  font-size: 8px;
}

.circle-manage-button {
  margin-right: 5px;
  padding: 6px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.circle-manage-button:hover {
  color: var(--terracotta-dark);
}

.add-circle-button,
.join-circle-button {
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  border: 1px dashed #d8cdc0;
  border-radius: 11px;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.add-circle-button:hover,
.join-circle-button:hover {
  border-color: var(--terracotta);
  background: #fff8f1;
}

.join-circle-button {
  margin-top: 5px;
  border-style: solid;
  color: var(--sage);
}

.memory-card {
  margin-top: auto;
  padding: 23px;
  border: 1px solid rgba(129, 113, 92, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
}

.memory-card .memory-label {
  display: block;
  margin-bottom: 11px;
  color: var(--sage);
  font-size: 12px;
  letter-spacing: 2px;
}

.memory-card strong {
  margin-right: 5px;
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}

.memory-card > span:not(.memory-label) {
  color: var(--muted);
  font-size: 12px;
}

.memory-bar {
  height: 5px;
  margin: 16px 0 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8e0d5;
}

.memory-bar i {
  display: block;
  width: 14%;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width 0.5s ease;
}

.memory-card small {
  color: #aaa297;
  font-size: 11px;
  line-height: 1.7;
}

.header-profile-button {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-profile-button:hover {
  background: rgba(200, 111, 74, 0.08);
  transform: translateY(-1px);
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent),
    var(--sage);
  font-family: SimSun, serif;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.avatar.small {
  width: 37px;
  height: 37px;
  font-size: 13px;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.header-profile-button strong,
.header-profile-button span {
  display: block;
}

.header-profile-button .avatar {
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}

.header-profile-button strong {
  font-size: 12px;
}

.header-profile-button .profile-copy > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.logout-button {
  padding: 8px 14px;
  border: 1px solid rgba(200, 111, 74, 0.22);
  border-radius: 999px;
  color: var(--terracotta-dark);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 11px;
  backdrop-filter: blur(10px);
}

.logout-button:hover {
  border-color: rgba(200, 111, 74, 0.4);
  color: var(--terracotta-dark);
  background: #fff;
}

.top-logout-button {
  position: absolute;
  z-index: 20;
  top: 22px;
  right: 26px;
}

.floating-circle-button {
  display: none;
}

.floating-circle-button[hidden] {
  display: none;
}

.main-content {
  width: 100%;
  padding: 65px 0 100px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.page-heading-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 4px;
}

.page-header h1 {
  margin: 0;
  font-family: SimSun, serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: 2px;
}

.page-heading-copy > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header-date {
  display: flex;
  align-items: center;
  padding-bottom: 2px;
  gap: 12px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-date strong {
  font-family: Georgia, serif;
  font-size: 47px;
  font-weight: 400;
  line-height: 1;
}

.header-date-copy {
  display: grid;
  gap: 2px;
  width: min(180px, 24vw);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.header-date-copy b,
.header-date-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-date-copy b {
  color: var(--text);
  font-weight: 600;
}

.header-date-copy small:last-child {
  color: #876c62;
  font-size: 10px;
}

.couple-game-card {
  position: relative;
  margin-bottom: 22px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(194, 99, 103, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, 0.8), transparent 26%),
    linear-gradient(145deg, rgba(255, 244, 239, 0.96), rgba(245, 234, 225, 0.94));
  box-shadow: 0 20px 55px rgba(130, 75, 68, 0.11);
}

.couple-game-card[hidden] {
  display: none;
}

.couple-game-card::before,
.couple-game-card::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.couple-game-card::before {
  top: -55px;
  right: -38px;
  width: 150px;
  height: 150px;
  background: rgba(218, 132, 127, 0.09);
}

.couple-game-card::after {
  bottom: -62px;
  left: 28%;
  width: 125px;
  height: 125px;
  background: rgba(111, 130, 109, 0.08);
}

.couple-game-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.couple-game-heading p,
.couple-game-heading h2,
.couple-game-heading span {
  margin: 0;
}

.couple-game-heading p {
  color: #b75e62;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.couple-game-heading h2 {
  margin: 5px 0 6px;
  font-family: SimSun, serif;
  font-size: 24px;
  font-weight: 500;
}

.couple-game-heading > div:first-child > span {
  color: #8f7d75;
  font-size: 11px;
}

.couple-level-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(183, 94, 98, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  text-align: right;
}

.couple-level-badge strong,
.couple-level-badge span {
  display: block;
}

.couple-level-badge strong {
  color: #8f454c;
  font-size: 11px;
}

.couple-level-badge span {
  margin-top: 3px;
  color: #a98a80;
  font-size: 9px;
}

.couple-level-badge b {
  color: #b75e62;
  font-family: Georgia, serif;
  font-size: 14px;
}

.couple-game-status {
  position: relative;
  z-index: 1;
  margin: 14px 0 -3px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #8f675d;
  background: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.couple-game-status[hidden] {
  display: none;
}

.couple-game-status.error {
  color: #a33f42;
  background: rgba(255, 228, 228, 0.72);
}

.couple-growth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.35fr);
  margin-top: 18px;
  gap: 18px;
}

.couple-tree-panel {
  display: flex;
  min-height: 250px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.42);
}

.couple-participants {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 10px;
  gap: 12px;
}

.couple-participant {
  display: grid;
  min-width: 58px;
  justify-items: center;
  gap: 5px;
}

.couple-participant > span {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #d98d88, #b75e62);
  box-shadow: 0 7px 16px rgba(143, 69, 76, 0.16);
  font-size: 12px;
}

.couple-participant:last-child > span {
  background: linear-gradient(145deg, #94aa91, #6f826d);
}

.couple-participant small {
  max-width: 72px;
  overflow: hidden;
  color: #8e776e;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.couple-tree-icon {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  margin: 3px 0 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 41%, transparent 42%),
    radial-gradient(circle, rgba(183, 94, 98, 0.08), transparent 68%);
  filter: drop-shadow(0 10px 10px rgba(112, 79, 61, 0.12));
  font-size: 52px;
  transition: transform 0.25s ease;
}

.couple-tree-icon:hover {
  transform: translateY(-3px) scale(1.04);
}

.couple-progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(125, 91, 76, 0.12);
}

.couple-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d98d88, #b75e62);
  transition: width 0.55s ease;
}

.couple-tree-panel > small {
  margin-top: 9px;
  color: #a18b82;
  font-size: 8px;
  text-align: center;
}

.couple-play-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.couple-panel-label {
  display: block;
  margin-bottom: 8px;
  color: #8f675d;
  font-size: 9px;
  letter-spacing: 1px;
}

.couple-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.couple-action-button {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(183, 94, 98, 0.16);
  border-radius: 15px;
  color: #824950;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.couple-action-button:hover:not(:disabled) {
  border-color: rgba(183, 94, 98, 0.38);
  background: #fff;
  transform: translateY(-2px);
}

.couple-action-button strong,
.couple-action-button small {
  display: block;
}

.couple-action-button strong {
  font-size: 11px;
}

.couple-action-button small {
  margin-top: 5px;
  color: #ad8c83;
  font-size: 8px;
}

.couple-action-button.completed {
  border-color: rgba(111, 130, 109, 0.16);
  color: #657763;
  background: rgba(232, 239, 229, 0.68);
}

.couple-action-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.couple-question-card {
  padding: 15px;
  border: 1px solid rgba(117, 97, 84, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.couple-question-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.couple-question-heading span {
  color: #8f675d;
  font-size: 9px;
  letter-spacing: 1px;
}

.couple-question-heading small {
  color: #b75e62;
  font-size: 8px;
}

.couple-question-card > strong {
  display: block;
  color: #51443f;
  font-family: SimSun, serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.couple-question-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 11px;
  gap: 7px;
}

.couple-question-options button {
  padding: 8px 7px;
  border: 1px solid rgba(137, 112, 98, 0.14);
  border-radius: 10px;
  color: #79675f;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: 9px;
}

.couple-question-options button:hover:not(:disabled),
.couple-question-options button.selected {
  border-color: rgba(183, 94, 98, 0.38);
  color: #8f454c;
  background: #fff1ef;
}

.couple-question-options button:disabled {
  cursor: default;
}

.couple-answers {
  display: grid;
  margin-top: 9px;
  gap: 5px;
}

.couple-answers > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 9px;
  color: #8d776e;
  background: rgba(247, 240, 234, 0.78);
  font-size: 8px;
}

.couple-answers strong {
  color: #8f454c;
}

.couple-answers p {
  margin: 3px 0 0;
  color: #9c8178;
  font-size: 8px;
  line-height: 1.6;
}

.couple-recent-events {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 14px;
  gap: 5px;
}

.couple-recent-events .couple-panel-label {
  margin-bottom: 1px;
}

.couple-recent-events > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  color: #8a756d;
  background: rgba(255, 255, 255, 0.44);
  font-size: 9px;
}

.couple-recent-events > div strong {
  color: #b75e62;
  font-family: Georgia, serif;
}

.group-game-card {
  border-color: #dfe6eb;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, 0.8), transparent 26%),
    linear-gradient(145deg, #f6f9fb, #edf1f4);
}

.group-game-card .couple-game-heading p,
.group-game-card .couple-question-heading small {
  color: #64788c;
}

.group-game-card .couple-level-badge strong,
.group-game-card .couple-level-badge b {
  color: #40566b;
}

.group-game-card .couple-progress-track i {
  background: linear-gradient(90deg, #8da3b8, #5f7389);
}

.group-participants {
  flex-wrap: wrap;
}

.group-participants .couple-participant > span {
  background: linear-gradient(145deg, #8da3b8, #5f7389);
}

.group-action-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.group-interaction-column {
  display: grid;
  align-content: start;
  gap: 9px;
}

.group-interaction-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.group-interaction-quick-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dde5ea;
  border-radius: 999px;
  color: #4d6276;
  background: #ffffff;
  cursor: pointer;
  font-size: 9px;
}

.group-interaction-quick-actions button:hover,
.group-interaction-quick-actions button:focus-visible {
  border-color: #b8c6d1;
  outline: 0;
  background: #fff;
}

.couple-action-button.custom {
  border-style: dashed;
  border-color: #b8c6d1;
  color: #4d6276;
}

.group-interaction-details {
  padding: 13px 14px;
  border: 1px solid #dde5ea;
  border-radius: 17px;
  background: #ffffff;
}

.group-interaction-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #40566b;
  cursor: pointer;
  list-style: none;
}

.group-interaction-details > summary::-webkit-details-marker {
  display: none;
}

.group-interaction-details > summary .couple-panel-label {
  margin: 0;
}

.group-interaction-toggle-copy {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: #64788c;
  font-size: 9px;
}

.group-interaction-toggle-copy i {
  font-size: 15px;
  font-style: normal;
  transition: transform 0.2s ease;
}

.group-interaction-open {
  display: none;
}

.group-interaction-details[open] .group-interaction-closed {
  display: none;
}

.group-interaction-details[open] .group-interaction-open {
  display: inline;
}

.group-interaction-details[open] .group-interaction-toggle-copy i {
  transform: rotate(180deg);
}

.group-interaction-body {
  display: grid;
  margin-top: 13px;
  padding-top: 13px;
  gap: 14px;
  border-top: 1px solid #e2e8ec;
}

.group-stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.group-stats-summary > span {
  display: grid;
  min-height: 70px;
  place-content: center;
  border: 1px solid #dde5ea;
  border-radius: 15px;
  background: #f3f6f8;
  text-align: center;
}

.group-stats-summary strong,
.group-stats-summary small {
  display: block;
}

.group-stats-summary strong {
  color: #40566b;
  font-family: inherit;
  font-size: 22px;
}

.group-stats-summary small {
  margin-top: 4px;
  color: #7c8a96;
  font-size: 8px;
}

.group-stats-section {
  margin-top: 20px;
}

.group-stats-section > strong {
  display: block;
  margin-bottom: 9px;
  color: #3c4a56;
  font-size: 11px;
}

.group-stats-list {
  display: grid;
  gap: 7px;
}

.group-stats-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 11px;
  gap: 9px;
  border-radius: 13px;
  background: #f5f7f9;
}

.group-stat-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #6a7b8f;
  font-size: 10px;
}

.group-stats-list strong,
.group-stats-list small {
  display: block;
}

.group-stats-list strong {
  color: #37434d;
  font-size: 10px;
}

.group-stats-list small {
  margin-top: 3px;
  color: #7c8a96;
  font-size: 8px;
}

.group-stats-list b {
  color: #43586d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
}

.group-recent-events {
  display: grid;
  gap: 6px;
}

.group-recent-events > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  color: #54616b;
  background: #ffffff;
  font-size: 9px;
}

.group-recent-events > div strong {
  color: #43586d;
  font-family: inherit;
}

.group-event-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(111, 130, 109, 0.24);
  border-radius: 14px;
  color: #928b82;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.circle-rewards-card {
  margin-bottom: 22px;
  padding: 23px 24px;
  border: 1px solid rgba(178, 139, 77, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 5%, rgba(255, 224, 155, 0.18), transparent 25%),
    rgba(255, 252, 244, 0.86);
  box-shadow: 0 18px 45px rgba(97, 75, 45, 0.08);
}

.circle-rewards-card[hidden] {
  display: none;
}

.rewards-heading {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.rewards-heading p,
.rewards-heading h2,
.rewards-heading span {
  margin: 0;
}

.rewards-heading p {
  color: #b18a4c;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.rewards-heading h2 {
  margin: 5px 0 6px;
  font-family: SimSun, serif;
  font-size: 22px;
  font-weight: 500;
}

.rewards-heading > div:first-child > span {
  color: var(--muted);
  font-size: 10px;
}

.rewards-toggle-icon {
  align-self: center;
  color: #af8a50;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.circle-rewards-card.expanded .rewards-toggle-icon {
  transform: rotate(180deg);
}

.circle-rewards-body[hidden] {
  display: none;
}

.points-wallet {
  margin-left: auto;
  min-width: 90px;
  padding: 9px 13px;
  border: 1px solid rgba(177, 138, 76, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  text-align: center;
}

.points-wallet small,
.points-wallet strong {
  display: block;
}

.points-wallet small {
  color: #9b8664;
  font-size: 8px;
}

.points-wallet strong {
  margin-top: 2px;
  color: #a06f27;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
}

.reward-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 17px;
  gap: 9px;
}

.reward-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 88px;
  padding: 13px;
  border: 1px solid rgba(157, 125, 75, 0.13);
  border-radius: 17px;
  gap: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.reward-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 12px;
  background: #fff5d9;
  font-size: 21px;
}

.reward-item strong,
.reward-item small {
  display: block;
}

.reward-item strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-item small {
  margin-top: 4px;
  color: #a58b61;
  font-size: 8px;
}

.reward-item > button:not(.reward-delete-button) {
  grid-column: 1 / -1;
  padding: 7px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #aa7e3e;
  cursor: pointer;
  font-size: 9px;
}

.reward-item > button:disabled {
  color: #a49b8c;
  background: #eee9df;
  cursor: default;
}

.reward-delete-button {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  color: #ae8e70;
  background: transparent;
  cursor: pointer;
}

.add-reward-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed rgba(177, 138, 76, 0.28);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.42);
}

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

.add-reward-form > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 92px auto;
  gap: 7px;
}

.add-reward-form input {
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfd3c0;
  border-radius: 10px;
  outline: 0;
  background: #fff;
  font-size: 10px;
}

.add-reward-form .primary-button {
  padding: 0 14px;
  font-size: 10px;
}

.redemption-section {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid rgba(157, 125, 75, 0.13);
}

.redemption-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.redemption-heading strong {
  font-size: 11px;
}

.redemption-heading small {
  color: var(--muted);
  font-size: 8px;
}

.redemption-list {
  display: grid;
  gap: 6px;
}

.redemption-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 9px 10px;
  border-radius: 11px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.redemption-item > span:first-child {
  font-size: 18px;
  text-align: center;
}

.redemption-item strong,
.redemption-item small {
  display: block;
}

.redemption-item strong {
  font-size: 9px;
  font-weight: 500;
}

.redemption-item small {
  margin-top: 3px;
  color: #a18d73;
  font-size: 8px;
}

.redemption-status {
  padding: 5px 7px;
  border-radius: 99px;
  color: #a26f2c;
  background: #fff3d3;
  font-size: 8px;
}

.redemption-status.fulfilled {
  color: #60785e;
  background: #e9f1e6;
}

.redemption-item > button {
  padding: 6px 8px;
  border: 1px solid rgba(111, 130, 109, 0.2);
  border-radius: 8px;
  color: var(--sage);
  background: #f4f8f2;
  cursor: pointer;
  font-size: 8px;
}

.redemption-empty {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  text-align: center;
}

.composer {
  position: relative;
  padding: 23px 25px 17px;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.composer::after {
  position: absolute;
  right: 28px;
  bottom: -7px;
  width: 34px;
  height: 14px;
  border-radius: 50%;
  background: rgba(200, 111, 74, 0.13);
  content: "";
  filter: blur(7px);
}

.composer-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.composer textarea {
  width: 100%;
  min-height: 78px;
  padding: 9px 0;
  resize: vertical;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  line-height: 1.8;
}

.composer textarea::placeholder {
  color: #b3aca2;
}

.visibility-row {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 0 0 51px;
  gap: 8px;
}

.visibility-row > span {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--sage);
  background: rgba(111, 130, 109, 0.08);
  font-size: 9px;
}

.visibility-row button {
  padding: 4px 7px;
  border: 0;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.visibility-row button:hover {
  text-decoration: underline;
}

.publish-targets {
  display: flex;
  align-items: flex-start;
  margin: 11px 0 0 51px;
  gap: 9px;
}

.publish-targets > span {
  flex: 0 0 auto;
  padding-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.publish-circle-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.publish-circle-option {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  gap: 5px;
  border: 1px solid rgba(111, 130, 109, 0.16);
  border-radius: 99px;
  color: #5f715d;
  background: rgba(111, 130, 109, 0.07);
  cursor: pointer;
  font-size: 9px;
}

.publish-circle-option input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: var(--sage);
}

.publish-circle-option.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.62;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(142, 128, 108, 0.12);
}

.composer-tools,
.publish-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-tools {
  flex-wrap: wrap;
}

.tool-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  color: #777168;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  transition: 0.2s ease;
}

.tool-button:hover,
.ghost-button:hover {
  color: var(--terracotta-dark);
  background: #f7f0e8;
}

.tool-button.active {
  color: var(--terracotta-dark);
  background: #f7f0e8;
}

.tool-icon {
  font-size: 16px;
}

.image-icon {
  color: var(--sage);
}

.video-icon {
  color: var(--terracotta);
  font-size: 13px;
}

.location-icon {
  color: #7d9279;
  font-size: 17px;
}

.location-preview {
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 51px);
  margin: 10px 0 0 51px;
  padding: 7px 10px;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(111, 130, 109, 0.16);
  border-radius: 99px;
  color: var(--sage);
  background: rgba(111, 130, 109, 0.07);
  cursor: pointer;
  font-size: 10px;
}

.location-preview strong {
  overflow: hidden;
  color: #5f715d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-preview small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.location-preview[hidden] {
  display: none;
}

.mood-picker {
  position: relative;
}

.mood-menu {
  position: absolute;
  z-index: 5;
  bottom: 42px;
  left: 0;
  display: grid;
  width: 120px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf9;
  box-shadow: 0 12px 30px rgba(60, 48, 35, 0.13);
}

.mood-menu[hidden] {
  display: none;
}

.mood-menu button {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}

.mood-menu button:hover {
  background: var(--paper);
}

.publish-wrap > span {
  color: #b0a99f;
  font-family: Georgia, serif;
  font-size: 10px;
}

.publish-button {
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--terracotta);
  box-shadow: 0 7px 18px rgba(200, 111, 74, 0.22);
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s ease;
}

.publish-button:hover {
  background: var(--terracotta-dark);
  transform: translateY(-1px);
}

.publish-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.composer-message {
  height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--terracotta-dark);
  font-size: 11px;
  transition: 0.2s ease;
}

.composer-message.show {
  height: 20px;
  margin-top: 10px;
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 4px 51px;
}

.preview-item {
  position: relative;
  height: 100px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper-deep);
}

.preview-item img,
.preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-preview {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(28, 27, 25, 0.68);
  cursor: pointer;
}

.timeline-section {
  margin-top: 46px;
}

.app-shell.records-mode #journalView > .page-header,
.app-shell.records-mode #journalView > .couple-game-card,
.app-shell.records-mode #journalView > .circle-rewards-card,
.app-shell.records-mode #journalView > .composer {
  display: none !important;
}

.app-shell.records-mode .timeline-section {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  display: inline-block;
  margin: 0 12px 0 0;
  font-family: SimSun, serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 1px;
}

.section-heading span {
  color: var(--muted);
  font-size: 10px;
}

#timelineScope {
  margin-right: 8px;
  color: var(--sage);
}

#timelineScope::after {
  margin-left: 8px;
  color: var(--line);
  content: "路";
}

.timeline {
  position: relative;
  padding-left: 42px;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 12px;
  left: 10px;
  width: 1px;
  background: linear-gradient(var(--terracotta), var(--line) 40%, transparent);
  content: "";
}

.date-divider {
  position: relative;
  margin: 31px 0 15px;
  color: #81796e;
  font-family: SimSun, serif;
  font-size: 13px;
  letter-spacing: 2px;
}

.date-divider:first-child {
  margin-top: 0;
}

.date-divider::before {
  position: absolute;
  top: 50%;
  left: -37px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 1px rgba(200, 111, 74, 0.35);
  content: "";
  transform: translateY(-50%);
}

.moment-card {
  position: relative;
  margin-bottom: 17px;
  padding: 20px 22px 16px;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  transition: 0.25s ease;
}

.moment-card:hover {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 13px 35px rgba(74, 60, 44, 0.07);
  transform: translateY(-2px);
}

.timeline-dot {
  position: absolute;
  top: 25px;
  left: -36px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #b9afa2;
}

.moment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 22px;
  gap: 8px;
}

.moment-author-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 7px;
  color: #6f4b41;
  background-color: #f4ddd6;
  background-position: center;
  background-size: cover;
  font-size: 10px;
  font-weight: 700;
}

.moment-meta time {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 1px;
}

.mood-badge {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--sage);
  background: rgba(111, 130, 109, 0.1);
  font-size: 10px;
}

.circle-badge {
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--terracotta-dark);
  background: rgba(200, 111, 74, 0.08);
  font-size: 10px;
}

.delete-button {
  margin-left: auto;
  border: 0;
  color: #b8b0a6;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  opacity: 0;
  transition: 0.2s ease;
}

.delete-button + .media-layout-toggle {
  margin-left: 0;
}

.moment-card:hover .delete-button {
  opacity: 1;
}

.delete-button:hover {
  color: var(--terracotta-dark);
}

.moment-copy {
  margin: 11px 0 0;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.85;
}

.moment-copy:empty {
  display: none;
}

.moment-location {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 9px;
  padding: 5px 9px;
  gap: 5px;
  border-radius: 99px;
  color: #637461;
  background: rgba(111, 130, 109, 0.08);
  font-size: 10px;
}

.moment-location strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-location[hidden] {
  display: none;
}

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

.moment-media:empty {
  display: none;
}

.media-item {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 14px;
  background: #e6ddd0;
}

.media-item:only-child {
  grid-column: 1 / -1;
  max-height: 430px;
}

.media-item img,
.media-item video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 430px;
  object-fit: cover;
}

.media-item video {
  background: #242321;
  object-fit: contain;
}

.media-open-button {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

.media-layout-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(129, 113, 92, 0.14);
  border-radius: 50%;
  color: #3f3934;
  background: #f8f5f1;
  box-shadow: 0 3px 10px rgba(34, 29, 24, 0.08);
  cursor: pointer;
  font-size: 17px;
}

.media-layout-toggle:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.moment-media.media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.moment-media.media-grid.media-count-2,
.moment-media.media-grid.media-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.moment-media.media-grid .media-item {
  grid-column: auto;
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 3px;
}

.moment-media.media-grid .media-item img,
.moment-media.media-grid .media-item video {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
}

.image-viewer-dialog {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #ffffff;
  background: #111312;
}

.image-viewer-dialog::backdrop {
  background: #111312;
}

.image-viewer-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: calc(58px + env(safe-area-inset-top)) 14px calc(58px + env(safe-area-inset-bottom));
}

.image-viewer-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

.image-viewer-close,
.image-viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.image-viewer-close {
  top: calc(10px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  font-size: 28px;
}

.image-viewer-nav {
  top: 50%;
  font-size: 36px;
  transform: translateY(-50%);
}

.image-viewer-nav.previous {
  left: calc(8px + env(safe-area-inset-left));
}

.image-viewer-nav.next {
  right: calc(8px + env(safe-area-inset-right));
}

.image-viewer-status,
.image-viewer-counter {
  position: absolute;
  left: 50%;
  padding: 7px 11px;
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.36);
  font-size: 12px;
  transform: translateX(-50%);
}

.image-viewer-status {
  top: 50%;
  transform: translate(-50%, -50%);
}

.image-viewer-status[hidden] {
  display: none;
}

.image-viewer-counter {
  bottom: calc(13px + env(safe-area-inset-bottom));
}

.public-video-option {
  display: flex;
  align-items: center;
  margin: 8px 0 0;
  padding: 12px 0;
  gap: 11px;
  border-top: 1px solid rgba(142, 128, 108, 0.12);
  cursor: pointer;
}

.public-video-option[hidden] {
  display: none;
}

.public-video-option input {
  width: 40px;
  height: 23px;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(121, 112, 102, 0.25);
  border-radius: 99px;
  background: #d8d4cf;
  cursor: pointer;
  transition: background 0.2s ease;
}

.public-video-option input::after {
  display: block;
  width: 17px;
  height: 17px;
  margin: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(55, 45, 36, 0.18);
  content: "";
  transition: transform 0.2s ease;
}

.public-video-option input:checked {
  background: var(--terracotta);
}

.public-video-option input:checked::after {
  transform: translateX(17px);
}

.public-video-option > span,
.public-video-option strong,
.public-video-option small {
  display: block;
}

.public-video-option strong {
  color: var(--ink);
  font-size: 11px;
}

.public-video-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.moment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(142, 128, 108, 0.1);
}

.moment-footer > span {
  color: #b2aba1;
  font-size: 9px;
  letter-spacing: 1px;
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.like-button {
  border: 0;
  color: #a9a197;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
  transition: 0.2s ease;
}

.like-button.liked {
  color: var(--terracotta);
  transform: scale(1.12);
}

.comment-button {
  display: inline-flex;
  align-items: center;
  min-width: 42px;
  padding: 5px 7px;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  color: #8c8277;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.like-button[hidden],
.comment-button[hidden] {
  display: none !important;
}

.comment-button:hover,
.comment-button:focus-visible {
  color: var(--terracotta-dark);
  background: rgba(200, 111, 74, 0.08);
}

.empty-state {
  padding: 64px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  color: var(--line);
  font-family: Georgia, serif;
  font-size: 50px;
}

.empty-state h3 {
  margin: 9px 0;
  color: #6f685f;
  font-family: SimSun, serif;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  font-size: 12px;
}

.circle-dialog {
  width: min(92vw, 520px);
  max-height: 88vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: transparent;
}

.circle-dialog::backdrop {
  background: rgba(43, 38, 32, 0.32);
  backdrop-filter: blur(5px);
}

.dialog-card {
  max-height: 88vh;
  padding: 27px;
  overflow-y: auto;
  border: 1px solid rgba(129, 113, 92, 0.16);
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 28px 75px rgba(49, 39, 28, 0.2);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-heading p {
  margin: 0 0 6px;
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: SimSun, serif;
  font-size: 23px;
  font-weight: 500;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #8e857b;
  background: var(--paper);
  cursor: pointer;
  font-size: 18px;
}

.dialog-description {
  margin: 16px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.field-label {
  display: block;
  margin: 14px 0 7px;
  color: #736b62;
  font-size: 10px;
}

.dialog-card input,
.dialog-card select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ded5c9;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.dialog-card input:focus,
.dialog-card select:focus {
  border-color: rgba(200, 111, 74, 0.65);
  box-shadow: 0 0 0 3px rgba(200, 111, 74, 0.08);
}

.comments-dialog {
  width: min(92vw, 520px);
  max-height: 88vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: transparent;
}

.comments-dialog::backdrop {
  background: rgba(43, 38, 32, 0.32);
  backdrop-filter: blur(5px);
}

.comments-card {
  display: flex;
  max-height: 88vh;
  flex-direction: column;
  padding: 27px;
  border: 1px solid rgba(129, 113, 92, 0.16);
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 28px 75px rgba(49, 39, 28, 0.2);
}

.comments-privacy {
  margin: 14px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.comments-list {
  min-height: 120px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 2px 3px 8px 0;
}

.comments-loading,
.comments-empty {
  padding: 35px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  padding: 11px 0;
  gap: 10px;
  border-bottom: 1px solid rgba(142, 128, 108, 0.1);
}

.comment-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--terracotta);
  font-family: SimSun, serif;
  font-size: 12px;
}

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

.comment-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.comment-heading strong {
  color: var(--ink);
  font-size: 11px;
}

.comment-heading time {
  flex: 0 0 auto;
  color: #aaa096;
  font-size: 9px;
}

.comment-body p {
  margin: 5px 0 0;
  color: #625b53;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.comment-form {
  display: flex;
  margin-top: 13px;
  gap: 8px;
}

.comment-form input {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ded5c9;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.comment-form input:focus {
  border-color: rgba(200, 111, 74, 0.65);
  box-shadow: 0 0 0 3px rgba(200, 111, 74, 0.08);
}

.comment-form button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.comments-card .form-status {
  min-height: 15px;
  margin: 8px 0 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  gap: 8px;
}

.location-current-button {
  display: flex;
  width: 100%;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  gap: 10px;
  border: 1px solid rgba(111, 130, 109, 0.2);
  border-radius: 12px;
  color: #5e705c;
  background: rgba(111, 130, 109, 0.07);
  cursor: pointer;
  text-align: left;
}

.location-current-button > span:first-child {
  font-size: 24px;
}

.location-current-button strong,
.location-current-button small {
  display: block;
}

.location-current-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.location-current-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.location-status {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.location-dialog-actions {
  align-items: center;
}

.location-dialog-actions > span {
  flex: 1;
}

.primary-button,
.secondary-button {
  padding: 9px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 10px;
}

.primary-button {
  border: 1px solid var(--terracotta);
  color: #fff;
  background: var(--terracotta);
}

.primary-button:hover {
  background: var(--terracotta-dark);
}

.secondary-button {
  border: 1px solid #ded5c9;
  color: #716960;
  background: #fff;
}

.secondary-button:hover {
  border-color: #cbbcad;
  background: var(--paper);
}

.privacy-callout {
  display: flex;
  margin-top: 19px;
  padding: 14px;
  gap: 11px;
  border-radius: 14px;
  color: #52604f;
  background: rgba(111, 130, 109, 0.09);
}

.privacy-callout > span {
  font-size: 16px;
}

.privacy-callout strong,
.privacy-callout p {
  display: block;
}

.privacy-callout strong {
  font-size: 11px;
}

.privacy-callout p {
  margin: 4px 0 0;
  color: #7f897c;
  font-size: 9px;
  line-height: 1.6;
}

.inline-form > div,
.invite-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.members-section {
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid rgba(142, 128, 108, 0.12);
}

.members-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.members-heading strong {
  font-size: 11px;
}

.members-heading span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 9px;
}

.members-heading small {
  color: var(--muted);
  font-size: 8px;
}

.member-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  gap: 7px;
}

.member-item {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 9px;
  gap: 8px;
  border: 1px solid rgba(129, 113, 92, 0.1);
  border-radius: 11px;
  background: rgba(247, 243, 236, 0.7);
}

.member-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--sage);
  font-size: 10px;
}

.member-item div {
  min-width: 0;
}

.member-item strong,
.member-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-item strong {
  font-size: 10px;
}

.member-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.member-remove-button {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: #a95030;
  background: rgba(200, 111, 74, 0.08);
  cursor: pointer;
  font-size: 8px;
}

.member-actions {
  display: flex;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 5px;
}

.member-publish-button {
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: #5f715d;
  background: rgba(111, 130, 109, 0.1);
  cursor: pointer;
  font-size: 8px;
}

.member-publish-button.restricted {
  color: #8a7566;
  background: rgba(129, 113, 92, 0.08);
}

.member-remove-button:hover {
  background: rgba(200, 111, 74, 0.16);
}

.invite-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 13px;
  gap: 12px;
  border: 1px dashed #d6c8b8;
  border-radius: 13px;
  background: #fffaf4;
}

.invite-code-box span,
.invite-code-box strong {
  display: block;
}

.invite-code-box span {
  color: var(--muted);
  font-size: 8px;
}

.invite-code-box strong {
  margin-top: 3px;
  color: var(--terracotta-dark);
  font-family: Georgia, serif;
  font-size: 14px;
  letter-spacing: 1px;
}

.circle-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 21px;
  padding-top: 18px;
  gap: 16px;
  border-top: 1px solid rgba(169, 80, 48, 0.14);
}

.circle-danger-zone strong,
.circle-danger-zone p {
  display: block;
}

.circle-danger-zone strong {
  color: #88452d;
  font-size: 10px;
}

.circle-danger-zone p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.danger-button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(169, 80, 48, 0.28);
  border-radius: 10px;
  color: #a95030;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}

.danger-button:hover {
  color: #fff;
  background: #a95030;
}

.profile-view[hidden],
.public-video-view[hidden],
#journalView[hidden] {
  display: none;
}

.public-video-header {
  margin-bottom: 24px;
}

.public-video-header h1,
.public-video-header p {
  margin: 0;
}

.public-video-header h1 {
  margin-top: 8px;
  font-family: SimSun, serif;
  font-size: clamp(31px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: 3px;
}

.public-video-header > div > p:last-child {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.public-video-tabs {
  display: flex;
  width: fit-content;
  margin-bottom: 22px;
  padding: 5px;
  gap: 4px;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.public-video-tabs button {
  padding: 8px 17px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.public-video-tabs button.active {
  color: #fffaf4;
  background: var(--terracotta);
  box-shadow: 0 7px 18px rgba(181, 91, 59, 0.2);
}

.public-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.public-video-empty {
  grid-column: 1 / -1;
  min-height: 320px;
  align-content: center;
}

.public-video-card {
  overflow: hidden;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 38px rgba(77, 58, 39, 0.09);
}

.public-video-frame {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  place-items: center;
  background: #171717;
}

.public-video-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #171717;
}

.public-video-cover {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  place-items: center;
  border: 0;
  cursor: pointer;
}

.public-video-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(61, 43, 30, 0.42));
  content: "";
}

.cover-family {
  background: linear-gradient(145deg, #e7b280, #b96846);
}

.cover-couple {
  background: linear-gradient(145deg, #d6a0a5, #9e5868);
}

.cover-parent {
  background: linear-gradient(145deg, #a9c3a0, #66846e);
}

.cover-friends {
  background: linear-gradient(145deg, #9dbbc2, #527984);
}

.public-video-scene {
  position: relative;
  z-index: 1;
  font-size: 54px;
  filter: drop-shadow(0 10px 16px rgba(65, 44, 27, 0.18));
  transition: transform 0.25s ease;
}

.public-video-cover:hover .public-video-scene,
.public-video-cover.playing .public-video-scene {
  transform: scale(1.08);
}

.public-video-play {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(63, 46, 34, 0.42);
  font-size: 16px;
  backdrop-filter: blur(8px);
}

.public-video-duration {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 10px;
  padding: 4px 7px;
  border-radius: 7px;
  color: #fff;
  background: rgba(41, 32, 25, 0.56);
  font-size: 9px;
}

.public-video-copy {
  padding: 16px 17px 18px;
}

.public-video-copy > strong {
  display: block;
  font-family: SimSun, serif;
  font-size: 16px;
  font-weight: 500;
}

.public-video-copy > p {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 9px;
}

.public-video-copy > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-video-copy > div > span {
  overflow: hidden;
  color: #6e675f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-video-publisher {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 0;
  gap: 9px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.public-video-publisher-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  color: #fff;
  background: var(--terracotta);
  font-family: SimSun, serif;
  font-size: 13px;
  box-shadow: 0 5px 14px rgba(48, 35, 25, 0.2);
}

.public-video-publisher > span:last-child,
.public-video-publisher strong,
.public-video-publisher small {
  display: block;
}

.public-video-publisher strong {
  font-size: 10px;
}

.public-video-publisher small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.public-video-copy [data-public-video-like] {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--terracotta-dark);
  background: rgba(200, 111, 74, 0.09);
  cursor: pointer;
  font-size: 9px;
}

.public-video-copy [data-public-video-like].liked {
  color: #fff;
  background: var(--terracotta);
}

.public-video-copy [data-public-video-comment] {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  color: #7e746a;
  background: rgba(111, 130, 109, 0.1);
  cursor: pointer;
  font-size: 9px;
}

.public-video-copy [data-public-video-comment]:hover,
.public-video-copy [data-public-video-comment]:focus-visible {
  color: #fff;
  background: #6f826d;
}

.public-profile-dialog {
  width: min(90vw, 380px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: transparent;
}

.public-profile-dialog::backdrop {
  background: rgba(28, 24, 21, 0.58);
  backdrop-filter: blur(7px);
}

.public-profile-card {
  position: relative;
  padding: 27px;
  border: 1px solid rgba(129, 113, 92, 0.14);
  border-radius: 26px;
  background: #fffdf9;
  box-shadow: 0 28px 80px rgba(37, 29, 23, 0.3);
}

.public-profile-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #81786f;
  background: var(--paper);
  cursor: pointer;
  font-size: 18px;
}

.public-profile-identity {
  display: flex;
  align-items: center;
  padding-right: 38px;
  gap: 14px;
}

.public-profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--terracotta), var(--terracotta-dark));
  font-family: SimSun, serif;
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(181, 91, 59, 0.24);
}

.public-profile-identity strong,
.public-profile-identity span {
  display: block;
}

.public-profile-identity strong {
  font-family: SimSun, serif;
  font-size: 20px;
  font-weight: 500;
}

.public-profile-identity span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.public-profile-bio {
  margin: 20px 0 16px;
  color: #686159;
  font-size: 11px;
  line-height: 1.7;
}

.public-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 0;
  border-top: 1px solid rgba(129, 113, 92, 0.1);
  border-bottom: 1px solid rgba(129, 113, 92, 0.1);
  text-align: center;
}

.public-profile-stats span,
.public-profile-stats strong {
  display: block;
}

.public-profile-stats span {
  color: var(--muted);
  font-size: 8px;
}

.public-profile-stats strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.public-profile-follow {
  width: 100%;
  margin-top: 17px;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--terracotta);
  cursor: pointer;
  font-size: 11px;
}

.public-profile-follow.following {
  color: #5f715d;
  background: rgba(111, 130, 109, 0.13);
}

.public-profile-notice {
  margin-top: 13px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.public-profile-video-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 17px;
  gap: 7px;
}

.public-profile-video-row span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #e6c09a, #b86d4d);
  font-size: 25px;
}

.group-action-share-card {
  text-align: center;
}

.group-action-setup-card {
  text-align: left;
}

.group-action-recipients-field {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.group-action-recipients-field legend,
.group-action-media-field > span {
  display: block;
  margin-bottom: 9px;
  color: #736b62;
  font-size: 9px;
}

.group-action-recipient-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.group-action-recipient-list label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px;
  gap: 8px;
  border: 1px solid rgba(129, 113, 92, 0.13);
  border-radius: 12px;
  background: rgba(247, 243, 236, 0.7);
  cursor: pointer;
}

.group-action-recipient-list label:has(input:checked) {
  border-color: rgba(111, 130, 109, 0.4);
  background: rgba(111, 130, 109, 0.13);
}

.group-action-recipient-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.group-action-recipient-list label > span {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--sage);
  font-size: 10px;
}

.group-action-recipient-list label > strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-action-media-field {
  margin-top: 18px;
}

.group-action-media-picker {
  display: block;
  padding: 16px;
  border: 1px dashed rgba(111, 130, 109, 0.38);
  border-radius: 14px;
  color: #5f715d;
  background: rgba(111, 130, 109, 0.08);
  cursor: pointer;
  text-align: center;
}

.group-action-media-picker strong,
.group-action-media-picker small {
  display: block;
}

.group-action-media-picker strong {
  font-size: 11px;
}

.group-action-media-picker small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.group-action-media-preview {
  display: grid;
  margin-top: 10px;
  gap: 7px;
}

.group-action-media-preview[hidden] {
  display: none;
}

.group-action-media-preview > div {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  gap: 9px;
  border-radius: 11px;
  background: rgba(247, 243, 236, 0.8);
}

.group-action-media-preview > div > span {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--terracotta);
  font-size: 10px;
}

.group-action-media-preview > div > div {
  min-width: 0;
  flex: 1;
}

.group-action-media-preview strong,
.group-action-media-preview small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-action-media-preview strong {
  font-size: 9px;
}

.group-action-media-preview small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.group-action-media-preview button {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: #9b5d45;
  background: rgba(200, 111, 74, 0.1);
  cursor: pointer;
}

.group-action-setup-status {
  min-height: 16px;
  margin: 13px 0 0;
  color: var(--terracotta-dark);
  font-size: 9px;
}

.group-action-setup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  gap: 9px;
}

.group-action-setup-actions button {
  min-height: 39px;
  font-size: 10px;
}

.group-action-share-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 19px 19px 19px 6px;
  color: #fff;
  background: linear-gradient(145deg, var(--sage), #587158);
  font-family: SimSun, serif;
  font-size: 21px;
  box-shadow: 0 10px 25px rgba(111, 130, 109, 0.23);
}

.group-action-share-eyebrow {
  margin: 0;
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
}

.group-action-share-card h2 {
  margin: 8px 0 0;
  font-family: SimSun, serif;
  font-size: 25px;
  font-weight: 500;
}

.group-action-share-description {
  margin: 13px auto 0;
  max-width: 290px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.group-action-share-privacy {
  margin-top: 14px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #687763;
  background: rgba(111, 130, 109, 0.1);
  font-size: 9px;
}

.group-action-share-extra {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #87563f;
  background: rgba(200, 111, 74, 0.09);
  font-size: 9px;
  line-height: 1.6;
}

.group-action-share-extra[hidden] {
  display: none;
}

.group-action-share-status {
  min-height: 16px;
  margin: 12px 0 0;
  color: var(--terracotta-dark);
  font-size: 9px;
}

.group-action-share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 17px;
  gap: 9px;
}

.group-action-share-actions button {
  min-height: 39px;
  padding: 8px 9px;
  font-size: 10px;
}

.profile-page-header {
  position: relative;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px 18px;
  overflow: hidden;
  border: 1px solid rgba(126, 82, 68, 0.1);
  border-radius: 24px;
  background: linear-gradient(150deg, #f3ddd5 0%, #e8c9be 100%);
  box-shadow: 0 18px 42px rgba(112, 72, 57, 0.13);
  color: #493832;
}

.profile-page-header h1 {
  margin: 0;
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.profile-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-identity-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-right: 0;
}

.profile-identity-copy {
  min-width: 0;
}

.profile-menu-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(112, 72, 57, 0.13);
  border-radius: 50%;
  color: #5f443b;
  background: rgba(255, 250, 247, 0.58);
  cursor: pointer;
  font-size: 17px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.profile-menu-button:hover,
.profile-menu-button:focus-visible {
  background: rgba(255, 250, 247, 0.82);
  transform: rotate(8deg);
}

.profile-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.profile-name-row h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-points-button {
  display: inline-flex;
  min-width: 0;
  min-height: 54px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(112, 72, 57, 0.12);
  border-radius: 14px;
  color: #60473f;
  background: rgba(255, 250, 247, 0.52);
  cursor: pointer;
  font-size: 11px;
}

.profile-points-button[hidden] {
  display: none;
}

.profile-points-button strong {
  color: #493832;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
}

.profile-points-button:hover,
.profile-points-button:focus-visible {
  background: rgba(255, 250, 247, 0.78);
}

.profile-identity-copy > p,
.profile-identity-copy > span {
  display: block;
  margin: 0;
}

.profile-identity-copy > p {
  margin-bottom: 6px;
  color: rgba(73, 56, 50, 0.74);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.profile-identity-copy > span {
  margin-top: 7px;
  overflow: hidden;
  color: rgba(73, 56, 50, 0.7);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(112, 72, 57, 0.13);
  border-radius: 999px;
  color: #5f443b;
  background: rgba(255, 250, 247, 0.58);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.profile-edit-button:hover,
.profile-edit-button[aria-expanded="true"] {
  background: rgba(255, 250, 247, 0.82);
}

.profile-overview-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 250, 247, 0.42);
}

.profile-overview-stats span,
.profile-overview-stats button {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 2px 0;
  border: 0;
  color: rgba(73, 56, 50, 0.7);
  background: transparent;
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.profile-overview-stats > * + * {
  border-left: 1px solid rgba(112, 72, 57, 0.12);
}

.profile-overview-stats strong {
  color: #493832;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
}

.profile-overview-stats button {
  cursor: pointer;
}

.profile-overview-stats button:hover,
.profile-overview-stats button:focus-visible {
  color: #5d443b;
  background: rgba(255, 252, 249, 0.5);
}

.profile-relationships-list {
  display: grid;
  max-height: min(62vh, 520px);
  gap: 8px;
  overflow-y: auto;
}

.profile-circle-directory-list {
  display: grid;
  max-height: min(62vh, 520px);
  gap: 8px;
  overflow-y: auto;
}

.profile-circle-directory-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  padding: 9px 10px;
  gap: 10px;
  border: 1px solid rgba(112, 72, 57, 0.11);
  border-radius: 12px;
  color: #493832;
  background: #fffdfa;
  cursor: pointer;
  text-align: left;
}

.circle-directory-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  color: #79584d;
  background: #f4ddd6;
  font-size: 18px;
}

.circle-directory-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.circle-directory-copy strong,
.circle-directory-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.circle-directory-copy small {
  color: rgba(73, 56, 50, 0.68);
  font-size: 11px;
}

.circle-directory-arrow {
  color: rgba(73, 56, 50, 0.5);
  font-size: 22px;
}

.profile-relationship-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 62px;
  padding: 8px 10px;
  gap: 10px;
  border: 1px solid rgba(112, 72, 57, 0.11);
  border-radius: 12px;
  color: #493832;
  background: #fffdfa;
  cursor: pointer;
  text-align: left;
}

.profile-relationship-row .social-avatar {
  width: 44px;
  height: 44px;
}

.profile-relationship-row-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.profile-relationship-row-copy strong,
.profile-relationship-row-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-relationship-row-copy span,
.profile-relationship-state {
  color: var(--muted);
  font-size: 10px;
}

.profile-relationship-state {
  white-space: nowrap;
}

.profile-page-header .profile-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  color: #714e43;
  background: rgba(255, 252, 249, 0.92);
  box-shadow: 0 10px 24px rgba(112, 72, 57, 0.14);
}

.profile-page-header .profile-library-actions {
  margin-top: 4px;
}

.profile-page-header .profile-library-actions button {
  flex-direction: column;
  gap: 5px;
  min-height: 56px;
  border: 1px solid rgba(112, 72, 57, 0.11);
  border-radius: 16px;
  color: #5d443b;
  background: rgba(255, 250, 247, 0.5);
  box-shadow: none;
}

.profile-page-header .profile-library-actions button span {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.profile-page-header .profile-library-actions button strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.profile-page-header .profile-points-button span {
  font-size: 11px;
  opacity: 0.82;
}

.profile-page-header .profile-points-button strong {
  font-size: 17px;
}

.back-button {
  padding: 8px 0;
  border: 0;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.back-button:hover {
  text-decoration: underline;
}

.profile-settings-card {
  margin-bottom: 18px;
  padding: 25px;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.profile-settings-card[hidden] {
  display: none;
}

.profile-form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.profile-form-heading strong,
.profile-form-heading span {
  display: block;
}

.profile-form-heading strong {
  font-family: SimSun, serif;
  font-size: 16px;
  font-weight: 500;
}

.profile-form-heading span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.profile-form-heading button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #7d7166;
  background: #f2eee8;
  cursor: pointer;
  font-size: 17px;
}

.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-preview {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 19px 19px 19px 7px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent),
    var(--sage);
  font-family: SimSun, serif;
  font-size: 20px;
  box-shadow: 0 9px 24px rgba(111, 130, 109, 0.2);
}

.profile-avatar-editor strong,
.profile-avatar-editor span {
  display: block;
}

.profile-avatar-editor strong {
  font-family: SimSun, serif;
  font-size: 16px;
  font-weight: 500;
}

.profile-avatar-editor span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  margin-top: 22px;
  gap: 13px;
}

.profile-form-grid label span {
  display: block;
  margin-bottom: 7px;
  color: #736b62;
  font-size: 9px;
}

.profile-form-grid input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ded5c9;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.profile-form-grid input:focus {
  border-color: rgba(200, 111, 74, 0.65);
  box-shadow: 0 0 0 3px rgba(200, 111, 74, 0.08);
}

.profile-bio-field {
  grid-column: 1 / -1;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
  margin-top: 17px;
  gap: 12px;
}

.profile-form-actions > span {
  color: var(--sage);
  font-size: 9px;
}

.profile-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 20px 23px;
  gap: 20px;
  border: 1px solid rgba(129, 113, 92, 0.11);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
}

.profile-app-update-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(129, 113, 92, 0.12);
  border-radius: 16px;
  background: #f8faf8;
}

.profile-memory-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(129, 113, 92, 0.12);
  border-radius: 16px;
  background: #fff8f1;
}

.profile-memory-card span,
.profile-memory-card strong,
.profile-memory-card p {
  display: block;
  margin: 0;
}

.profile-memory-card span {
  color: var(--muted);
  font-size: 9px;
}

.profile-memory-card strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.profile-memory-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.profile-memory-actions {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}

.profile-memory-actions button {
  flex: 1 1 0;
  min-height: 44px;
  border: 1px solid rgba(143, 163, 148, 0.28);
  border-radius: 12px;
  color: var(--ink);
  background: #f4f7f4;
  cursor: pointer;
  font-size: 12px;
}

.profile-memory-actions button:last-of-type {
  border-color: rgba(201, 139, 123, 0.28);
  background: #fff0ea;
}

.profile-memory-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.profile-app-update-card > div {
  min-width: 0;
}

.profile-app-update-card span,
.profile-app-update-card strong,
.profile-app-update-card p {
  display: block;
  margin: 0;
}

.profile-app-update-card span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.profile-app-update-card strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
}

.profile-app-update-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.profile-app-update-card button {
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--terracotta);
  cursor: pointer;
  font-size: 12px;
}

.profile-app-update-card button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.profile-settings-dialog-card .profile-account-card {
  margin-top: 22px;
}

.profile-rewards-dialog {
  width: min(94vw, 760px);
}

.profile-rewards-dialog-card {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.profile-dialog-close {
  position: absolute;
  z-index: 3;
  top: 17px;
  right: 17px;
}

.profile-rewards-dialog .profile-rewards-card {
  max-height: 88vh;
  margin: 0;
  padding: 27px;
  overflow-y: auto;
  border: 0;
  border-radius: 24px;
  box-shadow: none;
}

.profile-rewards-dialog .rewards-heading {
  padding-right: 42px;
}

.profile-account-card span,
.profile-account-card strong {
  display: block;
}

.profile-account-card span {
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0;
}

.profile-account-card strong {
  margin-top: 6px;
  font-family: SimSun, serif;
  font-size: 16px;
  font-weight: 500;
}

.profile-account-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.profile-logout-button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(169, 80, 48, 0.24);
  border-radius: 11px;
  color: #a95030;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}

.profile-logout-button:hover {
  color: #fff;
  background: #a95030;
}

.profile-timeline-section {
  margin: 26px 0 24px;
}

.profile-section-heading {
  margin-bottom: 18px;
}

.profile-section-heading p {
  margin: 0 0 6px;
  color: #668077;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.profile-rewards-card {
  margin-top: 0;
}

.profile-timeline .circle-badge {
  display: inline-block;
}

.community-view {
  display: grid;
  gap: 24px;
}

.app-shell.community-mode .circle-switcher,
.app-shell.community-mode .community-page-header,
.app-shell.community-mode .community-privacy-card,
.app-shell.community-mode .community-identity-settings,
.app-shell.community-mode .community-disabled-state {
  display: none !important;
}

.app-shell.community-mode .community-view {
  gap: 0;
}

.community-view[hidden] {
  display: none;
}

.community-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.community-page-header h1,
.community-page-header p {
  margin: 0;
}

.community-page-header h1 {
  margin: 7px 0 8px;
  color: #3f3932;
  font-family: SimSun, serif;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: 2px;
}

.community-page-header > div:first-child > p:last-child {
  max-width: 610px;
  color: var(--muted);
  line-height: 1.7;
}

.community-live-stats {
  display: flex;
  gap: 10px;
}

.community-live-stats span {
  min-width: 112px;
  padding: 13px 16px;
  border: 1px solid rgba(116, 98, 76, 0.1);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  text-align: center;
}

.community-live-stats b {
  display: block;
  margin-bottom: 3px;
  color: var(--terracotta-dark);
  font-family: Georgia, serif;
  font-size: 22px;
}

.community-status {
  min-height: 20px;
  color: #8a704f;
  font-size: 13px;
}

.community-status:empty {
  display: none;
}

.community-status.error {
  color: #b84e4e;
}

.community-privacy-card,
.community-settings-card,
.community-season-card,
.community-panel {
  border: 1px solid rgba(116, 98, 76, 0.11);
  box-shadow: 0 18px 48px rgba(85, 65, 43, 0.07);
}

.community-privacy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 21px;
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(235, 245, 235, 0.82));
}

.community-privacy-card > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.community-card-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  font-size: 20px;
}

.community-privacy-card strong,
.community-privacy-card p {
  display: block;
  margin: 0;
}

.community-privacy-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.community-active-circle {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: #5f6f55;
  background: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.community-settings-card,
.community-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.87);
}

.community-identity-settings {
  overflow: hidden;
  border: 1px solid rgba(116, 98, 76, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 30px rgba(85, 65, 43, 0.05);
}

.community-identity-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  color: #50483f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.community-identity-settings > summary::-webkit-details-marker {
  display: none;
}

.community-identity-settings > summary::after {
  color: #8a7c6d;
  content: "鈱?;
  font-size: 16px;
  transition: transform 0.2s ease;
}

.community-identity-settings[open] > summary::after {
  transform: rotate(180deg);
}

.community-identity-settings > summary span {
  margin-left: auto;
  margin-right: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.community-identity-settings .community-settings-card {
  padding: 20px;
  border: 0;
  border-top: 1px solid rgba(116, 98, 76, 0.09);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.community-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.community-section-heading.compact {
  align-items: center;
}

.community-section-heading span,
.community-section-heading h2,
.community-section-heading p {
  display: block;
  margin: 0;
}

.community-section-heading > div > span,
.season-copy > span {
  color: var(--terracotta);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.community-section-heading h2 {
  margin: 5px 0;
  color: #473f37;
  font-family: SimSun, serif;
  font-size: 23px;
}

.community-section-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.community-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 13px;
  color: #665b50;
  background: #f5eee4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.community-toggle input {
  accent-color: var(--terracotta);
}

.community-settings-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.8fr 0.95fr auto;
  align-items: end;
  gap: 12px;
}

.community-settings-grid label {
  display: grid;
  gap: 7px;
}

.community-settings-grid label > span,
.pk-metric-select > span {
  color: #776d62;
  font-size: 11px;
}

.community-settings-grid input,
.community-section-heading select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(111, 91, 68, 0.14);
  border-radius: 12px;
  color: #4d463e;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
}

.community-settings-grid input:focus,
.community-section-heading select:focus {
  border-color: rgba(190, 103, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(190, 103, 68, 0.08);
}

.community-disabled-state {
  padding: 54px 24px;
  border: 1px dashed rgba(116, 98, 76, 0.22);
  border-radius: 25px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  text-align: center;
}

.community-disabled-state > span {
  display: block;
  margin-bottom: 12px;
  color: var(--terracotta);
  font-size: 38px;
}

.community-disabled-state h2,
.community-disabled-state p {
  margin: 0;
}

.community-disabled-state h2 {
  color: #51483e;
  font-family: SimSun, serif;
}

.community-disabled-state p {
  margin-top: 8px;
  font-size: 13px;
}

#communityContent {
  display: grid;
  gap: 24px;
}

#communityContent[hidden] {
  display: none;
}

.community-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.community-search-box {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 0 13px;
  gap: 8px;
  border: 1px solid rgba(116, 98, 76, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(85, 65, 43, 0.05);
}

.community-search-box > span {
  flex: 0 0 auto;
  color: #8b7d6e;
  font-size: 17px;
}

.community-search-box input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  color: #4e4841;
  background: transparent;
  font-size: 12px;
}

.community-search-box input::-webkit-search-cancel-button {
  cursor: pointer;
}

.community-publish-button {
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 14px;
  color: #fffaf4;
  background: linear-gradient(135deg, #ca7554, #a6533b);
  box-shadow: 0 9px 22px rgba(166, 83, 59, 0.2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.community-search-empty {
  margin: -12px 0 0;
  padding: 13px;
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  text-align: center;
}

.community-search-hidden {
  display: none !important;
}

.community-category-nav {
  position: sticky;
  z-index: 8;
  top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(116, 98, 76, 0.12);
  border-radius: 22px;
  background: rgba(250, 247, 241, 0.94);
  box-shadow: 0 12px 34px rgba(85, 65, 43, 0.1);
  backdrop-filter: blur(16px);
  transition: transform 0.24s ease, opacity 0.2s ease;
}

.community-category-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 15px;
  color: #74685b;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.community-category-nav button:hover {
  color: #9c523d;
  background: rgba(185, 103, 72, 0.08);
}

.community-category-nav button:active {
  transform: scale(0.97);
}

.community-category-nav button.active {
  color: #fffaf4;
  background: linear-gradient(135deg, #bd7258, #99503e);
  box-shadow: 0 8px 20px rgba(153, 80, 62, 0.22);
}

.community-category-nav button > span {
  font-size: 17px;
  line-height: 1;
}

.community-category-nav button > strong {
  font-size: 13px;
  letter-spacing: 1px;
}

.community-category-section {
  display: grid;
  gap: 24px;
}

.community-category-section[hidden] {
  display: none;
}

.community-social-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.community-social-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 17px;
  border: 1px solid rgba(62, 67, 68, 0.11);
  border-left: 4px solid #6f826d;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 9px 24px rgba(54, 51, 45, 0.06);
}

.community-social-card.topic {
  border-left-color: #3f7c82;
}

.community-social-card.buddy {
  border-left-color: #d18b52;
}

.community-social-card.help {
  border-left-color: #8a6f9d;
}

.community-social-card.activity {
  border-left-color: #c1714b;
  min-height: 248px;
  border-top-color: rgba(193, 113, 75, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(250, 246, 239, 0.9));
}

.community-social-card.activity .community-social-topic {
  color: #9b563f;
  background: #f8e9df;
}

.community-social-card.activity .community-social-avatar {
  background: #b7694d;
}

.community-social-card.activity .community-social-location {
  color: #3f6b65;
  background: #e9f2ef;
}

.personal-activity-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 26px 28px;
  border: 1px solid rgba(64, 92, 86, 0.13);
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(232, 241, 237, 0.94), rgba(250, 246, 238, 0.96) 64%);
  box-shadow: 0 16px 38px rgba(58, 72, 67, 0.07);
}

.personal-activity-intro span,
.personal-activity-intro h2,
.personal-activity-intro p {
  display: block;
  margin: 0;
}

.personal-activity-intro span {
  color: #5d7a73;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.personal-activity-intro h2 {
  margin-top: 8px;
  color: #394943;
  font-family: SimSun, serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.28;
}

.personal-activity-intro p {
  max-width: 560px;
  margin-top: 9px;
  color: #68736e;
  font-size: 11px;
  line-height: 1.7;
}

.personal-activity-create {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fffaf5;
  background: #4f726a;
  box-shadow: 0 9px 20px rgba(79, 114, 106, 0.2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.personal-activity-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(84, 95, 89, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.66);
}

.personal-activity-tabs button {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: #746f68;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.personal-activity-tabs button.active {
  color: #fff;
  background: #596f69;
  box-shadow: 0 7px 16px rgba(65, 83, 78, 0.18);
}

.personal-activity-tabs b {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  color: #5a6863;
  background: #edf1ef;
  font-size: 9px;
}

.personal-activity-tabs button.active b {
  color: #4f625d;
  background: #fff;
}

.personal-activity-safety {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px 17px;
  border-left: 3px solid #d29362;
  color: #74675b;
  background: rgba(250, 240, 228, 0.72);
  font-size: 10px;
  line-height: 1.6;
}

.personal-activity-safety strong {
  color: #985c42;
}

.community-feed > .community-social-card {
  grid-column: 1 / -1;
}

.community-social-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-social-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #566b64;
  font-family: SimSun, serif;
  font-size: 13px;
}

.community-social-author strong,
.community-social-author small {
  display: block;
}

.community-social-author strong {
  color: #343a38;
  font-size: 12px;
}

.community-social-author small {
  margin-top: 3px;
  color: #8d877f;
  font-size: 9px;
}

.community-social-topic {
  align-self: flex-start;
  margin-top: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #47665f;
  background: #edf3ef;
  font-size: 9px;
  font-weight: 700;
}

.community-social-card h3 {
  margin: 10px 0 6px;
  color: #343936;
  font-family: SimSun, serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.community-social-card > p {
  margin: 0;
  color: #696963;
  font-size: 11px;
  line-height: 1.7;
}

.community-social-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 6px;
}

.community-social-tags span {
  padding: 4px 7px;
  border: 1px solid rgba(90, 94, 90, 0.1);
  border-radius: 7px;
  color: #77736c;
  background: #f8f7f4;
  font-size: 9px;
}

.community-social-tags .community-social-location {
  border-color: rgba(85, 113, 92, 0.14);
  color: #55705d;
  background: #fff1ec;
}

.community-social-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
  gap: 7px;
}

.community-social-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(76, 83, 80, 0.12);
  border-radius: 9px;
  color: #5d645f;
  background: #f7f8f6;
  cursor: pointer;
  font-size: 10px;
}

.community-social-action:hover,
.community-social-action:focus-visible,
.community-social-action.active {
  border-color: #5c756b;
  color: #fff;
  outline: 0;
  background: #5c756b;
}

.community-social-hosted-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border-radius: 9px;
  color: #fff;
  background: #b86b4f;
  font-size: 10px;
  font-weight: 700;
}

.community-view [data-community-overview-only][hidden] {
  display: none;
}

.community-season-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 30px;
  overflow: hidden;
  padding: 26px 28px;
  border-radius: 25px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(135deg, #efe1c5, #e9cab0 52%, #ddb69e);
}

.community-season-card::after {
  position: absolute;
  right: -20px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border: 25px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.season-copy h2,
.season-copy p {
  margin: 0;
}

.season-copy h2 {
  margin: 6px 0;
  color: #544335;
  font-family: SimSun, serif;
  font-size: 27px;
}

.season-copy p {
  color: rgba(78, 62, 50, 0.72);
  font-size: 12px;
}

.season-level {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.season-level > span {
  font-size: 31px;
}

.season-level strong,
.season-level small {
  display: block;
}

.season-level small {
  margin-top: 3px;
  color: #7a6858;
}

.season-progress {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.season-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b96748, #8e4d3d);
  transition: width 0.35s ease;
}

.community-season-card > small {
  grid-column: 1 / -1;
  color: rgba(78, 62, 50, 0.7);
}

.community-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.community-challenge-list,
.community-directory-list,
.community-achievement-list,
.community-feed,
.community-connections-list {
  display: grid;
  gap: 12px;
}

.community-challenge-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(110, 91, 69, 0.1);
  border-radius: 17px;
  background: rgba(248, 244, 237, 0.72);
}

.community-challenge-card.completed {
  background: rgba(232, 242, 226, 0.75);
}

.community-challenge-icon,
.community-directory-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  font-size: 21px;
}

.community-challenge-card strong,
.community-challenge-card p,
.community-challenge-card small {
  display: block;
  margin: 0;
}

.community-challenge-card p {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.community-challenge-card small {
  color: #8d7863;
  font-size: 10px;
}

.community-challenge-card button,
.community-directory-actions button,
.community-connection-item button,
.community-pk-card button,
.community-achievement-card button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--terracotta);
  cursor: pointer;
  font-size: 11px;
}

.community-challenge-card button:disabled,
.community-directory-actions button:disabled,
.community-achievement-card button:disabled {
  color: #968b80;
  background: #e7e0d8;
  cursor: default;
}

.community-mini-progress {
  height: 5px;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 999px;
  background: rgba(103, 86, 68, 0.1);
}

.community-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ca7555;
}

.community-section-heading select {
  width: auto;
  max-width: 190px;
}

.community-leaderboard-list {
  display: grid;
  gap: 7px;
}

.community-rank-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(247, 243, 236, 0.76);
}

.community-rank-row.mine {
  background: linear-gradient(90deg, rgba(218, 126, 87, 0.15), rgba(248, 236, 216, 0.65));
  box-shadow: inset 3px 0 var(--terracotta);
}

.community-rank-number {
  color: #8c7966;
  font-family: Georgia, serif;
  text-align: center;
}

.community-rank-row strong,
.community-rank-row small {
  display: block;
}

.community-rank-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.community-rank-row > b {
  color: var(--terracotta-dark);
}

.community-directory-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-directory-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(110, 91, 69, 0.1);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(246, 239, 229, 0.7));
}

.community-directory-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.community-directory-card strong,
.community-directory-card small {
  display: block;
}

.community-directory-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.community-directory-stats {
  display: flex;
  gap: 7px;
}

.community-directory-stats span {
  padding: 6px 8px;
  border-radius: 8px;
  color: #7b6654;
  background: #f4ede3;
  font-size: 10px;
}

.community-directory-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.community-directory-actions button {
  color: #765e4e;
  background: #eee4d8;
}

.community-directory-actions button:first-child,
.community-directory-actions button:last-child {
  color: #fff;
  background: #bb6a4d;
}

.pk-metric-select {
  display: grid;
  gap: 6px;
}

.community-connection-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: 15px;
  background: #f7f2ea;
}

.community-connection-item > span {
  font-size: 22px;
}

.community-connection-item strong,
.community-connection-item small {
  display: block;
}

.community-connection-item small {
  margin-top: 3px;
  color: var(--muted);
}

.community-pk-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #8e5f52, #664f4a);
}

.community-pk-card > div:first-child,
.community-pk-scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-pk-card small {
  color: rgba(255, 255, 255, 0.7);
}

.community-pk-scores {
  font-family: Georgia, serif;
  font-size: 13px;
}

.community-pk-card button {
  color: #6d4b40;
  background: #fff3e8;
}

.relay-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8e6df, #f5ede7);
}

.relay-hero > span {
  font-size: 34px;
}

.relay-hero strong,
.relay-hero p {
  display: block;
  margin: 0;
}

.relay-hero p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.relay-city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 13px 0;
}

.relay-city-list > span {
  padding: 7px 9px;
  border-radius: 999px;
  color: #61705a;
  background: #edf3e9;
  font-size: 10px;
}

.relay-panel > .primary-button {
  width: 100%;
}

.community-achievement-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.community-achievement-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 185px;
  padding: 17px;
  border: 1px solid rgba(110, 91, 69, 0.09);
  border-radius: 19px;
  opacity: 0.62;
  background: #f5f0e9;
}

.community-achievement-card.unlocked {
  opacity: 1;
  background:
    radial-gradient(circle at 88% 7%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(145deg, #f5e1ba, #efd1b8);
}

.community-achievement-card > span {
  font-size: 31px;
}

.community-achievement-card strong,
.community-achievement-card p {
  display: block;
  margin: 0;
}

.community-achievement-card p {
  margin-top: 5px;
  color: #77695e;
  font-size: 11px;
  line-height: 1.55;
}

.community-feed {
  display: block;
  columns: 3;
  column-gap: 12px;
}

.community-feed .community-discovery-card {
  display: inline-flex;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(92, 87, 78, 0.1);
  border-left-width: 1px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(58, 52, 44, 0.08);
  break-inside: avoid;
}

.community-discovery-visual {
  display: grid;
  width: 100%;
  min-height: 150px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(145deg, #dfe9dc, #a8b9a3);
}

.community-discovery-visual span {
  filter: drop-shadow(0 10px 16px rgba(55, 49, 41, 0.14));
  font-size: 54px;
}

.community-discovery-visual.visual-walk {
  min-height: 190px;
  background: linear-gradient(160deg, #d7b89d, #6f8291 64%, #384451);
}

.community-discovery-visual.visual-meal {
  min-height: 142px;
  background: linear-gradient(145deg, #f2dfb9, #d79a65);
}

.community-discovery-visual.visual-plant {
  min-height: 182px;
  background: linear-gradient(145deg, #e8eedc, #8aa27e);
}

.community-discovery-visual.visual-coffee {
  min-height: 156px;
  background: linear-gradient(150deg, #d7c2ad, #8d705e);
}

.community-discovery-visual.visual-night {
  min-height: 198px;
  background: linear-gradient(165deg, #4c526a, #9c5e4b 62%, #e5a25d);
}

.community-discovery-visual.visual-toast {
  min-height: 164px;
  background: linear-gradient(150deg, #f2e6c9, #c99758);
}

.community-discovery-card .community-social-topic {
  margin: 11px 12px 0;
}

.community-discovery-card h3 {
  margin: 9px 12px 5px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.community-discovery-card > p {
  display: -webkit-box;
  margin: 0 12px;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.community-discovery-card .community-social-tags {
  margin: 9px 12px 0;
  gap: 4px;
}

.community-discovery-card .community-social-tags span {
  padding: 3px 5px;
  font-size: 8px;
}

.community-discovery-card .community-social-author {
  margin: 12px 12px 0;
  gap: 7px;
}

.community-discovery-card .community-social-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.community-discovery-card .community-social-author strong {
  font-size: 9px;
}

.community-discovery-card .community-social-author small {
  margin-top: 1px;
  font-size: 7px;
}

.community-author-follow {
  min-height: 25px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 8px;
}

.community-discovery-card .community-social-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  padding: 9px 12px 12px;
  gap: 5px;
}

.community-discovery-card .community-social-action {
  min-height: 28px;
  padding: 0 5px;
  font-size: 8px;
}

.community-publish-card textarea {
  width: 100%;
  min-height: 118px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid #ded5c9;
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
}

.community-publish-card textarea:focus {
  border-color: rgba(200, 111, 74, 0.65);
  box-shadow: 0 0 0 3px rgba(200, 111, 74, 0.08);
}

.community-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.community-location-row .secondary-button {
  min-width: 88px;
}

.community-location-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.community-location-actions button {
  padding: 0;
  border: 0;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.community-feed-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(110, 91, 69, 0.09);
  border-radius: 18px;
  background: rgba(249, 245, 238, 0.75);
}

.community-feed-card.achievement {
  background: linear-gradient(145deg, rgba(249, 230, 192, 0.82), rgba(249, 241, 227, 0.8));
}

.community-feed-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 22px;
}

.community-feed-card small,
.community-feed-card strong,
.community-feed-card p {
  display: block;
  margin: 0;
}

.community-feed-card small {
  color: #907861;
  font-size: 10px;
}

.community-feed-card strong {
  margin: 5px 0;
  color: #4f443a;
}

.community-feed-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.community-list-empty {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(246, 242, 235, 0.75);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 760px);
    gap: 38px;
    padding: 0 30px;
  }

  .community-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-achievement-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell {
    display: block;
    padding: 0 18px;
  }

  .sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 22px 0 0;
  }

  .brand small,
  .memory-card {
    display: none;
  }

  .nav-list {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
    margin: 0;
    padding: 9px 10px 8px;
    overflow: visible;
    border: 1px solid rgba(113, 93, 70, 0.12);
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.94);
    box-shadow: 0 16px 45px rgba(77, 58, 39, 0.2);
    backdrop-filter: blur(18px);
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .time-axis-nav-item {
    order: 1;
  }

  .records-nav-wrap {
    order: 2;
  }

  .community-nav-item {
    order: 3;
  }

  .public-video-nav-item {
    order: 4;
  }

  .profile-nav-item {
    order: 5;
  }

  .records-menu {
    top: auto;
    right: auto;
    bottom: calc(100% + 12px);
    left: 0;
    min-width: 128px;
  }

  .records-menu button {
    justify-content: flex-start;
  }

  .circle-switcher {
    margin-top: 12px;
  }

  .circle-button {
    width: min(100%, 280px);
  }

  .circle-menu {
    width: min(100%, 280px);
  }

  .app-shell.records-mode .sidebar {
    height: 0;
    padding: 0;
  }

  .app-shell.records-mode .brand,
  .app-shell.records-mode .circle-button,
  .app-shell.records-mode .memory-card {
    display: none !important;
  }

  .app-shell.records-mode .circle-switcher {
    height: 0;
    margin: 0;
  }

  .app-shell.records-mode .main-content {
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .app-shell.profile-mode .sidebar {
    height: 0;
    padding: 0;
  }

  .app-shell.profile-mode .brand,
  .app-shell.profile-mode .circle-switcher,
  .app-shell.profile-mode .memory-card,
  .app-shell.profile-mode .floating-circle-button {
    display: none !important;
  }

  .app-shell.profile-mode .main-content {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .profile-page-header {
    gap: 14px;
    padding: 17px 16px 16px;
    border-radius: 20px;
  }

  .profile-identity-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    padding-right: 0;
  }

  .profile-page-header .profile-avatar-preview {
    width: 58px;
    height: 58px;
    border-radius: 12px;
  }

  .profile-page-header h1 {
    font-size: 23px;
  }

  .profile-menu-button {
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
  }

  .profile-name-row {
    gap: 8px;
  }

  .profile-points-button {
    min-height: 52px;
    padding: 7px 8px;
  }

  .profile-edit-button {
    min-height: 34px;
    padding: 0 12px;
  }

  .profile-overview-stats span {
    padding: 2px 0;
  }

  .profile-settings-card {
    padding: 19px 16px;
    border-radius: 19px;
  }

  .profile-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-form-actions .primary-button {
    width: 100%;
  }

  .profile-timeline-section {
    margin-top: 24px;
  }

  .app-shell.community-mode .main-content {
    padding-top: 20px;
  }

  .nav-item {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 49px;
    flex-direction: column;
    justify-content: center;
    padding: 7px 3px 5px;
    gap: 3px;
    border-radius: 15px;
    font-size: 10px;
    text-align: center;
  }

  .nav-item:hover {
    transform: none;
  }

  .community-nav-item,
  .community-nav-item:hover,
  .community-nav-item.active {
    width: 62px;
    height: 62px;
    min-height: 62px;
    justify-self: center;
    margin-top: -30px;
    padding: 7px 4px 6px;
    border: 5px solid #f7f0e7;
    border-radius: 50%;
    color: #fffaf4;
    background: linear-gradient(145deg, #d67c57, #b95f40);
    box-shadow: 0 10px 24px rgba(181, 91, 59, 0.36);
  }

  .community-nav-item .nav-icon {
    color: inherit;
    font-size: 18px;
  }

  .community-nav-item > span:last-child {
    font-size: 9px;
    font-weight: 700;
  }

  .main-content {
    padding: 38px 0 calc(118px + env(safe-area-inset-bottom));
  }

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

  .public-video-frame {
    aspect-ratio: 9 / 13;
  }

  .app-shell.public-video-mode {
    padding: 0;
  }

  .app-shell.public-video-mode .sidebar {
    height: 0;
    padding: 0;
  }

  .app-shell.public-video-mode .brand,
  .app-shell.public-video-mode .circle-switcher,
  .app-shell.public-video-mode .memory-card,
  .app-shell.public-video-mode .floating-circle-button {
    display: none !important;
  }

  .app-shell.public-video-mode .main-content {
    height: 100svh;
    padding: 0;
  }

  .app-shell.public-video-mode .public-video-view {
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
  }

  .app-shell.public-video-mode .public-video-view::-webkit-scrollbar {
    display: none;
  }

  .app-shell.public-video-mode .public-video-header {
    display: none;
  }

  .app-shell.public-video-mode .public-video-tabs {
    position: fixed;
    z-index: 95;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) 54px 18px;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(30, 25, 22, 0.52), transparent);
    box-shadow: none;
    backdrop-filter: none;
  }

  .app-shell.public-video-mode .public-video-tabs button {
    width: 100%;
    padding: 9px 0;
    color: rgba(255, 255, 255, 0.76);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
  }

  .app-shell.public-video-mode .public-video-tabs button.active {
    color: #fff;
    background: rgba(200, 111, 74, 0.9);
  }

  .app-shell.public-video-mode .public-video-grid {
    display: block;
  }

  .app-shell.public-video-mode .public-video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #171513;
    box-shadow: none;
  }

  .app-shell.public-video-mode .public-video-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background: #000;
  }

  .app-shell.public-video-mode .public-video-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .app-shell.public-video-mode .public-video-copy {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 0;
    padding: 50px 76px 18px 18px;
    color: #fff;
    background: linear-gradient(0deg, rgba(20, 17, 15, 0.72), transparent);
    pointer-events: none;
    text-shadow: 0 1px 7px rgba(0, 0, 0, 0.4);
  }

  .app-shell.public-video-mode .public-video-publisher,
  .app-shell.public-video-mode .public-video-copy button {
    pointer-events: auto;
  }

  .app-shell.public-video-mode .public-video-copy > strong {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
  }

  .app-shell.public-video-mode .public-video-publisher {
    position: static;
    display: flex;
    width: auto;
    height: auto;
    margin: 0 0 10px;
    padding: 0;
    gap: 9px;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: transparent;
    backdrop-filter: none;
  }

  .app-shell.public-video-mode .public-video-publisher-avatar {
    width: 38px;
    height: 38px;
    border-color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
  }

  .app-shell.public-video-mode .public-video-publisher strong {
    color: #fff;
    font-size: 11px;
  }

  .app-shell.public-video-mode .public-video-publisher small {
    color: rgba(255, 255, 255, 0.74);
    font-size: 8px;
  }

  .app-shell.public-video-mode .public-video-copy > div {
    display: block;
  }

  .app-shell.public-video-mode .public-video-copy > div > span {
    display: block;
    overflow: visible;
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    line-height: 1.6;
    text-overflow: clip;
    white-space: normal;
  }

  .app-shell.public-video-mode .public-video-copy [data-public-video-like] {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(35, 29, 25, 0.46);
    backdrop-filter: blur(9px);
  }

  .app-shell.public-video-mode .public-video-copy [data-public-video-comment] {
    position: absolute;
    right: 18px;
    bottom: 76px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(35, 29, 25, 0.46);
    backdrop-filter: blur(9px);
  }

  .app-shell.public-video-mode .public-video-empty {
    display: grid;
    height: 100svh;
    min-height: 100svh;
    place-content: center;
    color: rgba(255, 255, 255, 0.72);
    background: #171513;
  }

  .app-shell.public-video-mode .public-video-empty[hidden] {
    display: none;
  }

  .app-shell.public-video-mode .public-video-empty h3 {
    color: #fff;
  }

  .public-profile-dialog {
    width: 100vw;
    max-width: none;
    height: 100svh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .public-profile-card {
    min-height: 100%;
    padding: 34px 22px;
    border-radius: 0;
  }

  .profile-account-card {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-rewards-dialog .profile-rewards-card {
    padding: 23px 18px 20px;
  }

  .profile-logout-button {
    width: 100%;
  }

  .header-date {
    display: none;
  }

  .top-logout-button {
    z-index: 103;
    top: max(10px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
  }

  .mobile-controls-pinned .floating-circle-button {
    position: fixed;
    z-index: 102;
    top: max(10px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    display: block;
    min-width: 76px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 9px 24px rgba(77, 58, 39, 0.14);
    backdrop-filter: blur(16px);
    white-space: nowrap;
  }

  .floating-circle-menu-open .circle-menu {
    position: fixed;
    z-index: 104;
    top: calc(max(10px, env(safe-area-inset-top)) + 43px);
    right: max(18px, env(safe-area-inset-right));
    left: auto;
    width: min(calc(100vw - 36px), 280px);
  }

  .composer {
    padding: 19px 17px 14px;
  }

  .composer-bottom {
    align-items: flex-end;
    gap: 10px;
  }

  .publish-wrap > span {
    display: none;
  }

  .upload-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
  }

  .visibility-row {
    margin-left: 0;
  }

  .location-preview {
    max-width: 100%;
    margin-left: 0;
  }

  .reward-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-page-header,
  .community-privacy-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-settings-grid .primary-button {
    min-height: 42px;
  }

  .community-category-nav {
    position: fixed;
    z-index: 89;
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    gap: 5px;
    padding: 7px;
    border-radius: 19px;
  }

  .app-shell.community-nav-hidden .community-category-nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 100px));
  }

  .community-view {
    padding-bottom: 190px;
  }

  .community-category-nav button {
    flex-direction: column;
    gap: 4px;
    padding: 9px 4px 8px;
    border-radius: 13px;
  }

  .community-category-nav button > span {
    font-size: 16px;
  }

  .community-category-nav button > strong {
    font-size: 11px;
    letter-spacing: 0;
  }

  .community-two-column {
    grid-template-columns: 1fr;
  }

  .community-social-list {
    grid-template-columns: 1fr;
  }

  .community-feed {
    display: block;
    columns: 2;
    column-gap: 9px;
  }

  .community-feed .community-discovery-card {
    margin-bottom: 9px;
  }

  .community-social-card {
    padding: 15px;
  }

  .community-social-card h3 {
    font-size: 16px;
  }

  .community-social-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-social-action {
    width: 100%;
  }

  .group-interaction-quick-actions {
    justify-content: stretch;
  }

  .group-interaction-quick-actions button {
    flex: 1;
  }

  .group-stats-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-identity-settings > summary span {
    display: none;
  }

  .community-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add-reward-form > div {
    grid-template-columns: 52px minmax(0, 1fr) 88px;
  }

  .add-reward-form .primary-button {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .tool-button {
    padding: 7px 5px;
  }

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

  .media-item {
    grid-column: 1;
  }
}

@media (max-width: 460px) {
  .auth-card {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .auth-brand {
    align-items: flex-start;
  }

  .nav-list {
    gap: 2px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .nav-item {
    justify-content: center;
    padding: 7px 2px 5px;
    gap: 3px;
    font-size: 10px;
  }

  .community-page-header {
    gap: 14px;
  }

  .community-live-stats {
    width: 100%;
  }

  .community-live-stats span {
    min-width: 0;
    flex: 1;
  }

  .community-privacy-card,
  .community-settings-card,
  .community-panel,
  .community-season-card {
    padding: 18px 16px;
    border-radius: 21px;
  }

  .personal-activity-intro {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 17px;
    border-radius: 18px;
  }

  .personal-activity-intro h2 {
    font-size: 22px;
  }

  .personal-activity-create {
    width: 100%;
  }

  .personal-activity-tabs {
    gap: 4px;
    padding: 5px;
  }

  .personal-activity-tabs button {
    min-height: 40px;
    gap: 5px;
    padding: 0 6px;
    font-size: 10px;
  }

  .personal-activity-safety {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .community-section-heading,
  .community-section-heading.compact {
    align-items: stretch;
    flex-direction: column;
  }

  .community-section-heading select {
    width: 100%;
    max-width: none;
  }

  .community-settings-grid,
  .community-directory-list,
  .community-achievement-list,
  .community-feed {
    grid-template-columns: 1fr;
  }

  .community-settings-grid .primary-button {
    width: 100%;
  }

  .community-season-card {
    grid-template-columns: 1fr;
  }

  .season-level,
  .season-progress,
  .community-season-card > small {
    grid-column: 1;
  }

  .community-challenge-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .community-challenge-card button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .community-directory-panel .community-section-heading {
    gap: 13px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    font-size: 15px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .page-heading-block {
    align-items: flex-start;
    gap: 10px;
  }

  .header-profile-button {
    padding: 4px 0;
  }

  .header-profile-button .profile-copy {
    display: none;
  }

  .page-heading-copy > p:last-child {
    font-size: 12px;
  }

  .couple-game-card {
    padding: 19px 16px;
    border-radius: 22px;
  }

  .couple-game-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .couple-level-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .couple-level-badge span {
    margin-top: 0;
  }

  .couple-growth-layout {
    grid-template-columns: 1fr;
  }

  .couple-tree-panel {
    min-height: 220px;
  }

  .couple-tree-icon {
    width: 82px;
    height: 82px;
    font-size: 45px;
  }

  .couple-action-button {
    min-height: 55px;
  }

  .group-action-buttons {
    grid-template-columns: 1fr;
  }

  .circle-rewards-card {
    padding: 19px 16px;
    border-radius: 21px;
  }

  .rewards-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .points-wallet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .points-wallet strong {
    margin-top: 0;
  }

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

  .reward-item {
    grid-template-columns: auto minmax(0, 1fr) 82px;
    min-height: 67px;
  }

  .reward-item > button:not(.reward-delete-button) {
    grid-column: auto;
  }

  .add-reward-form > div {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .add-reward-form #rewardCostInput,
  .add-reward-form .primary-button {
    grid-column: 1 / -1;
  }

  .redemption-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .redemption-item > button {
    grid-column: 2 / -1;
  }

  .composer-top .avatar {
    display: none;
  }

  .composer-bottom {
    flex-wrap: wrap;
  }

  .section-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .section-heading h2 {
    display: block;
    margin: 0 0 6px;
  }

  .section-heading .ghost-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .publish-wrap {
    width: 100%;
  }

  .publish-button {
    width: 100%;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline::before {
    left: 5px;
  }

  .date-divider::before {
    left: -28px;
  }

  .timeline-dot {
    left: -27px;
  }

  .moment-card {
    padding: 17px;
  }

  .media-item,
  .media-item img,
  .media-item video {
    min-height: 190px;
  }

  .circle-dialog,
  .comments-dialog {
    width: calc(100vw - 28px);
  }

  .dialog-card,
  .comments-card {
    padding: 21px;
  }

  .comments-list {
    max-height: 48vh;
  }

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

  .profile-form-grid {
    grid-template-columns: 90px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-bio-field {
    grid-column: auto;
  }

  .circle-danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .danger-button {
    width: 100%;
  }
}

/* Mobile is the production APK visual baseline; desktop remains a browser workspace. */
@media (max-width: 780px) {
  :root {
    --md-primary: #a96353;
    --md-on-primary: #ffffff;
    --md-primary-container: #f6ded7;
    --md-on-primary-container: #43251f;
    --md-tertiary: #d08b5c;
    --md-on-tertiary: #ffffff;
    --md-surface: #fcfaf8;
    --md-surface-container: #f6f1ee;
    --md-surface-container-high: #f0e9e5;
    --md-on-surface: #2b2725;
    --md-on-surface-variant: #6f6560;
    --md-outline: #918680;
    --md-outline-variant: #e4dad5;
    --paper: var(--md-surface);
    --paper-deep: var(--md-surface-container-high);
    --card: #ffffff;
    --ink: var(--md-on-surface);
    --muted: #7b716c;
    --line: #e9e0dc;
    --terracotta: var(--md-tertiary);
    --terracotta-dark: #8b4a3c;
    --sage: var(--md-primary);
    --shadow: 0 2px 12px rgba(80, 55, 45, 0.06);
  }

  html,
  body {
    background: var(--paper);
  }

  body {
    font-family: "Roboto", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  }

  .ambient {
    display: none;
  }

  .app-shell {
    min-height: 100svh;
    padding: 0 16px;
    background: var(--paper);
  }

  .main-content {
    padding: max(16px, env(safe-area-inset-top)) 0 calc(96px + env(safe-area-inset-bottom));
  }

  .nav-list {
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(80px + env(safe-area-inset-bottom));
    align-items: stretch;
    gap: 2px;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #e1e6e3;
    border-radius: 0;
    background: rgba(237, 241, 238, 0.98);
    box-shadow: 0 -2px 10px rgba(32, 39, 36, 0.05);
    backdrop-filter: none;
  }

  .nav-item,
  .community-nav-item,
  .community-nav-item:hover,
  .community-nav-item.active {
    width: 100%;
    height: auto;
    min-height: 64px;
    justify-self: stretch;
    margin: 0;
    padding: 4px 2px 2px;
    gap: 1px;
    border: 0;
    border-radius: 0;
    color: #737c78;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
  }

  .nav-item:hover {
    background: transparent;
    transform: none;
  }

  .nav-item.active,
  .community-nav-item.active {
    color: var(--sage);
    background: transparent;
    box-shadow: none;
  }

  .nav-icon,
  .community-nav-item .nav-icon {
    width: 64px;
    height: 32px;
    border-radius: 16px;
    color: inherit;
    font-size: 18px;
  }

  .nav-item.active .nav-icon {
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
  }

  .community-nav-item > span:last-child {
    font-size: 11px;
    font-weight: 500;
  }

  .app-shell.public-video-mode .nav-list {
    border-top-color: rgba(255, 255, 255, 0.12);
    background: rgba(20, 23, 22, 0.9);
    box-shadow: none;
  }

  .app-shell.public-video-mode .nav-item {
    color: rgba(255, 255, 255, 0.68);
  }

  .app-shell.public-video-mode .nav-item.active {
    color: #ffffff;
    background: transparent;
  }

  .app-shell.public-video-mode .nav-item.active .nav-icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
  }

  .brand-mark,
  .avatar,
  .profile-avatar-preview {
    background: var(--sage);
    box-shadow: none;
  }

  .page-header {
    margin-bottom: 18px;
  }

  .page-header h1,
  .section-heading h2,
  .community-page-header h1,
  .community-section-heading h2,
  .personal-activity-intro h2,
  .profile-page-header h1,
  .dialog-heading h2,
  .rewards-heading h2,
  .date-divider,
  .moment-meta time,
  .profile-overview-stats strong,
  .points-wallet strong,
  .profile-points-button strong {
    font-family: inherit;
    letter-spacing: 0;
  }

  .page-header h1 {
    font-size: 26px;
    font-weight: 650;
  }

  .eyebrow,
  .auth-brand p,
  .couple-game-heading p,
  .group-game-heading p,
  .profile-section-heading p,
  .community-section-heading > div > span,
  .personal-activity-intro > div > span,
  .dialog-heading p,
  .rewards-heading p {
    display: none;
  }

  .profile-page-header .profile-identity-copy > p {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
  }

  .composer,
  .moment-card,
  .profile-settings-card,
  .community-privacy-card,
  .community-settings-card,
  .community-season-card,
  .community-social-card,
  .personal-activity-intro,
  .couple-game-card,
  .circle-rewards-card {
    border: 1px solid #e0e6e2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
    backdrop-filter: none;
  }

  .composer,
  .profile-settings-card {
    padding: 18px 16px 14px;
  }

  .composer::after,
  .couple-game-card::before,
  .couple-game-card::after {
    display: none;
  }

  .composer textarea {
    min-height: 72px;
    font-size: 15px;
    line-height: 1.65;
  }

  .primary-button,
  .publish-button,
  .community-publish-button {
    min-height: 48px;
    border: 0;
    border-radius: 24px;
    color: var(--md-on-primary);
    background: var(--md-primary);
    box-shadow: none;
  }

  .primary-button:active,
  .publish-button:active,
  .community-publish-button:active,
  .personal-activity-create:active,
  .profile-edit-button:active {
    transform: translateY(1px) scale(0.99);
  }

  .secondary-button,
  .ghost-button,
  .tool-button {
    border-color: #dce3df;
    border-radius: 20px;
    background: var(--md-surface-container);
    box-shadow: none;
  }

  .timeline-section {
    margin-top: 30px;
  }

  .section-heading {
    margin-bottom: 16px;
  }

  .section-heading h2 {
    font-size: 20px;
    font-weight: 650;
  }

  .timeline::before {
    background: #d9dfdc;
  }

  .date-divider {
    margin: 25px 0 13px;
    color: #5f6864;
    font-size: 13px;
    font-weight: 600;
  }

  .date-divider::before {
    border-color: var(--paper);
    background: var(--md-tertiary);
    box-shadow: 0 0 0 1px rgba(154, 104, 86, 0.24);
  }

  .moment-card {
    padding: 16px;
    background: #ffffff;
    transition: none;
  }

  .moment-card:hover {
    background: #ffffff;
    box-shadow: var(--shadow);
    transform: none;
  }

  .moment-meta time {
    color: #737c78;
    font-size: 11px;
  }

  .profile-page-header {
    margin: calc(-1 * max(16px, env(safe-area-inset-top))) -16px 20px;
    padding: calc(max(18px, env(safe-area-inset-top)) + 8px) 16px 16px;
    border: 0;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(150deg, #f3ddd5 0%, #e8c9be 100%);
    box-shadow: 0 12px 30px rgba(112, 72, 57, 0.12);
  }

  .profile-page-header .profile-avatar-preview {
    border-radius: 12px;
  }

  .profile-page-header h1 {
    color: #493832;
    font-size: 22px;
    font-weight: 700;
  }

  .profile-menu-button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(112, 72, 57, 0.13);
    color: #5f443b;
    background: rgba(255, 250, 247, 0.58);
    box-shadow: none;
  }

  .profile-points-button {
    min-height: 56px;
    padding: 7px 8px;
    border: 1px solid rgba(112, 72, 57, 0.12);
    border-radius: 16px;
    color: #60473f;
    background: rgba(255, 250, 247, 0.52);
  }

  .profile-edit-button {
    min-height: 36px;
    border: 1px solid rgba(112, 72, 57, 0.13);
    border-radius: 24px;
    color: #5f443b;
    background: rgba(255, 250, 247, 0.58);
  }

  .profile-edit-button:hover,
  .profile-edit-button[aria-expanded="true"] {
    background: rgba(255, 250, 247, 0.82);
  }

  .profile-overview-stats strong {
    font-size: 18px;
    font-weight: 650;
  }

  .profile-timeline-section {
    margin-top: 22px;
  }

  .community-page-header {
    align-items: flex-start;
    margin-bottom: 14px;
  }

  .community-page-header h1 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 24px;
    font-weight: 650;
  }

  .community-page-header > div:first-child > p:last-child {
    display: none;
  }

  .community-live-stats span {
    min-width: 78px;
    padding: 9px 10px;
    border-color: #e0e6e2;
    border-radius: 10px;
    background: #ffffff;
  }

  .community-live-stats b {
    color: var(--sage);
    font-family: inherit;
    font-size: 18px;
  }

  .community-privacy-card {
    padding: 15px;
    background: #eef3f0;
  }

  .community-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .community-category-nav {
    top: 0;
    margin: 0 -16px;
    padding: 7px 10px;
    gap: 3px;
    border: 0;
    border-bottom: 1px solid #e1e6e3;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: none;
    backdrop-filter: none;
  }

  .community-category-nav button {
    min-height: 48px;
    padding: 6px 3px;
    gap: 3px;
    border-radius: 8px;
    color: #6c7571;
  }

  .community-category-nav button:hover {
    color: var(--sage);
    background: transparent;
  }

  .community-category-nav button.active {
    color: var(--sage);
    background: #edf2ef;
    box-shadow: none;
  }

  .community-category-nav button > strong {
    font-size: 11px;
    font-weight: 600;
  }

  .community-social-card,
  .community-social-card.topic,
  .community-social-card.buddy,
  .community-social-card.help,
  .community-social-card.activity {
    min-height: 0;
    padding: 15px;
    border: 1px solid #e0e6e2;
    border-left: 1px solid #e0e6e2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .profile-page-header {
    padding-bottom: 20px;
    border-bottom: 0;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(150deg, #f3ddd5 0%, #e8c9be 100%);
  }

  .profile-identity-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding-right: 0;
  }

  .profile-edit-button {
    grid-column: auto;
    width: auto;
    min-height: 40px;
    align-self: center;
    padding: 0 13px;
    border: 1px solid rgba(112, 72, 57, 0.13);
    border-radius: 14px;
    color: #5f443b;
    background: rgba(255, 250, 247, 0.58);
    font-size: 12px;
    font-weight: 600;
  }

  .profile-overview-stats {
    margin-top: 4px;
    border-top: 0;
  }

  .profile-overview-stats span {
    padding: 2px 0;
  }

  .profile-overview-stats span + span {
    border-left: 0;
  }

  .profile-overview-stats span + span::before {
    position: absolute;
    top: 14px;
    bottom: 2px;
    left: 0;
    width: 1px;
    background: rgba(112, 72, 57, 0.12);
    content: "";
  }

  .profile-overview-stats span {
    position: relative;
  }

  .moment-card {
    border-color: #e8f0ea;
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(48, 77, 61, 0.055);
  }

  .primary-button,
  .publish-button,
  .community-publish-button,
  .personal-activity-create,
  .profile-avatar-upload-button {
    border-radius: 18px;
  }

  .publish-button {
    min-height: 46px;
  }

  .personal-activity-intro {
    padding: 18px 16px;
    background: #ffffff;
  }

  .personal-activity-intro h2 {
    margin-top: 0;
    font-size: 21px;
    font-weight: 650;
  }

  .personal-activity-create {
    min-height: 48px;
    border-radius: 24px;
    color: var(--md-on-primary);
    background: var(--md-primary);
    box-shadow: none;
  }

  .auth-screen {
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    background: var(--md-surface);
  }

  .auth-card {
    padding: 28px 22px;
    border-color: var(--md-outline-variant);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(32, 39, 36, 0.06);
    backdrop-filter: none;
  }

  .auth-brand h1 {
    font-family: inherit;
    font-size: 26px;
    font-weight: 650;
    letter-spacing: 0;
  }

  .auth-submit {
    min-height: 48px;
    border-radius: 24px;
    color: var(--md-on-primary);
    background: var(--md-primary);
  }

  .number-auth-tip {
    color: var(--md-on-surface-variant);
    font-size: 12px;
    line-height: 1.6;
  }

  .personal-activity-tabs {
    padding: 4px;
    border: 0;
    border-radius: 11px;
    background: #e8edea;
    box-shadow: none;
  }

  .personal-activity-tabs button {
    border-radius: 8px;
  }

  .personal-activity-tabs button.active {
    color: var(--sage);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(32, 39, 36, 0.08);
  }

  .app-shell.public-video-mode .public-video-tabs button.active {
    border-radius: 0;
    color: #ffffff;
    background: transparent;
    box-shadow: inset 0 -2px #ffffff;
  }

  .circle-dialog,
  .comments-dialog,
  .profile-rewards-dialog {
    width: 100vw;
    max-width: none;
    max-height: calc(100svh - 20px);
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .dialog-card,
  .comments-card {
    max-height: calc(100svh - 20px);
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #ffffff;
    box-shadow: 0 -8px 30px rgba(32, 39, 36, 0.14);
  }

  .dialog-heading h2 {
    font-size: 21px;
    font-weight: 650;
  }

  .dialog-close {
    width: 40px;
    height: 40px;
    color: #5f6965;
    background: #edf1ef;
  }

  .profile-settings-dialog-card .profile-account-card {
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid #e1e6e3;
    border-radius: 0;
    background: transparent;
  }

  .profile-rewards-dialog-card {
    border-radius: 28px 28px 0 0;
  }

  .profile-rewards-dialog .profile-rewards-card {
    max-height: calc(100svh - 20px);
    padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}

@media (max-width: 780px) {
  .app-shell.profile-mode .nav-list {
    border-top-color: #eaded8;
    background: rgba(255, 252, 249, 0.98);
  }

  .app-shell.profile-mode .nav-item.active {
    color: #79584d;
  }

  .app-shell.profile-mode .nav-item.active .nav-icon {
    color: #65473e;
    background: #f4ddd6;
  }

  .community-category-nav {
    position: sticky;
    z-index: 89;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: 64px;
    margin: 0 -16px 16px;
    padding: 8px 10px;
    border: 0;
    border-top: 1px solid #dfe5e1;
    border-bottom: 1px solid #dfe5e1;
    border-radius: 0;
    background: rgba(247, 249, 247, 0.98);
    box-shadow: none;
    backdrop-filter: none;
  }

  .community-category-nav button {
    min-height: 48px;
    border-radius: 8px;
  }

  .community-category-nav button.active {
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
  }

  .community-view {
    padding-bottom: 20px;
  }

  .profile-avatar-upload-field {
    grid-column: 1 / -1;
  }

  .profile-avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .profile-avatar-upload-field > span,
  .profile-avatar-fallback-field > span {
    display: block;
    margin-bottom: 8px;
    color: var(--md-on-surface-variant);
    font-size: 12px;
  }

  .profile-avatar-upload-field small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
  }

  .profile-avatar-upload-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 24px;
    color: var(--md-on-primary);
    background: var(--md-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
  }

  .profile-avatar-upload-button:active {
    transform: translateY(1px) scale(0.99);
  }

  .avatar.has-avatar-image,
  .profile-avatar-preview.has-avatar-image,
  .community-social-avatar.has-avatar-image,
  .comment-avatar.has-avatar-image {
    color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
}

/* Keep large mobile surfaces light while retaining sage for clear state. */
@media (max-width: 780px) {
  .nav-list {
    border-top-color: #eee4df;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -2px 12px rgba(80, 55, 45, 0.06);
  }

  .nav-item,
  .community-nav-item,
  .community-nav-item:hover,
  .community-nav-item.active {
    color: #748278;
  }

  .nav-item.active,
  .community-nav-item.active {
    color: var(--md-primary);
  }

  .brand-mark {
    color: var(--md-on-primary);
    background: var(--md-primary);
  }

  .brand-mark.brand-icon {
    background: transparent;
  }

  .avatar,
  .profile-avatar-preview,
  .composer .avatar {
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
    box-shadow: inset 0 0 0 1px rgba(169, 99, 83, 0.14);
  }

  .page-header h1,
  .section-heading h2,
  .profile-page-header h1,
  .community-page-header h1 {
    color: var(--md-on-surface);
    font-weight: 600;
  }

  .composer,
  .moment-card,
  .profile-settings-card,
  .community-privacy-card,
  .community-settings-card,
  .community-season-card,
  .community-social-card,
  .personal-activity-intro,
  .couple-game-card,
  .circle-rewards-card {
    border-color: #e3ece6;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .visibility-row > span,
  .publish-circle-option,
  .location-preview {
    border-color: rgba(169, 99, 83, 0.18);
    color: #8a5548;
    background: #fff1ec;
  }

  .visibility-row button,
  .tool-button:hover,
  .ghost-button:hover,
  .tool-button.active {
    color: var(--md-primary);
  }

  .tool-button:hover,
  .ghost-button:hover,
  .tool-button.active {
    background: var(--md-surface-container);
  }

  .composer-bottom {
    border-top-color: #e8eee9;
  }

  .publish-button {
    border: 1px solid rgba(169, 99, 83, 0.18);
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
    font-weight: 650;
  }

  .publish-button:hover {
    color: var(--md-on-primary-container);
    background: #f1cfc5;
  }

  .profile-page-header {
    border-bottom-color: transparent;
  }

  .profile-menu-button,
  .profile-points-button,
  .profile-edit-button {
    color: #5f443b;
    background: rgba(255, 250, 247, 0.58);
  }

  .profile-edit-button:hover,
  .profile-edit-button[aria-expanded="true"] {
    color: #493832;
    background: rgba(255, 250, 247, 0.82);
  }

  .community-category-nav {
    border-bottom-color: #f0e4df;
    background: rgba(255, 255, 255, 0.98);
  }

  .community-category-nav button.active {
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
  }

  .community-publish-button,
  .personal-activity-create,
  .profile-avatar-upload-button {
    background: var(--md-primary);
  }

  .community-social-avatar {
    color: var(--md-on-primary-container);
    background: var(--md-primary-container);
  }

  .community-social-topic,
  .community-social-card.activity .community-social-location {
    color: #8a5548;
    background: #fff3ee;
  }

  .page-header h1,
  .section-heading h2,
  .community-page-header h1 {
    font-weight: 560;
  }

  .profile-page-header h1 {
    color: #ffffff;
    font-weight: 700;
  }

  .composer {
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(80, 55, 45, 0.05);
  }

  .profile-overview-stats span + span::before {
    display: none;
  }
}

@media (max-width: 780px) {
  .community-category-nav {
    position: sticky;
    z-index: 89;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 50px;
    margin: 0 0 14px;
    padding: 0;
    gap: 0;
    border: 0;
    border-bottom: 1px solid #e4e9ed;
    border-radius: 0;
    background: rgba(252, 250, 248, 0.98);
    box-shadow: none;
    backdrop-filter: none;
  }

  .community-category-nav button,
  .community-category-nav button:hover,
  .community-category-nav button.active {
    position: relative;
    min-height: 50px;
    padding: 8px 1px 10px;
    gap: 0;
    border-radius: 0;
    color: #77706c;
    background: transparent;
    box-shadow: none;
  }

  .community-category-nav button.active {
    color: var(--md-primary);
  }

  .community-category-nav button::after {
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--md-primary);
    content: "";
    transform: translateX(-50%);
    transition: width 180ms cubic-bezier(0.2, 0, 0, 1);
  }

  .community-category-nav button.active::after {
    width: 28px;
  }

  .community-category-nav button > span {
    display: none;
  }

  .community-category-nav button > strong {
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
  }
}

.public-video-copy [data-public-video-favorite],
.public-video-copy [data-public-video-like],
.public-video-copy [data-public-video-comment],
.public-video-copy [data-public-video-share],
.public-video-copy [data-public-video-message] {
  min-width: 48px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.public-video-copy [data-public-video-favorite].liked {
  color: #dc7b67;
}

.public-video-copy [data-public-video-like].liked {
  color: #f0b74f;
}

.public-video-empty > span,
#profileEmptyState > span {
  display: none;
}

.public-video-empty,
#profileEmptyState {
  text-align: center;
}

/* Video feed and player sync with the native APK video flows. */
.public-video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-video-actions > span {
  overflow: hidden;
  color: #6e675f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-video-pause,
.public-video-status,
.public-video-sound,
.public-video-fullscreen {
  display: none;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.public-video-pause {
  border-radius: 50%;
  background: rgba(25, 21, 18, 0.64);
}

.public-video-status {
  padding: 14px 18px;
  border-radius: 10px;
  color: #fff;
  background: rgba(35, 33, 32, 0.9);
  font-size: 13px;
  line-height: 1.6;
}

.public-video-pause[hidden],
.public-video-status[hidden],
.public-video-sound[hidden],
.public-video-fullscreen[hidden] {
  display: none;
}

.media-video-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #242321;
  cursor: pointer;
}

.media-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  background: #242321;
}

.media-video-preview[data-orientation="landscape"] .media-video-poster {
  object-fit: contain;
}

.media-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 38px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.moment-media.media-grid .media-video-play {
  font-size: 27px;
}

.video-player-dialog {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: #000;
}

.video-player-stage {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: #000;
}

.video-player-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 10px 10px;
}

.video-player-toolbar-button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
}

.video-player-title {
  overflow: hidden;
  padding: 0 8px;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-player-media-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.video-player-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-player-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(0, 0, 0, 0.72);
  font-size: 14px;
  pointer-events: none;
}

.video-player-status[hidden] {
  display: none;
}

.video-player-dialog.video-fullscreen .video-player-toolbar {
  display: none;
}

@media (max-width: 780px) {
  .app-shell.public-video-mode .public-video-card[data-orientation="portrait"] .public-video-media,
  .app-shell.public-video-mode .public-video-card[data-orientation="video-portrait"] .public-video-media {
    object-fit: cover;
  }

  .app-shell.public-video-mode .public-video-card[data-orientation="landscape"] .public-video-media {
    object-fit: contain;
  }

  .app-shell.public-video-mode .public-video-copy {
    padding: 50px 88px 20px 18px;
  }

  .app-shell.public-video-mode .public-video-actions {
    position: absolute;
    z-index: 6;
    right: 14px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .app-shell.public-video-mode .public-video-actions > span {
    display: none;
  }

  .app-shell.public-video-mode .public-video-actions [data-public-video-favorite],
  .app-shell.public-video-mode .public-video-actions [data-public-video-like],
  .app-shell.public-video-mode .public-video-actions [data-public-video-comment],
  .app-shell.public-video-mode .public-video-actions [data-public-video-share],
  .app-shell.public-video-mode .public-video-actions [data-public-video-message] {
    position: static;
    display: grid;
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    background: rgba(35, 29, 25, 0.5);
    backdrop-filter: blur(9px);
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
    white-space: pre-line;
  }

  .app-shell.public-video-mode .public-video-pause {
    position: absolute;
    z-index: 8;
    top: 50%;
    left: 50%;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    font-size: 28px;
    transform: translate(-50%, -50%);
  }

  .app-shell.public-video-mode .public-video-status {
    position: absolute;
    z-index: 9;
    top: 50%;
    left: 50%;
    display: grid;
    min-width: 220px;
    place-items: center;
    transform: translate(-50%, -50%);
  }

  .app-shell.public-video-mode .public-video-fullscreen {
    position: absolute;
    z-index: 10;
    top: calc(70px + env(safe-area-inset-top));
    right: 14px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    background: rgba(35, 29, 25, 0.5);
    font-size: 19px;
  }

  .app-shell.public-video-mode .public-video-sound {
    position: absolute;
    z-index: 10;
    top: calc(124px + env(safe-area-inset-top));
    right: 14px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    background: rgba(35, 29, 25, 0.5);
    font-size: 17px;
  }

  .app-shell.public-video-mode .public-video-pause[hidden],
  .app-shell.public-video-mode .public-video-status[hidden],
  .app-shell.public-video-mode .public-video-sound[hidden],
  .app-shell.public-video-mode .public-video-fullscreen[hidden] {
    display: none;
  }

  .app-shell.public-video-mode .public-video-card:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
  }

  .app-shell.public-video-mode .public-video-card:fullscreen .public-video-copy {
    bottom: 24px;
  }

  .app-shell.public-video-mode .public-video-card:fullscreen .public-video-actions {
    bottom: 24px;
  }

}

@media (max-width: 460px) {
  .video-player-toolbar-button {
    min-width: 64px;
  }

  .media-video-preview,
  .media-video-poster {
    min-height: 190px;
  }
}
